topic.rng 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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: hier.rnc 8569 2010-01-15 00:23:46Z 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:rng="http://relaxng.org/ns/structure/1.0" xmlns:dbx="http://sourceforge.net/projects/docbook/defguide/schema/extra-markup" xmlns="http://relaxng.org/ns/structure/1.0">
  27. <start combine="choice">
  28. <ref name="db.topic"/>
  29. </start>
  30. <define name="db.book.components" combine="choice">
  31. <zeroOrMore>
  32. <ref name="db.topic"/>
  33. </zeroOrMore>
  34. </define>
  35. <define name="db.part.contentmodel" combine="choice">
  36. <oneOrMore>
  37. <ref name="db.topic"/>
  38. </oneOrMore>
  39. </define>
  40. <define name="db.chapter.contentmodel" combine="choice">
  41. <oneOrMore>
  42. <ref name="db.topic"/>
  43. </oneOrMore>
  44. </define>
  45. <define name="db.appendix.contentmodel" combine="choice">
  46. <oneOrMore>
  47. <ref name="db.topic"/>
  48. </oneOrMore>
  49. </define>
  50. <!-- ====================================================================== -->
  51. <div>
  52. <db:refname>topic</db:refname>
  53. <db:refpurpose>A modular unit of documentation not part of any particular narrative flow</db:refpurpose>
  54. <define name="db.topic.status.attribute">
  55. <ref name="db.status.attribute"/>
  56. </define>
  57. <define name="db.topic.role.attribute">
  58. <attribute name="role"/>
  59. </define>
  60. <define name="db.topic.type.attribute">
  61. <attribute name="type">
  62. <db:refpurpose>Identifies the topic type</db:refpurpose>
  63. </attribute>
  64. </define>
  65. <define name="db.topic.attlist">
  66. <interleave>
  67. <optional>
  68. <ref name="db.topic.role.attribute"/>
  69. </optional>
  70. <optional>
  71. <ref name="db.topic.type.attribute"/>
  72. </optional>
  73. <ref name="db.common.attributes"/>
  74. <ref name="db.common.linking.attributes"/>
  75. <optional>
  76. <ref name="db.label.attribute"/>
  77. </optional>
  78. <optional>
  79. <ref name="db.topic.status.attribute"/>
  80. </optional>
  81. </interleave>
  82. </define>
  83. <define name="db.topic.info">
  84. <ref name="db._info.title.req"/>
  85. </define>
  86. <define name="db.topic">
  87. <element name="topic">
  88. <ref name="db.topic.attlist"/>
  89. <ref name="db.topic.info"/>
  90. <zeroOrMore>
  91. <ref name="db.navigation.components"/>
  92. </zeroOrMore>
  93. <ref name="db.toplevel.blocks.or.sections"/>
  94. <zeroOrMore>
  95. <ref name="db.navigation.components"/>
  96. </zeroOrMore>
  97. </element>
  98. </define>
  99. </div>
  100. </grammar>