RelaxNG/publidoc.rnc
changeset 33 c70de8fae29d
parent 30 c0f9e813c039
child 34 c51d5097d065
equal deleted inserted replaced
32:057abb684d35 33:c70de8fae29d
   103 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   103 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   104 
   104 
   105 # ~~~~~~ author
   105 # ~~~~~~ author
   106 author = element author { author.content }
   106 author = element author { author.content }
   107 
   107 
       
   108 author.attributes =
       
   109    role.attribute?
       
   110 role.attribute = attribute role { "author" | "illustrator" }
       
   111 
   108 author.content =
   112 author.content =
   109    firstname?,
   113    firstname?,
   110    lastname
   114    lastname,
       
   115    role*
       
   116 
       
   117 role = element role { role.attributes }
       
   118 
       
   119 role.attributes =
       
   120    role.of.attribute
       
   121 role.of.attribute = attribute of { "author" | "illustrator" }
   111 
   122 
   112 # ~~~~~~ publisher
   123 # ~~~~~~ publisher
   113 publisher = element publisher { publisher.content }
   124 publisher = element publisher { publisher.content }
   114 
   125 
   115 publisher.content = inlines
   126 publisher.content = inlines
   153 # ~~~~~~ pagenumber
   164 # ~~~~~~ pagenumber
   154 pagenumber = element pagenumber { pagenumber.attributes }
   165 pagenumber = element pagenumber { pagenumber.attributes }
   155 
   166 
   156 pagenumber.attributes =
   167 pagenumber.attributes =
   157    pagenumber.value.attribute
   168    pagenumber.value.attribute
   158 pagenumber.value.attribute = attribute value { pagenumber.value.enumeration }
   169 pagenumber.value.attribute = attribute value { xsd:positiveInteger }
   159 pagenumber.value.enumeration = xsd:positiveInteger
       
   160 
   170 
   161 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   171 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   162 
   172 
   163 # ~~~~~~ subjectset
   173 # ~~~~~~ subjectset
   164 subjectset = element subjectset { subjectset.content }
   174 subjectset = element subjectset { subjectset.content }
   441 
   451 
   442 date.attributes =
   452 date.attributes =
   443    date.value.attribute
   453    date.value.attribute
   444  & date.of.attribute?
   454  & date.of.attribute?
   445 date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear }
   455 date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear }
   446 date.of.attribute = attribute of { date.of.enumeration }
   456 date.of.attribute = attribute of { "birth" | "death" }
   447 date.of.enumeration = "birth" | "death"
       
   448 
   457 
   449 date.content = mixed { sup* }
   458 date.content = mixed { sup* }
   450 
   459 
   451 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   460 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   452 
   461 
   453 name = element name { name.attributes, name.content }
   462 name = element name { name.attributes, name.content }
   454 
   463 
   455 name.attributes =
   464 name.attributes =
   456    name.of.attribute?
   465    name.of.attribute?
   457 name.of.attribute = attribute of { name.of.enumeration }
   466 name.of.attribute = attribute of
   458 name.of.enumeration = "person" | "company" | "book" | "newspaper" | "party"
   467    { "person" | "company" | "book" | "newspaper" | "party" }
   459 
   468 
   460 name.content = inlines
   469 name.content = inlines
   461 
   470 
   462 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   471 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   463 
   472