markup.rng 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. This file is part of DocBook V5.0
  4. Copyright 1992-2008 HaL Computer Systems, Inc.,
  5. O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
  6. Corporation, Norman Walsh, Sun Microsystems, Inc., and the
  7. Organization for the Advancement of Structured Information
  8. Standards (OASIS).
  9. Release: $Id: pool.rnc 7466 2007-09-27 14:03:55Z nwalsh $
  10. Permission to use, copy, modify and distribute the DocBook schema
  11. and its accompanying documentation for any purpose and without fee
  12. is hereby granted in perpetuity, provided that the above copyright
  13. notice and this paragraph appear in all copies. The copyright
  14. holders make no representation about the suitability of the schema
  15. for any purpose. It is provided "as is" without expressed or implied
  16. warranty.
  17. If you modify the DocBook schema in any way, label your schema as a
  18. variant of DocBook. See the reference documentation
  19. (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
  20. for more information.
  21. Please direct all questions, bug reports, or suggestions for changes
  22. to the docbook@lists.oasis-open.org mailing list. For more
  23. information, see http://www.oasis-open.org/docbook/.
  24. ======================================================================
  25. -->
  26. <grammar ns="http://docbook.org/ns/docbook" xmlns:db="http://docbook.org/ns/docbook" xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:ctrl="http://nwalsh.com/xmlns/schema-control/" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  27. <define name="db.domain.inlines" combine="choice">
  28. <ref name="db.markup.inlines"/>
  29. </define>
  30. <define name="db.userinput.inlines" combine="choice">
  31. <ref name="db.markup.inlines"/>
  32. </define>
  33. <define name="db.computeroutput.inlines" combine="choice">
  34. <ref name="db.markup.inlines"/>
  35. </define>
  36. <define name="db.markup.inlines">
  37. <choice>
  38. <ref name="db.tag"/>
  39. <ref name="db.markup"/>
  40. <ref name="db.token"/>
  41. <ref name="db.symbol"/>
  42. <ref name="db.literal"/>
  43. <ref name="db.code"/>
  44. <ref name="db.constant"/>
  45. <ref name="db.email"/>
  46. <ref name="db.uri"/>
  47. </choice>
  48. </define>
  49. <define name="db.initializer.inlines" combine="choice">
  50. <ref name="db.markup.inlines"/>
  51. </define>
  52. <!-- ====================================================================== -->
  53. <div>
  54. <db:refname>markup</db:refname>
  55. <db:refpurpose>A string of formatting markup in text that is to be represented literally</db:refpurpose>
  56. <define name="db.markup.role.attribute">
  57. <attribute name="role"/>
  58. </define>
  59. <define name="db.markup.attlist">
  60. <interleave>
  61. <optional>
  62. <ref name="db.markup.role.attribute"/>
  63. </optional>
  64. <ref name="db.common.attributes"/>
  65. <ref name="db.common.linking.attributes"/>
  66. </interleave>
  67. </define>
  68. <define name="db.markup">
  69. <element name="markup">
  70. <ref name="db.markup.attlist"/>
  71. <ref name="db._text"/>
  72. </element>
  73. </define>
  74. </div>
  75. <!-- ====================================================================== -->
  76. <div>
  77. <db:refname>tag</db:refname>
  78. <db:refpurpose>A component of XML (or SGML) markup</db:refpurpose>
  79. <define name="db.tag.role.attribute">
  80. <attribute name="role"/>
  81. </define>
  82. <define name="db.tag.class.enumeration">
  83. <choice>
  84. <value>attribute</value>
  85. <a:documentation>An attribute</a:documentation>
  86. <value>attvalue</value>
  87. <a:documentation>An attribute value</a:documentation>
  88. <value>element</value>
  89. <a:documentation>An element</a:documentation>
  90. <value>emptytag</value>
  91. <a:documentation>An empty element tag</a:documentation>
  92. <value>endtag</value>
  93. <a:documentation>An end tag</a:documentation>
  94. <value>genentity</value>
  95. <a:documentation>A general entity</a:documentation>
  96. <value>localname</value>
  97. <a:documentation>The local name part of a qualified name</a:documentation>
  98. <value>namespace</value>
  99. <a:documentation>A namespace</a:documentation>
  100. <value>numcharref</value>
  101. <a:documentation>A numeric character reference</a:documentation>
  102. <value>paramentity</value>
  103. <a:documentation>A parameter entity</a:documentation>
  104. <value>pi</value>
  105. <a:documentation>A processing instruction</a:documentation>
  106. <value>prefix</value>
  107. <a:documentation>The prefix part of a qualified name</a:documentation>
  108. <value>comment</value>
  109. <a:documentation>An SGML comment</a:documentation>
  110. <value>starttag</value>
  111. <a:documentation>A start tag</a:documentation>
  112. <value>xmlpi</value>
  113. <a:documentation>An XML processing instruction</a:documentation>
  114. </choice>
  115. </define>
  116. <define name="db.tag.class.attribute">
  117. <attribute name="class">
  118. <db:refpurpose>Identifies the nature of the tag content</db:refpurpose>
  119. <ref name="db.tag.class.enumeration"/>
  120. </attribute>
  121. </define>
  122. <define name="db.tag.namespace.attribute">
  123. <attribute name="namespace">
  124. <db:refpurpose>Identifies the namespace of the tag content</db:refpurpose>
  125. <data type="anyURI"/>
  126. </attribute>
  127. </define>
  128. <define name="db.tag.attlist">
  129. <interleave>
  130. <optional>
  131. <ref name="db.tag.role.attribute"/>
  132. </optional>
  133. <ref name="db.common.attributes"/>
  134. <ref name="db.common.linking.attributes"/>
  135. <optional>
  136. <ref name="db.tag.class.attribute"/>
  137. </optional>
  138. <optional>
  139. <ref name="db.tag.namespace.attribute"/>
  140. </optional>
  141. </interleave>
  142. </define>
  143. <define name="db.tag">
  144. <element name="tag">
  145. <ref name="db.tag.attlist"/>
  146. <ref name="db._text"/>
  147. </element>
  148. </define>
  149. </div>
  150. <!-- ====================================================================== -->
  151. <div>
  152. <db:refname>symbol</db:refname>
  153. <db:refpurpose>A name that is replaced by a value before processing</db:refpurpose>
  154. <define name="db.symbol.class.attribute">
  155. <attribute name="class">
  156. <db:refpurpose>Identifies the class of symbol</db:refpurpose>
  157. <value>limit</value>
  158. <a:documentation>The value is a limit of some kind</a:documentation>
  159. </attribute>
  160. </define>
  161. <define name="db.symbol.role.attribute">
  162. <attribute name="role"/>
  163. </define>
  164. <define name="db.symbol.attlist">
  165. <interleave>
  166. <optional>
  167. <ref name="db.symbol.role.attribute"/>
  168. </optional>
  169. <ref name="db.common.attributes"/>
  170. <ref name="db.common.linking.attributes"/>
  171. <optional>
  172. <ref name="db.symbol.class.attribute"/>
  173. </optional>
  174. </interleave>
  175. </define>
  176. <define name="db.symbol">
  177. <element name="symbol">
  178. <ref name="db.symbol.attlist"/>
  179. <ref name="db._text"/>
  180. </element>
  181. </define>
  182. </div>
  183. <!-- ====================================================================== -->
  184. <div>
  185. <db:refname>token</db:refname>
  186. <db:refpurpose>A unit of information</db:refpurpose>
  187. <define name="db.token.role.attribute">
  188. <attribute name="role"/>
  189. </define>
  190. <define name="db.token.attlist">
  191. <interleave>
  192. <optional>
  193. <ref name="db.token.role.attribute"/>
  194. </optional>
  195. <ref name="db.common.attributes"/>
  196. <ref name="db.common.linking.attributes"/>
  197. </interleave>
  198. </define>
  199. <define name="db.token">
  200. <element name="token">
  201. <ref name="db.token.attlist"/>
  202. <ref name="db._text"/>
  203. </element>
  204. </define>
  205. </div>
  206. <!-- ====================================================================== -->
  207. <div>
  208. <db:refname>literal</db:refname>
  209. <db:refpurpose>Inline text that is some literal value</db:refpurpose>
  210. <define name="db.literal.role.attribute">
  211. <attribute name="role"/>
  212. </define>
  213. <define name="db.literal.attlist">
  214. <interleave>
  215. <optional>
  216. <ref name="db.literal.role.attribute"/>
  217. </optional>
  218. <ref name="db.common.attributes"/>
  219. <ref name="db.common.linking.attributes"/>
  220. </interleave>
  221. </define>
  222. <define name="db.literal">
  223. <element name="literal">
  224. <ref name="db.literal.attlist"/>
  225. <ref name="db._text"/>
  226. </element>
  227. </define>
  228. </div>
  229. <!-- ====================================================================== -->
  230. <div>
  231. <db:refname>code</db:refname>
  232. <db:refpurpose>An inline code fragment</db:refpurpose>
  233. <define name="code.language.attribute">
  234. <attribute name="language">
  235. <db:refpurpose>Identifies the (computer) language of the code fragment</db:refpurpose>
  236. </attribute>
  237. </define>
  238. <define name="db.code.role.attribute">
  239. <attribute name="role"/>
  240. </define>
  241. <define name="db.code.attlist">
  242. <interleave>
  243. <optional>
  244. <ref name="db.code.role.attribute"/>
  245. </optional>
  246. <ref name="db.common.attributes"/>
  247. <ref name="db.common.linking.attributes"/>
  248. <optional>
  249. <ref name="code.language.attribute"/>
  250. </optional>
  251. </interleave>
  252. </define>
  253. <define name="db.code">
  254. <element name="code">
  255. <ref name="db.code.attlist"/>
  256. <zeroOrMore>
  257. <choice>
  258. <ref name="db.programming.inlines"/>
  259. <ref name="db._text"/>
  260. </choice>
  261. </zeroOrMore>
  262. </element>
  263. </define>
  264. </div>
  265. <!-- ====================================================================== -->
  266. <div>
  267. <db:refname>constant</db:refname>
  268. <db:refpurpose>A programming or system constant</db:refpurpose>
  269. <define name="db.constant.class.attribute">
  270. <attribute name="class">
  271. <db:refpurpose>Identifies the class of constant</db:refpurpose>
  272. <value>limit</value>
  273. <a:documentation>The value is a limit of some kind</a:documentation>
  274. </attribute>
  275. </define>
  276. <define name="db.constant.role.attribute">
  277. <attribute name="role"/>
  278. </define>
  279. <define name="db.constant.attlist">
  280. <interleave>
  281. <optional>
  282. <ref name="db.constant.role.attribute"/>
  283. </optional>
  284. <ref name="db.common.attributes"/>
  285. <ref name="db.common.linking.attributes"/>
  286. <optional>
  287. <ref name="db.constant.class.attribute"/>
  288. </optional>
  289. </interleave>
  290. </define>
  291. <define name="db.constant">
  292. <element name="constant">
  293. <ref name="db.constant.attlist"/>
  294. <ref name="db._text"/>
  295. </element>
  296. </define>
  297. </div>
  298. </grammar>