summaryrefslogtreecommitdiff
path: root/slides/schema/relaxng/topic.rng
blob: 4e683c18f5cd5b21b221fb7150f45cf8cc85c573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0" encoding="UTF-8"?>
<!--
  This file is part of DocBook V5.0
  
  Copyright 1992-2008 HaL Computer Systems, Inc.,
  O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
  Corporation, Norman Walsh, Sun Microsystems, Inc., and the
  Organization for the Advancement of Structured Information
  Standards (OASIS).
  
  Release: $Id: hier.rnc 8569 2010-01-15 00:23:46Z nwalsh $
  
  Permission to use, copy, modify and distribute the DocBook schema
  and its accompanying documentation for any purpose and without fee
  is hereby granted in perpetuity, provided that the above copyright
  notice and this paragraph appear in all copies. The copyright
  holders make no representation about the suitability of the schema
  for any purpose. It is provided "as is" without expressed or implied
  warranty.
  
  If you modify the DocBook schema in any way, label your schema as a
  variant of DocBook. See the reference documentation
  (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
  for more information.
  
  Please direct all questions, bug reports, or suggestions for changes
  to the docbook@lists.oasis-open.org mailing list. For more
  information, see http://www.oasis-open.org/docbook/.
  
  ======================================================================
-->
<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">
  <start combine="choice">
    <ref name="db.topic"/>
  </start>
  <define name="db.book.components" combine="choice">
    <zeroOrMore>
      <ref name="db.topic"/>
    </zeroOrMore>
  </define>
  <define name="db.part.contentmodel" combine="choice">
    <oneOrMore>
      <ref name="db.topic"/>
    </oneOrMore>
  </define>
  <define name="db.chapter.contentmodel" combine="choice">
    <oneOrMore>
      <ref name="db.topic"/>
    </oneOrMore>
  </define>
  <define name="db.appendix.contentmodel" combine="choice">
    <oneOrMore>
      <ref name="db.topic"/>
    </oneOrMore>
  </define>
  <!-- ====================================================================== -->
  <div>
    <db:refname>topic</db:refname>
    <db:refpurpose>A modular unit of documentation not part of any particular narrative flow</db:refpurpose>
    <define name="db.topic.status.attribute">
      <ref name="db.status.attribute"/>
    </define>
    <define name="db.topic.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.topic.type.attribute">
      <attribute name="type">
        <db:refpurpose>Identifies the topic type</db:refpurpose>
      </attribute>
    </define>
    <define name="db.topic.attlist">
      <interleave>
        <optional>
          <ref name="db.topic.role.attribute"/>
        </optional>
        <optional>
          <ref name="db.topic.type.attribute"/>
        </optional>
        <ref name="db.common.attributes"/>
        <ref name="db.common.linking.attributes"/>
        <optional>
          <ref name="db.label.attribute"/>
        </optional>
        <optional>
          <ref name="db.topic.status.attribute"/>
        </optional>
      </interleave>
    </define>
    <define name="db.topic.info">
      <ref name="db._info.title.req"/>
    </define>
    <define name="db.topic">
      <element name="topic">
        <ref name="db.topic.attlist"/>
        <ref name="db.topic.info"/>
        <zeroOrMore>
          <ref name="db.navigation.components"/>
        </zeroOrMore>
        <ref name="db.toplevel.blocks.or.sections"/>
        <zeroOrMore>
          <ref name="db.navigation.components"/>
        </zeroOrMore>
      </element>
    </define>
  </div>
</grammar>