1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. |
|
4 |
|
5 CDDL HEADER START |
|
6 |
|
7 The contents of this file are subject to the terms of the |
|
8 Common Development and Distribution License (the "License"). |
|
9 You may not use this file except in compliance with the License. |
|
10 |
|
11 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
12 or http://www.opensolaris.org/os/licensing. |
|
13 See the License for the specific language governing permissions |
|
14 and limitations under the License. |
|
15 |
|
16 When distributing Covered Code, include this CDDL HEADER in each |
|
17 file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
18 If applicable, add the following below this CDDL HEADER, with the |
|
19 fields enclosed by brackets "[]" replaced with your own identifying |
|
20 information: Portions Copyright [yyyy] [name of copyright owner] |
|
21 |
|
22 CDDL HEADER END |
|
23 --> |
|
24 |
|
25 <!-- |
|
26 ADRdoc.rng: ADR documentation |
|
27 --> |
|
28 |
|
29 <grammar ns="http://www.opensolaris.org/ns/adr" |
|
30 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" |
|
31 xmlns="http://relaxng.org/ns/structure/1.0"> |
|
32 |
|
33 <!-- inline doc elements --> |
|
34 <define name="doc-inline"> |
|
35 <choice> |
|
36 <text /> |
|
37 <ref name="element-doc-code" /> |
|
38 <ref name="element-doc-strong" /> |
|
39 <ref name="element-doc-link" /> |
|
40 <ref name="element-doc-br" /> |
|
41 </choice> |
|
42 </define> |
|
43 |
|
44 <!-- block doc elements --> |
|
45 <define name="doc-block"> |
|
46 <choice> |
|
47 <ref name="element-doc-heading" /> |
|
48 <ref name="element-doc-para" /> |
|
49 <ref name="element-doc-list" /> |
|
50 <ref name="element-doc-example" /> |
|
51 </choice> |
|
52 </define> |
|
53 |
|
54 <!-- (inline) code snippet --> |
|
55 <!-- A nested element-doc-code is not permitted. --> |
|
56 <define name="element-doc-code"> |
|
57 <element name="code"> |
|
58 <ref name="doc-inline-content" /> |
|
59 </element> |
|
60 </define> |
|
61 |
|
62 <!-- (inline) strong/emphasis --> |
|
63 <!-- A nested element-doc-strong is not permitted. --> |
|
64 <define name="element-doc-strong"> |
|
65 <element name="strong"> |
|
66 <ref name="doc-inline-content" /> |
|
67 </element> |
|
68 </define> |
|
69 |
|
70 <!-- (inline) url --> |
|
71 <!-- A nested element-doc-link is not permitted. --> |
|
72 <define name="element-doc-link"> |
|
73 <element name="link"> |
|
74 <attribute name="url" /> |
|
75 <ref name="doc-inline-content" /> |
|
76 </element> |
|
77 </define> |
|
78 |
|
79 <!-- (inline) line break --> |
|
80 <define name="element-doc-br"> |
|
81 <element name="br"> |
|
82 <empty /> |
|
83 </element> |
|
84 </define> |
|
85 |
|
86 <!-- (block) paragraph --> |
|
87 <define name="element-doc-para"> |
|
88 <element name="para"> |
|
89 <ref name="doc-inline-content" /> |
|
90 </element> |
|
91 </define> |
|
92 |
|
93 <!-- (block) heading --> |
|
94 <define name="element-doc-heading"> |
|
95 <element name="heading"> |
|
96 <ref name="doc-inline-content" /> |
|
97 </element> |
|
98 </define> |
|
99 |
|
100 <!-- (block) example (code, preformatted) --> |
|
101 <define name="element-doc-example"> |
|
102 <element name="example"> |
|
103 <optional> |
|
104 <attribute name="caption" /> |
|
105 </optional> |
|
106 <text /> |
|
107 </element> |
|
108 </define> |
|
109 |
|
110 <!-- (block) list item --> |
|
111 <define name="element-doc-item"> |
|
112 <element name="item"> |
|
113 <oneOrMore> |
|
114 <choice> |
|
115 <ref name="doc-inline" /> |
|
116 <ref name="doc-block" /> |
|
117 </choice> |
|
118 </oneOrMore> |
|
119 </element> |
|
120 </define> |
|
121 |
|
122 <!-- (block) list (rudimentary - ordered, unordered) --> |
|
123 <!-- default = unordered list --> |
|
124 <define name="element-doc-list"> |
|
125 <element name="list"> |
|
126 <optional> |
|
127 <attribute name="type"> |
|
128 <choice> |
|
129 <value>unordered</value> |
|
130 <value>ordered</value> |
|
131 </choice> |
|
132 </attribute> |
|
133 </optional> |
|
134 <oneOrMore> |
|
135 <ref name="element-doc-item" /> |
|
136 </oneOrMore> |
|
137 </element> |
|
138 </define> |
|
139 |
|
140 |
|
141 <!-- documentation attributes --> |
|
142 <!-- language --> |
|
143 <define name="attr-doc-lang"> |
|
144 <attribute name="lang"> |
|
145 <data type="language" /> |
|
146 </attribute> |
|
147 </define> |
|
148 |
|
149 <!-- documentation summary --> |
|
150 <define name="element-doc-summary"> |
|
151 <element name="summary"> |
|
152 <optional> |
|
153 <ref name="attr-doc-lang" /> |
|
154 </optional> |
|
155 <ref name="doc-inline-content" /> |
|
156 </element> |
|
157 </define> |
|
158 |
|
159 |
|
160 <!-- documentation content --> |
|
161 <!-- |
|
162 Whitespace in documentation content is treated as follows: |
|
163 contiguous sequences of white space are replaced by a single |
|
164 space and leading and trailing spaces are removed. |
|
165 Use CDATA sections to preserve white-space. |
|
166 --> |
|
167 |
|
168 <!-- inline content --> |
|
169 <!-- |
|
170 The doc-inline-content pattern contains one or more doc-inline |
|
171 elements. However, a doc-inline element may not be nested within |
|
172 another doc-inline element of the same type. |
|
173 --> |
|
174 <define name="doc-inline-content"> |
|
175 <oneOrMore> |
|
176 <ref name="doc-inline" /> |
|
177 </oneOrMore> |
|
178 </define> |
|
179 |
|
180 <!-- block content --> |
|
181 <define name="doc-block-content"> |
|
182 <oneOrMore> |
|
183 <ref name="doc-block" /> |
|
184 </oneOrMore> |
|
185 </define> |
|
186 |
|
187 |
|
188 <!-- the documentation element --> |
|
189 <define name="documentation"> |
|
190 <optional> |
|
191 <ref name="element-doc-summary" /> |
|
192 </optional> |
|
193 <optional> |
|
194 <element name="doc"> |
|
195 <optional> |
|
196 <ref name="attr-doc-lang" /> |
|
197 </optional> |
|
198 <choice> |
|
199 <ref name="doc-inline-content" /> |
|
200 <ref name="doc-block-content" /> |
|
201 </choice> |
|
202 </element> |
|
203 </optional> |
|
204 </define> |
|
205 </grammar> |
|
206 |
|