1 <!DOCTYPE testSuite [ 2 <!ENTITY dii "<ดี/>"> 3 ]> 4 <testSuite> 5 <author>James Clark</author> 6 <email>jjc (a] jclark.com</email> 7 <documentation>For October 26 version of the spec.</documentation> 8 <testSuite> 9 <section>3</section> 10 <testSuite> 11 <documentation>Various possible syntax errors.</documentation> 12 <testCase> 13 <section>3</section> 14 <incorrect> 15 <thisIsJunk/> 16 </incorrect> 17 </testCase> 18 <testCase> 19 <section>3</section> 20 <incorrect> 21 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 22 <element name="foo"> 23 <empty/> 24 </element> 25 <start> 26 <element name="foo"> 27 <empty/> 28 </element> 29 </start> 30 </grammar> 31 </incorrect> 32 </testCase> 33 <testCase> 34 <section>3</section> 35 <incorrect> 36 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 37 <define name="bar"> 38 <text/> 39 </define> 40 <text/> 41 </element> 42 </incorrect> 43 </testCase> 44 <testCase> 45 <section>3</section> 46 <incorrect> 47 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 48 <name>foo</name> 49 <empty/> 50 </element> 51 </incorrect> 52 </testCase> 53 <testCase> 54 <section>3</section> 55 <incorrect> 56 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 57 <group> 58 <name>bar</name> 59 </group> 60 </element> 61 </incorrect> 62 </testCase> 63 <testCase> 64 <section>3</section> 65 <incorrect> 66 <element xmlns="http://relaxng.org/ns/structure/1.0"> 67 <anyName> 68 <except> 69 <name>foo</name> 70 </except> 71 <except> 72 <name>bar</name> 73 </except> 74 </anyName> 75 <empty/> 76 </element> 77 </incorrect> 78 </testCase> 79 <testCase> 80 <section>3</section> 81 <incorrect> 82 <element xmlns="http://relaxng.org/ns/structure/1.0"> 83 <nsName> 84 <except> 85 <name>foo</name> 86 </except> 87 <except> 88 <name>bar</name> 89 </except> 90 </nsName> 91 <empty/> 92 </element> 93 </incorrect> 94 </testCase> 95 <testCase> 96 <section>3</section> 97 <incorrect> 98 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 99 <data type="token"> 100 <except> 101 <value>foo</value> 102 </except> 103 <except> 104 <value>bar</value> 105 </except> 106 </data> 107 </element> 108 </incorrect> 109 </testCase> 110 <testCase> 111 <section>3</section> 112 <incorrect> 113 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 114 <empty name="bar"/> 115 </element> 116 </incorrect> 117 </testCase> 118 <testCase> 119 <section>3</section> 120 <incorrect> 121 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo" extra="bar"> 122 <empty/> 123 </element> 124 </incorrect> 125 </testCase> 126 <testCase> 127 <section>3</section> 128 <incorrect> 129 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 130 <empty> 131 <empty/> 132 </empty> 133 </element> 134 </incorrect> 135 </testCase> 136 <testCase> 137 <section>3</section> 138 <incorrect> 139 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 140 <text> 141 <empty/> 142 </text> 143 </element> 144 </incorrect> 145 </testCase> 146 <testCase> 147 <section>3</section> 148 <incorrect> 149 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 150 <choice> 151 <text/> 152 <notAllowed> 153 <empty/> 154 </notAllowed> 155 </choice> 156 </element> 157 </incorrect> 158 </testCase> 159 <testCase> 160 <section>3</section> 161 <incorrect> 162 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 163 <start> 164 <ref name="foo"> 165 <empty/> 166 </ref> 167 </start> 168 <define name="foo"> 169 <element name="foo"> 170 <empty/> 171 </element> 172 </define> 173 </grammar> 174 </incorrect> 175 </testCase> 176 <testCase> 177 <section>3</section> 178 <incorrect> 179 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 180 <start> 181 <grammar> 182 <start> 183 <parentRef name="foo"> 184 <empty/> 185 </parentRef> 186 </start> 187 </grammar> 188 </start> 189 <define name="foo"> 190 <element name="foo"> 191 <empty/> 192 </element> 193 </define> 194 </grammar> 195 </incorrect> 196 </testCase> 197 </testSuite> 198 <testSuite> 199 <documentation>Tests for obsolete syntax</documentation> 200 <testCase> 201 <section>3</section> 202 <incorrect> 203 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 204 <start name="foo"> 205 <element name="foo"> 206 <empty/> 207 </element> 208 </start> 209 </grammar> 210 </incorrect> 211 </testCase> 212 <testCase> 213 <section>3</section> 214 <incorrect> 215 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo" ns="http://www.example.com"> 216 <attribute name="bar" global="true"> 217 <text/> 218 </attribute> 219 </element> 220 </incorrect> 221 </testCase> 222 <testCase> 223 <section>3</section> 224 <incorrect> 225 <element xmlns="http://relaxng.org/ns/structure/1.0"> 226 <not> 227 <name>foo</name> 228 </not> 229 <empty/> 230 </element> 231 </incorrect> 232 </testCase> 233 <testCase> 234 <section>3</section> 235 <incorrect> 236 <element xmlns="http://relaxng.org/ns/structure/1.0"> 237 <difference> 238 <anyName/> 239 <name>foo</name> 240 </difference> 241 <empty/> 242 </element> 243 </incorrect> 244 </testCase> 245 <testCase> 246 <section>3</section> 247 <incorrect> 248 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 249 <data type="token" key="foo"/> 250 </element> 251 </incorrect> 252 </testCase> 253 <testCase> 254 <section>3</section> 255 <incorrect> 256 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 257 <data type="token" keyRef="foo"/> 258 </element> 259 </incorrect> 260 </testCase> 261 <testCase> 262 <section>3</section> 263 <incorrect> 264 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 265 <keyRef name="foo"> 266 <data type="token"/> 267 </keyRef> 268 </element> 269 </incorrect> 270 </testCase> 271 <testCase> 272 <section>3</section> 273 <incorrect> 274 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 275 <key name="foo"> 276 <data type="token"/> 277 </key> 278 </element> 279 </incorrect> 280 </testCase> 281 </testSuite> 282 <testSuite> 283 <documentation>Tests for missing attributes and child elements</documentation> 284 <testCase> 285 <section>3</section> 286 <incorrect> 287 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 288 </element> 289 </incorrect> 290 </testCase> 291 <testCase> 292 <section>3</section> 293 <incorrect> 294 <element xmlns="http://relaxng.org/ns/structure/1.0"> 295 <name>foo</name> 296 </element> 297 </incorrect> 298 </testCase> 299 <testCase> 300 <section>3</section> 301 <incorrect> 302 <element xmlns="http://relaxng.org/ns/structure/1.0"> 303 </element> 304 </incorrect> 305 </testCase> 306 <testCase> 307 <section>3</section> 308 <incorrect> 309 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 310 <attribute/> 311 </element> 312 </incorrect> 313 </testCase> 314 <testCase> 315 <section>3</section> 316 <incorrect> 317 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 318 <group/> 319 </element> 320 </incorrect> 321 </testCase> 322 <testCase> 323 <section>3</section> 324 <incorrect> 325 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 326 <interleave/> 327 </element> 328 </incorrect> 329 </testCase> 330 <testCase> 331 <section>3</section> 332 <incorrect> 333 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 334 <choice/> 335 </element> 336 </incorrect> 337 </testCase> 338 <testCase> 339 <section>3</section> 340 <incorrect> 341 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 342 <optional/> 343 </element> 344 </incorrect> 345 </testCase> 346 <testCase> 347 <section>3</section> 348 <incorrect> 349 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 350 <zeroOrMore/> 351 </element> 352 </incorrect> 353 </testCase> 354 <testCase> 355 <section>3</section> 356 <incorrect> 357 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 358 <oneOrMore/> 359 </element> 360 </incorrect> 361 </testCase> 362 <testCase> 363 <section>3</section> 364 <incorrect> 365 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 366 <list/> 367 </element> 368 </incorrect> 369 </testCase> 370 <testCase> 371 <section>3</section> 372 <incorrect> 373 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 374 <mixed/> 375 </element> 376 </incorrect> 377 </testCase> 378 <testCase> 379 <section>3</section> 380 <incorrect> 381 <element xmlns="http://relaxng.org/ns/structure/1.0"> 382 <choice/> 383 <empty/> 384 </element> 385 </incorrect> 386 </testCase> 387 <testCase> 388 <section>3</section> 389 <incorrect> 390 <element xmlns="http://relaxng.org/ns/structure/1.0"> 391 <anyName> 392 <except/> 393 </anyName> 394 <empty/> 395 </element> 396 </incorrect> 397 </testCase> 398 <testCase> 399 <section>3</section> 400 <incorrect> 401 <element xmlns="http://relaxng.org/ns/structure/1.0"> 402 <nsName ns=""> 403 <except/> 404 </nsName> 405 <empty/> 406 </element> 407 </incorrect> 408 </testCase> 409 <testCase> 410 <section>3</section> 411 <incorrect> 412 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 413 <data type="string"> 414 <except/> 415 </data> 416 </element> 417 </incorrect> 418 </testCase> 419 <testCase> 420 <section>3</section> 421 <incorrect> 422 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 423 <data/> 424 </element> 425 </incorrect> 426 </testCase> 427 <testCase> 428 <section>3</section> 429 <incorrect> 430 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 431 <data type="string"> 432 <param/> 433 </data> 434 </element> 435 </incorrect> 436 </testCase> 437 <testCase> 438 <section>3</section> 439 <incorrect> 440 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 441 <grammar> 442 <start/> 443 </grammar> 444 </element> 445 </incorrect> 446 </testCase> 447 <testCase> 448 <section>3</section> 449 <incorrect> 450 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 451 <start> 452 <element name="bar"> 453 <empty/> 454 </element> 455 </start> 456 <define name="baz"/> 457 </grammar> 458 </incorrect> 459 </testCase> 460 <testCase> 461 <section>3</section> 462 <incorrect> 463 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 464 <externalRef/> 465 </element> 466 </incorrect> 467 </testCase> 468 <testCase> 469 <section>3</section> 470 <incorrect> 471 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 472 <include/> 473 <start> 474 <element name="foo"> 475 <empty/> 476 </element> 477 </start> 478 </grammar> 479 </incorrect> 480 </testCase> 481 <testCase> 482 <section>3</section> 483 <incorrect> 484 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 485 <start> 486 <element name="foo"> 487 <empty/> 488 </element> 489 </start> 490 <define> 491 <element name="bar"> 492 <empty/> 493 </element> 494 </define> 495 </grammar> 496 </incorrect> 497 </testCase> 498 <testCase> 499 <section>3</section> 500 <incorrect> 501 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 502 <start> 503 <ref/> 504 </start> 505 <define name="foo"> 506 <element name="foo"> 507 <empty/> 508 </element> 509 </define> 510 </grammar> 511 </incorrect> 512 </testCase> 513 <testCase> 514 <section>3</section> 515 <incorrect> 516 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 517 <start> 518 <grammar> 519 <start> 520 <parentRef/> 521 </start> 522 </grammar> 523 </start> 524 <define name="foo"> 525 <element name="foo"> 526 <empty/> 527 </element> 528 </define> 529 </grammar> 530 </incorrect> 531 </testCase> 532 </testSuite> 533 <testSuite> 534 <documentation>Checking of ns attribute</documentation> 535 <testCase> 536 <section>3</section> 537 <correct> 538 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns=""> 539 <empty/> 540 </element> 541 </correct> 542 <valid> 543 <foo/> 544 </valid> 545 </testCase> 546 <testCase> 547 <section>3</section> 548 <documentation>No checking of ns attribute is performed</documentation> 549 <correct> 550 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="DAV:"> 551 <empty/> 552 </element> 553 </correct> 554 <valid> 555 <foo xmlns="DAV:"/> 556 </valid> 557 </testCase> 558 <testCase> 559 <section>3</section> 560 <documentation>No checking of ns attribute is performed</documentation> 561 <correct> 562 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="xyzzy"> 563 <empty/> 564 </element> 565 </correct> 566 </testCase> 567 <testCase> 568 <section>3</section> 569 <documentation>No checking of ns attribute is performed</documentation> 570 <correct> 571 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="bad_scheme://"> 572 <empty/> 573 </element> 574 </correct> 575 </testCase> 576 </testSuite> 577 <testSuite> 578 <documentation>Checking of datatypeLibrary attribute</documentation> 579 <testCase> 580 <section>3</section> 581 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation> 582 <incorrect> 583 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foo_bar:xyzzy"> 584 <empty/> 585 </element> 586 </incorrect> 587 </testCase> 588 <testCase> 589 <section>3</section> 590 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation> 591 <correct> 592 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foobar:xyzzy"> 593 <empty/> 594 </element> 595 </correct> 596 <valid> 597 <foo/> 598 </valid> 599 </testCase> 600 <testCase> 601 <section>3</section> 602 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation> 603 <correct> 604 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http:ok"> 605 <empty/> 606 </element> 607 </correct> 608 <valid> 609 <foo/> 610 </valid> 611 </testCase> 612 <testCase> 613 <section>3</section> 614 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation> 615 <incorrect> 616 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foo:"> 617 <empty/> 618 </element> 619 </incorrect> 620 </testCase> 621 <testCase> 622 <section>3</section> 623 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation> 624 <incorrect> 625 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.example.com/%"> 626 <empty/> 627 </element> 628 </incorrect> 629 </testCase> 630 <testCase> 631 <section>3</section> 632 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation> 633 <incorrect> 634 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.example.com/%xx"> 635 <empty/> 636 </element> 637 </incorrect> 638 </testCase> 639 <testCase> 640 <section>3</section> 641 <documentation>Value of datatypeLibrary attribute must conform to RFC 2396</documentation> 642 <correct> 643 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.example.com/%Aa"> 644 <empty/> 645 </element> 646 </correct> 647 <valid> 648 <foo/> 649 </valid> 650 </testCase> 651 <testCase> 652 <section>3</section> 653 <documentation>Value of datatypeLibrary attribute must not be relative</documentation> 654 <incorrect> 655 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy"> 656 <empty/> 657 </element> 658 </incorrect> 659 </testCase> 660 <testCase> 661 <section>3</section> 662 <documentation>Value of datatypeLibrary attribute must not be relative</documentation> 663 <incorrect> 664 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy#foo:bar"> 665 <empty/> 666 </element> 667 </incorrect> 668 </testCase> 669 <testCase> 670 <section>3</section> 671 <documentation>Value of datatypeLibrary attribute must not be relative</documentation> 672 <incorrect> 673 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy?foo:bar"> 674 <empty/> 675 </element> 676 </incorrect> 677 </testCase> 678 <testCase> 679 <section>3</section> 680 <documentation>Value of datatypeLibrary attribute must not be relative</documentation> 681 <incorrect> 682 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="xyzzy/foo:bar"> 683 <empty/> 684 </element> 685 </incorrect> 686 </testCase> 687 <testCase> 688 <section>3</section> 689 <correct> 690 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="foo:bar"> 691 <empty/> 692 </element> 693 </correct> 694 <valid> 695 <foo/> 696 </valid> 697 </testCase> 698 <testCase> 699 <section>3</section> 700 <correct> 701 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary=""> 702 <empty/> 703 </element> 704 </correct> 705 <valid> 706 <foo/> 707 </valid> 708 </testCase> 709 <testCase> 710 <section>3</section> 711 <correct> 712 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 713 <data datatypeLibrary="" type="string"/> 714 </element> 715 </correct> 716 <valid> 717 <foo>x</foo> 718 </valid> 719 </testCase> 720 <testCase> 721 <section>3</section> 722 <documentation>Value of datatypeLibrary attribute must not contain fragment identifier</documentation> 723 <incorrect> 724 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" 725 datatypeLibrary="http://www.example.com#xyzzy"> 726 <empty/> 727 </element> 728 </incorrect> 729 </testCase> 730 <testCase> 731 <section>3</section> 732 <documentation>Value of datatypeLibrary attribute must not contain fragment identifier</documentation> 733 <incorrect> 734 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" 735 datatypeLibrary="http://www.example.com#"> 736 <empty/> 737 </element> 738 </incorrect> 739 </testCase> 740 </testSuite> 741 <testSuite> 742 <documentation>Tests for QName and NCNames in schemas</documentation> 743 <testCase> 744 <section>3</section> 745 <correct> 746 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 747 <element name="ดี"> 748 <empty/> 749 </element> 750 </element> 751 </correct> 752 <valid> 753 <foo>&dii;</foo> 754 </valid> 755 </testCase> 756 <testCase> 757 <section>3</section> 758 <incorrect> 759 <element name="ี" xmlns="http://relaxng.org/ns/structure/1.0"> 760 <empty/> 761 </element> 762 </incorrect> 763 </testCase> 764 <testCase> 765 <section>3</section> 766 <incorrect> 767 <element name="" xmlns="http://relaxng.org/ns/structure/1.0"> 768 <empty/> 769 </element> 770 </incorrect> 771 </testCase> 772 <testCase> 773 <section>3</section> 774 <incorrect> 775 <element xmlns="http://relaxng.org/ns/structure/1.0"> 776 <name>ี</name> 777 <empty/> 778 </element> 779 </incorrect> 780 </testCase> 781 <testCase> 782 <section>3</section> 783 <incorrect> 784 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 785 <attribute name="ี"/> 786 <empty/> 787 </element> 788 </incorrect> 789 </testCase> 790 <testCase> 791 <section>3</section> 792 <incorrect> 793 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 794 <start> 795 <ref name="ี"/> 796 </start> 797 <define name="ี"> 798 <element name="foo"> 799 <empty/> 800 </element> 801 </define> 802 </grammar> 803 </incorrect> 804 </testCase> 805 <testCase> 806 <section>3</section> 807 <correct> 808 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 809 <start> 810 <ref name="ดี"/> 811 </start> 812 <define name="ดี"> 813 <element name="foo"> 814 <empty/> 815 </element> 816 </define> 817 </grammar> 818 </correct> 819 <valid> 820 <foo/> 821 </valid> 822 </testCase> 823 <testCase> 824 <section>3</section> 825 <incorrect> 826 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 827 <start> 828 <ref name=""/> 829 </start> 830 <define name=""> 831 <element name="foo"> 832 <empty/> 833 </element> 834 </define> 835 </grammar> 836 </incorrect> 837 </testCase> 838 <testCase> 839 <section>3</section> 840 <incorrect> 841 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 842 <start> 843 <ref name="x y"/> 844 </start> 845 <define name="x y"> 846 <element name="foo"> 847 <empty/> 848 </element> 849 </define> 850 </grammar> 851 </incorrect> 852 </testCase> 853 <testCase> 854 <section>3</section> 855 <incorrect> 856 <grammar xmlns="http://relaxng.org/ns/structure/1.0" 857 xmlns:x="http://www.example.com/x"> 858 <start> 859 <ref name="x:y"/> 860 </start> 861 <define name="x:y"> 862 <element name="foo"> 863 <empty/> 864 </element> 865 </define> 866 </grammar> 867 </incorrect> 868 </testCase> 869 <testCase> 870 <section>3</section> 871 <incorrect> 872 <element xmlns="http://relaxng.org/ns/structure/1.0" 873 xmlns:x="http://www.example.com/x" 874 name="x:ี"> 875 <empty/> 876 </element> 877 </incorrect> 878 </testCase> 879 <testCase> 880 <section>3</section> 881 <incorrect> 882 <element xmlns="http://relaxng.org/ns/structure/1.0" 883 xmlns:x="http://www.example.com/x" 884 name="x:y:z"> 885 <empty/> 886 </element> 887 </incorrect> 888 </testCase> 889 <testCase> 890 <section>3</section> 891 <incorrect> 892 <element xmlns="http://relaxng.org/ns/structure/1.0" 893 xmlns:x="http://www.example.com/x" 894 name="x:"> 895 <empty/> 896 </element> 897 </incorrect> 898 </testCase> 899 </testSuite> 900 <testSuite> 901 <documentation>Tests for elements that allow only a single pattern child.</documentation> 902 <testCase> 903 <section>3</section> 904 <incorrect> 905 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 906 <start> 907 <element name="foo"> 908 <empty/> 909 </element> 910 <empty/> 911 </start> 912 </grammar> 913 </incorrect> 914 </testCase> 915 <testCase> 916 <section>3</section> 917 <incorrect> 918 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 919 <attribute name="bar"> 920 <text/> 921 <empty/> 922 </attribute> 923 </element> 924 </incorrect> 925 </testCase> 926 <testCase> 927 <section>3</section> 928 <incorrect> 929 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 930 <attribute> 931 <name>bar</name> 932 <text/> 933 <empty/> 934 </attribute> 935 </element> 936 </incorrect> 937 </testCase> 938 </testSuite> 939 <testSuite> 940 <documentation>Tests for foreign element and attribute handling.</documentation> 941 <testCase> 942 <section>3</section> 943 <incorrect> 944 <r:element name="foo" xmlns:r="http://relaxng.org/ns/structure/1.0" r:a="val"> 945 <r:empty/> 946 </r:element> 947 </incorrect> 948 </testCase> 949 <testCase> 950 <section>3</section> 951 <incorrect> 952 <element xmlns="http://relaxng.org/ns/structure/1.0"> 953 <name>foo<eg:comment xmlns:eg="http://www.example.com"/></name> 954 <empty/> 955 </element> 956 </incorrect> 957 </testCase> 958 <testCase> 959 <section>3</section> 960 <incorrect> 961 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 962 <value>foo<eg:comment xmlns:eg="http://www.example.com"/></value> 963 </element> 964 </incorrect> 965 </testCase> 966 <testCase> 967 <section>3</section> 968 <correct> 969 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 970 <data type="string"><eg:comment xmlns:eg="http://www.example.com"/></data> 971 </element> 972 </correct> 973 <valid> 974 <foo>X</foo> 975 </valid> 976 </testCase> 977 <testCase> 978 <section>3</section> 979 <correct> 980 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 981 <empty> 982 <ext xmlns="http://www.example.com"> 983 <element xmlns="http://relaxng.org/ns/structure/1.0"/> 984 </ext> 985 </empty> 986 </element> 987 </correct> 988 <valid> 989 <foo/> 990 </valid> 991 </testCase> 992 <testCase> 993 <section>3</section> 994 <correct> 995 <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:eg="http://www.example.com"> 996 <eg:comment/> 997 <eg:comment/> 998 <start> 999 <eg:comment/> 1000 <element> 1001 <eg:comment/> 1002 <eg:comment/> 1003 <name>foo</name> 1004 <eg:comment/> 1005 <data type="string"/> 1006 <eg:comment/> 1007 <empty> 1008 <eg:comment/> 1009 <eg:comment/> 1010 </empty> 1011 <eg:comment/> 1012 <eg:comment/> 1013 </element> 1014 <eg:comment/> 1015 </start> 1016 <eg:comment/> 1017 </grammar> 1018 </correct> 1019 <valid> 1020 <foo>X</foo> 1021 </valid> 1022 </testCase> 1023 <testCase> 1024 <section>3</section> 1025 <correct> 1026 <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:eg="http://www.example.com" 1027 eg:comment=""> 1028 <start eg:comment=""> 1029 <element eg:comment=""> 1030 <name eg:comment="">foo</name> 1031 <data eg:comment="" type="string"/> 1032 <empty eg:comment=""/> 1033 </element> 1034 </start> 1035 </grammar> 1036 </correct> 1037 <valid> 1038 <foo>X</foo> 1039 </valid> 1040 </testCase> 1041 <testCase> 1042 <section>3</section> 1043 <correct> 1044 <rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns="http://www.example.com"> 1045 <comment/> 1046 <comment/> 1047 <rng:start> 1048 <comment/> 1049 <rng:element> 1050 <comment/> 1051 <comment/> 1052 <rng:name>foo</rng:name> 1053 <comment/> 1054 <rng:data type="string"/> 1055 <comment/> 1056 </rng:element> 1057 <comment/> 1058 </rng:start> 1059 <comment/> 1060 </rng:grammar> 1061 </correct> 1062 <valid> 1063 <foo>X</foo> 1064 </valid> 1065 </testCase> 1066 <testCase> 1067 <section>3</section> 1068 <correct> 1069 <rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0"> 1070 <comment/> 1071 <comment/> 1072 <rng:start> 1073 <comment/> 1074 <rng:element> 1075 <comment/> 1076 <comment/> 1077 <rng:name>foo</rng:name> 1078 <comment/> 1079 <rng:data type="string"/> 1080 <comment/> 1081 </rng:element> 1082 <comment/> 1083 </rng:start> 1084 <comment/> 1085 </rng:grammar> 1086 </correct> 1087 <valid> 1088 <foo>X</foo> 1089 </valid> 1090 </testCase> 1091 </testSuite> 1092 </testSuite> 1093 <testSuite> 1094 <section>4</section> 1095 <testSuite> 1096 <section>4.2</section> 1097 <testCase> 1098 <section>4.2</section> 1099 <correct> 1100 <element name="

 	foo

 	" xmlns="http://relaxng.org/ns/structure/1.0"> 1101 <attribute name="

 	bar

 	"/> 1102 </element> 1103 </correct> 1104 <valid> 1105 <foo bar=""/> 1106 </valid> 1107 </testCase> 1108 <testCase> 1109 <section>4.2</section> 1110 <correct> 1111 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 1112 <value type="

 	string

 	">bar</value> 1113 </element> 1114 </correct> 1115 <valid> 1116 <foo>bar</foo> 1117 </valid> 1118 <invalid> 1119 <foo>bar </foo> 1120 </invalid> 1121 </testCase> 1122 <testCase> 1123 <section>4.2</section> 1124 <correct> 1125 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 1126 <data type="

 	string

 	"/> 1127 </element> 1128 </correct> 1129 <valid> 1130 <foo>X</foo> 1131 </valid> 1132 </testCase> 1133 <testCase> 1134 <section>4.2</section> 1135 <correct> 1136 <element xmlns="http://relaxng.org/ns/structure/1.0"> 1137 <name>

 	foo

 	</name> 1138 <attribute><name>

 	bar

 	</name></attribute> 1139 </element> 1140 </correct> 1141 <valid> 1142 <foo bar=""/> 1143 </valid> 1144 </testCase> 1145 <testCase> 1146 <section>4.2</section> 1147 <correct> 1148 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1149 <start combine="

 	choice

 	"> 1150 <ref name="

 	x

 	"/> 1151 </start> 1152 <define name="x"> 1153 <ref name="y"/> 1154 </define> 1155 <define name="

 	y

 	"> 1156 <grammar> 1157 <start combine="

 	interleave

 	"> 1158 <parentRef name="

 	z

 	"/> 1159 </start> 1160 </grammar> 1161 </define> 1162 <define name="z"> 1163 <element name="foo"> 1164 <empty/> 1165 </element> 1166 </define> 1167 </grammar> 1168 </correct> 1169 <valid> 1170 <foo/> 1171 </valid> 1172 </testCase> 1173 </testSuite> 1174 <testCase> 1175 <section>4.4</section> 1176 <correct> 1177 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 1178 <value datatypeLibrary="http://www.example.com/this-does-not-exist">bar</value> 1179 </element> 1180 </correct> 1181 <valid> 1182 <foo>bar</foo> 1183 </valid> 1184 <valid> 1185 <foo> 1186 bar 1187 </foo> 1188 </valid> 1189 <valid> 1190 <foo> bar </foo> 1191 </valid> 1192 <invalid> 1193 <foo>baz</foo> 1194 </invalid> 1195 <invalid> 1196 <foo>ba r</foo> 1197 </invalid> 1198 </testCase> 1199 <testSuite> 1200 <section>4.5</section> 1201 <testCase> 1202 <section>4.5</section> 1203 <dir name="sub"> 1204 <resource name="x"> 1205 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 1206 <empty/> 1207 </element> 1208 </resource> 1209 </dir> 1210 <correct> 1211 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" 1212 xml:base="sub/y" href="x"/> 1213 </correct> 1214 <valid> 1215 <foo/> 1216 </valid> 1217 <invalid> 1218 <bar/> 1219 </invalid> 1220 </testCase> 1221 <testCase> 1222 <section>4.5</section> 1223 <resource name="x"> 1224 <element xmlns="http://relaxng.org/ns/structure/1.0" name="bar"> 1225 <empty/> 1226 </element> 1227 </resource> 1228 <dir name="sub1"> 1229 <resource name="x"> 1230 <element xmlns="http://relaxng.org/ns/structure/1.0" name="bar"> 1231 <empty/> 1232 </element> 1233 </resource> 1234 <dir name="sub3"> 1235 <resource name="x"> 1236 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 1237 <empty/> 1238 </element> 1239 </resource> 1240 </dir> 1241 </dir> 1242 <correct> 1243 <group xmlns="http://relaxng.org/ns/structure/1.0" xml:base="sub1/"> 1244 <group> 1245 <group xml:base="sub2"> 1246 <group> 1247 <group xml:base="sub3/y"> 1248 <externalRef href="x"/> 1249 </group> 1250 </group> 1251 </group> 1252 </group> 1253 </group> 1254 </correct> 1255 <valid> 1256 <foo/> 1257 </valid> 1258 <invalid> 1259 <bar/> 1260 </invalid> 1261 </testCase> 1262 <testCase> 1263 <section>4.5</section> 1264 <resource name="x"> 1265 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 1266 <empty/> 1267 </element> 1268 </resource> 1269 <incorrect> 1270 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x#foo"/> 1271 </incorrect> 1272 </testCase> 1273 </testSuite> 1274 <testSuite> 1275 <section>4.6</section> 1276 <testCase> 1277 <section>4.6</section> 1278 <resource name="x"> 1279 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 1280 <empty/> 1281 </element> 1282 </resource> 1283 <correct> 1284 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/> 1285 </correct> 1286 <valid> 1287 <foo/> 1288 </valid> 1289 <invalid> 1290 <bar/> 1291 </invalid> 1292 </testCase> 1293 <testCase> 1294 <section>4.6</section> 1295 <resource name="x"> 1296 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 1297 <empty/> 1298 </element> 1299 </resource> 1300 <correct> 1301 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x" ns="http://www.example.com"/> 1302 </correct> 1303 <valid> 1304 <foo xmlns="http://www.example.com"/> 1305 </valid> 1306 <invalid> 1307 <foo/> 1308 </invalid> 1309 </testCase> 1310 <testCase> 1311 <section>4.6</section> 1312 <resource name="x"> 1313 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/> 1314 </resource> 1315 <incorrect> 1316 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/> 1317 </incorrect> 1318 </testCase> 1319 <testCase> 1320 <section>4.6</section> 1321 <resource name="x"> 1322 <start xmlns="http://relaxng.org/ns/structure/1.0"> 1323 <element name="foo"> 1324 <empty/> 1325 </element> 1326 </start> 1327 </resource> 1328 <incorrect> 1329 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/> 1330 </incorrect> 1331 </testCase> 1332 <testCase> 1333 <section>4.6</section> 1334 <resource name="x"> 1335 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="y"/> 1336 </resource> 1337 <resource name="y"> 1338 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/> 1339 </resource> 1340 <incorrect> 1341 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="x"/> 1342 </incorrect> 1343 </testCase> 1344 <testCase> 1345 <section>4.6</section> 1346 <documentation>Same value of href before resolution, but not a loop.</documentation> 1347 <dir name="sub"> 1348 <resource name="x"> 1349 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="sub/x"/> 1350 </resource> 1351 <dir name="sub"> 1352 <resource name="x"> 1353 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 1354 <empty/> 1355 </element> 1356 </resource> 1357 </dir> 1358 </dir> 1359 <correct> 1360 <externalRef xmlns="http://relaxng.org/ns/structure/1.0" href="sub/x"/> 1361 </correct> 1362 <valid> 1363 <foo/> 1364 </valid> 1365 <invalid> 1366 <bar/> 1367 </invalid> 1368 </testCase> 1369 </testSuite> 1370 <testSuite> 1371 <section>4.7</section> 1372 <testCase> 1373 <section>4.7</section> 1374 <resource name="x"> 1375 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1376 <start> 1377 <element name="foo"> 1378 <empty/> 1379 </element> 1380 </start> 1381 </grammar> 1382 </resource> 1383 <correct> 1384 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1385 <include href="x"/> 1386 </grammar> 1387 </correct> 1388 <valid> 1389 <foo/> 1390 </valid> 1391 <invalid> 1392 <bar/> 1393 </invalid> 1394 </testCase> 1395 <testCase> 1396 <section>4.7</section> 1397 <resource name="x"> 1398 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1399 <start> 1400 <element name="foo"> 1401 <empty/> 1402 </element> 1403 </start> 1404 </grammar> 1405 </resource> 1406 <correct> 1407 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1408 <include href="x" ns="http://www.example.com"/> 1409 </grammar> 1410 </correct> 1411 <valid> 1412 <foo xmlns="http://www.example.com"/> 1413 </valid> 1414 <invalid> 1415 <foo/> 1416 </invalid> 1417 </testCase> 1418 <testCase> 1419 <section>4.7</section> 1420 <resource name="x"> 1421 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1422 <include href="y"/> 1423 </grammar> 1424 </resource> 1425 <resource name="y"> 1426 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1427 <start> 1428 <element name="foo"> 1429 <empty/> 1430 </element> 1431 </start> 1432 </grammar> 1433 </resource> 1434 <correct> 1435 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1436 <include href="x"/> 1437 </grammar> 1438 </correct> 1439 <valid> 1440 <foo/> 1441 </valid> 1442 <invalid> 1443 <bar/> 1444 </invalid> 1445 </testCase> 1446 <testCase> 1447 <section>4.7</section> 1448 <resource name="x"> 1449 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 1450 <empty/> 1451 </element> 1452 </resource> 1453 <incorrect> 1454 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1455 <include href="x"/> 1456 </grammar> 1457 </incorrect> 1458 </testCase> 1459 <testCase> 1460 <section>4.7</section> 1461 <resource name="x"> 1462 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1463 <include href="x"/> 1464 </grammar> 1465 </resource> 1466 <incorrect> 1467 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1468 <include href="x"/> 1469 </grammar> 1470 </incorrect> 1471 </testCase> 1472 <testCase> 1473 <section>4.7</section> 1474 <resource name="x"> 1475 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1476 <include href="y"/> 1477 </grammar> 1478 </resource> 1479 <resource name="y"> 1480 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1481 <include href="x"/> 1482 </grammar> 1483 </resource> 1484 <incorrect> 1485 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1486 <include href="x"/> 1487 </grammar> 1488 </incorrect> 1489 </testCase> 1490 <testCase> 1491 <section>4.7</section> 1492 <dir name="sub"> 1493 <resource name="x"> 1494 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1495 <include href="sub/x"/> 1496 </grammar> 1497 </resource> 1498 <dir name="sub"> 1499 <resource name="x"> 1500 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1501 <start> 1502 <element name="foo"> 1503 <empty/> 1504 </element> 1505 </start> 1506 </grammar> 1507 </resource> 1508 </dir> 1509 </dir> 1510 <correct> 1511 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1512 <include href="sub/x"/> 1513 </grammar> 1514 </correct> 1515 <valid> 1516 <foo/> 1517 </valid> 1518 <invalid> 1519 <bar/> 1520 </invalid> 1521 </testCase> 1522 <testCase> 1523 <section>4.7</section> 1524 <resource name="x"> 1525 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1526 <define name="foo"> 1527 <element name="foo"> 1528 <empty/> 1529 </element> 1530 </define> 1531 </grammar> 1532 </resource> 1533 <incorrect> 1534 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1535 <include href="x"> 1536 <start> 1537 <ref name="foo"/> 1538 </start> 1539 </include> 1540 </grammar> 1541 </incorrect> 1542 </testCase> 1543 <testCase> 1544 <section>4.7</section> 1545 <resource name="x"> 1546 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1547 <define name="foo"> 1548 <element name="foo"> 1549 <empty/> 1550 </element> 1551 </define> 1552 </grammar> 1553 </resource> 1554 <correct> 1555 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1556 <include href="x"/> 1557 <start> 1558 <ref name="foo"/> 1559 </start> 1560 </grammar> 1561 </correct> 1562 <valid><foo/></valid> 1563 <invalid><bar/></invalid> 1564 </testCase> 1565 <testCase> 1566 <section>4.7</section> 1567 <resource name="x"> 1568 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1569 <start> 1570 <ref name="foo"/> 1571 </start> 1572 </grammar> 1573 </resource> 1574 <incorrect> 1575 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1576 <include href="x"> 1577 <define name="foo"> 1578 <element name="foo"> 1579 <empty/> 1580 </element> 1581 </define> 1582 </include> 1583 </grammar> 1584 </incorrect> 1585 </testCase> 1586 <testCase> 1587 <section>4.7</section> 1588 <resource name="x"> 1589 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1590 <start> 1591 <ref name="foo"/> 1592 </start> 1593 </grammar> 1594 </resource> 1595 <correct> 1596 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1597 <include href="x"/> 1598 <define name="foo"> 1599 <element name="foo"> 1600 <empty/> 1601 </element> 1602 </define> 1603 </grammar> 1604 </correct> 1605 <valid><foo/></valid> 1606 <invalid><bar/></invalid> 1607 </testCase> 1608 <testCase> 1609 <section>4.7</section> 1610 <resource name="x"> 1611 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1612 <define name="foo" combine="choice"> 1613 <element name="foo3"> 1614 <empty/> 1615 </element> 1616 </define> 1617 </grammar> 1618 </resource> 1619 <correct> 1620 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1621 <start> 1622 <ref name="foo"/> 1623 </start> 1624 <include href="x"> 1625 <define name="foo" combine="choice"> 1626 <element name="foo1"> 1627 <empty/> 1628 </element> 1629 </define> 1630 </include> 1631 <define name="foo"> 1632 <element name="foo2"> 1633 <empty/> 1634 </element> 1635 </define> 1636 </grammar> 1637 </correct> 1638 <valid><foo1/></valid> 1639 <valid><foo2/></valid> 1640 <invalid><foo3/></invalid> 1641 </testCase> 1642 <testCase> 1643 <section>4.7</section> 1644 <resource name="level1.rng"> 1645 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1646 <include href="level2.rng"> 1647 <define name="foo"> 1648 <element name="bar"> 1649 <empty/> 1650 </element> 1651 </define> 1652 </include> 1653 </grammar> 1654 </resource> 1655 <resource name="level2.rng"> 1656 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1657 <define name="bar"> 1658 <element name="bar"> 1659 <empty/> 1660 </element> 1661 </define> 1662 </grammar> 1663 </resource> 1664 <incorrect> 1665 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1666 <start> 1667 <ref name="foo"/> 1668 </start> 1669 <include href="level1.rng"> 1670 <define name="foo"> 1671 <element name="foo"> 1672 <empty/> 1673 </element> 1674 </define> 1675 </include> 1676 </grammar> 1677 </incorrect> 1678 </testCase> 1679 </testSuite> 1680 <testSuite> 1681 <section>4.8</section> 1682 <testCase> 1683 <section>4.8</section> 1684 <correct> 1685 <element xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.example.com" name="foo"> 1686 <attribute name="bar" ns="http://www.example.com"/> 1687 </element> 1688 </correct> 1689 <valid> 1690 <eg:foo eg:bar="x" xmlns:eg="http://www.example.com"/> 1691 </valid> 1692 <invalid> 1693 <eg:foo xmlns:eg="http://www.example.com" bar="x"/> 1694 </invalid> 1695 </testCase> 1696 <testCase> 1697 <section>4.8</section> 1698 <correct> 1699 <element xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.example.com" name="foo"> 1700 <attribute name="bar"/> 1701 </element> 1702 </correct> 1703 <invalid> 1704 <eg:foo xmlns:eg="http://www.example.com" eg:bar="x"/> 1705 </invalid> 1706 <valid> 1707 <eg:foo xmlns:eg="http://www.example.com" bar="x"/> 1708 </valid> 1709 </testCase> 1710 </testSuite> 1711 <testSuite> 1712 <section>4.9</section> 1713 <testCase> 1714 <section>4.9</section> 1715 <correct> 1716 <element xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.example.com" name="foo"> 1717 <attribute> 1718 <name>bar</name> 1719 </attribute> 1720 </element> 1721 </correct> 1722 <valid> 1723 <eg:foo xmlns:eg="http://www.example.com" eg:bar="x"/> 1724 </valid> 1725 <invalid> 1726 <eg:foo xmlns:eg="http://www.example.com" bar="x"/> 1727 </invalid> 1728 </testCase> 1729 <testCase> 1730 <section>4.6</section> 1731 <section>4.9</section> 1732 <resource name="x"> 1733 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 1734 <empty/> 1735 </element> 1736 </resource> 1737 <correct> 1738 <group ns="http://www.example.com" xmlns="http://relaxng.org/ns/structure/1.0" > 1739 <externalRef href="x"/> 1740 </group> 1741 </correct> 1742 <valid> 1743 <foo xmlns="http://www.example.com"/> 1744 </valid> 1745 <invalid> 1746 <foo/> 1747 </invalid> 1748 </testCase> 1749 <testCase> 1750 <correct> 1751 <group xmlns="http://relaxng.org/ns/structure/1.0"> 1752 <element ns="http://www.example.com"> 1753 <name>foo</name> 1754 <empty/> 1755 </element> 1756 </group> 1757 </correct> 1758 <valid><foo xmlns="http://www.example.com"/></valid> 1759 <invalid><foo/></invalid> 1760 </testCase> 1761 <testCase> 1762 <correct> 1763 <element ns="http://www.example.com" xmlns="http://relaxng.org/ns/structure/1.0"> 1764 <name>foo</name> 1765 <empty/> 1766 </element> 1767 </correct> 1768 <valid><foo xmlns="http://www.example.com"/></valid> 1769 <invalid><foo/></invalid> 1770 </testCase> 1771 <testCase> 1772 <correct> 1773 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 1774 <attribute ns="http://www.example.com"> 1775 <name>bar</name> 1776 <text/> 1777 </attribute> 1778 </element> 1779 </correct> 1780 <valid><foo xmlns:x="http://www.example.com" x:bar="whatever"/></valid> 1781 <invalid><foo bar="whatever"/></invalid> 1782 </testCase> 1783 </testSuite> 1784 <testSuite> 1785 <section>4.10</section> 1786 <testCase> 1787 <section>4.10</section> 1788 <incorrect> 1789 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo:bar"> 1790 <empty/> 1791 </element> 1792 </incorrect> 1793 </testCase> 1794 <testCase> 1795 <section>4.10</section> 1796 <correct> 1797 <element xmlns="http://relaxng.org/ns/structure/1.0" name="eg:foo" xmlns:eg="http://www.example.com"> 1798 <empty/> 1799 </element> 1800 </correct> 1801 <valid> 1802 <foo xmlns="http://www.example.com"/> 1803 </valid> 1804 <invalid> 1805 <foo xmlns="http://www.example.com/"/> 1806 </invalid> 1807 </testCase> 1808 <testCase> 1809 <section>4.10</section> 1810 <correct> 1811 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo" xmlns:eg="http://www.example.com"> 1812 <attribute name="eg:bar"/> 1813 </element> 1814 </correct> 1815 <valid> 1816 <foo xmlns:ex="http://www.example.com" ex:bar="x"/> 1817 </valid> 1818 <invalid> 1819 <foo xmlns:ex="http://www.example.com/" ex:bar="x"/> 1820 </invalid> 1821 </testCase> 1822 <testCase> 1823 <section>4.10</section> 1824 <correct> 1825 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 1826 <attribute name="xml:lang"/> 1827 </element> 1828 </correct> 1829 <valid> 1830 <foo xml:lang="en"/> 1831 </valid> 1832 <invalid> 1833 <foo lang="en"/> 1834 </invalid> 1835 </testCase> 1836 </testSuite> 1837 <testSuite> 1838 <section>4.11</section> 1839 <testCase> 1840 <section>4.11</section> 1841 <correct> 1842 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1843 <div ns="http://www.example.com"> 1844 <div> 1845 <start> 1846 <ref name="foo"/> 1847 </start> 1848 </div> 1849 <define name="foo"> 1850 <element name="foo"> 1851 <empty/> 1852 </element> 1853 </define> 1854 </div> 1855 <div/> 1856 </grammar> 1857 </correct> 1858 <valid> 1859 <foo xmlns="http://www.example.com"/> 1860 </valid> 1861 <invalid> 1862 <foo/> 1863 </invalid> 1864 </testCase> 1865 </testSuite> 1866 <testSuite> 1867 <testCase> 1868 <section>4.12</section> 1869 <correct> 1870 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 1871 1872 <start> 1873 <element name="foo"> 1874 <ref name="bars"/> 1875 </element> 1876 </start> 1877 1878 <define name="bars"> 1879 <element name="bar"> 1880 <empty/> 1881 </element> 1882 <element name="bar"> 1883 <empty/> 1884 </element> 1885 <element name="bar"> 1886 <empty/> 1887 </element> 1888 </define> 1889 1890 </grammar> 1891 </correct> 1892 <valid> 1893 <foo><bar/><bar/><bar/></foo> 1894 </valid> 1895 <invalid> 1896 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo> 1897 </invalid> 1898 <invalid> 1899 <foo><bar/><bar/></foo> 1900 </invalid> 1901 <invalid> 1902 <foo><bar/></foo> 1903 </invalid> 1904 <invalid> 1905 <foo></foo> 1906 </invalid> 1907 <invalid> 1908 <foo>X</foo> 1909 </invalid> 1910 <invalid> 1911 <foo><bar/>X<bar/><bar/></foo> 1912 </invalid> 1913 <invalid> 1914 <foo><bar/><bar/><bar/><bar/></foo> 1915 </invalid> 1916 </testCase> 1917 <testCase> 1918 <section>4.12</section> 1919 <correct> 1920 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 1921 <oneOrMore> 1922 <element name="bar"> 1923 <empty/> 1924 </element> 1925 <element name="bar"> 1926 <empty/> 1927 </element> 1928 <element name="bar"> 1929 <empty/> 1930 </element> 1931 </oneOrMore> 1932 </element> 1933 </correct> 1934 <valid> 1935 <foo><bar/><bar/><bar/></foo> 1936 </valid> 1937 <valid> 1938 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo> 1939 </valid> 1940 <invalid> 1941 <foo><bar/><bar/></foo> 1942 </invalid> 1943 <invalid> 1944 <foo><bar/></foo> 1945 </invalid> 1946 <invalid> 1947 <foo></foo> 1948 </invalid> 1949 <invalid> 1950 <foo>X</foo> 1951 </invalid> 1952 <invalid> 1953 <foo><bar/>X<bar/><bar/></foo> 1954 </invalid> 1955 <invalid> 1956 <foo><bar/><bar/><bar/><bar/></foo> 1957 </invalid> 1958 </testCase> 1959 <testCase> 1960 <section>4.12</section> 1961 <section>4.15</section> 1962 <correct> 1963 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 1964 <zeroOrMore> 1965 <element name="bar"> 1966 <empty/> 1967 </element> 1968 <element name="bar"> 1969 <empty/> 1970 </element> 1971 <element name="bar"> 1972 <empty/> 1973 </element> 1974 </zeroOrMore> 1975 </element> 1976 </correct> 1977 <valid> 1978 <foo><bar/><bar/><bar/></foo> 1979 </valid> 1980 <valid> 1981 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo> 1982 </valid> 1983 <invalid> 1984 <foo><bar/><bar/></foo> 1985 </invalid> 1986 <invalid> 1987 <foo><bar/></foo> 1988 </invalid> 1989 <valid> 1990 <foo></foo> 1991 </valid> 1992 <invalid> 1993 <foo>X</foo> 1994 </invalid> 1995 <invalid> 1996 <foo><bar/>X<bar/><bar/></foo> 1997 </invalid> 1998 <invalid> 1999 <foo><bar/><bar/><bar/><bar/></foo> 2000 </invalid> 2001 </testCase> 2002 <testCase> 2003 <section>4.12</section> 2004 <section>4.14</section> 2005 <correct> 2006 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2007 <optional> 2008 <element name="bar"> 2009 <empty/> 2010 </element> 2011 <element name="bar"> 2012 <empty/> 2013 </element> 2014 <element name="bar"> 2015 <empty/> 2016 </element> 2017 </optional> 2018 </element> 2019 </correct> 2020 <valid> 2021 <foo><bar/><bar/><bar/></foo> 2022 </valid> 2023 <invalid> 2024 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo> 2025 </invalid> 2026 <invalid> 2027 <foo><bar/><bar/></foo> 2028 </invalid> 2029 <invalid> 2030 <foo><bar/></foo> 2031 </invalid> 2032 <valid> 2033 <foo></foo> 2034 </valid> 2035 <invalid> 2036 <foo>X</foo> 2037 </invalid> 2038 <invalid> 2039 <foo><bar/>X<bar/><bar/></foo> 2040 </invalid> 2041 <invalid> 2042 <foo><bar/><bar/><bar/><bar/></foo> 2043 </invalid> 2044 </testCase> 2045 <testCase> 2046 <section>4.12</section> 2047 <correct> 2048 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2049 <list> 2050 <value>x</value> 2051 <value>y</value> 2052 <value>z</value> 2053 </list> 2054 </element> 2055 </correct> 2056 <valid> 2057 <foo>x y z</foo> 2058 </valid> 2059 <invalid> 2060 <foo>x</foo> 2061 </invalid> 2062 </testCase> 2063 <testCase> 2064 <section>4.12</section> 2065 <section>4.13</section> 2066 <correct> 2067 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2068 <mixed> 2069 <element name="bar"> 2070 <empty/> 2071 </element> 2072 <element name="bar"> 2073 <empty/> 2074 </element> 2075 <element name="bar"> 2076 <empty/> 2077 </element> 2078 </mixed> 2079 </element> 2080 </correct> 2081 <valid> 2082 <foo><bar/><bar/><bar/></foo> 2083 </valid> 2084 <invalid> 2085 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo> 2086 </invalid> 2087 <invalid> 2088 <foo><bar/><bar/></foo> 2089 </invalid> 2090 <invalid> 2091 <foo><bar/></foo> 2092 </invalid> 2093 <invalid> 2094 <foo></foo> 2095 </invalid> 2096 <valid> 2097 <foo><bar/>X<bar/><bar/></foo> 2098 </valid> 2099 <invalid> 2100 <foo>X</foo> 2101 </invalid> 2102 <invalid> 2103 <foo><bar/><bar/><bar/><bar/></foo> 2104 </invalid> 2105 </testCase> 2106 <testCase> 2107 <section>4.12</section> 2108 <correct> 2109 <element xmlns="http://relaxng.org/ns/structure/1.0"> 2110 <name>foo</name> 2111 <element name="bar"> 2112 <empty/> 2113 </element> 2114 <element name="bar"> 2115 <empty/> 2116 </element> 2117 <element name="bar"> 2118 <empty/> 2119 </element> 2120 </element> 2121 </correct> 2122 <valid> 2123 <foo><bar/><bar/><bar/></foo> 2124 </valid> 2125 <invalid> 2126 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo> 2127 </invalid> 2128 <invalid> 2129 <foo><bar/><bar/></foo> 2130 </invalid> 2131 <invalid> 2132 <foo><bar/></foo> 2133 </invalid> 2134 <invalid> 2135 <foo></foo> 2136 </invalid> 2137 <invalid> 2138 <foo>X</foo> 2139 </invalid> 2140 <invalid> 2141 <foo><bar/>X<bar/><bar/></foo> 2142 </invalid> 2143 <invalid> 2144 <foo><bar/><bar/><bar/><bar/></foo> 2145 </invalid> 2146 </testCase> 2147 <testCase> 2148 <section>4.12</section> 2149 <correct> 2150 <element xmlns="http://relaxng.org/ns/structure/1.0"> 2151 <anyName> 2152 <except> 2153 <name>foo</name> 2154 <name>bar</name> 2155 <name>baz</name> 2156 </except> 2157 </anyName> 2158 <empty/> 2159 </element> 2160 </correct> 2161 <valid><xyzzy/></valid> 2162 <invalid><foo/></invalid> 2163 <invalid><bar/></invalid> 2164 <invalid><baz/></invalid> 2165 </testCase> 2166 <testCase> 2167 <section>4.12</section> 2168 <correct> 2169 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2170 <data type="token"> 2171 <except> 2172 <value>x</value> 2173 <value>y</value> 2174 <value>z</value> 2175 </except> 2176 </data> 2177 </element> 2178 </correct> 2179 <valid><foo/></valid> 2180 <valid><foo>xyz</foo></valid> 2181 <invalid><foo>x</foo></invalid> 2182 <invalid><foo>y</foo></invalid> 2183 <invalid><foo>y</foo></invalid> 2184 </testCase> 2185 <testCase> 2186 <section>4.12</section> 2187 <correct> 2188 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2189 <attribute name="bar"/> 2190 </element> 2191 </correct> 2192 <valid> 2193 <foo bar=""/> 2194 </valid> 2195 <valid> 2196 <foo bar="x"/> 2197 </valid> 2198 <invalid> 2199 <foo/> 2200 </invalid> 2201 </testCase> 2202 <testCase> 2203 <section>4.12</section> 2204 <correct> 2205 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2206 <attribute> 2207 <name>bar</name> 2208 </attribute> 2209 </element> 2210 </correct> 2211 <valid> 2212 <foo bar=""/> 2213 </valid> 2214 <valid> 2215 <foo bar="x"/> 2216 </valid> 2217 <invalid> 2218 <foo/> 2219 </invalid> 2220 </testCase> 2221 <testCase> 2222 <section>4.12</section> 2223 <correct> 2224 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2225 <group> 2226 <element name="bar"> 2227 <empty/> 2228 </element> 2229 <element name="bar"> 2230 <empty/> 2231 </element> 2232 <element name="bar"> 2233 <empty/> 2234 </element> 2235 </group> 2236 </element> 2237 </correct> 2238 <valid> 2239 <foo><bar/><bar/><bar/></foo> 2240 </valid> 2241 <invalid> 2242 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo> 2243 </invalid> 2244 <invalid> 2245 <foo><bar/><bar/></foo> 2246 </invalid> 2247 <invalid> 2248 <foo><bar/></foo> 2249 </invalid> 2250 <invalid> 2251 <foo></foo> 2252 </invalid> 2253 <invalid> 2254 <foo>X</foo> 2255 </invalid> 2256 <invalid> 2257 <foo><bar/>X<bar/><bar/></foo> 2258 </invalid> 2259 <invalid> 2260 <foo><bar/><bar/><bar/><bar/></foo> 2261 </invalid> 2262 </testCase> 2263 <testCase> 2264 <section>4.12</section> 2265 <correct> 2266 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2267 <choice> 2268 <element name="bar1"> 2269 <empty/> 2270 </element> 2271 <element name="bar2"> 2272 <empty/> 2273 </element> 2274 <element name="bar3"> 2275 <empty/> 2276 </element> 2277 </choice> 2278 </element> 2279 </correct> 2280 <valid><foo><bar1/></foo></valid> 2281 <valid><foo><bar2/></foo></valid> 2282 <valid><foo><bar3/></foo></valid> 2283 <invalid><foo/></invalid> 2284 </testCase> 2285 <testCase> 2286 <section>4.12</section> 2287 <correct> 2288 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2289 <interleave> 2290 <element name="bar1"> 2291 <empty/> 2292 </element> 2293 <element name="bar2"> 2294 <empty/> 2295 </element> 2296 <element name="bar3"> 2297 <empty/> 2298 </element> 2299 </interleave> 2300 </element> 2301 </correct> 2302 <valid><foo><bar1/><bar2/><bar3/></foo></valid> 2303 <valid><foo><bar1/><bar3/><bar2/></foo></valid> 2304 <valid><foo><bar2/><bar1/><bar3/></foo></valid> 2305 <valid><foo><bar2/><bar3/><bar1/></foo></valid> 2306 <valid><foo><bar3/><bar1/><bar2/></foo></valid> 2307 <valid><foo><bar3/><bar2/><bar1/></foo></valid> 2308 <invalid><foo><bar2/><bar1/></foo></invalid> 2309 <invalid><foo><bar1/><bar3/><bar2/><bar1/></foo></invalid> 2310 </testCase> 2311 <testCase> 2312 <section>4.12</section> 2313 <correct> 2314 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2315 <group> 2316 <element name="bar"> 2317 <empty/> 2318 </element> 2319 </group> 2320 </element> 2321 </correct> 2322 <valid><foo><bar/></foo></valid> 2323 <invalid><foo/></invalid> 2324 </testCase> 2325 <testCase> 2326 <section>4.12</section> 2327 <correct> 2328 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2329 <interleave> 2330 <element name="bar"> 2331 <empty/> 2332 </element> 2333 </interleave> 2334 </element> 2335 </correct> 2336 <valid><foo><bar/></foo></valid> 2337 <invalid><foo/></invalid> 2338 </testCase> 2339 <testCase> 2340 <section>4.12</section> 2341 <correct> 2342 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2343 <choice> 2344 <element name="bar"> 2345 <empty/> 2346 </element> 2347 </choice> 2348 </element> 2349 </correct> 2350 <valid><foo><bar/></foo></valid> 2351 <invalid><foo/></invalid> 2352 </testCase> 2353 </testSuite> 2354 <testSuite> 2355 <section>4.13</section> 2356 <testCase> 2357 <section>4.13</section> 2358 <correct> 2359 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2360 <mixed> 2361 <element name="bar"> 2362 <empty/> 2363 </element> 2364 </mixed> 2365 </element> 2366 </correct> 2367 <valid><foo>x<bar/></foo></valid> 2368 <valid><foo><bar/></foo></valid> 2369 <valid><foo><bar/>x</foo></valid> 2370 <valid><foo>x<bar/>y</foo></valid> 2371 <invalid><foo/></invalid> 2372 <invalid><foo><bar/><bar/></foo></invalid> 2373 </testCase> 2374 </testSuite> 2375 <testSuite> 2376 <section>4.14</section> 2377 <testCase> 2378 <section>4.14</section> 2379 <correct> 2380 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2381 <optional> 2382 <element name="bar"> 2383 <empty/> 2384 </element> 2385 </optional> 2386 </element> 2387 </correct> 2388 <valid><foo><bar/></foo></valid> 2389 <valid><foo/></valid> 2390 <invalid><foo>x<bar/></foo></invalid> 2391 <invalid><foo><bar/><bar/></foo></invalid> 2392 </testCase> 2393 </testSuite> 2394 <testSuite> 2395 <section>4.15</section> 2396 <testCase> 2397 <section>4.15</section> 2398 <correct> 2399 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2400 <zeroOrMore> 2401 <element name="bar"> 2402 <empty/> 2403 </element> 2404 </zeroOrMore> 2405 </element> 2406 </correct> 2407 <valid><foo><bar/></foo></valid> 2408 <valid><foo/></valid> 2409 <invalid><foo>x<bar/></foo></invalid> 2410 <invalid><foo><baz/></foo></invalid> 2411 <valid><foo><bar/><bar/></foo></valid> 2412 </testCase> 2413 </testSuite> 2414 <testSuite> 2415 <section>4.16</section> 2416 <testCase> 2417 <section>4.16</section> 2418 <incorrect> 2419 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2420 <start> 2421 <element> 2422 <anyName> 2423 <except> 2424 <anyName/> 2425 </except> 2426 </anyName> 2427 <empty/> 2428 </element> 2429 </start> 2430 </grammar> 2431 </incorrect> 2432 </testCase> 2433 <testCase> 2434 <section>4.16</section> 2435 <incorrect> 2436 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2437 <start> 2438 <element> 2439 <anyName> 2440 <except> 2441 <choice> 2442 <anyName/> 2443 <name>foo</name> 2444 </choice> 2445 </except> 2446 </anyName> 2447 <empty/> 2448 </element> 2449 </start> 2450 </grammar> 2451 </incorrect> 2452 </testCase> 2453 <testCase> 2454 <section>4.16</section> 2455 <incorrect> 2456 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2457 <start> 2458 <element> 2459 <nsName ns=""> 2460 <except> 2461 <nsName ns=""/> 2462 </except> 2463 </nsName> 2464 <empty/> 2465 </element> 2466 </start> 2467 </grammar> 2468 </incorrect> 2469 </testCase> 2470 <testCase> 2471 <section>4.16</section> 2472 <incorrect> 2473 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2474 <start> 2475 <element> 2476 <nsName ns=""> 2477 <except> 2478 <choice> 2479 <nsName ns=""/> 2480 <name>foo</name> 2481 </choice> 2482 </except> 2483 </nsName> 2484 <empty/> 2485 </element> 2486 </start> 2487 </grammar> 2488 </incorrect> 2489 </testCase> 2490 <testCase> 2491 <section>4.16</section> 2492 <incorrect> 2493 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2494 <start> 2495 <element> 2496 <nsName ns=""> 2497 <except> 2498 <anyName/> 2499 </except> 2500 </nsName> 2501 <empty/> 2502 </element> 2503 </start> 2504 </grammar> 2505 </incorrect> 2506 </testCase> 2507 <testCase> 2508 <section>4.16</section> 2509 <incorrect> 2510 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2511 <start> 2512 <element> 2513 <nsName ns=""> 2514 <except> 2515 <choice> 2516 <anyName/> 2517 <name>foo</name> 2518 </choice> 2519 </except> 2520 </nsName> 2521 <empty/> 2522 </element> 2523 </start> 2524 </grammar> 2525 </incorrect> 2526 </testCase> 2527 <testCase> 2528 <section>4.16</section> 2529 <documentation>Tests that 4.16 is before 4.20.</documentation> 2530 <incorrect> 2531 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2532 <start> 2533 <element name="foo"> 2534 <zeroOrMore> 2535 <attribute> 2536 <anyName> 2537 <except> 2538 <anyName/> 2539 </except> 2540 </anyName> 2541 <text/> 2542 </attribute> 2543 <notAllowed/> 2544 </zeroOrMore> 2545 </element> 2546 </start> 2547 </grammar> 2548 </incorrect> 2549 </testCase> 2550 <testCase> 2551 <section>4.16</section> 2552 <documentation>Tests that 4.16 is before removal of unreachable definitions.</documentation> 2553 <incorrect> 2554 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2555 <start> 2556 <element name="foo"> 2557 <empty/> 2558 </element> 2559 </start> 2560 <define name="bar"> 2561 <element> 2562 <anyName> 2563 <except> 2564 <anyName/> 2565 </except> 2566 </anyName> 2567 <empty/> 2568 </element> 2569 </define> 2570 </grammar> 2571 </incorrect> 2572 </testCase> 2573 <testCase> 2574 <section>4.16</section> 2575 <incorrect> 2576 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2577 <attribute name="xmlns"> 2578 <text/> 2579 </attribute> 2580 </element> 2581 </incorrect> 2582 </testCase> 2583 <testCase> 2584 <section>4.16</section> 2585 <correct> 2586 <element name="xmlns" xmlns="http://relaxng.org/ns/structure/1.0"> 2587 <empty/> 2588 </element> 2589 </correct> 2590 <valid><xmlns/></valid> 2591 </testCase> 2592 <testCase> 2593 <section>4.16</section> 2594 <incorrect> 2595 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2596 <attribute name=" xmlns"> 2597 <text/> 2598 </attribute> 2599 </element> 2600 </incorrect> 2601 </testCase> 2602 <testCase> 2603 <section>4.16</section> 2604 <incorrect> 2605 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2606 <optional> 2607 <notAllowed/> 2608 <attribute name="xmlns"> 2609 <text/> 2610 </attribute> 2611 </optional> 2612 </element> 2613 </incorrect> 2614 </testCase> 2615 <testCase> 2616 <section>4.16</section> 2617 <incorrect> 2618 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2619 <start> 2620 <element name="foo"> 2621 <empty/> 2622 </element> 2623 </start> 2624 <define name="foo"> 2625 <attribute name="xmlns"> 2626 <text/> 2627 </attribute> 2628 </define> 2629 </grammar> 2630 </incorrect> 2631 </testCase> 2632 <testCase> 2633 <section>4.16</section> 2634 <incorrect> 2635 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2636 <attribute name="xmlns" ns=""> 2637 <text/> 2638 </attribute> 2639 </element> 2640 </incorrect> 2641 </testCase> 2642 <testCase> 2643 <section>4.16</section> 2644 <incorrect> 2645 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2646 <attribute> 2647 <choice> 2648 <name ns="">xmlns</name> 2649 <name>foo</name> 2650 </choice> 2651 <text/> 2652 </attribute> 2653 </element> 2654 </incorrect> 2655 </testCase> 2656 <testCase> 2657 <section>4.16</section> 2658 <incorrect> 2659 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2660 <attribute> 2661 <name ns="">xmlns</name> 2662 <text/> 2663 </attribute> 2664 </element> 2665 </incorrect> 2666 </testCase> 2667 <testCase> 2668 <section>4.16</section> 2669 <incorrect> 2670 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2671 <attribute> 2672 <name>xmlns</name> 2673 <text/> 2674 </attribute> 2675 </element> 2676 </incorrect> 2677 </testCase> 2678 <testCase> 2679 <section>4.16</section> 2680 <incorrect> 2681 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2682 <attribute> 2683 <name> 2684 xmlns 2685 </name> 2686 <text/> 2687 </attribute> 2688 </element> 2689 </incorrect> 2690 </testCase> 2691 <testCase> 2692 <section>4.16</section> 2693 <incorrect> 2694 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2695 <attribute> 2696 <choice> 2697 <name>foo</name> 2698 <name ns="">xmlns</name> 2699 </choice> 2700 <text/> 2701 </attribute> 2702 </element> 2703 </incorrect> 2704 </testCase> 2705 <testCase> 2706 <section>4.16</section> 2707 <incorrect> 2708 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2709 <oneOrMore> 2710 <attribute> 2711 <anyName> 2712 <except> 2713 <name>xmlns</name> 2714 </except> 2715 </anyName> 2716 <text/> 2717 </attribute> 2718 </oneOrMore> 2719 </element> 2720 </incorrect> 2721 </testCase> 2722 <testCase> 2723 <section>4.16</section> 2724 <incorrect> 2725 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2726 <oneOrMore> 2727 <attribute> 2728 <nsName ns=""> 2729 <except> 2730 <name>xmlns</name> 2731 </except> 2732 </nsName> 2733 <text/> 2734 </attribute> 2735 </oneOrMore> 2736 </element> 2737 </incorrect> 2738 </testCase> 2739 <testCase> 2740 <section>4.16</section> 2741 <incorrect> 2742 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2743 <attribute ns="http://www.w3.org/2000/xmlns" name="bar"> 2744 <text/> 2745 </attribute> 2746 </element> 2747 </incorrect> 2748 </testCase> 2749 <testCase> 2750 <section>4.16</section> 2751 <correct> 2752 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.w3.org/2000/xmlns"> 2753 <empty/> 2754 </element> 2755 </correct> 2756 <valid><foo xmlns="http://www.w3.org/2000/xmlns"/></valid> 2757 </testCase> 2758 <testCase> 2759 <section>4.16</section> 2760 <incorrect> 2761 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2762 <data type="token"> 2763 <param name="minLength">2</param> 2764 </data> 2765 </element> 2766 </incorrect> 2767 </testCase> 2768 <testCase> 2769 <section>4.16</section> 2770 <incorrect> 2771 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2772 <data type="tok"/> 2773 </element> 2774 </incorrect> 2775 </testCase> 2776 <testCase> 2777 <section>4.16</section> 2778 <incorrect> 2779 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2780 <value type="tok"/> 2781 </element> 2782 </incorrect> 2783 </testCase> 2784 <testCase> 2785 <section>4.16</section> 2786 <incorrect> 2787 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2788 <optional> 2789 <notAllowed/> 2790 <data type="token"> 2791 <param name="minLength">2</param> 2792 </data> 2793 </optional> 2794 </element> 2795 </incorrect> 2796 </testCase> 2797 <testCase> 2798 <section>4.16</section> 2799 <incorrect> 2800 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2801 <optional> 2802 <notAllowed/> 2803 <data type="tok"/> 2804 </optional> 2805 </element> 2806 </incorrect> 2807 </testCase> 2808 <testCase> 2809 <section>4.16</section> 2810 <incorrect> 2811 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 2812 <optional> 2813 <notAllowed/> 2814 <value type="tok"/> 2815 </optional> 2816 </element> 2817 </incorrect> 2818 </testCase> 2819 <testCase> 2820 <section>4.16</section> 2821 <incorrect> 2822 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2823 <start> 2824 <element name="foo"> 2825 <empty/> 2826 </element> 2827 </start> 2828 <define name="foo"> 2829 <data type="token"> 2830 <param name="minLength">2</param> 2831 </data> 2832 </define> 2833 </grammar> 2834 </incorrect> 2835 </testCase> 2836 <testCase> 2837 <section>4.16</section> 2838 <incorrect> 2839 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2840 <start> 2841 <element name="foo"> 2842 <empty/> 2843 </element> 2844 </start> 2845 <define name="foo"> 2846 <data type="tok"/> 2847 </define> 2848 </grammar> 2849 </incorrect> 2850 </testCase> 2851 <testCase> 2852 <section>4.16</section> 2853 <incorrect> 2854 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2855 <start> 2856 <element name="foo"> 2857 <empty/> 2858 </element> 2859 </start> 2860 <define name="foo"> 2861 <value type="tok"/> 2862 </define> 2863 </grammar> 2864 </incorrect> 2865 </testCase> 2866 </testSuite> 2867 <testSuite> 2868 <section>4.17</section> 2869 <testCase> 2870 <section>4.17</section> 2871 <incorrect> 2872 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2873 <start> 2874 <ref name="x"/> 2875 </start> 2876 <define name="x"> 2877 <element name="foo1"> 2878 <empty/> 2879 </element> 2880 </define> 2881 <define name="x" combine="choice"> 2882 <element name="foo2"> 2883 <empty/> 2884 </element> 2885 </define> 2886 <define name="x"> 2887 <element name="foo3"> 2888 <empty/> 2889 </element> 2890 </define> 2891 </grammar> 2892 </incorrect> 2893 </testCase> 2894 <testCase> 2895 <section>4.17</section> 2896 <incorrect> 2897 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2898 <start name="x"> 2899 <element name="foo1"> 2900 <empty/> 2901 </element> 2902 </start> 2903 <start name="x" combine="choice"> 2904 <element name="foo2"> 2905 <empty/> 2906 </element> 2907 </start> 2908 <start name="x"> 2909 <element name="foo3"> 2910 <empty/> 2911 </element> 2912 </start> 2913 </grammar> 2914 </incorrect> 2915 </testCase> 2916 <testCase> 2917 <section>4.17</section> 2918 <incorrect> 2919 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2920 <start> 2921 <ref name="x"/> 2922 </start> 2923 <define name="x"> 2924 <element name="foo1"> 2925 <empty/> 2926 </element> 2927 </define> 2928 <define name="x"> 2929 <element name="foo2"> 2930 <empty/> 2931 </element> 2932 </define> 2933 </grammar> 2934 </incorrect> 2935 </testCase> 2936 <testCase> 2937 <section>4.17</section> 2938 <incorrect> 2939 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2940 <start name="x"> 2941 <element name="foo1"> 2942 <empty/> 2943 </element> 2944 </start> 2945 <start name="x"> 2946 <element name="foo2"> 2947 <empty/> 2948 </element> 2949 </start> 2950 </grammar> 2951 </incorrect> 2952 </testCase> 2953 <testCase> 2954 <section>4.17</section> 2955 <correct> 2956 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2957 <start> 2958 <ref name="x"/> 2959 </start> 2960 <define name="x" combine="choice"> 2961 <element name="foo1"> 2962 <empty/> 2963 </element> 2964 </define> 2965 <define name="x" combine="choice"> 2966 <element name="foo2"> 2967 <empty/> 2968 </element> 2969 </define> 2970 <define name="x"> 2971 <element name="foo3"> 2972 <empty/> 2973 </element> 2974 </define> 2975 </grammar> 2976 </correct> 2977 <valid> 2978 <foo1/> 2979 </valid> 2980 <valid> 2981 <foo2/> 2982 </valid> 2983 <valid> 2984 <foo3/> 2985 </valid> 2986 <invalid> 2987 <foo4/> 2988 </invalid> 2989 </testCase> 2990 <testCase> 2991 <section>4.17</section> 2992 <correct> 2993 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 2994 <start combine="choice"> 2995 <element name="foo1"> 2996 <empty/> 2997 </element> 2998 </start> 2999 <start combine="choice"> 3000 <element name="foo2"> 3001 <empty/> 3002 </element> 3003 </start> 3004 <start> 3005 <element name="foo3"> 3006 <empty/> 3007 </element> 3008 </start> 3009 </grammar> 3010 </correct> 3011 <valid> 3012 <foo1/> 3013 </valid> 3014 <valid> 3015 <foo2/> 3016 </valid> 3017 <valid> 3018 <foo3/> 3019 </valid> 3020 <invalid> 3021 <foo4/> 3022 </invalid> 3023 </testCase> 3024 <testCase> 3025 <section>4.17</section> 3026 <incorrect> 3027 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3028 <start> 3029 <element name="foo"> 3030 <ref name="x"/> 3031 </element> 3032 </start> 3033 <define name="x" combine="choice"> 3034 <element name="bar1"> 3035 <empty/> 3036 </element> 3037 </define> 3038 <define name="x"> 3039 <element name="bar2"> 3040 <empty/> 3041 </element> 3042 </define> 3043 <define name="x" combine="interleave"> 3044 <element name="bar3"> 3045 <empty/> 3046 </element> 3047 </define> 3048 </grammar> 3049 </incorrect> 3050 </testCase> 3051 <testCase> 3052 <section>4.17</section> 3053 <incorrect> 3054 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 3055 <grammar> 3056 <start name="x" combine="choice"> 3057 <element name="bar1"> 3058 <empty/> 3059 </element> 3060 </start> 3061 <start name="x"> 3062 <element name="bar2"> 3063 <empty/> 3064 </element> 3065 </start> 3066 <start name="x" combine="interleave"> 3067 <element name="bar3"> 3068 <empty/> 3069 </element> 3070 </start> 3071 </grammar> 3072 </element> 3073 </incorrect> 3074 </testCase> 3075 <testCase> 3076 <section>4.17</section> 3077 <correct> 3078 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3079 <start> 3080 <element name="foo"> 3081 <ref name="x"/> 3082 </element> 3083 </start> 3084 <define name="x" combine="interleave"> 3085 <element name="bar1"> 3086 <empty/> 3087 </element> 3088 </define> 3089 <define name="x" combine="interleave"> 3090 <element name="bar2"> 3091 <empty/> 3092 </element> 3093 </define> 3094 <define name="x"> 3095 <element name="bar3"> 3096 <empty/> 3097 </element> 3098 </define> 3099 </grammar> 3100 </correct> 3101 <valid> 3102 <foo><bar1/><bar2/><bar3/></foo> 3103 </valid> 3104 <valid> 3105 <foo><bar1/><bar3/><bar2/></foo> 3106 </valid> 3107 <valid> 3108 <foo><bar2/><bar3/><bar1/></foo> 3109 </valid> 3110 <invalid> 3111 <foo><bar2/><bar3/><bar1/><bar2/></foo> 3112 </invalid> 3113 </testCase> 3114 <testCase> 3115 <section>4.17</section> 3116 <correct> 3117 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 3118 <grammar> 3119 <start combine="interleave"> 3120 <element name="bar1"> 3121 <empty/> 3122 </element> 3123 </start> 3124 <start> 3125 <element name="bar2"> 3126 <empty/> 3127 </element> 3128 </start> 3129 <start combine="interleave"> 3130 <element name="bar3"> 3131 <empty/> 3132 </element> 3133 </start> 3134 </grammar> 3135 </element> 3136 </correct> 3137 <valid> 3138 <foo><bar1/><bar2/><bar3/></foo> 3139 </valid> 3140 <valid> 3141 <foo><bar1/><bar3/><bar2/></foo> 3142 </valid> 3143 <valid> 3144 <foo><bar2/><bar3/><bar1/></foo> 3145 </valid> 3146 <invalid> 3147 <foo><bar2/><bar3/><bar1/><bar2/></foo> 3148 </invalid> 3149 </testCase> 3150 <testCase> 3151 <section>4.17</section> 3152 <incorrect> 3153 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3154 <start> 3155 <element name="foo"> 3156 <ref name="x"/> 3157 </element> 3158 </start> 3159 <define name="x"> 3160 <element name="bar1"> 3161 <empty/> 3162 </element> 3163 </define> 3164 <define name="x" combine="interleave"> 3165 <element name="bar2"> 3166 <empty/> 3167 </element> 3168 </define> 3169 <define name="x"> 3170 <element name="bar3"> 3171 <empty/> 3172 </element> 3173 </define> 3174 </grammar> 3175 </incorrect> 3176 </testCase> 3177 <testCase> 3178 <section>4.17</section> 3179 <incorrect> 3180 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 3181 <grammar> 3182 <start name="x"> 3183 <element name="bar1"> 3184 <empty/> 3185 </element> 3186 </start> 3187 <start name="x" combine="interleave"> 3188 <element name="bar2"> 3189 <empty/> 3190 </element> 3191 </start> 3192 <start name="x"> 3193 <element name="bar3"> 3194 <empty/> 3195 </element> 3196 </start> 3197 </grammar> 3198 </element> 3199 </incorrect> 3200 </testCase> 3201 </testSuite> 3202 <testSuite> 3203 <section>4.18</section> 3204 <testCase> 3205 <section>4.18</section> 3206 <documentation>grammar must have a start</documentation> 3207 <incorrect> 3208 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3209 <define name="foo"> 3210 <element name="foo"> 3211 <empty/> 3212 </element> 3213 </define> 3214 </grammar> 3215 </incorrect> 3216 </testCase> 3217 <testCase> 3218 <section>4.18</section> 3219 <documentation>4.17 is before 4.18</documentation> 3220 <incorrect> 3221 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3222 <start> 3223 <element name="foo"> 3224 <empty/> 3225 </element> 3226 </start> 3227 <define name="bar"> 3228 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3229 <define name="foo"> 3230 <element name="foo"> 3231 <empty/> 3232 </element> 3233 </define> 3234 </grammar> 3235 </define> 3236 </grammar> 3237 </incorrect> 3238 </testCase> 3239 <testCase> 3240 <section>4.18</section> 3241 <documentation>4.17 is before 4.19</documentation> 3242 <incorrect> 3243 <choice xmlns="http://relaxng.org/ns/structure/1.0"> 3244 <element name="foo"> 3245 <empty/> 3246 </element> 3247 <group> 3248 <notAllowed/> 3249 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3250 <define name="foo"> 3251 <element name="foo"> 3252 <empty/> 3253 </element> 3254 </define> 3255 </grammar> 3256 </group> 3257 </choice> 3258 </incorrect> 3259 </testCase> 3260 <testCase> 3261 <section>4.18</section> 3262 <documentation>every ref must have a def</documentation> 3263 <incorrect> 3264 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3265 <start> 3266 <ref name="foo"/> 3267 </start> 3268 </grammar> 3269 </incorrect> 3270 </testCase> 3271 <testCase> 3272 <section>4.18</section> 3273 <documentation>4.17 is before 4.18</documentation> 3274 <incorrect> 3275 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3276 <start> 3277 <element name="foo"> 3278 <empty/> 3279 </element> 3280 </start> 3281 <define name="foo"> 3282 <ref name="bar"/> 3283 </define> 3284 </grammar> 3285 </incorrect> 3286 </testCase> 3287 <testCase> 3288 <section>4.18</section> 3289 <documentation>4.17 is before 4.19</documentation> 3290 <incorrect> 3291 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3292 <start> 3293 <choice> 3294 <element name="foo"> 3295 <empty/> 3296 </element> 3297 <group> 3298 <notAllowed/> 3299 <ref name="foo"/> 3300 </group> 3301 </choice> 3302 </start> 3303 </grammar> 3304 </incorrect> 3305 </testCase> 3306 <testCase> 3307 <section>4.18</section> 3308 <documentation>every parentRef must have a def</documentation> 3309 <incorrect> 3310 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3311 <start> 3312 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3313 <start> 3314 <parentRef name="foo"/> 3315 </start> 3316 <define name="foo"> 3317 <element name="foo"> 3318 <empty/> 3319 </element> 3320 </define> 3321 </grammar> 3322 </start> 3323 </grammar> 3324 </incorrect> 3325 </testCase> 3326 <testCase> 3327 <section>4.18</section> 3328 <documentation>4.17 is before 4.18</documentation> 3329 <incorrect> 3330 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3331 <start> 3332 <element name="foo"> 3333 <empty/> 3334 </element> 3335 </start> 3336 <define name="bar"> 3337 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3338 <start> 3339 <parentRef name="foo"/> 3340 </start> 3341 <define name="foo"> 3342 <element name="foo"> 3343 <empty/> 3344 </element> 3345 </define> 3346 </grammar> 3347 </define> 3348 </grammar> 3349 </incorrect> 3350 </testCase> 3351 <testCase> 3352 <section>4.18</section> 3353 <documentation>4.17 is before 4.19</documentation> 3354 <incorrect> 3355 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3356 <start> 3357 <choice> 3358 <element name="foo"> 3359 <empty/> 3360 </element> 3361 <group> 3362 <notAllowed/> 3363 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3364 <start> 3365 <parentRef name="foo"/> 3366 </start> 3367 <define name="foo"> 3368 <element name="foo"> 3369 <empty/> 3370 </element> 3371 </define> 3372 </grammar> 3373 </group> 3374 </choice> 3375 </start> 3376 </grammar> 3377 </incorrect> 3378 </testCase> 3379 <testCase> 3380 <section>4.18</section> 3381 <incorrect> 3382 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3383 <start> 3384 <ref name="foo"/> 3385 </start> 3386 <define name="foo"> 3387 <choice> 3388 <element name="foo"> 3389 <empty/> 3390 </element> 3391 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3392 <start> 3393 <parentRef name="foo"/> 3394 </start> 3395 </grammar> 3396 </choice> 3397 </define> 3398 </grammar> 3399 </incorrect> 3400 </testCase> 3401 <testCase> 3402 <section>4.18</section> 3403 <correct> 3404 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3405 <start> 3406 <ref name="foo"/> 3407 </start> 3408 <define name="foo"> 3409 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3410 <start> 3411 <ref name="foo"/> 3412 </start> 3413 <define name="foo"> 3414 <element name="foo"> 3415 <empty/> 3416 </element> 3417 </define> 3418 </grammar> 3419 </define> 3420 </grammar> 3421 </correct> 3422 <valid><foo/></valid> 3423 </testCase> 3424 <testCase> 3425 <section>4.18</section> 3426 <correct> 3427 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3428 <start> 3429 <grammar> 3430 <start> 3431 <ref name="foo"/> 3432 </start> 3433 <define name="foo"> 3434 <element name="innerFoo"> 3435 <parentRef name="foo"/> 3436 </element> 3437 </define> 3438 </grammar> 3439 </start> 3440 <define name="foo"> 3441 <element name="outerFoo"> 3442 <empty/> 3443 </element> 3444 </define> 3445 </grammar> 3446 </correct> 3447 <valid><innerFoo><outerFoo/></innerFoo></valid> 3448 <invalid><outerFoo/></invalid> 3449 </testCase> 3450 <testCase> 3451 <section>4.18</section> 3452 <correct> 3453 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3454 <start> 3455 <ref name="foo"/> 3456 </start> 3457 <define name="foo"> 3458 <element name="outerFoo"> 3459 <grammar> 3460 <start> 3461 <ref name="foo"/> 3462 </start> 3463 <define name="foo"> 3464 <element name="innerFoo"> 3465 <empty/> 3466 </element> 3467 </define> 3468 </grammar> 3469 </element> 3470 </define> 3471 </grammar> 3472 </correct> 3473 <valid><outerFoo><innerFoo/></outerFoo></valid> 3474 <invalid><innerFoo/></invalid> 3475 </testCase> 3476 </testSuite> 3477 <testSuite> 3478 <section>4.19</section> 3479 <testCase> 3480 <section>4.19</section> 3481 <incorrect> 3482 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3483 <start> 3484 <element name="foo"> 3485 <ref name="bar"/> 3486 </element> 3487 </start> 3488 <define name="bar"> 3489 <optional> 3490 <element name="bar"> 3491 <empty/> 3492 </element> 3493 <ref name="bar"/> 3494 </optional> 3495 </define> 3496 </grammar> 3497 </incorrect> 3498 </testCase> 3499 <testCase> 3500 <section>4.19</section> 3501 <correct> 3502 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3503 <start> 3504 <element name="foo"> 3505 <ref name="bar"/> 3506 </element> 3507 </start> 3508 <define name="bar"> 3509 <element name="bar"> 3510 <optional> 3511 <ref name="bar"/> 3512 </optional> 3513 </element> 3514 </define> 3515 </grammar> 3516 </correct> 3517 <valid> 3518 <foo><bar/></foo> 3519 </valid> 3520 <valid> 3521 <foo><bar><bar/></bar></foo> 3522 </valid> 3523 <invalid> 3524 <foo/> 3525 </invalid> 3526 </testCase> 3527 <testCase> 3528 <section>4.19</section> 3529 <correct> 3530 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3531 <start> 3532 <element name="foo"> 3533 <empty/> 3534 </element> 3535 </start> 3536 <define name="bar"> 3537 <ref name="bar"/> 3538 </define> 3539 </grammar> 3540 </correct> 3541 <valid><foo/></valid> 3542 </testCase> 3543 <testCase> 3544 <section>4.19</section> 3545 <section>4.20</section> 3546 <documentation>Tests that recursion detection happens before 3547 normalization of notAllowed.</documentation> 3548 <incorrect> 3549 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 3550 <start> 3551 <choice> 3552 <element name="foo"> 3553 <empty/> 3554 </element> 3555 <group> 3556 <notAllowed/> 3557 <ref name="bar"/> 3558 </group> 3559 </choice> 3560 </start> 3561 <define name="bar"> 3562 <element name="bar"> 3563 <empty/> 3564 </element> 3565 <optional> 3566 <ref name="bar"/> 3567 </optional> 3568 </define> 3569 </grammar> 3570 </incorrect> 3571 </testCase> 3572 </testSuite> 3573 </testSuite> 3574 <testSuite> 3575 <section>6</section> 3576 <testSuite> 3577 <section>6.1</section> 3578 <testCase> 3579 <section>6.1</section> 3580 <correct> 3581 <element xmlns="http://relaxng.org/ns/structure/1.0"> 3582 <anyName/> 3583 <empty/> 3584 </element> 3585 </correct> 3586 <valid> 3587 <foo/> 3588 </valid> 3589 <valid> 3590 <foo xmlns="http://www.example.com"/> 3591 </valid> 3592 </testCase> 3593 <testCase> 3594 <section>6.1</section> 3595 <correct> 3596 <element xmlns="http://relaxng.org/ns/structure/1.0"> 3597 <anyName> 3598 <except> 3599 <name ns="">foo</name> 3600 </except> 3601 </anyName> 3602 <empty/> 3603 </element> 3604 </correct> 3605 <invalid> 3606 <foo/> 3607 </invalid> 3608 <valid> 3609 <foo xmlns="http://www.example.com"/> 3610 </valid> 3611 <valid> 3612 <bar/> 3613 </valid> 3614 </testCase> 3615 <testCase> 3616 <section>6.1</section> 3617 <correct> 3618 <element xmlns="http://relaxng.org/ns/structure/1.0"> 3619 <anyName> 3620 <except> 3621 <nsName ns=""/> 3622 </except> 3623 </anyName> 3624 <empty/> 3625 </element> 3626 </correct> 3627 <invalid> 3628 <foo/> 3629 </invalid> 3630 <valid> 3631 <foo xmlns="http://www.example.com"/> 3632 </valid> 3633 </testCase> 3634 <testCase> 3635 <section>6.1</section> 3636 <correct> 3637 <element xmlns="http://relaxng.org/ns/structure/1.0"> 3638 <nsName ns=""/> 3639 <empty/> 3640 </element> 3641 </correct> 3642 <valid> 3643 <foo/> 3644 </valid> 3645 <invalid> 3646 <foo xmlns="http://www.example.com"/> 3647 </invalid> 3648 </testCase> 3649 <testCase> 3650 <section>6.1</section> 3651 <correct> 3652 <element xmlns="http://relaxng.org/ns/structure/1.0"> 3653 <nsName ns="http://www.example.com"/> 3654 <empty/> 3655 </element> 3656 </correct> 3657 <invalid> 3658 <foo/> 3659 </invalid> 3660 <invalid> 3661 <foo xmlns="HTTP://www.example.com"/> 3662 </invalid> 3663 <invalid> 3664 <foo xmlns="http://www.example.com/"/> 3665 </invalid> 3666 <valid> 3667 <foo xmlns="http://www.example.com"/> 3668 </valid> 3669 </testCase> 3670 <testCase> 3671 <section>6.1</section> 3672 <correct> 3673 <element xmlns="http://relaxng.org/ns/structure/1.0"> 3674 <nsName ns="http://www.example.com"> 3675 <except> 3676 <name ns="http://www.example.com">foo</name> 3677 </except> 3678 </nsName> 3679 <empty/> 3680 </element> 3681 </correct> 3682 <invalid> 3683 <foo/> 3684 </invalid> 3685 <invalid> 3686 <foo xmlns="http://www.example.com"/> 3687 </invalid> 3688 <valid> 3689 <bar xmlns="http://www.example.com"/> 3690 </valid> 3691 </testCase> 3692 <testCase> 3693 <section>6.1</section> 3694 <correct> 3695 <element xmlns="http://relaxng.org/ns/structure/1.0"> 3696 <nsName ns="http://www.example.com"> 3697 <except> 3698 <name ns="">foo</name> 3699 </except> 3700 </nsName> 3701 <empty/> 3702 </element> 3703 </correct> 3704 <invalid> 3705 <bar/> 3706 </invalid> 3707 <invalid> 3708 <foo/> 3709 </invalid> 3710 <valid> 3711 <foo xmlns="http://www.example.com"/> 3712 </valid> 3713 <valid> 3714 <bar xmlns="http://www.example.com"/> 3715 </valid> 3716 </testCase> 3717 <testCase> 3718 <section>6.1</section> 3719 <correct> 3720 <element xmlns="http://relaxng.org/ns/structure/1.0"> 3721 <name ns="http://www.example.com">foo</name> 3722 <empty/> 3723 </element> 3724 </correct> 3725 <valid> 3726 <foo xmlns="http://www.example.com"/> 3727 </valid> 3728 <invalid> 3729 <foo/> 3730 </invalid> 3731 <invalid> 3732 <bar xmlns="http://www.example.com"/> 3733 </invalid> 3734 <invalid> 3735 <foo xmlns="http://www.example.org"/> 3736 </invalid> 3737 </testCase> 3738 <testCase> 3739 <section>6.1</section> 3740 <correct> 3741 <element xmlns="http://relaxng.org/ns/structure/1.0"> 3742 <name ns="">foo</name> 3743 <empty/> 3744 </element> 3745 </correct> 3746 <invalid> 3747 <foo xmlns="http://www.example.com"/> 3748 </invalid> 3749 <valid> 3750 <foo/> 3751 </valid> 3752 <invalid> 3753 <bar xmlns="http://www.example.com"/> 3754 </invalid> 3755 <invalid> 3756 <bar/> 3757 </invalid> 3758 </testCase> 3759 <testCase> 3760 <section>6.1</section> 3761 <correct> 3762 <element xmlns="http://relaxng.org/ns/structure/1.0"> 3763 <choice> 3764 <name ns="">foo</name> 3765 <name ns="">bar</name> 3766 </choice> 3767 <empty/> 3768 </element> 3769 </correct> 3770 <invalid> 3771 <baz/> 3772 </invalid> 3773 <valid> 3774 <foo/> 3775 </valid> 3776 <valid> 3777 <bar/> 3778 </valid> 3779 </testCase> 3780 </testSuite> 3781 <testSuite> 3782 <section>6.2</section> 3783 <testSuite> 3784 <section>6.2.1</section> 3785 <testCase> 3786 <section>6.2.1</section> 3787 <correct> 3788 <choice xmlns="http://relaxng.org/ns/structure/1.0"> 3789 <element name="foo"> 3790 <empty/> 3791 </element> 3792 <element name="bar"> 3793 <empty/> 3794 </element> 3795 </choice> 3796 </correct> 3797 <valid> 3798 <foo/> 3799 </valid> 3800 <valid> 3801 <bar/> 3802 </valid> 3803 <invalid> 3804 <baz/> 3805 </invalid> 3806 </testCase> 3807 <testCase> 3808 <section>6.2.1</section> 3809 <correct> 3810 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 3811 <choice> 3812 <group> 3813 <element name="bar1"> 3814 <empty/> 3815 </element> 3816 <element name="bar2"> 3817 <empty/> 3818 </element> 3819 </group> 3820 <group> 3821 <element name="bar1"> 3822 <empty/> 3823 </element> 3824 <element name="bar3"> 3825 <empty/> 3826 </element> 3827 </group> 3828 </choice> 3829 </element> 3830 </correct> 3831 <valid> 3832 <foo><bar1/><bar2/></foo> 3833 </valid> 3834 <valid> 3835 <foo><bar1/><bar3/></foo> 3836 </valid> 3837 <invalid> 3838 <foo><bar1/></foo> 3839 </invalid> 3840 <invalid> 3841 <foo/> 3842 </invalid> 3843 <invalid> 3844 <foo><bar2/></foo> 3845 </invalid> 3846 <invalid> 3847 <foo><bar3/></foo> 3848 </invalid> 3849 <invalid> 3850 <foo><bar1/><bar2/><bar3/></foo> 3851 </invalid> 3852 </testCase> 3853 <testCase> 3854 <section>6.2.1</section> 3855 <correct> 3856 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 3857 <choice> 3858 <group> 3859 <attribute name="bar1"> 3860 <text/> 3861 </attribute> 3862 <attribute name="bar2"> 3863 <text/> 3864 </attribute> 3865 </group> 3866 <group> 3867 <attribute name="bar1"> 3868 <text/> 3869 </attribute> 3870 <attribute name="bar3"> 3871 <text/> 3872 </attribute> 3873 </group> 3874 </choice> 3875 </element> 3876 </correct> 3877 <valid> 3878 <foo bar1="x" bar2="x"/> 3879 </valid> 3880 <valid> 3881 <foo bar1="x" bar3="x"/> 3882 </valid> 3883 <invalid> 3884 <foo/> 3885 </invalid> 3886 <invalid> 3887 <foo bar1="x"/> 3888 </invalid> 3889 <invalid> 3890 <foo bar2="x"/> 3891 </invalid> 3892 <invalid> 3893 <foo bar3="x"/> 3894 </invalid> 3895 <invalid> 3896 <foo bar1="x" bar2="x" bar3="x"/> 3897 </invalid> 3898 </testCase> 3899 <testCase> 3900 <section>6.2.1</section> 3901 <correct> 3902 <choice xmlns="http://relaxng.org/ns/structure/1.0"> 3903 <element name="foo"> 3904 <element name="bar"> 3905 <empty/> 3906 </element> 3907 </element> 3908 <element name="foo"> 3909 <element name="baz"> 3910 <empty/> 3911 </element> 3912 </element> 3913 </choice> 3914 </correct> 3915 <valid> 3916 <foo><bar/></foo> 3917 </valid> 3918 <valid> 3919 <foo><baz/></foo> 3920 </valid> 3921 <invalid> 3922 <foo/> 3923 </invalid> 3924 <invalid> 3925 <foo><bar/><bar/></foo> 3926 </invalid> 3927 <invalid> 3928 <foo><foo/></foo> 3929 </invalid> 3930 <invalid> 3931 <bar/> 3932 </invalid> 3933 <invalid> 3934 <fobaz/> 3935 </invalid> 3936 </testCase> 3937 </testSuite> 3938 <testSuite> 3939 <section>6.2.2</section> 3940 <testCase> 3941 <section>6.2.2</section> 3942 <correct> 3943 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 3944 <group> 3945 <element name="bar"> 3946 <empty/> 3947 </element> 3948 <element name="baz"> 3949 <empty/> 3950 </element> 3951 </group> 3952 </element> 3953 </correct> 3954 <valid> 3955 <foo><bar/><baz/></foo> 3956 </valid> 3957 <invalid> 3958 <foo><baz/><bar/></foo> 3959 </invalid> 3960 <invalid> 3961 <foo><bar/><baz/><bar/><baz/></foo> 3962 </invalid> 3963 <invalid> 3964 <foo/> 3965 </invalid> 3966 <invalid> 3967 <foo><bar/></foo> 3968 </invalid> 3969 <invalid> 3970 <foo><baz/></foo> 3971 </invalid> 3972 </testCase> 3973 <testCase> 3974 <section>6.2.2</section> 3975 <correct> 3976 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 3977 <group> 3978 <attribute name="bar"> 3979 <text/> 3980 </attribute> 3981 <attribute name="baz"> 3982 <text/> 3983 </attribute> 3984 </group> 3985 </element> 3986 </correct> 3987 <valid> 3988 <foo bar="x" baz="x"/> 3989 </valid> 3990 <invalid> 3991 <foo/> 3992 </invalid> 3993 </testCase> 3994 <testCase> 3995 <section>6.2.2</section> 3996 <correct> 3997 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 3998 <group> 3999 <attribute name="bar"> 4000 <text/> 4001 </attribute> 4002 <attribute name="baz"> 4003 <text/> 4004 </attribute> 4005 </group> 4006 </element> 4007 </correct> 4008 <valid> 4009 <foo bar="x" baz="x"/> 4010 </valid> 4011 <invalid> 4012 <foo/> 4013 </invalid> 4014 <invalid> 4015 <foo bar="x"/> 4016 </invalid> 4017 <invalid> 4018 <foo baz="x"/> 4019 </invalid> 4020 </testCase> 4021 <testCase> 4022 <section>6.2.2</section> 4023 <correct> 4024 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4025 <group> 4026 <attribute name="baz"> 4027 <text/> 4028 </attribute> 4029 <attribute name="bar"> 4030 <text/> 4031 </attribute> 4032 </group> 4033 </element> 4034 </correct> 4035 <valid> 4036 <foo bar="x" baz="x"/> 4037 </valid> 4038 <invalid> 4039 <foo/> 4040 </invalid> 4041 <invalid> 4042 <foo bar="x"/> 4043 </invalid> 4044 <invalid> 4045 <foo baz="x"/> 4046 </invalid> 4047 </testCase> 4048 <testCase> 4049 <section>6.2.2</section> 4050 <correct> 4051 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4052 <group> 4053 <attribute name="bar"> 4054 <text/> 4055 </attribute> 4056 <element name="baz"> 4057 <empty/> 4058 </element> 4059 </group> 4060 </element> 4061 </correct> 4062 <valid> 4063 <foo bar="x"><baz/></foo> 4064 </valid> 4065 <invalid> 4066 <foo><baz/></foo> 4067 </invalid> 4068 <invalid> 4069 <foo bar="x"/> 4070 </invalid> 4071 <invalid> 4072 <foo baz="x"><bar/></foo> 4073 </invalid> 4074 </testCase> 4075 <testCase> 4076 <section>6.2.2</section> 4077 <correct> 4078 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4079 <group> 4080 <element name="baz"> 4081 <empty/> 4082 </element> 4083 <attribute name="bar"> 4084 <text/> 4085 </attribute> 4086 </group> 4087 </element> 4088 </correct> 4089 <valid> 4090 <foo bar="x"><baz/></foo> 4091 </valid> 4092 <invalid> 4093 <foo><baz/></foo> 4094 </invalid> 4095 <invalid> 4096 <foo bar="x"/> 4097 </invalid> 4098 <invalid> 4099 <foo baz="x"><bar/></foo> 4100 </invalid> 4101 </testCase> 4102 </testSuite> 4103 <testSuite> 4104 <section>6.2.3</section> 4105 <testCase> 4106 <section>6.2.3</section> 4107 <correct> 4108 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4109 <empty/> 4110 </element> 4111 </correct> 4112 <valid> 4113 <foo/> 4114 </valid> 4115 <valid> 4116 <foo> </foo> 4117 </valid> 4118 <valid> 4119 <foo> 4120 4121 4122 </foo> 4123 </valid> 4124 <valid> 4125 <foo> 4126 <?target data?> 4127 <?target data?> 4128 <?target data?> 4129 <?target data?> 4130 </foo> 4131 </valid> 4132 <invalid> 4133 <foo>x</foo> 4134 </invalid> 4135 <invalid> 4136 <foo><bar/></foo> 4137 </invalid> 4138 <invalid> 4139 <foo bar="x"/> 4140 </invalid> 4141 </testCase> 4142 <testCase> 4143 <section>6.2.3</section> 4144 <correct> 4145 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4146 <attribute name="bar"> 4147 <empty/> 4148 </attribute> 4149 </element> 4150 </correct> 4151 <valid><foo bar=""/></valid> 4152 <valid><foo bar=" "/></valid> 4153 <invalid><foo bar="x"/></invalid> 4154 </testCase> 4155 <testCase> 4156 <section>6.2.3</section> 4157 <correct> 4158 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4159 <list> 4160 <empty/> 4161 </list> 4162 </element> 4163 </correct> 4164 <valid><foo/></valid> 4165 <valid><foo> </foo></valid> 4166 <invalid><foo>x</foo></invalid> 4167 <invalid><foo><bar/></foo></invalid> 4168 <invalid><foo bar=""/></invalid> 4169 </testCase> 4170 <testCase> 4171 <section>6.2.3</section> 4172 <correct> 4173 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4174 <attribute name="bar"> 4175 <list> 4176 <empty/> 4177 </list> 4178 </attribute> 4179 </element> 4180 </correct> 4181 <valid><foo bar=""/></valid> 4182 <valid><foo bar=" "/></valid> 4183 <invalid><foo bar="x"/></invalid> 4184 </testCase> 4185 <testCase> 4186 <section>6.2.3</section> 4187 <correct> 4188 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4189 <group> 4190 <element name="bar"> 4191 <empty/> 4192 </element> 4193 <choice> 4194 <empty/> 4195 <element name="baz"> 4196 <empty/> 4197 </element> 4198 </choice> 4199 </group> 4200 </element> 4201 </correct> 4202 <valid> 4203 <foo><bar/><baz/></foo> 4204 </valid> 4205 <valid> 4206 <foo><bar/></foo> 4207 </valid> 4208 <invalid> 4209 <foo></foo> 4210 </invalid> 4211 <invalid> 4212 <foo><bar/><baz/><baz/></foo> 4213 </invalid> 4214 </testCase> 4215 <testCase> 4216 <correct> 4217 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4218 <choice> 4219 <empty/> 4220 <attribute name="bar"> 4221 <text/> 4222 </attribute> 4223 </choice> 4224 </element> 4225 </correct> 4226 <valid> 4227 <foo bar="x"/> 4228 </valid> 4229 <valid> 4230 <foo/> 4231 </valid> 4232 <invalid> 4233 <foo baz="x"/> 4234 </invalid> 4235 <invalid> 4236 <foo><bar/></foo> 4237 </invalid> 4238 </testCase> 4239 </testSuite> 4240 <testSuite> 4241 <section>6.2.4</section> 4242 <testCase> 4243 <section>6.2.4</section> 4244 <correct> 4245 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4246 <text/> 4247 </element> 4248 </correct> 4249 <valid> 4250 <foo/> 4251 </valid> 4252 <valid> 4253 <foo> </foo> 4254 </valid> 4255 <valid> 4256 <foo>x</foo> 4257 </valid> 4258 <valid> 4259 <foo> 4260 x 4261 <?target data?> 4262 y 4263 </foo> 4264 </valid> 4265 <invalid> 4266 <foo><bar/></foo> 4267 </invalid> 4268 </testCase> 4269 <testCase> 4270 <section>6.2.4</section> 4271 <correct> 4272 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4273 <group> 4274 <text/> 4275 <element name="bar"> 4276 <empty/> 4277 </element> 4278 </group> 4279 </element> 4280 </correct> 4281 <valid> 4282 <foo><bar/></foo> 4283 </valid> 4284 <valid> 4285 <foo> 4286 <bar/> 4287 </foo> 4288 </valid> 4289 <valid> 4290 <foo> 4291 x 4292 <bar/> 4293 </foo> 4294 </valid> 4295 <valid> 4296 <foo> 4297 x 4298 <?target data?> 4299 y 4300 <bar/></foo> 4301 </valid> 4302 <invalid> 4303 <foo/> 4304 </invalid> 4305 <invalid> 4306 <foo><bar/>x</foo> 4307 </invalid> 4308 </testCase> 4309 <testCase> 4310 <section>6.2.4</section> 4311 <correct> 4312 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4313 <group> 4314 <element name="bar"> 4315 <empty/> 4316 </element> 4317 <text/> 4318 </group> 4319 </element> 4320 </correct> 4321 <valid> 4322 <foo><bar/></foo> 4323 </valid> 4324 <valid> 4325 <foo> 4326 <bar/> 4327 </foo> 4328 </valid> 4329 <invalid> 4330 <foo> 4331 x 4332 <bar/> 4333 </foo> 4334 </invalid> 4335 <valid> 4336 <foo> 4337 <bar/> 4338 x 4339 <?target data?> 4340 y 4341 </foo> 4342 </valid> 4343 <invalid> 4344 <foo/> 4345 </invalid> 4346 <valid> 4347 <foo><bar/>x</foo> 4348 </valid> 4349 </testCase> 4350 <testCase> 4351 <section>6.2.4</section> 4352 <correct> 4353 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4354 <interleave> 4355 <element name="bar"> 4356 <empty/> 4357 </element> 4358 <text/> 4359 </interleave> 4360 </element> 4361 </correct> 4362 <valid> 4363 <foo><bar/></foo> 4364 </valid> 4365 <valid> 4366 <foo> 4367 <bar/> 4368 </foo> 4369 </valid> 4370 <valid> 4371 <foo> 4372 x 4373 <bar/> 4374 </foo> 4375 </valid> 4376 <valid> 4377 <foo> 4378 <bar/> 4379 x 4380 <?target data?> 4381 y 4382 </foo> 4383 </valid> 4384 <invalid> 4385 <foo/> 4386 </invalid> 4387 <valid> 4388 <foo><bar/>x</foo> 4389 </valid> 4390 <valid> 4391 <foo>x<bar/>x</foo> 4392 </valid> 4393 <invalid> 4394 <foo>x<bar/>x<bar/></foo> 4395 </invalid> 4396 </testCase> 4397 <testCase> 4398 <section>6.2.4</section> 4399 <correct> 4400 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4401 <attribute name="bar"> 4402 <text/> 4403 </attribute> 4404 </element> 4405 </correct> 4406 <valid> 4407 <foo bar=""/> 4408 </valid> 4409 <valid> 4410 <foo bar="x"/> 4411 </valid> 4412 <valid> 4413 <foo bar=" "/> 4414 </valid> 4415 <invalid> 4416 <foo/> 4417 </invalid> 4418 <invalid> 4419 <foo><bar/>x<bar/></foo> 4420 </invalid> 4421 </testCase> 4422 </testSuite> 4423 <testSuite> 4424 <section>6.2.5</section> 4425 <testCase> 4426 <section>6.2.5</section> 4427 <correct> 4428 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4429 <oneOrMore> 4430 <element name="bar"> 4431 <empty/> 4432 </element> 4433 </oneOrMore> 4434 </element> 4435 </correct> 4436 <valid> 4437 <foo><bar/></foo> 4438 </valid> 4439 <valid> 4440 <foo><bar/><bar/></foo> 4441 </valid> 4442 <valid> 4443 <foo><bar/><bar/><bar/></foo> 4444 </valid> 4445 <invalid> 4446 <foo/> 4447 </invalid> 4448 </testCase> 4449 <testCase> 4450 <section>6.2.5</section> 4451 <correct> 4452 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4453 <oneOrMore> 4454 <group> 4455 <element name="bar"> 4456 <empty/> 4457 </element> 4458 <element name="bar"> 4459 <empty/> 4460 </element> 4461 </group> 4462 </oneOrMore> 4463 </element> 4464 </correct> 4465 <valid> 4466 <foo><bar/><bar/></foo> 4467 </valid> 4468 <valid> 4469 <foo><bar/><bar/><bar/><bar/></foo> 4470 </valid> 4471 <valid> 4472 <foo><bar/><bar/><bar/><bar/><bar/><bar/></foo> 4473 </valid> 4474 <invalid> 4475 <foo><bar/></foo> 4476 </invalid> 4477 <invalid> 4478 <foo/> 4479 </invalid> 4480 <invalid> 4481 <foo><bar/><bar/><bar/></foo> 4482 </invalid> 4483 </testCase> 4484 <testCase> 4485 <section>6.2.5</section> 4486 <correct> 4487 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4488 <oneOrMore> 4489 <attribute> 4490 <nsName ns=""/> 4491 <text/> 4492 </attribute> 4493 </oneOrMore> 4494 </element> 4495 </correct> 4496 <valid> 4497 <foo x=""/> 4498 </valid> 4499 <valid> 4500 <foo x="" y=""/> 4501 </valid> 4502 <valid> 4503 <foo x="" y="" z=""/> 4504 </valid> 4505 <invalid> 4506 <foo/> 4507 </invalid> 4508 <invalid> 4509 <foo xmlns:ns="http://www.example.com" ns:x=""/> 4510 </invalid> 4511 <invalid> 4512 <foo x="" xmlns:ns="http://www.example.com" ns:x=""/> 4513 </invalid> 4514 </testCase> 4515 <testCase> 4516 <section>6.2.5</section> 4517 <correct> 4518 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4519 <oneOrMore> 4520 <choice> 4521 <attribute name="bar"> 4522 <text/> 4523 </attribute> 4524 <element name="bar"> 4525 <text/> 4526 </element> 4527 </choice> 4528 </oneOrMore> 4529 </element> 4530 </correct> 4531 <valid> 4532 <foo bar=""><bar/><bar/></foo> 4533 </valid> 4534 <valid> 4535 <foo><bar/></foo> 4536 </valid> 4537 <valid> 4538 <foo bar=""/> 4539 </valid> 4540 <invalid> 4541 <foo/> 4542 </invalid> 4543 </testCase> 4544 </testSuite> 4545 <testSuite> 4546 <section>6.2.6</section> 4547 <testCase> 4548 <section>6.2.6</section> 4549 <correct> 4550 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4551 <interleave> 4552 <element name="bar"> 4553 <empty/> 4554 </element> 4555 <element name="baz"> 4556 <empty/> 4557 </element> 4558 </interleave> 4559 </element> 4560 </correct> 4561 <valid> 4562 <foo><bar/><baz/></foo> 4563 </valid> 4564 <valid> 4565 <foo><baz/><bar/></foo> 4566 </valid> 4567 <invalid> 4568 <foo><bar/></foo> 4569 </invalid> 4570 <invalid> 4571 <foo><baz/></foo> 4572 </invalid> 4573 <invalid> 4574 <foo><bar/><bar/></foo> 4575 </invalid> 4576 <invalid> 4577 <foo/> 4578 </invalid> 4579 </testCase> 4580 <testCase> 4581 <section>6.2.6</section> 4582 <correct> 4583 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4584 <interleave> 4585 <group> 4586 <element name="bar1"> 4587 <empty/> 4588 </element> 4589 <element name="bar2"> 4590 <empty/> 4591 </element> 4592 </group> 4593 <element name="baz"> 4594 <empty/> 4595 </element> 4596 </interleave> 4597 </element> 4598 </correct> 4599 <valid> 4600 <foo><baz/><bar1/><bar2/></foo> 4601 </valid> 4602 <valid> 4603 <foo><bar1/><baz/><bar2/></foo> 4604 </valid> 4605 <valid> 4606 <foo><bar1/><bar2/><baz/></foo> 4607 </valid> 4608 <invalid> 4609 <foo><baz/><bar2/><bar1/></foo> 4610 </invalid> 4611 <invalid> 4612 <foo><bar2/><bar1/></foo> 4613 </invalid> 4614 <invalid> 4615 <foo><baz/><bar2/><bar1/></foo> 4616 </invalid> 4617 <invalid> 4618 <foo><baz/><bar1/></foo> 4619 </invalid> 4620 <invalid> 4621 <foo><baz/><bar2/></foo> 4622 </invalid> 4623 </testCase> 4624 <testCase> 4625 <section>6.2.6</section> 4626 <correct> 4627 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4628 <interleave> 4629 <attribute name="bar"> 4630 <text/> 4631 </attribute> 4632 <attribute name="baz"> 4633 <text/> 4634 </attribute> 4635 </interleave> 4636 </element> 4637 </correct> 4638 <valid> 4639 <foo bar="" baz=""/> 4640 </valid> 4641 <invalid> 4642 <foo/> 4643 </invalid> 4644 <invalid> 4645 <foo/> 4646 </invalid> 4647 <invalid> 4648 <foo bar=""/> 4649 </invalid> 4650 <invalid> 4651 <foo baz=""/> 4652 </invalid> 4653 </testCase> 4654 <testCase> 4655 <section>6.2.6</section> 4656 <correct> 4657 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4658 <interleave> 4659 <element name="bar"> 4660 <empty/> 4661 </element> 4662 <attribute name="baz"> 4663 <text/> 4664 </attribute> 4665 </interleave> 4666 </element> 4667 </correct> 4668 <valid> 4669 <foo baz=""><bar/></foo> 4670 </valid> 4671 <invalid> 4672 <foo/> 4673 </invalid> 4674 <invalid> 4675 <foo bar=""/> 4676 </invalid> 4677 <invalid> 4678 <foo bar=""><baz/><baz/></foo> 4679 </invalid> 4680 <invalid> 4681 <foo><baz/><baz/></foo> 4682 </invalid> 4683 </testCase> 4684 </testSuite> 4685 <testSuite> 4686 <section>6.2.7</section> 4687 <testCase> 4688 <section>6.2.7</section> 4689 <correct> 4690 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4691 <attribute> 4692 <name ns="">bar</name> 4693 <value type="string" datatypeLibrary="">baz</value> 4694 </attribute> 4695 </element> 4696 </correct> 4697 <valid> 4698 <foo bar="baz"/> 4699 </valid> 4700 <invalid> 4701 <foo bar=" baz"/> 4702 </invalid> 4703 <invalid> 4704 <foo bar="b"/> 4705 </invalid> 4706 <invalid> 4707 <foo bar=""/> 4708 </invalid> 4709 <invalid> 4710 <foo bar=" "/> 4711 </invalid> 4712 <invalid> 4713 <foo><bar>baz</bar></foo> 4714 </invalid> 4715 </testCase> 4716 <testCase> 4717 <section>6.2.7</section> 4718 <correct> 4719 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4720 <attribute> 4721 <name ns="">bar</name> 4722 <choice> 4723 <value type="string" datatypeLibrary="">baz</value> 4724 <empty/> 4725 </choice> 4726 </attribute> 4727 </element> 4728 </correct> 4729 <valid> 4730 <foo bar="baz"/> 4731 </valid> 4732 <valid> 4733 <foo bar=""/> 4734 </valid> 4735 <invalid> 4736 <foo bar=" baz"/> 4737 </invalid> 4738 <invalid> 4739 <foo bar="b"/> 4740 </invalid> 4741 <invalid> 4742 <foo><bar>baz</bar></foo> 4743 </invalid> 4744 <invalid> 4745 <foo><bar/></foo> 4746 </invalid> 4747 <invalid> 4748 <foo/> 4749 </invalid> 4750 </testCase> 4751 <testCase> 4752 <section>6.2.7</section> 4753 <correct> 4754 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4755 <attribute> 4756 <name ns="">bar</name> 4757 <value type="string"/> 4758 </attribute> 4759 </element> 4760 </correct> 4761 <valid> 4762 <foo bar=""/> 4763 </valid> 4764 <invalid> 4765 <foo bar=" "/> 4766 </invalid> 4767 <invalid> 4768 <foo bar="x"/> 4769 </invalid> 4770 </testCase> 4771 <testCase> 4772 <section>6.2.7</section> 4773 <correct> 4774 <element xmlns="http://relaxng.org/ns/structure/1.0"> 4775 <name ns="">foo</name> 4776 <group> 4777 <element> 4778 <name ns="">bar</name> 4779 <empty/> 4780 </element> 4781 <element> 4782 <name ns="">baz</name> 4783 <empty/> 4784 </element> 4785 </group> 4786 </element> 4787 </correct> 4788 <valid> 4789 <foo><bar/><baz/></foo> 4790 </valid> 4791 <valid> 4792 <foo> 4793 <bar/> 4794 <baz/> 4795 </foo> 4796 </valid> 4797 <valid> 4798 <foo> 4799 <bar/> 4800 
 4801 <baz/> 4802 </foo> 4803 </valid> 4804 <invalid> 4805 <foo/> 4806 </invalid> 4807 <invalid> 4808 <bar><bar/><baz/></bar> 4809 </invalid> 4810 </testCase> 4811 <testCase> 4812 <section>6.2.7</section> 4813 <section>6.2.8</section> 4814 <correct> 4815 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4816 <value type="string"/> 4817 </element> 4818 </correct> 4819 <valid><foo/></valid> 4820 <invalid><foo> </foo></invalid> 4821 <invalid><foo>x</foo></invalid> 4822 </testCase> 4823 <testCase> 4824 <section>6.2.7</section> 4825 <section>6.2.8</section> 4826 <correct> 4827 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4828 <choice> 4829 <value type="string"/> 4830 <empty/> 4831 </choice> 4832 </element> 4833 </correct> 4834 <valid><foo/></valid> 4835 <valid><foo> </foo></valid> 4836 <invalid><foo>x</foo></invalid> 4837 </testCase> 4838 <testCase> 4839 <section>6.2.7</section> 4840 <section>6.2.8</section> 4841 <section>6.2.10</section> 4842 <correct> 4843 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4844 <list> 4845 <data type="token"/> 4846 </list> 4847 </element> 4848 </correct> 4849 <invalid><foo/></invalid> 4850 <invalid><foo> </foo></invalid> 4851 <valid><foo>x</foo></valid> 4852 <valid><foo> x </foo></valid> 4853 <invalid><foo>x y</foo></invalid> 4854 </testCase> 4855 <testCase> 4856 <section>6.2.7</section> 4857 <section>6.2.8</section> 4858 <requires datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/> 4859 <correct> 4860 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4861 <data type="string" 4862 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> 4863 <param name="minLength">2</param> 4864 </data> 4865 </element> 4866 </correct> 4867 <valid><foo>xx</foo></valid> 4868 <valid><foo>xxx</foo></valid> 4869 <valid><foo> </foo></valid> 4870 <valid><foo> </foo></valid> 4871 <invalid><foo>x</foo></invalid> 4872 <invalid><foo> </foo></invalid> 4873 <invalid><foo/></invalid> 4874 </testCase> 4875 <testCase> 4876 <section>6.2.7</section> 4877 <section>6.2.8</section> 4878 <correct> 4879 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4880 <choice> 4881 <value>x</value> 4882 <element name="bar"> 4883 <empty/> 4884 </element> 4885 </choice> 4886 </element> 4887 </correct> 4888 <valid><foo> x </foo></valid> 4889 <valid><foo>x</foo></valid> 4890 <invalid><foo>y</foo></invalid> 4891 <valid><foo><bar/></foo></valid> 4892 <valid> 4893 <foo> 4894 <bar/> 4895 </foo> 4896 </valid> 4897 <invalid><foo>x<bar/></foo></invalid> 4898 <invalid><foo/></invalid> 4899 <invalid><foo><bar/>x</foo></invalid> 4900 </testCase> 4901 <testCase> 4902 <section>6.2.7</section> 4903 <section>6.2.8</section> 4904 <correct> 4905 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4906 <choice> 4907 <value>x</value> 4908 <mixed> 4909 <element name="bar"> 4910 <empty/> 4911 </element> 4912 </mixed> 4913 </choice> 4914 </element> 4915 </correct> 4916 <valid><foo> x </foo></valid> 4917 <valid><foo>x</foo></valid> 4918 <invalid><foo>y</foo></invalid> 4919 <valid><foo><bar/></foo></valid> 4920 <valid> 4921 <foo> 4922 <bar/> 4923 </foo> 4924 </valid> 4925 <valid><foo>x<bar/></foo></valid> 4926 <invalid><foo/></invalid> 4927 <valid><foo><bar/>x</foo></valid> 4928 </testCase> 4929 </testSuite> 4930 <testSuite> 4931 <section>6.2.8</section> 4932 <testCase> 4933 <section>6.2.8</section> 4934 <correct> 4935 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4936 <data type="string"> 4937 <except> 4938 <choice> 4939 <value>x</value> 4940 <value>y</value> 4941 </choice> 4942 </except> 4943 </data> 4944 </element> 4945 </correct> 4946 <valid> 4947 <foo>xyzzy</foo> 4948 </valid> 4949 <invalid> 4950 <foo>x</foo> 4951 </invalid> 4952 <invalid> 4953 <foo>y</foo> 4954 </invalid> 4955 <invalid> 4956 <foo> x</foo> 4957 </invalid> 4958 </testCase> 4959 <testCase> 4960 <section>6.2.8</section> 4961 <correct> 4962 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4963 <data type="string"/> 4964 </element> 4965 </correct> 4966 <valid> 4967 <foo/> 4968 </valid> 4969 </testCase> 4970 <testCase> 4971 <section>6.2.8</section> 4972 <correct> 4973 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4974 <value/> 4975 </element> 4976 </correct> 4977 <valid> 4978 <foo/> 4979 </valid> 4980 </testCase> 4981 <testCase> 4982 <section>6.2.8</section> 4983 <correct> 4984 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 4985 <data type="string"> 4986 <except> 4987 <value/> 4988 </except> 4989 </data> 4990 </element> 4991 </correct> 4992 <invalid> 4993 <foo/> 4994 </invalid> 4995 <valid> 4996 <foo>x</foo> 4997 </valid> 4998 </testCase> 4999 </testSuite> 5000 <testSuite> 5001 <section>6.2.9</section> 5002 <testCase> 5003 <section>6.2.9</section> 5004 <correct> 5005 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5006 <data type="string" datatypeLibrary=""/> 5007 </element> 5008 </correct> 5009 <valid> 5010 <foo>xyzzy</foo> 5011 </valid> 5012 <valid> 5013 <foo> 5014 x 5015 <?target data?> 5016 y 5017 <?target data?> 5018 z 5019 </foo> 5020 </valid> 5021 <valid> 5022 <foo></foo> 5023 </valid> 5024 <valid> 5025 <foo> 5026 </foo> 5027 </valid> 5028 <invalid> 5029 <foo><bar/></foo> 5030 </invalid> 5031 <invalid> 5032 <foo bar=""/> 5033 </invalid> 5034 </testCase> 5035 <testCase> 5036 <section>6.2.9</section> 5037 <correct> 5038 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5039 <data type="token" datatypeLibrary=""/> 5040 </element> 5041 </correct> 5042 <valid> 5043 <foo>xyzzy</foo> 5044 </valid> 5045 <valid> 5046 <foo> 5047 x 5048 <?target data?> 5049 y 5050 <?target data?> 5051 z 5052 </foo> 5053 </valid> 5054 <valid> 5055 <foo></foo> 5056 </valid> 5057 <valid> 5058 <foo> 5059 </foo> 5060 </valid> 5061 <invalid> 5062 <foo><bar/></foo> 5063 </invalid> 5064 <invalid> 5065 <foo bar=""/> 5066 </invalid> 5067 </testCase> 5068 <testCase> 5069 <section>6.2.9</section> 5070 <correct> 5071 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5072 <value type="string" datatypeLibrary="">x</value> 5073 </element> 5074 </correct> 5075 <valid><foo>x</foo></valid> 5076 <invalid><foo>xy</foo></invalid> 5077 <invalid><foo> x</foo></invalid> 5078 <invalid><foo/></invalid> 5079 </testCase> 5080 <testCase> 5081 <section>6.2.9</section> 5082 <correct> 5083 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5084 <value type="string" datatypeLibrary=""> x</value> 5085 </element> 5086 </correct> 5087 <valid><foo> x</foo></valid> 5088 <invalid><foo> xy</foo></invalid> 5089 <invalid><foo>x</foo></invalid> 5090 <invalid><foo/></invalid> 5091 </testCase> 5092 <testCase> 5093 <section>6.2.9</section> 5094 <correct> 5095 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5096 <value type="token" datatypeLibrary="">x</value> 5097 </element> 5098 </correct> 5099 <valid><foo>x</foo></valid> 5100 <valid><foo> x</foo></valid> 5101 <valid><foo>x </foo></valid> 5102 <valid><foo>

	 x

	 </foo></valid> 5103 <invalid><foo/></invalid> 5104 <invalid><foo>xy</foo></invalid> 5105 </testCase> 5106 <testCase> 5107 <section>6.2.9</section> 5108 <correct> 5109 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5110 <value type="token" datatypeLibrary="">x y</value> 5111 </element> 5112 </correct> 5113 <valid><foo>x y</foo></valid> 5114 <valid><foo> x y </foo></valid> 5115 <valid><foo>x

	 y</foo></valid> 5116 <invalid><foo>xy</foo></invalid> 5117 </testCase> 5118 <testCase> 5119 <section>6.2.9</section> 5120 <correct> 5121 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5122 <value type="token" datatypeLibrary="">

	 x

	 </value> 5123 </element> 5124 </correct> 5125 <valid><foo>x</foo></valid> 5126 <valid><foo> x</foo></valid> 5127 <valid><foo>x </foo></valid> 5128 <valid><foo>
	x 
</foo></valid> 5129 <invalid><foo/></invalid> 5130 <invalid><foo>xy</foo></invalid> 5131 </testCase> 5132 <testCase> 5133 <section>6.2.9</section> 5134 <correct> 5135 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5136 <value type="token" datatypeLibrary="">x

	 y</value> 5137 </element> 5138 </correct> 5139 <valid><foo>x y</foo></valid> 5140 <valid><foo>x y</foo></valid> 5141 <valid><foo> x y </foo></valid> 5142 <valid><foo>x
	y</foo></valid> 5143 <valid><foo>x 
y</foo></valid> 5144 <invalid><foo/></invalid> 5145 <invalid><foo>xy</foo></invalid> 5146 </testCase> 5147 <testCase> 5148 <section>6.2.9</section> 5149 <incorrect> 5150 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5151 <data type="decimal" datatypeLibrary=""/> 5152 </element> 5153 </incorrect> 5154 </testCase> 5155 <testCase> 5156 <section>6.2.9</section> 5157 <incorrect> 5158 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5159 <value type="decimal" datatypeLibrary=""/> 5160 </element> 5161 </incorrect> 5162 </testCase> 5163 <testCase> 5164 <section>6.2.9</section> 5165 <incorrect> 5166 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5167 <data type="string" datatypeLibrary=""> 5168 <param name="length">2</param> 5169 </data> 5170 </element> 5171 </incorrect> 5172 </testCase> 5173 <testCase> 5174 <section>6.2.9</section> 5175 <incorrect> 5176 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5177 <data type="token" datatypeLibrary=""> 5178 <param name="length">2</param> 5179 </data> 5180 </element> 5181 </incorrect> 5182 </testCase> 5183 </testSuite> 5184 <testSuite> 5185 <section>6.2.10</section> 5186 <testCase> 5187 <section>6.2.10</section> 5188 <correct> 5189 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5190 <list> 5191 <value type="string">x</value> 5192 </list> 5193 </element> 5194 </correct> 5195 <valid> 5196 <foo>x</foo> 5197 </valid> 5198 <valid> 5199 <foo> x </foo> 5200 </valid> 5201 <invalid> 5202 <foo>x x</foo> 5203 </invalid> 5204 </testCase> 5205 <testCase> 5206 <section>6.2.10</section> 5207 <correct> 5208 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5209 <list> 5210 <oneOrMore> 5211 <value type="string">x</value> 5212 </oneOrMore> 5213 </list> 5214 </element> 5215 </correct> 5216 <valid> 5217 <foo>x</foo> 5218 </valid> 5219 <valid> 5220 <foo> x x x x </foo> 5221 </valid> 5222 <invalid> 5223 <foo/> 5224 </invalid> 5225 <invalid> 5226 <foo>x y</foo> 5227 </invalid> 5228 </testCase> 5229 <testCase> 5230 <section>6.2.10</section> 5231 <correct> 5232 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5233 <list> 5234 <group> 5235 <value type="string">x</value> 5236 <value type="string">y</value> 5237 </group> 5238 </list> 5239 </element> 5240 </correct> 5241 <valid> 5242 <foo>x y</foo> 5243 </valid> 5244 <valid> 5245 <foo>x y</foo> 5246 </valid> 5247 <valid> 5248 <foo>
x
y	</foo> 5249 </valid> 5250 <invalid> 5251 <foo>x</foo> 5252 </invalid> 5253 </testCase> 5254 <testCase> 5255 <section>6.2.10</section> 5256 <correct> 5257 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5258 <list> 5259 <group> 5260 <data type="token"/> 5261 <data type="token"/> 5262 </group> 5263 </list> 5264 </element> 5265 </correct> 5266 <valid> 5267 <foo>x y</foo> 5268 </valid> 5269 <invalid> 5270 <foo/> 5271 </invalid> 5272 <invalid> 5273 <foo>x y z</foo> 5274 </invalid> 5275 </testCase> 5276 <testCase> 5277 <section>6.2.10</section> 5278 <correct> 5279 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 5280 <list> 5281 <value>x y</value> 5282 </list> 5283 </element> 5284 </correct> 5285 <invalid> 5286 <foo>x y</foo> 5287 </invalid> 5288 </testCase> 5289 </testSuite> 5290 </testSuite> 5291 </testSuite> 5292 <testSuite> 5293 <section>7</section> 5294 <testSuite> 5295 <section>7.1</section> 5296 <testCase> 5297 <section>7.1.1</section> 5298 <incorrect> 5299 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5300 <start> 5301 <element name="foo"> 5302 <attribute name="bar"> 5303 <element name="baz"> 5304 <empty/> 5305 </element> 5306 </attribute> 5307 </element> 5308 </start> 5309 </grammar> 5310 </incorrect> 5311 </testCase> 5312 <testCase> 5313 <section>7.1.1</section> 5314 <incorrect> 5315 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5316 <start> 5317 <element name="foo"> 5318 <attribute name="bar"> 5319 <choice> 5320 <element name="baz"> 5321 <empty/> 5322 </element> 5323 <text/> 5324 </choice> 5325 </attribute> 5326 </element> 5327 </start> 5328 </grammar> 5329 </incorrect> 5330 </testCase> 5331 <testCase> 5332 <section>7.1.1</section> 5333 <incorrect> 5334 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5335 <start> 5336 <element name="foo"> 5337 <attribute name="bar"> 5338 <attribute name="baz"/> 5339 </attribute> 5340 </element> 5341 </start> 5342 </grammar> 5343 </incorrect> 5344 </testCase> 5345 <testCase> 5346 <section>7.1.1</section> 5347 <incorrect> 5348 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5349 <start> 5350 <element name="foo"> 5351 <attribute name="bar"> 5352 <choice> 5353 <attribute name="baz"/> 5354 <text/> 5355 </choice> 5356 </attribute> 5357 </element> 5358 </start> 5359 </grammar> 5360 </incorrect> 5361 </testCase> 5362 <testCase> 5363 <section>7.1.2</section> 5364 <incorrect> 5365 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5366 <start> 5367 <element name="foo"> 5368 <oneOrMore> 5369 <group> 5370 <attribute name="bar"/> 5371 <attribute name="baz"/> 5372 </group> 5373 </oneOrMore> 5374 </element> 5375 </start> 5376 </grammar> 5377 </incorrect> 5378 </testCase> 5379 <testCase> 5380 <section>7.1.2</section> 5381 <incorrect> 5382 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5383 <start> 5384 <element name="foo"> 5385 <oneOrMore> 5386 <group> 5387 <attribute> 5388 <anyName/> 5389 </attribute> 5390 <attribute> 5391 <anyName/> 5392 </attribute> 5393 </group> 5394 </oneOrMore> 5395 </element> 5396 </start> 5397 </grammar> 5398 </incorrect> 5399 </testCase> 5400 <testCase> 5401 <section>7.1.2</section> 5402 <incorrect> 5403 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5404 <start> 5405 <element name="foo"> 5406 <oneOrMore> 5407 <choice> 5408 <group> 5409 <choice> 5410 <attribute name="bar"/> 5411 <attribute name="baz"/> 5412 </choice> 5413 <choice> 5414 <attribute name="bar"/> 5415 <attribute name="baz"/> 5416 </choice> 5417 </group> 5418 <attribute name="bar"/> 5419 </choice> 5420 </oneOrMore> 5421 </element> 5422 </start> 5423 </grammar> 5424 </incorrect> 5425 </testCase> 5426 <testCase> 5427 <section>7.1.2</section> 5428 <incorrect> 5429 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5430 <start> 5431 <element name="foo"> 5432 <oneOrMore> 5433 <interleave> 5434 <attribute name="bar"/> 5435 <attribute name="baz"/> 5436 </interleave> 5437 </oneOrMore> 5438 </element> 5439 </start> 5440 </grammar> 5441 </incorrect> 5442 </testCase> 5443 <testCase> 5444 <section>7.1.2</section> 5445 <incorrect> 5446 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5447 <start> 5448 <element name="foo"> 5449 <oneOrMore> 5450 <interleave> 5451 <attribute> 5452 <anyName/> 5453 </attribute> 5454 <attribute> 5455 <anyName/> 5456 </attribute> 5457 </interleave> 5458 </oneOrMore> 5459 </element> 5460 </start> 5461 </grammar> 5462 </incorrect> 5463 </testCase> 5464 <testCase> 5465 <section>7.1.2</section> 5466 <incorrect> 5467 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5468 <start> 5469 <element name="foo"> 5470 <oneOrMore> 5471 <choice> 5472 <interleave> 5473 <choice> 5474 <attribute name="bar"/> 5475 <attribute name="baz"/> 5476 </choice> 5477 <choice> 5478 <attribute name="bar"/> 5479 <attribute name="baz"/> 5480 </choice> 5481 </interleave> 5482 <attribute name="bar"/> 5483 </choice> 5484 </oneOrMore> 5485 </element> 5486 </start> 5487 </grammar> 5488 </incorrect> 5489 </testCase> 5490 <testCase> 5491 <section>7.1.3</section> 5492 <incorrect> 5493 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5494 <start> 5495 <element name="foo"> 5496 <list> 5497 <list> 5498 <data type="token"/> 5499 </list> 5500 </list> 5501 </element> 5502 </start> 5503 </grammar> 5504 </incorrect> 5505 </testCase> 5506 <testCase> 5507 <section>7.1.3</section> 5508 <incorrect> 5509 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5510 <start> 5511 <element name="foo"> 5512 <list> 5513 <choice> 5514 <list> 5515 <data type="token"/> 5516 </list> 5517 <data type="token"/> 5518 </choice> 5519 </list> 5520 </element> 5521 </start> 5522 </grammar> 5523 </incorrect> 5524 </testCase> 5525 <testCase> 5526 <section>7.1.3</section> 5527 <incorrect> 5528 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5529 <start> 5530 <element name="foo"> 5531 <list> 5532 <element name="bar"> 5533 <empty/> 5534 </element> 5535 </list> 5536 </element> 5537 </start> 5538 </grammar> 5539 </incorrect> 5540 </testCase> 5541 <testCase> 5542 <section>7.1.3</section> 5543 <incorrect> 5544 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5545 <start> 5546 <element name="foo"> 5547 <list> 5548 <choice> 5549 <data type="token"/> 5550 <element name="bar"> 5551 <empty/> 5552 </element> 5553 </choice> 5554 </list> 5555 </element> 5556 </start> 5557 </grammar> 5558 </incorrect> 5559 </testCase> 5560 <testCase> 5561 <section>7.1.3</section> 5562 <incorrect> 5563 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5564 <start> 5565 <element name="foo"> 5566 <list> 5567 <attribute name="bar"> 5568 <empty/> 5569 </attribute> 5570 </list> 5571 </element> 5572 </start> 5573 </grammar> 5574 </incorrect> 5575 </testCase> 5576 <testCase> 5577 <section>7.1.3</section> 5578 <incorrect> 5579 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5580 <start> 5581 <element name="foo"> 5582 <list> 5583 <choice> 5584 <attribute name="bar"> 5585 <empty/> 5586 </attribute> 5587 <data type="token"/> 5588 </choice> 5589 </list> 5590 </element> 5591 </start> 5592 </grammar> 5593 </incorrect> 5594 </testCase> 5595 <testCase> 5596 <section>7.1.3</section> 5597 <incorrect> 5598 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5599 <start> 5600 <element name="foo"> 5601 <list> 5602 <choice> 5603 <text/> 5604 <data type="token"/> 5605 </choice> 5606 </list> 5607 </element> 5608 </start> 5609 </grammar> 5610 </incorrect> 5611 </testCase> 5612 <testCase> 5613 <section>7.1.3</section> 5614 <incorrect> 5615 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5616 <start> 5617 <element name="foo"> 5618 <list> 5619 <interleave> 5620 <value>x</value> 5621 <value>y</value> 5622 </interleave> 5623 </list> 5624 </element> 5625 </start> 5626 </grammar> 5627 </incorrect> 5628 </testCase> 5629 <testCase> 5630 <section>7.1.3</section> 5631 <incorrect> 5632 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5633 <start> 5634 <element name="foo"> 5635 <list> 5636 <choice> 5637 <interleave> 5638 <value>x</value> 5639 <value>y</value> 5640 </interleave> 5641 <value>z</value> 5642 </choice> 5643 </list> 5644 </element> 5645 </start> 5646 </grammar> 5647 </incorrect> 5648 </testCase> 5649 <testCase> 5650 <section>7.1.4</section> 5651 <incorrect> 5652 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5653 <start> 5654 <element name="foo"> 5655 <data type="string"> 5656 <except> 5657 <attribute name="bar"/> 5658 </except> 5659 </data> 5660 </element> 5661 </start> 5662 </grammar> 5663 </incorrect> 5664 </testCase> 5665 <testCase> 5666 <section>7.1.4</section> 5667 <incorrect> 5668 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5669 <start> 5670 <element name="foo"> 5671 <data type="string"> 5672 <except> 5673 <element name="bar"> 5674 <empty/> 5675 </element> 5676 </except> 5677 </data> 5678 </element> 5679 </start> 5680 </grammar> 5681 </incorrect> 5682 </testCase> 5683 <testCase> 5684 <section>7.1.4</section> 5685 <incorrect> 5686 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5687 <start> 5688 <element name="foo"> 5689 <data type="string"> 5690 <except> 5691 <text/> 5692 </except> 5693 </data> 5694 </element> 5695 </start> 5696 </grammar> 5697 </incorrect> 5698 </testCase> 5699 <testCase> 5700 <section>7.1.4</section> 5701 <incorrect> 5702 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5703 <start> 5704 <element name="foo"> 5705 <data type="string"> 5706 <except> 5707 <list> 5708 <data type="token"/> 5709 </list> 5710 </except> 5711 </data> 5712 </element> 5713 </start> 5714 </grammar> 5715 </incorrect> 5716 </testCase> 5717 <testCase> 5718 <section>7.1.4</section> 5719 <incorrect> 5720 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5721 <start> 5722 <element name="foo"> 5723 <data type="string"> 5724 <except> 5725 <group> 5726 <data type="token"/> 5727 <data type="token"/> 5728 </group> 5729 </except> 5730 </data> 5731 </element> 5732 </start> 5733 </grammar> 5734 </incorrect> 5735 </testCase> 5736 <testCase> 5737 <section>7.1.4</section> 5738 <incorrect> 5739 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5740 <start> 5741 <element name="foo"> 5742 <data type="string"> 5743 <except> 5744 <interleave> 5745 <data type="token"/> 5746 <data type="token"/> 5747 </interleave> 5748 </except> 5749 </data> 5750 </element> 5751 </start> 5752 </grammar> 5753 </incorrect> 5754 </testCase> 5755 <testCase> 5756 <section>7.1.4</section> 5757 <incorrect> 5758 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5759 <start> 5760 <element name="foo"> 5761 <data type="string"> 5762 <except> 5763 <oneOrMore> 5764 <data type="token"/> 5765 </oneOrMore> 5766 </except> 5767 </data> 5768 </element> 5769 </start> 5770 </grammar> 5771 </incorrect> 5772 </testCase> 5773 <testCase> 5774 <section>7.1.4</section> 5775 <incorrect> 5776 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5777 <start> 5778 <element name="foo"> 5779 <data type="string"> 5780 <except> 5781 <empty/> 5782 </except> 5783 </data> 5784 </element> 5785 </start> 5786 </grammar> 5787 </incorrect> 5788 </testCase> 5789 <testCase> 5790 <section>7.1.5</section> 5791 <incorrect> 5792 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5793 <start> 5794 <attribute name="foo"/> 5795 </start> 5796 </grammar> 5797 </incorrect> 5798 </testCase> 5799 <testCase> 5800 <section>7.1.5</section> 5801 <incorrect> 5802 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5803 <start> 5804 <data type="string"/> 5805 </start> 5806 </grammar> 5807 </incorrect> 5808 </testCase> 5809 <testCase> 5810 <section>7.1.5</section> 5811 <incorrect> 5812 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5813 <start> 5814 <choice> 5815 <data type="string"/> 5816 <element name="foo"> 5817 <empty/> 5818 </element> 5819 </choice> 5820 </start> 5821 </grammar> 5822 </incorrect> 5823 </testCase> 5824 <testCase> 5825 <section>7.1.5</section> 5826 <incorrect> 5827 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5828 <start> 5829 <choice> 5830 <value>foo</value> 5831 <element name="foo"> 5832 <empty/> 5833 </element> 5834 </choice> 5835 </start> 5836 </grammar> 5837 </incorrect> 5838 </testCase> 5839 <testCase> 5840 <section>7.1.5</section> 5841 <incorrect> 5842 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5843 <start> 5844 <text/> 5845 </start> 5846 </grammar> 5847 </incorrect> 5848 </testCase> 5849 <testCase> 5850 <section>7.1.5</section> 5851 <incorrect> 5852 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5853 <start> 5854 <choice> 5855 <text/> 5856 <element name="foo"> 5857 <empty/> 5858 </element> 5859 </choice> 5860 </start> 5861 </grammar> 5862 </incorrect> 5863 </testCase> 5864 <testCase> 5865 <section>7.1.5</section> 5866 <incorrect> 5867 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5868 <start> 5869 <list> 5870 <data type="token"/> 5871 </list> 5872 </start> 5873 </grammar> 5874 </incorrect> 5875 </testCase> 5876 <testCase> 5877 <section>7.1.5</section> 5878 <incorrect> 5879 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5880 <start> 5881 <choice> 5882 <element name="foo"> 5883 <empty/> 5884 </element> 5885 <list> 5886 <data type="token"/> 5887 </list> 5888 </choice> 5889 </start> 5890 </grammar> 5891 </incorrect> 5892 </testCase> 5893 <testCase> 5894 <section>7.1.5</section> 5895 <incorrect> 5896 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5897 <start> 5898 <group> 5899 <element name="foo"> 5900 <empty/> 5901 </element> 5902 <element name="foo"> 5903 <empty/> 5904 </element> 5905 </group> 5906 </start> 5907 </grammar> 5908 </incorrect> 5909 </testCase> 5910 <testCase> 5911 <section>7.1.5</section> 5912 <incorrect> 5913 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5914 <start> 5915 <choice> 5916 <element name="foo"> 5917 <empty/> 5918 </element> 5919 <group> 5920 <element name="foo"> 5921 <empty/> 5922 </element> 5923 <element name="foo"> 5924 <empty/> 5925 </element> 5926 </group> 5927 </choice> 5928 </start> 5929 </grammar> 5930 </incorrect> 5931 </testCase> 5932 <testCase> 5933 <section>7.1.5</section> 5934 <incorrect> 5935 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5936 <start> 5937 <interleave> 5938 <element name="foo"> 5939 <empty/> 5940 </element> 5941 <element name="foo"> 5942 <empty/> 5943 </element> 5944 </interleave> 5945 </start> 5946 </grammar> 5947 </incorrect> 5948 </testCase> 5949 <testCase> 5950 <section>7.1.5</section> 5951 <incorrect> 5952 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5953 <start> 5954 <choice> 5955 <element name="foo"> 5956 <empty/> 5957 </element> 5958 <interleave> 5959 <element name="foo"> 5960 <empty/> 5961 </element> 5962 <element name="foo"> 5963 <empty/> 5964 </element> 5965 </interleave> 5966 </choice> 5967 </start> 5968 </grammar> 5969 </incorrect> 5970 </testCase> 5971 <testCase> 5972 <section>7.1.5</section> 5973 <incorrect> 5974 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5975 <start> 5976 <oneOrMore> 5977 <element name="foo"> 5978 <empty/> 5979 </element> 5980 </oneOrMore> 5981 </start> 5982 </grammar> 5983 </incorrect> 5984 </testCase> 5985 <testCase> 5986 <section>7.1.5</section> 5987 <incorrect> 5988 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 5989 <start> 5990 <choice> 5991 <oneOrMore> 5992 <element name="foo"> 5993 <empty/> 5994 </element> 5995 </oneOrMore> 5996 <element name="foo"> 5997 <empty/> 5998 </element> 5999 </choice> 6000 </start> 6001 </grammar> 6002 </incorrect> 6003 </testCase> 6004 <testCase> 6005 <section>7.1.5</section> 6006 <incorrect> 6007 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 6008 <start> 6009 <empty/> 6010 </start> 6011 </grammar> 6012 </incorrect> 6013 </testCase> 6014 <testCase> 6015 <section>7.1.5</section> 6016 <incorrect> 6017 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 6018 <start> 6019 <choice> 6020 <element name="foo"> 6021 <empty/> 6022 </element> 6023 <empty/> 6024 </choice> 6025 </start> 6026 </grammar> 6027 </incorrect> 6028 </testCase> 6029 <testCase> 6030 <section>7.1.5</section> 6031 <section>7</section> 6032 <section>4.18</section> 6033 <documentation>Tests that constraints are post-normalization</documentation> 6034 <correct> 6035 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 6036 <grammar> 6037 <start> 6038 <text/> 6039 </start> 6040 </grammar> 6041 </element> 6042 </correct> 6043 <valid> 6044 <foo>text</foo> 6045 </valid> 6046 </testCase> 6047 <testCase> 6048 <section>7.1.5</section> 6049 <section>7</section> 6050 <section>4.18</section> 6051 <incorrect> 6052 <text xmlns="http://relaxng.org/ns/structure/1.0"/> 6053 </incorrect> 6054 </testCase> 6055 <testCase> 6056 <section>7.1.1</section> 6057 <section>7</section> 6058 <section>4.20</section> 6059 <correct> 6060 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 6061 <optional> 6062 <attribute name="bar"> 6063 <group> 6064 <notAllowed/> 6065 <attribute name="baz"/> 6066 </group> 6067 </attribute> 6068 </optional> 6069 </element> 6070 </correct> 6071 <valid> 6072 <foo/> 6073 </valid> 6074 </testCase> 6075 <testCase> 6076 <section>7.1.1</section> 6077 <section>7</section> 6078 <section>4.20</section> 6079 <documentation>The nested attribute element is normalized out because 6080 of the not allowed.</documentation> 6081 <correct> 6082 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 6083 <attribute name="bar"> 6084 <choice> 6085 <text/> 6086 <group> 6087 <notAllowed/> 6088 <attribute name="baz"/> 6089 </group> 6090 </choice> 6091 </attribute> 6092 </element> 6093 </correct> 6094 <valid> 6095 <foo bar="baz"/> 6096 </valid> 6097 </testCase> 6098 <testCase> 6099 <section>7.1.2</section> 6100 <section>7</section> 6101 <section>4.12</section> 6102 <documentation>The group element is normalized out.</documentation> 6103 <correct> 6104 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 6105 <start> 6106 <element name="foo"> 6107 <oneOrMore> 6108 <group> 6109 <attribute> 6110 <anyName/> 6111 </attribute> 6112 </group> 6113 </oneOrMore> 6114 </element> 6115 </start> 6116 </grammar> 6117 </correct> 6118 <valid> 6119 <foo xyzzy1="val1" xyzzy2="val2"/> 6120 </valid> 6121 </testCase> 6122 <testCase> 6123 <section>7.1.2</section> 6124 <section>7</section> 6125 <section>4.21</section> 6126 <documentation>The group element is normalized out.</documentation> 6127 <correct> 6128 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 6129 <start> 6130 <element name="foo"> 6131 <oneOrMore> 6132 <group> 6133 <attribute> 6134 <anyName/> 6135 </attribute> 6136 <empty/> 6137 </group> 6138 </oneOrMore> 6139 </element> 6140 </start> 6141 </grammar> 6142 </correct> 6143 <valid> 6144 <foo xyzzy1="val1" xyzzy2="val2"/> 6145 </valid> 6146 </testCase> 6147 <testCase> 6148 <section>7.1.2</section> 6149 <section>7</section> 6150 <section>4.20</section> 6151 <documentation>The attribute elements are all normalized out.</documentation> 6152 <correct> 6153 <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> 6154 <optional> 6155 <attribute name="a1"> 6156 <attribute name="a2"> 6157 <attribute name="a3"> 6158 <notAllowed/> 6159 </attribute> 6160 </attribute> 6161 </attribute> 6162 </optional> 6163 </element> 6164 </correct> 6165 <valid> 6166 <foo/> 6167 </valid> 6168 </testCase> 6169 </testSuite> 6170 <testSuite> 6171 <section>7.2</section> 6172 <testCase> 6173 <section>7.2</section> 6174 <incorrect> 6175 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 6176 <start> 6177 <element name="foo"> 6178 <group> 6179 <data type="token"/> 6180 <data type="token"/> 6181 </group> 6182 </element> 6183 </start> 6184 </grammar> 6185 </incorrect> 6186 </testCase> 6187 <testCase> 6188 <documentation>Checks that normalization of notAllowed happens 6189 before string sequence checking.</documentation> 6190 <section>7.2</section> 6191 <section>4.20</section> 6192 <correct> 6193 <choice xmlns="http://relaxng.org/ns/structure/1.0"> 6194 <element name="foo"> 6195 <empty/> 6196 </element> 6197 <group> 6198 <notAllowed/> 6199 <element name="bar"> 6200 <group> 6201 <data type="token"/> 6202 <data type="token"/> 6203 </group> 6204 </element> 6205 </group> 6206 </choice> 6207 </correct> 6208 <valid> 6209 <foo/> 6210 </valid> 6211 </testCase> 6212 <testCase> 6213 <section>4.20</section> 6214 <section>7.2</section> 6215 <documentation>notAllowed in an element is not normalized</documentation> 6216 <incorrect> 6217 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6218 <choice> 6219 <group> 6220 <element name="bar"> 6221 <notAllowed/> 6222 </element> 6223 <data type="token"/> 6224 <data type="token"/> 6225 </group> 6226 <element name="baz"> 6227 <empty/> 6228 </element> 6229 </choice> 6230 </element> 6231 </incorrect> 6232 </testCase> 6233 </testSuite> 6234 <testSuite> 6235 <section>7.3</section> 6236 <testCase> 6237 <section>7.3</section> 6238 <incorrect> 6239 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6240 <attribute name="bar"/> 6241 <attribute name="bar"/> 6242 </element> 6243 </incorrect> 6244 </testCase> 6245 <testCase> 6246 <section>7.3</section> 6247 <incorrect> 6248 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6249 <attribute name="bar"/> 6250 <zeroOrMore> 6251 <attribute name="bar"/> 6252 </zeroOrMore> 6253 </element> 6254 </incorrect> 6255 </testCase> 6256 <testCase> 6257 <section>7.3</section> 6258 <correct> 6259 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6260 <oneOrMore> 6261 <attribute name="bar"/> 6262 </oneOrMore> 6263 </element> 6264 </correct> 6265 <valid> 6266 <foo bar="xx"/> 6267 </valid> 6268 </testCase> 6269 <testCase> 6270 <section>7.3</section> 6271 <incorrect> 6272 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6273 <interleave> 6274 <attribute name="bar"/> 6275 <attribute name="bar"/> 6276 </interleave> 6277 </element> 6278 </incorrect> 6279 </testCase> 6280 <testCase> 6281 <section>7.3</section> 6282 <incorrect> 6283 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6284 <optional> 6285 <attribute name="bar"/> 6286 </optional> 6287 <optional> 6288 <attribute name="bar"/> 6289 </optional> 6290 </element> 6291 </incorrect> 6292 </testCase> 6293 <testCase> 6294 <section>7.3</section> 6295 <incorrect> 6296 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6297 <attribute name="bar"/> 6298 <oneOrMore> 6299 <attribute> 6300 <anyName/> 6301 </attribute> 6302 </oneOrMore> 6303 </element> 6304 </incorrect> 6305 </testCase> 6306 <testCase> 6307 <section>7.3</section> 6308 <incorrect> 6309 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6310 <attribute name="bar"/> 6311 <oneOrMore> 6312 <attribute> 6313 <anyName> 6314 <except> 6315 <name>baz</name> 6316 </except> 6317 </anyName> 6318 </attribute> 6319 </oneOrMore> 6320 </element> 6321 </incorrect> 6322 </testCase> 6323 <testCase> 6324 <section>7.3</section> 6325 <correct> 6326 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6327 <attribute name="bar"/> 6328 <oneOrMore> 6329 <attribute> 6330 <anyName> 6331 <except> 6332 <name>bar</name> 6333 </except> 6334 </anyName> 6335 </attribute> 6336 </oneOrMore> 6337 </element> 6338 </correct> 6339 <valid> 6340 <foo bar="val" xyzzy="anotherval"/> 6341 </valid> 6342 <valid> 6343 <foo bar="val" baz=""/> 6344 </valid> 6345 <invalid> 6346 <foo bar="val"/> 6347 </invalid> 6348 <invalid> 6349 <foo/> 6350 </invalid> 6351 <invalid> 6352 <foo xyzzy="val"/> 6353 </invalid> 6354 </testCase> 6355 <testCase> 6356 <section>7.3</section> 6357 <incorrect> 6358 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6359 <attribute name="bar"/> 6360 <oneOrMore> 6361 <attribute> 6362 <nsName ns=""/> 6363 </attribute> 6364 </oneOrMore> 6365 </element> 6366 </incorrect> 6367 </testCase> 6368 <testCase> 6369 <section>7.3</section> 6370 <incorrect> 6371 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6372 <attribute name="bar"/> 6373 <oneOrMore> 6374 <attribute> 6375 <nsName ns=""> 6376 <except> 6377 <name>baz</name> 6378 </except> 6379 </nsName> 6380 </attribute> 6381 </oneOrMore> 6382 </element> 6383 </incorrect> 6384 </testCase> 6385 <testCase> 6386 <section>7.3</section> 6387 <incorrect> 6388 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6389 <oneOrMore> 6390 <attribute> 6391 <anyName/> 6392 </attribute> 6393 </oneOrMore> 6394 <oneOrMore> 6395 <attribute> 6396 <nsName ns=""/> 6397 </attribute> 6398 </oneOrMore> 6399 </element> 6400 </incorrect> 6401 </testCase> 6402 <testCase> 6403 <section>7.3</section> 6404 <incorrect> 6405 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6406 <oneOrMore> 6407 <attribute> 6408 <anyName/> 6409 </attribute> 6410 </oneOrMore> 6411 <oneOrMore> 6412 <attribute> 6413 <anyName/> 6414 </attribute> 6415 </oneOrMore> 6416 </element> 6417 </incorrect> 6418 </testCase> 6419 <testCase> 6420 <section>7.3</section> 6421 <incorrect> 6422 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6423 <oneOrMore> 6424 <attribute> 6425 <nsName ns=""/> 6426 </attribute> 6427 </oneOrMore> 6428 <oneOrMore> 6429 <attribute> 6430 <nsName ns=""> 6431 <except> 6432 <name>bar</name> 6433 </except> 6434 </nsName> 6435 </attribute> 6436 </oneOrMore> 6437 </element> 6438 </incorrect> 6439 </testCase> 6440 <testCase> 6441 <section>7.3</section> 6442 <incorrect> 6443 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6444 <oneOrMore> 6445 <attribute> 6446 <anyName> 6447 <except> 6448 <nsName> 6449 <except> 6450 <name>foo</name> 6451 </except> 6452 </nsName> 6453 </except> 6454 </anyName> 6455 </attribute> 6456 </oneOrMore> 6457 <attribute name="foo"/> 6458 </element> 6459 </incorrect> 6460 </testCase> 6461 <testCase> 6462 <section>7.3</section> 6463 <incorrect> 6464 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6465 <oneOrMore> 6466 <attribute> 6467 <anyName> 6468 <except> 6469 <nsName> 6470 <except> 6471 <name>foo</name> 6472 </except> 6473 </nsName> 6474 </except> 6475 </anyName> 6476 </attribute> 6477 </oneOrMore> 6478 <oneOrMore> 6479 <attribute> 6480 <nsName/> 6481 </attribute> 6482 </oneOrMore> 6483 </element> 6484 </incorrect> 6485 </testCase> 6486 <testCase> 6487 <section>7.3</section> 6488 <correct> 6489 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6490 <oneOrMore> 6491 <attribute> 6492 <anyName> 6493 <except> 6494 <nsName> 6495 <except> 6496 <name>bar</name> 6497 </except> 6498 </nsName> 6499 </except> 6500 </anyName> 6501 </attribute> 6502 </oneOrMore> 6503 <attribute name="baz"/> 6504 </element> 6505 </correct> 6506 <valid> 6507 <foo bar="xx" baz="yy"/> 6508 </valid> 6509 <invalid> 6510 <foo x="xx" baz="yy"/> 6511 </invalid> 6512 <valid> 6513 <foo xmlns:eg="http://www.example.com/" eg:x="xx" baz="yy"/> 6514 </valid> 6515 </testCase> 6516 <testCase> 6517 <section>7.3</section> 6518 <correct> 6519 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6520 <oneOrMore> 6521 <attribute> 6522 <nsName ns="http://www.example.com/1"/> 6523 </attribute> 6524 </oneOrMore> 6525 <oneOrMore> 6526 <attribute> 6527 <nsName ns="http://www.example.com/2"/> 6528 </attribute> 6529 </oneOrMore> 6530 </element> 6531 </correct> 6532 <valid> 6533 <foo xmlns:eg1="http://www.example.com/1" 6534 xmlns:eg2="http://www.example.com/2" 6535 eg1:x="xx" eg2:y="yy"/> 6536 </valid> 6537 </testCase> 6538 <testCase> 6539 <section>7.3</section> 6540 <correct> 6541 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6542 <choice> 6543 <attribute name="bar"/> 6544 <attribute name="bar"/> 6545 </choice> 6546 </element> 6547 </correct> 6548 <valid> 6549 <foo bar="xx"/> 6550 </valid> 6551 </testCase> 6552 <testCase> 6553 <section>7.3</section> 6554 <incorrect> 6555 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6556 <attribute name="bar"/> 6557 <choice> 6558 <attribute name="baz"/> 6559 <attribute name="bar"/> 6560 </choice> 6561 </element> 6562 </incorrect> 6563 </testCase> 6564 <testCase> 6565 <section>7.3</section> 6566 <incorrect> 6567 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6568 <attribute><anyName/><text/></attribute> 6569 </element> 6570 </incorrect> 6571 </testCase> 6572 <testCase> 6573 <section>7.3</section> 6574 <incorrect> 6575 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6576 <attribute><nsName ns =""/><text/></attribute> 6577 </element> 6578 </incorrect> 6579 </testCase> 6580 <testCase> 6581 <section>7.3</section> 6582 <incorrect> 6583 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6584 <attribute><choice><nsName ns =""/><name>foo</name></choice><text/></attribute> 6585 </element> 6586 </incorrect> 6587 </testCase> 6588 </testSuite> 6589 <testSuite> 6590 <section>7.4</section> 6591 <testCase> 6592 <section>7.4</section> 6593 <incorrect> 6594 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6595 <interleave> 6596 <element name="bar"> 6597 <empty/> 6598 </element> 6599 <element name="bar"> 6600 <empty/> 6601 </element> 6602 </interleave> 6603 </element> 6604 </incorrect> 6605 </testCase> 6606 <testCase> 6607 <section>7.4</section> 6608 <incorrect> 6609 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6610 <interleave> 6611 <element name="bar"> 6612 <empty/> 6613 </element> 6614 <interleave> 6615 <element name="baz"> 6616 <empty/> 6617 </element> 6618 <element name="bar"> 6619 <empty/> 6620 </element> 6621 </interleave> 6622 </interleave> 6623 </element> 6624 </incorrect> 6625 </testCase> 6626 <testCase> 6627 <section>7.4</section> 6628 <incorrect> 6629 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6630 <interleave> 6631 <element name="bar"> 6632 <empty/> 6633 </element> 6634 <group> 6635 <element name="baz"> 6636 <empty/> 6637 </element> 6638 <element name="bar"> 6639 <empty/> 6640 </element> 6641 </group> 6642 </interleave> 6643 </element> 6644 </incorrect> 6645 </testCase> 6646 <testCase> 6647 <section>7.4</section> 6648 <incorrect> 6649 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6650 <interleave> 6651 <element name="bar"> 6652 <empty/> 6653 </element> 6654 <group> 6655 <element name="baz"> 6656 <empty/> 6657 </element> 6658 <interleave> 6659 <element name="baz"> 6660 <empty/> 6661 </element> 6662 <element name="bar"> 6663 <empty/> 6664 </element> 6665 </interleave> 6666 </group> 6667 </interleave> 6668 </element> 6669 </incorrect> 6670 </testCase> 6671 <testCase> 6672 <section>7.4</section> 6673 <incorrect> 6674 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6675 <interleave> 6676 <element name="bar"> 6677 <empty/> 6678 </element> 6679 <optional> 6680 <element name="bar"> 6681 <empty/> 6682 </element> 6683 </optional> 6684 </interleave> 6685 </element> 6686 </incorrect> 6687 </testCase> 6688 <testCase> 6689 <section>7.4</section> 6690 <incorrect> 6691 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6692 <interleave> 6693 <element name="bar"> 6694 <empty/> 6695 </element> 6696 <element> 6697 <nsName ns=""/> 6698 <empty/> 6699 </element> 6700 </interleave> 6701 </element> 6702 </incorrect> 6703 </testCase> 6704 <testCase> 6705 <section>7.4</section> 6706 <incorrect> 6707 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6708 <interleave> 6709 <element name="bar"> 6710 <empty/> 6711 </element> 6712 <element> 6713 <anyName/> 6714 <empty/> 6715 </element> 6716 </interleave> 6717 </element> 6718 </incorrect> 6719 </testCase> 6720 <testCase> 6721 <section>7.4</section> 6722 <incorrect> 6723 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6724 <interleave> 6725 <element name="bar"> 6726 <empty/> 6727 </element> 6728 <element name="bar"> 6729 <notAllowed/> 6730 </element> 6731 </interleave> 6732 </element> 6733 </incorrect> 6734 </testCase> 6735 <testCase> 6736 <section>7.4</section> 6737 <correct> 6738 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6739 <interleave> 6740 <element name="bar"> 6741 <empty/> 6742 </element> 6743 <element> 6744 <anyName> 6745 <except> 6746 <name>bar</name> 6747 </except> 6748 </anyName> 6749 <empty/> 6750 </element> 6751 </interleave> 6752 </element> 6753 </correct> 6754 <valid> 6755 <foo><bar/><baz/></foo> 6756 </valid> 6757 </testCase> 6758 <testCase> 6759 <section>7.4</section> 6760 <correct> 6761 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6762 <interleave> 6763 <choice> 6764 <element name="bar"> 6765 <empty/> 6766 </element> 6767 <element name="bar"> 6768 <text/> 6769 </element> 6770 </choice> 6771 <element name="baz"> 6772 <empty/> 6773 </element> 6774 </interleave> 6775 </element> 6776 </correct> 6777 <valid> 6778 <foo><bar/><baz/></foo> 6779 </valid> 6780 </testCase> 6781 <testCase> 6782 <section>7.4</section> 6783 <incorrect> 6784 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6785 <interleave> 6786 <text/> 6787 <text/> 6788 </interleave> 6789 </element> 6790 </incorrect> 6791 </testCase> 6792 <testCase> 6793 <section>7.4</section> 6794 <incorrect> 6795 <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"> 6796 <mixed> 6797 <mixed> 6798 <element name="bar"> 6799 <empty/> 6800 </element> 6801 </mixed> 6802 <element name="baz"> 6803 <empty/> 6804 </element> 6805 </mixed> 6806 </element> 6807 </incorrect> 6808 </testCase> 6809 </testSuite> 6810 </testSuite> 6811 <testSuite> 6812 <documentation>Regressions</documentation> 6813 <testCase> 6814 <correct> 6815 <grammar xmlns="http://relaxng.org/ns/structure/1.0"> 6816 <start> 6817 <element name="foo"> 6818 <choice> 6819 <group> 6820 <attribute name="bar"><empty/></attribute> 6821 <element name="baz1"><empty/></element> 6822 </group> 6823 <group> 6824 <attribute name="bar"><text/></attribute> 6825 <element name="baz2"><empty/></element> 6826 </group> 6827 </choice> 6828 </element> 6829 </start> 6830 </grammar> 6831 </correct> 6832 <valid> 6833 <foo bar=" "><baz1/></foo> 6834 </valid> 6835 </testCase> 6836 <testCase> 6837 <correct> 6838 <notAllowed xmlns="http://relaxng.org/ns/structure/1.0"/> 6839 </correct> 6840 <invalid> 6841 <foo/> 6842 </invalid> 6843 </testCase> 6844 </testSuite> 6845 </testSuite> 6846