RelaxNG/publidoc.rng
changeset 10 0c7725713208
parent 8 1d4ee28efd68
child 11 2b32b535705c
equal deleted inserted replaced
9:1efd69b7c90e 10:0c7725713208
   379     <choice>
   379     <choice>
   380       <oneOrMore>
   380       <oneOrMore>
   381         <ref name="section"/>
   381         <ref name="section"/>
   382       </oneOrMore>
   382       </oneOrMore>
   383       <oneOrMore>
   383       <oneOrMore>
   384         <choice>
   384         <ref name="block"/>
   385           <ref name="parag"/>
       
   386           <ref name="media"/>
       
   387           <ref name="speech"/>
       
   388         </choice>
       
   389       </oneOrMore>
   385       </oneOrMore>
   390     </choice>
   386     </choice>
   391   </define>
   387   </define>
   392   <define name="section.attributes">
   388   <define name="section.attributes">
   393     <optional>
   389     <optional>
   402   <!--
   398   <!--
   403     =============================================================================
   399     =============================================================================
   404                                     Block level
   400                                     Block level
   405     =============================================================================
   401     =============================================================================
   406   -->
   402   -->
   407   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   403   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       
   404   <define name="block">
       
   405     <choice>
       
   406       <ref name="parag"/>
       
   407       <ref name="list"/>
       
   408       <ref name="media"/>
       
   409       <ref name="speech"/>
       
   410     </choice>
       
   411   </define>
       
   412   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   408   <define name="parag">
   413   <define name="parag">
   409     <element name="parag">
   414     <element name="parag">
   410       <ref name="parag.content"/>
   415       <ref name="parag.content"/>
   411     </element>
   416     </element>
   412   </define>
   417   </define>
   416       <zeroOrMore>
   421       <zeroOrMore>
   417         <ref name="link"/>
   422         <ref name="link"/>
   418       </zeroOrMore>
   423       </zeroOrMore>
   419     </interleave>
   424     </interleave>
   420   </define>
   425   </define>
       
   426   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       
   427   <!-- ~~~~~~ list -->
       
   428   <define name="list">
       
   429     <element name="list">
       
   430       <ref name="list.content"/>
       
   431     </element>
       
   432   </define>
       
   433   <define name="list.content">
       
   434     <optional>
       
   435       <ref name="title"/>
       
   436     </optional>
       
   437     <choice>
       
   438       <group>
       
   439         <optional>
       
   440           <attribute name="type">
       
   441             <value>ordered</value>
       
   442           </attribute>
       
   443         </optional>
       
   444         <ref name="item"/>
       
   445         <oneOrMore>
       
   446           <ref name="item"/>
       
   447         </oneOrMore>
       
   448       </group>
       
   449       <group>
       
   450         <attribute name="type">
       
   451           <value>itemized</value>
       
   452         </attribute>
       
   453         <ref name="item"/>
       
   454         <oneOrMore>
       
   455           <ref name="item"/>
       
   456         </oneOrMore>
       
   457       </group>
       
   458       <group>
       
   459         <attribute name="type">
       
   460           <value>glossary</value>
       
   461         </attribute>
       
   462         <oneOrMore>
       
   463           <ref name="glossary.item"/>
       
   464         </oneOrMore>
       
   465       </group>
       
   466     </choice>
       
   467   </define>
       
   468   <!-- ~~~~~~ item -->
       
   469   <define name="item">
       
   470     <element name="item">
       
   471       <ref name="item.content"/>
       
   472     </element>
       
   473   </define>
       
   474   <define name="item.content">
       
   475     <oneOrMore>
       
   476       <ref name="block"/>
       
   477     </oneOrMore>
       
   478   </define>
       
   479   <!-- ~~~~~~ glossary.item -->
       
   480   <define name="glossary.item">
       
   481     <element name="item">
       
   482       <ref name="glossary.item.content"/>
       
   483     </element>
       
   484   </define>
       
   485   <define name="glossary.item.content">
       
   486     <ref name="label"/>
       
   487     <oneOrMore>
       
   488       <ref name="block"/>
       
   489     </oneOrMore>
       
   490   </define>
       
   491   <!-- ~~~~~~ label -->
       
   492   <define name="label">
       
   493     <element name="label">
       
   494       <ref name="label.content"/>
       
   495     </element>
       
   496   </define>
       
   497   <define name="label.content">
       
   498     <ref name="inlines"/>
       
   499   </define>
   421   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   500   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   422   <!-- ~~~~~~ media -->
   501   <!-- ~~~~~~ media -->
   423   <define name="media">
   502   <define name="media">
   424     <element name="media">
   503     <element name="media">
   425       <ref name="media.content"/>
   504       <ref name="media.content"/>
   541         </zeroOrMore>
   620         </zeroOrMore>
   542         <zeroOrMore>
   621         <zeroOrMore>
   543           <ref name="highlight"/>
   622           <ref name="highlight"/>
   544         </zeroOrMore>
   623         </zeroOrMore>
   545         <zeroOrMore>
   624         <zeroOrMore>
       
   625           <ref name="mentioned"/>
       
   626         </zeroOrMore>
       
   627         <zeroOrMore>
       
   628           <ref name="quote"/>
       
   629         </zeroOrMore>
       
   630         <zeroOrMore>
       
   631           <ref name="acronym"/>
       
   632         </zeroOrMore>
       
   633         <zeroOrMore>
   546           <ref name="term"/>
   634           <ref name="term"/>
   547         </zeroOrMore>
       
   548         <zeroOrMore>
       
   549           <ref name="mentioned"/>
       
   550         </zeroOrMore>
       
   551         <zeroOrMore>
       
   552           <ref name="quote"/>
       
   553         </zeroOrMore>
       
   554         <zeroOrMore>
       
   555           <ref name="acronym"/>
       
   556         </zeroOrMore>
   635         </zeroOrMore>
   557       </interleave>
   636       </interleave>
   558     </mixed>
   637     </mixed>
   559   </define>
   638   </define>
   560   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   639   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   678     </element>
   757     </element>
   679   </define>
   758   </define>
   680   <define name="highlight.content">
   759   <define name="highlight.content">
   681     <ref name="inlines"/>
   760     <ref name="inlines"/>
   682   </define>
   761   </define>
       
   762   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       
   763   <define name="mentioned">
       
   764     <element name="mentioned">
       
   765       <ref name="mentioned.content"/>
       
   766     </element>
       
   767   </define>
       
   768   <define name="mentioned.content">
       
   769     <ref name="inlines"/>
       
   770   </define>
       
   771   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       
   772   <define name="quote">
       
   773     <element name="quote">
       
   774       <ref name="quote.content"/>
       
   775     </element>
       
   776   </define>
       
   777   <define name="quote.content">
       
   778     <ref name="inlines"/>
       
   779   </define>
       
   780   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       
   781   <define name="acronym">
       
   782     <element name="acronym">
       
   783       <ref name="acronym.content"/>
       
   784     </element>
       
   785   </define>
       
   786   <define name="acronym.content">
       
   787     <ref name="inlines"/>
       
   788   </define>
   683   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   789   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   684   <define name="term">
   790   <define name="term">
   685     <element name="term">
   791     <element name="term">
   686       <ref name="term.content"/>
   792       <ref name="term.content"/>
   687     </element>
   793     </element>
   688   </define>
   794   </define>
   689   <define name="term.content">
   795   <define name="term.content">
   690     <ref name="inlines"/>
       
   691   </define>
       
   692   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       
   693   <define name="mentioned">
       
   694     <element name="mentioned">
       
   695       <ref name="mentioned.content"/>
       
   696     </element>
       
   697   </define>
       
   698   <define name="mentioned.content">
       
   699     <ref name="inlines"/>
       
   700   </define>
       
   701   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       
   702   <define name="quote">
       
   703     <element name="quote">
       
   704       <ref name="quote.content"/>
       
   705     </element>
       
   706   </define>
       
   707   <define name="quote.content">
       
   708     <ref name="inlines"/>
       
   709   </define>
       
   710   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       
   711   <define name="acronym">
       
   712     <element name="acronym">
       
   713       <ref name="acronym.content"/>
       
   714     </element>
       
   715   </define>
       
   716   <define name="acronym.content">
       
   717     <ref name="inlines"/>
   796     <ref name="inlines"/>
   718   </define>
   797   </define>
   719   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   798   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   720   <define name="link">
   799   <define name="link">
   721     <element name="link">
   800     <element name="link">
   722       <ref name="link.attributes"/>
   801       <ref name="link.attributes"/>
   723       <ref name="link.content"/>
   802       <ref name="link.content"/>
   724     </element>
   803     </element>
   725   </define>
   804   </define>
   726   <define name="link.attributes">
   805   <define name="link.attributes">
   727     <empty/>
   806     <optional>
       
   807       <choice>
       
   808         <ref name="uri.attribute"/>
       
   809         <ref name="idref.attribute"/>
       
   810       </choice>
       
   811     </optional>
       
   812   </define>
       
   813   <define name="uri.attribute">
       
   814     <attribute name="uri">
       
   815       <data type="anyURI"/>
       
   816     </attribute>
       
   817   </define>
       
   818   <define name="idref.attribute">
       
   819     <attribute name="idref">
       
   820       <data type="IDREF"/>
       
   821     </attribute>
   728   </define>
   822   </define>
   729   <define name="link.content">
   823   <define name="link.content">
   730     <ref name="inlines"/>
   824     <ref name="inlines"/>
   731   </define>
   825   </define>
   732 </grammar>
   826 </grammar>