Home | History | Annotate | Download | only in relaxng
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3     OASIS OpenDocument v1.0
      4     Relax-NG Schema
      5     
      6     ** It's only a very small sub-set of the schema, meant for debugging text-notes-configuration element **
      7 -->
      8 
      9 <grammar
     10     xmlns="http://relaxng.org/ns/structure/1.0"
     11     xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
     12 
     13     datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
     14 
     15     xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
     16     xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
     17     xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
     18     xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
     19     xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
     20     xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
     21     xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
     22     xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
     23     xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
     24     xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
     25     xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
     26     xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
     27     xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
     28     xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
     29 
     30     xmlns:dc="http://purl.org/dc/elements/1.1/"
     31     xmlns:xlink="http://www.w3.org/1999/xlink"
     32     xmlns:math="http://www.w3.org/1998/Math/MathML"
     33     xmlns:xforms="http://www.w3.org/2002/xforms"
     34 
     35     xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
     36     xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
     37     xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
     38 >
     39 <define name="office-process-content">
     40     <optional>
     41         <attribute name="office:process-content" a:defaultValue="true">
     42             <ref name="boolean"/>
     43         </attribute>
     44     </optional>
     45 </define>
     46 <start>
     47     <choice>
     48         <ref name="office-document-styles"/>
     49     </choice>
     50 </start>
     51 <define name="office-document-styles">
     52     <element name="office:document-styles">
     53         <ref name="office-document-common-attrs"/>
     54         <ref name="office-styles"/>
     55     </element>
     56 </define>
     57 <define name="office-document-common-attrs" combine="interleave">
     58     <optional>
     59         <attribute name="office:version">
     60             <ref name="string"/>
     61         </attribute>
     62     </optional>
     63 </define>
     64 <define name="office-styles">
     65     <optional>
     66         <element name="office:styles">
     67             <interleave>
     68                 <zeroOrMore>
     69                     <ref name="text-notes-configuration"/>
     70                 </zeroOrMore>
     71             </interleave>
     72         </element>
     73     </optional>
     74 </define>
     75 <define name="text-notes-configuration">
     76     <element name="text:notes-configuration">
     77         <ref name="text-notes-configuration-content"/>
     78     </element>
     79 </define>
     80 <define name="text-notes-configuration-content" combine="interleave">
     81     <ref name="text-note-class"/>
     82 </define>
     83 <define name="text-notes-configuration-content" combine="interleave">
     84     <optional>
     85         <attribute name="text:citation-style-name">
     86             <ref name="styleNameRef"/>
     87         </attribute>
     88     </optional>
     89 </define>
     90 <define name="text-notes-configuration-content" combine="interleave">
     91     <optional>
     92         <attribute name="text:citation-body-style-name">
     93             <ref name="styleNameRef"/>
     94         </attribute>
     95     </optional>
     96 </define>
     97 <define name="text-notes-configuration-content" combine="interleave">
     98     <optional>
     99         <attribute name="text:default-style-name">
    100             <ref name="styleNameRef"/>
    101         </attribute>
    102     </optional>
    103 </define>
    104 <define name="text-notes-configuration-content" combine="interleave">
    105     <optional>
    106         <attribute name="text:master-page-name">
    107             <ref name="styleNameRef"/>
    108         </attribute>
    109     </optional>
    110 </define>
    111 <define name="text-notes-configuration-content" combine="interleave">
    112     <optional>
    113         <attribute name="text:start-value">
    114             <ref name="nonNegativeInteger"/>
    115         </attribute>
    116     </optional>
    117 </define>
    118 <define name="text-notes-configuration-content" combine="interleave">
    119     <ref name="common-num-format-prefix-suffix-attlist"/>
    120     <optional>
    121         <ref name="common-num-format-attlist"/>
    122     </optional>
    123 </define>
    124 <define name="text-notes-configuration-content" combine="interleave">
    125     <optional>
    126         <attribute name="text:start-numbering-at">
    127             <choice>
    128                 <value>document</value>
    129                 <value>chapter</value>
    130                 <value>page</value>
    131             </choice>
    132         </attribute>
    133     </optional>
    134 </define>
    135 <define name="text-notes-configuration-content" combine="interleave">
    136     <optional>
    137         <attribute name="text:footnotes-position">
    138             <choice>
    139                 <value>text</value>
    140                 <value>page</value>
    141                 <value>section</value>
    142                 <value>document</value>
    143             </choice>
    144         </attribute>
    145     </optional>
    146 </define>
    147 <define name="text-notes-configuration-content" combine="interleave">
    148     <optional>
    149         <element name="text:note-continuation-notice-forward">
    150             <text/>
    151         </element>
    152     </optional>
    153 </define>
    154 <define name="text-notes-configuration-content" combine="interleave">
    155     <optional>
    156         <element name="text:note-continuation-notice-backward">
    157             <text/>
    158         </element>
    159     </optional>
    160 </define>
    161 <define name="common-num-format-prefix-suffix-attlist" combine="interleave">
    162     <optional>
    163         <attribute name="style:num-prefix">
    164             <ref name="string"/>
    165         </attribute>
    166     </optional>
    167     <optional>
    168         <attribute name="style:num-suffix">
    169             <ref name="string"/>
    170         </attribute>
    171     </optional>
    172 </define>
    173 <define name="common-num-format-attlist" combine="interleave">
    174     <choice>
    175         <attribute name="style:num-format">
    176             <choice>
    177                 <value>1</value>
    178                 <value>i</value>
    179                 <value>I</value>
    180                 <ref name="string"/>
    181                 <empty/>
    182             </choice>
    183         </attribute>
    184         <group>
    185             <attribute name="style:num-format">
    186                 <choice>
    187                     <value>a</value>
    188                     <value>A</value>
    189                 </choice>
    190             </attribute>
    191             <ref name="style-num-letter-sync-attlist"/>
    192         </group>
    193         <empty/>
    194     </choice>
    195 </define>
    196 <define name="style-num-letter-sync-attlist" combine="interleave">
    197     <optional>
    198         <attribute name="style:num-letter-sync">
    199             <ref name="boolean"/>
    200         </attribute>
    201     </optional>
    202 </define>
    203 <define name="text-note-class">
    204     <attribute name="text:note-class">
    205         <choice>
    206             <value>footnote</value>
    207             <value>endnote</value>
    208         </choice>
    209     </attribute>
    210 </define>
    211 <define name="styleNameRef">
    212     <choice>
    213         <data type="NCName"/>
    214         <empty/>
    215     </choice>
    216 </define>
    217 <define name="nonNegativeInteger">
    218     <data type="nonNegativeInteger"/>
    219 </define>
    220 <define name="boolean">
    221     <choice>
    222         <value>true</value>
    223         <value>false</value>
    224     </choice>
    225 </define>
    226 <define name="string">
    227     <data type="string"/>
    228 </define>
    229 </grammar>
    230