PageRenderTime 93ms CodeModel.GetById 88ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/XML/xml/dtds/relaxng.rng

#
Unknown | 336 lines | 320 code | 16 blank | 0 comment | 0 complexity | cccae6ef4a98fd15c5abef6b1030839b MD5 | raw file
  1<?xml version="1.0"?>
  2<!-- RELAX NG for RELAX NG v1.0 with errata applied,
  3     retrieved from http://relaxng.org/relaxng.rng 2012-02-23 -->
  4<!-- $Id: relaxng.rng,v 1.31 2002/05/30 06:07:43 jjc Exp $ -->
  5<grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
  6         ns="http://relaxng.org/ns/structure/1.0"
  7         xmlns="http://relaxng.org/ns/structure/1.0">
  8  <start>
  9    <ref name="pattern"/>
 10  </start>
 11
 12  <define name="pattern">
 13    <choice>
 14      <element name="element">
 15        <choice>
 16          <attribute name="name">
 17            <data type="QName"/>
 18          </attribute>
 19          <ref name="open-name-class"/>
 20        </choice>
 21        <ref name="common-atts"/>
 22        <ref name="open-patterns"/>
 23      </element>
 24      <element name="attribute">
 25        <ref name="common-atts"/>
 26        <choice>
 27	  <attribute name="name">
 28	    <data type="QName"/>
 29	  </attribute>
 30          <ref name="open-name-class"/>
 31        </choice>
 32        <interleave>
 33          <ref name="other"/>
 34          <optional>
 35            <ref name="pattern"/>
 36          </optional>
 37        </interleave>
 38      </element>
 39      <element name="group">
 40        <ref name="common-atts"/>
 41        <ref name="open-patterns"/>
 42      </element>
 43      <element name="interleave">
 44        <ref name="common-atts"/>
 45        <ref name="open-patterns"/>
 46      </element>
 47      <element name="choice">
 48        <ref name="common-atts"/>
 49        <ref name="open-patterns"/>
 50      </element>
 51      <element name="optional">
 52        <ref name="common-atts"/>
 53        <ref name="open-patterns"/>
 54      </element>
 55      <element name="zeroOrMore">
 56        <ref name="common-atts"/>
 57        <ref name="open-patterns"/>
 58      </element>
 59      <element name="oneOrMore">
 60        <ref name="common-atts"/>
 61        <ref name="open-patterns"/>
 62      </element>
 63      <element name="list">
 64        <ref name="common-atts"/>
 65        <ref name="open-patterns"/>
 66      </element>
 67      <element name="mixed">
 68        <ref name="common-atts"/>
 69        <ref name="open-patterns"/>
 70      </element>
 71      <element name="ref">
 72        <attribute name="name">
 73          <data type="NCName"/>
 74        </attribute>
 75        <ref name="common-atts"/>
 76        <ref name="other"/>
 77      </element>
 78      <element name="parentRef">
 79        <attribute name="name">
 80          <data type="NCName"/>
 81        </attribute>
 82        <ref name="common-atts"/>
 83        <ref name="other"/>
 84      </element>
 85      <element name="empty">
 86        <ref name="common-atts"/>
 87        <ref name="other"/>
 88      </element>
 89      <element name="text">
 90        <ref name="common-atts"/>
 91        <ref name="other"/>
 92      </element>
 93      <element name="value">
 94        <optional>
 95          <attribute name="type">
 96            <data type="NCName"/>
 97          </attribute>
 98        </optional>
 99        <ref name="common-atts"/>
100        <text/>
101      </element>
102      <element name="data">
103        <attribute name="type">
104          <data type="NCName"/>
105        </attribute>
106        <ref name="common-atts"/>
107        <interleave>
108          <ref name="other"/>
109          <group>
110	    <zeroOrMore>
111	      <element name="param">
112		<attribute name="name">
113		  <data type="NCName"/>
114		</attribute>
115                <ref name="common-atts"/>
116		<text/>
117	      </element>
118	    </zeroOrMore>
119            <optional>
120              <element name="except">
121		<ref name="common-atts"/>
122		<ref name="open-patterns"/>
123              </element>
124            </optional>
125          </group>
126        </interleave>
127      </element>
128      <element name="notAllowed">
129        <ref name="common-atts"/>
130        <ref name="other"/>
131      </element>
132      <element name="externalRef">
133        <attribute name="href">
134          <data type="anyURI"/>
135        </attribute>
136        <ref name="common-atts"/>
137        <ref name="other"/>
138      </element>
139      <element name="grammar">
140        <ref name="common-atts"/>
141        <ref name="grammar-content"/>
142      </element>
143    </choice>
144  </define>
145
146  <define name="grammar-content">
147    <interleave>
148      <ref name="other"/>
149      <zeroOrMore>
150        <choice>
151          <ref name="start-element"/>
152          <ref name="define-element"/>
153          <element name="div">
154            <ref name="common-atts"/>
155            <ref name="grammar-content"/>
156          </element>
157          <element name="include">
158            <attribute name="href">
159              <data type="anyURI"/>
160            </attribute>
161            <ref name="common-atts"/>
162            <ref name="include-content"/>
163          </element>
164        </choice>
165      </zeroOrMore>
166    </interleave>
167  </define>
168
169  <define name="include-content">
170    <interleave>
171      <ref name="other"/>
172      <zeroOrMore>
173        <choice>
174          <ref name="start-element"/>
175          <ref name="define-element"/>
176          <element name="div">
177            <ref name="common-atts"/>
178            <ref name="include-content"/>
179          </element>
180        </choice>
181      </zeroOrMore>
182    </interleave>
183  </define>
184
185  <define name="start-element">
186    <element name="start">
187      <ref name="combine-att"/>
188      <ref name="common-atts"/>
189      <ref name="open-pattern"/>
190    </element>
191  </define>
192
193  <define name="define-element">
194    <element name="define">
195      <attribute name="name">
196        <data type="NCName"/>
197      </attribute>
198      <ref name="combine-att"/>
199      <ref name="common-atts"/>
200      <ref name="open-patterns"/>
201    </element>
202  </define>
203
204  <define name="combine-att">
205    <optional>
206      <attribute name="combine">
207        <choice>
208          <value>choice</value>
209          <value>interleave</value>
210        </choice>
211      </attribute>
212    </optional>
213  </define>
214  
215  <define name="open-patterns">
216    <interleave>
217      <ref name="other"/>
218      <oneOrMore>
219        <ref name="pattern"/>
220      </oneOrMore>
221    </interleave>
222  </define>
223
224  <define name="open-pattern">
225    <interleave>
226      <ref name="other"/>
227      <ref name="pattern"/>
228    </interleave>
229  </define>
230
231  <define name="name-class">
232    <choice>
233      <element name="name">
234        <ref name="common-atts"/>
235        <data type="QName"/>
236      </element>
237      <element name="anyName">
238        <ref name="common-atts"/>
239        <ref name="except-name-class"/>
240      </element>
241      <element name="nsName">
242        <ref name="common-atts"/>
243        <ref name="except-name-class"/>
244      </element>
245      <element name="choice">
246        <ref name="common-atts"/>
247        <ref name="open-name-classes"/>
248      </element>
249    </choice>
250  </define>
251
252  <define name="except-name-class">
253    <interleave>
254      <ref name="other"/>
255      <optional>
256        <element name="except">
257          <ref name="open-name-classes"/>
258        </element>
259      </optional>
260    </interleave>
261  </define>
262
263  <define name="open-name-classes">
264    <interleave>
265      <ref name="other"/>
266      <oneOrMore>
267        <ref name="name-class"/>
268      </oneOrMore>
269    </interleave>
270  </define>
271
272  <define name="open-name-class">
273    <interleave>
274      <ref name="other"/>
275      <ref name="name-class"/>
276    </interleave>
277  </define>
278
279  <define name="common-atts">
280    <optional>
281      <attribute name="ns"/>
282    </optional>
283    <optional>
284      <attribute name="datatypeLibrary">
285        <data type="anyURI"/>
286      </attribute>
287    </optional>
288    <zeroOrMore>
289      <attribute>
290        <anyName>
291          <except>
292            <nsName/>
293            <nsName ns=""/>
294          </except>
295        </anyName>
296      </attribute>
297    </zeroOrMore>
298  </define>
299
300  <define name="other">
301    <zeroOrMore>
302      <element>
303        <anyName>
304          <except>
305            <nsName/>
306          </except>
307        </anyName>
308        <zeroOrMore>
309          <choice>
310            <attribute>
311              <anyName/>
312            </attribute>
313            <text/>
314            <ref name="any"/>
315          </choice>
316        </zeroOrMore>
317      </element>
318    </zeroOrMore>
319  </define>
320
321  <define name="any">
322    <element>
323      <anyName/>
324      <zeroOrMore>
325        <choice>
326          <attribute>
327            <anyName/>
328          </attribute>
329          <text/>
330          <ref name="any"/>
331        </choice>
332      </zeroOrMore>
333    </element>
334  </define>
335
336</grammar>