Imported Upstream version 2.8.0
[platform/upstream/libxml2.git] / test / relaxng / OASIS / spectest.xml
1 <!DOCTYPE testSuite [\r
2 <!ENTITY dii "<&#xE14;&#xE35;/>">\r
3 ]>\r
4 <testSuite>\r
5 <author>James Clark</author>\r
6 <email>jjc@jclark.com</email>\r
7 <documentation>For October 26 version of the spec.</documentation>\r
8 <testSuite>\r
9 <section>3</section>\r
10 <testSuite>\r
11 <documentation>Various possible syntax errors.</documentation>\r
12 <testCase>\r
13 <section>3</section>\r
14 <incorrect>\r
15 <thisIsJunk/>\r
16 </incorrect>\r
17 </testCase>\r
18 <testCase>\r
19 <section>3</section>\r
20 <incorrect>\r
21 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
22   <element name="foo">\r
23     <empty/>\r
24   </element>\r
25   <start>\r
26     <element name="foo">\r
27       <empty/>\r
28     </element>\r
29   </start>\r
30 </grammar>\r
31 </incorrect>\r
32 </testCase>\r
33 <testCase>\r
34 <section>3</section>\r
35 <incorrect>\r
36 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
37   <define name="bar">\r
38     <text/>\r
39   </define>\r
40   <text/>\r
41 </element>\r
42 </incorrect>\r
43 </testCase>\r
44 <testCase>\r
45 <section>3</section>\r
46 <incorrect>\r
47 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
48   <name>foo</name>\r
49   <empty/>\r
50 </element>\r
51 </incorrect>\r
52 </testCase>\r
53 <testCase>\r
54 <section>3</section>\r
55 <incorrect>\r
56 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
57   <group>\r
58     <name>bar</name>\r
59   </group>\r
60 </element>\r
61 </incorrect>\r
62 </testCase>\r
63 <testCase>\r
64 <section>3</section>\r
65 <incorrect>\r
66 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
67   <anyName>\r
68     <except>\r
69       <name>foo</name>\r
70     </except>\r
71     <except>\r
72       <name>bar</name>\r
73     </except>\r
74   </anyName>\r
75   <empty/>\r
76 </element>\r
77 </incorrect>\r
78 </testCase>\r
79 <testCase>\r
80 <section>3</section>\r
81 <incorrect>\r
82 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
83   <nsName>\r
84     <except>\r
85       <name>foo</name>\r
86     </except>\r
87     <except>\r
88       <name>bar</name>\r
89     </except>\r
90   </nsName>\r
91   <empty/>\r
92 </element>\r
93 </incorrect>\r
94 </testCase>\r
95 <testCase>\r
96 <section>3</section>\r
97 <incorrect>\r
98 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
99   <data type="token">\r
100     <except>\r
101       <value>foo</value>\r
102     </except>\r
103     <except>\r
104       <value>bar</value>\r
105     </except>\r
106   </data>\r
107 </element>\r
108 </incorrect>\r
109 </testCase>\r
110 <testCase>\r
111 <section>3</section>\r
112 <incorrect>\r
113 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
114   <empty name="bar"/>\r
115 </element>\r
116 </incorrect>\r
117 </testCase>\r
118 <testCase>\r
119 <section>3</section>\r
120 <incorrect>\r
121 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo" extra="bar">\r
122   <empty/>\r
123 </element>\r
124 </incorrect>\r
125 </testCase>\r
126 <testCase>\r
127 <section>3</section>\r
128 <incorrect>\r
129 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
130   <empty>\r
131     <empty/>\r
132   </empty>\r
133 </element>\r
134 </incorrect>\r
135 </testCase>\r
136 <testCase>\r
137 <section>3</section>\r
138 <incorrect>\r
139 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
140   <text>\r
141     <empty/>\r
142   </text>\r
143 </element>\r
144 </incorrect>\r
145 </testCase>\r
146 <testCase>\r
147 <section>3</section>\r
148 <incorrect>\r
149 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
150   <choice>\r
151     <text/>\r
152     <notAllowed>\r
153       <empty/>\r
154     </notAllowed>\r
155   </choice>\r
156 </element>\r
157 </incorrect>\r
158 </testCase>\r
159 <testCase>\r
160 <section>3</section>\r
161 <incorrect>\r
162 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
163   <start>\r
164     <ref name="foo">\r
165       <empty/>\r
166     </ref>\r
167   </start>\r
168   <define name="foo">\r
169     <element name="foo">\r
170       <empty/>\r
171     </element>\r
172   </define>\r
173 </grammar>\r
174 </incorrect>\r
175 </testCase>\r
176 <testCase>\r
177 <section>3</section>\r
178 <incorrect>\r
179 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
180   <start>\r
181     <grammar>\r
182       <start>\r
183         <parentRef name="foo">\r
184           <empty/>\r
185         </parentRef>\r
186       </start>\r
187     </grammar>\r
188   </start>\r
189   <define name="foo">\r
190     <element name="foo">\r
191       <empty/>\r
192     </element>\r
193   </define>\r
194 </grammar>\r
195 </incorrect>\r
196 </testCase>\r
197 </testSuite>\r
198 <testSuite>\r
199 <documentation>Tests for obsolete syntax</documentation>\r
200 <testCase>\r
201 <section>3</section>\r
202 <incorrect>\r
203 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
204   <start name="foo">\r
205     <element name="foo">\r
206       <empty/>\r
207     </element>\r
208   </start>\r
209 </grammar>\r
210 </incorrect>\r
211 </testCase>\r
212 <testCase>\r
213 <section>3</section>\r
214 <incorrect>\r
215 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo" ns="http://www.example.com">\r
216   <attribute name="bar" global="true">\r
217     <text/>\r
218   </attribute>\r
219 </element>\r
220 </incorrect>\r
221 </testCase>\r
222 <testCase>\r
223 <section>3</section>\r
224 <incorrect>\r
225 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
226   <not>\r
227     <name>foo</name>\r
228   </not>\r
229   <empty/>\r
230 </element>\r
231 </incorrect>\r
232 </testCase>\r
233 <testCase>\r
234 <section>3</section>\r
235 <incorrect>\r
236 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
237   <difference>\r
238     <anyName/>\r
239     <name>foo</name>\r
240   </difference>\r
241   <empty/>\r
242 </element>\r
243 </incorrect>\r
244 </testCase>\r
245 <testCase>\r
246 <section>3</section>\r
247 <incorrect>\r
248 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
249   <data type="token" key="foo"/>\r
250 </element>\r
251 </incorrect>\r
252 </testCase>\r
253 <testCase>\r
254 <section>3</section>\r
255 <incorrect>\r
256 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
257   <data type="token" keyRef="foo"/>\r
258 </element>\r
259 </incorrect>\r
260 </testCase>\r
261 <testCase>\r
262 <section>3</section>\r
263 <incorrect>\r
264 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
265   <keyRef name="foo">\r
266     <data type="token"/>\r
267   </keyRef>\r
268 </element>\r
269 </incorrect>\r
270 </testCase>\r
271 <testCase>\r
272 <section>3</section>\r
273 <incorrect>\r
274 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
275   <key name="foo">\r
276     <data type="token"/>\r
277   </key>\r
278 </element>\r
279 </incorrect>\r
280 </testCase>\r
281 </testSuite>\r
282 <testSuite>\r
283 <documentation>Tests for missing attributes and child elements</documentation>\r
284 <testCase>\r
285 <section>3</section>\r
286 <incorrect>\r
287 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
288 </element>\r
289 </incorrect>\r
290 </testCase>\r
291 <testCase>\r
292 <section>3</section>\r
293 <incorrect>\r
294 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
295   <name>foo</name>\r
296 </element>\r
297 </incorrect>\r
298 </testCase>\r
299 <testCase>\r
300 <section>3</section>\r
301 <incorrect>\r
302 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
303 </element>\r
304 </incorrect>\r
305 </testCase>\r
306 <testCase>\r
307 <section>3</section>\r
308 <incorrect>\r
309 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
310   <attribute/>\r
311 </element>\r
312 </incorrect>\r
313 </testCase>\r
314 <testCase>\r
315 <section>3</section>\r
316 <incorrect>\r
317 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
318   <group/>\r
319 </element>\r
320 </incorrect>\r
321 </testCase>\r
322 <testCase>\r
323 <section>3</section>\r
324 <incorrect>\r
325 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
326   <interleave/>\r
327 </element>\r
328 </incorrect>\r
329 </testCase>\r
330 <testCase>\r
331 <section>3</section>\r
332 <incorrect>\r
333 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
334   <choice/>\r
335 </element>\r
336 </incorrect>\r
337 </testCase>\r
338 <testCase>\r
339 <section>3</section>\r
340 <incorrect>\r
341 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
342   <optional/>\r
343 </element>\r
344 </incorrect>\r
345 </testCase>\r
346 <testCase>\r
347 <section>3</section>\r
348 <incorrect>\r
349 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
350   <zeroOrMore/>\r
351 </element>\r
352 </incorrect>\r
353 </testCase>\r
354 <testCase>\r
355 <section>3</section>\r
356 <incorrect>\r
357 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
358   <oneOrMore/>\r
359 </element>\r
360 </incorrect>\r
361 </testCase>\r
362 <testCase>\r
363 <section>3</section>\r
364 <incorrect>\r
365 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
366   <list/>\r
367 </element>\r
368 </incorrect>\r
369 </testCase>\r
370 <testCase>\r
371 <section>3</section>\r
372 <incorrect>\r
373 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
374   <mixed/>\r
375 </element>\r
376 </incorrect>\r
377 </testCase>\r
378 <testCase>\r
379 <section>3</section>\r
380 <incorrect>\r
381 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
382   <choice/>\r
383   <empty/>\r
384 </element>\r
385 </incorrect>\r
386 </testCase>\r
387 <testCase>\r
388 <section>3</section>\r
389 <incorrect>\r
390 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
391   <anyName>\r
392     <except/>\r
393   </anyName>\r
394   <empty/>\r
395 </element>\r
396 </incorrect>\r
397 </testCase>\r
398 <testCase>\r
399 <section>3</section>\r
400 <incorrect>\r
401 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
402   <nsName ns="">\r
403     <except/>\r
404   </nsName>\r
405   <empty/>\r
406 </element>\r
407 </incorrect>\r
408 </testCase>\r
409 <testCase>\r
410 <section>3</section>\r
411 <incorrect>\r
412 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
413   <data type="string">\r
414     <except/>\r
415   </data>\r
416 </element>\r
417 </incorrect>\r
418 </testCase>\r
419 <testCase>\r
420 <section>3</section>\r
421 <incorrect>\r
422 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
423   <data/>\r
424 </element>\r
425 </incorrect>\r
426 </testCase>\r
427 <testCase>\r
428 <section>3</section>\r
429 <incorrect>\r
430 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
431   <data type="string">\r
432     <param/>\r
433   </data>\r
434 </element>\r
435 </incorrect>\r
436 </testCase>\r
437 <testCase>\r
438 <section>3</section>\r
439 <incorrect>\r
440 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
441   <grammar>\r
442     <start/>\r
443   </grammar>\r
444 </element>\r
445 </incorrect>\r
446 </testCase>\r
447 <testCase>\r
448 <section>3</section>\r
449 <incorrect>\r
450 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
451   <start>\r
452     <element name="bar">\r
453       <empty/>\r
454     </element>\r
455   </start>\r
456   <define name="baz"/>\r
457 </grammar>\r
458 </incorrect>\r
459 </testCase>\r
460 <testCase>\r
461 <section>3</section>\r
462 <incorrect>\r
463 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
464   <externalRef/>\r
465 </element>\r
466 </incorrect>\r
467 </testCase>\r
468 <testCase>\r
469 <section>3</section>\r
470 <incorrect>\r
471 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
472   <include/>\r
473   <start>\r
474     <element name="foo">\r
475       <empty/>\r
476     </element>\r
477   </start>\r
478 </grammar>\r
479 </incorrect>\r
480 </testCase>\r
481 <testCase>\r
482 <section>3</section>\r
483 <incorrect>\r
484 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
485   <start>\r
486     <element name="foo">\r
487       <empty/>\r
488     </element>\r
489   </start>\r
490   <define>\r
491     <element name="bar">\r
492       <empty/>\r
493     </element>\r
494   </define>\r
495 </grammar>\r
496 </incorrect>\r
497 </testCase>\r
498 <testCase>\r
499 <section>3</section>\r
500 <incorrect>\r
501 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
502   <start>\r
503     <ref/>\r
504   </start>\r
505   <define name="foo">\r
506     <element name="foo">\r
507       <empty/>\r
508     </element>\r
509   </define>\r
510 </grammar>\r
511 </incorrect>\r
512 </testCase>\r
513 <testCase>\r
514 <section>3</section>\r
515 <incorrect>\r
516 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
517   <start>\r
518     <grammar>\r
519       <start>\r
520         <parentRef/>\r
521       </start>\r
522     </grammar>\r
523   </start>\r
524   <define name="foo">\r
525     <element name="foo">\r
526       <empty/>\r
527     </element>\r
528   </define>\r
529 </grammar>\r
530 </incorrect>\r
531 </testCase>\r
532 </testSuite>\r
533 <testSuite>\r
534 <documentation>Checking of ns attribute</documentation>\r
535 <testCase>\r
536 <section>3</section>\r
537 <correct>\r
538 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="">\r
539   <empty/>\r
540 </element>\r
541 </correct>\r
542 <valid>\r
543 <foo/>\r
544 </valid>\r
545 </testCase>\r
546 <testCase>\r
547 <section>3</section>\r
548 <documentation>No checking of ns attribute is performed</documentation>\r
549 <correct>\r
550 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="DAV:">\r
551   <empty/>\r
552 </element>\r
553 </correct>\r
554 <valid>\r
555 <foo xmlns="DAV:"/>\r
556 </valid>\r
557 </testCase>\r
558 <testCase>\r
559 <section>3</section>\r
560 <documentation>No checking of ns attribute is performed</documentation>\r
561 <correct>\r
562 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="xyzzy">\r
563   <empty/>\r
564 </element>\r
565 </correct>\r
566 </testCase>\r
567 <testCase>\r
568 <section>3</section>\r
569 <documentation>No checking of ns attribute is performed</documentation>\r
570 <correct>\r
571 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="bad_scheme://">\r
572   <empty/>\r
573 </element>\r
574 </correct>\r
575 </testCase>\r
576 </testSuite>\r
577 <testSuite>\r
578 <documentation>Checking of datatypeLibrary attribute</documentation>\r
579 <testCase>\r
580 <section>3</section>\r
581 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>\r
582 <incorrect>\r
583 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foo_bar:xyzzy">\r
584   <empty/>\r
585 </element>\r
586 </incorrect>\r
587 </testCase>\r
588 <testCase>\r
589 <section>3</section>\r
590 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>\r
591 <correct>\r
592 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foobar:xyzzy">\r
593   <empty/>\r
594 </element>\r
595 </correct>\r
596 <valid>\r
597 <foo/>\r
598 </valid>\r
599 </testCase>\r
600 <testCase>\r
601 <section>3</section>\r
602 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>\r
603 <correct>\r
604 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http:ok">\r
605   <empty/>\r
606 </element>\r
607 </correct>\r
608 <valid>\r
609 <foo/>\r
610 </valid>\r
611 </testCase>\r
612 <testCase>\r
613 <section>3</section>\r
614 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>\r
615 <incorrect>\r
616 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foo:">\r
617   <empty/>\r
618 </element>\r
619 </incorrect>\r
620 </testCase>\r
621 <testCase>\r
622 <section>3</section>\r
623 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>\r
624 <incorrect>\r
625 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.example.com/%">\r
626   <empty/>\r
627 </element>\r
628 </incorrect>\r
629 </testCase>\r
630 <testCase>\r
631 <section>3</section>\r
632 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>\r
633 <incorrect>\r
634 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.example.com/%xx">\r
635   <empty/>\r
636 </element>\r
637 </incorrect>\r
638 </testCase>\r
639 <testCase>\r
640 <section>3</section>\r
641 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation>\r
642 <correct>\r
643 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.example.com/%Aa">\r
644   <empty/>\r
645 </element>\r
646 </correct>\r
647 <valid>\r
648 <foo/>\r
649 </valid>\r
650 </testCase>\r
651 <testCase>\r
652 <section>3</section>\r
653 <documentation>Value of datatypeLibrary attribute must not be relative</documentation>\r
654 <incorrect>\r
655 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy">\r
656   <empty/>\r
657 </element>\r
658 </incorrect>\r
659 </testCase>\r
660 <testCase>\r
661 <section>3</section>\r
662 <documentation>Value of datatypeLibrary attribute must not be relative</documentation>\r
663 <incorrect>\r
664 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy#foo:bar">\r
665   <empty/>\r
666 </element>\r
667 </incorrect>\r
668 </testCase>\r
669 <testCase>\r
670 <section>3</section>\r
671 <documentation>Value of datatypeLibrary attribute must not be relative</documentation>\r
672 <incorrect>\r
673 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy?foo:bar">\r
674   <empty/>\r
675 </element>\r
676 </incorrect>\r
677 </testCase>\r
678 <testCase>\r
679 <section>3</section>\r
680 <documentation>Value of datatypeLibrary attribute must not be relative</documentation>\r
681 <incorrect>\r
682 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy/foo:bar">\r
683   <empty/>\r
684 </element>\r
685 </incorrect>\r
686 </testCase>\r
687 <testCase>\r
688 <section>3</section>\r
689 <correct>\r
690 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foo:bar">\r
691   <empty/>\r
692 </element>\r
693 </correct>\r
694 <valid>\r
695 <foo/>\r
696 </valid>\r
697 </testCase>\r
698 <testCase>\r
699 <section>3</section>\r
700 <correct>\r
701 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="">\r
702   <empty/>\r
703 </element>\r
704 </correct>\r
705 <valid>\r
706 <foo/>\r
707 </valid>\r
708 </testCase>\r
709 <testCase>\r
710 <section>3</section>\r
711 <correct>\r
712 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
713   <data datatypeLibrary="" type="string"/>\r
714 </element>\r
715 </correct>\r
716 <valid>\r
717 <foo>x</foo>\r
718 </valid>\r
719 </testCase>\r
720 <testCase>\r
721 <section>3</section>\r
722 <documentation>Value of datatypeLibrary attribute must not contain fragment identifier</documentation>\r
723 <incorrect>\r
724 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"\r
725           datatypeLibrary="http://www.example.com#xyzzy">\r
726   <empty/>\r
727 </element>\r
728 </incorrect>\r
729 </testCase>\r
730 <testCase>\r
731 <section>3</section>\r
732 <documentation>Value of datatypeLibrary attribute must not contain fragment identifier</documentation>\r
733 <incorrect>\r
734 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"\r
735           datatypeLibrary="http://www.example.com#">\r
736   <empty/>\r
737 </element>\r
738 </incorrect>\r
739 </testCase>\r
740 </testSuite>\r
741 <testSuite>\r
742 <documentation>Tests for QName and NCNames in schemas</documentation>\r
743 <testCase>\r
744 <section>3</section>\r
745 <correct>\r
746 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
747   <element name="&#xE14;&#xE35;">\r
748     <empty/>\r
749   </element>\r
750 </element>\r
751 </correct>\r
752 <valid>\r
753 <foo>&dii;</foo>\r
754 </valid>\r
755 </testCase>\r
756 <testCase>\r
757 <section>3</section>\r
758 <incorrect>\r
759 <element name="&#xE35;" xmlns="http://relaxng.org/ns/structure/1.0">\r
760   <empty/>\r
761 </element>\r
762 </incorrect>\r
763 </testCase>\r
764 <testCase>\r
765 <section>3</section>\r
766 <incorrect>\r
767 <element name="" xmlns="http://relaxng.org/ns/structure/1.0">\r
768   <empty/>\r
769 </element>\r
770 </incorrect>\r
771 </testCase>\r
772 <testCase>\r
773 <section>3</section>\r
774 <incorrect>\r
775 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
776   <name>&#xE35;</name>\r
777   <empty/>\r
778 </element>\r
779 </incorrect>\r
780 </testCase>\r
781 <testCase>\r
782 <section>3</section>\r
783 <incorrect>\r
784 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
785   <attribute name="&#xE35;"/>\r
786   <empty/>\r
787 </element>\r
788 </incorrect>\r
789 </testCase>\r
790 <testCase>\r
791 <section>3</section>\r
792 <incorrect>\r
793 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
794   <start>\r
795     <ref name="&#xE35;"/>\r
796   </start>\r
797   <define name="&#xE35;">\r
798     <element name="foo">\r
799       <empty/>\r
800     </element>\r
801   </define>\r
802 </grammar>\r
803 </incorrect>\r
804 </testCase>\r
805 <testCase>\r
806 <section>3</section>\r
807 <correct>\r
808 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
809   <start>\r
810     <ref name="&#xE14;&#xE35;"/>\r
811   </start>\r
812   <define name="&#xE14;&#xE35;">\r
813     <element name="foo">\r
814       <empty/>\r
815     </element>\r
816   </define>\r
817 </grammar>\r
818 </correct>\r
819 <valid>\r
820 <foo/>\r
821 </valid>\r
822 </testCase>\r
823 <testCase>\r
824 <section>3</section>\r
825 <incorrect>\r
826 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
827   <start>\r
828     <ref name=""/>\r
829   </start>\r
830   <define name="">\r
831     <element name="foo">\r
832       <empty/>\r
833     </element>\r
834   </define>\r
835 </grammar>\r
836 </incorrect>\r
837 </testCase>\r
838 <testCase>\r
839 <section>3</section>\r
840 <incorrect>\r
841 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
842   <start>\r
843     <ref name="x y"/>\r
844   </start>\r
845   <define name="x y">\r
846     <element name="foo">\r
847       <empty/>\r
848     </element>\r
849   </define>\r
850 </grammar>\r
851 </incorrect>\r
852 </testCase>\r
853 <testCase>\r
854 <section>3</section>\r
855 <incorrect>\r
856 <grammar xmlns="http://relaxng.org/ns/structure/1.0"\r
857          xmlns:x="http://www.example.com/x">\r
858   <start>\r
859     <ref name="x:y"/>\r
860   </start>\r
861   <define name="x:y">\r
862     <element name="foo">\r
863       <empty/>\r
864     </element>\r
865   </define>\r
866 </grammar>\r
867 </incorrect>\r
868 </testCase>\r
869 <testCase>\r
870 <section>3</section>\r
871 <incorrect>\r
872 <element xmlns="http://relaxng.org/ns/structure/1.0"\r
873          xmlns:x="http://www.example.com/x"\r
874          name="x:&#xE35;">\r
875   <empty/>\r
876 </element>\r
877 </incorrect>\r
878 </testCase>\r
879 <testCase>\r
880 <section>3</section>\r
881 <incorrect>\r
882 <element xmlns="http://relaxng.org/ns/structure/1.0"\r
883          xmlns:x="http://www.example.com/x"\r
884          name="x:y:z">\r
885   <empty/>\r
886 </element>\r
887 </incorrect>\r
888 </testCase>\r
889 <testCase>\r
890 <section>3</section>\r
891 <incorrect>\r
892 <element xmlns="http://relaxng.org/ns/structure/1.0"\r
893          xmlns:x="http://www.example.com/x"\r
894          name="x:">\r
895   <empty/>\r
896 </element>\r
897 </incorrect>\r
898 </testCase>\r
899 </testSuite>\r
900 <testSuite>\r
901 <documentation>Tests for elements that allow only a single pattern child.</documentation>\r
902 <testCase>\r
903 <section>3</section>\r
904 <incorrect>\r
905 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
906   <start>\r
907     <element name="foo">\r
908       <empty/>\r
909     </element>\r
910     <empty/>\r
911   </start>\r
912 </grammar>\r
913 </incorrect>\r
914 </testCase>\r
915 <testCase>\r
916 <section>3</section>\r
917 <incorrect>\r
918 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
919   <attribute name="bar">\r
920     <text/>\r
921     <empty/>\r
922   </attribute>\r
923 </element>\r
924 </incorrect>\r
925 </testCase>\r
926 <testCase>\r
927 <section>3</section>\r
928 <incorrect>\r
929 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
930   <attribute>\r
931     <name>bar</name>\r
932     <text/>\r
933     <empty/>\r
934   </attribute>\r
935 </element>\r
936 </incorrect>\r
937 </testCase>\r
938 </testSuite>\r
939 <testSuite>\r
940 <documentation>Tests for foreign element and attribute handling.</documentation>\r
941 <testCase>\r
942 <section>3</section>\r
943 <incorrect>\r
944 <r:element name="foo" xmlns:r="http://relaxng.org/ns/structure/1.0" r:a="val">\r
945   <r:empty/>\r
946 </r:element>\r
947 </incorrect>\r
948 </testCase>\r
949 <testCase>\r
950 <section>3</section>\r
951 <incorrect>\r
952 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
953   <name>foo<eg:comment xmlns:eg="http://www.example.com"/></name>\r
954   <empty/>\r
955 </element>\r
956 </incorrect>\r
957 </testCase>\r
958 <testCase>\r
959 <section>3</section>\r
960 <incorrect>\r
961 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
962   <value>foo<eg:comment xmlns:eg="http://www.example.com"/></value>\r
963 </element>\r
964 </incorrect>\r
965 </testCase>\r
966 <testCase>\r
967 <section>3</section>\r
968 <correct>\r
969 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
970   <data type="string"><eg:comment xmlns:eg="http://www.example.com"/></data>\r
971 </element>\r
972 </correct>\r
973 <valid>\r
974 <foo>X</foo>\r
975 </valid>\r
976 </testCase>\r
977 <testCase>\r
978 <section>3</section>\r
979 <correct>\r
980 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
981   <empty>\r
982     <ext xmlns="http://www.example.com">\r
983       <element xmlns="http://relaxng.org/ns/structure/1.0"/>\r
984     </ext>\r
985   </empty>\r
986 </element>\r
987 </correct>\r
988 <valid>\r
989 <foo/>\r
990 </valid>\r
991 </testCase>\r
992 <testCase>\r
993 <section>3</section>\r
994 <correct>\r
995 <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:eg="http://www.example.com">\r
996   <eg:comment/>\r
997   <eg:comment/>\r
998   <start>\r
999     <eg:comment/>\r
1000     <element>\r
1001       <eg:comment/>\r
1002       <eg:comment/>\r
1003       <name>foo</name>\r
1004       <eg:comment/>\r
1005       <data type="string"/>\r
1006       <eg:comment/>\r
1007       <empty>\r
1008         <eg:comment/>\r
1009         <eg:comment/>\r
1010       </empty>\r
1011       <eg:comment/>\r
1012       <eg:comment/>\r
1013     </element>\r
1014     <eg:comment/>\r
1015   </start>\r
1016   <eg:comment/>\r
1017 </grammar>\r
1018 </correct>\r
1019 <valid>\r
1020 <foo>X</foo>\r
1021 </valid>\r
1022 </testCase>\r
1023 <testCase>\r
1024 <section>3</section>\r
1025 <correct>\r
1026 <grammar xmlns="http://relaxng.org/ns/structure/1.0"  xmlns:eg="http://www.example.com"\r
1027   eg:comment="">\r
1028   <start eg:comment="">\r
1029     <element eg:comment="">\r
1030       <name eg:comment="">foo</name>\r
1031       <data eg:comment="" type="string"/>\r
1032       <empty eg:comment=""/>\r
1033     </element>\r
1034   </start>\r
1035 </grammar>\r
1036 </correct>\r
1037 <valid>\r
1038 <foo>X</foo>\r
1039 </valid>\r
1040 </testCase>\r
1041 <testCase>\r
1042 <section>3</section>\r
1043 <correct>\r
1044 <rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns="http://www.example.com">\r
1045   <comment/>\r
1046   <comment/>\r
1047   <rng:start>\r
1048     <comment/>\r
1049     <rng:element>\r
1050       <comment/>\r
1051       <comment/>\r
1052       <rng:name>foo</rng:name>\r
1053       <comment/>\r
1054       <rng:data type="string"/>\r
1055       <comment/>\r
1056     </rng:element>\r
1057     <comment/>\r
1058   </rng:start>\r
1059   <comment/>\r
1060 </rng:grammar>\r
1061 </correct>\r
1062 <valid>\r
1063 <foo>X</foo>\r
1064 </valid>\r
1065 </testCase>\r
1066 <testCase>\r
1067 <section>3</section>\r
1068 <correct>\r
1069 <rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0">\r
1070   <comment/>\r
1071   <comment/>\r
1072   <rng:start>\r
1073     <comment/>\r
1074     <rng:element>\r
1075       <comment/>\r
1076       <comment/>\r
1077       <rng:name>foo</rng:name>\r
1078       <comment/>\r
1079       <rng:data type="string"/>\r
1080       <comment/>\r
1081     </rng:element>\r
1082     <comment/>\r
1083   </rng:start>\r
1084   <comment/>\r
1085 </rng:grammar>\r
1086 </correct>\r
1087 <valid>\r
1088 <foo>X</foo>\r
1089 </valid>\r
1090 </testCase>\r
1091 </testSuite>\r
1092 </testSuite>\r
1093 <testSuite>\r
1094 <section>4</section>\r
1095 <testSuite>\r
1096 <section>4.2</section>\r
1097 <testCase>\r
1098 <section>4.2</section>\r
1099 <correct>\r
1100 <element name="&#xA;&#xD;&#x20;&#x9;foo&#xA;&#xD;&#x20;&#x9;" xmlns="http://relaxng.org/ns/structure/1.0">\r
1101   <attribute name="&#xA;&#xD;&#x20;&#x9;bar&#xA;&#xD;&#x20;&#x9;"/>\r
1102 </element>\r
1103 </correct>\r
1104 <valid>\r
1105 <foo bar=""/>\r
1106 </valid>\r
1107 </testCase>\r
1108 <testCase>\r
1109 <section>4.2</section>\r
1110 <correct>\r
1111 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
1112   <value type="&#xA;&#xD;&#x20;&#x9;string&#xA;&#xD;&#x20;&#x9;">bar</value>\r
1113 </element>\r
1114 </correct>\r
1115 <valid>\r
1116 <foo>bar</foo>\r
1117 </valid>\r
1118 <invalid>\r
1119 <foo>bar </foo>\r
1120 </invalid>\r
1121 </testCase>\r
1122 <testCase>\r
1123 <section>4.2</section>\r
1124 <correct>\r
1125 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
1126   <data type="&#xA;&#xD;&#x20;&#x9;string&#xA;&#xD;&#x20;&#x9;"/>\r
1127 </element>\r
1128 </correct>\r
1129 <valid>\r
1130 <foo>X</foo>\r
1131 </valid>\r
1132 </testCase>\r
1133 <testCase>\r
1134 <section>4.2</section>\r
1135 <correct>\r
1136 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
1137   <name>&#xA;&#xD;&#x20;&#x9;foo&#xA;&#xD;&#x20;&#x9;</name>\r
1138   <attribute><name>&#xA;&#xD;&#x20;&#x9;bar&#xA;&#xD;&#x20;&#x9;</name></attribute>\r
1139 </element>\r
1140 </correct>\r
1141 <valid>\r
1142 <foo bar=""/>\r
1143 </valid>\r
1144 </testCase>\r
1145 <testCase>\r
1146 <section>4.2</section>\r
1147 <correct>\r
1148 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1149   <start combine="&#xA;&#xD;&#x20;&#x9;choice&#xA;&#xD;&#x20;&#x9;">\r
1150     <ref name="&#xA;&#xD;&#x20;&#x9;x&#xA;&#xD;&#x20;&#x9;"/>\r
1151   </start>\r
1152   <define name="x">\r
1153     <ref name="y"/>\r
1154   </define>\r
1155   <define name="&#xA;&#xD;&#x20;&#x9;y&#xA;&#xD;&#x20;&#x9;">\r
1156     <grammar>\r
1157       <start combine="&#xA;&#xD;&#x20;&#x9;interleave&#xA;&#xD;&#x20;&#x9;">\r
1158         <parentRef name="&#xA;&#xD;&#x20;&#x9;z&#xA;&#xD;&#x20;&#x9;"/>\r
1159       </start>\r
1160     </grammar>\r
1161   </define>\r
1162   <define name="z">\r
1163     <element name="foo">\r
1164       <empty/>\r
1165     </element>\r
1166   </define>\r
1167 </grammar>\r
1168 </correct>\r
1169 <valid>\r
1170 <foo/>\r
1171 </valid>\r
1172 </testCase>\r
1173 </testSuite>\r
1174 <testCase>\r
1175 <section>4.4</section>\r
1176 <correct>\r
1177 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
1178   <value datatypeLibrary="http://www.example.com/this-does-not-exist">bar</value>\r
1179 </element>\r
1180 </correct>\r
1181 <valid>\r
1182 <foo>bar</foo>\r
1183 </valid>\r
1184 <valid>\r
1185 <foo>\r
1186         bar\r
1187 </foo>\r
1188 </valid>\r
1189 <valid>\r
1190 <foo> bar </foo>\r
1191 </valid>\r
1192 <invalid>\r
1193 <foo>baz</foo>\r
1194 </invalid>\r
1195 <invalid>\r
1196 <foo>ba r</foo>\r
1197 </invalid>\r
1198 </testCase>\r
1199 <testSuite>\r
1200 <section>4.5</section>\r
1201 <testCase>\r
1202 <section>4.5</section>\r
1203 <dir name="sub">\r
1204 <resource name="x">\r
1205 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
1206   <empty/>\r
1207 </element>\r
1208 </resource>\r
1209 </dir>\r
1210 <correct>\r
1211 <externalRef xmlns="http://relaxng.org/ns/structure/1.0"\r
1212              xml:base="sub/y" href="x"/>\r
1213 </correct>\r
1214 <valid>\r
1215 <foo/>\r
1216 </valid>\r
1217 <invalid>\r
1218 <bar/>\r
1219 </invalid>\r
1220 </testCase>\r
1221 <testCase>\r
1222 <section>4.5</section>\r
1223 <resource name="x">\r
1224 <element xmlns="http://relaxng.org/ns/structure/1.0" name="bar">\r
1225   <empty/>\r
1226 </element>\r
1227 </resource>\r
1228 <dir name="sub1">\r
1229 <resource name="x">\r
1230 <element xmlns="http://relaxng.org/ns/structure/1.0" name="bar">\r
1231   <empty/>\r
1232 </element>\r
1233 </resource>\r
1234 <dir name="sub3">\r
1235 <resource name="x">\r
1236 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
1237   <empty/>\r
1238 </element>\r
1239 </resource>\r
1240 </dir>\r
1241 </dir>\r
1242 <correct>\r
1243 <group xmlns="http://relaxng.org/ns/structure/1.0" xml:base="sub1/">\r
1244   <group>\r
1245     <group xml:base="sub2">\r
1246       <group>\r
1247          <group xml:base="sub3/y">\r
1248            <externalRef href="x"/>\r
1249          </group>\r
1250       </group>\r
1251     </group>\r
1252   </group>\r
1253 </group>\r
1254 </correct>\r
1255 <valid>\r
1256 <foo/>\r
1257 </valid>\r
1258 <invalid>\r
1259 <bar/>\r
1260 </invalid>\r
1261 </testCase>\r
1262 <testCase>\r
1263 <section>4.5</section>\r
1264 <resource name="x">\r
1265 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
1266   <empty/>\r
1267 </element>\r
1268 </resource>\r
1269 <incorrect>\r
1270 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x#foo"/>\r
1271 </incorrect>\r
1272 </testCase>\r
1273 </testSuite>\r
1274 <testSuite>\r
1275 <section>4.6</section>\r
1276 <testCase>\r
1277 <section>4.6</section>\r
1278 <resource name="x">\r
1279 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
1280   <empty/>\r
1281 </element>\r
1282 </resource>\r
1283 <correct>\r
1284 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>\r
1285 </correct>\r
1286 <valid>\r
1287 <foo/>\r
1288 </valid>\r
1289 <invalid>\r
1290 <bar/>\r
1291 </invalid>\r
1292 </testCase>\r
1293 <testCase>\r
1294 <section>4.6</section>\r
1295 <resource name="x">\r
1296 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
1297   <empty/>\r
1298 </element>\r
1299 </resource>\r
1300 <correct>\r
1301 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x" ns="http://www.example.com"/>\r
1302 </correct>\r
1303 <valid>\r
1304 <foo xmlns="http://www.example.com"/>\r
1305 </valid>\r
1306 <invalid>\r
1307 <foo/>\r
1308 </invalid>\r
1309 </testCase>\r
1310 <testCase>\r
1311 <section>4.6</section>\r
1312 <resource name="x">\r
1313 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>\r
1314 </resource>\r
1315 <incorrect>\r
1316 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>\r
1317 </incorrect>\r
1318 </testCase>\r
1319 <testCase>\r
1320 <section>4.6</section>\r
1321 <resource name="x">\r
1322 <start xmlns="http://relaxng.org/ns/structure/1.0">\r
1323   <element name="foo">\r
1324     <empty/>\r
1325   </element>\r
1326 </start>\r
1327 </resource>\r
1328 <incorrect>\r
1329 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>\r
1330 </incorrect>\r
1331 </testCase>\r
1332 <testCase>\r
1333 <section>4.6</section>\r
1334 <resource name="x">\r
1335 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="y"/>\r
1336 </resource>\r
1337 <resource name="y">\r
1338 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>\r
1339 </resource>\r
1340 <incorrect>\r
1341 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/>\r
1342 </incorrect>\r
1343 </testCase>\r
1344 <testCase>\r
1345 <section>4.6</section>\r
1346 <documentation>Same value of href before resolution, but not a loop.</documentation>\r
1347 <dir name="sub">\r
1348 <resource name="x">\r
1349 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="sub/x"/>\r
1350 </resource>\r
1351 <dir name="sub">\r
1352 <resource name="x">\r
1353 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
1354   <empty/>\r
1355 </element>\r
1356 </resource>\r
1357 </dir>\r
1358 </dir>\r
1359 <correct>\r
1360 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="sub/x"/>\r
1361 </correct>\r
1362 <valid>\r
1363 <foo/>\r
1364 </valid>\r
1365 <invalid>\r
1366 <bar/>\r
1367 </invalid>\r
1368 </testCase>\r
1369 </testSuite>\r
1370 <testSuite>\r
1371 <section>4.7</section>\r
1372 <testCase>\r
1373 <section>4.7</section>\r
1374 <resource name="x">\r
1375 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1376   <start>\r
1377     <element name="foo">\r
1378       <empty/>\r
1379     </element>\r
1380   </start>\r
1381 </grammar>\r
1382 </resource>\r
1383 <correct>\r
1384 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1385   <include href="x"/>\r
1386 </grammar>\r
1387 </correct>\r
1388 <valid>\r
1389 <foo/>\r
1390 </valid>\r
1391 <invalid>\r
1392 <bar/>\r
1393 </invalid>\r
1394 </testCase>\r
1395 <testCase>\r
1396 <section>4.7</section>\r
1397 <resource name="x">\r
1398 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1399   <start>\r
1400     <element name="foo">\r
1401       <empty/>\r
1402     </element>\r
1403   </start>\r
1404 </grammar>\r
1405 </resource>\r
1406 <correct>\r
1407 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1408   <include href="x" ns="http://www.example.com"/>\r
1409 </grammar>\r
1410 </correct>\r
1411 <valid>\r
1412 <foo xmlns="http://www.example.com"/>\r
1413 </valid>\r
1414 <invalid>\r
1415 <foo/>\r
1416 </invalid>\r
1417 </testCase>\r
1418 <testCase>\r
1419 <section>4.7</section>\r
1420 <resource name="x">\r
1421 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1422   <include href="y"/>\r
1423 </grammar>\r
1424 </resource>\r
1425 <resource name="y">\r
1426 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1427   <start>\r
1428     <element name="foo">\r
1429       <empty/>\r
1430     </element>\r
1431   </start>\r
1432 </grammar>\r
1433 </resource>\r
1434 <correct>\r
1435 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1436   <include href="x"/>\r
1437 </grammar>\r
1438 </correct>\r
1439 <valid>\r
1440 <foo/>\r
1441 </valid>\r
1442 <invalid>\r
1443 <bar/>\r
1444 </invalid>\r
1445 </testCase>\r
1446 <testCase>\r
1447 <section>4.7</section>\r
1448 <resource name="x">\r
1449 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
1450   <empty/>\r
1451 </element>\r
1452 </resource>\r
1453 <incorrect>\r
1454 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1455   <include href="x"/>\r
1456 </grammar>\r
1457 </incorrect>\r
1458 </testCase>\r
1459 <testCase>\r
1460 <section>4.7</section>\r
1461 <resource name="x">\r
1462 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1463   <include href="x"/>\r
1464 </grammar>\r
1465 </resource>\r
1466 <incorrect>\r
1467 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1468   <include href="x"/>\r
1469 </grammar>\r
1470 </incorrect>\r
1471 </testCase>\r
1472 <testCase>\r
1473 <section>4.7</section>\r
1474 <resource name="x">\r
1475 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1476   <include href="y"/>\r
1477 </grammar>\r
1478 </resource>\r
1479 <resource name="y">\r
1480 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1481   <include href="x"/>\r
1482 </grammar>\r
1483 </resource>\r
1484 <incorrect>\r
1485 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1486   <include href="x"/>\r
1487 </grammar>\r
1488 </incorrect>\r
1489 </testCase>\r
1490 <testCase>\r
1491 <section>4.7</section>\r
1492 <dir name="sub">\r
1493 <resource name="x">\r
1494 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1495   <include href="sub/x"/>\r
1496 </grammar>\r
1497 </resource>\r
1498 <dir name="sub">\r
1499 <resource name="x">\r
1500 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1501   <start>\r
1502     <element name="foo">\r
1503       <empty/>\r
1504     </element>\r
1505   </start>\r
1506 </grammar>\r
1507 </resource>\r
1508 </dir>\r
1509 </dir>\r
1510 <correct>\r
1511 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1512   <include href="sub/x"/>\r
1513 </grammar>\r
1514 </correct>\r
1515 <valid>\r
1516 <foo/>\r
1517 </valid>\r
1518 <invalid>\r
1519 <bar/>\r
1520 </invalid>\r
1521 </testCase>\r
1522 <testCase>\r
1523 <section>4.7</section>\r
1524 <resource name="x">\r
1525 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1526   <define name="foo">\r
1527     <element name="foo">\r
1528       <empty/>\r
1529     </element>\r
1530   </define>\r
1531 </grammar>\r
1532 </resource>\r
1533 <incorrect>\r
1534 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1535   <include href="x">\r
1536     <start>\r
1537       <ref name="foo"/>\r
1538     </start>\r
1539   </include>\r
1540 </grammar>\r
1541 </incorrect>\r
1542 </testCase>\r
1543 <testCase>\r
1544 <section>4.7</section>\r
1545 <resource name="x">\r
1546 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1547   <define name="foo">\r
1548     <element name="foo">\r
1549       <empty/>\r
1550     </element>\r
1551   </define>\r
1552 </grammar>\r
1553 </resource>\r
1554 <correct>\r
1555 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1556   <include href="x"/>\r
1557   <start>\r
1558     <ref name="foo"/>\r
1559   </start>\r
1560 </grammar>\r
1561 </correct>\r
1562 <valid><foo/></valid>\r
1563 <invalid><bar/></invalid>\r
1564 </testCase>\r
1565 <testCase>\r
1566 <section>4.7</section>\r
1567 <resource name="x">\r
1568 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1569   <start>\r
1570     <ref name="foo"/>\r
1571   </start>\r
1572 </grammar>\r
1573 </resource>\r
1574 <incorrect>\r
1575 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1576   <include href="x">\r
1577     <define name="foo">\r
1578       <element name="foo">\r
1579         <empty/>\r
1580       </element>\r
1581     </define>\r
1582   </include>\r
1583 </grammar>\r
1584 </incorrect>\r
1585 </testCase>\r
1586 <testCase>\r
1587 <section>4.7</section>\r
1588 <resource name="x">\r
1589 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1590   <start>\r
1591     <ref name="foo"/>\r
1592   </start>\r
1593 </grammar>\r
1594 </resource>\r
1595 <correct>\r
1596 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1597   <include href="x"/>\r
1598   <define name="foo">\r
1599     <element name="foo">\r
1600       <empty/>\r
1601     </element>\r
1602   </define>\r
1603 </grammar>\r
1604 </correct>\r
1605 <valid><foo/></valid>\r
1606 <invalid><bar/></invalid>\r
1607 </testCase>\r
1608 <testCase>\r
1609 <section>4.7</section>\r
1610 <resource name="x">\r
1611 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1612   <define name="foo" combine="choice">\r
1613     <element name="foo3">\r
1614       <empty/>\r
1615     </element>\r
1616   </define>\r
1617 </grammar>\r
1618 </resource>\r
1619 <correct>\r
1620 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1621   <start>\r
1622     <ref name="foo"/>\r
1623   </start>\r
1624   <include href="x">\r
1625     <define name="foo" combine="choice">\r
1626       <element name="foo1">\r
1627         <empty/>\r
1628       </element>\r
1629     </define>\r
1630   </include>\r
1631   <define name="foo">\r
1632     <element name="foo2">\r
1633       <empty/>\r
1634     </element>\r
1635   </define>\r
1636 </grammar>\r
1637 </correct>\r
1638 <valid><foo1/></valid>\r
1639 <valid><foo2/></valid>\r
1640 <invalid><foo3/></invalid>\r
1641 </testCase>\r
1642 <testCase>\r
1643 <section>4.7</section>\r
1644 <resource name="level1.rng">\r
1645 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1646 <include href="level2.rng">\r
1647   <define name="foo">\r
1648     <element name="bar">\r
1649       <empty/>\r
1650     </element>\r
1651   </define>\r
1652 </include>\r
1653 </grammar>\r
1654 </resource>\r
1655 <resource name="level2.rng">\r
1656 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1657   <define name="bar">\r
1658     <element name="bar">\r
1659       <empty/>\r
1660     </element>\r
1661   </define>\r
1662 </grammar>\r
1663 </resource>\r
1664 <incorrect>\r
1665 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1666 <start>\r
1667   <ref name="foo"/>\r
1668 </start>\r
1669 <include href="level1.rng">\r
1670   <define name="foo">\r
1671     <element name="foo">\r
1672       <empty/>\r
1673     </element>\r
1674   </define>\r
1675 </include>\r
1676 </grammar>\r
1677 </incorrect>\r
1678 </testCase>\r
1679 </testSuite>\r
1680 <testSuite>\r
1681 <section>4.8</section>\r
1682 <testCase>\r
1683 <section>4.8</section>\r
1684 <correct>\r
1685 <element xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.example.com" name="foo">\r
1686   <attribute name="bar" ns="http://www.example.com"/>\r
1687 </element>\r
1688 </correct>\r
1689 <valid>\r
1690 <eg:foo eg:bar="x" xmlns:eg="http://www.example.com"/>\r
1691 </valid>\r
1692 <invalid>\r
1693 <eg:foo xmlns:eg="http://www.example.com" bar="x"/>\r
1694 </invalid>\r
1695 </testCase>\r
1696 <testCase>\r
1697 <section>4.8</section>\r
1698 <correct>\r
1699 <element xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.example.com" name="foo">\r
1700   <attribute name="bar"/>\r
1701 </element>\r
1702 </correct>\r
1703 <invalid>\r
1704 <eg:foo xmlns:eg="http://www.example.com" eg:bar="x"/>\r
1705 </invalid>\r
1706 <valid>\r
1707 <eg:foo xmlns:eg="http://www.example.com" bar="x"/>\r
1708 </valid>\r
1709 </testCase>\r
1710 </testSuite>\r
1711 <testSuite>\r
1712 <section>4.9</section>\r
1713 <testCase>\r
1714 <section>4.9</section>\r
1715 <correct>\r
1716 <element xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.example.com" name="foo">\r
1717   <attribute>\r
1718     <name>bar</name>\r
1719   </attribute>\r
1720 </element>\r
1721 </correct>\r
1722 <valid>\r
1723 <eg:foo xmlns:eg="http://www.example.com" eg:bar="x"/>\r
1724 </valid>\r
1725 <invalid>\r
1726 <eg:foo xmlns:eg="http://www.example.com" bar="x"/>\r
1727 </invalid>\r
1728 </testCase>\r
1729 <testCase>\r
1730 <section>4.6</section>\r
1731 <section>4.9</section>\r
1732 <resource name="x">\r
1733 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
1734   <empty/>\r
1735 </element>\r
1736 </resource>\r
1737 <correct>\r
1738 <group ns="http://www.example.com" xmlns="http://relaxng.org/ns/structure/1.0" >\r
1739 <externalRef href="x"/>\r
1740 </group>\r
1741 </correct>\r
1742 <valid>\r
1743 <foo xmlns="http://www.example.com"/>\r
1744 </valid>\r
1745 <invalid>\r
1746 <foo/>\r
1747 </invalid>\r
1748 </testCase>\r
1749 <testCase>\r
1750 <correct>\r
1751 <group xmlns="http://relaxng.org/ns/structure/1.0">\r
1752   <element ns="http://www.example.com">\r
1753     <name>foo</name>\r
1754     <empty/>\r
1755   </element>\r
1756 </group>\r
1757 </correct>\r
1758 <valid><foo xmlns="http://www.example.com"/></valid>\r
1759 <invalid><foo/></invalid>\r
1760 </testCase>\r
1761 <testCase>\r
1762 <correct>\r
1763 <element ns="http://www.example.com" xmlns="http://relaxng.org/ns/structure/1.0">\r
1764   <name>foo</name>\r
1765   <empty/>\r
1766 </element>\r
1767 </correct>\r
1768 <valid><foo xmlns="http://www.example.com"/></valid>\r
1769 <invalid><foo/></invalid>\r
1770 </testCase>\r
1771 <testCase>\r
1772 <correct>\r
1773 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
1774   <attribute ns="http://www.example.com">\r
1775     <name>bar</name>\r
1776     <text/>\r
1777   </attribute>\r
1778 </element>\r
1779 </correct>\r
1780 <valid><foo xmlns:x="http://www.example.com" x:bar="whatever"/></valid>\r
1781 <invalid><foo bar="whatever"/></invalid>\r
1782 </testCase>\r
1783 </testSuite>\r
1784 <testSuite>\r
1785 <section>4.10</section>\r
1786 <testCase>\r
1787 <section>4.10</section>\r
1788 <incorrect>\r
1789 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo:bar">\r
1790   <empty/>\r
1791 </element>\r
1792 </incorrect>\r
1793 </testCase>\r
1794 <testCase>\r
1795 <section>4.10</section>\r
1796 <correct>\r
1797 <element xmlns="http://relaxng.org/ns/structure/1.0" name="eg:foo" xmlns:eg="http://www.example.com">\r
1798   <empty/>\r
1799 </element>\r
1800 </correct>\r
1801 <valid>\r
1802 <foo xmlns="http://www.example.com"/>\r
1803 </valid>\r
1804 <invalid>\r
1805 <foo xmlns="http://www.example.com/"/>\r
1806 </invalid>\r
1807 </testCase>\r
1808 <testCase>\r
1809 <section>4.10</section>\r
1810 <correct>\r
1811 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo" xmlns:eg="http://www.example.com">\r
1812   <attribute name="eg:bar"/>\r
1813 </element>\r
1814 </correct>\r
1815 <valid>\r
1816 <foo xmlns:ex="http://www.example.com" ex:bar="x"/>\r
1817 </valid>\r
1818 <invalid>\r
1819 <foo xmlns:ex="http://www.example.com/" ex:bar="x"/>\r
1820 </invalid>\r
1821 </testCase>\r
1822 <testCase>\r
1823 <section>4.10</section>\r
1824 <correct>\r
1825 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
1826   <attribute name="xml:lang"/>\r
1827 </element>\r
1828 </correct>\r
1829 <valid>\r
1830 <foo xml:lang="en"/>\r
1831 </valid>\r
1832 <invalid>\r
1833 <foo lang="en"/>\r
1834 </invalid>\r
1835 </testCase>\r
1836 </testSuite>\r
1837 <testSuite>\r
1838 <section>4.11</section>\r
1839 <testCase>\r
1840 <section>4.11</section>\r
1841 <correct>\r
1842 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1843   <div ns="http://www.example.com">\r
1844     <div>\r
1845       <start>\r
1846         <ref name="foo"/>\r
1847       </start>\r
1848     </div>\r
1849     <define name="foo">\r
1850       <element name="foo">\r
1851         <empty/>\r
1852       </element>\r
1853     </define>\r
1854   </div>\r
1855   <div/>\r
1856 </grammar>\r
1857 </correct>\r
1858 <valid>\r
1859 <foo xmlns="http://www.example.com"/>\r
1860 </valid>\r
1861 <invalid>\r
1862 <foo/>\r
1863 </invalid>\r
1864 </testCase>\r
1865 </testSuite>\r
1866 <testSuite>\r
1867 <testCase>\r
1868 <section>4.12</section>\r
1869 <correct>\r
1870 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
1871 \r
1872 <start>\r
1873   <element name="foo">\r
1874     <ref name="bars"/>\r
1875   </element>\r
1876 </start>\r
1877 \r
1878 <define name="bars">\r
1879   <element name="bar">\r
1880     <empty/>\r
1881   </element>\r
1882   <element name="bar">\r
1883     <empty/>\r
1884   </element>\r
1885   <element name="bar">\r
1886     <empty/>\r
1887   </element>\r
1888 </define>\r
1889 \r
1890 </grammar>\r
1891 </correct>\r
1892 <valid>\r
1893 <foo><bar/><bar/><bar/></foo>\r
1894 </valid>\r
1895 <invalid>\r
1896 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>\r
1897 </invalid>\r
1898 <invalid>\r
1899 <foo><bar/><bar/></foo>\r
1900 </invalid>\r
1901 <invalid>\r
1902 <foo><bar/></foo>\r
1903 </invalid>\r
1904 <invalid>\r
1905 <foo></foo>\r
1906 </invalid>\r
1907 <invalid>\r
1908 <foo>X</foo>\r
1909 </invalid>\r
1910 <invalid>\r
1911 <foo><bar/>X<bar/><bar/></foo>\r
1912 </invalid>\r
1913 <invalid>\r
1914 <foo><bar/><bar/><bar/><bar/></foo>\r
1915 </invalid>\r
1916 </testCase>\r
1917 <testCase>\r
1918 <section>4.12</section>\r
1919 <correct>\r
1920 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
1921   <oneOrMore>\r
1922     <element name="bar">\r
1923       <empty/>\r
1924     </element>\r
1925     <element name="bar">\r
1926       <empty/>\r
1927     </element>\r
1928     <element name="bar">\r
1929       <empty/>\r
1930     </element>\r
1931   </oneOrMore>\r
1932 </element>\r
1933 </correct>\r
1934 <valid>\r
1935 <foo><bar/><bar/><bar/></foo>\r
1936 </valid>\r
1937 <valid>\r
1938 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>\r
1939 </valid>\r
1940 <invalid>\r
1941 <foo><bar/><bar/></foo>\r
1942 </invalid>\r
1943 <invalid>\r
1944 <foo><bar/></foo>\r
1945 </invalid>\r
1946 <invalid>\r
1947 <foo></foo>\r
1948 </invalid>\r
1949 <invalid>\r
1950 <foo>X</foo>\r
1951 </invalid>\r
1952 <invalid>\r
1953 <foo><bar/>X<bar/><bar/></foo>\r
1954 </invalid>\r
1955 <invalid>\r
1956 <foo><bar/><bar/><bar/><bar/></foo>\r
1957 </invalid>\r
1958 </testCase>\r
1959 <testCase>\r
1960 <section>4.12</section>\r
1961 <section>4.15</section>\r
1962 <correct>\r
1963 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
1964   <zeroOrMore>\r
1965     <element name="bar">\r
1966       <empty/>\r
1967     </element>\r
1968     <element name="bar">\r
1969       <empty/>\r
1970     </element>\r
1971     <element name="bar">\r
1972       <empty/>\r
1973     </element>\r
1974   </zeroOrMore>\r
1975 </element>\r
1976 </correct>\r
1977 <valid>\r
1978 <foo><bar/><bar/><bar/></foo>\r
1979 </valid>\r
1980 <valid>\r
1981 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>\r
1982 </valid>\r
1983 <invalid>\r
1984 <foo><bar/><bar/></foo>\r
1985 </invalid>\r
1986 <invalid>\r
1987 <foo><bar/></foo>\r
1988 </invalid>\r
1989 <valid>\r
1990 <foo></foo>\r
1991 </valid>\r
1992 <invalid>\r
1993 <foo>X</foo>\r
1994 </invalid>\r
1995 <invalid>\r
1996 <foo><bar/>X<bar/><bar/></foo>\r
1997 </invalid>\r
1998 <invalid>\r
1999 <foo><bar/><bar/><bar/><bar/></foo>\r
2000 </invalid>\r
2001 </testCase>\r
2002 <testCase>\r
2003 <section>4.12</section>\r
2004 <section>4.14</section>\r
2005 <correct>\r
2006 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2007   <optional>\r
2008     <element name="bar">\r
2009       <empty/>\r
2010     </element>\r
2011     <element name="bar">\r
2012       <empty/>\r
2013     </element>\r
2014     <element name="bar">\r
2015       <empty/>\r
2016     </element>\r
2017   </optional>\r
2018 </element>\r
2019 </correct>\r
2020 <valid>\r
2021 <foo><bar/><bar/><bar/></foo>\r
2022 </valid>\r
2023 <invalid>\r
2024 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>\r
2025 </invalid>\r
2026 <invalid>\r
2027 <foo><bar/><bar/></foo>\r
2028 </invalid>\r
2029 <invalid>\r
2030 <foo><bar/></foo>\r
2031 </invalid>\r
2032 <valid>\r
2033 <foo></foo>\r
2034 </valid>\r
2035 <invalid>\r
2036 <foo>X</foo>\r
2037 </invalid>\r
2038 <invalid>\r
2039 <foo><bar/>X<bar/><bar/></foo>\r
2040 </invalid>\r
2041 <invalid>\r
2042 <foo><bar/><bar/><bar/><bar/></foo>\r
2043 </invalid>\r
2044 </testCase>\r
2045 <testCase>\r
2046 <section>4.12</section>\r
2047 <correct>\r
2048 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2049   <list>\r
2050     <value>x</value>\r
2051     <value>y</value>\r
2052     <value>z</value>\r
2053   </list>\r
2054 </element>\r
2055 </correct>\r
2056 <valid>\r
2057 <foo>x y z</foo>\r
2058 </valid>\r
2059 <invalid>\r
2060 <foo>x</foo>\r
2061 </invalid>\r
2062 </testCase>\r
2063 <testCase>\r
2064 <section>4.12</section>\r
2065 <section>4.13</section>\r
2066 <correct>\r
2067 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2068   <mixed>\r
2069     <element name="bar">\r
2070       <empty/>\r
2071     </element>\r
2072     <element name="bar">\r
2073       <empty/>\r
2074     </element>\r
2075     <element name="bar">\r
2076       <empty/>\r
2077     </element>\r
2078   </mixed>\r
2079 </element>\r
2080 </correct>\r
2081 <valid>\r
2082 <foo><bar/><bar/><bar/></foo>\r
2083 </valid>\r
2084 <invalid>\r
2085 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>\r
2086 </invalid>\r
2087 <invalid>\r
2088 <foo><bar/><bar/></foo>\r
2089 </invalid>\r
2090 <invalid>\r
2091 <foo><bar/></foo>\r
2092 </invalid>\r
2093 <invalid>\r
2094 <foo></foo>\r
2095 </invalid>\r
2096 <valid>\r
2097 <foo><bar/>X<bar/><bar/></foo>\r
2098 </valid>\r
2099 <invalid>\r
2100 <foo>X</foo>\r
2101 </invalid>\r
2102 <invalid>\r
2103 <foo><bar/><bar/><bar/><bar/></foo>\r
2104 </invalid>\r
2105 </testCase>\r
2106 <testCase>\r
2107 <section>4.12</section>\r
2108 <correct>\r
2109 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
2110   <name>foo</name>\r
2111   <element name="bar">\r
2112     <empty/>\r
2113   </element>\r
2114   <element name="bar">\r
2115     <empty/>\r
2116   </element>\r
2117   <element name="bar">\r
2118     <empty/>\r
2119   </element>\r
2120 </element>\r
2121 </correct>\r
2122 <valid>\r
2123 <foo><bar/><bar/><bar/></foo>\r
2124 </valid>\r
2125 <invalid>\r
2126 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>\r
2127 </invalid>\r
2128 <invalid>\r
2129 <foo><bar/><bar/></foo>\r
2130 </invalid>\r
2131 <invalid>\r
2132 <foo><bar/></foo>\r
2133 </invalid>\r
2134 <invalid>\r
2135 <foo></foo>\r
2136 </invalid>\r
2137 <invalid>\r
2138 <foo>X</foo>\r
2139 </invalid>\r
2140 <invalid>\r
2141 <foo><bar/>X<bar/><bar/></foo>\r
2142 </invalid>\r
2143 <invalid>\r
2144 <foo><bar/><bar/><bar/><bar/></foo>\r
2145 </invalid>\r
2146 </testCase>\r
2147 <testCase>\r
2148 <section>4.12</section>\r
2149 <correct>\r
2150 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
2151   <anyName>\r
2152     <except>\r
2153       <name>foo</name>\r
2154       <name>bar</name>\r
2155       <name>baz</name>\r
2156     </except>\r
2157   </anyName>\r
2158   <empty/>\r
2159 </element>\r
2160 </correct>\r
2161 <valid><xyzzy/></valid>\r
2162 <invalid><foo/></invalid>\r
2163 <invalid><bar/></invalid>\r
2164 <invalid><baz/></invalid>\r
2165 </testCase>\r
2166 <testCase>\r
2167 <section>4.12</section>\r
2168 <correct>\r
2169 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2170   <data type="token">\r
2171     <except>\r
2172       <value>x</value>\r
2173       <value>y</value>\r
2174       <value>z</value>\r
2175     </except>\r
2176   </data>\r
2177 </element>\r
2178 </correct>\r
2179 <valid><foo/></valid>\r
2180 <valid><foo>xyz</foo></valid>\r
2181 <invalid><foo>x</foo></invalid>\r
2182 <invalid><foo>y</foo></invalid>\r
2183 <invalid><foo>y</foo></invalid>\r
2184 </testCase>\r
2185 <testCase>\r
2186 <section>4.12</section>\r
2187 <correct>\r
2188 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2189   <attribute name="bar"/>\r
2190 </element>\r
2191 </correct>\r
2192 <valid>\r
2193 <foo bar=""/>\r
2194 </valid>\r
2195 <valid>\r
2196 <foo bar="x"/>\r
2197 </valid>\r
2198 <invalid>\r
2199 <foo/>\r
2200 </invalid>\r
2201 </testCase>\r
2202 <testCase>\r
2203 <section>4.12</section>\r
2204 <correct>\r
2205 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2206   <attribute>\r
2207     <name>bar</name>\r
2208   </attribute>\r
2209 </element>\r
2210 </correct>\r
2211 <valid>\r
2212 <foo bar=""/>\r
2213 </valid>\r
2214 <valid>\r
2215 <foo bar="x"/>\r
2216 </valid>\r
2217 <invalid>\r
2218 <foo/>\r
2219 </invalid>\r
2220 </testCase>\r
2221 <testCase>\r
2222 <section>4.12</section>\r
2223 <correct>\r
2224 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2225   <group>\r
2226     <element name="bar">\r
2227       <empty/>\r
2228     </element>\r
2229     <element name="bar">\r
2230       <empty/>\r
2231     </element>\r
2232     <element name="bar">\r
2233       <empty/>\r
2234     </element>\r
2235   </group>\r
2236 </element>\r
2237 </correct>\r
2238 <valid>\r
2239 <foo><bar/><bar/><bar/></foo>\r
2240 </valid>\r
2241 <invalid>\r
2242 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>\r
2243 </invalid>\r
2244 <invalid>\r
2245 <foo><bar/><bar/></foo>\r
2246 </invalid>\r
2247 <invalid>\r
2248 <foo><bar/></foo>\r
2249 </invalid>\r
2250 <invalid>\r
2251 <foo></foo>\r
2252 </invalid>\r
2253 <invalid>\r
2254 <foo>X</foo>\r
2255 </invalid>\r
2256 <invalid>\r
2257 <foo><bar/>X<bar/><bar/></foo>\r
2258 </invalid>\r
2259 <invalid>\r
2260 <foo><bar/><bar/><bar/><bar/></foo>\r
2261 </invalid>\r
2262 </testCase>\r
2263 <testCase>\r
2264 <section>4.12</section>\r
2265 <correct>\r
2266 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2267   <choice>\r
2268     <element name="bar1">\r
2269       <empty/>\r
2270     </element>\r
2271     <element name="bar2">\r
2272       <empty/>\r
2273     </element>\r
2274     <element name="bar3">\r
2275       <empty/>\r
2276     </element>\r
2277   </choice>\r
2278 </element>\r
2279 </correct>\r
2280 <valid><foo><bar1/></foo></valid>\r
2281 <valid><foo><bar2/></foo></valid>\r
2282 <valid><foo><bar3/></foo></valid>\r
2283 <invalid><foo/></invalid>\r
2284 </testCase>\r
2285 <testCase>\r
2286 <section>4.12</section>\r
2287 <correct>\r
2288 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2289   <interleave>\r
2290     <element name="bar1">\r
2291       <empty/>\r
2292     </element>\r
2293     <element name="bar2">\r
2294       <empty/>\r
2295     </element>\r
2296     <element name="bar3">\r
2297       <empty/>\r
2298     </element>\r
2299   </interleave>\r
2300 </element>\r
2301 </correct>\r
2302 <valid><foo><bar1/><bar2/><bar3/></foo></valid>\r
2303 <valid><foo><bar1/><bar3/><bar2/></foo></valid>\r
2304 <valid><foo><bar2/><bar1/><bar3/></foo></valid>\r
2305 <valid><foo><bar2/><bar3/><bar1/></foo></valid>\r
2306 <valid><foo><bar3/><bar1/><bar2/></foo></valid>\r
2307 <valid><foo><bar3/><bar2/><bar1/></foo></valid>\r
2308 <invalid><foo><bar2/><bar1/></foo></invalid>\r
2309 <invalid><foo><bar1/><bar3/><bar2/><bar1/></foo></invalid>\r
2310 </testCase>\r
2311 <testCase>\r
2312 <section>4.12</section>\r
2313 <correct>\r
2314 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2315   <group>\r
2316     <element name="bar">\r
2317       <empty/>\r
2318     </element>\r
2319   </group>\r
2320 </element>\r
2321 </correct>\r
2322 <valid><foo><bar/></foo></valid>\r
2323 <invalid><foo/></invalid>\r
2324 </testCase>\r
2325 <testCase>\r
2326 <section>4.12</section>\r
2327 <correct>\r
2328 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2329   <interleave>\r
2330     <element name="bar">\r
2331       <empty/>\r
2332     </element>\r
2333   </interleave>\r
2334 </element>\r
2335 </correct>\r
2336 <valid><foo><bar/></foo></valid>\r
2337 <invalid><foo/></invalid>\r
2338 </testCase>\r
2339 <testCase>\r
2340 <section>4.12</section>\r
2341 <correct>\r
2342 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2343   <choice>\r
2344     <element name="bar">\r
2345       <empty/>\r
2346     </element>\r
2347   </choice>\r
2348 </element>\r
2349 </correct>\r
2350 <valid><foo><bar/></foo></valid>\r
2351 <invalid><foo/></invalid>\r
2352 </testCase>\r
2353 </testSuite>\r
2354 <testSuite>\r
2355 <section>4.13</section>\r
2356 <testCase>\r
2357 <section>4.13</section>\r
2358 <correct>\r
2359 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2360   <mixed>\r
2361     <element name="bar">\r
2362       <empty/>\r
2363     </element>\r
2364   </mixed>\r
2365 </element>\r
2366 </correct>\r
2367 <valid><foo>x<bar/></foo></valid>\r
2368 <valid><foo><bar/></foo></valid>\r
2369 <valid><foo><bar/>x</foo></valid>\r
2370 <valid><foo>x<bar/>y</foo></valid>\r
2371 <invalid><foo/></invalid>\r
2372 <invalid><foo><bar/><bar/></foo></invalid>\r
2373 </testCase>\r
2374 </testSuite>\r
2375 <testSuite>\r
2376 <section>4.14</section>\r
2377 <testCase>\r
2378 <section>4.14</section>\r
2379 <correct>\r
2380 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2381   <optional>\r
2382     <element name="bar">\r
2383       <empty/>\r
2384     </element>\r
2385   </optional>\r
2386 </element>\r
2387 </correct>\r
2388 <valid><foo><bar/></foo></valid>\r
2389 <valid><foo/></valid>\r
2390 <invalid><foo>x<bar/></foo></invalid>\r
2391 <invalid><foo><bar/><bar/></foo></invalid>\r
2392 </testCase>\r
2393 </testSuite>\r
2394 <testSuite>\r
2395 <section>4.15</section>\r
2396 <testCase>\r
2397 <section>4.15</section>\r
2398 <correct>\r
2399 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2400   <zeroOrMore>\r
2401     <element name="bar">\r
2402       <empty/>\r
2403     </element>\r
2404   </zeroOrMore>\r
2405 </element>\r
2406 </correct>\r
2407 <valid><foo><bar/></foo></valid>\r
2408 <valid><foo/></valid>\r
2409 <invalid><foo>x<bar/></foo></invalid>\r
2410 <invalid><foo><baz/></foo></invalid>\r
2411 <valid><foo><bar/><bar/></foo></valid>\r
2412 </testCase>\r
2413 </testSuite>\r
2414 <testSuite>\r
2415 <section>4.16</section>\r
2416 <testCase>\r
2417 <section>4.16</section>\r
2418 <incorrect>\r
2419 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2420 <start>\r
2421   <element>\r
2422     <anyName>\r
2423       <except>\r
2424         <anyName/>\r
2425       </except>\r
2426     </anyName>\r
2427     <empty/>\r
2428   </element>\r
2429 </start>\r
2430 </grammar>\r
2431 </incorrect>\r
2432 </testCase>\r
2433 <testCase>\r
2434 <section>4.16</section>\r
2435 <incorrect>\r
2436 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2437 <start>\r
2438   <element>\r
2439     <anyName>\r
2440       <except>\r
2441         <choice>\r
2442           <anyName/>\r
2443           <name>foo</name>\r
2444         </choice>\r
2445       </except>\r
2446     </anyName>\r
2447     <empty/>\r
2448   </element>\r
2449 </start>\r
2450 </grammar>\r
2451 </incorrect>\r
2452 </testCase>\r
2453 <testCase>\r
2454 <section>4.16</section>\r
2455 <incorrect>\r
2456 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2457 <start>\r
2458   <element>\r
2459     <nsName ns="">\r
2460       <except>\r
2461         <nsName ns=""/>\r
2462       </except>\r
2463     </nsName>\r
2464     <empty/>\r
2465   </element>\r
2466 </start>\r
2467 </grammar>\r
2468 </incorrect>\r
2469 </testCase>\r
2470 <testCase>\r
2471 <section>4.16</section>\r
2472 <incorrect>\r
2473 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2474 <start>\r
2475   <element>\r
2476     <nsName ns="">\r
2477       <except>\r
2478         <choice>\r
2479           <nsName ns=""/>\r
2480           <name>foo</name>\r
2481         </choice>\r
2482       </except>\r
2483     </nsName>\r
2484     <empty/>\r
2485   </element>\r
2486 </start>\r
2487 </grammar>\r
2488 </incorrect>\r
2489 </testCase>\r
2490 <testCase>\r
2491 <section>4.16</section>\r
2492 <incorrect>\r
2493 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2494 <start>\r
2495   <element>\r
2496     <nsName ns="">\r
2497       <except>\r
2498         <anyName/>\r
2499       </except>\r
2500     </nsName>\r
2501     <empty/>\r
2502   </element>\r
2503 </start>\r
2504 </grammar>\r
2505 </incorrect>\r
2506 </testCase>\r
2507 <testCase>\r
2508 <section>4.16</section>\r
2509 <incorrect>\r
2510 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2511 <start>\r
2512   <element>\r
2513     <nsName ns="">\r
2514       <except>\r
2515         <choice>\r
2516           <anyName/>\r
2517           <name>foo</name>\r
2518         </choice>\r
2519       </except>\r
2520     </nsName>\r
2521     <empty/>\r
2522   </element>\r
2523 </start>\r
2524 </grammar>\r
2525 </incorrect>\r
2526 </testCase>\r
2527 <testCase>\r
2528 <section>4.16</section>\r
2529 <documentation>Tests that 4.16 is before 4.20.</documentation>\r
2530 <incorrect>\r
2531 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2532 <start>\r
2533   <element name="foo">\r
2534     <zeroOrMore>\r
2535       <attribute>\r
2536         <anyName>\r
2537           <except>\r
2538             <anyName/>\r
2539           </except>\r
2540         </anyName>\r
2541         <text/>\r
2542       </attribute>\r
2543       <notAllowed/>\r
2544     </zeroOrMore>\r
2545   </element>\r
2546 </start>\r
2547 </grammar>\r
2548 </incorrect>\r
2549 </testCase>\r
2550 <testCase>\r
2551 <section>4.16</section>\r
2552 <documentation>Tests that 4.16 is before removal of unreachable definitions.</documentation>\r
2553 <incorrect>\r
2554 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2555 <start>\r
2556   <element name="foo">\r
2557     <empty/>\r
2558   </element>\r
2559 </start>\r
2560 <define name="bar">\r
2561   <element>\r
2562     <anyName>\r
2563       <except>\r
2564         <anyName/>\r
2565       </except>\r
2566     </anyName>\r
2567     <empty/>\r
2568   </element>\r
2569 </define>\r
2570 </grammar>\r
2571 </incorrect>\r
2572 </testCase>\r
2573 <testCase>\r
2574 <section>4.16</section>\r
2575 <incorrect>\r
2576 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2577   <attribute name="xmlns">\r
2578     <text/>\r
2579   </attribute>\r
2580 </element>\r
2581 </incorrect>\r
2582 </testCase>\r
2583 <testCase>\r
2584 <section>4.16</section>\r
2585 <correct>\r
2586 <element name="xmlns" xmlns="http://relaxng.org/ns/structure/1.0">\r
2587   <empty/>\r
2588 </element>\r
2589 </correct>\r
2590 <valid><xmlns/></valid>\r
2591 </testCase>\r
2592 <testCase>\r
2593 <section>4.16</section>\r
2594 <incorrect>\r
2595 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2596   <attribute name=" xmlns">\r
2597     <text/>\r
2598   </attribute>\r
2599 </element>\r
2600 </incorrect>\r
2601 </testCase>\r
2602 <testCase>\r
2603 <section>4.16</section>\r
2604 <incorrect>\r
2605 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2606   <optional>\r
2607     <notAllowed/>\r
2608     <attribute name="xmlns">\r
2609       <text/>\r
2610     </attribute>\r
2611   </optional>\r
2612 </element>\r
2613 </incorrect>\r
2614 </testCase>\r
2615 <testCase>\r
2616 <section>4.16</section>\r
2617 <incorrect>\r
2618 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2619   <start>\r
2620     <element name="foo">\r
2621       <empty/>\r
2622     </element>\r
2623   </start>\r
2624   <define name="foo">\r
2625     <attribute name="xmlns">\r
2626       <text/>\r
2627     </attribute>\r
2628   </define>\r
2629 </grammar>\r
2630 </incorrect>\r
2631 </testCase>\r
2632 <testCase>\r
2633 <section>4.16</section>\r
2634 <incorrect>\r
2635 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2636   <attribute name="xmlns" ns="">\r
2637     <text/>\r
2638   </attribute>\r
2639 </element>\r
2640 </incorrect>\r
2641 </testCase>\r
2642 <testCase>\r
2643 <section>4.16</section>\r
2644 <incorrect>\r
2645 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2646   <attribute>\r
2647     <choice>\r
2648       <name ns="">xmlns</name>\r
2649       <name>foo</name>\r
2650     </choice>\r
2651     <text/>\r
2652   </attribute>\r
2653 </element>\r
2654 </incorrect>\r
2655 </testCase>\r
2656 <testCase>\r
2657 <section>4.16</section>\r
2658 <incorrect>\r
2659 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2660   <attribute>\r
2661     <name ns="">xmlns</name>\r
2662     <text/>\r
2663   </attribute>\r
2664 </element>\r
2665 </incorrect>\r
2666 </testCase>\r
2667 <testCase>\r
2668 <section>4.16</section>\r
2669 <incorrect>\r
2670 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2671   <attribute>\r
2672     <name>xmlns</name>\r
2673     <text/>\r
2674   </attribute>\r
2675 </element>\r
2676 </incorrect>\r
2677 </testCase>\r
2678 <testCase>\r
2679 <section>4.16</section>\r
2680 <incorrect>\r
2681 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2682   <attribute>\r
2683     <name>\r
2684       xmlns\r
2685     </name>\r
2686     <text/>\r
2687   </attribute>\r
2688 </element>\r
2689 </incorrect>\r
2690 </testCase>\r
2691 <testCase>\r
2692 <section>4.16</section>\r
2693 <incorrect>\r
2694 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2695   <attribute>\r
2696     <choice>\r
2697       <name>foo</name>\r
2698       <name ns="">xmlns</name>\r
2699     </choice>\r
2700     <text/>\r
2701   </attribute>\r
2702 </element>\r
2703 </incorrect>\r
2704 </testCase>\r
2705 <testCase>\r
2706 <section>4.16</section>\r
2707 <incorrect>\r
2708 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2709   <oneOrMore>\r
2710     <attribute>\r
2711       <anyName>\r
2712         <except>\r
2713           <name>xmlns</name>\r
2714         </except>\r
2715       </anyName>\r
2716       <text/>\r
2717     </attribute>\r
2718   </oneOrMore>\r
2719 </element>\r
2720 </incorrect>\r
2721 </testCase>\r
2722 <testCase>\r
2723 <section>4.16</section>\r
2724 <incorrect>\r
2725 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2726   <oneOrMore>\r
2727     <attribute>\r
2728       <nsName ns="">\r
2729         <except>\r
2730           <name>xmlns</name>\r
2731         </except>\r
2732       </nsName>\r
2733       <text/>\r
2734     </attribute>\r
2735   </oneOrMore>\r
2736 </element>\r
2737 </incorrect>\r
2738 </testCase>\r
2739 <testCase>\r
2740 <section>4.16</section>\r
2741 <incorrect>\r
2742 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2743   <attribute ns="http://www.w3.org/2000/xmlns" name="bar">\r
2744     <text/>\r
2745   </attribute>\r
2746 </element>\r
2747 </incorrect>\r
2748 </testCase>\r
2749 <testCase>\r
2750 <section>4.16</section>\r
2751 <correct>\r
2752 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.w3.org/2000/xmlns">\r
2753   <empty/>\r
2754 </element>\r
2755 </correct>\r
2756 <valid><foo xmlns="http://www.w3.org/2000/xmlns"/></valid>\r
2757 </testCase>\r
2758 <testCase>\r
2759 <section>4.16</section>\r
2760 <incorrect>\r
2761 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2762   <data type="token">\r
2763     <param name="minLength">2</param>\r
2764   </data>\r
2765 </element>\r
2766 </incorrect>\r
2767 </testCase>\r
2768 <testCase>\r
2769 <section>4.16</section>\r
2770 <incorrect>\r
2771 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2772   <data type="tok"/>\r
2773 </element>\r
2774 </incorrect>\r
2775 </testCase>\r
2776 <testCase>\r
2777 <section>4.16</section>\r
2778 <incorrect>\r
2779 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2780   <value type="tok"/>\r
2781 </element>\r
2782 </incorrect>\r
2783 </testCase>\r
2784 <testCase>\r
2785 <section>4.16</section>\r
2786 <incorrect>\r
2787 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2788   <optional>\r
2789     <notAllowed/>\r
2790     <data type="token">\r
2791       <param name="minLength">2</param>\r
2792     </data>\r
2793   </optional>\r
2794 </element>\r
2795 </incorrect>\r
2796 </testCase>\r
2797 <testCase>\r
2798 <section>4.16</section>\r
2799 <incorrect>\r
2800 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2801   <optional>\r
2802     <notAllowed/>\r
2803     <data type="tok"/>\r
2804   </optional>\r
2805 </element>\r
2806 </incorrect>\r
2807 </testCase>\r
2808 <testCase>\r
2809 <section>4.16</section>\r
2810 <incorrect>\r
2811 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
2812   <optional>\r
2813     <notAllowed/>\r
2814     <value type="tok"/>\r
2815   </optional>\r
2816 </element>\r
2817 </incorrect>\r
2818 </testCase>\r
2819 <testCase>\r
2820 <section>4.16</section>\r
2821 <incorrect>\r
2822 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2823 <start>\r
2824   <element name="foo">\r
2825     <empty/>\r
2826   </element>\r
2827 </start>\r
2828 <define name="foo">\r
2829   <data type="token">\r
2830     <param name="minLength">2</param>\r
2831   </data>\r
2832 </define>\r
2833 </grammar>\r
2834 </incorrect>\r
2835 </testCase>\r
2836 <testCase>\r
2837 <section>4.16</section>\r
2838 <incorrect>\r
2839 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2840 <start>\r
2841   <element name="foo">\r
2842     <empty/>\r
2843   </element>\r
2844 </start>\r
2845 <define name="foo">\r
2846   <data type="tok"/>\r
2847 </define>\r
2848 </grammar>\r
2849 </incorrect>\r
2850 </testCase>\r
2851 <testCase>\r
2852 <section>4.16</section>\r
2853 <incorrect>\r
2854 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2855 <start>\r
2856   <element name="foo">\r
2857     <empty/>\r
2858   </element>\r
2859 </start>\r
2860 <define name="foo">\r
2861   <value type="tok"/>\r
2862 </define>\r
2863 </grammar>\r
2864 </incorrect>\r
2865 </testCase>\r
2866 </testSuite>\r
2867 <testSuite>\r
2868 <section>4.17</section>\r
2869 <testCase>\r
2870 <section>4.17</section>\r
2871 <incorrect>\r
2872 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2873 <start>\r
2874   <ref name="x"/>\r
2875 </start>\r
2876 <define name="x">\r
2877   <element name="foo1">\r
2878     <empty/>\r
2879   </element>\r
2880 </define>\r
2881 <define name="x" combine="choice">\r
2882   <element name="foo2">\r
2883     <empty/>\r
2884   </element>\r
2885 </define>\r
2886 <define name="x">\r
2887   <element name="foo3">\r
2888     <empty/>\r
2889   </element>\r
2890 </define>\r
2891 </grammar>\r
2892 </incorrect>\r
2893 </testCase>\r
2894 <testCase>\r
2895 <section>4.17</section>\r
2896 <incorrect>\r
2897 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2898 <start name="x">\r
2899   <element name="foo1">\r
2900     <empty/>\r
2901   </element>\r
2902 </start>\r
2903 <start name="x" combine="choice">\r
2904   <element name="foo2">\r
2905     <empty/>\r
2906   </element>\r
2907 </start>\r
2908 <start name="x">\r
2909   <element name="foo3">\r
2910     <empty/>\r
2911   </element>\r
2912 </start>\r
2913 </grammar>\r
2914 </incorrect>\r
2915 </testCase>\r
2916 <testCase>\r
2917 <section>4.17</section>\r
2918 <incorrect>\r
2919 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2920 <start>\r
2921   <ref name="x"/>\r
2922 </start>\r
2923 <define name="x">\r
2924   <element name="foo1">\r
2925     <empty/>\r
2926   </element>\r
2927 </define>\r
2928 <define name="x">\r
2929   <element name="foo2">\r
2930     <empty/>\r
2931   </element>\r
2932 </define>\r
2933 </grammar>\r
2934 </incorrect>\r
2935 </testCase>\r
2936 <testCase>\r
2937 <section>4.17</section>\r
2938 <incorrect>\r
2939 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2940 <start name="x">\r
2941   <element name="foo1">\r
2942     <empty/>\r
2943   </element>\r
2944 </start>\r
2945 <start name="x">\r
2946   <element name="foo2">\r
2947     <empty/>\r
2948   </element>\r
2949 </start>\r
2950 </grammar>\r
2951 </incorrect>\r
2952 </testCase>\r
2953 <testCase>\r
2954 <section>4.17</section>\r
2955 <correct>\r
2956 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2957 <start>\r
2958   <ref name="x"/>\r
2959 </start>\r
2960 <define name="x" combine="choice">\r
2961   <element name="foo1">\r
2962     <empty/>\r
2963   </element>\r
2964 </define>\r
2965 <define name="x" combine="choice">\r
2966   <element name="foo2">\r
2967     <empty/>\r
2968   </element>\r
2969 </define>\r
2970 <define name="x">\r
2971   <element name="foo3">\r
2972     <empty/>\r
2973   </element>\r
2974 </define>\r
2975 </grammar>\r
2976 </correct>\r
2977 <valid>\r
2978 <foo1/>\r
2979 </valid>\r
2980 <valid>\r
2981 <foo2/>\r
2982 </valid>\r
2983 <valid>\r
2984 <foo3/>\r
2985 </valid>\r
2986 <invalid>\r
2987 <foo4/>\r
2988 </invalid>\r
2989 </testCase>\r
2990 <testCase>\r
2991 <section>4.17</section>\r
2992 <correct>\r
2993 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
2994 <start combine="choice">\r
2995   <element name="foo1">\r
2996     <empty/>\r
2997   </element>\r
2998 </start>\r
2999 <start combine="choice">\r
3000   <element name="foo2">\r
3001     <empty/>\r
3002   </element>\r
3003 </start>\r
3004 <start>\r
3005   <element name="foo3">\r
3006     <empty/>\r
3007   </element>\r
3008 </start>\r
3009 </grammar>\r
3010 </correct>\r
3011 <valid>\r
3012 <foo1/>\r
3013 </valid>\r
3014 <valid>\r
3015 <foo2/>\r
3016 </valid>\r
3017 <valid>\r
3018 <foo3/>\r
3019 </valid>\r
3020 <invalid>\r
3021 <foo4/>\r
3022 </invalid>\r
3023 </testCase>\r
3024 <testCase>\r
3025 <section>4.17</section>\r
3026 <incorrect>\r
3027 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3028 <start>\r
3029   <element name="foo">\r
3030     <ref name="x"/>\r
3031   </element>\r
3032 </start>\r
3033 <define name="x" combine="choice">\r
3034   <element name="bar1">\r
3035     <empty/>\r
3036   </element>\r
3037 </define>\r
3038 <define name="x">\r
3039   <element name="bar2">\r
3040     <empty/>\r
3041   </element>\r
3042 </define>\r
3043 <define name="x" combine="interleave">\r
3044   <element name="bar3">\r
3045     <empty/>\r
3046   </element>\r
3047 </define>\r
3048 </grammar>\r
3049 </incorrect>\r
3050 </testCase>\r
3051 <testCase>\r
3052 <section>4.17</section>\r
3053 <incorrect>\r
3054 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
3055 <grammar>\r
3056 <start name="x" combine="choice">\r
3057   <element name="bar1">\r
3058     <empty/>\r
3059   </element>\r
3060 </start>\r
3061 <start name="x">\r
3062   <element name="bar2">\r
3063     <empty/>\r
3064   </element>\r
3065 </start>\r
3066 <start name="x" combine="interleave">\r
3067   <element name="bar3">\r
3068     <empty/>\r
3069   </element>\r
3070 </start>\r
3071 </grammar>\r
3072 </element>\r
3073 </incorrect>\r
3074 </testCase>\r
3075 <testCase>\r
3076 <section>4.17</section>\r
3077 <correct>\r
3078 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3079 <start>\r
3080   <element name="foo">\r
3081     <ref name="x"/>\r
3082   </element>\r
3083 </start>\r
3084 <define name="x" combine="interleave">\r
3085   <element name="bar1">\r
3086     <empty/>\r
3087   </element>\r
3088 </define>\r
3089 <define name="x" combine="interleave">\r
3090   <element name="bar2">\r
3091     <empty/>\r
3092   </element>\r
3093 </define>\r
3094 <define name="x">\r
3095   <element name="bar3">\r
3096     <empty/>\r
3097   </element>\r
3098 </define>\r
3099 </grammar>\r
3100 </correct>\r
3101 <valid>\r
3102 <foo><bar1/><bar2/><bar3/></foo>\r
3103 </valid>\r
3104 <valid>\r
3105 <foo><bar1/><bar3/><bar2/></foo>\r
3106 </valid>\r
3107 <valid>\r
3108 <foo><bar2/><bar3/><bar1/></foo>\r
3109 </valid>\r
3110 <invalid>\r
3111 <foo><bar2/><bar3/><bar1/><bar2/></foo>\r
3112 </invalid>\r
3113 </testCase>\r
3114 <testCase>\r
3115 <section>4.17</section>\r
3116 <correct>\r
3117 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
3118 <grammar>\r
3119 <start combine="interleave">\r
3120   <element name="bar1">\r
3121     <empty/>\r
3122   </element>\r
3123 </start>\r
3124 <start>\r
3125   <element name="bar2">\r
3126     <empty/>\r
3127   </element>\r
3128 </start>\r
3129 <start combine="interleave">\r
3130   <element name="bar3">\r
3131     <empty/>\r
3132   </element>\r
3133 </start>\r
3134 </grammar>\r
3135 </element>\r
3136 </correct>\r
3137 <valid>\r
3138 <foo><bar1/><bar2/><bar3/></foo>\r
3139 </valid>\r
3140 <valid>\r
3141 <foo><bar1/><bar3/><bar2/></foo>\r
3142 </valid>\r
3143 <valid>\r
3144 <foo><bar2/><bar3/><bar1/></foo>\r
3145 </valid>\r
3146 <invalid>\r
3147 <foo><bar2/><bar3/><bar1/><bar2/></foo>\r
3148 </invalid>\r
3149 </testCase>\r
3150 <testCase>\r
3151 <section>4.17</section>\r
3152 <incorrect>\r
3153 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3154 <start>\r
3155   <element name="foo">\r
3156     <ref name="x"/>\r
3157   </element>\r
3158 </start>\r
3159 <define name="x">\r
3160   <element name="bar1">\r
3161     <empty/>\r
3162   </element>\r
3163 </define>\r
3164 <define name="x" combine="interleave">\r
3165   <element name="bar2">\r
3166     <empty/>\r
3167   </element>\r
3168 </define>\r
3169 <define name="x">\r
3170   <element name="bar3">\r
3171     <empty/>\r
3172   </element>\r
3173 </define>\r
3174 </grammar>\r
3175 </incorrect>\r
3176 </testCase>\r
3177 <testCase>\r
3178 <section>4.17</section>\r
3179 <incorrect>\r
3180 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> \r
3181 <grammar>\r
3182 <start name="x">\r
3183   <element name="bar1">\r
3184     <empty/>\r
3185   </element>\r
3186 </start>\r
3187 <start name="x" combine="interleave">\r
3188   <element name="bar2">\r
3189     <empty/>\r
3190   </element>\r
3191 </start>\r
3192 <start name="x">\r
3193   <element name="bar3">\r
3194     <empty/>\r
3195   </element>\r
3196 </start>\r
3197 </grammar>\r
3198 </element>\r
3199 </incorrect>\r
3200 </testCase>\r
3201 </testSuite>\r
3202 <testSuite>\r
3203 <section>4.18</section>\r
3204 <testCase>\r
3205 <section>4.18</section>\r
3206 <documentation>grammar must have a start</documentation>\r
3207 <incorrect>\r
3208 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3209   <define name="foo">\r
3210     <element name="foo">\r
3211       <empty/>\r
3212     </element>\r
3213   </define>\r
3214 </grammar>   \r
3215 </incorrect>\r
3216 </testCase>\r
3217 <testCase>\r
3218 <section>4.18</section>\r
3219 <documentation>4.17 is before 4.18</documentation>\r
3220 <incorrect>\r
3221 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3222   <start>\r
3223     <element name="foo">\r
3224       <empty/>\r
3225     </element>\r
3226   </start>\r
3227   <define name="bar">\r
3228     <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3229       <define name="foo">\r
3230         <element name="foo">\r
3231           <empty/>\r
3232         </element>\r
3233       </define>\r
3234     </grammar>   \r
3235   </define>\r
3236 </grammar>\r
3237 </incorrect>\r
3238 </testCase>\r
3239 <testCase>\r
3240 <section>4.18</section>\r
3241 <documentation>4.17 is before 4.19</documentation>\r
3242 <incorrect>\r
3243 <choice xmlns="http://relaxng.org/ns/structure/1.0">\r
3244   <element name="foo">\r
3245     <empty/>\r
3246   </element>\r
3247   <group>\r
3248     <notAllowed/>\r
3249     <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3250       <define name="foo">\r
3251         <element name="foo">\r
3252           <empty/>\r
3253         </element>\r
3254       </define>\r
3255     </grammar>   \r
3256   </group>\r
3257 </choice>\r
3258 </incorrect>\r
3259 </testCase>\r
3260 <testCase>\r
3261 <section>4.18</section>\r
3262 <documentation>every ref must have a def</documentation>\r
3263 <incorrect>\r
3264 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3265   <start>\r
3266     <ref name="foo"/>\r
3267   </start>\r
3268 </grammar>\r
3269 </incorrect>\r
3270 </testCase>\r
3271 <testCase>\r
3272 <section>4.18</section>\r
3273 <documentation>4.17 is before 4.18</documentation>\r
3274 <incorrect>\r
3275 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3276   <start>\r
3277     <element name="foo">\r
3278       <empty/>\r
3279     </element>\r
3280   </start>\r
3281   <define name="foo">\r
3282     <ref name="bar"/>\r
3283   </define>\r
3284 </grammar>\r
3285 </incorrect>\r
3286 </testCase>\r
3287 <testCase>\r
3288 <section>4.18</section>\r
3289 <documentation>4.17 is before 4.19</documentation>\r
3290 <incorrect>\r
3291 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3292   <start>\r
3293     <choice>\r
3294       <element name="foo">\r
3295         <empty/>\r
3296       </element>\r
3297       <group>\r
3298         <notAllowed/>\r
3299         <ref name="foo"/>\r
3300       </group>\r
3301     </choice>\r
3302   </start>\r
3303 </grammar>\r
3304 </incorrect>\r
3305 </testCase>\r
3306 <testCase>\r
3307 <section>4.18</section>\r
3308 <documentation>every parentRef must have a def</documentation>\r
3309 <incorrect>\r
3310 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3311   <start>\r
3312     <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3313       <start>\r
3314         <parentRef name="foo"/>\r
3315       </start>\r
3316       <define name="foo">\r
3317         <element name="foo">\r
3318           <empty/>\r
3319         </element>\r
3320       </define>\r
3321     </grammar>\r
3322   </start>\r
3323 </grammar>\r
3324 </incorrect>\r
3325 </testCase>\r
3326 <testCase>\r
3327 <section>4.18</section>\r
3328 <documentation>4.17 is before 4.18</documentation>\r
3329 <incorrect>\r
3330 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3331   <start>\r
3332     <element name="foo">\r
3333       <empty/>\r
3334     </element>\r
3335   </start>\r
3336   <define name="bar">\r
3337     <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3338       <start>\r
3339         <parentRef name="foo"/>\r
3340       </start>\r
3341       <define name="foo">\r
3342         <element name="foo">\r
3343           <empty/>\r
3344         </element>\r
3345       </define>\r
3346     </grammar>\r
3347   </define>\r
3348 </grammar>\r
3349 </incorrect>\r
3350 </testCase>\r
3351 <testCase>\r
3352 <section>4.18</section>\r
3353 <documentation>4.17 is before 4.19</documentation>\r
3354 <incorrect>\r
3355 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3356   <start>\r
3357     <choice>\r
3358       <element name="foo">\r
3359         <empty/>\r
3360       </element>\r
3361       <group>\r
3362         <notAllowed/>\r
3363         <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3364           <start>\r
3365             <parentRef name="foo"/>\r
3366           </start>\r
3367           <define name="foo">\r
3368             <element name="foo">\r
3369               <empty/>\r
3370             </element>\r
3371           </define>\r
3372         </grammar>\r
3373       </group>\r
3374     </choice>\r
3375   </start>\r
3376 </grammar>\r
3377 </incorrect>\r
3378 </testCase>\r
3379 <testCase>\r
3380 <section>4.18</section>\r
3381 <incorrect>\r
3382 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3383   <start>\r
3384     <ref name="foo"/>\r
3385   </start>\r
3386   <define name="foo">\r
3387     <choice>\r
3388       <element name="foo">\r
3389         <empty/>\r
3390       </element>\r
3391       <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3392         <start>\r
3393           <parentRef name="foo"/>\r
3394         </start>\r
3395       </grammar>\r
3396     </choice>\r
3397   </define>\r
3398 </grammar>\r
3399 </incorrect>\r
3400 </testCase>\r
3401 <testCase>\r
3402 <section>4.18</section>\r
3403 <correct>\r
3404 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3405   <start>\r
3406     <ref name="foo"/>\r
3407   </start>\r
3408   <define name="foo">\r
3409     <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3410       <start>\r
3411         <ref name="foo"/>\r
3412       </start>\r
3413       <define name="foo">\r
3414         <element name="foo">\r
3415           <empty/>\r
3416         </element>\r
3417       </define>\r
3418     </grammar>\r
3419   </define>\r
3420 </grammar>\r
3421 </correct>\r
3422 <valid><foo/></valid>\r
3423 </testCase>\r
3424 <testCase>\r
3425 <section>4.18</section>\r
3426 <correct>\r
3427 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3428   <start>\r
3429     <grammar>\r
3430       <start>\r
3431         <ref name="foo"/>\r
3432       </start>\r
3433       <define name="foo">\r
3434         <element name="innerFoo">\r
3435            <parentRef name="foo"/>\r
3436         </element>\r
3437       </define>\r
3438     </grammar>\r
3439   </start>\r
3440   <define name="foo">\r
3441     <element name="outerFoo">\r
3442       <empty/>\r
3443     </element>\r
3444   </define>\r
3445 </grammar>\r
3446 </correct>\r
3447 <valid><innerFoo><outerFoo/></innerFoo></valid>\r
3448 <invalid><outerFoo/></invalid>\r
3449 </testCase>\r
3450 <testCase>\r
3451 <section>4.18</section>\r
3452 <correct>\r
3453 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3454   <start>\r
3455     <ref name="foo"/>\r
3456   </start>\r
3457   <define name="foo">\r
3458     <element name="outerFoo">\r
3459       <grammar>\r
3460         <start>\r
3461           <ref name="foo"/>\r
3462         </start>\r
3463         <define name="foo">\r
3464           <element name="innerFoo">\r
3465              <empty/>\r
3466           </element>\r
3467         </define>\r
3468       </grammar>\r
3469     </element>\r
3470   </define>\r
3471 </grammar>\r
3472 </correct>\r
3473 <valid><outerFoo><innerFoo/></outerFoo></valid>\r
3474 <invalid><innerFoo/></invalid>\r
3475 </testCase>\r
3476 </testSuite>\r
3477 <testSuite>\r
3478 <section>4.19</section>\r
3479 <testCase>\r
3480 <section>4.19</section>\r
3481 <incorrect>\r
3482 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3483   <start>\r
3484     <element name="foo">\r
3485       <ref name="bar"/>\r
3486     </element>\r
3487   </start>\r
3488   <define name="bar">\r
3489     <optional>\r
3490       <element name="bar">\r
3491         <empty/>\r
3492       </element>\r
3493       <ref name="bar"/>\r
3494     </optional>\r
3495   </define>\r
3496 </grammar>\r
3497 </incorrect>\r
3498 </testCase>\r
3499 <testCase>\r
3500 <section>4.19</section>\r
3501 <correct>\r
3502 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3503   <start>\r
3504     <element name="foo">\r
3505       <ref name="bar"/>\r
3506     </element>\r
3507   </start>\r
3508   <define name="bar">\r
3509     <element name="bar">\r
3510       <optional>\r
3511         <ref name="bar"/>\r
3512       </optional>\r
3513     </element>\r
3514   </define>\r
3515 </grammar>\r
3516 </correct>\r
3517 <valid>\r
3518 <foo><bar/></foo>\r
3519 </valid>\r
3520 <valid>\r
3521 <foo><bar><bar/></bar></foo>\r
3522 </valid>\r
3523 <invalid>\r
3524 <foo/>\r
3525 </invalid>\r
3526 </testCase>\r
3527 <testCase>\r
3528 <section>4.19</section>\r
3529 <correct>\r
3530 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3531   <start>\r
3532     <element name="foo">\r
3533       <empty/>\r
3534     </element>\r
3535   </start>\r
3536   <define name="bar">\r
3537     <ref name="bar"/>\r
3538   </define>\r
3539 </grammar>\r
3540 </correct>\r
3541 <valid><foo/></valid>\r
3542 </testCase>\r
3543 <testCase>\r
3544 <section>4.19</section>\r
3545 <section>4.20</section>\r
3546 <documentation>Tests that recursion detection happens before\r
3547 normalization of notAllowed.</documentation>\r
3548 <incorrect>\r
3549 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
3550   <start>\r
3551     <choice>\r
3552       <element name="foo">\r
3553         <empty/>\r
3554       </element>\r
3555       <group>\r
3556         <notAllowed/>\r
3557         <ref name="bar"/>\r
3558       </group>\r
3559     </choice>\r
3560   </start>\r
3561   <define name="bar">\r
3562     <element name="bar">\r
3563       <empty/>\r
3564     </element>\r
3565     <optional>\r
3566       <ref name="bar"/>\r
3567     </optional>\r
3568   </define>\r
3569 </grammar>\r
3570 </incorrect>\r
3571 </testCase>\r
3572 </testSuite>\r
3573 </testSuite>\r
3574 <testSuite>\r
3575 <section>6</section>\r
3576 <testSuite>\r
3577 <section>6.1</section>\r
3578 <testCase>\r
3579 <section>6.1</section>\r
3580 <correct>\r
3581 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
3582   <anyName/>\r
3583   <empty/>\r
3584 </element>\r
3585 </correct>\r
3586 <valid>\r
3587 <foo/>\r
3588 </valid>\r
3589 <valid>\r
3590 <foo xmlns="http://www.example.com"/>\r
3591 </valid>\r
3592 </testCase>\r
3593 <testCase>\r
3594 <section>6.1</section>\r
3595 <correct>\r
3596 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
3597   <anyName>\r
3598     <except>\r
3599       <name ns="">foo</name>\r
3600     </except>\r
3601   </anyName>\r
3602   <empty/>\r
3603 </element>\r
3604 </correct>\r
3605 <invalid>\r
3606 <foo/>\r
3607 </invalid>\r
3608 <valid>\r
3609 <foo xmlns="http://www.example.com"/>\r
3610 </valid>\r
3611 <valid>\r
3612 <bar/>\r
3613 </valid>\r
3614 </testCase>\r
3615 <testCase>\r
3616 <section>6.1</section>\r
3617 <correct>\r
3618 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
3619   <anyName>\r
3620     <except>\r
3621       <nsName ns=""/>\r
3622     </except>\r
3623   </anyName>\r
3624   <empty/>\r
3625 </element>\r
3626 </correct>\r
3627 <invalid>\r
3628 <foo/>\r
3629 </invalid>\r
3630 <valid>\r
3631 <foo xmlns="http://www.example.com"/>\r
3632 </valid>\r
3633 </testCase>\r
3634 <testCase>\r
3635 <section>6.1</section>\r
3636 <correct>\r
3637 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
3638   <nsName ns=""/>\r
3639   <empty/>\r
3640 </element>\r
3641 </correct>\r
3642 <valid>\r
3643 <foo/>\r
3644 </valid>\r
3645 <invalid>\r
3646 <foo xmlns="http://www.example.com"/>\r
3647 </invalid>\r
3648 </testCase>\r
3649 <testCase>\r
3650 <section>6.1</section>\r
3651 <correct>\r
3652 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
3653   <nsName ns="http://www.example.com"/>\r
3654   <empty/>\r
3655 </element>\r
3656 </correct>\r
3657 <invalid>\r
3658 <foo/>\r
3659 </invalid>\r
3660 <invalid>\r
3661 <foo xmlns="HTTP://www.example.com"/>\r
3662 </invalid>\r
3663 <invalid>\r
3664 <foo xmlns="http://www.example.com/"/>\r
3665 </invalid>\r
3666 <valid>\r
3667 <foo xmlns="http://www.example.com"/>\r
3668 </valid>\r
3669 </testCase>\r
3670 <testCase>\r
3671 <section>6.1</section>\r
3672 <correct>\r
3673 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
3674   <nsName ns="http://www.example.com">\r
3675     <except>\r
3676       <name ns="http://www.example.com">foo</name>\r
3677     </except>\r
3678   </nsName>\r
3679   <empty/>\r
3680 </element>\r
3681 </correct>\r
3682 <invalid>\r
3683 <foo/>\r
3684 </invalid>\r
3685 <invalid>\r
3686 <foo xmlns="http://www.example.com"/>\r
3687 </invalid>\r
3688 <valid>\r
3689 <bar xmlns="http://www.example.com"/>\r
3690 </valid>\r
3691 </testCase>\r
3692 <testCase>\r
3693 <section>6.1</section>\r
3694 <correct>\r
3695 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
3696   <nsName ns="http://www.example.com">\r
3697     <except>\r
3698       <name ns="">foo</name>\r
3699     </except>\r
3700   </nsName>\r
3701   <empty/>\r
3702 </element>\r
3703 </correct>\r
3704 <invalid>\r
3705 <bar/>\r
3706 </invalid>\r
3707 <invalid>\r
3708 <foo/>\r
3709 </invalid>\r
3710 <valid>\r
3711 <foo xmlns="http://www.example.com"/>\r
3712 </valid>\r
3713 <valid>\r
3714 <bar xmlns="http://www.example.com"/>\r
3715 </valid>\r
3716 </testCase>\r
3717 <testCase>\r
3718 <section>6.1</section>\r
3719 <correct>\r
3720 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
3721   <name ns="http://www.example.com">foo</name>\r
3722   <empty/>\r
3723 </element>\r
3724 </correct>\r
3725 <valid>\r
3726 <foo xmlns="http://www.example.com"/>\r
3727 </valid>\r
3728 <invalid>\r
3729 <foo/>\r
3730 </invalid>\r
3731 <invalid>\r
3732 <bar xmlns="http://www.example.com"/>\r
3733 </invalid>\r
3734 <invalid>\r
3735 <foo xmlns="http://www.example.org"/>\r
3736 </invalid>\r
3737 </testCase>\r
3738 <testCase>\r
3739 <section>6.1</section>\r
3740 <correct>\r
3741 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
3742   <name ns="">foo</name>\r
3743   <empty/>\r
3744 </element>\r
3745 </correct>\r
3746 <invalid>\r
3747 <foo xmlns="http://www.example.com"/>\r
3748 </invalid>\r
3749 <valid>\r
3750 <foo/>\r
3751 </valid>\r
3752 <invalid>\r
3753 <bar xmlns="http://www.example.com"/>\r
3754 </invalid>\r
3755 <invalid>\r
3756 <bar/>\r
3757 </invalid>\r
3758 </testCase>\r
3759 <testCase>\r
3760 <section>6.1</section>\r
3761 <correct>\r
3762 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
3763   <choice>\r
3764     <name ns="">foo</name>\r
3765     <name ns="">bar</name>\r
3766   </choice>\r
3767   <empty/>\r
3768 </element>\r
3769 </correct>\r
3770 <invalid>\r
3771 <baz/>\r
3772 </invalid>\r
3773 <valid>\r
3774 <foo/>\r
3775 </valid>\r
3776 <valid>\r
3777 <bar/>\r
3778 </valid>\r
3779 </testCase>\r
3780 </testSuite>\r
3781 <testSuite>\r
3782 <section>6.2</section>\r
3783 <testSuite>\r
3784 <section>6.2.1</section>\r
3785 <testCase>\r
3786 <section>6.2.1</section>\r
3787 <correct>\r
3788 <choice xmlns="http://relaxng.org/ns/structure/1.0">\r
3789   <element name="foo">\r
3790     <empty/>\r
3791   </element>\r
3792   <element name="bar">\r
3793     <empty/>\r
3794   </element>\r
3795 </choice>\r
3796 </correct>\r
3797 <valid>\r
3798 <foo/>\r
3799 </valid>\r
3800 <valid>\r
3801 <bar/>\r
3802 </valid>\r
3803 <invalid>\r
3804 <baz/>\r
3805 </invalid>\r
3806 </testCase>\r
3807 <testCase>\r
3808 <section>6.2.1</section>\r
3809 <correct>\r
3810 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
3811   <choice>\r
3812     <group>\r
3813       <element name="bar1">\r
3814         <empty/>\r
3815       </element>\r
3816       <element name="bar2">\r
3817         <empty/>\r
3818       </element>\r
3819     </group>\r
3820     <group>\r
3821       <element name="bar1">\r
3822         <empty/>\r
3823       </element>\r
3824       <element name="bar3">\r
3825         <empty/>\r
3826       </element>\r
3827     </group>\r
3828   </choice>\r
3829 </element>\r
3830 </correct>\r
3831 <valid>\r
3832 <foo><bar1/><bar2/></foo>\r
3833 </valid>\r
3834 <valid>\r
3835 <foo><bar1/><bar3/></foo>\r
3836 </valid>\r
3837 <invalid>\r
3838 <foo><bar1/></foo>\r
3839 </invalid>\r
3840 <invalid>\r
3841 <foo/>\r
3842 </invalid>\r
3843 <invalid>\r
3844 <foo><bar2/></foo>\r
3845 </invalid>\r
3846 <invalid>\r
3847 <foo><bar3/></foo>\r
3848 </invalid>\r
3849 <invalid>\r
3850 <foo><bar1/><bar2/><bar3/></foo>\r
3851 </invalid>\r
3852 </testCase>\r
3853 <testCase>\r
3854 <section>6.2.1</section>\r
3855 <correct>\r
3856 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
3857   <choice>\r
3858     <group>\r
3859       <attribute name="bar1">\r
3860         <text/>\r
3861       </attribute>\r
3862       <attribute name="bar2">\r
3863         <text/>\r
3864       </attribute>\r
3865     </group>\r
3866     <group>\r
3867       <attribute name="bar1">\r
3868         <text/>\r
3869       </attribute>\r
3870       <attribute name="bar3">\r
3871         <text/>\r
3872       </attribute>\r
3873     </group>\r
3874   </choice>\r
3875 </element>\r
3876 </correct>\r
3877 <valid>\r
3878 <foo bar1="x" bar2="x"/>\r
3879 </valid>\r
3880 <valid>\r
3881 <foo bar1="x" bar3="x"/>\r
3882 </valid>\r
3883 <invalid>\r
3884 <foo/>\r
3885 </invalid>\r
3886 <invalid>\r
3887 <foo bar1="x"/>\r
3888 </invalid>\r
3889 <invalid>\r
3890 <foo bar2="x"/>\r
3891 </invalid>\r
3892 <invalid>\r
3893 <foo bar3="x"/>\r
3894 </invalid>\r
3895 <invalid>\r
3896 <foo bar1="x" bar2="x" bar3="x"/>\r
3897 </invalid>\r
3898 </testCase>\r
3899 <testCase>\r
3900 <section>6.2.1</section>\r
3901 <correct>\r
3902 <choice xmlns="http://relaxng.org/ns/structure/1.0">\r
3903   <element name="foo">\r
3904     <element name="bar">\r
3905       <empty/>\r
3906     </element>\r
3907   </element>\r
3908   <element name="foo">\r
3909     <element name="baz">\r
3910       <empty/>\r
3911     </element>\r
3912   </element>\r
3913 </choice>\r
3914 </correct>\r
3915 <valid>\r
3916 <foo><bar/></foo>\r
3917 </valid>\r
3918 <valid>\r
3919 <foo><baz/></foo>\r
3920 </valid>\r
3921 <invalid>\r
3922 <foo/>\r
3923 </invalid>\r
3924 <invalid>\r
3925 <foo><bar/><bar/></foo>\r
3926 </invalid>\r
3927 <invalid>\r
3928 <foo><foo/></foo>\r
3929 </invalid>\r
3930 <invalid>\r
3931 <bar/>\r
3932 </invalid>\r
3933 <invalid>\r
3934 <fobaz/>\r
3935 </invalid>\r
3936 </testCase>\r
3937 </testSuite>\r
3938 <testSuite>\r
3939 <section>6.2.2</section>\r
3940 <testCase>\r
3941 <section>6.2.2</section>\r
3942 <correct>\r
3943 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
3944   <group>\r
3945     <element name="bar">\r
3946       <empty/>\r
3947     </element>\r
3948     <element name="baz">\r
3949       <empty/>\r
3950     </element>\r
3951   </group>\r
3952 </element>\r
3953 </correct>\r
3954 <valid>\r
3955 <foo><bar/><baz/></foo>\r
3956 </valid>\r
3957 <invalid>\r
3958 <foo><baz/><bar/></foo>\r
3959 </invalid>\r
3960 <invalid>\r
3961 <foo><bar/><baz/><bar/><baz/></foo>\r
3962 </invalid>\r
3963 <invalid>\r
3964 <foo/>\r
3965 </invalid>\r
3966 <invalid>\r
3967 <foo><bar/></foo>\r
3968 </invalid>\r
3969 <invalid>\r
3970 <foo><baz/></foo>\r
3971 </invalid>\r
3972 </testCase>\r
3973 <testCase>\r
3974 <section>6.2.2</section>\r
3975 <correct>\r
3976 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
3977   <group>\r
3978     <attribute name="bar">\r
3979       <text/>\r
3980     </attribute>\r
3981     <attribute name="baz">\r
3982       <text/>\r
3983     </attribute>\r
3984   </group>\r
3985 </element>\r
3986 </correct>\r
3987 <valid>\r
3988 <foo bar="x" baz="x"/>\r
3989 </valid>\r
3990 <invalid>\r
3991 <foo/>\r
3992 </invalid>\r
3993 </testCase>\r
3994 <testCase>\r
3995 <section>6.2.2</section>\r
3996 <correct>\r
3997 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
3998   <group>\r
3999     <attribute name="bar">\r
4000       <text/>\r
4001     </attribute>\r
4002     <attribute name="baz">\r
4003       <text/>\r
4004     </attribute>\r
4005   </group>\r
4006 </element>\r
4007 </correct>\r
4008 <valid>\r
4009 <foo bar="x" baz="x"/>\r
4010 </valid>\r
4011 <invalid>\r
4012 <foo/>\r
4013 </invalid>\r
4014 <invalid>\r
4015 <foo bar="x"/>\r
4016 </invalid>\r
4017 <invalid>\r
4018 <foo baz="x"/>\r
4019 </invalid>\r
4020 </testCase>\r
4021 <testCase>\r
4022 <section>6.2.2</section>\r
4023 <correct>\r
4024 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4025   <group>\r
4026     <attribute name="baz">\r
4027       <text/>\r
4028     </attribute>\r
4029     <attribute name="bar">\r
4030       <text/>\r
4031     </attribute>\r
4032   </group>\r
4033 </element>\r
4034 </correct>\r
4035 <valid>\r
4036 <foo bar="x" baz="x"/>\r
4037 </valid>\r
4038 <invalid>\r
4039 <foo/>\r
4040 </invalid>\r
4041 <invalid>\r
4042 <foo bar="x"/>\r
4043 </invalid>\r
4044 <invalid>\r
4045 <foo baz="x"/>\r
4046 </invalid>\r
4047 </testCase>\r
4048 <testCase>\r
4049 <section>6.2.2</section>\r
4050 <correct>\r
4051 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4052   <group>\r
4053     <attribute name="bar">\r
4054       <text/>\r
4055     </attribute>\r
4056     <element name="baz">\r
4057       <empty/>\r
4058     </element>\r
4059   </group>\r
4060 </element>\r
4061 </correct>\r
4062 <valid>\r
4063 <foo bar="x"><baz/></foo>\r
4064 </valid>\r
4065 <invalid>\r
4066 <foo><baz/></foo>\r
4067 </invalid>\r
4068 <invalid>\r
4069 <foo bar="x"/>\r
4070 </invalid>\r
4071 <invalid>\r
4072 <foo baz="x"><bar/></foo>\r
4073 </invalid>\r
4074 </testCase>\r
4075 <testCase>\r
4076 <section>6.2.2</section>\r
4077 <correct>\r
4078 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4079   <group>\r
4080     <element name="baz">\r
4081       <empty/>\r
4082     </element>\r
4083     <attribute name="bar">\r
4084       <text/>\r
4085     </attribute>\r
4086   </group>\r
4087 </element>\r
4088 </correct>\r
4089 <valid>\r
4090 <foo bar="x"><baz/></foo>\r
4091 </valid>\r
4092 <invalid>\r
4093 <foo><baz/></foo>\r
4094 </invalid>\r
4095 <invalid>\r
4096 <foo bar="x"/>\r
4097 </invalid>\r
4098 <invalid>\r
4099 <foo baz="x"><bar/></foo>\r
4100 </invalid>\r
4101 </testCase>\r
4102 </testSuite>\r
4103 <testSuite>\r
4104 <section>6.2.3</section>\r
4105 <testCase>\r
4106 <section>6.2.3</section>\r
4107 <correct>\r
4108 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4109   <empty/>\r
4110 </element>\r
4111 </correct>\r
4112 <valid>\r
4113 <foo/>\r
4114 </valid>\r
4115 <valid>\r
4116 <foo> </foo>\r
4117 </valid>\r
4118 <valid>\r
4119 <foo>\r
4120 \r
4121 \r
4122 </foo>\r
4123 </valid>\r
4124 <valid>\r
4125 <foo>\r
4126 <?target data?>\r
4127 <?target data?>\r
4128 <?target data?>\r
4129 <?target data?>\r
4130 </foo>\r
4131 </valid>\r
4132 <invalid>\r
4133 <foo>x</foo>\r
4134 </invalid>\r
4135 <invalid>\r
4136 <foo><bar/></foo>\r
4137 </invalid>\r
4138 <invalid>\r
4139 <foo bar="x"/>\r
4140 </invalid>\r
4141 </testCase>\r
4142 <testCase>\r
4143 <section>6.2.3</section>\r
4144 <correct>\r
4145 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4146   <attribute name="bar">\r
4147     <empty/>\r
4148   </attribute>\r
4149 </element>\r
4150 </correct>\r
4151 <valid><foo bar=""/></valid>\r
4152 <valid><foo bar=" "/></valid>\r
4153 <invalid><foo bar="x"/></invalid>\r
4154 </testCase>\r
4155 <testCase>\r
4156 <section>6.2.3</section>\r
4157 <correct>\r
4158 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4159   <list>\r
4160     <empty/>\r
4161   </list>\r
4162 </element>\r
4163 </correct>\r
4164 <valid><foo/></valid>\r
4165 <valid><foo> </foo></valid>\r
4166 <invalid><foo>x</foo></invalid>\r
4167 <invalid><foo><bar/></foo></invalid>\r
4168 <invalid><foo bar=""/></invalid>\r
4169 </testCase>\r
4170 <testCase>\r
4171 <section>6.2.3</section>\r
4172 <correct>\r
4173 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4174   <attribute name="bar">\r
4175     <list>\r
4176       <empty/>\r
4177     </list>\r
4178   </attribute>\r
4179 </element>\r
4180 </correct>\r
4181 <valid><foo bar=""/></valid>\r
4182 <valid><foo bar=" "/></valid>\r
4183 <invalid><foo bar="x"/></invalid>\r
4184 </testCase>\r
4185 <testCase>\r
4186 <section>6.2.3</section>\r
4187 <correct>\r
4188 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4189   <group>\r
4190     <element name="bar">\r
4191       <empty/>\r
4192     </element>\r
4193     <choice>\r
4194       <empty/>\r
4195       <element name="baz">\r
4196         <empty/>\r
4197       </element>\r
4198     </choice>\r
4199   </group>\r
4200 </element>\r
4201 </correct>\r
4202 <valid>\r
4203 <foo><bar/><baz/></foo>\r
4204 </valid>\r
4205 <valid>\r
4206 <foo><bar/></foo>\r
4207 </valid>\r
4208 <invalid>\r
4209 <foo></foo>\r
4210 </invalid>\r
4211 <invalid>\r
4212 <foo><bar/><baz/><baz/></foo>\r
4213 </invalid>\r
4214 </testCase>\r
4215 <testCase>\r
4216 <correct>\r
4217 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4218   <choice>\r
4219     <empty/>\r
4220     <attribute name="bar">\r
4221       <text/>\r
4222     </attribute>\r
4223   </choice>\r
4224 </element>\r
4225 </correct>\r
4226 <valid>\r
4227 <foo bar="x"/>\r
4228 </valid>\r
4229 <valid>\r
4230 <foo/>\r
4231 </valid>\r
4232 <invalid>\r
4233 <foo baz="x"/>\r
4234 </invalid>\r
4235 <invalid>\r
4236 <foo><bar/></foo>\r
4237 </invalid>\r
4238 </testCase>\r
4239 </testSuite>\r
4240 <testSuite>\r
4241 <section>6.2.4</section>\r
4242 <testCase>\r
4243 <section>6.2.4</section>\r
4244 <correct>\r
4245 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4246   <text/>\r
4247 </element>\r
4248 </correct>\r
4249 <valid>\r
4250 <foo/>\r
4251 </valid>\r
4252 <valid>\r
4253 <foo> </foo>\r
4254 </valid>\r
4255 <valid>\r
4256 <foo>x</foo>\r
4257 </valid>\r
4258 <valid>\r
4259 <foo>\r
4260 x\r
4261 <?target data?>\r
4262 y\r
4263 </foo>\r
4264 </valid>\r
4265 <invalid>\r
4266 <foo><bar/></foo>\r
4267 </invalid>\r
4268 </testCase>\r
4269 <testCase>\r
4270 <section>6.2.4</section>\r
4271 <correct>\r
4272 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4273   <group>\r
4274     <text/>\r
4275     <element name="bar">\r
4276       <empty/>\r
4277     </element>\r
4278   </group>\r
4279 </element>\r
4280 </correct>\r
4281 <valid>\r
4282 <foo><bar/></foo>\r
4283 </valid>\r
4284 <valid>\r
4285 <foo>\r
4286 <bar/>\r
4287 </foo>\r
4288 </valid>\r
4289 <valid>\r
4290 <foo>\r
4291 x\r
4292 <bar/>\r
4293 </foo>\r
4294 </valid>\r
4295 <valid>\r
4296 <foo>\r
4297 x\r
4298 <?target data?>\r
4299 y\r
4300 <bar/></foo>\r
4301 </valid>\r
4302 <invalid>\r
4303 <foo/>\r
4304 </invalid>\r
4305 <invalid>\r
4306 <foo><bar/>x</foo>\r
4307 </invalid>\r
4308 </testCase>\r
4309 <testCase>\r
4310 <section>6.2.4</section>\r
4311 <correct>\r
4312 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4313   <group>\r
4314     <element name="bar">\r
4315       <empty/>\r
4316     </element>\r
4317     <text/>\r
4318   </group>\r
4319 </element>\r
4320 </correct>\r
4321 <valid>\r
4322 <foo><bar/></foo>\r
4323 </valid>\r
4324 <valid>\r
4325 <foo>\r
4326 <bar/>\r
4327 </foo>\r
4328 </valid>\r
4329 <invalid>\r
4330 <foo>\r
4331 x\r
4332 <bar/>\r
4333 </foo>\r
4334 </invalid>\r
4335 <valid>\r
4336 <foo>\r
4337 <bar/>\r
4338 x\r
4339 <?target data?>\r
4340 y\r
4341 </foo>\r
4342 </valid>\r
4343 <invalid>\r
4344 <foo/>\r
4345 </invalid>\r
4346 <valid>\r
4347 <foo><bar/>x</foo>\r
4348 </valid>\r
4349 </testCase>\r
4350 <testCase>\r
4351 <section>6.2.4</section>\r
4352 <correct>\r
4353 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4354   <interleave>\r
4355     <element name="bar">\r
4356       <empty/>\r
4357     </element>\r
4358     <text/>\r
4359   </interleave>\r
4360 </element>\r
4361 </correct>\r
4362 <valid>\r
4363 <foo><bar/></foo>\r
4364 </valid>\r
4365 <valid>\r
4366 <foo>\r
4367 <bar/>\r
4368 </foo>\r
4369 </valid>\r
4370 <valid>\r
4371 <foo>\r
4372 x\r
4373 <bar/>\r
4374 </foo>\r
4375 </valid>\r
4376 <valid>\r
4377 <foo>\r
4378 <bar/>\r
4379 x\r
4380 <?target data?>\r
4381 y\r
4382 </foo>\r
4383 </valid>\r
4384 <invalid>\r
4385 <foo/>\r
4386 </invalid>\r
4387 <valid>\r
4388 <foo><bar/>x</foo>\r
4389 </valid>\r
4390 <valid>\r
4391 <foo>x<bar/>x</foo>\r
4392 </valid>\r
4393 <invalid>\r
4394 <foo>x<bar/>x<bar/></foo>\r
4395 </invalid>\r
4396 </testCase>\r
4397 <testCase>\r
4398 <section>6.2.4</section>\r
4399 <correct>\r
4400 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4401   <attribute name="bar">\r
4402     <text/>\r
4403   </attribute>\r
4404 </element>\r
4405 </correct>\r
4406 <valid>\r
4407 <foo bar=""/>\r
4408 </valid>\r
4409 <valid>\r
4410 <foo bar="x"/>\r
4411 </valid>\r
4412 <valid>\r
4413 <foo bar=" "/>\r
4414 </valid>\r
4415 <invalid>\r
4416 <foo/>\r
4417 </invalid>\r
4418 <invalid>\r
4419 <foo><bar/>x<bar/></foo>\r
4420 </invalid>\r
4421 </testCase>\r
4422 </testSuite>\r
4423 <testSuite>\r
4424 <section>6.2.5</section>\r
4425 <testCase>\r
4426 <section>6.2.5</section>\r
4427 <correct>\r
4428 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4429   <oneOrMore>\r
4430     <element name="bar">\r
4431       <empty/>\r
4432     </element>\r
4433   </oneOrMore>\r
4434 </element>\r
4435 </correct>\r
4436 <valid>\r
4437 <foo><bar/></foo>\r
4438 </valid>\r
4439 <valid>\r
4440 <foo><bar/><bar/></foo>\r
4441 </valid>\r
4442 <valid>\r
4443 <foo><bar/><bar/><bar/></foo>\r
4444 </valid>\r
4445 <invalid>\r
4446 <foo/>\r
4447 </invalid>\r
4448 </testCase>\r
4449 <testCase>\r
4450 <section>6.2.5</section>\r
4451 <correct>\r
4452 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4453   <oneOrMore>\r
4454     <group>\r
4455       <element name="bar">\r
4456         <empty/>\r
4457       </element>\r
4458       <element name="bar">\r
4459         <empty/>\r
4460       </element>\r
4461     </group>\r
4462   </oneOrMore>\r
4463 </element>\r
4464 </correct>\r
4465 <valid>\r
4466 <foo><bar/><bar/></foo>\r
4467 </valid>\r
4468 <valid>\r
4469 <foo><bar/><bar/><bar/><bar/></foo>\r
4470 </valid>\r
4471 <valid>\r
4472 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo>\r
4473 </valid>\r
4474 <invalid>\r
4475 <foo><bar/></foo>\r
4476 </invalid>\r
4477 <invalid>\r
4478 <foo/>\r
4479 </invalid>\r
4480 <invalid>\r
4481 <foo><bar/><bar/><bar/></foo>\r
4482 </invalid>\r
4483 </testCase>\r
4484 <testCase>\r
4485 <section>6.2.5</section>\r
4486 <correct>\r
4487 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4488   <oneOrMore>\r
4489     <attribute>\r
4490       <nsName ns=""/>\r
4491       <text/>\r
4492     </attribute>\r
4493   </oneOrMore>\r
4494 </element>\r
4495 </correct>\r
4496 <valid>\r
4497 <foo x=""/>\r
4498 </valid>\r
4499 <valid>\r
4500 <foo x="" y=""/>\r
4501 </valid>\r
4502 <valid>\r
4503 <foo x="" y="" z=""/>\r
4504 </valid>\r
4505 <invalid>\r
4506 <foo/>\r
4507 </invalid>\r
4508 <invalid>\r
4509 <foo xmlns:ns="http://www.example.com" ns:x=""/>\r
4510 </invalid>\r
4511 <invalid>\r
4512 <foo x="" xmlns:ns="http://www.example.com" ns:x=""/>\r
4513 </invalid>\r
4514 </testCase>\r
4515 <testCase>\r
4516 <section>6.2.5</section>\r
4517 <correct>\r
4518 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4519   <oneOrMore>\r
4520     <choice>\r
4521       <attribute name="bar">\r
4522         <text/>\r
4523       </attribute>\r
4524       <element name="bar">\r
4525         <text/>\r
4526       </element>\r
4527     </choice>\r
4528   </oneOrMore>\r
4529 </element>\r
4530 </correct>\r
4531 <valid>\r
4532 <foo bar=""><bar/><bar/></foo>\r
4533 </valid>\r
4534 <valid>\r
4535 <foo><bar/></foo>\r
4536 </valid>\r
4537 <valid>\r
4538 <foo bar=""/>\r
4539 </valid>\r
4540 <invalid>\r
4541 <foo/>\r
4542 </invalid>\r
4543 </testCase>\r
4544 </testSuite>\r
4545 <testSuite>\r
4546 <section>6.2.6</section>\r
4547 <testCase>\r
4548 <section>6.2.6</section>\r
4549 <correct>\r
4550 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4551   <interleave>\r
4552     <element name="bar">\r
4553       <empty/>\r
4554     </element>\r
4555     <element name="baz">\r
4556       <empty/>\r
4557     </element>\r
4558   </interleave>\r
4559 </element>\r
4560 </correct>\r
4561 <valid>\r
4562 <foo><bar/><baz/></foo>\r
4563 </valid>\r
4564 <valid>\r
4565 <foo><baz/><bar/></foo>\r
4566 </valid>\r
4567 <invalid>\r
4568 <foo><bar/></foo>\r
4569 </invalid>\r
4570 <invalid>\r
4571 <foo><baz/></foo>\r
4572 </invalid>\r
4573 <invalid>\r
4574 <foo><bar/><bar/></foo>\r
4575 </invalid>\r
4576 <invalid>\r
4577 <foo/>\r
4578 </invalid>\r
4579 </testCase>\r
4580 <testCase>\r
4581 <section>6.2.6</section>\r
4582 <correct>\r
4583 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4584   <interleave>\r
4585     <group>\r
4586       <element name="bar1">\r
4587         <empty/>\r
4588       </element>\r
4589       <element name="bar2">\r
4590         <empty/>\r
4591       </element>\r
4592     </group>\r
4593     <element name="baz">\r
4594       <empty/>\r
4595     </element>\r
4596   </interleave>\r
4597 </element>\r
4598 </correct>\r
4599 <valid>\r
4600 <foo><baz/><bar1/><bar2/></foo>\r
4601 </valid>\r
4602 <valid>\r
4603 <foo><bar1/><baz/><bar2/></foo>\r
4604 </valid>\r
4605 <valid>\r
4606 <foo><bar1/><bar2/><baz/></foo>\r
4607 </valid>\r
4608 <invalid>\r
4609 <foo><baz/><bar2/><bar1/></foo>\r
4610 </invalid>\r
4611 <invalid>\r
4612 <foo><bar2/><bar1/></foo>\r
4613 </invalid>\r
4614 <invalid>\r
4615 <foo><baz/><bar2/><bar1/></foo>\r
4616 </invalid>\r
4617 <invalid>\r
4618 <foo><baz/><bar1/></foo>\r
4619 </invalid>\r
4620 <invalid>\r
4621 <foo><baz/><bar2/></foo>\r
4622 </invalid>\r
4623 </testCase>\r
4624 <testCase>\r
4625 <section>6.2.6</section>\r
4626 <correct>\r
4627 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4628   <interleave>\r
4629     <attribute name="bar">\r
4630       <text/>\r
4631     </attribute>\r
4632     <attribute name="baz">\r
4633       <text/>\r
4634     </attribute>\r
4635   </interleave>\r
4636 </element>\r
4637 </correct>\r
4638 <valid>\r
4639 <foo bar="" baz=""/>\r
4640 </valid>\r
4641 <invalid>\r
4642 <foo/>\r
4643 </invalid>\r
4644 <invalid>\r
4645 <foo/>\r
4646 </invalid>\r
4647 <invalid>\r
4648 <foo bar=""/>\r
4649 </invalid>\r
4650 <invalid>\r
4651 <foo baz=""/>\r
4652 </invalid>\r
4653 </testCase>\r
4654 <testCase>\r
4655 <section>6.2.6</section>\r
4656 <correct>\r
4657 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4658   <interleave>\r
4659     <element name="bar">\r
4660       <empty/>\r
4661     </element>\r
4662     <attribute name="baz">\r
4663       <text/>\r
4664     </attribute>\r
4665   </interleave>\r
4666 </element>\r
4667 </correct>\r
4668 <valid>\r
4669 <foo baz=""><bar/></foo>\r
4670 </valid>\r
4671 <invalid>\r
4672 <foo/>\r
4673 </invalid>\r
4674 <invalid>\r
4675 <foo bar=""/>\r
4676 </invalid>\r
4677 <invalid>\r
4678 <foo bar=""><baz/><baz/></foo>\r
4679 </invalid>\r
4680 <invalid>\r
4681 <foo><baz/><baz/></foo>\r
4682 </invalid>\r
4683 </testCase>\r
4684 </testSuite>\r
4685 <testSuite>\r
4686 <section>6.2.7</section>\r
4687 <testCase>\r
4688 <section>6.2.7</section>\r
4689 <correct>\r
4690 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4691   <attribute>\r
4692     <name ns="">bar</name>\r
4693     <value type="string" datatypeLibrary="">baz</value>\r
4694   </attribute>\r
4695 </element>\r
4696 </correct>\r
4697 <valid>\r
4698 <foo bar="baz"/>\r
4699 </valid>\r
4700 <invalid>\r
4701 <foo bar=" baz"/>\r
4702 </invalid>\r
4703 <invalid>\r
4704 <foo bar="b"/>\r
4705 </invalid>\r
4706 <invalid>\r
4707 <foo bar=""/>\r
4708 </invalid>\r
4709 <invalid>\r
4710 <foo bar=" "/>\r
4711 </invalid>\r
4712 <invalid>\r
4713 <foo><bar>baz</bar></foo>\r
4714 </invalid>\r
4715 </testCase>\r
4716 <testCase>\r
4717 <section>6.2.7</section>\r
4718 <correct>\r
4719 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4720   <attribute>\r
4721     <name ns="">bar</name>\r
4722     <choice>\r
4723       <value type="string" datatypeLibrary="">baz</value>\r
4724       <empty/>\r
4725     </choice>\r
4726   </attribute>\r
4727 </element>\r
4728 </correct>\r
4729 <valid>\r
4730 <foo bar="baz"/>\r
4731 </valid>\r
4732 <valid>\r
4733 <foo bar=""/>\r
4734 </valid>\r
4735 <invalid>\r
4736 <foo bar=" baz"/>\r
4737 </invalid>\r
4738 <invalid>\r
4739 <foo bar="b"/>\r
4740 </invalid>\r
4741 <invalid>\r
4742 <foo><bar>baz</bar></foo>\r
4743 </invalid>\r
4744 <invalid>\r
4745 <foo><bar/></foo>\r
4746 </invalid>\r
4747 <invalid>\r
4748 <foo/>\r
4749 </invalid>\r
4750 </testCase>\r
4751 <testCase>\r
4752 <section>6.2.7</section>\r
4753 <correct>\r
4754 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4755   <attribute>\r
4756     <name ns="">bar</name>\r
4757     <value type="string"/>\r
4758   </attribute>\r
4759 </element>\r
4760 </correct>\r
4761 <valid>\r
4762 <foo bar=""/>\r
4763 </valid>\r
4764 <invalid>\r
4765 <foo bar=" "/>\r
4766 </invalid>\r
4767 <invalid>\r
4768 <foo bar="x"/>\r
4769 </invalid>\r
4770 </testCase>\r
4771 <testCase>\r
4772 <section>6.2.7</section>\r
4773 <correct>\r
4774 <element xmlns="http://relaxng.org/ns/structure/1.0">\r
4775   <name ns="">foo</name>\r
4776   <group>\r
4777     <element>\r
4778       <name ns="">bar</name>\r
4779       <empty/>\r
4780     </element>\r
4781     <element>\r
4782       <name ns="">baz</name>\r
4783       <empty/>\r
4784     </element>\r
4785   </group>\r
4786 </element>\r
4787 </correct>\r
4788 <valid>\r
4789 <foo><bar/><baz/></foo>\r
4790 </valid>\r
4791 <valid>\r
4792 <foo>\r
4793 <bar/>\r
4794 <baz/>\r
4795 </foo>\r
4796 </valid>\r
4797 <valid>\r
4798 <foo>\r
4799 <bar/>\r
4800 &#xD;\r
4801 <baz/>\r
4802 </foo>\r
4803 </valid>\r
4804 <invalid>\r
4805 <foo/>\r
4806 </invalid>\r
4807 <invalid>\r
4808 <bar><bar/><baz/></bar>\r
4809 </invalid>\r
4810 </testCase>\r
4811 <testCase>\r
4812 <section>6.2.7</section>\r
4813 <section>6.2.8</section>\r
4814 <correct>\r
4815 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4816   <value type="string"/>\r
4817 </element>\r
4818 </correct>\r
4819 <valid><foo/></valid>\r
4820 <invalid><foo> </foo></invalid>\r
4821 <invalid><foo>x</foo></invalid>\r
4822 </testCase>\r
4823 <testCase>\r
4824 <section>6.2.7</section>\r
4825 <section>6.2.8</section>\r
4826 <correct>\r
4827 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4828   <choice>\r
4829     <value type="string"/>\r
4830     <empty/>\r
4831   </choice>\r
4832 </element>\r
4833 </correct>\r
4834 <valid><foo/></valid>\r
4835 <valid><foo> </foo></valid>\r
4836 <invalid><foo>x</foo></invalid>\r
4837 </testCase>\r
4838 <testCase>\r
4839 <section>6.2.7</section>\r
4840 <section>6.2.8</section>\r
4841 <section>6.2.10</section>\r
4842 <correct>\r
4843 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4844   <list>\r
4845     <data type="token"/>\r
4846   </list>\r
4847 </element>\r
4848 </correct>\r
4849 <invalid><foo/></invalid>\r
4850 <invalid><foo> </foo></invalid>\r
4851 <valid><foo>x</foo></valid>\r
4852 <valid><foo> x </foo></valid>\r
4853 <invalid><foo>x y</foo></invalid>\r
4854 </testCase>\r
4855 <testCase>\r
4856 <section>6.2.7</section>\r
4857 <section>6.2.8</section>\r
4858 <requires datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>\r
4859 <correct>\r
4860 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4861  <data type="string"\r
4862        datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">\r
4863    <param name="minLength">2</param>\r
4864  </data>\r
4865 </element>\r
4866 </correct>\r
4867 <valid><foo>xx</foo></valid>\r
4868 <valid><foo>xxx</foo></valid>\r
4869 <valid><foo>  </foo></valid>\r
4870 <valid><foo>   </foo></valid>\r
4871 <invalid><foo>x</foo></invalid>\r
4872 <invalid><foo> </foo></invalid>\r
4873 <invalid><foo/></invalid>\r
4874 </testCase>\r
4875 <testCase>\r
4876 <section>6.2.7</section>\r
4877 <section>6.2.8</section>\r
4878 <correct>\r
4879 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4880   <choice>\r
4881     <value>x</value>\r
4882     <element name="bar">\r
4883       <empty/>\r
4884     </element>\r
4885   </choice>\r
4886 </element>\r
4887 </correct>\r
4888 <valid><foo> x </foo></valid>\r
4889 <valid><foo>x</foo></valid>\r
4890 <invalid><foo>y</foo></invalid>\r
4891 <valid><foo><bar/></foo></valid>\r
4892 <valid>\r
4893 <foo>\r
4894 <bar/>\r
4895 </foo>\r
4896 </valid>\r
4897 <invalid><foo>x<bar/></foo></invalid>\r
4898 <invalid><foo/></invalid>\r
4899 <invalid><foo><bar/>x</foo></invalid>\r
4900 </testCase>\r
4901 <testCase>\r
4902 <section>6.2.7</section>\r
4903 <section>6.2.8</section>\r
4904 <correct>\r
4905 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4906   <choice>\r
4907     <value>x</value>\r
4908     <mixed>\r
4909       <element name="bar">\r
4910         <empty/>\r
4911       </element>\r
4912     </mixed>\r
4913   </choice>\r
4914 </element>\r
4915 </correct>\r
4916 <valid><foo> x </foo></valid>\r
4917 <valid><foo>x</foo></valid>\r
4918 <invalid><foo>y</foo></invalid>\r
4919 <valid><foo><bar/></foo></valid>\r
4920 <valid>\r
4921 <foo>\r
4922 <bar/>\r
4923 </foo>\r
4924 </valid>\r
4925 <valid><foo>x<bar/></foo></valid>\r
4926 <invalid><foo/></invalid>\r
4927 <valid><foo><bar/>x</foo></valid>\r
4928 </testCase>\r
4929 </testSuite>\r
4930 <testSuite>\r
4931 <section>6.2.8</section>\r
4932 <testCase>\r
4933 <section>6.2.8</section>\r
4934 <correct>\r
4935 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4936   <data type="string">\r
4937     <except>\r
4938       <choice>\r
4939         <value>x</value>\r
4940         <value>y</value>\r
4941       </choice>\r
4942     </except>\r
4943   </data>\r
4944 </element>\r
4945 </correct>\r
4946 <valid>\r
4947 <foo>xyzzy</foo>\r
4948 </valid>\r
4949 <invalid>\r
4950 <foo>x</foo>\r
4951 </invalid>\r
4952 <invalid>\r
4953 <foo>y</foo>\r
4954 </invalid>\r
4955 <invalid>\r
4956 <foo> x</foo>\r
4957 </invalid>\r
4958 </testCase>\r
4959 <testCase>\r
4960 <section>6.2.8</section>\r
4961 <correct>\r
4962 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4963   <data type="string"/>\r
4964 </element>\r
4965 </correct>\r
4966 <valid>\r
4967 <foo/>\r
4968 </valid>\r
4969 </testCase>\r
4970 <testCase>\r
4971 <section>6.2.8</section>\r
4972 <correct>\r
4973 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4974   <value/>\r
4975 </element>\r
4976 </correct>\r
4977 <valid>\r
4978 <foo/>\r
4979 </valid>\r
4980 </testCase>\r
4981 <testCase>\r
4982 <section>6.2.8</section>\r
4983 <correct>\r
4984 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
4985   <data type="string">\r
4986     <except>\r
4987       <value/>\r
4988     </except>\r
4989   </data>\r
4990 </element>\r
4991 </correct>\r
4992 <invalid>\r
4993 <foo/>\r
4994 </invalid>\r
4995 <valid>\r
4996 <foo>x</foo>\r
4997 </valid>\r
4998 </testCase>\r
4999 </testSuite>\r
5000 <testSuite>\r
5001 <section>6.2.9</section>\r
5002 <testCase>\r
5003 <section>6.2.9</section>\r
5004 <correct>\r
5005 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5006   <data type="string" datatypeLibrary=""/>\r
5007 </element>\r
5008 </correct>\r
5009 <valid>\r
5010 <foo>xyzzy</foo>\r
5011 </valid>\r
5012 <valid>\r
5013 <foo>\r
5014 x\r
5015 <?target data?>\r
5016 y\r
5017 <?target data?>\r
5018 z\r
5019 </foo>\r
5020 </valid>\r
5021 <valid>\r
5022 <foo></foo>\r
5023 </valid>\r
5024 <valid>\r
5025 <foo>\r
5026 </foo>\r
5027 </valid>\r
5028 <invalid>\r
5029 <foo><bar/></foo>\r
5030 </invalid>\r
5031 <invalid>\r
5032 <foo bar=""/>\r
5033 </invalid>\r
5034 </testCase>\r
5035 <testCase>\r
5036 <section>6.2.9</section>\r
5037 <correct>\r
5038 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5039   <data type="token" datatypeLibrary=""/>\r
5040 </element>\r
5041 </correct>\r
5042 <valid>\r
5043 <foo>xyzzy</foo>\r
5044 </valid>\r
5045 <valid>\r
5046 <foo>\r
5047 x\r
5048 <?target data?>\r
5049 y\r
5050 <?target data?>\r
5051 z\r
5052 </foo>\r
5053 </valid>\r
5054 <valid>\r
5055 <foo></foo>\r
5056 </valid>\r
5057 <valid>\r
5058 <foo>\r
5059 </foo>\r
5060 </valid>\r
5061 <invalid>\r
5062 <foo><bar/></foo>\r
5063 </invalid>\r
5064 <invalid>\r
5065 <foo bar=""/>\r
5066 </invalid>\r
5067 </testCase>\r
5068 <testCase>\r
5069 <section>6.2.9</section>\r
5070 <correct>\r
5071 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5072   <value type="string" datatypeLibrary="">x</value>\r
5073 </element>\r
5074 </correct>\r
5075 <valid><foo>x</foo></valid>\r
5076 <invalid><foo>xy</foo></invalid>\r
5077 <invalid><foo> x</foo></invalid>\r
5078 <invalid><foo/></invalid>\r
5079 </testCase>\r
5080 <testCase>\r
5081 <section>6.2.9</section>\r
5082 <correct>\r
5083 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5084   <value type="string" datatypeLibrary=""> x</value>\r
5085 </element>\r
5086 </correct>\r
5087 <valid><foo> x</foo></valid>\r
5088 <invalid><foo> xy</foo></invalid>\r
5089 <invalid><foo>x</foo></invalid>\r
5090 <invalid><foo/></invalid>\r
5091 </testCase>\r
5092 <testCase>\r
5093 <section>6.2.9</section>\r
5094 <correct>\r
5095 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5096   <value type="token" datatypeLibrary="">x</value>\r
5097 </element>\r
5098 </correct>\r
5099 <valid><foo>x</foo></valid>\r
5100 <valid><foo> x</foo></valid>\r
5101 <valid><foo>x </foo></valid>\r
5102 <valid><foo>&#xA;&#xD;&#x9;&#x20;x&#xA;&#xD;&#x9;&#x20;</foo></valid>\r
5103 <invalid><foo/></invalid>\r
5104 <invalid><foo>xy</foo></invalid>\r
5105 </testCase>\r
5106 <testCase>\r
5107 <section>6.2.9</section>\r
5108 <correct>\r
5109 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5110   <value type="token" datatypeLibrary="">x y</value>\r
5111 </element>\r
5112 </correct>\r
5113 <valid><foo>x y</foo></valid>\r
5114 <valid><foo> x   y </foo></valid>\r
5115 <valid><foo>x&#xA;&#xD;&#x9;&#x20;y</foo></valid>\r
5116 <invalid><foo>xy</foo></invalid>\r
5117 </testCase>\r
5118 <testCase>\r
5119 <section>6.2.9</section>\r
5120 <correct>\r
5121 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5122   <value type="token" datatypeLibrary="">&#xA;&#xD;&#x9;&#x20;x&#xA;&#xD;&#x9;&#x20;</value>\r
5123 </element>\r
5124 </correct>\r
5125 <valid><foo>x</foo></valid>\r
5126 <valid><foo> x</foo></valid>\r
5127 <valid><foo>x </foo></valid>\r
5128 <valid><foo>&#xD;&#x9;x&#x20;&#xA;</foo></valid>\r
5129 <invalid><foo/></invalid>\r
5130 <invalid><foo>xy</foo></invalid>\r
5131 </testCase>\r
5132 <testCase>\r
5133 <section>6.2.9</section>\r
5134 <correct>\r
5135 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5136   <value type="token" datatypeLibrary="">x&#xA;&#xD;&#x9;&#x20;y</value>\r
5137 </element>\r
5138 </correct>\r
5139 <valid><foo>x y</foo></valid>\r
5140 <valid><foo>x  y</foo></valid>\r
5141 <valid><foo> x y </foo></valid>\r
5142 <valid><foo>x&#xD;&#x9;y</foo></valid>\r
5143 <valid><foo>x&#x20;&#xA;y</foo></valid>\r
5144 <invalid><foo/></invalid>\r
5145 <invalid><foo>xy</foo></invalid>\r
5146 </testCase>\r
5147 <testCase>\r
5148 <section>6.2.9</section>\r
5149 <incorrect>\r
5150 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5151   <data type="decimal" datatypeLibrary=""/>\r
5152 </element>\r
5153 </incorrect>\r
5154 </testCase>\r
5155 <testCase>\r
5156 <section>6.2.9</section>\r
5157 <incorrect>\r
5158 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5159   <value type="decimal" datatypeLibrary=""/>\r
5160 </element>\r
5161 </incorrect>\r
5162 </testCase>\r
5163 <testCase>\r
5164 <section>6.2.9</section>\r
5165 <incorrect>\r
5166 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5167   <data type="string" datatypeLibrary="">\r
5168     <param name="length">2</param>\r
5169   </data>\r
5170 </element>\r
5171 </incorrect>\r
5172 </testCase>\r
5173 <testCase>\r
5174 <section>6.2.9</section>\r
5175 <incorrect>\r
5176 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5177   <data type="token" datatypeLibrary="">\r
5178     <param name="length">2</param>\r
5179   </data>\r
5180 </element>\r
5181 </incorrect>\r
5182 </testCase>\r
5183 </testSuite>\r
5184 <testSuite>\r
5185 <section>6.2.10</section>\r
5186 <testCase>\r
5187 <section>6.2.10</section>\r
5188 <correct>\r
5189 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5190   <list>\r
5191     <value type="string">x</value>\r
5192   </list>\r
5193 </element>\r
5194 </correct>\r
5195 <valid>\r
5196 <foo>x</foo>\r
5197 </valid>\r
5198 <valid>\r
5199 <foo> x </foo>\r
5200 </valid>\r
5201 <invalid>\r
5202 <foo>x x</foo>\r
5203 </invalid>\r
5204 </testCase>\r
5205 <testCase>\r
5206 <section>6.2.10</section>\r
5207 <correct>\r
5208 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5209   <list>\r
5210     <oneOrMore>\r
5211       <value type="string">x</value>\r
5212     </oneOrMore>\r
5213   </list>\r
5214 </element>\r
5215 </correct>\r
5216 <valid>\r
5217 <foo>x</foo>\r
5218 </valid>\r
5219 <valid>\r
5220 <foo> x x x x </foo>\r
5221 </valid>\r
5222 <invalid>\r
5223 <foo/>\r
5224 </invalid>\r
5225 <invalid>\r
5226 <foo>x y</foo>\r
5227 </invalid>\r
5228 </testCase>\r
5229 <testCase>\r
5230 <section>6.2.10</section>\r
5231 <correct>\r
5232 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5233   <list>\r
5234     <group>\r
5235       <value type="string">x</value>\r
5236       <value type="string">y</value>\r
5237     </group>\r
5238   </list>\r
5239 </element>\r
5240 </correct>\r
5241 <valid>\r
5242 <foo>x y</foo>\r
5243 </valid>\r
5244 <valid>\r
5245 <foo>x  y</foo>\r
5246 </valid>\r
5247 <valid>\r
5248 <foo>&#xD;x&#xA;y&#x9;</foo>\r
5249 </valid>\r
5250 <invalid>\r
5251 <foo>x</foo>\r
5252 </invalid>\r
5253 </testCase>\r
5254 <testCase>\r
5255 <section>6.2.10</section>\r
5256 <correct>\r
5257 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5258   <list>\r
5259     <group>\r
5260       <data type="token"/>\r
5261       <data type="token"/>\r
5262     </group>\r
5263   </list>\r
5264 </element>\r
5265 </correct>\r
5266 <valid>\r
5267 <foo>x y</foo>\r
5268 </valid>\r
5269 <invalid>\r
5270 <foo/>\r
5271 </invalid>\r
5272 <invalid>\r
5273 <foo>x y z</foo>\r
5274 </invalid>\r
5275 </testCase>\r
5276 <testCase>\r
5277 <section>6.2.10</section>\r
5278 <correct>\r
5279 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
5280   <list>\r
5281     <value>x y</value>\r
5282   </list>\r
5283 </element>\r
5284 </correct>\r
5285 <invalid>\r
5286 <foo>x y</foo>\r
5287 </invalid>\r
5288 </testCase>\r
5289 </testSuite>\r
5290 </testSuite>\r
5291 </testSuite>\r
5292 <testSuite>\r
5293 <section>7</section>\r
5294 <testSuite>\r
5295 <section>7.1</section>\r
5296 <testCase>\r
5297 <section>7.1.1</section>\r
5298 <incorrect>\r
5299 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5300 <start>\r
5301   <element name="foo">\r
5302     <attribute name="bar">\r
5303       <element name="baz">\r
5304         <empty/>\r
5305       </element>\r
5306     </attribute>\r
5307   </element>\r
5308 </start>\r
5309 </grammar>\r
5310 </incorrect>\r
5311 </testCase>\r
5312 <testCase>\r
5313 <section>7.1.1</section>\r
5314 <incorrect>\r
5315 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5316 <start>\r
5317   <element name="foo">\r
5318     <attribute name="bar">\r
5319       <choice>\r
5320         <element name="baz">\r
5321           <empty/>\r
5322         </element>\r
5323         <text/>\r
5324       </choice>\r
5325     </attribute>\r
5326   </element>\r
5327 </start>\r
5328 </grammar>\r
5329 </incorrect>\r
5330 </testCase>\r
5331 <testCase>\r
5332 <section>7.1.1</section>\r
5333 <incorrect>\r
5334 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5335 <start>\r
5336   <element name="foo">\r
5337     <attribute name="bar">\r
5338       <attribute name="baz"/>\r
5339     </attribute>\r
5340   </element>\r
5341 </start>\r
5342 </grammar>\r
5343 </incorrect>\r
5344 </testCase>\r
5345 <testCase>\r
5346 <section>7.1.1</section>\r
5347 <incorrect>\r
5348 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5349 <start>\r
5350   <element name="foo">\r
5351     <attribute name="bar">\r
5352       <choice>\r
5353         <attribute name="baz"/>\r
5354         <text/>\r
5355       </choice>\r
5356     </attribute>\r
5357   </element>\r
5358 </start>\r
5359 </grammar>\r
5360 </incorrect>\r
5361 </testCase>\r
5362 <testCase>\r
5363 <section>7.1.2</section>\r
5364 <incorrect>\r
5365 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5366 <start>\r
5367   <element name="foo">\r
5368     <oneOrMore>\r
5369       <group>\r
5370         <attribute name="bar"/>\r
5371         <attribute name="baz"/>\r
5372       </group>\r
5373     </oneOrMore>\r
5374   </element>\r
5375 </start>\r
5376 </grammar>\r
5377 </incorrect>\r
5378 </testCase>\r
5379 <testCase>\r
5380 <section>7.1.2</section>\r
5381 <incorrect>\r
5382 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5383 <start>\r
5384   <element name="foo">\r
5385     <oneOrMore>\r
5386       <group>\r
5387         <attribute>\r
5388           <anyName/>\r
5389         </attribute>\r
5390         <attribute>\r
5391           <anyName/>\r
5392         </attribute>\r
5393       </group>\r
5394     </oneOrMore>\r
5395   </element>\r
5396 </start>\r
5397 </grammar>\r
5398 </incorrect>\r
5399 </testCase>\r
5400 <testCase>\r
5401 <section>7.1.2</section>\r
5402 <incorrect>\r
5403 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5404 <start>\r
5405   <element name="foo">\r
5406     <oneOrMore>\r
5407       <choice>\r
5408         <group>\r
5409           <choice>\r
5410             <attribute name="bar"/>\r
5411             <attribute name="baz"/>\r
5412           </choice>\r
5413           <choice>\r
5414             <attribute name="bar"/>\r
5415             <attribute name="baz"/>\r
5416           </choice>\r
5417         </group>\r
5418         <attribute name="bar"/>\r
5419       </choice>\r
5420     </oneOrMore>\r
5421   </element>\r
5422 </start>\r
5423 </grammar>\r
5424 </incorrect>\r
5425 </testCase>\r
5426 <testCase>\r
5427 <section>7.1.2</section>\r
5428 <incorrect>\r
5429 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5430 <start>\r
5431   <element name="foo">\r
5432     <oneOrMore>\r
5433       <interleave>\r
5434         <attribute name="bar"/>\r
5435         <attribute name="baz"/>\r
5436       </interleave>\r
5437     </oneOrMore>\r
5438   </element>\r
5439 </start>\r
5440 </grammar>\r
5441 </incorrect>\r
5442 </testCase>\r
5443 <testCase>\r
5444 <section>7.1.2</section>\r
5445 <incorrect>\r
5446 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5447 <start>\r
5448   <element name="foo">\r
5449     <oneOrMore>\r
5450       <interleave>\r
5451         <attribute>\r
5452           <anyName/>\r
5453         </attribute>\r
5454         <attribute>\r
5455           <anyName/>\r
5456         </attribute>\r
5457       </interleave>\r
5458     </oneOrMore>\r
5459   </element>\r
5460 </start>\r
5461 </grammar>\r
5462 </incorrect>\r
5463 </testCase>\r
5464 <testCase>\r
5465 <section>7.1.2</section>\r
5466 <incorrect>\r
5467 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5468 <start>\r
5469   <element name="foo">\r
5470     <oneOrMore>\r
5471       <choice>\r
5472         <interleave>\r
5473           <choice>\r
5474             <attribute name="bar"/>\r
5475             <attribute name="baz"/>\r
5476           </choice>\r
5477           <choice>\r
5478             <attribute name="bar"/>\r
5479             <attribute name="baz"/>\r
5480           </choice>\r
5481         </interleave>\r
5482         <attribute name="bar"/>\r
5483       </choice>\r
5484     </oneOrMore>\r
5485   </element>\r
5486 </start>\r
5487 </grammar>\r
5488 </incorrect>\r
5489 </testCase>\r
5490 <testCase>\r
5491 <section>7.1.3</section>\r
5492 <incorrect>\r
5493 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5494 <start>\r
5495   <element name="foo">\r
5496     <list>\r
5497       <list>\r
5498         <data type="token"/>\r
5499       </list>\r
5500     </list>\r
5501   </element>\r
5502 </start>\r
5503 </grammar>\r
5504 </incorrect>\r
5505 </testCase>\r
5506 <testCase>\r
5507 <section>7.1.3</section>\r
5508 <incorrect>\r
5509 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5510 <start>\r
5511   <element name="foo">\r
5512     <list>\r
5513       <choice>\r
5514         <list>\r
5515           <data type="token"/>\r
5516         </list>\r
5517         <data type="token"/>\r
5518       </choice>\r
5519     </list>\r
5520   </element>\r
5521 </start>\r
5522 </grammar>\r
5523 </incorrect>\r
5524 </testCase>\r
5525 <testCase>\r
5526 <section>7.1.3</section>\r
5527 <incorrect>\r
5528 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5529 <start>\r
5530   <element name="foo">\r
5531     <list>\r
5532       <element name="bar">\r
5533         <empty/>\r
5534       </element>\r
5535     </list>\r
5536   </element>\r
5537 </start>\r
5538 </grammar>\r
5539 </incorrect>\r
5540 </testCase>\r
5541 <testCase>\r
5542 <section>7.1.3</section>\r
5543 <incorrect>\r
5544 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5545 <start>\r
5546   <element name="foo">\r
5547     <list>\r
5548       <choice>\r
5549         <data type="token"/>\r
5550         <element name="bar">\r
5551           <empty/>\r
5552         </element>\r
5553       </choice>\r
5554     </list>\r
5555   </element>\r
5556 </start>\r
5557 </grammar>\r
5558 </incorrect>\r
5559 </testCase>\r
5560 <testCase>\r
5561 <section>7.1.3</section>\r
5562 <incorrect>\r
5563 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5564 <start>\r
5565   <element name="foo">\r
5566     <list>\r
5567       <attribute name="bar">\r
5568         <empty/>\r
5569       </attribute>\r
5570     </list>\r
5571   </element>\r
5572 </start>\r
5573 </grammar>\r
5574 </incorrect>\r
5575 </testCase>\r
5576 <testCase>\r
5577 <section>7.1.3</section>\r
5578 <incorrect>\r
5579 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5580 <start>\r
5581   <element name="foo">\r
5582     <list>\r
5583       <choice>\r
5584         <attribute name="bar">\r
5585           <empty/>\r
5586         </attribute>\r
5587         <data type="token"/>\r
5588       </choice>\r
5589     </list>\r
5590   </element>\r
5591 </start>\r
5592 </grammar>\r
5593 </incorrect>\r
5594 </testCase>\r
5595 <testCase>\r
5596 <section>7.1.3</section>\r
5597 <incorrect>\r
5598 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5599 <start>\r
5600   <element name="foo">\r
5601     <list>\r
5602       <choice>\r
5603         <text/>\r
5604         <data type="token"/>\r
5605       </choice>\r
5606     </list>\r
5607   </element>\r
5608 </start>\r
5609 </grammar>\r
5610 </incorrect>\r
5611 </testCase>\r
5612 <testCase>\r
5613 <section>7.1.3</section>\r
5614 <incorrect>\r
5615 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5616 <start>\r
5617   <element name="foo">\r
5618     <list>\r
5619       <interleave>\r
5620         <value>x</value>\r
5621         <value>y</value>\r
5622       </interleave>\r
5623     </list>\r
5624   </element>\r
5625 </start>\r
5626 </grammar>\r
5627 </incorrect>\r
5628 </testCase>\r
5629 <testCase>\r
5630 <section>7.1.3</section>\r
5631 <incorrect>\r
5632 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5633 <start>\r
5634   <element name="foo">\r
5635     <list>\r
5636       <choice>\r
5637         <interleave>\r
5638           <value>x</value>\r
5639           <value>y</value>\r
5640         </interleave>\r
5641         <value>z</value>\r
5642       </choice>\r
5643     </list>\r
5644   </element>\r
5645 </start>\r
5646 </grammar>\r
5647 </incorrect>\r
5648 </testCase>\r
5649 <testCase>\r
5650 <section>7.1.4</section>\r
5651 <incorrect>\r
5652 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5653 <start>\r
5654   <element name="foo">\r
5655     <data type="string">\r
5656       <except>\r
5657         <attribute name="bar"/>\r
5658       </except>\r
5659     </data>\r
5660   </element>\r
5661 </start>\r
5662 </grammar>\r
5663 </incorrect>\r
5664 </testCase>\r
5665 <testCase>\r
5666 <section>7.1.4</section>\r
5667 <incorrect>\r
5668 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5669 <start>\r
5670   <element name="foo">\r
5671     <data type="string">\r
5672       <except>\r
5673         <element name="bar">\r
5674           <empty/>\r
5675         </element>\r
5676       </except>\r
5677     </data>\r
5678   </element>\r
5679 </start>\r
5680 </grammar>\r
5681 </incorrect>\r
5682 </testCase>\r
5683 <testCase>\r
5684 <section>7.1.4</section>\r
5685 <incorrect>\r
5686 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5687 <start>\r
5688   <element name="foo">\r
5689     <data type="string">\r
5690       <except>\r
5691         <text/>\r
5692       </except>\r
5693     </data>\r
5694   </element>\r
5695 </start>\r
5696 </grammar>\r
5697 </incorrect>\r
5698 </testCase>\r
5699 <testCase>\r
5700 <section>7.1.4</section>\r
5701 <incorrect>\r
5702 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5703 <start>\r
5704   <element name="foo">\r
5705     <data type="string">\r
5706       <except>\r
5707         <list>\r
5708           <data type="token"/>\r
5709         </list>\r
5710       </except>\r
5711     </data>\r
5712   </element>\r
5713 </start>\r
5714 </grammar>\r
5715 </incorrect>\r
5716 </testCase>\r
5717 <testCase>\r
5718 <section>7.1.4</section>\r
5719 <incorrect>\r
5720 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5721 <start>\r
5722   <element name="foo">\r
5723     <data type="string">\r
5724       <except>\r
5725         <group>\r
5726           <data type="token"/>\r
5727           <data type="token"/>\r
5728         </group>\r
5729       </except>\r
5730     </data>\r
5731   </element>\r
5732 </start>\r
5733 </grammar>\r
5734 </incorrect>\r
5735 </testCase>\r
5736 <testCase>\r
5737 <section>7.1.4</section>\r
5738 <incorrect>\r
5739 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5740 <start>\r
5741   <element name="foo">\r
5742     <data type="string">\r
5743       <except>\r
5744         <interleave>\r
5745           <data type="token"/>\r
5746           <data type="token"/>\r
5747         </interleave>\r
5748       </except>\r
5749     </data>\r
5750   </element>\r
5751 </start>\r
5752 </grammar>\r
5753 </incorrect>\r
5754 </testCase>\r
5755 <testCase>\r
5756 <section>7.1.4</section>\r
5757 <incorrect>\r
5758 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5759 <start>\r
5760   <element name="foo">\r
5761     <data type="string">\r
5762       <except>\r
5763         <oneOrMore>\r
5764           <data type="token"/>\r
5765         </oneOrMore>\r
5766       </except>\r
5767     </data>\r
5768   </element>\r
5769 </start>\r
5770 </grammar>\r
5771 </incorrect>\r
5772 </testCase>\r
5773 <testCase>\r
5774 <section>7.1.4</section>\r
5775 <incorrect>\r
5776 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5777 <start>\r
5778   <element name="foo">\r
5779     <data type="string">\r
5780       <except>\r
5781         <empty/>\r
5782       </except>\r
5783     </data>\r
5784   </element>\r
5785 </start>\r
5786 </grammar>\r
5787 </incorrect>\r
5788 </testCase>\r
5789 <testCase>\r
5790 <section>7.1.5</section>\r
5791 <incorrect>\r
5792 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5793 <start>\r
5794   <attribute name="foo"/>\r
5795 </start>\r
5796 </grammar>\r
5797 </incorrect>\r
5798 </testCase>\r
5799 <testCase>\r
5800 <section>7.1.5</section>\r
5801 <incorrect>\r
5802 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5803 <start>\r
5804   <data type="string"/>\r
5805 </start>\r
5806 </grammar>\r
5807 </incorrect>\r
5808 </testCase>\r
5809 <testCase>\r
5810 <section>7.1.5</section>\r
5811 <incorrect>\r
5812 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5813 <start>\r
5814   <choice>\r
5815     <data type="string"/>\r
5816     <element name="foo">\r
5817       <empty/>\r
5818     </element>\r
5819   </choice>\r
5820 </start>\r
5821 </grammar>\r
5822 </incorrect>\r
5823 </testCase>\r
5824 <testCase>\r
5825 <section>7.1.5</section>\r
5826 <incorrect>\r
5827 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5828 <start>\r
5829   <choice>\r
5830     <value>foo</value>\r
5831     <element name="foo">\r
5832       <empty/>\r
5833     </element>\r
5834   </choice>\r
5835 </start>\r
5836 </grammar>\r
5837 </incorrect>\r
5838 </testCase>\r
5839 <testCase>\r
5840 <section>7.1.5</section>\r
5841 <incorrect>\r
5842 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5843 <start>\r
5844   <text/>\r
5845 </start>\r
5846 </grammar>\r
5847 </incorrect>\r
5848 </testCase>\r
5849 <testCase>\r
5850 <section>7.1.5</section>\r
5851 <incorrect>\r
5852 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5853 <start>\r
5854   <choice>\r
5855     <text/>\r
5856     <element name="foo">\r
5857       <empty/>\r
5858     </element>\r
5859   </choice>\r
5860 </start>\r
5861 </grammar>\r
5862 </incorrect>\r
5863 </testCase>\r
5864 <testCase>\r
5865 <section>7.1.5</section>\r
5866 <incorrect>\r
5867 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5868 <start>\r
5869   <list>\r
5870     <data type="token"/>\r
5871   </list>\r
5872 </start>\r
5873 </grammar>\r
5874 </incorrect>\r
5875 </testCase>\r
5876 <testCase>\r
5877 <section>7.1.5</section>\r
5878 <incorrect>\r
5879 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5880 <start>\r
5881   <choice>\r
5882     <element name="foo">\r
5883       <empty/>\r
5884     </element>\r
5885     <list>\r
5886       <data type="token"/>\r
5887     </list>\r
5888   </choice>\r
5889 </start>\r
5890 </grammar>\r
5891 </incorrect>\r
5892 </testCase>\r
5893 <testCase>\r
5894 <section>7.1.5</section>\r
5895 <incorrect>\r
5896 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5897 <start>\r
5898   <group>\r
5899     <element name="foo">\r
5900       <empty/>\r
5901     </element>\r
5902     <element name="foo">\r
5903       <empty/>\r
5904     </element>\r
5905   </group>\r
5906 </start>\r
5907 </grammar>\r
5908 </incorrect>\r
5909 </testCase>\r
5910 <testCase>\r
5911 <section>7.1.5</section>\r
5912 <incorrect>\r
5913 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5914 <start>\r
5915   <choice>\r
5916     <element name="foo">\r
5917       <empty/>\r
5918     </element>\r
5919     <group>\r
5920       <element name="foo">\r
5921         <empty/>\r
5922       </element>\r
5923       <element name="foo">\r
5924         <empty/>\r
5925       </element>\r
5926     </group>\r
5927   </choice>\r
5928 </start>\r
5929 </grammar>\r
5930 </incorrect>\r
5931 </testCase>\r
5932 <testCase>\r
5933 <section>7.1.5</section>\r
5934 <incorrect>\r
5935 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5936 <start>\r
5937   <interleave>\r
5938     <element name="foo">\r
5939       <empty/>\r
5940     </element>\r
5941     <element name="foo">\r
5942       <empty/>\r
5943     </element>\r
5944   </interleave>\r
5945 </start>\r
5946 </grammar>\r
5947 </incorrect>\r
5948 </testCase>\r
5949 <testCase>\r
5950 <section>7.1.5</section>\r
5951 <incorrect>\r
5952 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5953 <start>\r
5954   <choice>\r
5955     <element name="foo">\r
5956       <empty/>\r
5957     </element>\r
5958     <interleave>\r
5959       <element name="foo">\r
5960         <empty/>\r
5961       </element>\r
5962       <element name="foo">\r
5963         <empty/>\r
5964       </element>\r
5965     </interleave>\r
5966   </choice>\r
5967 </start>\r
5968 </grammar>\r
5969 </incorrect>\r
5970 </testCase>\r
5971 <testCase>\r
5972 <section>7.1.5</section>\r
5973 <incorrect>\r
5974 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5975 <start>\r
5976   <oneOrMore>\r
5977     <element name="foo">\r
5978       <empty/>\r
5979     </element>\r
5980   </oneOrMore>\r
5981 </start>\r
5982 </grammar>\r
5983 </incorrect>\r
5984 </testCase>\r
5985 <testCase>\r
5986 <section>7.1.5</section>\r
5987 <incorrect>\r
5988 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
5989 <start>\r
5990   <choice>\r
5991     <oneOrMore>\r
5992       <element name="foo">\r
5993         <empty/>\r
5994       </element>\r
5995     </oneOrMore>\r
5996     <element name="foo">\r
5997       <empty/>\r
5998     </element>\r
5999   </choice>\r
6000 </start>\r
6001 </grammar>\r
6002 </incorrect>\r
6003 </testCase>\r
6004 <testCase>\r
6005 <section>7.1.5</section>\r
6006 <incorrect>\r
6007 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
6008 <start>\r
6009   <empty/>\r
6010 </start>\r
6011 </grammar>\r
6012 </incorrect>\r
6013 </testCase>\r
6014 <testCase>\r
6015 <section>7.1.5</section>\r
6016 <incorrect>\r
6017 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
6018 <start>\r
6019   <choice>\r
6020     <element name="foo">\r
6021       <empty/>\r
6022     </element>\r
6023     <empty/>\r
6024   </choice>\r
6025 </start>\r
6026 </grammar>\r
6027 </incorrect>\r
6028 </testCase>\r
6029 <testCase>\r
6030 <section>7.1.5</section>\r
6031 <section>7</section>\r
6032 <section>4.18</section>\r
6033 <documentation>Tests that constraints are post-normalization</documentation>\r
6034 <correct>\r
6035 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
6036   <grammar>\r
6037     <start>\r
6038       <text/>\r
6039     </start>\r
6040   </grammar>\r
6041 </element>\r
6042 </correct>\r
6043 <valid>\r
6044 <foo>text</foo>\r
6045 </valid>\r
6046 </testCase>\r
6047 <testCase>\r
6048 <section>7.1.5</section>\r
6049 <section>7</section>\r
6050 <section>4.18</section>\r
6051 <incorrect>\r
6052 <text xmlns="http://relaxng.org/ns/structure/1.0"/>\r
6053 </incorrect>\r
6054 </testCase>\r
6055 <testCase>\r
6056 <section>7.1.1</section>\r
6057 <section>7</section>\r
6058 <section>4.20</section>\r
6059 <correct>\r
6060 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
6061   <optional>\r
6062     <attribute name="bar">\r
6063       <group>\r
6064         <notAllowed/>\r
6065         <attribute name="baz"/>\r
6066       </group>\r
6067     </attribute>\r
6068   </optional>\r
6069 </element>\r
6070 </correct>\r
6071 <valid>\r
6072 <foo/>\r
6073 </valid>\r
6074 </testCase>\r
6075 <testCase>\r
6076 <section>7.1.1</section>\r
6077 <section>7</section>\r
6078 <section>4.20</section>\r
6079 <documentation>The nested attribute element is normalized out because\r
6080 of the not allowed.</documentation>\r
6081 <correct>\r
6082 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
6083   <attribute name="bar">\r
6084     <choice>\r
6085       <text/>\r
6086       <group>\r
6087         <notAllowed/>\r
6088         <attribute name="baz"/>\r
6089       </group>\r
6090     </choice>\r
6091   </attribute>\r
6092 </element>\r
6093 </correct>\r
6094 <valid>\r
6095 <foo bar="baz"/>\r
6096 </valid>\r
6097 </testCase>\r
6098 <testCase>\r
6099 <section>7.1.2</section>\r
6100 <section>7</section>\r
6101 <section>4.12</section>\r
6102 <documentation>The group element is normalized out.</documentation>\r
6103 <correct>\r
6104 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
6105 <start>\r
6106   <element name="foo">\r
6107     <oneOrMore>\r
6108       <group>\r
6109         <attribute>\r
6110           <anyName/>\r
6111         </attribute>\r
6112       </group>\r
6113     </oneOrMore>\r
6114   </element>\r
6115 </start>\r
6116 </grammar>\r
6117 </correct>\r
6118 <valid>\r
6119 <foo xyzzy1="val1" xyzzy2="val2"/>\r
6120 </valid>\r
6121 </testCase>\r
6122 <testCase>\r
6123 <section>7.1.2</section>\r
6124 <section>7</section>\r
6125 <section>4.21</section>\r
6126 <documentation>The group element is normalized out.</documentation>\r
6127 <correct>\r
6128 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
6129 <start>\r
6130   <element name="foo">\r
6131     <oneOrMore>\r
6132       <group>\r
6133         <attribute>\r
6134           <anyName/>\r
6135         </attribute>\r
6136         <empty/>\r
6137       </group>\r
6138     </oneOrMore>\r
6139   </element>\r
6140 </start>\r
6141 </grammar>\r
6142 </correct>\r
6143 <valid>\r
6144 <foo xyzzy1="val1" xyzzy2="val2"/>\r
6145 </valid>\r
6146 </testCase>\r
6147 <testCase>\r
6148 <section>7.1.2</section>\r
6149 <section>7</section>\r
6150 <section>4.20</section>\r
6151 <documentation>The attribute elements are all normalized out.</documentation>\r
6152 <correct>\r
6153 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">\r
6154   <optional>\r
6155     <attribute name="a1">\r
6156       <attribute name="a2">\r
6157         <attribute name="a3">\r
6158           <notAllowed/>\r
6159         </attribute>\r
6160       </attribute>\r
6161     </attribute>\r
6162   </optional>\r
6163 </element>\r
6164 </correct>\r
6165 <valid>\r
6166 <foo/>\r
6167 </valid>\r
6168 </testCase>\r
6169 </testSuite>\r
6170 <testSuite>\r
6171 <section>7.2</section>\r
6172 <testCase>\r
6173 <section>7.2</section>\r
6174 <incorrect>\r
6175 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
6176   <start>\r
6177     <element name="foo">\r
6178       <group>\r
6179         <data type="token"/>\r
6180         <data type="token"/>\r
6181       </group>\r
6182     </element>\r
6183   </start>\r
6184 </grammar>\r
6185 </incorrect>\r
6186 </testCase>\r
6187 <testCase>\r
6188 <documentation>Checks that normalization of notAllowed happens\r
6189 before string sequence checking.</documentation>\r
6190 <section>7.2</section>\r
6191 <section>4.20</section>\r
6192 <correct>\r
6193 <choice xmlns="http://relaxng.org/ns/structure/1.0">\r
6194   <element name="foo">\r
6195     <empty/>\r
6196   </element>\r
6197   <group>\r
6198     <notAllowed/>\r
6199     <element name="bar">\r
6200       <group>\r
6201         <data type="token"/>\r
6202         <data type="token"/>\r
6203       </group>\r
6204     </element>\r
6205   </group>\r
6206 </choice>\r
6207 </correct>\r
6208 <valid>\r
6209 <foo/>\r
6210 </valid>\r
6211 </testCase>\r
6212 <testCase>\r
6213 <section>4.20</section>\r
6214 <section>7.2</section>\r
6215 <documentation>notAllowed in an element is not normalized</documentation>\r
6216 <incorrect>\r
6217 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6218   <choice>\r
6219     <group>\r
6220       <element name="bar">\r
6221         <notAllowed/>\r
6222       </element>\r
6223       <data type="token"/>\r
6224       <data type="token"/>\r
6225     </group>\r
6226     <element name="baz">\r
6227       <empty/>\r
6228     </element>\r
6229   </choice>\r
6230 </element>\r
6231 </incorrect>\r
6232 </testCase>\r
6233 </testSuite>\r
6234 <testSuite>\r
6235 <section>7.3</section>\r
6236 <testCase>\r
6237 <section>7.3</section>\r
6238 <incorrect>\r
6239 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6240   <attribute name="bar"/>\r
6241   <attribute name="bar"/>\r
6242 </element>\r
6243 </incorrect>\r
6244 </testCase>\r
6245 <testCase>\r
6246 <section>7.3</section>\r
6247 <incorrect>\r
6248 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6249   <attribute name="bar"/>\r
6250   <zeroOrMore>\r
6251     <attribute name="bar"/>\r
6252   </zeroOrMore>\r
6253 </element>\r
6254 </incorrect>\r
6255 </testCase>\r
6256 <testCase>\r
6257 <section>7.3</section>\r
6258 <correct>\r
6259 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6260   <oneOrMore>\r
6261     <attribute name="bar"/>\r
6262   </oneOrMore>\r
6263 </element>\r
6264 </correct>\r
6265 <valid>\r
6266 <foo bar="xx"/>\r
6267 </valid>\r
6268 </testCase>\r
6269 <testCase>\r
6270 <section>7.3</section>\r
6271 <incorrect>\r
6272 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6273   <interleave>\r
6274     <attribute name="bar"/>\r
6275     <attribute name="bar"/>\r
6276   </interleave>\r
6277 </element>\r
6278 </incorrect>\r
6279 </testCase>\r
6280 <testCase>\r
6281 <section>7.3</section>\r
6282 <incorrect>\r
6283 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6284   <optional>\r
6285     <attribute name="bar"/>\r
6286   </optional>\r
6287   <optional>\r
6288     <attribute name="bar"/>\r
6289   </optional>\r
6290 </element>\r
6291 </incorrect>\r
6292 </testCase>\r
6293 <testCase>\r
6294 <section>7.3</section>\r
6295 <incorrect>\r
6296 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6297   <attribute name="bar"/>\r
6298   <oneOrMore>\r
6299     <attribute>\r
6300       <anyName/>\r
6301     </attribute>\r
6302   </oneOrMore>\r
6303 </element>\r
6304 </incorrect>\r
6305 </testCase>\r
6306 <testCase>\r
6307 <section>7.3</section>\r
6308 <incorrect>\r
6309 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6310   <attribute name="bar"/>\r
6311   <oneOrMore>\r
6312     <attribute>\r
6313       <anyName>\r
6314         <except>\r
6315           <name>baz</name>\r
6316         </except>\r
6317       </anyName>\r
6318     </attribute>\r
6319   </oneOrMore>\r
6320 </element>\r
6321 </incorrect>\r
6322 </testCase>\r
6323 <testCase>\r
6324 <section>7.3</section>\r
6325 <correct>\r
6326 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6327   <attribute name="bar"/>\r
6328   <oneOrMore>\r
6329     <attribute>\r
6330       <anyName>\r
6331         <except>\r
6332           <name>bar</name>\r
6333         </except>\r
6334       </anyName>\r
6335     </attribute>\r
6336   </oneOrMore>\r
6337 </element>\r
6338 </correct>\r
6339 <valid>\r
6340 <foo bar="val" xyzzy="anotherval"/>\r
6341 </valid>\r
6342 <valid>\r
6343 <foo bar="val" baz=""/>\r
6344 </valid>\r
6345 <invalid>\r
6346 <foo bar="val"/>\r
6347 </invalid>\r
6348 <invalid>\r
6349 <foo/>\r
6350 </invalid>\r
6351 <invalid>\r
6352 <foo xyzzy="val"/>\r
6353 </invalid>\r
6354 </testCase>\r
6355 <testCase>\r
6356 <section>7.3</section>\r
6357 <incorrect>\r
6358 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6359   <attribute name="bar"/>\r
6360   <oneOrMore>\r
6361     <attribute>\r
6362       <nsName ns=""/>\r
6363     </attribute>\r
6364   </oneOrMore>\r
6365 </element>\r
6366 </incorrect>\r
6367 </testCase>\r
6368 <testCase>\r
6369 <section>7.3</section>\r
6370 <incorrect>\r
6371 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6372   <attribute name="bar"/>\r
6373   <oneOrMore>\r
6374     <attribute>\r
6375       <nsName ns="">\r
6376         <except>\r
6377           <name>baz</name>\r
6378         </except>\r
6379        </nsName>\r
6380     </attribute>\r
6381   </oneOrMore>\r
6382 </element>\r
6383 </incorrect>\r
6384 </testCase>\r
6385 <testCase>\r
6386 <section>7.3</section>\r
6387 <incorrect>\r
6388 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6389   <oneOrMore>\r
6390     <attribute>\r
6391       <anyName/>\r
6392     </attribute>\r
6393   </oneOrMore>\r
6394   <oneOrMore>\r
6395     <attribute>\r
6396       <nsName ns=""/>\r
6397     </attribute>\r
6398   </oneOrMore>\r
6399 </element>\r
6400 </incorrect>\r
6401 </testCase>\r
6402 <testCase>\r
6403 <section>7.3</section>\r
6404 <incorrect>\r
6405 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6406   <oneOrMore>\r
6407     <attribute>\r
6408       <anyName/>\r
6409     </attribute>\r
6410   </oneOrMore>\r
6411   <oneOrMore>\r
6412     <attribute>\r
6413       <anyName/>\r
6414     </attribute>\r
6415   </oneOrMore>\r
6416 </element>\r
6417 </incorrect>\r
6418 </testCase>\r
6419 <testCase>\r
6420 <section>7.3</section>\r
6421 <incorrect>\r
6422 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6423   <oneOrMore>\r
6424     <attribute>\r
6425       <nsName ns=""/>\r
6426     </attribute>\r
6427   </oneOrMore>\r
6428   <oneOrMore>\r
6429     <attribute>\r
6430       <nsName ns="">\r
6431         <except>\r
6432           <name>bar</name>\r
6433         </except>\r
6434       </nsName>\r
6435     </attribute>\r
6436   </oneOrMore>\r
6437 </element>\r
6438 </incorrect>\r
6439 </testCase>\r
6440 <testCase>\r
6441 <section>7.3</section>\r
6442 <incorrect>\r
6443 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6444   <oneOrMore>\r
6445     <attribute>\r
6446       <anyName>\r
6447         <except>\r
6448           <nsName>\r
6449             <except>\r
6450               <name>foo</name>\r
6451             </except>\r
6452           </nsName>\r
6453         </except>\r
6454       </anyName>\r
6455     </attribute>\r
6456   </oneOrMore>\r
6457   <attribute name="foo"/>\r
6458 </element>\r
6459 </incorrect>\r
6460 </testCase>\r
6461 <testCase>\r
6462 <section>7.3</section>\r
6463 <incorrect>\r
6464 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6465   <oneOrMore>\r
6466     <attribute>\r
6467       <anyName>\r
6468         <except>\r
6469           <nsName>\r
6470             <except>\r
6471               <name>foo</name>\r
6472             </except>\r
6473           </nsName>\r
6474         </except>\r
6475       </anyName>\r
6476     </attribute>\r
6477   </oneOrMore>\r
6478   <oneOrMore>\r
6479     <attribute>\r
6480       <nsName/>\r
6481     </attribute>\r
6482   </oneOrMore>\r
6483 </element>\r
6484 </incorrect>\r
6485 </testCase>\r
6486 <testCase>\r
6487 <section>7.3</section>\r
6488 <correct>\r
6489 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6490   <oneOrMore>\r
6491     <attribute>\r
6492       <anyName>\r
6493         <except>\r
6494           <nsName>\r
6495             <except>\r
6496               <name>bar</name>\r
6497             </except>\r
6498           </nsName>\r
6499         </except>\r
6500       </anyName>\r
6501     </attribute>\r
6502   </oneOrMore>\r
6503   <attribute name="baz"/>\r
6504 </element>\r
6505 </correct>\r
6506 <valid>\r
6507 <foo bar="xx" baz="yy"/>\r
6508 </valid>\r
6509 <invalid>\r
6510 <foo x="xx" baz="yy"/>\r
6511 </invalid>\r
6512 <valid>\r
6513 <foo xmlns:eg="http://www.example.com/" eg:x="xx" baz="yy"/>\r
6514 </valid>\r
6515 </testCase>\r
6516 <testCase>\r
6517 <section>7.3</section>\r
6518 <correct>\r
6519 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6520   <oneOrMore>\r
6521     <attribute>\r
6522       <nsName ns="http://www.example.com/1"/>\r
6523     </attribute>\r
6524   </oneOrMore>\r
6525   <oneOrMore>\r
6526     <attribute>\r
6527       <nsName ns="http://www.example.com/2"/>\r
6528     </attribute>\r
6529   </oneOrMore>\r
6530 </element>\r
6531 </correct>\r
6532 <valid>\r
6533 <foo xmlns:eg1="http://www.example.com/1"\r
6534      xmlns:eg2="http://www.example.com/2"\r
6535      eg1:x="xx" eg2:y="yy"/>\r
6536 </valid>\r
6537 </testCase>\r
6538 <testCase>\r
6539 <section>7.3</section>\r
6540 <correct>\r
6541 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6542   <choice>\r
6543     <attribute name="bar"/>\r
6544     <attribute name="bar"/>\r
6545   </choice>\r
6546 </element>\r
6547 </correct>\r
6548 <valid>\r
6549 <foo bar="xx"/>\r
6550 </valid>\r
6551 </testCase>\r
6552 <testCase>\r
6553 <section>7.3</section>\r
6554 <incorrect>\r
6555 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6556   <attribute name="bar"/>\r
6557   <choice>\r
6558     <attribute name="baz"/>\r
6559     <attribute name="bar"/>\r
6560   </choice>\r
6561 </element>\r
6562 </incorrect>\r
6563 </testCase>\r
6564 <testCase>\r
6565 <section>7.3</section>\r
6566 <incorrect>\r
6567 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6568   <attribute><anyName/><text/></attribute>\r
6569 </element>\r
6570 </incorrect>\r
6571 </testCase>\r
6572 <testCase>\r
6573 <section>7.3</section>\r
6574 <incorrect>\r
6575 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6576   <attribute><nsName ns =""/><text/></attribute>\r
6577 </element>\r
6578 </incorrect>\r
6579 </testCase>\r
6580 <testCase>\r
6581 <section>7.3</section>\r
6582 <incorrect>\r
6583 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6584   <attribute><choice><nsName ns =""/><name>foo</name></choice><text/></attribute>\r
6585 </element>\r
6586 </incorrect>\r
6587 </testCase>\r
6588 </testSuite>\r
6589 <testSuite>\r
6590 <section>7.4</section>\r
6591 <testCase>\r
6592 <section>7.4</section>\r
6593 <incorrect>\r
6594 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6595   <interleave>\r
6596     <element name="bar">\r
6597       <empty/>\r
6598     </element>\r
6599     <element name="bar">\r
6600       <empty/>\r
6601     </element>\r
6602   </interleave>\r
6603 </element>\r
6604 </incorrect>\r
6605 </testCase>\r
6606 <testCase>\r
6607 <section>7.4</section>\r
6608 <incorrect>\r
6609 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6610   <interleave>\r
6611     <element name="bar">\r
6612       <empty/>\r
6613     </element>\r
6614     <interleave>\r
6615       <element name="baz">\r
6616         <empty/>\r
6617       </element>\r
6618       <element name="bar">\r
6619         <empty/>\r
6620       </element>\r
6621     </interleave>\r
6622   </interleave>\r
6623 </element>\r
6624 </incorrect>\r
6625 </testCase>\r
6626 <testCase>\r
6627 <section>7.4</section>\r
6628 <incorrect>\r
6629 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6630   <interleave>\r
6631     <element name="bar">\r
6632       <empty/>\r
6633     </element>\r
6634     <group>\r
6635       <element name="baz">\r
6636         <empty/>\r
6637       </element>\r
6638       <element name="bar">\r
6639         <empty/>\r
6640       </element>\r
6641     </group>\r
6642   </interleave>\r
6643 </element>\r
6644 </incorrect>\r
6645 </testCase>\r
6646 <testCase>\r
6647 <section>7.4</section>\r
6648 <incorrect>\r
6649 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6650   <interleave>\r
6651     <element name="bar">\r
6652       <empty/>\r
6653     </element>\r
6654     <group>\r
6655       <element name="baz">\r
6656         <empty/>\r
6657       </element>\r
6658       <interleave>\r
6659         <element name="baz">\r
6660           <empty/>\r
6661         </element>\r
6662         <element name="bar">\r
6663           <empty/>\r
6664         </element>\r
6665       </interleave>\r
6666     </group>\r
6667   </interleave>\r
6668 </element>\r
6669 </incorrect>\r
6670 </testCase>\r
6671 <testCase>\r
6672 <section>7.4</section>\r
6673 <incorrect>\r
6674 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6675   <interleave>\r
6676     <element name="bar">\r
6677       <empty/>\r
6678     </element>\r
6679     <optional>\r
6680       <element name="bar">\r
6681         <empty/>\r
6682       </element>\r
6683     </optional>\r
6684   </interleave>\r
6685 </element>\r
6686 </incorrect>\r
6687 </testCase>\r
6688 <testCase>\r
6689 <section>7.4</section>\r
6690 <incorrect>\r
6691 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6692   <interleave>\r
6693     <element name="bar">\r
6694       <empty/>\r
6695     </element>\r
6696     <element>\r
6697       <nsName ns=""/>\r
6698       <empty/>\r
6699     </element>\r
6700   </interleave>\r
6701 </element>\r
6702 </incorrect>\r
6703 </testCase>\r
6704 <testCase>\r
6705 <section>7.4</section>\r
6706 <incorrect>\r
6707 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6708   <interleave>\r
6709     <element name="bar">\r
6710       <empty/>\r
6711     </element>\r
6712     <element>\r
6713       <anyName/>\r
6714       <empty/>\r
6715     </element>\r
6716   </interleave>\r
6717 </element>\r
6718 </incorrect>\r
6719 </testCase>\r
6720 <testCase>\r
6721 <section>7.4</section>\r
6722 <incorrect>\r
6723 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6724   <interleave>\r
6725     <element name="bar">\r
6726       <empty/>\r
6727     </element>\r
6728     <element name="bar">\r
6729       <notAllowed/>\r
6730     </element>\r
6731   </interleave>\r
6732 </element>\r
6733 </incorrect>\r
6734 </testCase>\r
6735 <testCase>\r
6736 <section>7.4</section>\r
6737 <correct>\r
6738 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6739   <interleave>\r
6740     <element name="bar">\r
6741       <empty/>\r
6742     </element>\r
6743     <element>\r
6744       <anyName>\r
6745         <except>\r
6746           <name>bar</name>\r
6747         </except>\r
6748       </anyName>\r
6749       <empty/>\r
6750     </element>\r
6751   </interleave>\r
6752 </element>\r
6753 </correct>\r
6754 <valid>\r
6755 <foo><bar/><baz/></foo>\r
6756 </valid>\r
6757 </testCase>\r
6758 <testCase>\r
6759 <section>7.4</section>\r
6760 <correct>\r
6761 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6762   <interleave>\r
6763     <choice>\r
6764       <element name="bar">\r
6765         <empty/>\r
6766       </element>\r
6767       <element name="bar">\r
6768         <text/>\r
6769       </element>\r
6770     </choice>\r
6771     <element name="baz">\r
6772       <empty/>\r
6773     </element>\r
6774   </interleave>\r
6775 </element>\r
6776 </correct>\r
6777 <valid>\r
6778 <foo><bar/><baz/></foo>\r
6779 </valid>\r
6780 </testCase>\r
6781 <testCase>\r
6782 <section>7.4</section>\r
6783 <incorrect>\r
6784 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6785   <interleave>\r
6786     <text/>\r
6787     <text/>\r
6788   </interleave>\r
6789 </element>\r
6790 </incorrect>\r
6791 </testCase>\r
6792 <testCase>\r
6793 <section>7.4</section>\r
6794 <incorrect>\r
6795 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0">\r
6796   <mixed>\r
6797     <mixed>\r
6798       <element name="bar">\r
6799         <empty/>\r
6800       </element>\r
6801     </mixed>\r
6802     <element name="baz">\r
6803       <empty/>\r
6804     </element>\r
6805   </mixed>\r
6806 </element>\r
6807 </incorrect>\r
6808 </testCase>\r
6809 </testSuite>\r
6810 </testSuite>\r
6811 <testSuite>\r
6812 <documentation>Regressions</documentation>\r
6813 <testCase>\r
6814 <correct>\r
6815 <grammar xmlns="http://relaxng.org/ns/structure/1.0">\r
6816 <start>\r
6817   <element name="foo">\r
6818     <choice>\r
6819       <group>\r
6820         <attribute name="bar"><empty/></attribute>\r
6821         <element name="baz1"><empty/></element>\r
6822       </group>\r
6823       <group>\r
6824         <attribute name="bar"><text/></attribute>\r
6825         <element name="baz2"><empty/></element>\r
6826       </group>\r
6827     </choice>\r
6828   </element>\r
6829 </start>\r
6830 </grammar>\r
6831 </correct>\r
6832 <valid>\r
6833 <foo bar=" "><baz1/></foo>\r
6834 </valid>\r
6835 </testCase>\r
6836 <testCase>\r
6837 <correct>\r
6838 <notAllowed xmlns="http://relaxng.org/ns/structure/1.0"/>\r
6839 </correct>\r
6840 <invalid>\r
6841 <foo/>\r
6842 </invalid>\r
6843 </testCase>\r
6844 </testSuite>\r
6845 </testSuite>\r