OpenDocumentSub.rng 7.2 KB

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