ezxml_schema.rng 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <grammar ns="http://ez.no/namespaces/ezpublish3" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="">
  3. <start>
  4. <element name="section">
  5. <zeroOrMore>
  6. <ref name="sectionContent"/>
  7. </zeroOrMore>
  8. </element>
  9. </start>
  10. <define name="sectionContent">
  11. <choice>
  12. <element name="section">
  13. <oneOrMore>
  14. <ref name="sectionContent"/>
  15. </oneOrMore>
  16. </element>
  17. <element name="paragraph">
  18. <ref name="paragraphContent"/>
  19. </element>
  20. <element name="header">
  21. <ref name="headerContent"/>
  22. </element>
  23. </choice>
  24. </define>
  25. <define name="headerContent">
  26. <optional>
  27. <attribute name="anchor_name">
  28. <data type="string"/>
  29. </attribute>
  30. </optional>
  31. <optional>
  32. <attribute name="level">
  33. <data type="string"/>
  34. </attribute>
  35. </optional>
  36. <optional>
  37. <attribute name="class">
  38. <data type="string"/>
  39. </attribute>
  40. </optional>
  41. <text/>
  42. </define>
  43. <define name="paragraphContent">
  44. <optional>
  45. <attribute name="class">
  46. <data type="string"/>
  47. </attribute>
  48. </optional>
  49. <oneOrMore>
  50. <choice>
  51. <ref name="inlineContent"/>
  52. <element name="line">
  53. <ref name="inlineContent"/>
  54. </element>
  55. <element name="embed">
  56. <ref name="embedAttributes"/>
  57. </element>
  58. <element name="ol">
  59. <ref name="listContent"/>
  60. </element>
  61. <element name="ul">
  62. <ref name="listContent"/>
  63. </element>
  64. <element name="custom">
  65. <attribute name="name">
  66. <data type="string"/>
  67. </attribute>
  68. </element>
  69. <element name="literal">
  70. <optional>
  71. <attribute name="class">
  72. <data type="string"/>
  73. </attribute>
  74. </optional>
  75. <text/>
  76. </element>
  77. <element name="table">
  78. <ref name="tableContent"/>
  79. </element>
  80. </choice>
  81. </oneOrMore>
  82. </define>
  83. <define name="listContent">
  84. <optional>
  85. <attribute name="class">
  86. <data type="string"/>
  87. </attribute>
  88. </optional>
  89. <oneOrMore>
  90. <element name="li">
  91. <optional>
  92. <attribute name="class">
  93. <data type="string"/>
  94. </attribute>
  95. </optional>
  96. <oneOrMore>
  97. <element name="paragraph">
  98. <ref name="paragraphContent"/>
  99. </element>
  100. </oneOrMore>
  101. </element>
  102. </oneOrMore>
  103. </define>
  104. <define name="tableContent">
  105. <optional>
  106. <attribute name="class">
  107. <data type="string"/>
  108. </attribute>
  109. </optional>
  110. <optional>
  111. <attribute name="width">
  112. <data type="string"/>
  113. </attribute>
  114. </optional>
  115. <optional>
  116. <attribute name="border">
  117. <data type="string"/>
  118. </attribute>
  119. </optional>
  120. <oneOrMore>
  121. <element name="tr">
  122. <optional>
  123. <attribute name="class">
  124. <data type="string"/>
  125. </attribute>
  126. </optional>
  127. <choice>
  128. <oneOrMore>
  129. <element name="td">
  130. <ref name="tableCellContent"/>
  131. </element>
  132. </oneOrMore>
  133. <oneOrMore>
  134. <element name="th">
  135. <ref name="tableCellContent"/>
  136. </element>
  137. </oneOrMore>
  138. </choice>
  139. </element>
  140. </oneOrMore>
  141. </define>
  142. <define name="tableCellContent">
  143. <optional>
  144. <attribute name="class">
  145. <data type="string"/>
  146. </attribute>
  147. </optional>
  148. <optional>
  149. <attribute name="xhtml:width">
  150. <data type="string"/>
  151. </attribute>
  152. </optional>
  153. <optional>
  154. <attribute name="xhtml:colspan">
  155. <data type="string"/>
  156. </attribute>
  157. </optional>
  158. <optional>
  159. <attribute name="xhtml:rowspan">
  160. <data type="string"/>
  161. </attribute>
  162. </optional>
  163. <zeroOrMore>
  164. <choice>
  165. <ref name="sectionContent"/>
  166. <element name="table">
  167. <ref name="tableContent"/>
  168. </element>
  169. </choice>
  170. </zeroOrMore>
  171. </define>
  172. <define name="inlineContent">
  173. <zeroOrMore>
  174. <choice>
  175. <text/>
  176. <element name="embed">
  177. <ref name="embedAttributes"/>
  178. </element>
  179. <element name="embed-inline">
  180. <ref name="embedAttributes"/>
  181. </element>
  182. <element name="strong">
  183. <ref name="inlineElementContent"/>
  184. </element>
  185. <element name="emphasize">
  186. <ref name="inlineElementContent"/>
  187. </element>
  188. <element name="link">
  189. <ref name="linkContent"/>
  190. </element>
  191. <element name="anchor">
  192. <optional>
  193. <attribute name="name">
  194. <data type="string"/>
  195. </attribute>
  196. </optional>
  197. <ref name="inlineContent"/>
  198. </element>
  199. </choice>
  200. </zeroOrMore>
  201. </define>
  202. <define name="inlineElementContent">
  203. <optional>
  204. <attribute name="class">
  205. <data type="string"/>
  206. </attribute>
  207. </optional>
  208. <ref name="inlineContent"/>
  209. </define>
  210. <define name="embedAttributes">
  211. <optional>
  212. <attribute name="id">
  213. <data type="string"/>
  214. </attribute>
  215. </optional>
  216. <optional>
  217. <attribute name="object_id">
  218. <data type="string"/>
  219. </attribute>
  220. </optional>
  221. <optional>
  222. <attribute name="node_id">
  223. <data type="string"/>
  224. </attribute>
  225. </optional>
  226. <optional>
  227. <attribute name="show_path">
  228. <data type="string"/>
  229. </attribute>
  230. </optional>
  231. <optional>
  232. <attribute name="size">
  233. <data type="string"/>
  234. </attribute>
  235. </optional>
  236. <optional>
  237. <attribute name="align">
  238. <data type="string"/>
  239. </attribute>
  240. </optional>
  241. <optional>
  242. <attribute name="view">
  243. <data type="string"/>
  244. </attribute>
  245. </optional>
  246. <optional>
  247. <attribute name="xhtml:id">
  248. <data type="string"/>
  249. </attribute>
  250. </optional>
  251. <optional>
  252. <attribute name="class">
  253. <data type="string"/>
  254. </attribute>
  255. </optional>
  256. <optional>
  257. <attribute name="target">
  258. <data type="string"/>
  259. </attribute>
  260. </optional>
  261. </define>
  262. <define name="linkContent">
  263. <optional>
  264. <attribute name="class">
  265. <data type="string"/>
  266. </attribute>
  267. </optional>
  268. <optional>
  269. <attribute name="xhtml:id">
  270. <data type="string"/>
  271. </attribute>
  272. </optional>
  273. <optional>
  274. <attribute name="target">
  275. <data type="string"/>
  276. </attribute>
  277. </optional>
  278. <optional>
  279. <attribute name="xhtml:title">
  280. <data type="string"/>
  281. </attribute>
  282. </optional>
  283. <optional>
  284. <attribute name="object_id">
  285. <data type="string"/>
  286. </attribute>
  287. </optional>
  288. <optional>
  289. <attribute name="node_id">
  290. <data type="string"/>
  291. </attribute>
  292. </optional>
  293. <optional>
  294. <attribute name="show_path">
  295. <data type="string"/>
  296. </attribute>
  297. </optional>
  298. <optional>
  299. <attribute name="anchor_name">
  300. <data type="string"/>
  301. </attribute>
  302. </optional>
  303. <optional>
  304. <attribute name="url_id">
  305. <data type="string"/>
  306. </attribute>
  307. </optional>
  308. <optional>
  309. <attribute name="id">
  310. <data type="string"/>
  311. </attribute>
  312. </optional>
  313. <optional>
  314. <attribute name="view">
  315. <data type="string"/>
  316. </attribute>
  317. </optional>
  318. <ref name="inlineContent"/>
  319. </define>
  320. </grammar>