RelaxNG/publiset.rng
changeset 34 c51d5097d065
parent 30 c0f9e813c039
child 35 de4114d12ef1
equal deleted inserted replaced
33:c70de8fae29d 34:c51d5097d065
   145         <ref name="title"/>
   145         <ref name="title"/>
   146         <optional>
   146         <optional>
   147           <ref name="subtitle"/>
   147           <ref name="subtitle"/>
   148         </optional>
   148         </optional>
   149       </optional>
   149       </optional>
       
   150       <zeroOrMore>
       
   151         <ref name="identifier"/>
       
   152       </zeroOrMore>
   150       <optional>
   153       <optional>
   151         <ref name="language"/>
   154         <ref name="language"/>
   152       </optional>
   155       </optional>
   153       <zeroOrMore>
   156       <zeroOrMore>
   154         <ref name="author"/>
   157         <ref name="author"/>
   185       <ref name="title.content"/>
   188       <ref name="title.content"/>
   186     </element>
   189     </element>
   187   </define>
   190   </define>
   188   <define name="title.content">
   191   <define name="title.content">
   189     <ref name="inlines"/>
   192     <ref name="inlines"/>
       
   193   </define>
       
   194   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       
   195   <define name="identifier">
       
   196     <element name="identifier">
       
   197       <ref name="identifier.content"/>
       
   198       <ref name="identifier.attributes"/>
       
   199     </element>
       
   200   </define>
       
   201   <define name="identifier.attributes">
       
   202     <ref name="class.attribute"/>
       
   203   </define>
       
   204   <define name="class.attribute">
       
   205     <attribute name="class">
       
   206       <choice>
       
   207         <value>uri</value>
       
   208         <value>ean</value>
       
   209       </choice>
       
   210     </attribute>
       
   211   </define>
       
   212   <define name="identifier.content">
       
   213     <choice>
       
   214       <data type="anyURI"/>
       
   215       <data type="NMTOKEN"/>
       
   216     </choice>
   190   </define>
   217   </define>
   191   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   218   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   192   <define name="language">
   219   <define name="language">
   193     <element name="language">
   220     <element name="language">
   194       <ref name="language.attributes"/>
   221       <ref name="language.attributes"/>
   207   <define name="author">
   234   <define name="author">
   208     <element name="author">
   235     <element name="author">
   209       <ref name="author.content"/>
   236       <ref name="author.content"/>
   210     </element>
   237     </element>
   211   </define>
   238   </define>
       
   239   <define name="author.attributes">
       
   240     <optional>
       
   241       <ref name="role.attribute"/>
       
   242     </optional>
       
   243   </define>
       
   244   <define name="role.attribute">
       
   245     <attribute name="role">
       
   246       <choice>
       
   247         <value>author</value>
       
   248         <value>illustrator</value>
       
   249       </choice>
       
   250     </attribute>
       
   251   </define>
   212   <define name="author.content">
   252   <define name="author.content">
   213     <optional>
   253     <optional>
   214       <ref name="firstname"/>
   254       <ref name="firstname"/>
   215     </optional>
   255     </optional>
   216     <ref name="lastname"/>
   256     <ref name="lastname"/>
       
   257     <zeroOrMore>
       
   258       <ref name="role"/>
       
   259     </zeroOrMore>
   217   </define>
   260   </define>
   218   <!-- ~~~~~~ publisher -->
   261   <!-- ~~~~~~ publisher -->
   219   <define name="publisher">
   262   <define name="publisher">
   220     <element name="publisher">
   263     <element name="publisher">
   221       <ref name="publisher.content"/>
   264       <ref name="publisher.content"/>
   222     </element>
   265     </element>
   223   </define>
   266   </define>
   224   <define name="publisher.content">
   267   <define name="publisher.content">
   225     <ref name="inlines"/>
   268     <ref name="label"/>
       
   269     <optional>
       
   270       <ref name="url"/>
       
   271     </optional>
   226   </define>
   272   </define>
   227   <!-- ~~~~~~ firstname -->
   273   <!-- ~~~~~~ firstname -->
   228   <define name="firstname">
   274   <define name="firstname">
   229     <element name="firstname">
   275     <element name="firstname">
   230       <ref name="firstname.content"/>
   276       <ref name="firstname.content"/>
   239       <ref name="lastname.content"/>
   285       <ref name="lastname.content"/>
   240     </element>
   286     </element>
   241   </define>
   287   </define>
   242   <define name="lastname.content">
   288   <define name="lastname.content">
   243     <ref name="inlines"/>
   289     <ref name="inlines"/>
       
   290   </define>
       
   291   <!-- ~~~~~~ label -->
       
   292   <define name="label">
       
   293     <element name="label">
       
   294       <ref name="label.content"/>
       
   295     </element>
       
   296   </define>
       
   297   <define name="label.content">
       
   298     <ref name="inlines"/>
       
   299   </define>
       
   300   <!-- ~~~~~~ role -->
       
   301   <define name="role">
       
   302     <element name="role">
       
   303       <ref name="role.attributes"/>
       
   304     </element>
       
   305   </define>
       
   306   <define name="role.attributes">
       
   307     <ref name="role.of.attribute"/>
       
   308   </define>
       
   309   <define name="role.of.attribute">
       
   310     <attribute name="of">
       
   311       <choice>
       
   312         <value>author</value>
       
   313         <value>illustrator</value>
       
   314       </choice>
       
   315     </attribute>
       
   316   </define>
       
   317   <!-- ~~~~~~ url -->
       
   318   <define name="url">
       
   319     <element name="url">
       
   320       <ref name="url.content"/>
       
   321     </element>
       
   322   </define>
       
   323   <define name="url.content">
       
   324     <data type="anyURI"/>
   244   </define>
   325   </define>
   245   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   326   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   246   <!-- ~~~~~~ source -->
   327   <!-- ~~~~~~ source -->
   247   <define name="source">
   328   <define name="source">
   248     <element name="source">
   329     <element name="source">