xlink.rng 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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: xlink.rnc 8931 2010-10-20 13:29:20Z 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:xlink="http://www.w3.org/1999/xlink" 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.info.elements" combine="choice">
  28. <ref name="db.extendedlink"/>
  29. </define>
  30. <define name="db.xlink.from.attribute">
  31. <attribute name="xlink:from">
  32. <db:refpurpose>Specifies the XLink traversal-from</db:refpurpose>
  33. <data type="NMTOKEN"/>
  34. </attribute>
  35. </define>
  36. <define name="db.xlink.label.attribute">
  37. <attribute name="xlink:label">
  38. <db:refpurpose>Specifies the XLink label</db:refpurpose>
  39. <data type="NMTOKEN"/>
  40. </attribute>
  41. </define>
  42. <define name="db.xlink.to.attribute">
  43. <attribute name="xlink:to">
  44. <db:refpurpose>Specifies the XLink traversal-to</db:refpurpose>
  45. <data type="NMTOKEN"/>
  46. </attribute>
  47. </define>
  48. <!-- ====================================================================== -->
  49. <div>
  50. <db:refname>extendedlink</db:refname>
  51. <db:refpurpose>An XLink extended link</db:refpurpose>
  52. <define name="db.extendedlink.role.attribute">
  53. <attribute name="role"/>
  54. </define>
  55. <define name="db.extendedlink.attlist">
  56. <interleave>
  57. <optional>
  58. <ref name="db.extendedlink.role.attribute"/>
  59. </optional>
  60. <ref name="db.common.attributes"/>
  61. <optional>
  62. <attribute name="xlink:type" a:defaultValue="extended">
  63. <db:refpurpose>Identifies the XLink link type </db:refpurpose>
  64. <value>extended</value>
  65. <a:documentation>An XLink extended link</a:documentation>
  66. </attribute>
  67. </optional>
  68. <optional>
  69. <ref name="db.xlink.role.attribute"/>
  70. </optional>
  71. <optional>
  72. <ref name="db.xlink.title.attribute"/>
  73. </optional>
  74. </interleave>
  75. </define>
  76. <define name="db.extendedlink">
  77. <element name="extendedlink">
  78. <ref name="db.extendedlink.attlist"/>
  79. <oneOrMore>
  80. <choice>
  81. <ref name="db.locator"/>
  82. <ref name="db.arc"/>
  83. </choice>
  84. </oneOrMore>
  85. </element>
  86. </define>
  87. </div>
  88. <!-- ====================================================================== -->
  89. <div>
  90. <db:refname>locator</db:refname>
  91. <db:refpurpose>An XLink locator in an <db:tag>extendedlink</db:tag>
  92. </db:refpurpose>
  93. <define name="db.locator.role.attribute">
  94. <attribute name="role"/>
  95. </define>
  96. <define name="db.locator.attlist">
  97. <interleave>
  98. <optional>
  99. <ref name="db.locator.role.attribute"/>
  100. </optional>
  101. <ref name="db.common.attributes"/>
  102. <optional>
  103. <attribute name="xlink:type" a:defaultValue="locator">
  104. <db:refpurpose>Identifies the XLink link type </db:refpurpose>
  105. <value>locator</value>
  106. <a:documentation>An XLink locator link</a:documentation>
  107. </attribute>
  108. </optional>
  109. <ref name="db.xlink.href.attribute"/>
  110. <optional>
  111. <ref name="db.xlink.role.attribute"/>
  112. </optional>
  113. <optional>
  114. <ref name="db.xlink.title.attribute"/>
  115. </optional>
  116. <optional>
  117. <ref name="db.xlink.label.attribute"/>
  118. </optional>
  119. </interleave>
  120. </define>
  121. <define name="db.locator">
  122. <element name="locator">
  123. <ref name="db.locator.attlist"/>
  124. <empty/>
  125. </element>
  126. </define>
  127. </div>
  128. <!-- ====================================================================== -->
  129. <div>
  130. <db:refname>arc</db:refname>
  131. <db:refpurpose>An XLink arc in an <db:tag>extendedlink</db:tag>
  132. </db:refpurpose>
  133. <define name="db.arc.role.attribute">
  134. <attribute name="role"/>
  135. </define>
  136. <define name="db.arc.attlist">
  137. <interleave>
  138. <optional>
  139. <ref name="db.arc.role.attribute"/>
  140. </optional>
  141. <ref name="db.common.attributes"/>
  142. <optional>
  143. <attribute name="xlink:type" a:defaultValue="arc">
  144. <db:refpurpose>Identifies the XLink link type </db:refpurpose>
  145. <value>arc</value>
  146. <a:documentation>An XLink arc link</a:documentation>
  147. </attribute>
  148. </optional>
  149. <optional>
  150. <ref name="db.xlink.arcrole.attribute"/>
  151. </optional>
  152. <optional>
  153. <ref name="db.xlink.title.attribute"/>
  154. </optional>
  155. <optional>
  156. <ref name="db.xlink.show.attribute"/>
  157. </optional>
  158. <optional>
  159. <ref name="db.xlink.actuate.attribute"/>
  160. </optional>
  161. <optional>
  162. <ref name="db.xlink.from.attribute"/>
  163. </optional>
  164. <optional>
  165. <ref name="db.xlink.to.attribute"/>
  166. </optional>
  167. </interleave>
  168. </define>
  169. <define name="db.arc">
  170. <element name="arc">
  171. <ref name="db.arc.attlist"/>
  172. <empty/>
  173. </element>
  174. </define>
  175. </div>
  176. </grammar>