RelaxNG/publiset.rng
changeset 66 29c53c3d676e
parent 52 cb9addc3d98a
equal deleted inserted replaced
65:2aad27159a33 66:29c53c3d676e
    49       </optional>
    49       </optional>
    50       <optional>
    50       <optional>
    51         <ref name="xslt.attribute"/>
    51         <ref name="xslt.attribute"/>
    52       </optional>
    52       </optional>
    53       <ref name="remap.attributes"/>
    53       <ref name="remap.attributes"/>
       
    54       <optional>
       
    55         <ref name="lang.attribute"/>
       
    56       </optional>
    54     </interleave>
    57     </interleave>
    55   </define>
    58   </define>
    56   <define name="composition.id.attribute">
    59   <define name="composition.id.attribute">
    57     <attribute name="xml:id">
    60     <attribute name="xml:id">
    58       <data type="ID"/>
    61       <data type="ID"/>
    68       <data type="anyURI"/>
    71       <data type="anyURI"/>
    69     </attribute>
    72     </attribute>
    70   </define>
    73   </define>
    71   <define name="xpath.attribute">
    74   <define name="xpath.attribute">
    72     <attribute name="xpath"/>
    75     <attribute name="xpath"/>
       
    76   </define>
       
    77   <define name="lang.attribute">
       
    78     <attribute name="xml:lang">
       
    79       <data type="language"/>
       
    80     </attribute>
    73   </define>
    81   </define>
    74   <define name="composition.content">
    82   <define name="composition.content">
    75     <optional>
    83     <optional>
    76       <ref name="composition.head"/>
    84       <ref name="composition.head"/>
    77     </optional>
    85     </optional>
    93     <interleave>
   101     <interleave>
    94       <ref name="selection.id.attribute"/>
   102       <ref name="selection.id.attribute"/>
    95       <optional>
   103       <optional>
    96         <ref name="path.attribute"/>
   104         <ref name="path.attribute"/>
    97       </optional>
   105       </optional>
       
   106       <optional>
       
   107         <ref name="lang.attribute"/>
       
   108       </optional>
    98     </interleave>
   109     </interleave>
    99   </define>
   110   </define>
   100   <define name="selection.id.attribute">
   111   <define name="selection.id.attribute">
   101     <attribute name="xml:id">
   112     <attribute name="xml:id">
   102       <data type="ID"/>
   113       <data type="ID"/>
   149       </optional>
   160       </optional>
   150       <zeroOrMore>
   161       <zeroOrMore>
   151         <ref name="identifier"/>
   162         <ref name="identifier"/>
   152       </zeroOrMore>
   163       </zeroOrMore>
   153       <optional>
   164       <optional>
   154         <ref name="language"/>
       
   155       </optional>
       
   156       <optional>
       
   157         <ref name="copyright"/>
   165         <ref name="copyright"/>
   158       </optional>
   166       </optional>
   159       <zeroOrMore>
   167       <optional>
   160         <ref name="author"/>
   168         <ref name="contributors"/>
   161       </zeroOrMore>
       
   162       <optional>
       
   163         <ref name="publisher"/>
       
   164       </optional>
   169       </optional>
   165       <optional>
   170       <optional>
   166         <ref name="abstract"/>
   171         <ref name="abstract"/>
   167       </optional>
   172       </optional>
   168       <optional>
   173       <optional>
   169         <ref name="cover"/>
   174         <ref name="cover"/>
   170       </optional>
   175       </optional>
   171     </interleave>
   176     </interleave>
   172   </define>
   177   </define>
   173   <define name="division.head.content">
   178   <define name="division.head.content">
   174     <interleave>
   179     <optional>
   175       <optional>
   180       <ref name="title"/>
   176         <ref name="title"/>
   181       <optional>
   177         <optional>
   182         <ref name="subtitle"/>
   178           <ref name="subtitle"/>
   183       </optional>
   179         </optional>
   184     </optional>
   180       </optional>
       
   181       <optional>
       
   182         <ref name="language"/>
       
   183       </optional>
       
   184     </interleave>
       
   185   </define>
   185   </define>
   186   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   186   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   187   <define name="title">
   187   <define name="title">
   188     <element name="title">
   188     <element name="title">
   189       <ref name="title.content"/>
   189       <ref name="title.content"/>
   220     <choice>
   220     <choice>
   221       <ref name="identifier.uri"/>
   221       <ref name="identifier.uri"/>
   222       <ref name="identifier.ean"/>
   222       <ref name="identifier.ean"/>
   223     </choice>
   223     </choice>
   224   </define>
   224   </define>
   225   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       
   226   <define name="language">
       
   227     <element name="language">
       
   228       <ref name="language.attributes"/>
       
   229     </element>
       
   230   </define>
       
   231   <define name="language.attributes">
       
   232     <ref name="lang.attribute"/>
       
   233   </define>
       
   234   <define name="lang.attribute">
       
   235     <attribute name="xml:lang">
       
   236       <data type="language"/>
       
   237     </attribute>
       
   238   </define>
       
   239   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   225   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   240   <define name="copyright">
   226   <define name="copyright">
   241     <element name="copyright">
   227     <element name="copyright">
   242       <ref name="copyright.content"/>
   228       <ref name="copyright.content"/>
   243     </element>
   229     </element>
   244   </define>
   230   </define>
   245   <define name="copyright.content">
   231   <define name="copyright.content">
   246     <ref name="inlines"/>
   232     <ref name="inlines"/>
   247   </define>
   233   </define>
   248   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   234   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   249   <!-- ~~~~~~ author -->
   235   <!-- ~~~~~~ contributors -->
   250   <define name="author">
   236   <define name="contributors">
   251     <element name="author">
   237     <element name="contributors">
   252       <ref name="author.content"/>
   238       <ref name="contributors.content"/>
   253     </element>
   239     </element>
   254   </define>
   240   </define>
   255   <define name="author.attributes">
   241   <define name="contributors.content">
   256     <optional>
   242     <oneOrMore>
   257       <ref name="role.attribute"/>
   243       <ref name="contributor"/>
   258     </optional>
   244     </oneOrMore>
   259   </define>
   245   </define>
   260   <define name="role.attribute">
   246   <!-- ~~~~~~ contributor -->
   261     <attribute name="role">
   247   <define name="contributor">
   262       <choice>
   248     <element name="contributor">
   263         <value>author</value>
   249       <ref name="contributor.content"/>
   264         <value>illustrator</value>
   250     </element>
   265       </choice>
   251   </define>
   266     </attribute>
   252   <define name="contributor.content">
   267   </define>
   253     <choice>
   268   <define name="author.content">
   254       <group>
   269     <optional>
   255         <optional>
   270       <ref name="firstname"/>
   256           <ref name="firstname"/>
   271     </optional>
   257           <optional>
   272     <ref name="lastname"/>
   258             <ref name="secondname"/>
       
   259           </optional>
       
   260         </optional>
       
   261         <ref name="lastname"/>
       
   262       </group>
       
   263       <ref name="label"/>
       
   264     </choice>
       
   265     <optional>
       
   266       <ref name="address"/>
       
   267     </optional>
       
   268     <optional>
       
   269       <ref name="link"/>
       
   270     </optional>
   273     <zeroOrMore>
   271     <zeroOrMore>
   274       <ref name="role"/>
   272       <ref name="role"/>
   275     </zeroOrMore>
   273     </zeroOrMore>
   276   </define>
   274   </define>
   277   <!-- ~~~~~~ publisher -->
   275   <!-- ~~~~~~ firstname, secondname, lastname, label -->
   278   <define name="publisher">
       
   279     <element name="publisher">
       
   280       <ref name="publisher.content"/>
       
   281     </element>
       
   282   </define>
       
   283   <define name="publisher.content">
       
   284     <ref name="label"/>
       
   285     <optional>
       
   286       <ref name="link"/>
       
   287     </optional>
       
   288   </define>
       
   289   <!-- ~~~~~~ firstname -->
       
   290   <define name="firstname">
   276   <define name="firstname">
   291     <element name="firstname">
   277     <element name="firstname">
   292       <ref name="firstname.content"/>
   278       <ref name="firstname.content"/>
   293     </element>
   279     </element>
   294   </define>
   280   </define>
   295   <define name="firstname.content">
   281   <define name="secondname">
   296     <ref name="inlines"/>
   282     <element name="secondname">
   297   </define>
   283       <ref name="secondname.content"/>
   298   <!-- ~~~~~~ lastname -->
   284     </element>
       
   285   </define>
   299   <define name="lastname">
   286   <define name="lastname">
   300     <element name="lastname">
   287     <element name="lastname">
   301       <ref name="lastname.content"/>
   288       <ref name="lastname.content"/>
   302     </element>
   289     </element>
   303   </define>
   290   </define>
       
   291   <define name="label">
       
   292     <element name="label">
       
   293       <ref name="label.content"/>
       
   294     </element>
       
   295   </define>
       
   296   <define name="firstname.content">
       
   297     <ref name="inlines"/>
       
   298   </define>
       
   299   <define name="secondname.content">
       
   300     <ref name="inlines"/>
       
   301   </define>
   304   <define name="lastname.content">
   302   <define name="lastname.content">
       
   303     <ref name="inlines"/>
       
   304   </define>
       
   305   <define name="label.content">
       
   306     <ref name="inlines"/>
       
   307   </define>
       
   308   <!-- ~~~~~~ address -->
       
   309   <define name="address">
       
   310     <element name="address">
       
   311       <ref name="address.content"/>
       
   312     </element>
       
   313   </define>
       
   314   <define name="address.content">
   305     <ref name="inlines"/>
   315     <ref name="inlines"/>
   306   </define>
   316   </define>
   307   <!-- ~~~~~~ role -->
   317   <!-- ~~~~~~ role -->
   308   <define name="role">
   318   <define name="role">
   309     <element name="role">
   319     <element name="role">
   310       <ref name="role.attributes"/>
   320       <ref name="role.content"/>
   311     </element>
   321     </element>
   312   </define>
   322   </define>
   313   <define name="role.attributes">
   323   <define name="role.content">
   314     <ref name="role.of.attribute"/>
   324     <choice>
   315   </define>
   325       <value>author</value>
   316   <define name="role.of.attribute">
   326       <value>illustrator</value>
   317     <attribute name="of">
   327       <value>publisher</value>
   318       <choice>
   328     </choice>
   319         <value>author</value>
       
   320         <value>illustrator</value>
       
   321       </choice>
       
   322     </attribute>
       
   323   </define>
       
   324   <!-- ~~~~~~ label -->
       
   325   <define name="label">
       
   326     <element name="label">
       
   327       <ref name="label.content"/>
       
   328     </element>
       
   329   </define>
       
   330   <define name="label.content">
       
   331     <ref name="inlines"/>
       
   332   </define>
   329   </define>
   333   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   330   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   334   <define name="abstract">
   331   <define name="abstract">
   335     <element name="abstract">
   332     <element name="abstract">
   336       <ref name="abstract.content"/>
   333       <ref name="abstract.content"/>