ezxml_schema_lose.rnc 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. default namespace = "http://ez.no/namespaces/ezpublish3"
  2. namespace image = "http://ez.no/namespaces/ezpublish3/image/"
  3. namespace xhtml = "http://ez.no/namespaces/ezpublish3/xhtml/"
  4. namespace custom = "http://ez.no/namespaces/ezpublish3/custom/"
  5. grammar {
  6. start = element section { sectionContent* }
  7. sectionContent =
  8. # From documentation
  9. element h { headerContent } |
  10. element p { paragraphContent } |
  11. # From ezxml schema
  12. element section { sectionContent+ } |
  13. element paragraph { paragraphContent } |
  14. element header { headerContent } |
  15. # Not documented at all, but some documents do not contain wrapping paragraphs
  16. inlineContent
  17. headerContent =
  18. # From documentation
  19. attribute custom_parameter { string }?,
  20. attribute anchor { string }?,
  21. # From ezxml schema
  22. attribute anchor_name { string }?,
  23. attribute level { string }?,
  24. attribute class { string }?,
  25. (
  26. # Not documented at all
  27. inlineContent |
  28. # From ezxml schema
  29. text
  30. )
  31. paragraphContent =
  32. # From documentation
  33. attribute custom_parameter { string }?,
  34. # From ezxml schema
  35. attribute class { string }?,
  36. (
  37. # Not documented at all
  38. element object { embedAttributes } |
  39. element custom { customContent } |
  40. # From ezxml schema
  41. inlineContent |
  42. element line { inlineContent } |
  43. element embed { embedAttributes } |
  44. element ol { listContent } |
  45. element ul { listContent } |
  46. element custom { customContent } |
  47. element literal {
  48. # From ezxml schema
  49. attribute class { string }?,
  50. text
  51. } |
  52. element table { tableContent }
  53. )+
  54. customContent =
  55. # Just guessed, not documented at all:
  56. attribute custom_parameter { string }?,
  57. attribute name { string },
  58. attribute custom:header { string }?,
  59. attribute custom:link { string }?,
  60. attribute custom:class { string }?,
  61. attribute custom:package_name { string }?,
  62. attribute custom:version { string }?,
  63. attribute custom:type { string }?,
  64. attribute custom:summary { string }?,
  65. attribute custom:description { string }?,
  66. attribute custom:url { string }?,
  67. attribute custom:thumbnail_url { string }?,
  68. attribute custom:min-version { string }?,
  69. attribute custom:feedurl { string }?,
  70. attribute custom:siteurl { string }?,
  71. attribute custom:limit { string }?,
  72. attribute custom:preselect { string }?,
  73. (
  74. # More or less anything...
  75. element h { headerContent } |
  76. element p { paragraphContent } |
  77. element section { sectionContent+ } |
  78. element paragraph { paragraphContent } |
  79. element header { headerContent } |
  80. inlineContent
  81. )*
  82. listContent =
  83. attribute custom_parameter { string }?,
  84. attribute class { string }?,
  85. element li {
  86. attribute custom_parameter { string }?,
  87. attribute class { string }?,
  88. (
  89. # Not documented at all
  90. element line { inlineContent } |
  91. # From documentation
  92. element p { paragraphContent } |
  93. # From ezxml schema
  94. element paragraph { paragraphContent } |
  95. inlineContent
  96. # Seldom, but sometimes those elements are even mixed.
  97. )+
  98. # Yes, empty lists are possible.
  99. }*
  100. tableContent =
  101. attribute class { string }?,
  102. attribute width { string }?,
  103. attribute border { string }?,
  104. element tr {
  105. attribute class { string }?,
  106. ( element td { tableCellContent } |
  107. element th { tableCellContent }
  108. # Table headers and cells can be mixed in one row.
  109. # And there are empty rows used sometimes
  110. )*
  111. }+
  112. tableCellContent =
  113. attribute class { string }?,
  114. attribute xhtml:width { string }?,
  115. attribute xhtml:colspan { string }?,
  116. attribute xhtml:rowspan { string }?,
  117. ( sectionContent |
  118. element table { tableContent }
  119. )*
  120. inlineContent =
  121. (
  122. # Not dcumented at all
  123. element custom { customContent } |
  124. element object { embedAttributes } |
  125. element literal {
  126. attribute class { string }?,
  127. text
  128. } |
  129. # From documentation
  130. element b { inlineElementContent } |
  131. element bold { inlineElementContent } |
  132. element i { inlineElementContent } |
  133. element em { inlineElementContent } |
  134. element a { linkContent } |
  135. # From ezxml schema
  136. element embed { embedAttributes } |
  137. element embed-inline { embedAttributes } |
  138. element strong { inlineElementContent } |
  139. element emphasize { inlineElementContent } |
  140. element link { linkContent } |
  141. element anchor {
  142. attribute custom_parameter { string }?,
  143. attribute name { string }?,
  144. inlineContent
  145. } |
  146. text
  147. )*
  148. inlineElementContent =
  149. # From documentation
  150. attribute custom_parameter { string }?,
  151. # From ezxml schema
  152. attribute class { string }?,
  153. inlineContent
  154. embedAttributes =
  155. # Not documented at all
  156. attribute custom:size { string }?,
  157. attribute custom:nolink { string }?,
  158. attribute custom:image_size { string }?,
  159. attribute custom:image_class { string }?,
  160. attribute custom:type { string }?,
  161. attribute custom:link { string }?,
  162. attribute custom:hide_header { string }?,
  163. attribute custom:limit { string }?,
  164. attribute custom:country { string }?,
  165. attribute image:ezurl_target { string }?,
  166. attribute image:ezurl_id { string }?,
  167. # From documentation
  168. attribute custom_parameter { string }?,
  169. attribute id { string }?,
  170. attribute href { string }?,
  171. # From ezxml schema
  172. attribute object_id { string }?,
  173. attribute node_id { string }?,
  174. attribute show_path { string }?,
  175. attribute size { string }?,
  176. attribute align { string }?,
  177. attribute view { string }?,
  178. attribute xhtml:id { string }?,
  179. attribute class { string }?,
  180. attribute target { string }?
  181. linkContent =
  182. # From documentation
  183. attribute custom_parameter { string }?,
  184. attribute href { string }?,
  185. attribute title { string }?,
  186. # From ezxml schema
  187. attribute class { string }?,
  188. attribute xhtml:id { string }?,
  189. attribute target { string }?,
  190. attribute xhtml:title { string }?,
  191. attribute object_id { string }?,
  192. attribute node_id { string }?,
  193. attribute show_path { string }?,
  194. attribute anchor_name { string }?,
  195. attribute url_id { string }?,
  196. attribute id { string }?,
  197. attribute view { string }?,
  198. inlineContent
  199. }