index.html 1.92 MB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 14138 14139 14140 14141 14142 14143 14144 14145 14146 14147 14148 14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 14292 14293 14294 14295 14296 14297 14298 14299 14300 14301 14302 14303 14304 14305 14306 14307 14308 14309 14310 14311 14312 14313 14314 14315 14316 14317 14318 14319 14320 14321 14322 14323 14324 14325 14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 14336 14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 14350 14351 14352 14353 14354 14355 14356 14357 14358 14359 14360 14361 14362 14363 14364 14365 14366 14367 14368 14369 14370 14371 14372 14373 14374 14375 14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 14428 14429 14430 14431 14432 14433 14434 14435 14436 14437 14438 14439 14440 14441 14442 14443 14444 14445 14446 14447 14448 14449 14450 14451 14452 14453 14454 14455 14456 14457 14458 14459 14460 14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 14478 14479 14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 14518 14519 14520 14521 14522 14523 14524 14525 14526 14527 14528 14529 14530 14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587 14588 14589 14590 14591 14592 14593 14594 14595 14596 14597 14598 14599 14600 14601 14602 14603 14604 14605 14606 14607 14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14648 14649 14650 14651 14652 14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 14664 14665 14666 14667 14668 14669 14670 14671 14672 14673 14674 14675 14676 14677 14678 14679 14680 14681 14682 14683 14684 14685 14686 14687 14688 14689 14690 14691 14692 14693 14694 14695 14696 14697 14698 14699 14700 14701 14702 14703 14704 14705 14706 14707 14708 14709 14710 14711 14712 14713 14714 14715 14716 14717 14718 14719 14720 14721 14722 14723 14724 14725 14726 14727 14728 14729 14730 14731 14732 14733 14734 14735 14736 14737 14738 14739 14740 14741 14742 14743 14744 14745 14746 14747 14748 14749 14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 14764 14765 14766 14767 14768 14769 14770 14771 14772 14773 14774 14775 14776 14777 14778 14779 14780 14781 14782 14783 14784 14785 14786 14787 14788 14789 14790 14791 14792 14793 14794 14795 14796 14797 14798 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888 14889 14890 14891 14892 14893 14894 14895 14896 14897 14898 14899 14900 14901 14902 14903 14904 14905 14906 14907 14908 14909 14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 14947 14948 14949 14950 14951 14952 14953 14954 14955 14956 14957 14958 14959 14960 14961 14962 14963 14964 14965 14966 14967 14968 14969 14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15126 15127 15128 15129 15130 15131 15132 15133 15134 15135 15136 15137 15138 15139 15140 15141 15142 15143 15144 15145 15146 15147 15148 15149 15150 15151 15152 15153 15154 15155 15156 15157 15158 15159 15160 15161 15162 15163 15164 15165 15166 15167 15168 15169 15170 15171 15172 15173 15174 15175 15176 15177 15178 15179 15180 15181 15182 15183 15184 15185 15186 15187 15188 15189 15190 15191 15192 15193 15194 15195 15196 15197 15198 15199 15200 15201 15202 15203 15204 15205 15206 15207 15208 15209 15210 15211 15212 15213 15214 15215 15216 15217 15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231 15232 15233 15234 15235 15236 15237 15238 15239 15240 15241 15242 15243 15244 15245 15246 15247 15248 15249 15250 15251 15252 15253 15254 15255 15256 15257 15258 15259 15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 15287 15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 15330 15331 15332 15333 15334 15335 15336 15337 15338 15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15352 15353 15354 15355 15356 15357 15358 15359 15360 15361 15362 15363 15364 15365 15366 15367 15368 15369 15370 15371 15372 15373 15374 15375 15376 15377 15378 15379 15380 15381 15382 15383 15384 15385 15386 15387 15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452 15453 15454 15455 15456 15457 15458 15459 15460 15461 15462 15463 15464 15465 15466 15467 15468 15469 15470 15471 15472 15473 15474 15475 15476 15477 15478 15479 15480 15481 15482 15483 15484 15485 15486 15487 15488 15489 15490 15491 15492 15493 15494 15495 15496 15497 15498 15499 15500 15501 15502 15503 15504 15505 15506 15507 15508 15509 15510 15511 15512 15513 15514 15515 15516 15517 15518 15519 15520 15521 15522 15523 15524 15525 15526 15527 15528 15529 15530 15531 15532 15533 15534 15535 15536 15537 15538 15539 15540 15541 15542 15543 15544 15545 15546 15547 15548 15549 15550 15551 15552 15553 15554 15555 15556 15557 15558 15559 15560 15561 15562 15563 15564 15565 15566 15567 15568 15569 15570 15571 15572 15573 15574 15575 15576 15577 15578 15579 15580 15581 15582 15583 15584 15585 15586 15587 15588 15589 15590 15591 15592 15593 15594 15595 15596 15597 15598 15599 15600 15601 15602 15603 15604 15605 15606 15607 15608 15609 15610 15611 15612 15613 15614 15615 15616 15617 15618 15619 15620 15621 15622 15623 15624 15625 15626 15627 15628 15629 15630 15631 15632 15633 15634 15635 15636 15637 15638 15639 15640 15641 15642 15643 15644 15645 15646 15647 15648 15649 15650 15651 15652 15653 15654 15655 15656 15657 15658 15659 15660 15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 15691 15692 15693 15694 15695 15696 15697 15698 15699 15700 15701 15702 15703 15704 15705 15706 15707 15708 15709 15710 15711 15712 15713 15714 15715 15716 15717 15718 15719 15720 15721 15722 15723 15724 15725 15726 15727 15728 15729 15730 15731 15732 15733 15734 15735 15736 15737 15738 15739 15740 15741 15742 15743 15744 15745 15746 15747 15748 15749 15750 15751 15752 15753 15754 15755 15756 15757 15758 15759 15760 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 15772 15773 15774 15775 15776 15777 15778 15779 15780 15781 15782 15783 15784 15785 15786 15787 15788 15789 15790 15791 15792 15793 15794 15795 15796 15797 15798 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 15828 15829 15830 15831 15832 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 15848 15849 15850 15851 15852 15853 15854 15855 15856 15857 15858 15859 15860 15861 15862 15863 15864 15865 15866 15867 15868 15869 15870 15871 15872 15873 15874 15875 15876 15877 15878 15879 15880 15881 15882 15883 15884 15885 15886 15887 15888 15889 15890 15891 15892 15893 15894 15895 15896 15897 15898 15899 15900 15901 15902 15903 15904 15905 15906 15907 15908 15909 15910 15911 15912 15913 15914 15915 15916 15917 15918 15919 15920 15921 15922 15923 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 15938 15939 15940 15941 15942 15943 15944 15945 15946 15947 15948 15949 15950 15951 15952 15953 15954 15955 15956 15957 15958 15959 15960 15961 15962 15963 15964 15965 15966 15967 15968 15969 15970 15971 15972 15973 15974 15975 15976 15977 15978 15979 15980 15981 15982 15983 15984 15985 15986 15987 15988 15989 15990 15991 15992 15993 15994 15995 15996 15997 15998 15999 16000 16001 16002 16003 16004 16005 16006 16007 16008 16009 16010 16011 16012 16013 16014 16015 16016 16017 16018 16019 16020 16021 16022 16023 16024 16025 16026 16027 16028 16029 16030 16031 16032 16033 16034 16035 16036 16037 16038 16039 16040 16041 16042 16043 16044 16045 16046 16047 16048 16049 16050 16051 16052 16053 16054 16055 16056 16057 16058 16059 16060 16061 16062 16063 16064 16065 16066 16067 16068 16069 16070 16071 16072 16073 16074 16075 16076 16077 16078 16079 16080 16081 16082 16083 16084 16085 16086 16087 16088 16089 16090 16091 16092 16093 16094 16095 16096 16097 16098 16099 16100 16101 16102 16103 16104 16105 16106 16107 16108 16109 16110 16111 16112 16113 16114 16115 16116 16117 16118 16119 16120 16121 16122 16123 16124 16125 16126 16127 16128 16129 16130 16131 16132 16133 16134 16135 16136 16137 16138 16139 16140 16141 16142 16143 16144 16145 16146 16147 16148 16149 16150 16151 16152 16153 16154 16155 16156 16157 16158 16159 16160 16161 16162 16163 16164 16165 16166 16167 16168 16169 16170 16171 16172 16173 16174 16175 16176 16177 16178 16179 16180 16181 16182 16183 16184 16185 16186 16187 16188 16189 16190 16191 16192 16193 16194 16195 16196 16197 16198 16199 16200 16201 16202 16203 16204 16205 16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 16216 16217 16218 16219 16220 16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 16232 16233 16234 16235 16236 16237 16238 16239 16240 16241 16242 16243 16244 16245 16246 16247 16248 16249 16250 16251 16252 16253 16254 16255 16256 16257 16258 16259 16260 16261 16262 16263 16264 16265 16266 16267 16268 16269 16270 16271 16272 16273 16274 16275 16276 16277 16278 16279 16280 16281 16282 16283 16284 16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 16320 16321 16322 16323 16324 16325 16326 16327 16328 16329 16330 16331 16332 16333 16334 16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 16346 16347 16348 16349 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437 16438 16439 16440 16441 16442 16443 16444 16445 16446 16447 16448 16449 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478 16479 16480 16481 16482 16483 16484 16485 16486 16487 16488 16489 16490 16491 16492 16493 16494 16495 16496 16497 16498 16499 16500 16501 16502 16503 16504 16505 16506 16507 16508 16509 16510 16511 16512 16513 16514 16515 16516 16517 16518 16519 16520 16521 16522 16523 16524 16525 16526 16527 16528 16529 16530 16531 16532 16533 16534 16535 16536 16537 16538 16539 16540 16541 16542 16543 16544 16545 16546 16547 16548 16549 16550 16551 16552 16553 16554 16555 16556 16557 16558 16559 16560 16561 16562 16563 16564 16565 16566 16567 16568 16569 16570 16571 16572 16573 16574 16575 16576 16577 16578 16579 16580 16581 16582 16583 16584 16585 16586 16587 16588 16589 16590 16591 16592 16593 16594 16595 16596 16597 16598 16599 16600 16601 16602 16603 16604 16605 16606 16607 16608 16609 16610 16611 16612 16613 16614 16615 16616 16617 16618 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 16637 16638 16639 16640 16641 16642 16643 16644 16645 16646 16647 16648 16649 16650 16651 16652 16653 16654 16655 16656 16657 16658 16659 16660 16661 16662 16663 16664 16665 16666 16667 16668 16669 16670 16671 16672 16673 16674 16675 16676 16677 16678 16679 16680 16681 16682 16683 16684 16685 16686 16687 16688 16689 16690 16691 16692 16693 16694 16695 16696 16697 16698 16699 16700 16701 16702 16703 16704 16705 16706 16707 16708 16709 16710 16711 16712 16713 16714 16715 16716 16717 16718 16719 16720 16721 16722 16723 16724 16725 16726 16727 16728 16729 16730 16731 16732 16733 16734 16735 16736 16737 16738 16739 16740 16741 16742 16743 16744 16745 16746 16747 16748 16749 16750 16751 16752 16753 16754 16755 16756 16757 16758 16759 16760 16761 16762 16763 16764 16765 16766 16767 16768 16769 16770 16771 16772 16773 16774 16775 16776 16777 16778 16779 16780 16781 16782 16783 16784 16785 16786 16787 16788 16789 16790 16791 16792 16793 16794 16795 16796 16797 16798 16799 16800 16801 16802 16803 16804 16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 16815 16816 16817 16818 16819 16820 16821 16822 16823 16824 16825 16826 16827 16828 16829 16830 16831 16832 16833 16834 16835 16836 16837 16838 16839 16840 16841 16842 16843 16844 16845 16846 16847 16848 16849 16850 16851 16852 16853 16854 16855 16856 16857 16858 16859 16860 16861 16862 16863 16864 16865 16866 16867 16868 16869 16870 16871 16872 16873 16874 16875 16876 16877 16878 16879 16880 16881 16882 16883 16884 16885 16886 16887 16888 16889 16890 16891 16892 16893 16894 16895 16896 16897 16898 16899 16900 16901 16902 16903 16904 16905 16906 16907 16908 16909 16910 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923 16924 16925 16926 16927 16928 16929 16930 16931 16932 16933 16934 16935 16936 16937 16938 16939 16940 16941 16942 16943 16944 16945 16946 16947 16948 16949 16950 16951 16952 16953 16954 16955 16956 16957 16958 16959 16960 16961 16962 16963 16964 16965 16966 16967 16968 16969 16970 16971 16972 16973 16974 16975 16976 16977 16978 16979 16980 16981 16982 16983 16984 16985 16986 16987 16988 16989 16990 16991 16992 16993 16994 16995 16996 16997 16998 16999 17000 17001 17002 17003 17004 17005 17006 17007 17008 17009 17010 17011 17012 17013 17014 17015 17016 17017 17018 17019 17020 17021 17022 17023 17024 17025 17026 17027 17028 17029 17030 17031 17032 17033 17034 17035 17036 17037 17038 17039 17040 17041 17042 17043 17044 17045 17046 17047 17048 17049 17050 17051 17052 17053 17054 17055 17056 17057 17058 17059 17060 17061 17062 17063 17064 17065 17066 17067 17068 17069 17070 17071 17072 17073 17074 17075 17076 17077 17078 17079 17080 17081 17082 17083 17084 17085 17086 17087 17088 17089 17090 17091 17092 17093 17094 17095 17096 17097 17098 17099 17100 17101 17102 17103 17104 17105 17106 17107 17108 17109 17110 17111 17112 17113 17114 17115 17116 17117 17118 17119 17120 17121 17122 17123 17124 17125 17126 17127 17128 17129 17130 17131 17132 17133 17134 17135 17136 17137 17138 17139 17140 17141 17142 17143 17144 17145 17146 17147 17148 17149 17150 17151 17152 17153 17154 17155 17156 17157 17158 17159 17160 17161 17162 17163 17164 17165 17166 17167 17168 17169 17170 17171 17172 17173 17174 17175 17176 17177 17178 17179 17180 17181 17182 17183 17184 17185 17186 17187 17188 17189 17190 17191 17192 17193 17194 17195 17196 17197 17198 17199 17200 17201 17202 17203 17204 17205 17206 17207 17208 17209 17210 17211 17212 17213 17214 17215 17216 17217 17218 17219 17220 17221 17222 17223 17224 17225 17226 17227 17228 17229 17230 17231 17232 17233 17234 17235 17236 17237 17238 17239 17240 17241 17242 17243 17244 17245 17246 17247 17248 17249 17250 17251 17252 17253 17254 17255 17256 17257 17258 17259 17260 17261 17262 17263 17264 17265 17266 17267 17268 17269 17270 17271 17272 17273 17274 17275 17276 17277 17278 17279 17280 17281 17282 17283 17284 17285 17286 17287 17288 17289 17290 17291 17292 17293 17294 17295 17296 17297 17298 17299 17300 17301 17302 17303 17304 17305 17306 17307 17308 17309 17310 17311 17312 17313 17314 17315 17316 17317 17318 17319 17320 17321 17322 17323 17324 17325 17326 17327 17328 17329 17330 17331 17332 17333 17334 17335 17336 17337 17338 17339 17340 17341 17342 17343 17344 17345 17346 17347 17348 17349 17350 17351 17352 17353 17354 17355 17356 17357 17358 17359 17360 17361 17362 17363 17364 17365 17366 17367 17368 17369 17370 17371 17372 17373 17374 17375 17376 17377 17378 17379 17380 17381 17382 17383 17384 17385 17386 17387 17388 17389 17390 17391 17392 17393 17394 17395 17396 17397 17398 17399 17400 17401 17402 17403 17404 17405 17406 17407 17408 17409 17410 17411 17412 17413 17414 17415 17416 17417 17418 17419 17420 17421 17422 17423 17424 17425 17426 17427 17428 17429 17430 17431 17432 17433 17434 17435 17436 17437 17438 17439 17440 17441 17442 17443 17444 17445 17446 17447 17448 17449 17450 17451 17452 17453 17454 17455 17456 17457 17458 17459 17460 17461 17462 17463 17464 17465 17466 17467 17468 17469 17470 17471 17472 17473 17474 17475 17476 17477 17478 17479 17480 17481 17482 17483 17484 17485 17486 17487 17488 17489 17490 17491 17492 17493 17494 17495 17496 17497 17498 17499 17500 17501 17502 17503 17504 17505 17506 17507 17508 17509 17510 17511 17512 17513 17514 17515 17516 17517 17518 17519 17520 17521 17522 17523 17524 17525 17526 17527 17528 17529 17530 17531 17532 17533 17534 17535 17536 17537 17538 17539 17540 17541 17542 17543 17544 17545 17546 17547 17548 17549 17550 17551 17552 17553 17554 17555 17556 17557 17558 17559 17560 17561 17562 17563 17564 17565 17566 17567 17568 17569 17570 17571 17572 17573 17574 17575 17576 17577 17578 17579 17580 17581 17582 17583 17584 17585 17586 17587 17588 17589 17590 17591 17592 17593 17594 17595 17596 17597 17598 17599 17600 17601 17602 17603 17604 17605 17606 17607 17608 17609 17610 17611 17612 17613 17614 17615 17616 17617 17618 17619 17620 17621 17622 17623 17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 17636 17637 17638 17639 17640 17641 17642 17643 17644 17645 17646 17647 17648 17649 17650 17651 17652 17653 17654 17655 17656 17657 17658 17659 17660 17661 17662 17663 17664 17665 17666 17667 17668 17669 17670 17671 17672 17673 17674 17675 17676 17677 17678 17679 17680 17681 17682 17683 17684 17685 17686 17687 17688 17689 17690 17691 17692 17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 17703 17704 17705 17706 17707 17708 17709 17710 17711 17712 17713 17714 17715 17716 17717 17718 17719 17720 17721 17722 17723 17724 17725 17726 17727 17728 17729 17730 17731 17732 17733 17734 17735 17736 17737 17738 17739 17740 17741 17742 17743 17744 17745 17746 17747 17748 17749 17750 17751 17752 17753 17754 17755 17756 17757 17758 17759 17760 17761 17762 17763 17764 17765 17766 17767 17768 17769 17770 17771 17772 17773 17774 17775 17776 17777 17778 17779 17780 17781 17782 17783 17784 17785 17786 17787 17788 17789 17790 17791 17792 17793 17794 17795 17796 17797 17798 17799 17800 17801 17802 17803 17804 17805 17806 17807 17808 17809 17810 17811 17812 17813 17814 17815 17816 17817 17818 17819 17820 17821 17822 17823 17824 17825 17826 17827 17828 17829 17830 17831 17832 17833 17834 17835 17836 17837 17838 17839 17840 17841 17842 17843 17844 17845 17846 17847 17848 17849 17850 17851 17852 17853 17854 17855 17856 17857 17858 17859 17860 17861 17862 17863 17864 17865 17866 17867 17868 17869 17870 17871 17872 17873 17874 17875 17876 17877 17878 17879 17880 17881 17882 17883 17884 17885 17886 17887 17888 17889 17890 17891 17892 17893 17894 17895 17896 17897 17898 17899 17900 17901 17902 17903 17904 17905 17906 17907 17908 17909 17910 17911 17912 17913 17914 17915 17916 17917 17918 17919 17920 17921 17922 17923 17924 17925 17926 17927 17928 17929 17930 17931 17932 17933 17934 17935 17936 17937 17938 17939 17940 17941 17942 17943 17944 17945 17946 17947 17948 17949 17950 17951 17952 17953 17954 17955 17956 17957 17958 17959 17960 17961 17962 17963 17964 17965 17966 17967 17968 17969 17970 17971 17972 17973 17974 17975 17976 17977 17978 17979 17980 17981 17982 17983 17984 17985 17986 17987 17988 17989 17990 17991 17992 17993 17994 17995 17996 17997 17998 17999 18000 18001 18002 18003 18004 18005 18006 18007 18008 18009 18010 18011 18012 18013 18014 18015 18016 18017 18018 18019 18020 18021 18022 18023 18024 18025 18026 18027 18028 18029 18030 18031 18032 18033 18034 18035 18036 18037 18038 18039 18040 18041 18042 18043 18044 18045 18046 18047 18048 18049 18050 18051 18052 18053 18054 18055 18056 18057 18058 18059 18060 18061 18062 18063 18064 18065 18066 18067 18068 18069 18070 18071 18072 18073 18074 18075 18076 18077 18078 18079 18080 18081 18082 18083 18084 18085 18086 18087 18088 18089 18090 18091 18092 18093 18094 18095 18096 18097 18098 18099 18100 18101 18102 18103 18104 18105 18106 18107 18108 18109 18110 18111 18112 18113 18114 18115 18116 18117 18118 18119 18120 18121 18122 18123 18124 18125 18126 18127 18128 18129 18130 18131 18132 18133 18134 18135 18136 18137 18138 18139 18140 18141 18142 18143 18144 18145 18146 18147 18148 18149 18150 18151 18152 18153 18154 18155 18156 18157 18158 18159 18160 18161 18162 18163 18164 18165 18166 18167 18168 18169 18170 18171 18172 18173 18174 18175 18176 18177 18178 18179 18180 18181 18182 18183 18184 18185 18186 18187 18188 18189 18190 18191 18192 18193 18194 18195 18196 18197 18198 18199 18200 18201 18202 18203 18204 18205 18206 18207 18208 18209 18210 18211 18212 18213 18214 18215 18216 18217 18218 18219 18220 18221 18222 18223 18224 18225 18226 18227 18228 18229 18230 18231 18232 18233 18234 18235 18236 18237 18238 18239 18240 18241 18242 18243 18244 18245 18246 18247 18248 18249 18250 18251 18252 18253 18254 18255 18256 18257 18258 18259 18260 18261 18262 18263 18264 18265 18266 18267 18268 18269 18270 18271 18272 18273 18274 18275 18276 18277 18278 18279 18280 18281 18282 18283 18284 18285 18286 18287 18288 18289 18290 18291 18292 18293 18294 18295 18296 18297 18298 18299 18300 18301 18302 18303 18304 18305 18306 18307 18308 18309 18310 18311 18312 18313 18314 18315 18316 18317 18318 18319 18320 18321 18322 18323 18324 18325 18326 18327 18328 18329 18330 18331 18332 18333 18334 18335 18336 18337 18338 18339 18340 18341 18342 18343 18344 18345 18346 18347 18348 18349 18350 18351 18352 18353 18354 18355 18356 18357 18358 18359 18360 18361 18362 18363 18364 18365 18366 18367 18368 18369 18370 18371 18372 18373 18374 18375 18376 18377 18378 18379 18380 18381 18382 18383 18384 18385 18386 18387 18388 18389 18390 18391 18392 18393 18394 18395 18396 18397 18398 18399 18400 18401 18402 18403 18404 18405 18406 18407 18408 18409 18410 18411 18412 18413 18414 18415 18416 18417 18418 18419 18420 18421 18422 18423 18424 18425 18426 18427 18428 18429 18430 18431 18432 18433 18434 18435 18436 18437 18438 18439 18440 18441 18442 18443 18444 18445 18446 18447 18448 18449 18450 18451 18452 18453 18454 18455 18456 18457 18458 18459 18460 18461 18462 18463 18464 18465 18466 18467 18468 18469 18470 18471 18472 18473 18474 18475 18476 18477 18478 18479 18480 18481 18482 18483 18484 18485 18486 18487 18488 18489 18490 18491 18492 18493 18494 18495 18496 18497 18498 18499 18500 18501 18502 18503 18504 18505 18506 18507 18508 18509 18510 18511 18512 18513 18514 18515 18516 18517 18518 18519 18520 18521 18522 18523 18524 18525 18526 18527 18528 18529 18530 18531 18532 18533 18534 18535 18536 18537 18538 18539 18540 18541 18542 18543 18544 18545 18546 18547 18548 18549 18550 18551 18552 18553 18554 18555 18556 18557 18558 18559 18560 18561 18562 18563 18564 18565 18566 18567 18568 18569 18570 18571 18572 18573 18574 18575 18576 18577 18578 18579 18580 18581 18582 18583 18584 18585 18586 18587 18588 18589 18590 18591 18592 18593 18594 18595 18596 18597 18598 18599 18600 18601 18602 18603 18604 18605 18606 18607 18608 18609 18610 18611 18612 18613 18614 18615 18616 18617 18618 18619 18620 18621 18622 18623 18624 18625 18626 18627 18628 18629 18630 18631 18632 18633 18634 18635 18636 18637 18638 18639 18640 18641 18642 18643 18644 18645 18646 18647 18648 18649 18650 18651 18652 18653 18654 18655 18656 18657 18658 18659 18660 18661 18662 18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 18673 18674 18675 18676 18677 18678 18679 18680 18681 18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 18712 18713 18714 18715 18716 18717 18718 18719 18720 18721 18722 18723 18724 18725 18726 18727 18728 18729 18730 18731 18732 18733 18734 18735 18736 18737 18738 18739 18740 18741 18742 18743 18744 18745 18746 18747 18748 18749 18750 18751 18752 18753 18754 18755 18756 18757 18758 18759 18760 18761 18762 18763 18764 18765 18766 18767 18768 18769 18770 18771 18772 18773 18774 18775 18776 18777 18778 18779 18780 18781 18782 18783 18784 18785 18786 18787 18788 18789 18790 18791 18792 18793 18794 18795 18796 18797 18798 18799 18800 18801 18802 18803 18804 18805 18806 18807 18808 18809 18810 18811 18812 18813 18814 18815 18816 18817 18818 18819 18820 18821 18822 18823 18824 18825 18826 18827 18828 18829 18830 18831 18832 18833 18834 18835 18836 18837 18838 18839 18840 18841 18842 18843 18844 18845 18846 18847 18848 18849 18850 18851 18852 18853 18854 18855 18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 18866 18867 18868 18869 18870 18871 18872 18873 18874 18875 18876 18877 18878 18879 18880 18881 18882 18883 18884 18885 18886 18887 18888 18889 18890 18891 18892 18893 18894 18895 18896 18897 18898 18899 18900 18901 18902 18903 18904 18905 18906 18907 18908 18909 18910 18911 18912 18913 18914 18915 18916 18917 18918 18919 18920 18921 18922 18923 18924 18925 18926 18927 18928 18929 18930 18931 18932 18933 18934 18935 18936 18937 18938 18939 18940 18941 18942 18943 18944 18945 18946 18947 18948 18949 18950 18951 18952 18953 18954 18955 18956 18957 18958 18959 18960 18961 18962 18963 18964 18965 18966 18967 18968 18969 18970 18971 18972 18973 18974 18975 18976 18977 18978 18979 18980 18981 18982 18983 18984 18985 18986 18987 18988 18989 18990 18991 18992 18993 18994 18995 18996 18997 18998 18999 19000 19001 19002 19003 19004 19005 19006 19007 19008 19009 19010 19011 19012 19013 19014 19015 19016 19017 19018 19019 19020 19021 19022 19023 19024 19025 19026 19027 19028 19029 19030 19031 19032 19033 19034 19035 19036 19037 19038 19039 19040 19041 19042 19043 19044 19045 19046 19047 19048 19049 19050 19051 19052 19053 19054 19055 19056 19057 19058 19059 19060 19061 19062 19063 19064 19065 19066 19067 19068 19069 19070 19071 19072 19073 19074 19075 19076 19077 19078 19079 19080 19081 19082 19083 19084 19085 19086 19087 19088 19089 19090 19091 19092 19093 19094 19095 19096 19097 19098 19099 19100 19101 19102 19103 19104 19105 19106 19107 19108 19109 19110 19111 19112 19113 19114 19115 19116 19117 19118 19119 19120 19121 19122 19123 19124 19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 19136 19137 19138 19139 19140 19141 19142 19143 19144 19145 19146 19147 19148 19149 19150 19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 19162 19163 19164 19165 19166 19167 19168 19169 19170 19171 19172 19173 19174 19175 19176 19177 19178 19179 19180 19181 19182 19183 19184 19185 19186 19187 19188 19189 19190 19191 19192 19193 19194 19195 19196 19197 19198 19199 19200 19201 19202 19203 19204 19205 19206 19207 19208 19209 19210 19211 19212 19213 19214 19215 19216 19217 19218 19219 19220 19221 19222 19223 19224 19225 19226 19227 19228 19229 19230 19231 19232 19233 19234 19235 19236 19237 19238 19239 19240 19241 19242 19243 19244 19245 19246 19247 19248 19249 19250 19251 19252 19253 19254 19255 19256 19257 19258 19259 19260 19261 19262 19263 19264 19265 19266 19267 19268 19269 19270 19271 19272 19273 19274 19275 19276 19277 19278 19279 19280 19281 19282 19283 19284 19285 19286 19287 19288 19289 19290 19291 19292 19293 19294 19295 19296 19297 19298 19299 19300 19301 19302 19303 19304 19305 19306 19307 19308 19309 19310 19311 19312 19313 19314 19315 19316 19317 19318 19319 19320 19321 19322 19323 19324 19325 19326 19327 19328 19329 19330 19331 19332 19333 19334 19335 19336 19337 19338 19339 19340 19341 19342 19343 19344 19345 19346 19347 19348 19349 19350 19351 19352 19353 19354 19355 19356 19357 19358 19359 19360 19361 19362 19363 19364 19365 19366 19367 19368 19369 19370 19371 19372 19373 19374 19375 19376 19377 19378 19379 19380 19381 19382 19383 19384 19385 19386 19387 19388 19389 19390 19391 19392 19393 19394 19395 19396 19397 19398 19399 19400 19401 19402 19403 19404 19405 19406 19407 19408 19409 19410 19411 19412 19413 19414 19415 19416 19417 19418 19419 19420 19421 19422 19423 19424 19425 19426 19427 19428 19429 19430 19431 19432 19433 19434 19435 19436 19437 19438 19439 19440 19441 19442 19443 19444 19445 19446 19447 19448 19449 19450 19451 19452 19453 19454 19455 19456 19457 19458 19459 19460 19461 19462 19463 19464 19465 19466 19467 19468 19469 19470 19471 19472 19473 19474 19475 19476 19477 19478 19479 19480 19481 19482 19483 19484 19485 19486 19487 19488 19489 19490 19491 19492 19493 19494 19495 19496 19497 19498 19499 19500 19501 19502 19503 19504 19505 19506 19507 19508 19509 19510 19511 19512 19513 19514 19515 19516 19517 19518 19519 19520 19521 19522 19523 19524 19525 19526 19527 19528 19529 19530 19531 19532 19533 19534 19535 19536 19537 19538 19539 19540 19541 19542 19543 19544 19545 19546 19547 19548 19549 19550 19551 19552 19553 19554 19555 19556 19557 19558 19559 19560 19561 19562 19563 19564 19565 19566 19567 19568 19569 19570 19571 19572 19573 19574 19575 19576 19577 19578 19579 19580 19581 19582 19583 19584 19585 19586 19587 19588 19589 19590 19591 19592 19593 19594 19595 19596 19597 19598 19599 19600 19601 19602 19603 19604 19605 19606 19607 19608 19609 19610 19611 19612 19613 19614 19615 19616 19617 19618 19619 19620 19621 19622 19623 19624 19625 19626 19627 19628 19629 19630 19631 19632 19633 19634 19635 19636 19637 19638 19639 19640 19641 19642 19643 19644 19645 19646 19647 19648 19649 19650 19651 19652 19653 19654 19655 19656 19657 19658 19659 19660 19661 19662 19663 19664 19665 19666 19667 19668 19669 19670 19671 19672 19673 19674 19675 19676 19677 19678 19679 19680 19681 19682 19683 19684 19685 19686 19687 19688 19689 19690 19691 19692 19693 19694 19695 19696 19697 19698 19699 19700 19701 19702 19703 19704 19705 19706 19707 19708 19709 19710 19711 19712 19713 19714 19715 19716 19717 19718 19719 19720 19721 19722 19723 19724 19725 19726 19727 19728 19729 19730 19731 19732 19733 19734 19735 19736 19737 19738 19739 19740 19741 19742 19743 19744 19745 19746 19747 19748 19749 19750 19751 19752 19753 19754 19755 19756 19757 19758 19759 19760 19761 19762 19763 19764 19765 19766 19767 19768 19769 19770 19771 19772 19773 19774 19775 19776 19777 19778 19779 19780 19781 19782 19783 19784 19785 19786 19787 19788 19789 19790 19791 19792 19793 19794 19795 19796 19797 19798 19799 19800 19801 19802 19803 19804 19805 19806 19807 19808 19809 19810 19811 19812 19813 19814 19815 19816 19817 19818 19819 19820 19821 19822 19823 19824 19825 19826 19827 19828 19829 19830 19831 19832 19833 19834 19835 19836 19837 19838 19839 19840 19841 19842 19843 19844 19845 19846 19847 19848 19849 19850 19851 19852 19853 19854 19855 19856 19857 19858 19859 19860 19861 19862 19863 19864 19865 19866 19867 19868 19869 19870 19871 19872 19873 19874 19875 19876 19877 19878 19879 19880 19881 19882 19883 19884 19885 19886 19887 19888 19889 19890 19891 19892 19893 19894 19895 19896 19897 19898 19899 19900 19901 19902 19903 19904 19905 19906 19907 19908 19909 19910 19911 19912 19913 19914 19915 19916 19917 19918 19919 19920 19921 19922 19923 19924 19925 19926 19927 19928 19929 19930 19931 19932 19933 19934 19935 19936 19937 19938 19939 19940 19941 19942 19943 19944 19945 19946 19947 19948 19949 19950 19951 19952 19953 19954 19955 19956 19957 19958 19959 19960 19961 19962 19963 19964 19965 19966 19967 19968 19969 19970 19971 19972 19973 19974 19975 19976 19977 19978 19979 19980 19981 19982 19983 19984 19985 19986 19987 19988 19989 19990 19991 19992 19993 19994 19995 19996 19997 19998 19999 20000 20001 20002 20003 20004 20005 20006 20007 20008 20009 20010 20011 20012 20013 20014 20015 20016 20017 20018 20019 20020 20021 20022 20023 20024 20025 20026 20027 20028 20029 20030 20031 20032 20033 20034 20035 20036 20037 20038 20039 20040 20041 20042 20043 20044 20045 20046 20047 20048 20049 20050 20051 20052 20053 20054 20055 20056 20057 20058 20059 20060 20061 20062 20063 20064 20065 20066 20067 20068 20069 20070 20071 20072 20073 20074 20075 20076 20077 20078 20079 20080 20081 20082 20083 20084 20085 20086 20087 20088 20089 20090 20091 20092 20093 20094 20095 20096 20097 20098 20099 20100 20101 20102 20103 20104 20105 20106 20107 20108 20109 20110 20111 20112 20113 20114 20115 20116 20117 20118 20119 20120 20121 20122 20123 20124 20125 20126 20127 20128 20129 20130 20131 20132 20133 20134 20135 20136 20137 20138 20139 20140 20141 20142 20143 20144 20145 20146 20147 20148 20149 20150 20151 20152 20153 20154 20155 20156 20157 20158 20159 20160 20161 20162 20163 20164 20165 20166 20167 20168 20169 20170 20171 20172 20173 20174 20175 20176 20177 20178 20179 20180 20181 20182 20183 20184 20185 20186 20187 20188 20189 20190 20191 20192 20193 20194 20195 20196 20197 20198 20199 20200 20201 20202 20203 20204 20205 20206 20207 20208 20209 20210 20211 20212 20213 20214 20215 20216 20217 20218 20219 20220 20221 20222 20223 20224 20225 20226 20227 20228 20229 20230 20231 20232 20233 20234 20235 20236 20237 20238 20239 20240 20241 20242 20243 20244 20245 20246 20247 20248 20249 20250 20251 20252 20253 20254 20255 20256 20257 20258 20259 20260 20261 20262 20263 20264 20265 20266 20267 20268 20269 20270 20271 20272 20273 20274 20275 20276 20277 20278 20279 20280 20281 20282 20283 20284 20285 20286 20287 20288 20289 20290 20291 20292 20293 20294 20295 20296 20297 20298 20299 20300 20301 20302 20303 20304 20305 20306 20307 20308 20309 20310 20311 20312 20313 20314 20315 20316 20317 20318 20319 20320 20321 20322 20323 20324 20325 20326 20327 20328 20329 20330 20331 20332 20333 20334 20335 20336 20337 20338 20339 20340 20341 20342 20343 20344 20345 20346 20347 20348 20349 20350 20351 20352 20353 20354 20355 20356 20357 20358 20359 20360 20361 20362 20363 20364 20365 20366 20367 20368 20369 20370 20371 20372 20373 20374 20375 20376 20377 20378 20379 20380 20381 20382 20383 20384 20385 20386 20387 20388 20389 20390 20391 20392 20393 20394 20395 20396 20397 20398 20399 20400 20401 20402 20403 20404 20405 20406 20407 20408 20409 20410 20411 20412 20413 20414 20415 20416 20417 20418 20419 20420 20421 20422 20423 20424 20425 20426 20427 20428 20429 20430 20431 20432 20433 20434 20435 20436 20437 20438 20439 20440 20441 20442 20443 20444 20445 20446 20447 20448 20449 20450 20451 20452 20453 20454 20455 20456 20457 20458 20459 20460 20461 20462 20463 20464 20465 20466 20467 20468 20469 20470 20471 20472 20473 20474 20475 20476 20477 20478 20479 20480 20481 20482 20483 20484 20485 20486 20487 20488 20489 20490 20491 20492 20493 20494 20495 20496 20497 20498 20499 20500 20501 20502 20503 20504 20505 20506 20507 20508 20509 20510 20511 20512 20513 20514 20515 20516 20517 20518 20519 20520 20521 20522 20523 20524 20525 20526 20527 20528 20529 20530 20531 20532 20533 20534 20535 20536 20537 20538 20539 20540 20541 20542 20543 20544 20545 20546 20547 20548 20549 20550 20551 20552 20553 20554 20555 20556 20557 20558 20559 20560 20561 20562 20563 20564 20565 20566 20567 20568 20569 20570 20571 20572 20573 20574 20575 20576 20577 20578 20579 20580 20581 20582 20583 20584 20585 20586 20587 20588 20589 20590 20591 20592 20593 20594 20595 20596 20597 20598 20599 20600 20601 20602 20603 20604 20605 20606 20607 20608 20609 20610 20611 20612 20613 20614 20615 20616 20617 20618 20619 20620 20621 20622 20623 20624 20625 20626 20627 20628 20629 20630 20631 20632 20633 20634
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="EN" xml:lang="EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>W3C XML Schema Definition Language (XSD) 1.1 Part 1: Structures</title>
<style type="text/css" xml:space="preserve">
code           { font-family: monospace; }

div.constraint,
div.issue,
div.note,
div.notice     { margin-left: 2em; }

ol.enumar      { list-style-type: decimal; }
ol.enumla      { list-style-type: lower-alpha; }
ol.enumlr      { list-style-type: lower-roman; }
ol.enumua      { list-style-type: upper-alpha; }
ol.enumur      { list-style-type: upper-roman; }


div.exampleInner pre { margin-left: 1em;
                       margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
                  margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
                   border-top-width: 4px;
                   border-top-style: double;
                   border-top-color: #d3d3d3;
                   border-bottom-width: 4px;
                   border-bottom-style: double;
                   border-bottom-color: #d3d3d3;
                   padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
                    margin: 4px}

div.odiff-nsq-add  { background-color: #DFDFDF; }
div.odiff-nsq-del  { display: none; background-color: #FFDFDF }
div.idiff-nsq-del { display: none; text-decoration: line-through }
div.odiff-nsq-chg  { background-color: #DFDFDF }
div.diff-nsq-off  {  }

span.odiff-nsq-add { background-color: #DFDFDF; }
span.diff-nsq-add { background-color: #DFDFDF; }
span.odiff-nsq-del { display: none; background-color: #FFDFDF }
span.idiff-nsq-del { display: none; text-decoration: line-through }
span.diff-nsq-del { display: none; background-color: #FFDFDF ; text-decoration: line-through }
span.odiff-nsq-chg { background-color: #DFDFDF }
span.diff-nsq-chg { background-color: #DFFFDF }
span.diff-nsq-off {  }

td.odiff-nsq-add   { background-color: #DFDFDF; }
td.odiff-nsq-del   { display: none; background-color: #FFDFDF }
td.odiff-nsq-chg   { background-color: #DFDFDF }
td.diff-nsq-off   {  }

   table { width: 100%; }
   img { color: white; border: none }
   span.rfc2119 { font-variant: small-caps }
   span.nav { float: right}
   span.arrow { font-style: normal; font-weight: bold }
   span.enumval { font-style: italic; font-weight: bold }

   code { font-family: monospace; font-size: 100%}
   span.propdef { font-weight: bold; font-family: monospace }
   span.termdef {color: #850021}
   div.termdef {color: #850021}
   a.termref:visited, a.termref:link {font-family: sans-serif;
	     font-style: normal;
	     color: black;
	     text-decoration: none }
   a.eltref:visited, a.eltref:link { font-family: sans-serif;
	     color: black;
	     text-decoration: none }
   a.propref:visited, a.xpropref:visited, a.propref:link, a.xpropref:link { color: black; text-decoration: none;
			  font-family: sans-serif }
     div.component {border: 2px solid black; margin-top: 1ex}
     span.propdef { font-weight: bold; font-family: monospace }
     div.ownDesc {margin-top: -2ex; margin-bottom: -2ex}
     a.compref {font-family: sans-serif;
	     font-style: normal;
	     color: black;
	     text-decoration: none}
   dl.props, dl.psvi {margin-bottom: .5em; margin-top: 0em}
   div.toc1 {margin-left: 5ex}
   div.toc2 {margin-left: 2ex}
   div.tocLine{margin: 0em; text-indent: -6ex}
   h3.withToc {margin-bottom: 0em}
   div.constraintnote { margin-top: 1em }
   div.constraint {
     margin-left: 1em; }
   
   div.constraintlist {
     margin-left: 1em; margin-bottom: 0em
   }
   div.clnumber {
     text-indent: -1em;
     margin-top: 0em; margin-bottom: 0em }
   
   div.schemaComp { border: 4px double gray;
		    margin: 0em 1em; padding: 0em }
   div.scHead { border: 4px double gray;
                border-bottom: 0px;
                text-align: center;
		    margin-left: 1em; padding: .5em }
   div.compHeader { margin: 4px;
		   font-weight: bold }
   span.schemaComp { color: #A52A2A }
   div.compBody {
		 border-top-width: 4px;
		 border-top-style: double;
		 border-top-color: #d3d3d3;
		 padding: 4px ; margin: 0em}
   
   div.psviDef { border: 4px double gray;
		    margin: 1em 1em; padding: 0em }
   div.psviHeader { margin: 4px;
		   font-weight: bold }
   span.psviDef { color: #A52A2A }
   div.psviBody { border-top-width: 4px;
		 border-top-style: double;
		 border-top-color: #d3d3d3;
		 padding: 4px ; margin: 0em}
   
   div.reprdef { border: 4px double gray;
		    margin: 0em 1em; padding: 0em }
   div.reprHeader { margin: 4px;
		   font-weight: bold }
   span.reprdef { color: #A52A2A }
   div.reprBody, div.reprcompmulti, div.reprdep {
		 border-top-width: 4px;
		 border-top-style: double;
		 border-top-color: #d3d3d3;
		 padding: 4px ; margin: 0em}
   div.reprcomp {padding: 4px ; margin: 0em}
   div.reprHead { text-align: center; }
   div.mapSep { font-size: 50% ; clear: both}
   div.mapProp {clear: left; float: left; width: 5em;
	max-width: 12em; min-width: 5em  }
   div.mapRepr { margin-left: 6.5em }
   p.element-syntax-1 { font-family: monospace;
		       margin-top: 0em; margin-bottom: .5em }
   p.element-syntax { font-family: monospace;
		 border-top-width: 1px;
		 border-top-style: solid;
		 border-top-color: #d3d3d3;
		 padding: 4px ; margin: 0em}
   
   div.exampleInner pre { margin-left: 1em;
			 margin-top: 0em; margin-bottom: 0em}
   div.exampleOuter {border: 4px double gray;
		    margin: 0em; 
                    margin-bottom: 0.6em; 
                    padding: 0em}
   div.exampleInner { background-color: #d5dee3;
		     border-top-width: 4px;
		     border-top-style: double;
		     border-top-color: #d3d3d3;
		     border-bottom-width: 4px;
		     border-bottom-style: double;
		     border-bottom-color: #d3d3d3;
		     padding: 4px; margin: 0em }
   div.exampleWrapper { margin: 4px }
   div.exampleHeader { font-weight: bold;
		      margin: 4px}
   
   
   table.restricts { margin-top: 1em; margin-bottom: 1em; margin-left: -2em}
   table.restricts th { margin-left: 0em }
   table.ubc td, table.ubc th { font-size: smaller }
   table.dtdemo th { text-align: center;
		    background-color: #d5dee3}
   table.dtdemo pre { margin-left: 0em;  margin-bottom: 0em}
   table.dtdemo td {background-color: #bedce6}
   table.scrap {margin: .5em; background-color:  #f5dcb3}
   table.defset {background-color: #ffeedd }                                        
   
   table.defset thead, table.diffed-defset thead { color: red; font-weight: bold }  
   
   
   img { color: white; border: none }
   span.nav { float: right}
   span.arrow { font-style: normal; font-weight: bold }
     
   .shrink {font-size: 80% ; }
   .defset ul { margin-top: 0 ;
                margin-bottom: 0 ; }
   div.defset { margin: 4px ;
                border-width: 4px ;
                border-style: double ;
                border-color: gray ; }
   div.aux { background-color: #eeeeee ;
             color: #333333 ; }
   div.defset-head { font-weight: bold ;
                     padding: 0.6em ;
                     border-bottom-width: 4px ;
                     border-bottom-style: double ;
                     border-color: #cfcfcf ; }
   div.deftop {background-color: #d5dee3 ;
               margin-top: 1.5em;
               padding-bottom: 0.3em }
   div.defindent { margin-left: 1em ;
                   margin-top: 0em ;
                   margin-bottom: 0em ; }
   div.defargs { margin-left: 3em ; }
   div.prod { margin: 1em ;
              margin-left: 5em ; }
   .lhs { margin-left: -4em ; }
   table table, .defset table { margin: 0 ;
                                border: 0 ;
                                padding: 0 ; }
   .note { margin-left: 2em ;
           margin-top: 1em ;
           margin-bottom: 1em ; }  
   div.issue { background-color: #d5bbbb}
   
   .giLabel, .pdName { margin-bottom: 0 ; font-weight: bold }
   .giDef, .pdDef { margin-left: 2.5em ; margin-top: 0}
   
   
   div.pvlist { border: 4px double gray;
	        margin-bottom: .5em; margin-left: 1em; padding: .5em;
                padding-right: 1em; padding-bottom: 1em }
   div.pvVal div.pvlist { 
                border: 4px double gray; 
                margin-top: 1.2em;
	        margin-bottom: .5em; 
                /* margin-left: -5em;  */
                margin-left: -1.3em;
                padding: .5em;
                padding-right: 1em; 
                padding-bottom: 1em;
   }
   div.clnumber div.pvlist { border: 4px double gray;
	        margin-bottom: .5em; margin-left: 1em; padding-top: .5em;
                text-indent: 0;
                padding-right: 1em; padding-bottom: 1em }
   div.mapRepr div.pvlist { border: 4px double gray; margin-top: .5em;
	        margin-bottom: .5em; padding: .5em;
                padding-right: 1em; padding-bottom: 1em }

   
   div.pvSep { font-size: 50% ; clear: both}
   div.pvProp {clear: left; float: left; width: 7em;
	max-width: 12em; min-width: 7em  }
   div.pvVal { margin-left: 8em }
   div.pvpair {
	clear: both;
        padding: 0.3em;
        padding-right: 0;
   }

   div.sfsScrap { border: 4px double gray;
		    margin: 0em 1em; padding: 0em }
   div.sfsHead { margin: 4px;
		   font-weight: bold }
   div.sfsBody {
		 border-top-width: 4px;
		 border-top-style: double;
		 border-top-color: #d3d3d3;
		 padding: 4px ; margin: 0em}
   div.ednote {
       display: block;
       margin: 1.33em 0;
   }
   a.scrapref { 
                font-family: serif, sans-serif;
              }

   /* Added 2008-01-30.  Value may be tweaked, but whatever it is,
    * make it the same for these three different ways of saying
    * 'paragraph'.
    */
   p, div.p, div.block { margin: 1em 0; }
   p.image-caption { 
     margin-left: 2em; 
     margin-right: 2em; 
     margin-bottom: 3em;
     font-style: italic;
   }

   var {
     /* color: green; */
     color: navy; /* or perhaps try MediumBlue */ 
     font-style: italic;
     font-weight:  bold;
   }

   table.blocknames,
   table.blocknames td,
   table.blocknames th {
     border-style: solid;
     border-width: thin;
     empty-cells: show;
   }

   table.blocknames td,
   table.blocknames th {
     padding: 0.2em;   
   }

</style><link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-CR.css" /></head>

<body>
<div class="head"><p><a href="http://www.w3.org/" shape="rect"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72" /></a></p>
<h1><a name="title" id="title" shape="rect"></a>W3C XML Schema Definition Language (XSD) 1.1 Part 1: Structures</h1>
<h2><a name="w3c-doctype" id="w3c-doctype" shape="rect"></a>W3C Candidate Recommendation 21 July 2011</h2><dl><dt>This version:</dt><dd> 
   <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/" shape="rect">http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/</a> 
  </dd><dt>Latest version:</dt><dd><a href="http://www.w3.org/TR/xmlschema11-1/" shape="rect">http://www.w3.org/TR/xmlschema11-1/</a></dd><dt>Previous version:</dt><dd>
   
   <a href="http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/" shape="rect">http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/</a>
   
  </dd><dt>Editors (Version 1.1):</dt><dd>Shudi (Sandy) Gao &#39640;&#27530;&#38237;, IBM <a href="mailto:sandygao@ca.ibm.com" shape="rect">&lt;sandygao@ca.ibm.com&gt;</a></dd><dd>C. M. Sperberg-McQueen, Black Mesa Technologies LLC <a href="mailto:cmsmcq@blackmesatech.com" shape="rect">&lt;cmsmcq@blackmesatech.com&gt;</a></dd><dd>Henry S. Thompson, University of Edinburgh <a href="mailto:ht@inf.ed.ac.uk" shape="rect">&lt;ht@inf.ed.ac.uk&gt;</a></dd><dt>Editors (Version 1.0):</dt><dd>Henry S. Thompson, University of Edinburgh <a href="mailto:ht@inf.ed.ac.uk" shape="rect">&lt;ht@inf.ed.ac.uk&gt;</a></dd><dd>Noah Mendelsohn, IBM <a href="mailto:noah_mendelsohn@us.ibm.com" shape="rect">&lt;noah_mendelsohn@us.ibm.com&gt;</a></dd><dd>David Beech, Oracle Corporation (retired) <a href="mailto:davidbeech@earthlink.net" shape="rect">&lt;davidbeech@earthlink.net&gt;</a></dd><dd>Murray Maloney, Muzmo Communications <a href="mailto:murray@muzmo.com" shape="rect">&lt;murray@muzmo.com&gt;</a></dd></dl><p>This document is also available in these non-normative formats: <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.xml" shape="rect">XML</a>, <a href="structures.diff-1.0.html" shape="rect">XHTML with changes since version 1.0 marked</a>, <a href="structures.diff-wd.html" shape="rect">XHTML with changes since previous Working Draft marked</a>, <a href="./XMLSchema.xsd" shape="rect">Independent copy of the schema for schema documents</a>, <a href="./XMLSchema.dtd" shape="rect">Independent copy of the DTD for schema documents</a>, <a href="compDefs.xml" shape="rect">Independent tabulation of components and microcomponents</a>, and&#160;<a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema" shape="rect">List of translations</a>.</p><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright" shape="rect">Copyright</a>&#160;&#169;&#160;2011&#160;<a href="http://www.w3.org/" shape="rect"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>&#174;</sup> (<a href="http://www.csail.mit.edu/" shape="rect"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/" shape="rect"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/" shape="rect">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer" shape="rect">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks" shape="rect">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents" shape="rect">document use</a> rules apply.</p></div><hr /><div>
<h2><a name="abstract" id="abstract" shape="rect"></a>Abstract</h2><p>This
     document specifies the XML Schema Definition Language,
    which offers facilities for describing the structure and constraining the contents
    of XML documents, including those which 
    exploit the XML Namespace facility. The schema language, which is itself 
    represented in
    an XML vocabulary and uses 
    namespaces, substantially reconstructs and considerably 
    extends the capabilities found in XML 
    document type definitions (DTDs).  This specification depends on 
    <em>XML Schema Definition Language 1.1 Part 2: Datatypes</em>.          
    
   </p></div><div class="sotd">
<h2><a name="status" id="status" shape="rect"></a>Status of This Document</h2>
<p><em>This section describes the status of this document at the
     time of its publication. Other documents may supersede this document.
     A list of current W3C publications and the latest revision of this
     technical report can be found in the 
     <a href="http://www.w3.org/TR/" shape="rect">W3C technical reports index</a> at
     http://www.w3.org/TR/.</em></p><p>This 
   
     
     W3C Candidate Recommendation 
     specifies
     
    
   the W3C XML Schema Definition Language (XSD) 1.1.  
   It 
   
   is here made
   available for review by W3C members 
   and the public.  
   XSD 1.1 retains all
   the essential features of XSD 1.0, but adds several new 
   features to support functionality requested by users,
     fixes many errors in XSD 1.0, 
     and clarifies wording.
    
   </p><div class="block">
    This draft was published 
    on 21 July 2011.
    
    The major revisions since the previous 
    public working draft 
    include
     the following:
    
    <ul><li><div class="p">Enumerations, value constraints, and identity constraints now
      accept <em>either</em> equal <em>or</em> identical
      values as the same.  This change resolves issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=9196" shape="rect">9196
      Enumeration and NaN</a>
      </div></li><li><div class="p">The rules for restriction of complex types containing local
       elements with conditional types have been simplified; this
       resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=12185" shape="rect">12185
       Conditional Type Assignment and substitutability</a>.</div></li><li><div class="p">Changes have been made in section <a href="#sec-src-simple-type" shape="rect">Constraints on XML Representations of Simple Type Definitions (&#167;3.16.3)</a> and section <a href="#sec-src-ct" shape="rect">Constraints on XML Representations of Complex Type Definitions (&#167;3.4.3)</a> to make explicit that XML representations of
       extension facets (facets in namespaces other than the Schema
       namespace) are allowed to appear more than once in restrictions
       of simple types.  This resolves issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11222" shape="rect">11222
       src-simple-type.1 should allow duplicate elements from
       "##other" namespaces</a>.</div></li><li><div class="p">The definition of 
       <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>
       has been changed to remove the rule that an element
       with an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type definition<span class="arrow">&#183;</span></a> cannot be locally valid against
       any type definition other than the one specified in
       the instance.
       
       This resolves issue 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11764" shape="rect">11764
       Unresolved xsi:type should not affect validity against a type</a>.</div></li><li><div class="p">The text concerning <code>xsi:type</code> attributes
       and their effect has been clarified in 
       <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>.  In particular, the
       revisions attempt to make clearer just what happens
       in cases where the <code>xsi:type</code>
       attribute in the document instance cannot be used
       (because the type named is unknown, or otherwise
       not usable).  This resolves issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11219" shape="rect">11219 Editorial revision of Element Locally Valid (Element)</a>.
       </div></li><li><div class="p">The text has been revised to make clearer that 
       declarations enclosed in an <code>xs:override</code> element
       are handled using the <code>elementFormDefault</code> and 
       other schema-document-level defaults from the schema document
       being overridden, not the schema documnt containing the
       <code>xs:override</code> element.  This resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=10652" shape="rect">10652
       xs:override and document-level defaults</a>.
       </div></li><li><div class="p">The constraints forbidding the use of special types as
      members of unions and item types for lists have been reformulated
      as part of the definition of the simple type definition component.
      This resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11103" shape="rect">11103
        Note in section 2.4.1 (Special datatypes as members of a union)</a>.
      </div></li><li><div class="p">The treatment of elements in the Schema namespace occurring
       within <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> elements has been clarified:
       <ul><li><div class="p">Such elements do not participate in the mapping
	 from XML representations to components as defined in this
	 specification (<a href="#mapping.xr.c" shape="rect">The Mapping between XML Representations and
      Components (&#167;3.1.3)</a>, <a href="#Annotation_details" shape="rect">The Annotation Schema Component (&#167;3.15.1)</a>).</div></li><li><div class="p">Such elements are not required to be valid or to
	 satisfy the XML Representation rules as a condition of
	 conformance for a schema document (<a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a>, <a href="#Annotation_details" shape="rect">The Annotation Schema Component (&#167;3.15.1)</a>).</div></li><li><div class="p">If such elements are invalid, the effect on
	 schema component construction is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>
	 (<a href="#Annotation_details" shape="rect">The Annotation Schema Component (&#167;3.15.1)</a>,
	 <a href="#impl-def-list" shape="rect">Checklist of implementation-defined features (&#167;E.1)</a>).</div></li></ul>
       This change resolves issue 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=10125" shape="rect">10125
       Validation of the content of xs:annotation</a>.
       </div></li><li><div class="p">The treatment of type tables in
      <a href="#sec-cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a> has been
      made more specific; this resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11076" shape="rect">11076
       Element Declarations Consistent: comparing type tables</a>.
      </div></li><li><div class="p">A note has been added to the discussion of 
       <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements to make it easier to
       see how processors are expected to handle cycles in
       references from one schema document to another.
       This change resolves issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=12184" shape="rect">12184 Circularity in xs:override</a>.
       </div></li><li><div class="p">Some errors in the XSLT stylesheet of appendix 
       <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a> have been corrected
       (resolving issues <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8573" shape="rect">8573 F.1 Stylesheet for chameleons invalid</a> and
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8574" shape="rect">8574 F.1 Stylesheet for chameleons incomplete</a>).
       </div></li><li><div class="p">In the DTD for schema documents 
       (<a href="#nonnormative-schemaDTD" shape="rect">DTD for Schemas (non-normative) (&#167;I)</a>),
       an error has been corrected in the declaration
       of the <code>inheritable</code> attribute of
       the <code>xs:attribute</code> element
       (resolving issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11070" shape="rect">11070 
       DTD for schema documents: inheritable declared as %URIref</a>).
       </div></li><li><div class="p">In the schema for schema documents, an error in the declaration of
      <code>xs:group</code> within the named model group <code>xs:allModel</code>
      has been corrected to make the type of <code>xs:all</code> a legal 
      restriction of its base type and make the schema for schema documents
      conformant to this specification.  This resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11092" shape="rect">11092
        Error in S4SD: complexType name="all" is not a valid restriction</a>.</div></li><li><div class="p">The XPath subset for selectors and fields in section 
      <a href="#sec-c-selector-xpath" shape="rect">Selector Value OK (&#167;3.11.6.2)</a> 
      and
      <a href="#sec-c-fields-xpaths" shape="rect">Fields Value OK (&#167;3.11.6.3)</a>
      has been revised 
      to align its tokenization rules
      better with <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>; this resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8454" shape="rect">8454
       Tokens in XPath subset for selectors/fields</a>.
      </div></li><li><div class="p">The text has been revised
      
      to correct the terminology used to describe correct XPath
      expressions and to specify that it is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> 
      when type errors in XPath expressions are detected and 
      whether they are treated as static or dynamic errors.
      This change 
      resolves issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11073" shape="rect">11073
      Type errors during XPath evaluation</a>.
      </div></li><li><div class="p">The description of assertions has been revised to make it
       explicit that the data model instance constructed for testing
       assertions has a parentless element node as its root, and not
       an element node with a document node as its parent.  This       
       change resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=12127" shape="rect">12127
       "Root element" in assertion testing</a>.</div></li><li><div class="p">The text has been revised to ensure that the special validation
      rules for <code>xs:ID</code>, <code>xs:IDREF</code>, <code>xs:IDREFS</code>,
      <code>xs:ENTITY</code>, and <code>xs:ENTITIES</code> apply not only
      to the built-in types themselves but also to types derived from them
      by restriction, list construction, union, and extension.
      This resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=10662" shape="rect">10662
       Should IDREFS and ENTITIES be magic types?</a>.
      </div></li><li><div class="p">The sections on the XML representation of components have been
       revised to say explicitly that the constraints and mapping rules
       defined there apply after, not before, pre-processing.
       This change resolves issues 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11179" shape="rect">11179
       minor editorial improvement : parent schema components of a named model group</a>
       and 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11354" shape="rect">11354
       Mentions of "override" outside of the override section</a>
       </div></li><li><div class="p">Some passages have been recast for clarity.</div></li><li><div class="p">Several minor errors, typographic and otherwise,
       have been corrected.</div></li></ul>
   </div><p>For those primarily interested in the changes since version 1.0,
    the appendix
    <a href="#changes" shape="rect">Changes since version 1.0 (non-normative) (&#167;G)</a> is the recommended starting
    point.  It summarizes both changes made
     since XSD 1.0 and some changes which were expected (and predicted
     in earlier drafts of this specification) but have not been made
     after all.
    Accompanying versions of this document display in color
    all changes to normative text since version 1.0 and since the
    previous Working Draft.</p><p>
    
    
      The review period for this Candidate Recommendation document
      extends until 23 August 2011.
    
    Comments on this document should be made in
    W3C's public installation of Bugzilla, 
    specifying "XML Schema" as the product. 
    Instructions can be found at 
    <a href="http://www.w3.org/XML/2006/01/public-bugzilla" shape="rect">http://www.w3.org/XML/2006/01/public-bugzilla</a>.
    If access to Bugzilla is not feasible, 
    please send your comments to the W3C XML Schema comments mailing list, 
    <a href="mailto:www-xml-schema-comments@w3.org" shape="rect">www-xml-schema-comments@w3.org</a> 
    (<a href="http://lists.w3.org/Archives/Public/www-xml-schema-comments/" shape="rect">archive</a>) 
    Each Bugzilla entry and email message should contain only one comment.</p><p>Although feedback based on any
    aspect of this specification is welcome, there are certain aspects of
    the design presented herein for which the Working Group is
    particularly interested in feedback. These are designated
    "priority feedback" aspects of the design, and
    identified as such in editorial notes at appropriate points in this
    draft.
    <em>Any feature 
      mentioned in a
      priority feedback note is a "feature
       at risk":</em>  the feature may be retained as 
     is or
     dropped, depending on the feedback received from readers,
     schema authors, schema users, and implementors.
   </p><p>Publication as a 
    Candidate Recommendation
    does not imply endorsement by the
    W3C Membership. This is a draft document and may be updated, replaced
    or obsoleted by other documents at any time. It is inappropriate to
    cite this document as other than work in progress.</p><div class="block">The 
    <a href="http://www.w3.org/XML/Schema" shape="rect">W3C XML Schema Working Group</a> 
    intends to request advancement of this specification 
    and publication as a 
    <a href="http://www.w3.org/2005/10/Process-20051014/tr#cfr" shape="rect">Proposed Recommendation</a>
    
    as soon after 21 August 2011 as the following
    conditions are met.
    <ul><li><div class="p">Each feature of the specification has been implemented successfully
       by at least two independent implementations.</div></li><li><div class="p">The test suite which tests each feature of XSD new in XSD 1.1 has
      been used to demonstrate the two implementations of each feature.
      (The <a href="http://www.w3.org/XML/2004/xml-schema-test-suite/index.html" shape="rect">XML Schema Test Suite overview page</a> describes the current
      state of the test suite and provides instructions for downloading
      the test suite.)
      </div></li><li><div class="p">The Working Group has responded formally to all issues raised 
       against this document during the Candidate Recommendation period.</div></li></ul>
    The expected Proposed Recommendation
     may include editorial changes and may possibly remove features 
     identified in this draft as being at risk.
    
    
	At the time this Candidate Recommendation
	was published, no interoperability
	or implementation report had yet been prepared.
    
   </div><p>
    This document has been produced by the 
    <a href="http://www.w3.org/XML/Schema" shape="rect">W3C XML Schema Working Group</a>
    as part of the W3C <a href="http://www.w3.org/XML/Activity" shape="rect">XML
     Activity</a>. The goals of 
    XSD 1.1 are
    discussed in the document
    <a href="http://www.w3.org/TR/2003/WD-xmlschema-11-req-20030121/" shape="rect">Requirements 
     for XML Schema 1.1</a>. 
    The authors of this document are
    the members of the XML Schema Working Group.  Different parts of this
    specification have different editors.
   </p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/" shape="rect">5 February
     2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/19482/status" shape="rect">public list of
     any patent disclosures</a> made in connection with the deliverables
    of the group; that page also includes instructions for disclosing a
    patent. An individual who has actual knowledge of a patent which the
    individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential" shape="rect">Essential 
     Claim(s)</a> must disclose the information in accordance with 
    <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure" shape="rect">section 
     6 of the W3C Patent Policy</a>. </p><p>The English version of this specification is the only normative
    version. Information about translations of this document is available
    at <a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema" shape="rect">http://www.w3.org/2003/03/Translations/byTechnology?technology=xmlschema</a>.</p></div><div class="toc">
<h2><a name="contents" id="contents" shape="rect"></a>Table of Contents</h2><div class="toc">1 <a href="#intro" shape="rect">Introduction</a><br clear="none" />
&#160;&#160;&#160;&#160;1.1 <a href="#intro1.1" shape="rect">Introduction to Version 1.1</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.2 <a href="#intro-purpose" shape="rect">Purpose</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.3 <a href="#nss_langids" shape="rect">Namespaces and Language Identifiers</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#xsd-nss" shape="rect">XSD Namespaces</a> &#183; <a href="#sec-nss-special" shape="rect">Namespaces with Special Status</a> &#183; <a href="#ns-bindings" shape="rect">Conventional Namespace Bindings</a> &#183; <a href="#langids" shape="rect">Schema Language Identifiers</a></div>

&#160;&#160;&#160;&#160;1.4 <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.5 <a href="#intro-terminology" shape="rect">Documentation Conventions and Terminology</a>
<br clear="none" />
2 <a href="#concepts" shape="rect">Conceptual Framework</a><br clear="none" />
&#160;&#160;&#160;&#160;2.1 <a href="#xsover" shape="rect">Overview of XSD</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.2 <a href="#concepts-data-model" shape="rect">XSD Abstract Data Model</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#Type_Definition_Summary" shape="rect">Type Definition Components</a> &#183; <a href="#Declarations_Summary" shape="rect">Declaration Components</a> &#183; <a href="#Model_Group_Summary" shape="rect">Model Group Components</a> &#183; <a href="#Constraint_Summary" shape="rect">Constraint Components</a> &#183; <a href="#Group_Definitions" shape="rect">Group Definition Components</a> &#183; <a href="#Annotation" shape="rect">Annotation Components</a></div>

&#160;&#160;&#160;&#160;2.3 <a href="#concepts-schemaConstraints" shape="rect">Constraints and Validation Rules</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.4 <a href="#concepts-conformance" shape="rect">Conformance</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.5 <a href="#sec-schema-validity-and-docs" shape="rect">Schema-validity and documents</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.6 <a href="#concepts-nameSymbolSpaces" shape="rect">Names and Symbol Spaces</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.7 <a href="#Instance_Document_Constructions" shape="rect">Schema-Related Markup in Documents Being Validated</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#xsi_type" shape="rect">xsi:type</a> &#183; <a href="#xsi_nil" shape="rect">xsi:nil</a> &#183; <a href="#xsi_schemaLocation" shape="rect">xsi:schemaLocation, xsi:noNamespaceSchemaLocation</a></div>

&#160;&#160;&#160;&#160;2.8 <a href="#web-representation" shape="rect">Representation of Schemas on the World Wide Web</a>
<br clear="none" />
3 <a href="#components" shape="rect">Schema Component Details</a><br clear="none" />
&#160;&#160;&#160;&#160;3.1 <a href="#scIntro" shape="rect">Introduction</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.2 <a href="#cAttribute_Declarations" shape="rect">Attribute Declarations</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.3 <a href="#cElement_Declarations" shape="rect">Element Declarations</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.4 <a href="#Complex_Type_Definitions" shape="rect">Complex Type Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.5 <a href="#cAttributeUse" shape="rect">Attribute Uses</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.6 <a href="#cAttribute_Group_Definitions" shape="rect">Attribute Group Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.7 <a href="#cModel_Group_Definitions" shape="rect">Model Group Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.8 <a href="#Model_Groups" shape="rect">Model Groups</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.9 <a href="#cParticles" shape="rect">Particles</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.10 <a href="#Wildcards" shape="rect">Wildcards</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.11 <a href="#cIdentity-constraint_Definitions" shape="rect">Identity-constraint Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.12 <a href="#cTypeAlternative" shape="rect">Type Alternatives</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.13 <a href="#cAssertions" shape="rect">Assertions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.14 <a href="#cNotation_Declarations" shape="rect">Notation Declarations</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.15 <a href="#cAnnotations" shape="rect">Annotations</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.16 <a href="#Simple_Type_Definitions" shape="rect">Simple Type Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.17 <a href="#Schemas" shape="rect">Schemas as a Whole</a>
<br clear="none" />
4 <a href="#composition" shape="rect">Schemas and Namespaces: Access and Composition</a><br clear="none" />
&#160;&#160;&#160;&#160;4.1 <a href="#layer1" shape="rect">Layer 1: Summary of the Schema-validity Assessment Core</a>
<br clear="none" />
&#160;&#160;&#160;&#160;4.2 <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#composition-concepts" shape="rect">Basic concepts of schema construction and composition</a> &#183; <a href="#cip" shape="rect">Conditional inclusion</a> &#183; <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
      multiple schema definition documents
       (&lt;include&gt;)</a> &#183; <a href="#modify-schema" shape="rect">Including modified component definitions (&lt;redefine&gt;)</a> &#183; <a href="#override-schema" shape="rect">Overriding component definitions (&lt;override&gt;)</a> &#183; <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (&lt;import&gt;)</a></div>

&#160;&#160;&#160;&#160;4.3 <a href="#composition-instances" shape="rect">Layer 3: Schema Document Access and Web-interoperability</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#schema-repr" shape="rect">Standards for representation of schemas and retrieval of schema documents on the Web</a> &#183; <a href="#schema-loc" shape="rect">How schema definitions are located on the Web</a></div>

5 <a href="#conformance" shape="rect">Schemas and Schema-validity Assessment</a><br clear="none" />
&#160;&#160;&#160;&#160;5.1 <a href="#conformance-schemaValidity" shape="rect">Errors in Schema Construction and Structure</a>
<br clear="none" />
&#160;&#160;&#160;&#160;5.2 <a href="#validation_outcome" shape="rect">Assessing Schema-Validity</a>
<br clear="none" />
&#160;&#160;&#160;&#160;5.3 <a href="#conformance-missing" shape="rect">Missing Sub-components</a>
<br clear="none" />
&#160;&#160;&#160;&#160;5.4 <a href="#conformance-processorResponsibilities" shape="rect">Responsibilities of Schema-aware Processors</a>
<br clear="none" />
</div>
<h3><a name="appendices" id="appendices" shape="rect"></a>Appendices</h3><div class="toc">A <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative)</a><br clear="none" />
B <a href="#outcomes" shape="rect">Outcome Tabulations (normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;B.1 <a href="#validation_failures" shape="rect">Validation Rules</a>
<br clear="none" />
&#160;&#160;&#160;&#160;B.2 <a href="#PSVI_contributions" shape="rect">Contributions to the post-schema-validation infoset</a>
<br clear="none" />
&#160;&#160;&#160;&#160;B.3 <a href="#outcome-src" shape="rect">Schema Representation Constraints</a>
<br clear="none" />
&#160;&#160;&#160;&#160;B.4 <a href="#outcome-cos" shape="rect">Schema Component Constraints</a>
<br clear="none" />
C <a href="#var_terminology" shape="rect">Terminology for implementation-defined features (normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;C.1 <a href="#var_psvi" shape="rect">Subset of the Post-schema-validation Infoset</a>
<br clear="none" />
&#160;&#160;&#160;&#160;C.2 <a href="#var_schema_con" shape="rect">
Terminology of schema construction
</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#vsc_locations" shape="rect">Identifying locations where components are sought</a> &#183; <a href="#vsc_indirection" shape="rect">Identifying methods of indirection</a> &#183; <a href="#vsc_key" shape="rect">Identifying the key for use in indirection</a> &#183; <a href="#vsc_stopping" shape="rect">Identifying when to stop searching</a> &#183; <a href="#vsc_failure" shape="rect">Identifying how to react to failure</a></div>

&#160;&#160;&#160;&#160;C.3 <a href="#sec-other-idf" shape="rect">Other Implementation-defined Features</a>
<br clear="none" />
D <a href="#infoset" shape="rect">Required Information Set Items and Properties (normative)</a><br clear="none" />
E <a href="#impl-def-dep-list" shape="rect">Checklists of implementation-defined and implementation-dependent features (normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;E.1 <a href="#impl-def-list" shape="rect">Checklist of implementation-defined features</a>
<br clear="none" />
&#160;&#160;&#160;&#160;E.2 <a href="#impl-dep-list" shape="rect">Checklist of implementation-dependent features</a>
<br clear="none" />
F <a href="#composition-xslts" shape="rect">Stylesheets for Composing Schema Documents (Normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;F.1 <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion</a>
<br clear="none" />
&#160;&#160;&#160;&#160;F.2 <a href="#override-xslt" shape="rect">Transformation for xs:override</a>
<br clear="none" />
G <a href="#changes" shape="rect">Changes since version 1.0 (non-normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;G.1 <a href="#done" shape="rect">Changes  made since version 1.0</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#ch_specs" shape="rect">Relationship between XSD and other specifications</a> &#183; <a href="#ch_versions" shape="rect">XSD versions</a> &#183; <a href="#ch_models" shape="rect">Changes to content models</a> &#183; <a href="#ch_xpath" shape="rect">Assertions and XPath</a> &#183; <a href="#ch_complex-derivation" shape="rect">Derivation of complex types</a> &#183; <a href="#ch_complex" shape="rect">Changes to complex type definitions</a> &#183; <a href="#ch_id" shape="rect">ID, IDREF, and related types</a> &#183; <a href="#ch_std" shape="rect">Simple type definitions</a> &#183; <a href="#ch_elemdecl" shape="rect">Element declarations</a> &#183; <a href="#ch_attrdecl" shape="rect">Attribute declarations</a> &#183; <a href="#ch_components" shape="rect">Component structure</a> &#183; <a href="#ch_sva" shape="rect">The process of validation</a> &#183; <a href="#ch_psvi" shape="rect">post-schema-validation infoset</a> &#183; <a href="#ch_conformance" shape="rect">Conformance</a> &#183; <a href="#ch_schemacomp" shape="rect">Schema composition</a> &#183; <a href="#ch_misc_sub" shape="rect">Other substantive changes</a> &#183; <a href="#ch_clar" shape="rect">Clarifications and editorial changes</a></div>

&#160;&#160;&#160;&#160;G.2 <a href="#issues" shape="rect">Issues not resolved</a>
<br clear="none" />
H <a href="#normative-glossary" shape="rect">Glossary (non-normative)</a><br clear="none" />
I <a href="#nonnormative-schemaDTD" shape="rect">DTD for Schemas (non-normative)</a><br clear="none" />
J <a href="#non-ambig" shape="rect">Analysis of the Unique Particle Attribution Constraint (non-normative)</a><br clear="none" />
K <a href="#nonnormative-language-ids" shape="rect">XSD Language Identifiers (non-normative)</a><br clear="none" />
L <a href="#biblio" shape="rect">References</a><br clear="none" />
&#160;&#160;&#160;&#160;L.1 <a href="#normative-references" shape="rect">Normative</a>
<br clear="none" />
&#160;&#160;&#160;&#160;L.2 <a href="#nonnormative-references" shape="rect">Non-normative</a>
<br clear="none" />
M <a href="#acknowledgments" shape="rect">Acknowledgements (non-normative)</a><br clear="none" />
</div></div><hr /><div class="body"><div class="div1">
<h2><a name="intro" id="intro" shape="rect"></a>1 Introduction</h2><p>This document sets out the structural part  of the XML Schema Definition Language.</p><p>Chapter 2 presents a <a href="#concepts" shape="rect">Conceptual Framework (&#167;2)</a> for XSD, including an introduction to the
    nature of XSD schemas and an introduction to the XSD
    abstract data model, along with other terminology used throughout
    this document. </p><p>Chapter 3, <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, specifies the precise
    semantics of each component of the abstract model, the
    representation of each component in XML, with reference to a DTD
    and an XSD schema for
    an XSD document type, along with a detailed mapping
    between the elements and attribute vocabulary of this
    representation and the components and properties of the abstract
    model.</p><p>Chapter 4 presents <a href="#composition" shape="rect">Schemas and Namespaces: Access and Composition (&#167;4)</a>, including the
    connection between documents and schemas, the import, inclusion
    and redefinition of declarations and definitions and the
    foundations of schema-validity assessment.</p><p>Chapter 5 discusses <a href="#conformance" shape="rect">Schemas and Schema-validity Assessment (&#167;5)</a>, including the
    overall approach to schema-validity assessment of documents, and
    responsibilities of schema-aware processors. </p><p>The normative appendices include a <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a> for the XML representation of
    schemas and
    <a href="#normative-references" shape="rect">Normative (&#167;L.1)</a>.</p><p>The non-normative appendices include the <a href="#nonnormative-schemaDTD" shape="rect">DTD for Schemas (non-normative) (&#167;I)</a> and a <a href="#normative-glossary" shape="rect">Glossary (non-normative) (&#167;H)</a>.</p><p>This document is primarily intended as a language definition
    reference. As such, although it contains a few examples, it is
    <em>not</em> primarily designed to serve as a motivating
    introduction to the design and its features, or as a tutorial for
    new users. Rather it presents a careful and fully explicit
    definition of that design, suitable for guiding implementations.
    For those in search of a step-by-step introduction to the design,
    the non-normative <a href="#bib-expo" shape="rect">[XML Schema: Primer]</a>
    is a much better starting point than this document.</p><div class="div2">
<h3><span class="nav"> <a href="#intro-purpose" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="intro1.1" id="intro1.1" shape="rect"></a>1.1 Introduction to Version 1.1</h3><p>The Working Group has three main goals for this version of W3C
     XML Schema:</p><ul><li><div class="p">Significant improvements in simplicity of design and
       clarity of exposition <em>without</em> loss of backward
       <em>or</em> forward compatibility;
      </div></li><li><div class="p">Provision of support for versioning of XML languages
       defined using this
       specification, including the XML vocabulary
	specified here for use in schema documents.</div></li><li><div class="p">Provision of support for
       co-occurrence constraints, that is constraints which make the
       presence of an attribute or element, or the values allowable
       for it, depend on the value or presence of other attributes or
       elements.</div></li></ul><p>These goals are 
     in tension with one another. The Working Group's strategic guidelines
     for changes between versions 1.0 and 1.1 can be summarized as follows:</p><ol class="enumar"><li><div class="p">Support
       for versioning (acknowledging that this <em>may</em> be
       slightly disruptive to the XML transfer syntax at the
       margins)</div></li><li><div class="p">Support for co-occurrence
       constraints (which will certainly involve additions to the XML
       transfer syntax, which will not be understood by 1.0
       processors)</div></li><li><div class="p">Bug fixes (unless in specific
       cases we decide that the fix is too disruptive for a point
       release)</div></li><li><div class="p">Editorial changes</div></li><li><div class="p">Design cleanup will possibly change behavior in edge
       cases</div></li><li><div class="p">Non-disruptive changes to type hierarchy
       (to better support current and forthcoming international
       standards and W3C recommendations)</div></li><li><div class="p">Design cleanup will possibly change component structure
       (changes to functionality restricted to edge cases)</div></li><li><div class="p">No
       significant changes in existing functionality</div></li><li><div class="p">No changes
       to XML transfer syntax except those required by version control
       hooks, co-occurrence
	constraints and bug fixes</div></li></ol><p>The aim with regard
      to compatibility is that</p><ul><li><div class="p">All schema documents conformant to version 1.0 of this
       specification should also conform to version 1.1, and should
       have the same <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> behavior across 1.0 and 1.1 implementations
       (except possibly in edge cases and in the details of the
       resulting PSVI);</div></li><li><div class="p">The vast majority of schema documents conformant to
       version 1.1 of this specification should also conform to
       version 1.0, leaving aside any incompatibilities arising from
       support for versioning or
	co-occurrence constraints, and when they are
       conformant to version 1.0 (or are made conformant by the
       removal of versioning information), should have the same
       <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> behavior
       across 1.0 and 1.1 implementations (again except possibly in
       edge cases and in the details of the resulting PSVI);
      </div></li></ul></div><div class="div2">
<h3><span class="nav"><a href="#intro1.1" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#nss_langids" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="intro-purpose" id="intro-purpose" shape="rect"></a>1.2 Purpose</h3><p>The purpose of <em>XML Schema Definition Language: Structures</em> is to define the nature of 
     XSD schemas and their component parts,
     provide an inventory of XML markup constructs with which to
     represent schemas, and define the application of schemas to XML
     documents. </p><p>The purpose of an XSD schema is to define and describe a
     class of XML documents by using schema components to constrain
     and document the meaning, usage and relationships of their
     constituent parts: datatypes, elements and their content and
     attributes and their values. Schemas can also provide for
     the specification of additional document information, such as
     normalization and defaulting of attribute and element values.
     Schemas have facilities for self-documentation. Thus, <em>XML Schema Definition Language: Structures</em> can
     be used to define, describe and catalogue XML vocabularies for
     classes of XML documents. </p><p>Any application that consumes well-formed XML can use the
      formalism defined here to express
     syntactic, structural and value constraints applicable to its
     document instances. The XSD formalism allows a useful level of
     constraint checking to be described and implemented for a wide
     spectrum of XML applications.  However, the language defined by
     this specification does not attempt to provide <em>all</em>
     the facilities that might be needed by applications. Some applications
     will require constraint capabilities not expressible in this
     language, and so will need to perform their own additional
     validations.</p></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#intro-purpose" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#intro-relatedWork" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="nss_langids" id="nss_langids" shape="rect"></a>1.3 Namespaces and Language Identifiers</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.1 <a href="#xsd-nss" shape="rect">XSD Namespaces</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.1.1 <a href="#xsd-namespace" shape="rect">The Schema Namespace (xs)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.1.2 <a href="#xsi-namespace" shape="rect">The Schema Instance Namespace (xsi)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.1.3 <a href="#vc-namespace" shape="rect">The Schema Versioning Namespace (vc)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.2 <a href="#sec-nss-special" shape="rect">Namespaces with Special Status</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.3 <a href="#ns-bindings" shape="rect">Conventional Namespace Bindings</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1.3.4 <a href="#langids" shape="rect">Schema Language Identifiers</a><br clear="none" />
</div><div class="div3">
<h4><a name="xsd-nss" id="xsd-nss" shape="rect"></a>1.3.1 XSD Namespaces</h4><div class="div4">
<h5><a name="xsd-namespace" id="xsd-namespace" shape="rect"></a>1.3.1.1 The Schema Namespace (<code>xs</code>)</h5><p>
       The XML representation of schema components uses a vocabulary
       identified by the namespace name <code>http://www.w3.org/2001/XMLSchema</code>.
       For brevity, the text and examples in this specification use
       the prefix <code>xs:</code>  to stand for this
       namespace; in practice, any prefix can be used.
      </p><div class="note"><div class="p"><b>Note:</b> 
	The namespace for schema documents is unchanged from version
	1.0 of this specification, because any schema document valid
	under the rules of version 1.0 has essentially the same
	<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> semantics under this specification as it did under
	version 1.0 (Second Edition).
	There are a few exceptions to this rule, involving errors in
	version 1.0 of this specification which were not reparable by
	errata and which have therefore been fixed only in this
	version of this specification, not in version 1.0.
       </div></div><div class="note"><div class="p"><b>Note:</b> 
   The data model used by <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> and other
	specifications, namely <a href="#bib-xdm" shape="rect">[XDM]</a>, makes use of
	type labels in the
	XSD namespace (<code>untyped</code>,
	<code>untypedAtomic</code>) which are not defined in this
	specification; see the <a href="#bib-xdm" shape="rect">[XDM]</a>
	specification for details of those types.
       </div></div><p>
       Users of the namespaces defined here should be aware, as a
       matter of namespace policy, that more names 
       in this namespace may be given
	definitions in future versions of this or other
       specifications.
      </p></div><div class="div4">
<h5><a name="xsi-namespace" id="xsi-namespace" shape="rect"></a>1.3.1.2 The Schema Instance Namespace (<code>xsi</code>)</h5><p>This specification defines
       several attributes for direct use in any XML documents, as
       described in <a href="#Instance_Document_Constructions" shape="rect">Schema-Related Markup in Documents Being Validated (&#167;2.7)</a>.
       These attributes are in the namespace whose name is <code>http://www.w3.org/2001/XMLSchema-instance</code>.
       For brevity, the text and examples in this specification use
       the prefix <code>xsi:</code> to stand for this  namespace; in
       practice, any prefix can be used.
      </p><p>
       Users of the namespaces defined here should be aware, as a
       matter of namespace policy, that more names 
       in this namespace may be given
	definitions in future versions of this or other
       specifications.
      </p></div><div class="div4">
<h5><a name="vc-namespace" id="vc-namespace" shape="rect"></a>1.3.1.3 The Schema Versioning Namespace (<code>vc</code>)</h5><p>
       The pre-processing of schema documents described in 
       <a href="#cip" shape="rect">Conditional inclusion (&#167;4.2.2)</a> uses 
       attributes in the namespace
       <code>http://www.w3.org/2007/XMLSchema-versioning</code>.
       For brevity, the text and examples in this specification use
       the prefix <code>vc:</code> to stand for this
       namespace; in practice, any prefix can be used.
      </p><p>
       Users of the namespaces defined here should be aware, as a
       matter of namespace policy, that more names in this namespace
       may be given definitions in future versions of this or other
       specifications.
      </p></div></div><div class="div3">
<h4><a name="sec-nss-special" id="sec-nss-special" shape="rect"></a>1.3.2 Namespaces with Special Status</h4><div class="block">Except as otherwise specified elsewhere in this specification,
      if components are <a href="#key-nonnull" class="termref" shape="rect"><span class="arrow">&#183;</span>present<span class="arrow">&#183;</span></a> in a schema, or source
      declarations are included in an XSD schema document, for
      components in any of the following namespaces, then the
      components, or the declarations, <span class="rfc2119">should</span> agree with the
      descriptions given in the relevant specifications and with the
      declarations given in any applicable XSD schema documents
      maintained by the World Wide Web Consortium for these
      namespaces.  If they do not, the effect is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>
      and not defined by this specification.
      <ul><li><div class="p"><code>http://www.w3.org/XML/1998/namespace</code></div></li><li><div class="p"><code>http://www.w3.org/2001/XMLSchema</code></div></li><li><div class="p"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></li><li><div class="p"><code>http://www.w3.org/2007/XMLSchema-versioning</code></div></li></ul>
      </div><div class="note"><div class="p"><b>Note:</b> Depending on implementation details, some processors may
       be able to process and use (for example) variant forms of the
       schema for schema documents devised for specialized purposes;
       if so, this specification does not forbid the use of such variant
       components.  Other processors, however, may find it 
       impossible to validate and use alternative components for
       these namespaces; this specification does not require them
       to do so.  Users who have an interest in such specialized
       processing should be aware of the attending interoperability
       problems and should exercise caution.
      </div><div class="p">
       This flexibility does not extend to the components described in
       this specification or in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> as being
       included in every schema, such as those for the primitive and
       other built-in datatypes.  Since those components are by
       definition part of evey schema, it is not possible to have
       different components with the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> present in
       the schema without violating constraints defined elsewhere
       against multiple components with the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a>.
      </div></div><p>Components and source declarations <span class="rfc2119">must not</span> specify
      <code>http://www.w3.org/2000/xmlns/</code> as their
      target namespace.  If they do, then the schema
      and/or schema document is in <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a>.
     </p><div class="note"><div class="p"><b>Note:</b> Any confusion in the use, structure, or meaning of this namespace
       would have catastrophic effects on the interpretability of
       this specification.
      </div></div></div><div class="div3">
<h4><a name="ns-bindings" id="ns-bindings" shape="rect"></a>1.3.3 Conventional Namespace Bindings</h4><div class="block">Several namespace prefixes are conventionally used in this
      document for notational convenience.  The following bindings are
      assumed.<ul><li><div class="p"><code>fn</code> bound to
	 <code>http://www.w3.org/2005/xpath-functions</code> (defined
	 in <a href="#bib-fno" shape="rect">[Functions and Operators]</a></div></li><li><div class="p"><code>html</code> bound to
	 <code>http://www.w3.org/1999/xhtml</code></div></li><li><div class="p"><code>my</code> (in examples) bound to the target namespace
	 of the example schema document</div></li><li><div class="p"><code>rddl</code> bound to
	 <code>http://www.rddl.org/</code></div></li><li><div class="p"><code>vc</code> bound to
	 <code>http://www.w3.org/2007/XMLSchema-versioning</code> (defined
	 in this and related specifications)</div></li><li><div class="p"><code>xhtml</code> bound to
	 <code>http://www.w3.org/1999/xhtml</code></div></li><li><div class="p"><code>xlink</code> bound to
	 <code>http://www.w3.org/1999/xlink</code></div></li><li><div class="p"><code>xml</code> bound to
	 <code>http://www.w3.org/XML/1998/namespace</code> (defined in
	 <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>)</div></li><li><div class="p"><code>xs</code> bound to <code>http://www.w3.org/2001/XMLSchema</code>
	 (defined in this and related specifications)</div></li><li><div class="p"><code>xsi</code> bound to
	 <code>http://www.w3.org/2001/XMLSchema-instance</code> (defined in this and
	 related specifications)</div></li><li><div class="p"><code>xsl</code> bound to
	 <code>http://www.w3.org/1999/XSL/Transform</code></div></li></ul>
     </div><p>In practice, any prefix bound to the appropriate namespace
      name <span class="rfc2119">may</span> be used (unless otherwise specified by the definition
      of the namespace in question, as for <code>xml</code> and
      <code>xmlns</code>).</p></div><div class="div3">
<h4><a name="langids" id="langids" shape="rect"></a>1.3.4 Schema Language Identifiers</h4><p>Sometimes other specifications or Application Programming
      Interfaces (APIs) need to refer to the XML Schema Definition Language in
      general, sometimes they need to refer to a specific version of
      the language. To make such references easy and enable consistent identifiers to be used, we provide the following
      URIs to identify these
      concepts.</p><div class="glist"><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema</code></div><div class="giDef"><div class="p">
	 Identifies the XML Schema Definition Language in general, without referring
	 to a specific version of it.
	</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v<var>X</var>.<var>Y</var></code></div><div class="giDef"><div class="p">
	 Identifies the language described in version  <var>X</var>.<var>Y</var> of the XSD specification. URIs of this form refer to
	 a numbered version
	 of the language in general. They do not distinguish among different working drafts or
	 editions of that version. For example,
	 <code>http://www.w3.org/XML/XMLSchema/v1.0</code> identifies
	 XSD version 1.0 and <code>http://www.w3.org/XML/XMLSchema/v1.1</code> identifies
	 XSD version 1.1.
	</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v<var>X</var>.<var>Y</var>/<var>N</var>e</code></div><div class="giDef"><div class="p">
	 Identifies the language described in the <var>N</var>-th edition of version <code><var>X</var>.<var>Y</var></code> of
	 the XSD specification. For example, <code>http://www.w3.org/XML/XMLSchema/v1.0/2e</code>
	 identifies the second edition of XSD version 1.0.
	</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v<var>X</var>.<var>Y</var>/<var>N</var>e/yyyymmdd</code></div><div class="giDef"><div class="p">
	 Identifies the language described in the <var>N</var>-th edition of version
	 <code><var>X</var>.<var>Y</var></code> of
	 the XSD specification published on the particular date
	 <code>yyyy-mm-dd</code>. For example,
	 <code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20001024</code> 
	 identifies the language
	  defined in the XSD version 1.0 Candidate
	 Recommendation (CR) published on 24 October 2000, and
	 <code>http://www.w3.org/XML/XMLSchema/v1.0/2e/20040318</code> 
	 identifies the language
	  defined in the XSD version 1.0 Second Edition Proposed
	 Edited Recommendation (PER)
	  published on 18 March 2004. 
        
	</div></div></div></div><p>Please see <a href="#nonnormative-language-ids" shape="rect">XSD Language Identifiers (non-normative) (&#167;K)</a> for a
      complete list of XML Schema Definition Language identifiers which exist to date.</p></div></div><div class="div2">
<h3><span class="nav"><a href="#nss_langids" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#intro-terminology" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="intro-relatedWork" id="intro-relatedWork" shape="rect"></a>1.4 Dependencies on Other Specifications</h3><p>The definition of <em>XML Schema Definition Language: Structures</em> depends on the following
     specifications:
     <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a>,
     <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>,  <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>,
     and
     <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</p><p>See <a href="#infoset" shape="rect">Required Information Set Items and Properties (normative) (&#167;D)</a> for a tabulation of the
     information items and properties specified in <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a> which this
     specification requires as a precondition to schema-aware
     processing.</p><p><a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> defines some
     datatypes which depend on definitions in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>
     and <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>; those definitions, and therefore
     the datatypes based on them, vary between version 1.0 (<a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a>, <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>) and
     version 1.1 (<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>, 
     <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>) of those specifications.  In any
     given schema-validity-<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
     episode, the choice of the 1.0 or the 1.1 definition of those
     datatypes is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</p><p>
     Conforming implementations of this specification <span class="rfc2119">may</span> provide
     either the 1.1-based datatypes or the 1.0-based datatypes, or
     both.  If both are supported, the choice of which datatypes to
     use in a particular assessment episode <span class="rfc2119">should</span> be under user
     control.
    </p><div class="note"><div class="p"><b>Note:</b> 
      It is a consequence of the
       rule just given that implementations 
       
      <span class="rfc2119">may</span> provide the heuristic of using the 1.1
      datatypes if the input is labeled as XML 1.1, and the 1.0
      datatypes if the input is labeled 1.0. It should be noted
      however that the XML version number is not required to be
      present in the input to an assessment episode, and in any case
      the heuristic <span class="rfc2119">should</span> be subject to override by users, to
      support cases where users wish to accept XML 1.1 input but
      validate it using the 1.0 datatypes, or accept XML 1.0 input and
      validate it using the 1.1 datatypes.
     </div></div><div class="note"><div class="p"><b>Note:</b> 
      Some users will perhaps wish to accept only XML 1.1 input, or
      only XML 1.0 input. The rules 
       just given ensure that conforming implementations of this
      specification which accept XML input <span class="rfc2119">may</span> accept XML 1.0, XML
      1.1, or both and <span class="rfc2119">may</span> provide user control over which versions
      of XML to accept.
     </div></div></div><div class="div2">
<h3><span class="nav"><a href="#intro-relatedWork" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="intro-terminology" id="intro-terminology" shape="rect"></a>1.5 Documentation Conventions and Terminology</h3><p>The section introduces the highlighting and typography as used
     in this document to present technical material.</p><div class="block">Unless otherwise noted, the entire text of
     this specification is normative.  Exceptions include:
     <ul><li><div class="p">notes</div></li><li><div class="p">sections explicitly marked non-normative</div></li><li><div class="p">examples and their commentary</div></li><li><div class="p">informal descriptions of the consequences of rules
	formally and normatively stated elsewhere (such informal
	descriptions are typically introduced by phrases like
	"Informally, ..." or "It is a 
	consequence of ... that ...")</div></li></ul>
     Explicit statements that some material is normative are not
     to be taken as implying that material not so described
     is non-normative
     (other than that mentioned in the list just given).     
    </div><p>Special terms are defined at their point of introduction in the
     text.  For example <span class="termdef"><a name="key-sampledef" id="key-sampledef" title="" shape="rect">[Definition:]&#160;&#160;</a>a <b>term</b> is something used with a
      special meaning</span>.  The definition is labeled as such
     and the term it defines is displayed in boldface.  The end of the
     definition is not specially marked in the displayed or printed
     text.  Uses of defined terms are links to their definitions, set
     off with middle dots, for instance <a href="#key-sampledef" class="termref" shape="rect"><span class="arrow">&#183;</span>term<span class="arrow">&#183;</span></a>.</p><p>Non-normative examples are set off in boxes and accompanied by
     a brief explanation:</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;schema targetNamespace="http://www.example.com/XMLSchema/1.0/mySchema"&gt;</pre></div><div class="exampleWrapper">
<div class="p">And an explanation of the example.</div></div></div><p>The definition of each kind of schema component consists of a
     list of its properties and their contents, followed by
     descriptions of the semantics of the properties:</p><div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ex" id="ex" shape="rect">Example</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ex-example_property" shape="rect" id="ex-example_property"></a><div class="pdName"><span class="propdef">{example property}</span></div>
<div class="pdDef">
A  <a href="#c" class="compref" shape="rect">Component</a> component.  Required.<div class="ownDesc">
<p>An example property</p></div>
</div>
</div>
</div></div>
</div>
<p>References to properties of schema components are links to the
     relevant definition as exemplified above, set off with curly
     braces, for instance 
     <a href="#ex-example_property" class="propref" shape="rect">{example property}</a>.</p><p>For a given component <var>C</var>, an expression
     of the form "<var>C</var>.<a href="#ex-example_property" class="propref" shape="rect">{example property}</a>"
     denotes the (value of the) property 
     <a href="#ex-example_property" class="propref" shape="rect">{example property}</a> for component <var>C</var>.
     The leading "<var>C</var>." (or more) is sometimes omitted,
     if the identity of the component and any other omitted properties
     is understood from the context.
     This "dot operator" is left-associative, so
     "<var>C</var>.<span class="anonRef">{p1}</span>.<span class="anonRef">{p2}</span>"
     means the same as 
     "(<var>C</var>.<span class="anonRef">{p1}</span>) . 
     <span class="anonRef">{p2}</span>"
     and denotes the value of property <span class="anonRef">{p2}</span>
     within the component or <a href="#t-propRec" class="termref" shape="rect"><span class="arrow">&#183;</span>property record<span class="arrow">&#183;</span></a> which itself
     is the value of <var>C</var>'s <span class="anonRef">{p1}</span>  property.
     White space on either side of the dot operator has no significance
     and is used (rarely) solely for legibility.
    </p><p>For components <var>C</var><sub>1</sub> and <var>C</var><sub>2</sub>, an expression
     of the form "<var>C</var><sub>1</sub>&#160;.&#160;<span class="anonRef">{example property 1}</span> =  <var>C</var><sub>2</sub>&#160;.&#160;<span class="anonRef">{example property 2}</span>"
     means that <var>C</var><sub>1</sub> and <var>C</var><sub>2</sub> have the same value for the
     property (or properties) in question.  Similarly,
     "<var>C</var><sub>1</sub> = <var>C</var><sub>2</sub>" means that <var>C</var><sub>1</sub> and <var>C</var><sub>2</sub> are
     identical, and "<var>C</var><sub>1</sub>.<a href="#ex-example_property" class="propref" shape="rect">{example property}</a>
     =  <var>C</var><sub>2</sub>" that <var>C</var><sub>2</sub> is the value of 
     <var>C</var><sub>1</sub>.<a href="#ex-example_property" class="propref" shape="rect">{example property}</a>.</p><p>The correspondence between an element information item which is
     part of the XML representation of a schema and one or more schema
     components is presented in a tableau which illustrates the
     element information item(s) involved. This is followed by a
     tabulation of the correspondence between properties of the
     component and properties of the information item.  Where context
     determines which of several
     different components corresponds to the
      source declaration, several tabulations, one per
     context, are given.  The property correspondences are normative,
     as are the illustrations of the XML representation element
     information items.
    </p><p>In the XML representation, bold-face attribute names (e.g.
     <b>count</b> below) indicate a required attribute
     information item, and the rest are optional.  Where an attribute
     information item has an enumerated type definition, the values
     are shown separated by vertical bars, as for <code>size</code>
     below; if there is a default value, it is shown following a
     colon.  Where an attribute information item has a built-in simple
     type definition defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, a hyperlink
     to
     its definition therein is given.</p><p>The allowed content of the information item is shown as a
     grammar fragment, using the Kleene operators <code>?</code>,
     <code>*</code> and <code>+</code>.  Each element name therein is
     a hyperlink to its own illustration.</p><div class="note"><div class="p"><b>Note:</b> The illustrations are derived automatically from the <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.  In the case of apparent
      conflict, the <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a> takes
      precedence, as it, together with the <a href="#gloss-src" class="termref" shape="rect"><span class="arrow">&#183;</span>Schema Representation Constraints<span class="arrow">&#183;</span></a>,
      provide the normative statement of the form of XML
      representations.</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>example</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-example" name="element-example" shape="rect">&lt;example</a><br clear="none" />&#160;&#160;<b>count</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#integer" shape="rect">integer</a><br clear="none" />&#160;&#160;size = (<var>large</var> | <var>medium</var> | <var>small</var>)&#160;:&#160;medium&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-all" class="eltref" shape="rect">all</a> | <a href="#element-any" class="eltref" shape="rect">any</a>*)<br clear="none" />&lt;/example&gt;</p><div class="reprcompmulti"><div class="reprHead"><a href="#intro-terminology" shape="rect">Example</a> <strong>Schema Component</strong></div></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ex-example_property" class="propref" shape="rect">{example property}</a></div><div class="mapRepr">Description of what
       the property corresponds to, e.g. the value of the
       <code>size</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
      <br clear="none" />&#160;
   </div></div></div><p>References to elements in the text are links to the relevant
     illustration as exemplified above, set off with angle brackets,
     for instance <a href="#element-example" class="eltref" shape="rect">&lt;example&gt;</a>.</p><p>
     Unless otherwise specified, references to attribute values
     are references to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the attribute information 
     item in question, not to its <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> or to other forms
     or varieties of "value" associated with it.
     For a given element information item <var>E</var>, expressions of the 
     form "<var>E</var> has <code>att1</code> = <var>V</var>" 
     are short-hand for "there is an attribute information
      item named <code>att1</code> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of <var>E</var> and 
      its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>  
      is <var>V</var>."
     If the identity of <var>E</var> is clear from context, expressions
     of the form "<code>att1</code> = <var>V</var>"
     are sometimes used.
     The form "<code>att1</code> &#8800; <var>V</var>" is also used
     to specify that the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <code>att1</code> is
     <em>not</em> <var>V</var>.
    </p><p>References to properties of information items as defined in
     <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a> are notated as links to the relevant
     section thereof, set off with square brackets, for example
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</p><p>Properties which this specification defines for information
     items are introduced as follows:</p><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;example&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="ex-foo" name="ex-foo" shape="rect"><span class="propdef">[new property]</span></a></dt><dd>The value the property
      gets.</dd></dl>
</div>
</div>
<p>References to properties of information items defined in this
     specification are notated as links to their introduction as
     exemplified above, set off with square brackets, for example
     <a href="#ex-foo" class="propref" shape="rect">[new property]</a>.</p><p>The "dot operator" described above
     for components and their properties is also used for information items 
     and their properties.  For a given information item <var>I</var>, an expression
     of the form "<var>I</var>&#160;.&#160;<a href="#ex-foo" class="propref" shape="rect">[new property]</a>"
     denotes the (value of the) property 
     <a href="#ex-foo" class="propref" shape="rect">[new property]</a> for item <var>I</var>.
    </p><p>
     Lists of normative constraints are typically introduced with
     phrase like 
     "all of the following are true" (or "... apply"),
     "one of the following is true",
     "at least one of the following is true",
     "one or more of the following is true",
     "the appropriate case among the following is true",
     etc.
     The phrase "one of the following is true"
     is used in cases where the authors believe the items listed
     to be mutually exclusive (so that the distinction between
     "exactly one" and "one or more"
     does not arise).  If the items in such a list are not in fact
     mutually exclusive, the phrase "one of the following"
     should be interpreted as meaning "one or more of the
     following".
     The phrase "the appropriate case among the following"
     is used only when the cases are thought by the authors to be
     mutually exclusive; if the cases in such a list are not in fact
     mutually exclusive, the first applicable case should be 
     taken.  Once a case has been encountered with a true condition,
     subsequent cases  <span class="rfc2119">must</span> not be tested.
     
    </p><p>The following highlighting is used for non-normative commentary
     in this document:</p><div class="note"><div class="p"><b>Note:</b> General comments directed to all readers. </div></div><p>Within normative prose in this
     specification, the words <span class="rfc2119">may</span>,
      <span class="rfc2119">should</span>,
     <span class="rfc2119">must</span> and <span class="rfc2119">must not</span> are
     defined as follows:</p><div class="glist"><div class="gitem"><div class="giLabel"><span class="rfc2119">may</span></div><div class="giDef"><div class="p">Schemas,
	schema documents, and processors are
	permitted to but need not behave as described.</div></div></div><div class="gitem"><div class="giLabel"><span class="rfc2119">should</span></div><div class="giDef"><div class="p">It is recommended that schemas,
	schema documents,
	and
	 
	processors behave as described, but there
	can be valid reasons for them not to; it is important that the
	full implications be understood and carefully weighed before
	adopting behavior at variance with the recommendation.</div></div></div><div class="gitem"><div class="giLabel"><span class="rfc2119">must</span></div><div class="giDef"><div class="p">
	<em>(Of schemas and 
	 schema documents:)</em>
	
	Schemas and documents are required to behave as
	described; otherwise they are in <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a>.</div><div class="p"><em>(Of 
	  processors:)</em>
	Processors are 
	required to behave as described.</div></div></div><div class="gitem"><div class="giLabel"><span class="rfc2119">must not</span></div><div class="giDef"><div class="p">Schemas, 
	 schema documents, and processors 
	are forbidden to behave as
	described; schemas and documents which nevertheless
	 do so are in <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a>.</div></div></div><div class="gitem"><div class="giLabel"><a name="dt-error" id="dt-error" shape="rect"></a>error</div><div class="giDef"><div class="p">A failure of a schema
	 or schema
	document to conform to the rules of this
	specification.</div><div class="p">Except as otherwise specified, 
	processors <span class="rfc2119">must</span> distinguish error-free (conforming) schemas
	and schema documents used in <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> from those with errors; 
	 
	if a schema used in <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
	  or a schema document used in constructing a schema
	  is in error,
	 processors <span class="rfc2119">must</span> report the fact;
	 if more than one is in error, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>
	 whether more than one is reported as being in error.
	 If one or more of the constraint codes given 
	 in <a href="#outcomes" shape="rect">Outcome Tabulations (normative) (&#167;B)</a> is applicable, it is 
	 <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> how many of them, and which, 
	 are reported.
	
       </div><div class="note"><div class="p"><b>Note:</b> Failure of an XML document to be valid against a particular
	 schema is not (except for the special case of a schema
	 document consulted in the course of building a schema) in
	 itself a failure to conform to this specification and thus,
	 for purposes of this specification, not an error.
	</div></div><div class="note"><div class="p"><b>Note:</b> Notwithstanding the fact that (as just noted) failure to be
	 schema-valid is not a violation of this specification and 
	 thus not strictly speaking an error as defined here,
	 the names of the PSVI properties <a href="#a-schema_error_code" class="propref" shape="rect">[schema error code]</a> (for attributes) and <a href="#e-schema_error_code" class="propref" shape="rect">[schema error code]</a> (for elements) are retained for
	 compatibility with other versions of this specification, and
	 because in many applications of XSD, non-conforming
         documents <em>are</em> "in error" for
	 purposes of those applications.
	</div></div></div></div><div class="gitem"><div class="giLabel"><a name="key-deprecated" id="key-deprecated" shape="rect"></a>deprecated</div><div class="giDef"><div class="p">A feature or construct defined in this specification 
	described as <b>deprecated</b> is retained in this
	specification for compatibility with previous versions
	of the specification, and but its use is not advisable and
	schema authors <span class="rfc2119">should</span> avoid its use if possible.
       </div><div class="p">       
	Deprecation has no effect on the conformance of schemas
	or schema documents which use deprecated features.
	Since deprecated features are part of the specification,
	processors <span class="rfc2119">must</span> support them, although some processors
	<span class="rfc2119">may</span>
 choose to issue warning messages when deprecated
	features are encountered.
       </div><div class="p">
	Features deprecated in this version of this specification
	may be removed entirely in future versions, if any.
       </div></div></div></div><p>These definitions describe in terms
     specific to this document the meanings assigned to these terms by
     <a href="#rfc-2119" shape="rect">[IETF RFC 2119]</a>. The specific wording follows
     that of <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>.
    </p><p>Where these terms appear without special highlighting,
     they are used in their ordinary senses and do not express conformance
     requirements.  Where these terms appear highlighted within
     non-normative material (e.g. notes), they are recapitulating
     rules normatively stated elsewhere.
    </p><p>This
     specification provides a  
     further description
     of error and of conformant
     processors' responsibilities with respect to errors in
     <a href="#conformance" shape="rect">Schemas and Schema-validity Assessment (&#167;5)</a>.</p></div></div><div class="div1">
<h2><a name="concepts" id="concepts" shape="rect"></a>2 Conceptual Framework</h2><p>This chapter gives an overview of <em>XML Schema Definition Language: Structures</em> at the level of its
    abstract data model.  <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> provides details
    on this model, including a normative representation in XML for the
    components of the model. Readers interested primarily in learning
    to write schema documents will find it most
     useful first to read <a href="#bib-expo" shape="rect">[XML Schema: Primer]</a> for a
    tutorial introduction, and only then to consult the sub-sections of 
    <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> named 
    <em>XML Representation of ...</em> 
    for the details.</p><div class="div2">
<h3><span class="nav"> <a href="#concepts-data-model" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="xsover" id="xsover" shape="rect"></a>2.1 Overview of XSD</h3><p>An XSD schema is
      a set of components such as type definitions and
     element declarations. These can be used to assess the validity of
     well-formed element and attribute information items (as defined
     in <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a>), and furthermore 
     to
     specify additional information about 
     those items and their descendants. These augmentations
      to the information set make explicit information  that
      was implicitly
      present in the original
     document (or in the original document
      and the governing schema, taken together), such as normalized and/or default values for attributes
     and elements and the types of element and attribute information
     items. The input information set
      is
       also augmented with information about the validity of the
      item, or about other properties described in this
      specification. <span class="termdef"><a name="key-psvi" id="key-psvi" title="" shape="rect">[Definition:]&#160;&#160;</a>We refer to the augmented infoset which
      results from conformant processing as defined in this
      specification as the <b>post-schema-validation
       infoset</b>, or <b>PSVI</b></span>. Conforming processors <span class="rfc2119">may</span> provide
      access to some or
       all of the PSVI, as described in <a href="#var_psvi" shape="rect">Subset of the Post-schema-validation Infoset (&#167;C.1)</a>. The mechanisms by which
      processors provide such
      access to the PSVI are neither defined nor constrained by this
      specification. </p><div class="p"><div class="termdef"><a name="key-s-v-a" id="key-s-v-a" title="" shape="rect">[Definition:]&#160;&#160;</a>As it is used in this specification, the
      term <b>schema-validity assessment</b> has three aspects: <div class="constraintlist"><div class="clnumber">1<a id="c-lsv" name="c-lsv" shape="rect"> </a><span class="p">Determining local schema-validity, that is
	 whether an element or attribute information item satisfies
	 the constraints embodied in the 
	 relevant components of an
	 XSD schema
	 (specifically the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
	  element or attribute declaration and/or <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
	  type definition);</span></div>
<div class="clnumber">2 <span class="p">Determining an 
	 overall validation outcome for the item
	 by combining local schema-validity with
	 the results of schema-validity assessments of its
	 descendants, if any; and</span></div>
<div class="clnumber">3 <span class="p">Determining the appropriate
	 augmentations to the infoset (and, if desired, exposing them
	 to downstream applications in some way, to record this
	 outcome).</span></div>
</div></div></div><p>Throughout this specification, <span class="termdef"><a name="key-va" id="key-va" title="" shape="rect">[Definition:]&#160;&#160;</a> the word <b>assessment</b>
      is used to refer to the overall process of local validation,
      recursive determination of
       validation outcome, and infoset augmentation, i.e. as a short form for
       "<a href="#key-s-v-a" class="termref" shape="rect"><span class="arrow">&#183;</span>schema-validity assessment<span class="arrow">&#183;</span></a>"</span>.
    </p><div class="block"><span class="termdef"><a name="key-vn" id="key-vn" title="" shape="rect">[Definition:]&#160;&#160;</a>
      <b>Validation</b> is the process of determining
      whether an XML document, an element information item, or an
      attribute information item obeys the constraints expressed in a
      schema; in the context of XSD, this amounts to calculating the
      value of the appropriate item's <a href="#e-validity" class="propref" shape="rect">[validity]</a> property. </span>
     <div class="note"><div class="p"><b>Note:</b> As just defined, validation produces not a binary result, but a
       ternary one:  if the information item is <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>,
       it will be either valid or invalid, but if no applicable
       declaration is found, its validity will be unknown (and its
       <a href="#e-validity" class="propref" shape="rect">[validity]</a> property will have the
       value <b><i>notKnown</i></b>). Whether in a particular application
       <b><i>notKnown</i></b> should be treated in the same way as
       <b><i>invalid</i></b> or differently is outside the scope of this
       specification; sometimes one choice is appropriate,
       sometimes the other.
      </div></div>
     
     <div class="note"><div class="p"><b>Note:</b> In phrases such as "<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a>"
       and "length valid restriction", the word
       <b>valid</b> is used in its ordinary English sense
       of "conforming to some set of rules", not
       necessarily limited to rules expressed in an XSD schema. 
      </div></div>
    </div><p>In general, a <b>valid document</b>
     is a document whose contents obey the constraints expressed in a
     particular schema. Since a document may be validated against many
     different schemas, it is often clearer to speak of a document
     being valid <em>against a particular schema</em>. When this
     specification is used, document validity can be defined
     operationally in terms of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> properties on the nodes of
     the document (in particular [validity]).  Several similar but distinct kinds of validity are
     usefully distinguished, for which terms are defined below in
     <a href="#sec-schema-validity-and-docs" shape="rect">Schema-validity and documents (&#167;2.5)</a>.</p><div class="block">Because the [validity] property is part of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, it should be
     evident that any full <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of an item by definition
     entails the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of that item.  Conversely, since the
     [validity] property is recursive and
     depends upon many other pieces of information which are part of
     the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> also typically entails at least partial
     <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.  The processes denoted by the two terms thus
     overlap and are not always distinguishable; often the same
     process can be referred to by either term. In this specification,
     the term "<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>" is used when it is desired
     to stress the calculation of the complete <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, including
     properties whose values have no effect on validity.
     The term "<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>", in contrast, is used
     when it is desired to focus primarily on the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a>
     of the item, treating the other information generated in
     the process as merely incidental.
     <div class="note"><div class="p"><b>Note:</b> When there is no particular
       emphasis one way or the other, the choice of terms is
       necessarily arbitrary, or grounded in the history of 
       this and related specifications.  Historical reasons,
       rather than connotation, determine the
       use of the term "<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>" instead of
       "<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>" in terms like 
       "<a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>",
       "<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>", and
       "Validation Rules".
      </div></div>
    </div><div class="block">During <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, some or
     all of the element and attribute information items in the input
     document are associated with declarations and/or type
     definitions; these declarations and type definitions are then
     used in the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of those items, in a
     recursive process. <span class="termdef"><a name="key-governing" id="key-governing" title="" shape="rect">[Definition:]&#160;&#160;</a>The declaration associated with an information
      item, if any, and with respect to which its validity is <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> in a given assessment episode
      is said to <b>govern</b> the item, or to be its
      <b>governing</b> element or attribute declaration.
      Similarly the type definition with respect to which the
      type-validity of an item is assessed is its
      <b>governing</b> type definition.</span>
     <div class="note"><div class="p"><b>Note:</b> See also the definitions of <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> and	<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>
       (for elements) and <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> (for
       attributes).</div></div>
    </div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#xsover" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#concepts-schemaConstraints" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="concepts-data-model" id="concepts-data-model" shape="rect"></a>2.2 XSD Abstract Data Model</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.1 <a href="#Type_Definition_Summary" shape="rect">Type Definition Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.1.1 <a href="#Type_Derivation" shape="rect">Type Definition Hierarchy</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.1.2 <a href="#Simple_Type_Definition" shape="rect">Simple Type Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.1.3 <a href="#Complex_Type_Definition" shape="rect">Complex Type Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2 <a href="#Declarations_Summary" shape="rect">Declaration Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2.1 <a href="#Element_Declaration" shape="rect">Element Declaration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2.2 <a href="#Element_Equivalence_Class" shape="rect">Element Substitution Group</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2.3 <a href="#Attribute_Declaration" shape="rect">Attribute Declaration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2.4 <a href="#Notation_Declaration" shape="rect">Notation Declaration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3 <a href="#Model_Group_Summary" shape="rect">Model Group Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3.1 <a href="#Model_Group" shape="rect">Model Group</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3.2 <a href="#Particle" shape="rect">Particle</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3.3 <a href="#Attribute_Use" shape="rect">Attribute Use</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3.4 <a href="#Wildcard" shape="rect">Wildcard</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.4 <a href="#Constraint_Summary" shape="rect">Constraint Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.4.1 <a href="#Identity-constraint_Definition" shape="rect">Identity-constraint Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.4.2 <a href="#TypeAlternative" shape="rect">Type Alternative</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.4.3 <a href="#Assertion" shape="rect">Assertion</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.4.4 <a href="#sec-ccoverlap" shape="rect">Overlapping Functionality of Constraint Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.5 <a href="#Group_Definitions" shape="rect">Group Definition Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.5.1 <a href="#Model_Group_Definition" shape="rect">Model Group Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.5.2 <a href="#Attribute_Group_Definition" shape="rect">Attribute Group Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.6 <a href="#Annotation" shape="rect">Annotation Components</a><br clear="none" />
</div><p>This specification builds on <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and
     <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>.  The concepts and definitions used
     herein regarding XML are framed at the abstract level of
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem" shape="rect">information
      items</a> as defined in <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a>.  By
     definition, this use of the infoset provides <em>a
      priori</em> guarantees of <a href="http://www.w3.org/TR/xml11/#sec-well-formed" shape="rect">well-formedness</a> 
     (as defined in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>) and <a href="http://www.w3.org/TR/xml-names11/#Conformance" shape="rect">namespace
      conformance</a> (as defined in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>)
     for all candidates for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> and for all
     <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>.</p><p>Just as <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and
     <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> can be described in terms of
     information items, XSD schemas can be described in terms of
     an abstract data model.  In defining schemas in terms of
     an abstract data model, this specification rigorously specifies
     the information which <span class="rfc2119">must</span> be available to a conforming
     XSD processor.  The abstract model for schemas is
     conceptual only, and does not mandate any particular
     implementation or representation of this information.  To
     facilitate interoperation and sharing of schema information, a
     normative XML interchange format for schemas is provided.</p><p><span class="termdef"><a name="c" id="c" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Schema
       component</b> is the generic term for the building blocks
      that make up the abstract data model
      of the schema. </span> <span class="termdef"><a name="key-schema" id="key-schema" title="" shape="rect">[Definition:]&#160;&#160;</a> An <b>XSD schema</b> is a set of <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a></span>. There are
     several kinds of schema component, falling
     into three groups.  The primary schema components, which <span class="rfc2119">may</span> (type
     definitions) or <span class="rfc2119">must</span> (element and attribute declarations) have
     names, are as follows:</p><ul><li><div class="p">Simple type definitions
      </div></li><li><div class="p">Complex type definitions</div></li><li><div class="p">Attribute declarations</div></li><li><div class="p">Element declarations</div></li></ul><p>The secondary schema components, are as
     follows:</p><ul><li><div class="p">Attribute group definitions</div></li><li><div class="p">Identity-constraint definitions</div></li><li><div class="p">Type alternatives</div></li><li><div class="p">Assertions</div></li><li><div class="p">Model group definitions</div></li><li><div class="p">Notation declarations</div></li></ul><p>Finally, the "helper" schema components provide small
     parts of other schema components; they are dependent on their context:</p><ul><li><div class="p">Annotations</div></li><li><div class="p">Model groups</div></li><li><div class="p">Particles</div></li><li><div class="p">Wildcards</div></li><li><div class="p">Attribute Uses</div></li></ul><p>The 
      name <span class="termdef"><a name="xc" id="xc" title="Component" shape="rect">[Definition:]&#160;&#160;</a><b>Component</b> covers all the different kinds of
      schema component defined in this specification.</span>
     
     
    </p><p>During <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, <span class="termdef"><a name="key-declaration" id="key-declaration" title="" shape="rect">[Definition:]&#160;&#160;</a><b>declaration</b>
      components are associated by (qualified) name to information items
      being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a></span>.
    </p><p>On the other hand, <span class="termdef"><a name="key-definition" id="key-definition" title="" shape="rect">[Definition:]&#160;&#160;</a><b>definition</b> components define internal
      schema components that can be used in other schema
      components</span>.
    </p><p><span class="termdef"><a name="key-compName" id="key-compName" title="" shape="rect">[Definition:]&#160;&#160;</a>Declarations
      and definitions <span class="rfc2119">may</span> and in
       some cases <span class="rfc2119">must</span> have and be identified by
      <b>name</b>s, which are 
       NCNames as defined by <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a></span>.</p><p><span class="termdef"><a name="key-targetNS" id="key-targetNS" title="" shape="rect">[Definition:]&#160;&#160;</a>Several
      kinds of component have a <b>target namespace</b>, which
      is either <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or a
      namespace name, also as defined by <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a></span>.  The <a href="#key-targetNS" class="termref" shape="rect"><span class="arrow">&#183;</span>target namespace<span class="arrow">&#183;</span></a> serves to identify
     the namespace within which the association between the component
     and its name exists.  
     </p><p>An <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>, as defined in
     <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>, is a pair consisting
     of a namespace name, which <span class="rfc2119">may</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, and a local
     name.  The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of any component with both a
     <a href="#key-targetNS" class="termref" shape="rect"><span class="arrow">&#183;</span>target namespace<span class="arrow">&#183;</span></a> property and a 
     <a href="#key-compName" class="termref" shape="rect"><span class="arrow">&#183;</span>component name<span class="arrow">&#183;</span></a> property is the pair 
     consisting of the values of those two properties.
     The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of a declaration is used to help
     determine which information items will be 
     <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governed<span class="arrow">&#183;</span></a> by
     the declaration.
    </p><div class="note"><div class="p"><b>Note:</b> At the abstract level, there is no requirement that the
      components of a schema share a <a href="#key-targetNS" class="termref" shape="rect"><span class="arrow">&#183;</span>target namespace<span class="arrow">&#183;</span></a>.  Any schema for
      use in <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of documents
      containing names from more than one namespace will of necessity
      include components with different <a href="#key-targetNS" class="termref" shape="rect"><span class="arrow">&#183;</span>target namespaces<span class="arrow">&#183;</span></a>.  This contrasts
      with the situation at the level of the XML representation of
      components, in which each schema document contributes
      definitions and declarations to a single target namespace.</div></div><p><a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>Validation<span class="arrow">&#183;</span></a>, defined in detail
     in <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, is a relation between information
     items and schema components.  For example, an attribute
     information item is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>
     with respect to an attribute declaration, a list of element
     information items  with respect to a
     content model, and so on.  The following sections briefly
     introduce the kinds of components in the schema abstract data
     model, other major features of the abstract model, and how they
     contribute to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>.</p><div class="div3">
<h4><a name="Type_Definition_Summary" id="Type_Definition_Summary" shape="rect"></a>2.2.1 Type Definition Components</h4><p>The abstract model provides two kinds of type definition
      component: simple and complex.</p><p><span class="termdef"><a name="td" id="td" title="" shape="rect">[Definition:]&#160;&#160;</a>This specification
       uses the phrase <b>type definition</b> in cases where no
       distinction need be made between simple and complex
       types</span>.</p><p>Type definitions form a hierarchy with a single root.  The
      subsections below first describe characteristics of that
      hierarchy, then provide an introduction to simple and complex
      type definitions themselves.</p><div class="div4">
<h5><a name="Type_Derivation" id="Type_Derivation" shape="rect"></a>2.2.1.1 Type Definition Hierarchy</h5><p><a name="anchor6204" id="anchor6204" shape="rect"></a><span class="termdef"><a name="key-typeDefinitionHierarchy" id="key-typeDefinitionHierarchy" title="" shape="rect">[Definition:]&#160;&#160;</a>Except for  <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, every <a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a> is, by construction,
	either a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> or an
	<a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> of some
	other type definition. The exception
	<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> is a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of itself.
	With the exception of the loop on <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, the
         graph of these relationships forms
	a tree known as the <b>Type Definition
	Hierarchy</b> with <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> as its
	root</span>.
      </p><p><span class="termdef"><a name="key-baseTypeDefinition" id="key-baseTypeDefinition" title="" shape="rect">[Definition:]&#160;&#160;</a>The type definition used as the basis
	for an <a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> or
	<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> is
	known as the <b>base type definition</b> of that
	definition</span>.
       <span class="termdef"><a name="key-derived" id="key-derived" title="" shape="rect">[Definition:]&#160;&#160;</a>
        If a type definition <var>D</var> can reach a type definition <var>B</var> by following
        its base type definition chain, then <var>D</var> is said to be
        <b>derived</b> from <var>B</var>.</span>
       In most cases, a type definition is
        derived from other type definitions. The only exception is
        <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, which is derived from itself.
       
      </p><p><span class="termdef"><a name="key-typeRestriction" id="key-typeRestriction" title="" shape="rect">[Definition:]&#160;&#160;</a>A
	  type defined with the same constraints as its <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type definition<span class="arrow">&#183;</span></a>, or with more, is
	 said to be a <b>restriction</b>. </span> The added constraints might include narrowed
       ranges or reduced alternatives. Given two types <var>A</var> and <var>B</var>, if the definition of
	<var>A</var> is a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of the
	definition of <var>B</var>, then members of type <var>A</var> are always locally
	valid against type <var>B</var> as well.</p><p><span class="termdef"><a name="key-typeExtension" id="key-typeExtension" title="" shape="rect">[Definition:]&#160;&#160;</a>A complex
	type definition which allows element or attribute content in
	addition to that allowed by another specified type definition
	is said to be an <b>extension</b></span>.</p><div class="note"><div class="p"><b>Note:</b> Conceptually, the definitions of 
	<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> and
	<a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> overlap:  given a 
	type <var>T</var>, a vacuous  
	<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of <var>T</var> and a vacuous
	<a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> of <var>T</var> will each 
	accept the same inputs as valid.  The syntax specified
	in this version of this specification, however, requires
	that each type be defined either as a restriction 
	or as an extension, not both.  Thus even though the
	vacuous extension of <var>T</var> accepts the same inputs as
	the vacuous restriction, it will not be accepted in 
	contexts which require restrictions of <var>T</var>.
       </div></div><p><span class="termdef"><a name="key-anyType" id="key-anyType" title="" shape="rect">[Definition:]&#160;&#160;</a>A special complex type
	definition, (referred to in earlier versions of this
	 specification as 'the ur-type definition') whose
	name is <b><i>anyType</i></b> in the XSD namespace, is
	present in each <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. The <b>definition of
	 <b><i>anyType</i></b></b> serves as default
	type definition for element declarations whose XML
	representation does not specify one</span>.  
      </p><p>
       <span class="termdef"><a name="key-error" id="key-error" title="" shape="rect">[Definition:]&#160;&#160;</a>A special simple type
	definition, whose name is <b><i>error</i></b> in the XSD
	namespace, is also present in each <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. The
	<b>XSD <code>error</code> type</b>
	has no valid instances. It can be used in any place where
	other types are normally used; in particular, it can be used
	in conditional type assignment to cause elements which satisfy
	certain conditions to be invalid. </span>
      </p><p>
       For brevity, the text and examples in this specification often
       use the qualified names <code>xs:anyType</code> and
       <code>xs:error</code> for these type definitions. (In
       practice, any appropriately declared prefix can be used, as
       described in <a href="#Instance_Document_Constructions" shape="rect">Schema-Related Markup in Documents Being Validated (&#167;2.7)</a>.)
      </p></div><div class="div4">
<h5><a name="Simple_Type_Definition" id="Simple_Type_Definition" shape="rect"></a>2.2.1.2 Simple Type Definition</h5><p>A simple type definition is a set of constraints on strings
       and information about the values they encode, applicable to the
       <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of an attribute information item or of an element
       information item with no element children. Informally, it
       applies to the values of attributes and the text-only content
       of elements.
      </p><p>Each simple type definition, whether built-in (that is,
       defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>) or user-defined, is a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of its <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type definition<span class="arrow">&#183;</span></a>.
        <span class="termdef"><a name="key-anySimpleType" id="key-anySimpleType" title="" shape="rect">[Definition:]&#160;&#160;</a>A
	 special <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of 
	 <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, whose name is 
	 <b><b><i>anySimpleType</i></b></b> in the
	 XSD namespace, is the root of the <a href="#key-typeDefinitionHierarchy" class="termref" shape="rect"><span class="arrow">&#183;</span>Type  Definition Hierarchy<span class="arrow">&#183;</span></a> for all simple type
	 definitions. <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> has a lexical space containing 
	 all sequences of characters in the Universal Character 
	 Set (UCS) and a value space containing all 
	 <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-atomic" shape="rect">atomic values</a>
	 and all finite-length lists of 
	 <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-atomic" shape="rect">atomic values</a>.</span> 
	As with <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, this
	specification sometimes uses the qualified name
	<code>xs:anySimpleType</code> to designate this type
	definition. The
	built-in list datatypes all have <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> as their
	<a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type
	 definition<span class="arrow">&#183;</span></a>.</p><p><span class="termdef"><a name="key-anyAtomicType" id="key-anyAtomicType" title="" shape="rect">[Definition:]&#160;&#160;</a>There is a further special datatype
	called <b><b><i>anyAtomicType</i></b></b>, a
	<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of
	<a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, which is the <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type definition<span class="arrow">&#183;</span></a>
	of all the primitive 
	datatypes.</span> This type definition is often referred
	to simply as "<code>xs:anyAtomicType</code>". 
       It too is
       considered to have an unconstrained lexical space.  Its value
       space consists of the union of the value spaces of all the
        primitive datatypes.</p><p><span class="termdef"><a name="key-constructed" id="key-constructed" title="" shape="rect">[Definition:]&#160;&#160;</a>
       Datatypes can be <b>constructed</b> from other datatypes by
       <b><i>restricting</i></b> the value space or lexical space of a
       <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> using zero or more
       <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f" class="compref" shape="rect">Constraining Facet</a>s, by specifying the new datatype as a <b><i>list</i></b>
       of items of some <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>,
       or by defining it as a <b><i>union</i></b> of some specified sequence of
       <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>.</span></p><p>The mapping from lexical space to value space is unspecified
       for items whose type definition is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> or <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a>. Accordingly
       this specification does not constrain processors'
       behavior in areas
       where this mapping is implicated, for example checking such
       items against enumerations, constructing default attributes or
       elements whose declared type definition is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>
       or <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a>,
       checking identity constraints involving such items.</p><div class="note"><div class="p"><b>Note:</b> The Working Group expects to return to this area in a future
	version of this specification.</div></div><p><a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>
	provides mechanisms for defining new simple type definitions
	by <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restricting<span class="arrow">&#183;</span></a>
	some primitive 
	 or ordinary datatype.  It also
	provides mechanisms for constructing new simple type
	definitions whose members are lists of items
       themselves constrained by some other simple type definition, or
       whose membership is the union of the memberships of some other
       simple type definitions.  Such list and union simple type
       definitions are also <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restrictions<span class="arrow">&#183;</span></a> of
       <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</p><p>For detailed information on simple type definitions, see
       <a href="#Simple_Type_Definitions" shape="rect">Simple Type Definitions (&#167;3.16)</a> and <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.  The
       latter also defines an extensive inventory of pre-defined
       simple types.</p></div><div class="div4">
<h5><a name="Complex_Type_Definition" id="Complex_Type_Definition" shape="rect"></a>2.2.1.3 Complex Type Definition</h5><p>A complex type definition is a set of attribute declarations
       and a content type, applicable to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and
       <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of an element information item respectively.  The
       content type <span class="rfc2119">may</span> require the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> to contain
       neither element nor character information items (that is, to be
       empty), or to be a
       string which belongs to a particular simple type, or to contain a sequence of
       element information items which conforms to a particular model
       group, with or without character information items as well.</p><div class="block">Each complex type definition other than <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> is
       either
      <ul><li><div class="p">a restriction of a complex <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type
	   definition<span class="arrow">&#183;</span></a></div></li></ul> or
       <ul><li><div class="p">an <a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> of
	  a simple or complex <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type
	   definition<span class="arrow">&#183;</span></a>.</div></li></ul>
      
      
      </div><div class="block"> A complex type which extends another does so by having
       additional content model particles at the end of the other
       definition's content model, or by having additional attribute
       declarations, or both.
       <div class="note"><div class="p"><b>Note:</b> For the most part, this
	 specification allows only appending, and not other kinds of
	 extensions. This decision simplifies application processing
	 required to cast instances from
	 
	 the derived type to the base type.
	 
	  One special case allows the
	  extension of <code>all</code>-groups in ways that do not
	  guarantee that the new material occurs only at the end of
	  the content. Another
	  special case is extension via <a href="#oc" class="compref" shape="rect">Open Content</a>s in <b><i>interleave</i></b>
	  mode. </div></div></div><p>
       For detailed information on complex type definitions, see <a href="#Complex_Type_Definitions" shape="rect">Complex Type Definitions (&#167;3.4)</a>.</p></div></div><div class="div3">
<h4><a name="Declarations_Summary" id="Declarations_Summary" shape="rect"></a>2.2.2 Declaration Components</h4><p>There are three kinds of declaration component: element, attribute,
      and notation.  Each is described in a section below. Also
      included is a discussion of element substitution groups, which
      is a feature provided in conjunction with element
      declarations.</p><div class="div4">
<h5><a name="Element_Declaration" id="Element_Declaration" shape="rect"></a>2.2.2.1 Element Declaration</h5><p>An element declaration is an association of a name with a
       type definition, either simple or complex, an (optional)
       default value and a (possibly empty) set of identity-constraint
       definitions.  The association is either global or scoped to a
       containing complex type definition.  A top-level element
       declaration with name 'A' is broadly comparable to a pair of
       DTD declarations as follows, where the associated type
       definition fills in the ellipses:</p><pre xml:space="preserve">&lt;!ELEMENT A . . .&gt;
&lt;!ATTLIST A . . .&gt;
</pre><p>Element declarations contribute to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as part of model group
       <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, when their defaults
       and type components are checked against an element information
       item with a matching name and namespace, and by triggering
       identity-constraint definition <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>.</p><p>
       For detailed information on element declarations, see <a href="#cElement_Declarations" shape="rect">Element Declarations (&#167;3.3)</a>.
	For an overview of identity constraints, see
	<a href="#Identity-constraint_Definition" shape="rect">Identity-constraint Definition (&#167;2.2.4.1)</a>.
	
      </p></div><div class="div4">
<h5><a name="Element_Equivalence_Class" id="Element_Equivalence_Class" shape="rect"></a>2.2.2.2 Element Substitution Group</h5><div class="block">When XML vocabularies are defined using
       the 
       DTD syntax defined by <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>, 
       a reference in a content model to a particular name is satisfied
       only by an element in the XML document whose 
       name and content correspond exactly to those given in the
       corresponding <a href="http://www.w3.org/TR/xml11/#elemdecls" shape="rect">element type
	declaration</a>.<div class="note"><div class="p"><b>Note:</b> The "element type declaration" 
	 of <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>
	 is not quite the same as the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> as defined
	 in this specification:  <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> does not
	 distinguish between element declarations and 
	 type definitions as
	 distinct kinds of object in the way that this specification
	 does. The "element type declaration" of 
	 <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> specifies both the kinds of properties
	 associated in this specification with element declarations
	 and the kinds of properties associated here with
	 (complex) type definitions.
	</div></div>
      </div><p><span class="termdef"><a name="key-equivalenceClass" id="key-equivalenceClass" title="" shape="rect">[Definition:]&#160;&#160;</a>Through the  
	mechanism of <b>element substitution
	groups</b>, XSD provides a more powerful model
 than DTDs do
	supporting substitution of one named element for
	another</span>. Any top-level element declaration can serve
       as the defining member, or head, for an element <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a>.
       Other top-level element declarations, regardless of target
       namespace, can be designated as members of the <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a>
       headed by this element.  In a suitably enabled content model, a
       reference to the head <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a>
       not just the head itself, but elements corresponding to any
       other member of the <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a> as well.
      </p><p>All such members <span class="rfc2119">must</span> have type definitions which are
       either the same as the head's type definition or derived
       from it. Therefore, although the names of elements
       can vary widely as new namespaces and members of the
       <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a> are defined, the content of member elements is
       constrained by the type 
       definition of the
       <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a> head.</p><p>Note that element substitution groups are not represented as
       separate components.  They are specified in the property values
       for element declarations (see
       <a href="#cElement_Declarations" shape="rect">Element Declarations (&#167;3.3)</a>).</p></div><div class="div4">
<h5><a name="Attribute_Declaration" id="Attribute_Declaration" shape="rect"></a>2.2.2.3 Attribute Declaration</h5><p>An attribute declaration is an association between a name and
       a simple type definition, together with occurrence information
       and (optionally) a default value. The association is either
       global, or local to its containing complex type definition.
       Attribute declarations contribute to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as part of complex type
       definition <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, when
       their occurrence, defaults and type components are checked
       against an attribute information item with a matching name and
       namespace.</p><p>
       For detailed information on attribute declarations, see
       <a href="#cAttribute_Declarations" shape="rect">Attribute Declarations (&#167;3.2)</a>.</p></div><div class="div4">
<h5><a name="Notation_Declaration" id="Notation_Declaration" shape="rect"></a>2.2.2.4 Notation Declaration</h5><p>A notation declaration is an association between a name and
       an identifier for a notation.  For an attribute or element information item to
       be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a
       <code>NOTATION</code> simple type definition, its value <span class="rfc2119">must</span>
       have been declared with a notation declaration.</p><p>
       For detailed information on notation declarations, see <a href="#cNotation_Declarations" shape="rect">Notation Declarations (&#167;3.14)</a>.</p></div></div><div class="div3">
<h4><a name="Model_Group_Summary" id="Model_Group_Summary" shape="rect"></a>2.2.3 Model Group Components</h4><p>The model group, particle, and wildcard components
      contribute to the portion of a complex type definition that
      controls an element information item's content.</p><div class="div4">
<h5><a name="Model_Group" id="Model_Group" shape="rect"></a>2.2.3.1 Model Group</h5><p>A model group is a constraint in the form of a grammar
       fragment that applies to lists of element information items. It
       consists of a list of particles, i.e. element declarations,
       wildcards and model groups.  There are three varieties of model
       group:</p><ul><li><div class="p">Sequence (the element information items match the
	 particles in sequential order);</div></li><li><div class="p">Conjunction (the element information items match the
	 particles, in any order);</div></li><li><div class="p">Disjunction (the element information items match
         one or more
	 of the particles).</div></li></ul><p>Each model group denotes a set of
       sequences of element information items.  Regarding that set of
       sequences as a language, the set of sequences recognized by a
       group <var>G</var> may be written <var>L</var>(<var>G</var>). <span class="termdef"><a name="key-accept-g" id="key-accept-g" title="" shape="rect">[Definition:]&#160;&#160;</a>A model group <var>G</var> is said to <b>accept</b>
	or <b>recognize</b> the members of <var>L</var>(<var>G</var>).</span>
      </p><p>
       For detailed information on model groups, see <a href="#Model_Groups" shape="rect">Model Groups (&#167;3.8)</a>.</p></div><div class="div4">
<h5><a name="Particle" id="Particle" shape="rect"></a>2.2.3.2 Particle</h5><p>A particle is a term in the grammar for element content,
       consisting of either an element declaration, a wildcard or a
       model group, together with occurrence constraints.
       Particles contribute to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as part of complex type
       definition <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, when
       they allow anywhere from zero to many element information items
       or sequences thereof, depending on their contents and
       occurrence constraints.</p><p>The name <span class="termdef"><a name="t" id="t" title="Term" shape="rect">[Definition:]&#160;&#160;</a><b>Term</b> is used to refer to any of the three kinds of
	components which can appear in particles.</span>  All
       <a href="#t" class="termref" shape="rect"><span class="arrow">&#183;</span>Terms<span class="arrow">&#183;</span></a> are themselves <a href="#ac" class="termref" shape="rect"><span class="arrow">&#183;</span>Annotated Components<span class="arrow">&#183;</span></a>. <span class="termdef"><a name="key-basic-term" id="key-basic-term" title="" shape="rect">[Definition:]&#160;&#160;</a>A
	 <b>basic term</b> is an <a href="#ed" class="compref" shape="rect">Element Declaration</a> or a
	 <a href="#w" class="compref" shape="rect">Wildcard</a>.</span> <span class="termdef"><a name="key-basic-particle" id="key-basic-particle" title="" shape="rect">[Definition:]&#160;&#160;</a>A <b>basic
	  particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a <a href="#key-basic-term" class="termref" shape="rect"><span class="arrow">&#183;</span>basic term<span class="arrow">&#183;</span></a>.</span></p><div class="block"><span class="termdef"><a name="key-contentModel" id="key-contentModel" title="" shape="rect">[Definition:]&#160;&#160;</a>A
	particle can be used in a complex type definition to
	constrain the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of
	the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of an element information item; such a
	particle is called a <b>content model</b></span>.
       <div class="note"><div class="p"><b>Note:</b> XSD <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content models<span class="arrow">&#183;</span></a> are similar
	 to but more expressive than
	 <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> content models; unlike 
	 <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>, XSD does not restrict the form of <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content models<span class="arrow">&#183;</span></a> describing
	  mixed content. </div></div></div><p>Each content model, indeed each 
       particle and each term,
       denotes a set of sequences of element information items.  Regarding
       that set of sequences as a language, the set of sequences recognized
       by a particle <var>P</var> may be written <var>L</var>(<var>P</var>).
       <span class="termdef"><a name="key-accept" id="key-accept" title="" shape="rect">[Definition:]&#160;&#160;</a>A particle <var>P</var> is said to
	<b>accept</b> or <b>recognize</b> the members of
	<var>L</var>(<var>P</var>).  Similarly, a term <var>T</var>
	 <b>accepts</b> or <b>recognizes</b> the members
       of <var>L</var>(<var>T</var>).</span>
      </p><div class="note"><div class="p"><b>Note:</b> The language accepted by a content model plays a role in determining
	whether an element information item is locally valid or not: if the
	appropriate content model does not accept the sequence of elements
	among its children, then the element information item is not locally
	valid.  (Some additional constraints must 
	 also be met: not every
	 sequence in <var>L</var>(<var>P</var>) is locally valid against <var>P</var>.  See
	 <a href="#group-validation" shape="rect">Principles of Validation against Groups (&#167;3.8.4.2)</a>.)</div><div class="p">

	No assumption is made, in the definition above,
	that the items in the sequence are themselves valid; only the
	<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> of the items in the sequence are relevant in
	determining whether the sequence is accepted by a particle.
	Their validity does affect whether their parent is (recursively)
	valid as well as locally valid.</div></div><p>If a sequence <var>S</var> is a member of <var>L</var>(<var>P</var>), 
       then it is necessarily possible to trace a path through the 
       <a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particles<span class="arrow">&#183;</span></a>
       within <var>P</var>, with each item within <var>S</var> corresponding to a matching particle
       within <var>P</var>. The sequence of particles within <var>P</var> corresponding to <var>S</var>
       is called the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var>.</p><div class="note"><div class="p"><b>Note:</b> This <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> has nothing to do with
	 XPath expressions.
	When there may otherwise be danger of confusion, the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a>
	described here may be referred to as the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>match path<span class="arrow">&#183;</span></a> of <var>S</var>
	in <var>P</var>.
       </div></div><p>For detailed information on particles, see <a href="#cParticles" shape="rect">Particles (&#167;3.9)</a>.</p></div><div class="div4">
<h5><a name="Attribute_Use" id="Attribute_Use" shape="rect"></a>2.2.3.3 Attribute Use</h5><p>An attribute use plays a role similar to that of a
       particle, but for attribute declarations:  an attribute
       declaration 
       used by a complex type definition is embedded within
       an attribute use, which specifies whether the declaration
       requires or merely allows its attribute, and whether it has a
       default or fixed value.</p></div><div class="div4">
<h5><a name="Wildcard" id="Wildcard" shape="rect"></a>2.2.3.4 Wildcard</h5><p>A wildcard is a special kind of particle which matches element
       and attribute information items dependent on their namespace
       names and optionally on their local names.</p><p>
       For detailed information on wildcards, see <a href="#Wildcards" shape="rect">Wildcards (&#167;3.10)</a>.</p></div></div><div class="div3">
<h4><a name="Constraint_Summary" id="Constraint_Summary" shape="rect"></a>2.2.4 Constraint Components</h4><p>This section describes constructs which
      use <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> expressions to constrain the
      input document; using them, certain rules can be expressed
      conveniently which would be inconvenient or impossible to
      express otherwise. Identity-constraint definitions are associated with
      element declarations; assertions are associated with type
      definitions; conditional type assignment using type alternatives
      allows the type of an element instance to be chosen based on
      properties of the element instance (in particular, based on the
      values of its attributes).
     </p><div class="div4">
<h5><a name="Identity-constraint_Definition" id="Identity-constraint_Definition" shape="rect"></a>2.2.4.1 Identity-constraint Definition</h5><p>An identity-constraint definition is an association between a name
       and one of several varieties of identity-constraint related to
       uniqueness and reference.  All the varieties use <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> expressions to pick out sets of information
       items relative to particular target element information items
       which are unique, or a key, or a <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> reference, within a specified
       scope. An element information item is only <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to an element
       declaration with identity-constraint definitions if those definitions
       are all satisfied for all the descendants of that element
       information item which they pick out.</p><p>For detailed information on identity-constraint definitions, see
       <a href="#cIdentity-constraint_Definitions" shape="rect">Identity-constraint Definitions (&#167;3.11)</a>.</p><div class="note"><div class="p"><b>Note:</b> 
	In version 1.0 of this specification, identity constraints used
	<a href="#bib-xpath1" shape="rect">[XPath 1.0]</a>; they now use <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>. </div></div></div><div class="div4">
<h5><a name="TypeAlternative" id="TypeAlternative" shape="rect"></a>2.2.4.2 Type Alternative</h5><p>A 
       <a href="#tac" class="compref" shape="rect">Type Alternative</a> component
	(type alternative for short)
       associates a type definition with a predicate.
       
       Type alternatives are used in conditional
	type assignment, in which the choice of <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>
	for elements governed by a particular element declaration
	depends on properties of the document instance.  An element
	declaration may have a <a href="#ed-type_table" class="propref" shape="rect">{type table}</a> which contains a 
	sequence of type alternatives; the predicates on the alternatives
	are tested, and when a predicate is satisfied, the type
	definition paired with it is chosen as the element instance's
	<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>.
      </p><div class="note"><div class="p"><b>Note:</b> The provisions for conditional type assignment are inspired by,
	but not identical to, those of <a href="#bib-schemapath" shape="rect">[SchemaPath]</a>.</div></div><p>For detailed information on Type Alternatives, see
       <a href="#cTypeAlternative" shape="rect">Type Alternatives (&#167;3.12)</a>.</p></div><div class="div4">
<h5><a name="Assertion" id="Assertion" shape="rect"></a>2.2.4.3 Assertion</h5><p>An assertion is a predicate associated with a type, which is
       checked for each instance of the type.   If an element or attribute information item
       fails to satisfy an assertion associated with a given type,
       then that information item is not locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
       with respect to that type.</p><p>For detailed information on Assertions, see <a href="#cAssertions" shape="rect">Assertions (&#167;3.13)</a>.</p></div><div class="div4">
<h5><a name="sec-ccoverlap" id="sec-ccoverlap" shape="rect"></a>2.2.4.4 Overlapping Functionality of Constraint Components</h5><p>Many rules that can be enforced by identity constraints
       and conditional type assignment can also be formulated
       in terms of assertions.  That is, the various constructs have
       overlapping functionality.
       The three forms of constraint differ from each other in various
       ways which may affect the schema author's choice of formulation.
      </p><p>Most obviously, the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> will differ somewhat, depending
       on which form of constraint is chosen.       
      </p><p>
       Less obviously, identity constraints are associated with 
       element declarations, while assertions are associated with
       type definitions.  If it is desired to enforce a particular
       property of uniqueness or referential integrity associated
       with a particular element declaration <var>E</var>, of type <var>T</var>,
       the schema author may often choose either an identity constraint
       associated with <var>E</var>, or an assertion associated with <var>T</var>.
       One obvious difference is that
       elements substitutable for <var>E</var> 
       are required to have types derived from <var>T</var>, but
       are not required to enforce the identity constraints (or
       the nillability) of <var>E</var>.  If the constraint applicable to <var>E</var>
       should be enforced by elements substitutable for <var>E</var>, it
       is often most convenient to formulate the constraint as
       an assertion on <var>T</var>; conversely, if only some elements of
       type <var>T</var> are intended to be subject to the constraint, or if
       elements substitutable for <var>E</var> need not enforce the constraint, then it
       will be more convenient to formulate the rule as an
       identity constraint on <var>E</var>.       
      </p><p>Similar considerations sometimes apply to the choice between
       assertions and conditional type assignment.</p><p>
       Because identity constraints and conditional type assignment are
       simpler and less variable than assertions, it may be easier
       for software to exploit or optimize them.  Assertions have
       greater expressive power, which means they are often 
       convenient.  The "rule of least power" applies here;
       it is often preferable to use a less expressive notation in 
       preference to a more expressive one, when either will suffice.
       See <a href="#ref-rolp" shape="rect">[Rule of Least Power]</a>.
      </p></div></div><div class="div3">
<h4><a name="Group_Definitions" id="Group_Definitions" shape="rect"></a>2.2.5 Group Definition Components</h4><p>There are two kinds of convenience definitions provided to
      enable the re-use of pieces of complex type definitions: model
      group definitions and attribute group definitions.</p><div class="div4">
<h5><a name="Model_Group_Definition" id="Model_Group_Definition" shape="rect"></a>2.2.5.1 Model Group Definition</h5><p>A model group definition is an association between a name and
       a model group, enabling re-use of the same model group in
       several complex type definitions.</p><p>
       For detailed information on model group definitions, see
       <a href="#cModel_Group_Definitions" shape="rect">Model Group Definitions (&#167;3.7)</a>.</p></div><div class="div4">
<h5><a name="Attribute_Group_Definition" id="Attribute_Group_Definition" shape="rect"></a>2.2.5.2 Attribute Group Definition</h5><p>An attribute group definition is an association between a
       name and a set of attribute declarations, enabling re-use of
       the same set in several complex type definitions.</p><p>
       For detailed information on attribute group definitions, see
       <a href="#cAttribute_Group_Definitions" shape="rect">Attribute Group Definitions (&#167;3.6)</a>.</p></div></div><div class="div3">
<h4><a name="Annotation" id="Annotation" shape="rect"></a>2.2.6 Annotation Components</h4><p>An annotation is information for human and/or mechanical
      consumers. The interpretation of such information is not defined
      in this specification.</p><p>For detailed information on annotations, see <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a>.</p></div></div><div class="div2">
<h3><span class="nav"><a href="#concepts-data-model" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#concepts-conformance" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="concepts-schemaConstraints" id="concepts-schemaConstraints" shape="rect"></a>2.3 Constraints and Validation Rules</h3><p>The <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> specification describes two kinds
     of constraints on XML documents: <em>well-formedness</em> and
     <em>validity</em> constraints. Informally, the
     well-formedness constraints are those imposed by the definition
     of XML itself (such as the rules for the use of the &lt; and &gt;
     characters and the rules for proper nesting of elements), while
     validity constraints are the further constraints on document
     structure provided by a particular DTD. </p><p>The preceding section focused on <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, that is the constraints on
     information items which schema components supply.  In fact
     however this specification provides four different kinds of
     normative statements about schema components, their
     representations in XML and their contribution to the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of information items:</p><div class="glist"><div class="gitem"><div class="giLabel">Schema Component Constraint</div><div class="giDef"><div class="p"><span class="termdef"><a name="gloss-cos" id="gloss-cos" title="" shape="rect">[Definition:]&#160;&#160;</a>Constraints on the schema components themselves,
	 i.e. conditions components <span class="rfc2119">must</span> satisfy to be components at
	 all. They are located
  
  in the sixth sub-section of the per-component
	 sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in
	 <a href="#outcome-cos" shape="rect">Schema Component Constraints (&#167;B.4)</a></span>.</div></div></div><div class="gitem"><div class="giLabel">Schema Representation Constraint</div><div class="giDef"><div class="p"><span class="termdef"><a name="gloss-src" id="gloss-src" title="" shape="rect">[Definition:]&#160;&#160;</a>Constraints on the representation of schema
	 components in XML beyond those which are expressed in
	 <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.
  They are located
   in the
	 third sub-section of the per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in <a href="#outcome-src" shape="rect">Schema Representation Constraints (&#167;B.3)</a></span>.</div></div></div><div class="gitem"><div class="giLabel">Validation Rules</div><div class="giDef"><div class="p"><span class="termdef"><a name="gloss-cvc" id="gloss-cvc" title="" shape="rect">[Definition:]&#160;&#160;</a>Contributions to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> associated with schema
	 components. They are located
  
  in the fourth sub-section of the
	 per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and
	 tabulated in <a href="#validation_failures" shape="rect">Validation Rules (&#167;B.1)</a></span>.</div></div></div><div class="gitem"><div class="giLabel">Schema Information Set Contribution</div><div class="giDef"><div class="p"><span class="termdef"><a name="gloss-sic" id="gloss-sic" title="" shape="rect">[Definition:]&#160;&#160;</a>Augmentations to <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>s expressed by schema
	 components, which follow as a consequence of 
	  <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.
	 They are located
   in the fifth
	 sub-section of the per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in <a href="#PSVI_contributions" shape="rect">Contributions to the post-schema-validation infoset (&#167;B.2)</a></span>.</div></div></div></div><p>The last of these, schema information set contributions, are
     not as new as they might at first seem.  XML validation augments the XML information set in similar
     ways, for example by providing values for attributes not present
     in instances, and by implicitly exploiting type information for
     normalization or access. (As an example of the latter case,
     consider the effect of <code>NMTOKENS</code> on attribute white
     space, and the semantics of <code>ID</code> and
     <code>IDREF</code>.) By including schema information set
     contributions, this specification makes explicit some features
     that XML leaves implicit.</p></div><div class="div2">
<h3><span class="nav"><a href="#concepts-schemaConstraints" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#sec-schema-validity-and-docs" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="concepts-conformance" id="concepts-conformance" shape="rect"></a>2.4 Conformance</h3><div class="note"><div class="p"><b>Note:</b> </div></div><p>Within the context of this
     specification, conformance can be claimed for schema
     documents, for schemas, 
     and for  
     processors.
    </p><div class="block">A <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>
     conforms to this specification if and only if 
     <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="sd-valid" name="sd-valid" shape="rect"> </a><span class="p">It is valid with respect to the
	 top-level element declaration for <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> in
	the schema specified
	in <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.  
	That is,
	when <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> using
	 <a href="#c-res" class="termref" shape="rect"><span class="arrow">&#183;</span>element-driven validation<span class="arrow">&#183;</span></a>
	 and stipulating the declaration for <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, then
	in its <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
	has a <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a>
	property with value <b><i>full</i></b> or <b><i>partial</i></b> and a
	<a href="#e-validity" class="propref" shape="rect">[validity]</a> property
	with value <b><i>valid</i></b>.</span></div>
<div class="clnumber">2<a id="sd-supervalid" name="sd-supervalid" shape="rect"> </a><span class="p">No element in the schema document violates any of the
	Schema Representation Constraints set out in 
	<a href="#outcome-src" shape="rect">Schema Representation Constraints (&#167;B.3)</a>,
	unless that element has an <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a>
	element as an ancestor.</span><div class="note"><div class="p"><b>Note:</b> Because elements within <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> do
	  not map to components, they are not required to
	  obey the Schema Representation Constraints.</div></div></div>
</div>
    </div><p>If the schema document is invalid only
    in consequence of invalid descendants of <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> elements, processors <span class="rfc2119">may</span> treat the schema
    document as valid.  It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> what effect, if any,
    invalid <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> elements have on the
    construction of schema components.
    </p><div class="note"><div class="p"><b>Note:</b> While conformance of schema documents is (with the exception just noted) a
     precondition for the mapping from schema documents to schema
     components described in this specification, conformance of the
     schema documents does not guarantee that the result of that
     mapping will be a schema that conforms to this specification.
     Some constraints (e.g. the rule that there must be at most one
     top-level element declaration with a particular <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>)
     can only be checked in the context of the schema as a whole.
     Because component correctness
     depends in part upon the other components present, the XML
     mapping rules defined in this specification do not always map
     conforming schema documents into components that satisfy all
     constraints.  In some cases, the mapping will produce components
     which violate constraints imposed at the component level; in
     others, no component at all will be produced.
     </div></div><div class="note"><div class="p"><b>Note:</b> 
     
      In this version of this specification, Schema Representation
      Constraints concern only properties of the schema document which
      can be checked in isolation. In version 1.0 of this
      specification, some Schema Representation Constraints could not
      be checked against the schema document in isolation, and so it
      was not always possible to say, for a given schema document,
      whether it satisfied the constraints or not.
     </div></div><p>A schema conforms to this specification
     if and only if it consists of components which individually and
     collectively satisfy all the relevant constraints specified in
     this document, including but not limited to all the <a href="#gloss-cos" class="termref" shape="rect"><span class="arrow">&#183;</span>Schema Component Constraints<span class="arrow">&#183;</span></a>.
    </p><div class="note"><div class="p"><b>Note:</b> This specification defines no API or other interface
      for interacting with schemas, so a conformance claim for
      a schema is not normally testable in any standardized way.
      However, if an interface is provided which enables a user
      to interrogate various properties of the schema and check
      their values, conformance can usefully be claimed for the
      schema.</div></div><p>This specification distinguishes several
     classes of conforming processors, which are defined in terms
     of the following concepts.
    </p><p>
     <span class="termdef"><a name="key-validator" id="key-validator" title="" shape="rect">[Definition:]&#160;&#160;</a>A
      <b>validator</b> (or <b>instance validator</b>) is a
      processor which <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> an XML instance document against a
      conforming schema and distinguishes between valid documents
      and others, for one or more of the definitions of validity
      (<a href="#key-root-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>root-validity<span class="arrow">&#183;</span></a>,
      <a href="#key-deep-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>deep validity<span class="arrow">&#183;</span></a>,
      or
      <a href="#key-uniformly-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>uniform validity<span class="arrow">&#183;</span></a>)
      defined below in section
      <a href="#sec-schema-validity-and-docs" shape="rect">Schema-validity and documents (&#167;2.5)</a>.
      Conforming validators <span class="rfc2119">may</span> additionally support other
      definitions of validity defined in terms of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
     </span>
    </p><p>
     <span class="termdef"><a name="key-assessor" id="key-assessor" title="" shape="rect">[Definition:]&#160;&#160;</a>A <b>schema-validity
       assessor</b> (or just <b>assessor</b>)
      is a processor which performs full or partial
      <a href="#key-s-v-a" class="termref" shape="rect"><span class="arrow">&#183;</span>schema-validity assessment<span class="arrow">&#183;</span></a> of an XML instance document,
      element information item, or attribute information item,
      with
      reference to a conforming schema, and provides access to the
      entirety of the resulting <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
      The means by which an <a href="#key-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>assessor<span class="arrow">&#183;</span></a> provides
      access to the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>. </span>
    </p><p><span class="termdef"><a name="key-general-purpose" id="key-general-purpose" title="" shape="rect">[Definition:]&#160;&#160;</a>A <b>general-purpose</b> processor
      is a <a href="#key-validator" class="termref" shape="rect"><span class="arrow">&#183;</span>validator<span class="arrow">&#183;</span></a> or <a href="#key-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>assessor<span class="arrow">&#183;</span></a> which accepts schemas represented in the
      form of XML documents as described in <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition (&#167;4.2)</a>.
      </span>
    </p><div class="note"><div class="p"><b>Note:</b> The <a href="#gloss-src" class="termref" shape="rect"><span class="arrow">&#183;</span>Schema Representation
      Constraints<span class="arrow">&#183;</span></a> are to be enforced after, not 
      before, the 
      <a href="#key-vc-preprocessing" class="termref" shape="rect"><span class="arrow">&#183;</span>conditional-inclusion pre-processing<span class="arrow">&#183;</span></a>
      described in <a href="#cip" shape="rect">Conditional inclusion (&#167;4.2.2)</a> and the 
      <a href="#key-chameleon-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>chameleon pre-processing<span class="arrow">&#183;</span></a>
      described in <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
      multiple schema definition documents
       (<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>.
     </div></div><p><span class="termdef"><a name="key-special-purpose" id="key-special-purpose" title="" shape="rect">[Definition:]&#160;&#160;</a>A
       schema processor which is not a <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a>
       processor is a <b>special-purpose</b>
       processor.</span></p><div class="note"><div class="p"><b>Note:</b> By separating the conformance requirements relating to the
      concrete syntax of <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, this specification
      admits processors which use schemas stored in optimized binary
      representations, dynamically created schemas represented as
      programming language data structures, or implementations in
      which particular schemas are compiled into executable code such
      as C or Java.  Such processors can be said 
      to conform to this 
       specification as <a href="#key-special-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>special-purpose<span class="arrow">&#183;</span></a> 
       but not as <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a> 
       processors.</div></div><p><span class="termdef"><a name="key-fullyConforming" id="key-fullyConforming" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Web-aware</b> processors are
      network-enabled processors which are not only 
      <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a> but
      which additionally <span class="rfc2119">must</span> be capable of accessing schema
      documents from the World Wide Web as described in <a href="#web-representation" shape="rect">Representation of Schemas on the World Wide Web (&#167;2.8)</a> and <a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a>.
     </span>.
    </p><div class="note"><div class="p"><b>Note:</b> In version 1.0 of this specification the class of <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a> processors 
      was termed 
      "conformant
       to the XML Representation of Schemas". Similarly, the
      class of <a href="#key-fullyConforming" class="termref" shape="rect"><span class="arrow">&#183;</span>Web-aware<span class="arrow">&#183;</span></a> processors was
      called "fully conforming".</div></div><p>Several important classes of processor
     can be defined in terms of the concepts just given:</p><div class="glist"><div class="gitem"><div class="giLabel"><a name="key-gpval" id="key-gpval" shape="rect"></a>general-purpose validators</div><div class="giDef"><div class="p"><a href="#key-validator" class="termref" shape="rect"><span class="arrow">&#183;</span>Validators<span class="arrow">&#183;</span></a>
	which accept arbitrary schemas expressed
	in the form of sets of schema documents (i.e.,
	are <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a>); some
	general-purpose validators may additionally be
	<a href="#key-fullyConforming" class="termref" shape="rect"><span class="arrow">&#183;</span>Web-aware<span class="arrow">&#183;</span></a>.</div></div></div><div class="gitem"><div class="giLabel"><a name="key-gp-assessor" id="key-gp-assessor" shape="rect"></a>general-purpose schema-validity assessors</div><div class="giDef"><div class="p"><a href="#key-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>Assessors<span class="arrow">&#183;</span></a>
	which accept arbitrary schemas expressed
	in the form of sets of schema documents (i.e.,
	are <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a>); some
	general-purpose assessors may additionally be
	<a href="#key-fullyConforming" class="termref" shape="rect"><span class="arrow">&#183;</span>Web-aware<span class="arrow">&#183;</span></a>.</div></div></div><div class="gitem"><div class="giLabel"><a name="key-spval" id="key-spval" shape="rect"></a>special-purpose validators</div><div class="giDef"><div class="p"><a href="#key-validator" class="termref" shape="rect"><span class="arrow">&#183;</span>Validators<span class="arrow">&#183;</span></a>
	which do not accept arbitrary schemas expressed
	in the form of sets of schema documents</div><div class="note"><div class="p"><b>Note:</b> Typically a special-purpose validator will either have a
	 built-in (hard-coded) schema, or else will accept arbitrary
	 schemas in some form other than schema documents.
	</div></div></div></div><div class="gitem"><div class="giLabel"><a name="key-othertools" id="key-othertools" shape="rect"></a>other special-purpose tools</div><div class="giDef"><div class="p">Processors (other than those otherwise defined) which
	perform some task, service, or activity which depends at
	least in part on the contents of some schema, and which
	do so in ways which are consistent with the provisions of
	this specification.</div><div class="note"><div class="p"><b>Note:</b> The class of <a href="#key-othertools" class="termref" shape="rect"><span class="arrow">&#183;</span>other
	  special-purpose tools<span class="arrow">&#183;</span></a> is not,
	 as defined here, a particularly informative description
	 of a piece of software.  It is expected that other
	 specifications may wish to define processes depending
	 in part upon schemas, and to require that implementations
	 of those processes conform to this specification;
	 this conformance class provides a reference point for
	 such requirements, and for such claims of conformance.
	</div></div></div></div></div><div class="note"><div class="p"><b>Note:</b> Although this specification provides just these  standard levels of
      conformance, it is anticipated that other conventions can be
      established in the future.  There is no
      need to modify or republish this specification to define such
      additional levels of conformance.
     </div></div><p>See <a href="#impl-def-list" shape="rect">Checklist of implementation-defined features (&#167;E.1)</a> and <a href="#var_terminology" shape="rect">Terminology for implementation-defined features (normative) (&#167;C)</a>
     for terminology and concepts which may be helpful in 
     defining the behavior of conforming processors and/or
     claiming conformance to this specification.
    </p></div><div class="div2">
<h3><span class="nav"><a href="#concepts-conformance" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#concepts-nameSymbolSpaces" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="sec-schema-validity-and-docs" id="sec-schema-validity-and-docs" shape="rect"></a>2.5 Schema-validity and documents</h3><p>As noted above, in general a document is <b>valid against
     a particular schema</b> if it obeys the constraints imposed 
     by that schema.  Depending on the nature of the application
     and on the specific invariants to be enforced, different
     forms of validity may be appropriately required by an
     application, a specification, or other users of XSD.
     This section defines terminology for use in describing the
     requirements of applications or other technologies which use
     XSD schema to describe constraints on XML documents.
    </p><div class="note"><div class="p"><b>Note:</b> Conformance to this specification cannot be claimed for XML
      documents other than schema documents; this specification
      imposes no requirements on documents, validity-related or 
      otherwise, and the terms defined in this section play 
      no role in conformance 
      to this specification.  They are defined here for the 
      convenience of users of this specification who do wish to
      impose specific requirements on documents.</div><div class="p">The terms defined capture some commonly used requirements, but
      the specification of which documents should be regarded as
      acceptable for a specific application, or as conforming to a
      given specification, is out of scope for this specification.
      Applications and specifications which use XSD are free to
      specify whatever constraints they see fit on documents; the
      provision of terms for the concepts identified here should not
      be taken to imply that other rules for document acceptability
      are discouraged or inappropriate.
     </div></div><p>All the terms defined below require that the document's root
     element be <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> using either <a href="#c-res" class="termref" shape="rect"><span class="arrow">&#183;</span>element-driven validation<span class="arrow">&#183;</span></a> (when the
     intended root element of the schema is clearly specified ) or else
     <a href="#key-strict-wc-mode" class="termref" shape="rect"><span class="arrow">&#183;</span>strict wildcard
      validation<span class="arrow">&#183;</span></a> (if several different root elements are
     acceptable).</p><div class="glist"><div class="gitem"><div class="giLabel"><a name="key-root-valid-doc" id="key-root-valid-doc" shape="rect"></a>root-valid document</div><div class="giDef"><div class="p">A document is <b>root-valid</b> against a given
	XSD schema if and only if after <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> the document's root
	element has <a href="#e-validity" class="propref" shape="rect">[validity]</a> =
	<b><i>valid</i></b> and <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> 
	= <b><i>full</i></b> or <b><i>partial</i></b>.
       </div></div></div><div class="gitem"><div class="giLabel"><a name="key-deep-valid-doc" id="key-deep-valid-doc" shape="rect"></a>deep-valid document</div><div class="giDef"><div class="p">A document is <b>deep-valid</b> against a given
	XSD schema if and only if after <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
	<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="docdeepvalid-rootvalid" name="docdeepvalid-rootvalid" shape="rect"> </a><span class="p">The document's root element has <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>valid</i></b>.</span></div>
<div class="clnumber">2 <span class="p">The document's root element has 
	   <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> = <b><i>full</i></b> or
	   <b><i>partial</i></b>.
	  </span></div>
<div class="clnumber">3 <span class="p">No element in the document has <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>invalid</i></b>.</span></div>
<div class="clnumber">4 <span class="p">No attribute in the document has <a href="#a-validity" class="propref" shape="rect">[validity]</a> = <b><i>invalid</i></b>.</span></div>
</div>
       </div><div class="note"><div class="p"><b>Note:</b> The second and third clauses are necessary to ensure that
	 invalid descendants of laxly validated elements are caught;
	 they do not cause their laxly validated ancestor to have
	 <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>invalid</i></b>.
	</div></div></div></div><div class="gitem"><div class="giLabel"><a name="key-uniformly-valid-doc" id="key-uniformly-valid-doc" shape="rect"></a>uniformly valid document</div><div class="giDef"><div class="p">A document is <b>uniformly valid</b> against a given
	XSD schema if and only if after <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
	<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="uniformlyvalid-rootvalid" name="uniformlyvalid-rootvalid" shape="rect"> </a><span class="p">The document's root element has <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>valid</i></b>.</span></div>
<div class="clnumber">2 <span class="p">The document's root element has 
	   <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> = <b><i>full</i></b>.
	  </span></div>
</div>
       </div><div class="note"><div class="p"><b>Note:</b> See <a href="#sec-sic-e-outcome" shape="rect">Assessment Outcome (Element) (&#167;3.3.5.1)</a> for the definition
	 of the <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> property.)
	</div><div class="p">It follows from the first and second clauses that every
	 element and attribute in the document has been 
	 <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> and each of them is valid.  (This distinguishes
	 <b>uniform validity</b> from <b>deep validity</b>;
	 a deep-valid document may include elements and attributes
	 whose validity is <b><i>notKnown</i></b>, perhaps because they  
	 are laxly <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> and no declarations were found for
	 them, or because they were <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>.)
	</div></div></div></div></div><div class="note"><div class="p"><b>Note:</b> The absence of error codes does not suffice to make a document
      valid according to any of the definitions just given; the
      <a href="#e-schema_error_code" class="propref" shape="rect">[schema error code]</a> property will be empty (or
      <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>) for any root element with <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>notKnown</i></b>. 
      Validators which expose only the <a href="#e-schema_error_code" class="propref" shape="rect">[schema error code]</a> property and fail to distinguish in
      their behavior between <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>notKnown</i></b> and <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>valid</i></b> can thus easily
      mislead unwary users. A frequent cause of 
      <a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>notKnown</i></b> is
      the failure of the element information item to <a href="#key-e-d-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> any
      declaration in the schema.  
     </div></div></div><div class="div2">
<h3><span class="nav"><a href="#sec-schema-validity-and-docs" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Instance_Document_Constructions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="concepts-nameSymbolSpaces" id="concepts-nameSymbolSpaces" shape="rect"></a>2.6 Names and Symbol Spaces</h3><p>As discussed in <a href="#concepts-data-model" shape="rect">XSD Abstract Data Model (&#167;2.2)</a>, most
     schema components (<span class="rfc2119">may</span>) have <a href="#key-compName" class="termref" shape="rect"><span class="arrow">&#183;</span>names<span class="arrow">&#183;</span></a>. If all such names were
     assigned from the same "pool", then it would be
     impossible to have, for example, a simple type definition and an
     element declaration both with the name "title" in a
     given <a href="#key-targetNS" class="termref" shape="rect"><span class="arrow">&#183;</span>target namespace<span class="arrow">&#183;</span></a>.</p><p>Therefore <span class="termdef"><a name="key-symbolSpace" id="key-symbolSpace" title="" shape="rect">[Definition:]&#160;&#160;</a>this specification introduces the term <b>symbol
       space</b> to denote a collection of names, each of which is
      unique with respect to the others</span>.  


     
     Within a given schema there are distinct symbol spaces 
      for each kind of named definition and declaration component identified 
      in <a href="#concepts-data-model" shape="rect">XSD Abstract Data Model (&#167;2.2)</a>, except that 
     simple type definitions and complex type definitions share a
     symbol space. Within a given symbol space, names 
     <span class="rfc2119">must</span> be unique;
      as a consequence, each <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> within a given
      symbol space uniquely identifies a single component.
     The same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <span class="rfc2119">may</span> however appear in more than one symbol space without
     conflict. For example, assuming that the namespace prefix
      <code>my</code> is bound to some particular namespace, 
      both a simple type definition and a top-level element declaration 
      can bear the name <code>my:abc</code> without conflict or
      necessary relation between the two.  But it is not possible
      for both a simple type definition and a complex type
      definition, or two distinct top-level element declarations,
      to share the name <code>my:abc</code>.
    </p><p>Locally scoped attribute and element declarations are special
     with regard to symbol spaces. Their names are not included
      in the global symbol spaces for attribute and element names;
      each complex type definition defines its own attribute symbol
      space, and elements local to a complex type definition are
      constrained by <a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a>,
      but not by means of symbol spaces.  Their names 
      are not regarded as being in any particular symbol space.  
     So, for example, two
     complex type definitions having the same target namespace can
     contain a local attribute declaration for the unqualified name
     "priority", or contain a local element declaration
     for the name "address", without conflict or
     necessary relation between the two.</p></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#concepts-nameSymbolSpaces" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#web-representation" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="Instance_Document_Constructions" id="Instance_Document_Constructions" shape="rect"></a>2.7 Schema-Related Markup in Documents Being Validated</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.7.1 <a href="#xsi_type" shape="rect">xsi:type</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.7.2 <a href="#xsi_nil" shape="rect">xsi:nil</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.7.3 <a href="#xsi_schemaLocation" shape="rect">xsi:schemaLocation, xsi:noNamespaceSchemaLocation</a><br clear="none" />
</div><p><em>XML Schema Definition Language: Structures</em>  defines
     several attributes for direct use in any XML documents. These
      attributes are in the schema instance namespace
      (<code>http://www.w3.org/2001/XMLSchema-instance</code>) described in <a href="#xsi-namespace" shape="rect">The Schema Instance Namespace (<code>xsi</code>) (&#167;1.3.1.2)</a> above. All schema processors
     <span class="rfc2119">must</span>
     have appropriate attribute declarations for these attributes
     built in, see <a href="#xsi.type" shape="rect">Attribute Declaration for the 'type' attribute (&#167;3.2.7.1)</a>,
     <a href="#xsi.nil" shape="rect">Attribute Declaration for the 'nil' attribute (&#167;3.2.7.2)</a>, <a href="#xsi.schemaLocation" shape="rect">Attribute Declaration for the 'schemaLocation' attribute (&#167;3.2.7.3)</a> and
     <a href="#xsi.noNamespaceSchemaLocation" shape="rect">Attribute Declaration for the 'noNamespaceSchemaLocation' attribute (&#167;3.2.7.4)</a>.</p><div class="note"><div class="p"><b>Note:</b> As described above (<a href="#ns-bindings" shape="rect">Conventional Namespace Bindings (&#167;1.3.3)</a>), the
      attributes described in this section are referred to in this
      specification as "<code>xsi:type</code>",
      "<code>xsi:nil</code>", etc.  This is shorthand for
      "an attribute information item whose <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace 
	name]</a> is 
       <code>http://www.w3.org/2001/XMLSchema-instance</code> and whose <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[local 
	name]</a> is <code>type</code>" (or
      <code>nil</code>, etc.).
     </div></div><div class="div3">
<h4><a name="xsi_type" id="xsi_type" shape="rect"></a>2.7.1 xsi:type</h4><p>The <a href="#Simple_Type_Definition" shape="rect">Simple Type Definition (&#167;2.2.1.2)</a> or <a href="#Complex_Type_Definition" shape="rect">Complex Type Definition (&#167;2.2.1.3)</a> used in <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of an element is usually
      determined by reference to the appropriate schema components. An
      element information item in an instance <span class="rfc2119">may</span>, however,
      explicitly assert its type using the attribute
      <code>xsi:type</code>. The value of this attribute is a <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>;  see  <a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance) (&#167;3.17.6.3)</a> for the means by which the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> is associated with a type
      definition.
     </p></div><div class="div3">
<h4><a name="xsi_nil" id="xsi_nil" shape="rect"></a>2.7.2 xsi:nil</h4><p><em>XML Schema Definition Language: Structures</em> introduces a mechanism for signaling that an element
      <span class="rfc2119">must</span> be accepted as <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
      when it has no content despite a content type which does not
      require or even necessarily allow empty content.  An element
      can be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
      without content if it has the attribute <code>xsi:nil</code>
      with the value <code>true</code>.  An element so labeled <span class="rfc2119">must</span>
      be empty, but can carry attributes if permitted by the
      corresponding complex type.</p></div><div class="div3">
<h4><a name="xsi_schemaLocation" id="xsi_schemaLocation" shape="rect"></a>2.7.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation</h4><p>The <code>xsi:schemaLocation</code> and
      <code>xsi:noNamespaceSchemaLocation</code> attributes can be
      used in a document to provide hints as to the physical location
      of schema documents which can be used for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. See <a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a> for details on the use of these
      attributes.</p><div class="note"><div class="p"><b>Note:</b> The <code>xsi:schemaLocation</code> attribute typically appears
       in XML document instances being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>; it is distinct from
       the <code>schemaLocation</code> attribute defined for some
       elements in schema documents (which is not always a hint
       but sometimes a firm directive).</div></div></div></div><div class="div2">
<h3><span class="nav"><a href="#Instance_Document_Constructions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="web-representation" id="web-representation" shape="rect"></a>2.8 Representation of Schemas on the World Wide Web</h3><p>On the World Wide Web, schemas are conventionally represented
     as XML documents (preferably of MIME type
     <code>application/xml</code> or <code>text/xml</code>, but see
     clause <a href="#c-vxd" shape="rect">1.1</a> of <a href="#src-include" shape="rect">Inclusion Constraints and Semantics (&#167;4.2.3)</a>),
     conforming to the specifications in <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition (&#167;4.2)</a>. For
     more information on the representation and use of schema
     documents on the World Wide Web
     see <a href="#schema-repr" shape="rect">Standards for representation of schemas and retrieval of schema documents on the Web (&#167;4.3.1)</a> and
     <a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a>. </p></div></div><div class="div1">
<h2><a name="components" id="components" shape="rect"></a>3 Schema Component Details</h2><div class="div2">
<h3 class="withToc"><span class="nav"> <a href="#cAttribute_Declarations" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="scIntro" id="scIntro" shape="rect"></a>3.1 Introduction</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.1.1 <a href="#sec-components-and-properties" shape="rect">Components and Properties</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.1.2 <a href="#xroc" shape="rect">XML Representations of Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.1.3 <a href="#mapping.xr.c" shape="rect">The Mapping between XML Representations and
      Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.1.4 <a href="#sec-wsnormalization" shape="rect">White Space Normalization during Validation</a><br clear="none" />
</div><div class="block">The following sections provide full details on the composition
     of all schema components, together with their XML representations
     and their contributions to <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.  Each section is devoted to a
     single component, with separate subsections for
     <ol class="enumar"><li><div class="p">properties:  their values and significance</div></li><li><div class="p">XML representation and the mapping to properties</div></li><li><div class="p">constraints on representation</div></li><li><div class="p">validation rules</div></li><li><div class="p"><a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> contributions</div></li><li><div class="p">constraints on the components themselves</div></li></ol> The sub-sections immediately below introduce conventions
     and terminology used throughout the component sections.</div><div class="div3">
<h4><a name="sec-components-and-properties" id="sec-components-and-properties" shape="rect"></a>3.1.1 Components and Properties</h4><p>Components are defined in terms of their properties, and each
      property in turn is defined by giving its range, that is the
      values it <span class="rfc2119">may</span> have.  This can be understood as defining a
      schema as a labeled directed graph, where the root is a schema,
      every other vertex is a schema component or a literal (string,
      boolean, decimal) and every labeled edge is a property.
      The graph is <em>not</em> acyclic:  multiple copies of
      components with the same name in the same <a href="#key-symbolSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>symbol space<span class="arrow">&#183;</span></a> <span class="rfc2119">must not</span> exist, so in some cases re-entrant
      chains of properties will exist. </p><div class="note"><div class="p"><b>Note:</b> A schema and its components as defined in this chapter are an
       idealization of the information a schema-aware processor
       requires: implementations are not constrained in how they
       provide it.  In particular, no implications about literal
       embedding versus indirection follow from the use below of
       language such as "properties . . . having . . .
	components as values".</div></div><p>Component properties are simply named
      values.  Most properties have either other components or
      literals (that is, strings or booleans or enumerated keywords)
      for values, but in a few cases, where more complex values are
      involved, <span class="termdef"><a name="t-propRec" id="t-propRec" title="" shape="rect">[Definition:]&#160;&#160;</a>a property
       value may itself be a collection of named values, which we call
       a <b>property record</b></span>.</p><p><span class="termdef"><a name="key-null" id="key-null" title="" shape="rect">[Definition:]&#160;&#160;</a>Throughout this
       specification, the term <b>absent</b> is used as a
       distinguished property value denoting absence</span>.  Again this should not be 
       
       interpreted as
       constraining implementations, as for instance between using a
       <b><i>null</i></b> value for such properties or not representing
       them at all.
      <span class="termdef"><a name="key-nonnull" id="key-nonnull" title="" shape="rect">[Definition:]&#160;&#160;</a>
       A property value
       which is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> is <b>present</b>.</span>
     </p><p>Any property not defined as optional is always
       present; optional properties which are not present are
      taken to have <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> as their
      value.  Any property identified as a having a set, subset or
      list value might have an empty value unless this is explicitly
      ruled out:  this is <em>not</em> the same as <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>. Any property value identified
      as a superset or subset of some set 
      might be equal to that set,
      unless a proper superset or subset is explicitly called for. By
      'string' in Part 1 of this specification is meant a sequence of
      ISO 10646 characters identified as <a href="http://www.w3.org/TR/xml11/#charsets" shape="rect">legal XML
       characters</a> in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>.</p><div class="note"><div class="p"><b>Note:</b> It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a schema processor uses the
       definition of legal character from <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> or
       <a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a>.</div></div></div><div class="div3">
<h4><a name="xroc" id="xroc" shape="rect"></a>3.1.2 XML Representations of Components</h4><p>The principal purpose of <em>XML Schema Definition Language: Structures</em> is to define a set of schema
      components that constrain the contents of instances and augment
      the information sets thereof.  Although no external
      representation of schemas is required for this purpose, such
      representations will obviously be widely used. To provide for
      this in an appropriate and interoperable way, this specification
      provides a normative XML representation for schemas which makes
      provision for every kind of schema component.  <span class="termdef"><a name="key-schemaDoc" id="key-schemaDoc" title="" shape="rect">[Definition:]&#160;&#160;</a>A document in this
       form (i.e. a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item)
       is a <b>schema document</b></span>.  For the schema
      document as a whole, and its constituents, the sections below
      define correspondences between element information items (with
      declarations in
<a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a> and <a href="#nonnormative-schemaDTD" shape="rect">DTD for Schemas (non-normative) (&#167;I)</a>) and schema components.  The key element information items in
      the XML representation of a schema are in the XSD namespace, that
      is their <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace 
       name]</a> is
      <code>http://www.w3.org/2001/XMLSchema</code>.  Although a common way of creating
      the XML Infosets which are or contain <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a> will be
      using an XML parser, this is not required:  any mechanism which
      constructs conformant infosets as defined in <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a> is a possible starting
      point.</p><div class="block">Two aspects of the XML representations of components presented
      in the following sections are constant across them all:
      <ol class="enumar"><li><div class="p">All of them allow attributes qualified with namespace names
	 other than the XSD namespace itself: these appear as
	 annotations in the corresponding schema component;</div></li><li><div class="p">All of them allow an <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> as their
	 first child, for human-readable documentation and/or
	 machine-targeted information.</div></li></ol>
     </div><p>A recurrent pattern in the XML
      representation of schemas may also be mentioned here.  In many
      cases, the same element name (e.g. <code>element</code> or
      <code>attribute</code> or <code>attributeGroup</code>), serves
      both to define a particular schema component and to incorporate
      it by reference.  In the first case the <code>name</code>
      attribute is required, in the second the <code>ref</code>
      attribute is required.  These
      two usages are mutually exclusive, and sometimes also depend on
      context.</p><p>The descriptions of the XML representation
      of components, and the <a href="#gloss-src" class="termref" shape="rect"><span class="arrow">&#183;</span>Schema Representation
       Constraints<span class="arrow">&#183;</span></a>, apply to schema documents <em>after</em>,
      not before, the 
      <a href="#key-vc-preprocessing" class="termref" shape="rect"><span class="arrow">&#183;</span>conditional-inclusion pre-processing<span class="arrow">&#183;</span></a>
      described in <a href="#cip" shape="rect">Conditional inclusion (&#167;4.2.2)</a> and the 
      <a href="#key-chameleon-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>chameleon pre-processing<span class="arrow">&#183;</span></a>
      described in <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
      multiple schema definition documents
       (<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>.
     </p></div><div class="div3">
<h4><a name="mapping.xr.c" id="mapping.xr.c" shape="rect"></a>3.1.3 The Mapping between XML Representations and
      Components</h4><p>For each kind of schema component there is a corresponding
      normative XML representation. The sections below describe the
      correspondences between the properties of each kind of schema
      component on the one hand and the properties of information
      items in that XML representation on the other, together with
      constraints on that representation above and beyond those
      expressed in the
      <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.
      Neither the correspondences
      described nor the XML Representation Constraints apply to
      elements in the Schema namespace which occur as descendants
      of <a href="#element-appinfo" class="eltref" shape="rect">&lt;appinfo&gt;</a> or <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a>.
      
     </p><p>The language used is as if the correspondences were mappings
      from XML representation to schema component, but the mapping in
      the other direction, and therefore the correspondence in the
      abstract, can always be constructed therefrom.</p><p>In discussing the mapping from XML representations to schema
      components below, the value of a component property is often
      determined by the value of an attribute information item, one of
      the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of an element information item.  Since schema
      documents are constrained by the
      <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>, there is always a simple type
      definition associated with any such attribute information item.
      <span class="termdef"><a name="key-vv" id="key-vv" title="" shape="rect">[Definition:]&#160;&#160;</a>With reference to any 
	string, interpreted as denoting
	an instance of a given datatype, the term 
	<b>actual value</b> denotes the value to which the
	<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-lexical-mapping" shape="rect">lexical mapping</a> of that datatype maps the string.
              
      </span>In the case of attributes in 
       schema documents, the string used as the
       lexical representation is normally the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of the
       attribute.  The associated datatype is, unless otherwise specified, 
       the one identified in the declaration of the attribute, in the
       schema for schema documents; in some cases (e.g. the
       <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-e" class="compref" shape="rect">enumeration</a> 
       facet, or fixed and default values
       for elements and attributes) the associated datatype will
       be a more specific one, 
       as specified in the appropriate
       XML mapping rules.  The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
      
      will often be a string, but can also be an integer, a
      boolean, a URI reference, etc.  This term is also occasionally
      used with respect to element or attribute information items in a
      document being <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>.</p><p>Many properties are identified below as having other schema
      components or sets of components as values.  For the purposes of
      exposition, the definitions in this section assume that (unless
      the property is explicitly identified as optional) all such
      values are in fact present.  When schema components are
      constructed from XML representations involving reference by name
      to other components, this assumption will in some
       cases be violated if one or more references cannot be
      <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a>.  This specification addresses the matter of
      missing components in a uniform manner, described in
<a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>:  no mention of handling missing
      components will be found in the individual component
      descriptions below.</p><p>Forward reference to named definitions and declarations
      <em>is</em> allowed, both within and between
      <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>. By the time the component corresponding to
      an XML representation which contains a forward reference is
      actually needed for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>,
       it is possible that an appropriately-named component
      will have become available to discharge the reference: see
      <a href="#composition" shape="rect">Schemas and Namespaces: Access and Composition (&#167;4)</a> for details.</p></div><div class="div3">
<h4><a name="sec-wsnormalization" id="sec-wsnormalization" shape="rect"></a>3.1.4 White Space Normalization during Validation</h4><p>Throughout this specification, <span class="termdef"><a name="key-iv" id="key-iv" title="" shape="rect">[Definition:]&#160;&#160;</a>the
<b>initial value</b> of some
attribute information item is the value of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized
value]</a> property of that item.  Similarly, the <b>initial value</b> of an element information item is the string composed of, in order, the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.character" class="xpropref" shape="rect">[character code]</a> of each character information item in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of that
element information item</span>.</p><p>The above definition means that comments and processing instructions,
even in the midst of text, are ignored for all <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> purposes.</p><div class="p"><div class="termdef"><a name="key-nv" id="key-nv" title="" shape="rect">[Definition:]&#160;&#160;</a>The
       <b>normalized value</b> of an element or attribute
       information item is an <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> which has been normalized
       according to the value of the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a>, and the values of any other <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facets</a>, associated with the simple type definition used
       in its <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>.  The keywords for 
	whitespace normalization have the following meanings:
       <div class="glist"><div class="gitem"><div class="giLabel">preserve</div><div class="giDef"><div class="p">No normalization is done, the 
	   whitespace-normalized value
	   is the <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a></div></div></div><div class="gitem"><div class="giLabel">replace</div><div class="giDef"><div class="p">All occurrences of <code>#x9</code> (tab),
	   <code>#xA</code> (line feed) and <code>#xD</code> (carriage
	   return) are replaced with <code>#x20</code>
	   (space).</div></div></div><div class="gitem"><div class="giLabel">collapse</div><div class="giDef"><div class="p">Subsequent to the replacements specified above under
	   <b>replace</b>, contiguous sequences of
	   <code>#x20</code>s are collapsed to a single
	   <code>#x20</code>, and initial and/or final
	   <code>#x20</code>s are deleted.</div></div></div></div> 
       Similarly, the
	<b>normalized value</b> of any string with respect to a
	given simple type definition is the string resulting from
	normalization using the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a>
	and any other <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facets</a>, associated with that simple type definition.
      </div>
      
     </div><p>When more than one <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facet</a> applies, the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a> is applied first; the order in which <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facets
      are applied is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</p><p>If the simple type definition used in an item's 
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, 
then the 
<a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> <span class="rfc2119">must</span> be determined 
as in the <b>preserve</b> case above.</p><p>There are three alternative validation rules which help supply the necessary background for the
above:  <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a> (clause <a href="#c-sva" shape="rect">3</a>), <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a> (clause <a href="#c-sv1" shape="rect">3.1.3</a>) or <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> (clause <a href="#c-sv2" shape="rect">1.2</a>).</p><p>These three levels of normalization correspond to the processing mandated
in XML for element content, CDATA attribute 
content and tokenized
attributed content, respectively.  See 
<a href="http://www.w3.org/TR/xml11/#AVNormalize" shape="rect">Attribute Value Normalization</a> 
in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> for the precedent for <b>replace</b> and 
<b>collapse</b> for attributes.  Extending this processing to element 
content is necessary to ensure  
consistent <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> 
semantics for simple types, regardless of whether they are applied to attributes 
or elements.  Performing it twice in the case of attributes whose 
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized
value]</a> has already been subject to replacement or collapse on the basis of
information in a DTD is necessary to ensure consistent treatment of attributes
regardless of the extent to which DTD-based information has been made use of
during infoset construction.</p><div class="note"><div class="p"><b>Note:</b> Even when DTD-based information <em>has</em> been appealed
to, and <a href="http://www.w3.org/TR/xml11/#AVNormalize" shape="rect">Attribute Value
Normalization</a> has taken place, it 
is possible that
<em>further</em> normalization will
take place, as for instance when character entity references
in attribute values result in white space characters other than spaces
in their <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a>s.</div></div><div class="note"><div class="p"><b>Note:</b> The values <b>replace</b> and 
<b>collapse</b> may appear to provide a
convenient way to "unwrap" text (i.e. undo the effects of
pretty-printing and word-wrapping).  In some cases, especially
highly constrained data consisting of lists of artificial tokens
such as part numbers or other identifiers, this appearance is
correct.  For natural-language data, however, the whitespace
processing prescribed for these values is not only unreliable but
will systematically remove the information needed to perform
unwrapping correctly.  For Asian scripts, for example, a correct
unwrapping process will replace line boundaries not with blanks but
with zero-width separators or nothing.  In consequence, it is
normally unwise to use these values for natural-language data, or
for any data other than lists of highly constrained tokens.</div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#scIntro" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cElement_Declarations" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cAttribute_Declarations" id="cAttribute_Declarations" shape="rect"></a>3.2 Attribute Declarations</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.1 <a href="#Attribute_Declaration_details" shape="rect">The Attribute Declaration Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2 <a href="#declare-attribute" shape="rect">XML Representation of Attribute Declaration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2.1 <a href="#dcl.att.global" shape="rect">Mapping Rules for Global Attribute Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2.2 <a href="#dcl.att.local" shape="rect">Mapping Rules for Local Attribute Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2.3 <a href="#ref.att.local" shape="rect">Mapping Rules for References to Top-level Attribute Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.3 <a href="#sec-src-attdecl" shape="rect">Constraints on XML Representations of Attribute Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.4 <a href="#sec-cvc-attdecl" shape="rect">Attribute Declaration Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.4.1 <a href="#sec-cvc-attribute" shape="rect">Attribute Locally Valid</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.4.2 <a href="#sec-gov-attribute" shape="rect">Governing Attribute Declaration and Governing Type Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.4.3 <a href="#sec-cvs-assess-attr" shape="rect">Schema-Validity Assessment (Attribute)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.5 <a href="#psvi_ad" shape="rect">Attribute Declaration Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.5.1 <a href="#sec-sic-a-outcome" shape="rect">Assessment Outcome (Attribute)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.5.2 <a href="#sec-sic-attr-error-code" shape="rect">Validation Failure (Attribute)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.5.3 <a href="#sec-sic-attr-decl" shape="rect">Attribute Declaration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.5.4 <a href="#sec-sic-attrType" shape="rect">Attribute Validated by Type</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.6 <a href="#coss-attribute" shape="rect">Constraints on Attribute Declaration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.6.1 <a href="#sec-a-props-correct" shape="rect">Attribute Declaration Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.6.2 <a href="#sec-cos-valid-simple-default" shape="rect">Simple Default Valid</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.6.3 <a href="#sec-no-xmlns" shape="rect">xmlns Not Allowed</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.6.4 <a href="#sec-no-xsi" shape="rect">xsi: Not Allowed</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.7 <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.7.1 <a href="#sec-sc-xsi.type" shape="rect">xsi:type</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.7.2 <a href="#sec-sc-xsi.nil" shape="rect">xsi:nil</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.7.3 <a href="#sec-sc-xsi.schemaLocation" shape="rect">xsi:schemaLocation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.7.4 <a href="#sec-sc-xsi.noNamespaceSchemaLocation" shape="rect">xsi:noNamespaceSchemaLocation</a><br clear="none" />
</div><p>Attribute declarations provide for:</p><ul><li><div class="p">Local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of attribute information item values using a simple type definition;</div></li><li><div class="p">Specifying default or fixed values for attribute information items.</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:attribute name="age" type="xs:positiveInteger" use="required"/&gt;</pre></div><div class="exampleWrapper">
<div class="p">The XML representation of an attribute declaration.</div></div></div><div class="div3">
<h4><a name="Attribute_Declaration_details" id="Attribute_Declaration_details" shape="rect"></a>3.2.1 The Attribute Declaration Schema Component</h4><p>The attribute declaration schema component has the following
      properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ad" id="ad" shape="rect">Attribute Declaration</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ad-annotations" shape="rect" id="ad-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="ad-name" shape="rect" id="ad-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value.  Required.</div>
</div>
<div class="propDefn"><a name="ad-target_namespace" shape="rect" id="ad-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value.  Optional.</div>
</div>
<div class="propDefn"><a name="ad-type_definition" shape="rect" id="ad-type_definition"></a><div class="pdName"><span class="propdef">{type definition}</span></div>
<div class="pdDef">
A  <a href="#std" class="compref" shape="rect">Simple Type Definition</a> component.  Required.</div>
</div>
<div class="propDefn"><a name="ad-scope" shape="rect" id="ad-scope"></a><div class="pdName"><span class="propdef">{scope}</span></div>
<div class="pdDef">
A  <a href="#sc_a" class="compref" shape="rect">Scope</a> property record.  Required.</div>
</div>
<div class="propDefn"><a name="ad-value_constraint" shape="rect" id="ad-value_constraint"></a><div class="pdName"><span class="propdef">{value constraint}</span></div>
<div class="pdDef">
A  <a href="#vc_a" class="compref" shape="rect">Value Constraint</a> property record.  Optional.</div>
</div>
<div class="propDefn"><a name="ad-inheritable" shape="rect" id="ad-inheritable"></a><div class="pdName"><span class="propdef">{inheritable}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="sc_a" id="sc_a" shape="rect">Scope</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="sc_a-variety" shape="rect" id="sc_a-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">global</span>, <span class="enumval">local</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="sc_a-parent" shape="rect" id="sc_a-parent"></a><div class="pdName"><span class="propdef">{parent}</span></div>
<div class="pdDef">
Either a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> or a <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a>. Required if <a href="#sc_a-variety" class="propref" shape="rect">{variety}</a> is <b><i>local</i></b>,
    otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="vc_a" id="vc_a" shape="rect">Value Constraint</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="vc_a-variety" shape="rect" id="vc_a-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">default</span>, <span class="enumval">fixed</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="vc_a-value" shape="rect" id="vc_a-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">

    An <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>.  Required.
   </div>
</div>
<div class="propDefn"><a name="vc_a-lexical_form" shape="rect" id="vc_a-lexical_form"></a><div class="pdName"><span class="propdef">{lexical form}</span></div>
<div class="pdDef">

    A character string.  Required.
    
   </div>
</div>
</div></div>
</div>
</div>
<p>The <a href="#ad-name" class="propref" shape="rect">{name}</a> property <span class="rfc2119">must</span> match the
      local part of the names of attributes being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>.</p><p>The value of  each attribute validated <span class="rfc2119">must</span> conform to the supplied
      <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>.</p><p>A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
 value of the <a href="#ad-target_namespace" class="propref" shape="rect">{target        namespace}</a> property provides for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of namespace-qualified
      attribute information items (which <span class="rfc2119">must</span> be explicitly prefixed
      in the character-level form of XML documents).  <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>Absent<span class="arrow">&#183;</span></a> values of
      <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> unqualified (unprefixed)
      items.</p><p>
      For an attribute declaration <var>A</var>, if <var>A</var>.<a href="#ad-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_a-variety" class="propref" shape="rect">{variety}</a>
      = <b><i>global</i></b>, then <var>A</var> is available for use throughout the schema.
      If <var>A</var>.<a href="#ad-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_a-variety" class="propref" shape="rect">{variety}</a>
      = <b><i>local</i></b>, then <var>A</var> is available for use only within (the
      <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> or <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a>)
      <var>A</var>.<a href="#ad-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_a-parent" class="propref" shape="rect">{parent}</a>.
     </p><p>The 
      <a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a> property reproduces the functions of
      XML default and
      <code>#FIXED</code> attribute values.  A <a href="#vc_a-variety" class="propref" shape="rect">{variety}</a> of
      <b><i>default</i></b> specifies that the attribute is to
      appear unconditionally in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, with <a href="#vc_a-value" class="propref" shape="rect">{value}</a> and <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical   form}</a> used whenever the attribute is not
      actually present; <b><i>fixed</i></b> indicates that the attribute
      value if present <span class="rfc2119">must</span> be equal or identical 
       to <a href="#vc_a-value" class="propref" shape="rect">{value}</a>, and if absent receives <a href="#vc_a-value" class="propref" shape="rect">{value}</a> and <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical   form}</a> as for <b><i>default</i></b>.  Note that
      it is <em>values</em> that are checked, not 
      strings,
       and that the test is for either equality or identity.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#ad-annotations" class="propref" shape="rect">{annotations}</a> property.</p><div class="note"><div class="p"><b>Note:</b> A more complete and formal presentation of the semantics of <a href="#ad-name" class="propref" shape="rect">{name}</a>, <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> and <a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a> is provided in
conjunction with other aspects of complex type <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> (see <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>.)</div></div><p><a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a> distinguishes attributes with names such as <code>xmlns</code> or <code>xmlns:xsl</code> from
ordinary attributes, identifying them as <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a>.  Accordingly, it is unnecessary and in fact not possible for
schemas to contain attribute declarations corresponding to such
namespace declarations, see <a href="#no-xmlns" shape="rect"><code>xmlns</code> Not Allowed (&#167;3.2.6.3)</a>.  No means is provided in
this specification to supply a
default value for a namespace declaration.</p></div><div class="div3">
<h4><a name="declare-attribute" id="declare-attribute" shape="rect"></a>3.2.2 XML Representation of Attribute Declaration Schema Components</h4><p>The XML representation for an attribute declaration schema
component is an
<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item.  It specifies a
simple type definition for an attribute either by reference or
explicitly, and <span class="rfc2119">may</span> provide default information. The
correspondences between the properties of the information item 
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component are given in this section.</p><p>Attribute declarations can appear at the top level of a schema
      document, or within complex type definitions, either as complete
      (local) declarations, or by reference to top-level declarations,
      or within attribute group definitions.  For complete
      declarations, top-level or local, the <code>type</code>
      attribute is used when the declaration can use a built-in or
      pre-declared simple type definition.  Otherwise an anonymous
      <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> is provided inline. When no simple type definition is
       referenced or provided, the default is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, which
       imposes no constraints at all.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>attribute</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-attribute" name="element-attribute" shape="rect">&lt;attribute</a><br clear="none" />&#160;&#160;default = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a><br clear="none" />&#160;&#160;fixed = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a><br clear="none" />&#160;&#160;form = (<var>qualified</var> | <var>unqualified</var>)<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;targetNamespace = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;type = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;use = (<var>optional</var> | <var>prohibited</var> | <var>required</var>)&#160;:&#160;optional<br clear="none" />&#160;&#160;inheritable = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-simpleType" class="eltref" shape="rect">simpleType</a>?)<br clear="none" />&lt;/attribute&gt;</p></div></div><p>An
      <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element 
      maps to an attribute declaration, and
      allows the type definition of that declaration to be specified either by
      reference or by explicit inclusion.
     </p><p>Top-level
      <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> elements 
      (i.e. those which appear
       within the schema document as
       children of 
       
       <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
       elements) produce
      <b><i>global</i></b> attribute declarations; 
      <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>s 
      within
      <a href="#element-attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> or <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> produce
      either attribute uses which contain <b><i>global</i></b> attribute
      declarations (if there's a <code>ref</code> attribute) or local
      declarations (otherwise). For complete declarations, top-level or local,
      the <code>type</code> attribute is used when the declaration can use a
      built-in or user-defined global type definition. Otherwise an anonymous
      <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> is provided inline.
     </p><div class="note"><div class="p"><b>Note:</b> 
	 Children of <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> are not strictly speaking top-level
	 declarations, but they will become top-level declarations if they
	 override corresponding declarations in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a>
	 of their parent. See <a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a> for details.
       </div></div><p>Attribute information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by a top-level
      declaration <span class="rfc2119">must</span> be qualified with the
      <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> of that
      declaration. If the
       <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, the item <span class="rfc2119">must</span> be
       unqualified. Control over whether attribute
      information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by a local declaration <span class="rfc2119">must</span> be
      similarly qualified or not is provided by the <code>form</code>
      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, whose default is provided by the
      <code>attributeFormDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> on the enclosing
      <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, via its determination of 
      <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a>.</p><p>The names for top-level attribute declarations are in their
      own <a href="#key-symbolSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>symbol space<span class="arrow">&#183;</span></a>.  The
      names of locally-scoped attribute declarations reside in symbol
      spaces local to the type definition which contains them.</p><div class="block">The following sections specify several
      sets of XML mapping rules which apply in different
      circumstances.
      <ul><li><div class="p">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item
	 has <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> as its parent, then it maps to 
	 a
	  global
	 <a href="#ad" class="compref" shape="rect">Attribute Declaration</a> as described in
	 <a href="#dcl.att.global" shape="rect">Mapping Rules for Global Attribute Declarations (&#167;3.2.2.1)</a>.
	</div></li><li><div class="p">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element
	 information item has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> 
	 or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	 as an ancestor, and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
	 absent, and the <code>use</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is not
	 <code>"prohibited"</code>, then it maps both to
	 an <a href="#ad" class="compref" shape="rect">Attribute Declaration</a> and to an <a href="#au" class="compref" shape="rect">Attribute Use</a>
	 component, as described in 
	 <a href="#dcl.att.local" shape="rect">Mapping Rules for Local Attribute Declarations (&#167;3.2.2.2)</a>.
	</div><div class="p">On <a href="#au" class="compref" shape="rect">Attribute Use</a> components, see
	 <a href="#cAttributeUse" shape="rect">Attribute Uses (&#167;3.5)</a>.
	</div></li><li><div class="p">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element
	 information item has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> 
	 or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	 as an ancestor, and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
	 <a href="#key-nonnull" class="termref" shape="rect"><span class="arrow">&#183;</span>present<span class="arrow">&#183;</span></a>, and the <code>use</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is not
	 <code>"prohibited"</code>, then it maps to
	 an <a href="#au" class="compref" shape="rect">Attribute Use</a>
	 component, as described in 
	 <a href="#ref.att.local" shape="rect">Mapping Rules for References to Top-level Attribute Declarations (&#167;3.2.2.3)</a>.
	</div></li><li><div class="p">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item
	 has <code>use='prohibited'</code>, then it does not map to,
	 or correspond to, any schema component at all.
	</div><div class="note"><div class="p"><b>Note:</b> The <code>use</code> attribute is not allowed on
	  top-level <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> elements, so
	  this can only happen with <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> elements
	  appearing within a <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
	  or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> element.
	 </div></div></li></ul>
     </div><div class="div4">
<h5><a name="dcl.att.global" id="dcl.att.global" shape="rect"></a>3.2.2.1 Mapping Rules for Global Attribute Declarations</h5><p id="xr.att3">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item has <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> as its parent, the corresponding schema
      component is as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Attribute_Declaration_details" shape="rect">Attribute Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the parent
	<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item, or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> if there is none.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="mapRepr">The simple type
	definition corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>
	element information
	item in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present, otherwise the simple
	type definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>type</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="mapRepr">A
	 <a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
	<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="mapRepr">If there is a
	<code>default</code> or a <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
	then a <a href="#vc_a" class="compref" shape="rect">Value Constraint</a> as follows, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">either <b><i>default</i></b> or
	  <b><i>fixed</i></b>, as appropriate</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_a-value" class="propref" shape="rect">{value}</a></div><div class="pvVal">the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (with respect
	  to the
	  <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>) of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a></div><div class="pvVal">the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> (with respect to the
	  <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>) of the
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div></div></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
        of the <code>inheritable</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
        <b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">  The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
	 <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>. 

       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div4">
<h5><a name="dcl.att.local" id="dcl.att.local" shape="rect"></a>3.2.2.2 Mapping Rules for Local Attribute Declarations</h5><p id="xr.att5">If 
       the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item has
      <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> as
       an ancestor and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is absent,
       it maps both to an attribute 
	declaration (see <a href="#xr.att.local" shape="rect">below</a>) and
       to an attribute use with properties as follows
       (unless <code>use='prohibited'</code>, in which case the item
       corresponds to nothing at all):</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#AU_details" shape="rect">Attribute Use</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-required" class="propref" shape="rect">{required}</a></div><div class="mapRepr"><b><i>true</i></b> if 
	the 
	 <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element has <code>use</code> =
	 <code>required</code>, otherwise
	<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a></div><div class="mapRepr">See the Attribute Declaration mapping
	immediately below.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="mapRepr">If there is a
	<code>default</code> or a <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
	then a <a href="#vc_au" class="compref" shape="rect">Value Constraint</a>
	 as follows, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">either <b><i>default</i></b>
	  or <b><i>fixed</i></b>, as appropriate</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-value" class="propref" shape="rect">{value}</a></div><div class="pvVal">the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>  of
	  the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (with respect to <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>)
	 </div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-lexical_form" class="propref" shape="rect">{lexical form}</a></div><div class="pvVal">the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>  of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (with respect to <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>)</div></div></div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
        of the <code>inheritable</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
        <b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
	The same annotations as the <a href="#ad-annotations" class="propref" shape="rect">{annotations}</a> of
	the Attribute Declaration. See below.
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p><a name="xr.att.local" id="xr.att.local" shape="rect"></a>
       The <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element also
       maps to the <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>
       of the  attribute use, as follows:
     </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Attribute_Declaration_details" shape="rect">Attribute Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">
	The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>
	   <code>targetNamespace</code> is present
	  , <b>then </b>
	   its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>.
	  </div><div class="clnumber">2 <b>If </b>
	   <code>targetNamespace</code> is not present and
	   <b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">2.1 <span class="p"> <code>form</code>
	       = <code>qualified</code> 
	     </span></div>
<div class="clnumber">2.2 <span class="p"> <code>form</code> is absent and the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor has
	       <code>attributeFormDefault</code> =
	       <code>qualified</code>
	     </span></div>
</div>
	   <b>then </b>
	   the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code>
	   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the ancestor <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
	   element information
	   item, or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> if there
	   is none.
	  </div><div class="clnumber">3 <b>otherwise </b>
	   <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	  </div></div> 
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="mapRepr">The simple type
	definition corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>
	element information
	item in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present, otherwise the simple
	type definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>type</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="mapRepr">A
	 <a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
	<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>local</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal">If the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> as an ancestor, the <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> corresponding to that item, otherwise (the
	  <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>
	  element information item is within an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> element information
	   item), the <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a> corresponding to
	   that item.</div></div></div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="mapRepr"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
        of the <code>inheritable</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
        <b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">  The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
	 <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>. 
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div4">
<h5><a name="ref.att.local" id="ref.att.local" shape="rect"></a>3.2.2.3 Mapping Rules for References to Top-level Attribute Declarations</h5><p id="xr.att8">
       If 
       the
      <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information item has
      <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> as an
      ancestor and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is 
       present, it
      maps to an attribute use with properties as follows
      (unless <code>use='prohibited'</code>, in which case the item
      corresponds to nothing at all):</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#AU_details" shape="rect">Attribute Use</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-required" class="propref" shape="rect">{required}</a></div><div class="mapRepr"><b><i>true</i></b> if <code>use</code> =
	 <code>required</code>, otherwise
	<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a></div><div class="mapRepr">The (top-level)
	attribute declaration <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
	the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="mapRepr">If there is a
	<code>default</code> or a <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
	then a <a href="#vc_au" class="compref" shape="rect">Value Constraint</a>
	 as follows, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">either <b><i>default</i></b>
	  or <b><i>fixed</i></b>, as appropriate</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-value" class="propref" shape="rect">{value}</a></div><div class="pvVal">the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>  of
	  the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (with respect to <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>)</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_au-lexical_form" class="propref" shape="rect">{lexical form}</a></div><div class="pvVal">the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>  of the
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (with respect to
	   <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>)</div></div></div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
        of the <code>inheritable</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
        <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#au-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
	  The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of
	 the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>. 
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div></div><div class="div3">
<h4><a name="sec-src-attdecl" id="sec-src-attdecl" shape="rect"></a>3.2.3 Constraints on XML Representations of Attribute Declarations</h4><div class="constraintnote"><a id="src-attribute" name="src-attribute" shape="rect"></a><b>Schema Representation Constraint: Attribute Declaration Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element
       information items by the schema for schema documents,
       <b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1 <span class="p"><code>default</code> and <code>fixed</code> <span class="rfc2119">must not</span> both be present.</span></div>
<div class="clnumber">2 <span class="p">If <code>default</code> and <code>use</code> are both present,
	  <code>use</code> <span class="rfc2119">must</span> have the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <code>optional</code>.</span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->If the item's parent is not <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, then
	  <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">One of <code>ref</code> or <code>name</code> is present, but not both.</span></div>
<div class="clnumber">3.2 <span class="p">If <code>ref</code> is present, then all of <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>,
	     <code>form</code> and <code>type</code> are absent.</span></div>
</div>
	 </div>
<div class="clnumber">4 <span class="p">The
	  <code>type</code> attribute and a
	  <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> child element
	  <span class="rfc2119">must not</span> both be present.</span></div>
<div class="clnumber">5 <span class="p">
	  If <code>fixed</code> and <code>use</code> are both present,
	  <code>use</code> <span class="rfc2119">must not</span> have the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <code>prohibited</code>.
	 </span></div>
<div class="clnumber">6<a id="att-with-ns" name="att-with-ns" shape="rect"> </a><!--* no span class='p' possible here *-->
	  If the
	  <code>targetNamespace</code> attribute
	  is present then 
	  <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">6.1 <span class="p">The
	     <code>name</code> attribute
	     is present.
	    </span></div>
<div class="clnumber">6.2 <span class="p">The
	     <code>form</code> attribute
	     is absent.
	    </span></div>
<div class="clnumber">6.3 <!--* no span class='p' possible here *-->
	     If the ancestor <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> does not have a
	     <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
	     is different from the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <code>targetNamespace</code> of
	     <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>, then
	     <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">6.3.1 <span class="p">
		<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> as an ancestor
	       </span></div>
<div class="clnumber">6.3.2<a id="att-with-ns-must-be-old" name="att-with-ns-must-be-old" shape="rect"> </a><span class="p">
		There is a <a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> ancestor
		between the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> and the nearest
		<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> ancestor, and the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
		<code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
		<a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> does not 
		<a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
		name of <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
	       </span></div>
</div>
	    </div>
</div>
	 </div>
</div>
      </div></div></div></div><div class="div3">
<h4><a name="sec-cvc-attdecl" id="sec-cvc-attdecl" shape="rect"></a>3.2.4 Attribute Declaration Validation Rules</h4><div class="div4">
<h5><a name="sec-cvc-attribute" id="sec-cvc-attribute" shape="rect"></a>3.2.4.1 Attribute Locally Valid</h5><p>Informally, an attribute in an XML
       instance is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
       against an attribute declaration if and only if (a)
       the name of the attribute matches
       the name of the declaration, (b) after
       whitespace normalization its <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> is locally valid
       against the type declared for the attribute, and
       (c) the 
       attribute obeys any relevant value constraint. Additionally, 
       for <code>xsi:type</code>, it is required that the type named
       by the attribute be present in the schema.
       A logical prerequisite for checking the local validity of an
       attribute against an attribute declaration is that the attribute
       declaration itself and the type definition it identifies
       both be present in the schema. 
      </p><p>Local validity of attributes is 
       tested as part of schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of attributes
       (and of the elements on which they occur), and the result
       of the test is exposed in the 
       <a href="#a-validity" class="propref" shape="rect">[validity]</a> property of the
       <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.</p><p>A more formal statement 
       is given in the following constraint.</p><div class="constraintnote"><a id="cvc-attribute" name="cvc-attribute" shape="rect"></a><b>Validation Rule: Attribute Locally Valid</b><br clear="none" /><div class="constraint"><div class="p">For an attribute information item <var>A</var>
	to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> 
        with respect to an attribute declaration <var>D</var>
        <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-a1" name="c-a1" shape="rect"> </a><span class="p"><var>D</var> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> 
           (see <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a> for
           how this can fail to be the case)
           and <var>D</var> and <var>A</var> have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.</span></div>
<div class="clnumber">2<a id="c-a2" name="c-a2" shape="rect"> </a><span class="p"><var>D</var>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> is not 
	   <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">3<a id="c-sva" name="c-sva" shape="rect"> </a><span class="p"><var>A</var>'s <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> 
           with respect to <var>D</var>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> 
           as per <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</span></div>
<div class="clnumber">4 <span class="p">If 
	   <var>D</var>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a> is present and 
	    <var>D</var>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_a-variety" class="propref" shape="rect">{variety}</a> = <b><i>fixed</i></b>, then <var>A</var>'s <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> 
	    is equal or
                    identical to
	    <var>D</var>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_a-value" class="propref" shape="rect">{value}</a>.</span></div>
<div class="clnumber">5 <span class="p">
           If <var>D</var> is the built-in declaration for <code>xsi:type</code>
           (<a href="#xsi.type" shape="rect">Attribute Declaration for the 'type' attribute (&#167;3.2.7.1)</a>), then <var>A</var>'s <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
           <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to a type definition.
          </span></div>
</div>
       </div></div></div></div><div class="div4">
<h5><a name="sec-gov-attribute" id="sec-gov-attribute" shape="rect"></a>3.2.4.2 Governing Attribute Declaration and Governing Type Definition</h5><div class="p">
       <div class="termdef"><a name="key-governing-ad" id="key-governing-ad" title="" shape="rect">[Definition:]&#160;&#160;</a>
        In a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, 
        the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration of an attribute 
        (its <b>governing attribute declaration</b>)
        is the first of
        the following which applies:
        <div class="constraintlist"><div class="clnumber">1<a id="c-ad" name="c-ad" shape="rect"> </a><span class="p">A declaration which was stipulated by the processor (see
           <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2 <span class="p">Its <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">3<a id="c-adbyr" name="c-adbyr" shape="rect"> </a><span class="p">A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[local
            name]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace
            name]</a>,
           provided the attribute
           is not 
           <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>
           and the processor has not
           stipulated a type definition at the start of <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.
          </span></div>
</div>
        
        If none of these applies, the attribute
        has no <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> (or, in equivalent words, the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> is
        <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>).
       </div>
      </div><div class="note"><div class="p"><b>Note:</b> <a name="anchor11764e" id="anchor11764e" shape="rect"></a>
       As a consequence, unless <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> or stipulated otherwise, attributes
       named <code>xsi:type</code>, <code>xsi:nil</code>,
       <code>xsi:schemaLocation</code>, or
       <code>xsi:noNamespaceSchemaLocation</code> are always governed by
       their corresponding built-in declarations (see
       <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations (&#167;3.2.7)</a>).
      </div></div><div class="p">
       <div class="termdef"><a name="key-governing-type-att" id="key-governing-type-att" title="" shape="rect">[Definition:]&#160;&#160;</a>
        The <b>governing type definition</b> of an
        attribute, in a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is 
       the first of the following which applies:
       <div class="constraintlist"><div class="clnumber">1 <span class="p">A type definition stipulated by the processor (see
          <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2 <span class="p">The <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> of the
         <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>.</span></div>
</div>
       If neither of these applies, there is no
       <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> (or, in equivalent words, it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>).
      </div></div></div><div class="div4">
<h5><a name="sec-cvs-assess-attr" id="sec-cvs-assess-attr" shape="rect"></a>3.2.4.3 Schema-Validity Assessment (Attribute)</h5><p>
       Schema-validity assessment of an attribute information item
       involves identifying its <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and checking its
       local validity against the declaration.  If the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
       is not present in the schema, then assessment is necessarily
       incomplete.
      </p><div class="constraintnote"><a id="cvc-assess-attr" name="cvc-assess-attr" shape="rect"></a><b>Validation Rule: Schema-Validity Assessment (Attribute)</b><br clear="none" /><div class="constraint"><div class="p">The schema-validity assessment of an attribute information item depends
        on its local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> alone.</div><div class="p">For an attribute information item's schema-validity to have been assessed
        <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-caa-ad" name="c-caa-ad" shape="rect"> </a><span class="p">A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
 attribute declaration
           is known for it, namely its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
            declaration.
           
          </span></div>
<div class="clnumber">2 <span class="p">Its local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> with respect to that
           declaration 
           has 
           been evaluated as per <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a>.</span></div>
<div class="clnumber">3 <span class="p">Both clause <a href="#c-a1" shape="rect">1</a> and clause <a href="#c-a2" shape="rect">2</a> of <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a> are satisfied.</span></div>
</div>
       </div></div></div><p><span class="termdef"><a name="key-svaa" id="key-svaa" title="" shape="rect">[Definition:]&#160;&#160;</a>For
	attribute information items, 
	there is no difference between assessment and strict
	assessment, so  
	the attribute information item has
	been <b>strictly assessed</b></span>
	if and only if its schema-validity has been assessed.</p></div></div><div class="div3">
<h4><a name="psvi_ad" id="psvi_ad" shape="rect"></a>3.2.5 Attribute Declaration Information Set Contributions</h4><div class="div4">
<h5><a name="sec-sic-a-outcome" id="sec-sic-a-outcome" shape="rect"></a>3.2.5.1 Assessment Outcome (Attribute)</h5><div class="constraintnote"><a id="sic-a-outcome" name="sic-a-outcome" shape="rect"></a><b>Schema Information Set Contribution: Assessment Outcome (Attribute)</b><br clear="none" /><div class="constraint"><div class="p">If the schema-validity of an attribute information item has been assessed
       as per <a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute) (&#167;3.2.4.3)</a>, then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> it 
       has properties as follows:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-validation_context" name="a-validation_context" shape="rect"><span class="propdef">[validation context]</span></a></dt><dd>The nearest ancestor element
        information item with a <a href="#e-schema_information" class="propref" shape="rect">[schema information]</a>
        property.</dd><dt><a id="a-validity" name="a-validity" shape="rect"><span class="propdef">[validity]</span></a></dt><dd>
        The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>it was <a href="#key-svaa" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>, <b>then </b>
           the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>it was locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
              as defined by <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a>, <b>then </b><b><i>valid</i></b>;</div><div class="clnumber">1.2 <b>otherwise </b><b><i>invalid</i></b>.</div></div> 
          </div><div class="clnumber">2 <b>otherwise </b><b><i>notKnown</i></b>.</div></div>
       </dd><dt><a id="a-validation_attempted" name="a-validation_attempted" shape="rect"><span class="propdef">[validation attempted]</span></a></dt><dd>
        The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>it was <a href="#key-svaa" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>, <b>then </b><b><i>full</i></b>;</div><div class="clnumber">2 <b>otherwise </b><b><i>none</i></b>.</div></div></dd><dt><a id="a-schema_specified" name="a-schema_specified" shape="rect"><span class="propdef">[schema specified]</span></a></dt><dd><b><i>infoset</i></b>.  See <a href="#sic-attrDefault" shape="rect">Attribute Default Value (&#167;3.4.5.1)</a> for the other possible value.</dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-attr-error-code" id="sec-sic-attr-error-code" shape="rect"></a>3.2.5.2 Validation Failure (Attribute)</h5><div class="constraintnote"><a id="sic-attr-error-code" name="sic-attr-error-code" shape="rect"></a><b>Schema Information Set Contribution: Validation Failure (Attribute)</b><br clear="none" /><div class="constraint"><div class="p">If and only if the local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a>, as defined 
by <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a>
above, of an attribute information item has been assessed,
then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the item 
has a property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-schema_error_code" name="a-schema_error_code" shape="rect"><span class="propdef">[schema error code]</span></a></dt><dd>
       The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the item is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>invalid<span class="arrow">&#183;</span></a>, <b>then </b>a list.  Applications wishing to provide
information as to the reason(s) for the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> failure are encouraged to record one or more
error codes (see <a href="#outcomes" shape="rect">Outcome Tabulations (normative) (&#167;B)</a>) herein.</div><div class="clnumber">2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div>
      </dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-attr-decl" id="sec-sic-attr-decl" shape="rect"></a>3.2.5.3 Attribute Declaration</h5><div class="constraintnote"><a id="sic-attr-decl" name="sic-attr-decl" shape="rect"></a><b>Schema Information Set Contribution: Attribute Declaration</b><br clear="none" /><div class="constraint"><div class="p">If and only if a <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
declaration is known for an attribute information 
item 
then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the attribute information item
has a
property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-declaration" name="a-declaration" shape="rect"><span class="propdef">[attribute declaration]</span></a></dt><dd>
       An <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to the 
<a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration component itself.
      </dd><dt><a id="a-schema_default" name="a-schema_default" shape="rect"><span class="propdef">[schema default]</span></a></dt><dd>
       If the attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
       <a href="#au" class="compref" shape="rect">Attribute Use</a> then the <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a>
       of the <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>,
       otherwise the <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a> of the
       declaration's <a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>.
      </dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-attrType" id="sec-sic-attrType" shape="rect"></a>3.2.5.4 Attribute Validated by Type</h5><div class="constraintnote"><a id="sic-attrType" name="sic-attrType" shape="rect"></a><b>Schema Information Set Contribution: Attribute Validated by Type</b><br clear="none" /><div class="constraint"><div class="p">If and
only if a
<a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>  is known for
an attribute information
item, 
then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the
attribute information item
has the
properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-schema_normalized_value" name="a-schema_normalized_value" shape="rect"><span class="propdef">[schema normalized value]</span></a></dt><dd>

If the 
attribute's <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> is
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to 
the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>,
then the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> 

as <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>, otherwise
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</dd><dt><a id="a-schema_actual_value" name="a-schema_actual_value" shape="rect"><span class="propdef">[schema actual value]</span></a></dt><dd>

If the
<a href="#a-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> is not
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then the corresponding
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>; otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</dd><dt><a id="a-type_definition" name="a-type_definition" shape="rect"><span class="propdef">[type definition]</span></a></dt><dd>An <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
the  <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
component.</dd><dt><a id="a-type_definition_type" name="a-type_definition_type" shape="rect"><span class="propdef">[type definition type]</span></a></dt><dd> <b><i>simple</i></b>.</dd><dt><a id="a-type_definition_namespace" name="a-type_definition_namespace" shape="rect"><span class="propdef">[type definition namespace]</span></a></dt><dd>The <a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a> of the <a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type
definition<span class="arrow">&#183;</span></a>.</dd><dt><a id="a-type_definition_anonymous" name="a-type_definition_anonymous" shape="rect"><span class="propdef">[type definition anonymous]</span></a></dt><dd><b><i>true</i></b>
if the 
<a href="#std-name" class="propref" shape="rect">{name}</a> 
of the <a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type
definition<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>,
otherwise <b><i>false</i></b>.</dd><dt><a id="a-type_definition_name" name="a-type_definition_name" shape="rect"><span class="propdef">[type definition name]</span></a></dt><dd>The <a href="#std-name" class="propref" shape="rect">{name}</a> 
of the
<a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a>, if the
<a href="#std-name" class="propref" shape="rect">{name}</a> 
is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.  If the
<a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a>'s
<a href="#std-name" class="propref" shape="rect">{name}</a> property is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then
schema processors <span class="rfc2119">may</span>, but need
not, provide a value
which uniquely identifies this
type definition among those with the same target namespace.

It is
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor provides a name
for such a type definition.  If a processor does provide a value in this
situation, the choice of what value to use is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</dd></dl>
</div>
</div>
<div class="note"><div class="p"><b>Note:</b> The
<span class="anonRef">[type definition type]</span>,
<span class="anonRef">[type definition namespace]</span>,
<span class="anonRef">[type definition name]</span>, and
<span class="anonRef">[type definition anonymous]</span> properties
are redundant with the 
<span class="anonRef">[type definition]</span> property; 
they are defined for the convenience of implementations
which wish to expose those specific properties 
but not the entire type definition.
</div></div><div class="p"><a name="anchor10662c" id="anchor10662c" shape="rect"></a>If 
the attribute's
<a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to 
the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>
as defined by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a> and
the 
<a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> 
has <a href="#std-variety" class="propref" shape="rect">{variety}</a>

<b><i>union</i></b>, then  there are four additional properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-member_type_definition" name="a-member_type_definition" shape="rect"><span class="propdef">[member type definition]</span></a></dt><dd>
an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to 
the 
<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the
<a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>.
</dd><dt><a id="a-member_type_definition_namespace" name="a-member_type_definition_namespace" shape="rect"><span class="propdef">[member type definition namespace]</span></a></dt><dd>The <a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>.</dd><dt><a id="a-member_type_definition_anonymous" name="a-member_type_definition_anonymous" shape="rect"><span class="propdef">[member type definition anonymous]</span></a></dt><dd><b><i>true</i></b> if the <a href="#std-name" class="propref" shape="rect">{name}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>,
otherwise <b><i>false</i></b>.</dd><dt><a id="a-member_type_definition_name" name="a-member_type_definition_name" shape="rect"><span class="propdef">[member type definition name]</span></a></dt><dd>The <a href="#std-name" class="propref" shape="rect">{name}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>, if it is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.  If it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, schema processors <span class="rfc2119">may</span>, but need
not, provide a value unique to the definition.
It is
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor provides a name
for such a type definition.  If a processor does provide a value in this
situation, the choice of what value to use is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
</dd></dl>
</div>
</div>
<div class="p">The first (<a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a>)
alternative 
above is provided for applications such as query
processors which need access to the full range of details about an
item's <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, for example the
type hierarchy; the second, for lighter-weight processors for whom
representing the significant parts of the type hierarchy as
information items might be a significant burden.</div><div class="p">
 If
 <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
    the attribute's <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the
    <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a>;
  </span></div>
<div class="clnumber">2 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
    the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> has <a href="#std-variety" class="propref" shape="rect">{variety}</a> =
    <b><i>list</i></b>;
   </span></div>
<div class="clnumber">2.2 <span class="p">
    the <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> has <a href="#std-variety" class="propref" shape="rect">{variety}</a> =
    <b><i>union</i></b> and the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the
    <a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> has
    <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>;
   </span></div>
</div></div>
<div class="clnumber">3 <span class="p">
   the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of the list type
   (from the previous clause) has <a href="#std-variety" class="propref" shape="rect">{variety}</a> =
   <b><i>union</i></b>;
  </span></div>
</div>
 then there is an additional property:
</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-member_type_definitions" name="a-member_type_definitions" shape="rect"><span class="propdef">[member type definitions]</span></a></dt><dd>
  a sequence of <a href="#std" class="compref" shape="rect">Simple Type Definition</a> components, with the same length as the
  <a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>, each one an
  <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to the
  <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the corresponding
  
  item in the <a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>.
 </dd></dl>
</div>
</div>
</div></div><p>See also
<a href="#sic-attrDefault" shape="rect">Attribute Default Value (&#167;3.4.5.1)</a>,
<a href="#sic-match-info" shape="rect">Match Information (&#167;3.4.5.2)</a> and <a href="#sic-schema" shape="rect">Schema Information (&#167;3.17.5.1)</a>,
 which describe
other information set contributions related to attribute information items.
</p></div></div><div class="div3">
<h4><a name="coss-attribute" id="coss-attribute" shape="rect"></a>3.2.6 Constraints on Attribute Declaration Schema Components</h4><p>All attribute declarations (see <a href="#cAttribute_Declarations" shape="rect">Attribute Declarations (&#167;3.2)</a>) <span class="rfc2119">must</span> satisfy the following constraints.</p><div class="div4">
<h5><a name="sec-a-props-correct" id="sec-a-props-correct" shape="rect"></a>3.2.6.1 Attribute Declaration Properties Correct</h5><div class="constraintnote"><a id="a-props-correct" name="a-props-correct" shape="rect"></a><b>Schema Component Constraint: Attribute Declaration Properties Correct</b><br clear="none" /><div class="constraint"><div class="p">
       <b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of an attribute declaration are as described in
	  the property tableau in <a href="#Attribute_Declaration_details" shape="rect">The Attribute Declaration Schema Component (&#167;3.2.1)</a>, modulo the impact 
	  of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">if there is a <a href="#ad-value_constraint" class="propref" shape="rect">{value      constraint}</a>, then
	   it is a valid default with respect
	    to the <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> as
	    defined in <a href="#cos-valid-simple-default" shape="rect">Simple Default Valid (&#167;3.2.6.2)</a>.
	 </span></div>
</div>
	
       </div></div></div><div class="note"><div class="p"><b>Note:</b> The use of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a> and related
	types together with value constraints goes beyond what is possible with 
	XML DTDs, and <span class="rfc2119">should</span> be avoided if compatibility with DTDs is desired.</div></div></div><div class="div4">
<h5><a name="sec-cos-valid-simple-default" id="sec-cos-valid-simple-default" shape="rect"></a>3.2.6.2 Simple Default Valid</h5><div class="constraintnote"><a id="cos-valid-simple-default" name="cos-valid-simple-default" shape="rect"></a><b>Schema Component Constraint: Simple Default Valid</b><br clear="none" /><div class="constraint"><div class="p">For a 
	Value Constraint <var>V</var>
	to be
	a valid default with respect to a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
	<var>T</var>
	
	<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>V</var>.<a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical      form}</a> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
	   respect to <var>T</var> 
	   as defined by 
	   <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-datatype-valid" shape="rect">Datatype
	     Valid</a> in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</span></div>
<div class="clnumber">2 <span class="p"><var>V</var>.<a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a>
	   maps to <var>V</var>.<a href="#vc_a-value" class="propref" shape="rect">{value}</a> 
	   in the 
	   value space of <var>T</var>.</span></div>
</div>
       </div></div></div></div><div class="div4">
<h5><a name="sec-no-xmlns" id="sec-no-xmlns" shape="rect"></a>3.2.6.3 <code>xmlns</code> Not Allowed</h5><div class="constraintnote"><a id="no-xmlns" name="no-xmlns" shape="rect"></a><b>Schema Component Constraint: <code>xmlns</code> Not Allowed</b><br clear="none" /><div class="constraint"><div class="p">The <a href="#ad-name" class="propref" shape="rect">{name}</a> of an attribute declaration <span class="rfc2119">must not</span> match <code>xmlns</code>.</div><div class="note"><div class="p"><b>Note:</b> The <a href="#ad-name" class="propref" shape="rect">{name}</a> of an attribute is an <a href="#gloss-NCName" class="termref" shape="rect"><span class="arrow">&#183;</span>NCName<span class="arrow">&#183;</span></a>, which implicitly
	 prohibits attribute declarations of the form <code>xmlns:*</code>.</div></div></div></div></div><div class="div4">
<h5><a name="sec-no-xsi" id="sec-no-xsi" shape="rect"></a>3.2.6.4 <code>xsi:</code> Not Allowed</h5><div class="constraintnote"><a id="no-xsi" name="no-xsi" shape="rect"></a><b>Schema Component Constraint: <code>xsi:</code> Not Allowed</b><br clear="none" /><div class="constraint"><div class="p">The <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> of an attribute declaration,
	whether local or top-level, <span class="rfc2119">must not</span> match <code>http://www.w3.org/2001/XMLSchema-instance</code>
	(unless it is one of the four built-in declarations given in the next section).</div><div class="note"><div class="p"><b>Note:</b> This reinforces the special status of these attributes, so that they not
	 only <em>need</em> not be declared to be allowed in instances, but
	 in consequence of the rule just given
	 <span class="rfc2119">must not</span> be declared.
	 </div></div><div class="note"><div class="p"><b>Note:</b> It is legal for <a href="#au" class="compref" shape="rect">Attribute Use</a>s that
	 refer to <code>xsi:</code> attributes to specify default or fixed value
	 constraints (e.g. in a component corresponding to a schema document construct
	 of the form <code>&lt;xs:attribute ref="xsi:type" default="xs:integer"/&gt;</code>),
	 but the practice is not recommended; including such attribute uses will tend
	 to mislead readers of the schema document, because the attribute uses would
	 have no effect; see <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> and
	 <a href="#sic-attrDefault" shape="rect">Attribute Default Value (&#167;3.4.5.1)</a> for details.</div></div></div></div></div></div><div class="div3">
<h4><a name="builtin-ads" id="builtin-ads" shape="rect"></a>3.2.7 Built-in Attribute Declarations</h4><p>There are four attribute declarations present in every
schema by definition:</p><div class="div4">
<h5><a name="sec-sc-xsi.type" id="sec-sc-xsi.type" shape="rect"></a>3.2.7.1 <code>xsi:type</code></h5><p>The <code>xsi:type</code> attribute
       is used to signal use of a type other than the declared type of 
       an element.  See <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a>.
      </p><div class="scInstance"><div class="scHead"><a id="xsi.type" name="xsi.type" shape="rect">Attribute Declaration for the 'type' attribute</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><code>type</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="pvVal">The built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> simple
type definition</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="pvVal">A <a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
       <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
      </div></div><div class="pvpair"><div class="pvProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>
       
       the empty sequence
      <span class="arrow">&#183;</span></a></div></div></div></div></div><div class="div4">
<h5><a name="sec-sc-xsi.nil" id="sec-sc-xsi.nil" shape="rect"></a>3.2.7.2 <code>xsi:nil</code></h5><p>The <code>xsi:nil</code> attribute
       is used to signal that an element's content is "nil"
       (or "null"). See <a href="#xsi_nil" shape="rect">xsi:nil (&#167;2.7.2)</a>.
      </p><div class="scInstance"><div class="scHead"><a id="xsi.nil" name="xsi.nil" shape="rect">Attribute Declaration for the 'nil' attribute</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><code>nil</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="pvVal">The built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a> simple
type definition</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="pvVal">A <a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
       <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
      </div></div><div class="pvpair"><div class="pvProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>
       
       the empty sequence
      <span class="arrow">&#183;</span></a></div></div></div></div></div><div class="div4">
<h5><a name="sec-sc-xsi.schemaLocation" id="sec-sc-xsi.schemaLocation" shape="rect"></a>3.2.7.3 <code>xsi:schemaLocation</code></h5><p>The <code>xsi:schemaLocation</code> attribute
       is used to signal possible locations of relevant schema documents.
       See <a href="#xsi_schemaLocation" shape="rect">xsi:schemaLocation, xsi:noNamespaceSchemaLocation (&#167;2.7.3)</a>.
      </p><div class="scInstance"><div class="scHead"><a id="xsi.schemaLocation" name="xsi.schemaLocation" shape="rect">Attribute Declaration for the 'schemaLocation' attribute</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><code>schemaLocation</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="pvVal">An anonymous simple type definition, as follows:
       <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal">The built in <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>list</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal">The built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> simple
type definition</div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>
         
         the empty sequence
        <span class="arrow">&#183;</span></a></div></div></div>
      </div></div><div class="pvpair"><div class="pvProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="pvVal">A <a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
       <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
      </div></div><div class="pvpair"><div class="pvProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>
       
       the empty sequence
      <span class="arrow">&#183;</span></a></div></div></div></div></div><div class="div4">
<h5><a name="sec-sc-xsi.noNamespaceSchemaLocation" id="sec-sc-xsi.noNamespaceSchemaLocation" shape="rect"></a>3.2.7.4 <code>xsi:noNamespaceSchemaLocation</code></h5><p>The <code>xsi:noNamespaceSchemaLocation</code> attribute
       is used to signal possible locations of relevant schema documents.
       See <a href="#xsi_schemaLocation" shape="rect">xsi:schemaLocation, xsi:noNamespaceSchemaLocation (&#167;2.7.3)</a>.
      </p><div class="scInstance"><div class="scHead"><a id="xsi.noNamespaceSchemaLocation" name="xsi.noNamespaceSchemaLocation" shape="rect">Attribute Declaration for the 'noNamespaceSchemaLocation' attribute</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><code>noNamespaceSchemaLocation</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal"><code>http://www.w3.org/2001/XMLSchema-instance</code></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="pvVal">The built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> simple
type definition</div></div><div class="pvpair"><div class="pvProp"><a href="#ad-scope" class="propref" shape="rect">{scope}</a></div><div class="pvVal">A <a href="#sc_a" class="compref" shape="rect">Scope</a> as follows:
       <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_a-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div> 
      </div></div><div class="pvpair"><div class="pvProp"><a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ad-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>
       
       the empty sequence
      <span class="arrow">&#183;</span></a></div></div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cAttribute_Declarations" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Complex_Type_Definitions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cElement_Declarations" id="cElement_Declarations" shape="rect"></a>3.3 Element Declarations</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.1 <a href="#Element_Declaration_details" shape="rect">The Element Declaration Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2 <a href="#declare-element" shape="rect">XML Representation of Element Declaration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.1 <a href="#dcl.elt.common" shape="rect">Common Mapping Rules for Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.2 <a href="#dcl.elt.global" shape="rect">Mapping Rules for Top-Level Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.3 <a href="#dcl.elt.local" shape="rect">Mapping Rules for Local Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.4 <a href="#ref.elt.global" shape="rect">References to Top-Level Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.5 <a href="#dcl.elt.exx" shape="rect">Examples of Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.3 <a href="#sec-src-element" shape="rect">Constraints on XML Representations of Element Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4 <a href="#eldec_vr" shape="rect">Element Declaration Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.1 <a href="#sec-sistd" shape="rect">Selected and Instance-specified Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.2 <a href="#sec-type-override" shape="rect">Type Override and Valid Substitutability</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.3 <a href="#sec-cvc-elt" shape="rect">Element Locally Valid (Element)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.4 <a href="#sec-cvc-type" shape="rect">Element Locally Valid (Type)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.5 <a href="#sec-cvc-id" shape="rect">Validation Root Valid (ID/IDREF)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.6 <a href="#sec-cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5 <a href="#edisc" shape="rect">Element Declaration Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.1 <a href="#sec-sic-e-outcome" shape="rect">Assessment Outcome (Element)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.2 <a href="#sec-sic-elt-error-code" shape="rect">Validation Failure (Element)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.3 <a href="#sec-sic-elt-decl" shape="rect">Element Declaration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.4 <a href="#sec-sic-eltType" shape="rect">Element Validated by Type</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.5 <a href="#sec-sic-eltDefault" shape="rect">Element Default Value</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.6 <a href="#Inherited_attributes" shape="rect">Inherited Attributes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6 <a href="#coss-element" shape="rect">Constraints on Element Declaration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.1 <a href="#sec-e-props-correct" shape="rect">Element Declaration Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.2 <a href="#sec-cos-valid-default" shape="rect">Element Default Valid (Immediate)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.3 <a href="#sec-cos-equiv-derived-ok-rec" shape="rect">Substitution Group OK (Transitive)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.4 <a href="#sec-cos-equiv-class" shape="rect">Substitution Group</a><br clear="none" />
</div><p>Element declarations provide for:</p><ul><li><div class="p">Local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of element information item values using a type definition;</div></li><li><div class="p">Specifying default or fixed values for  element information items;</div></li><li><div class="p">Establishing uniquenesses and reference constraint relationships among the values of related elements and
attributes;</div></li><li><div class="p">Controlling the substitutability of elements through the
mechanism of <a href="#key-equivalenceClass" class="termref" shape="rect"><span class="arrow">&#183;</span>element substitution groups<span class="arrow">&#183;</span></a>.</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:element name="PurchaseOrder" type="PurchaseOrderType"/&gt;

&lt;xs:element name="gift"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="birthday" type="xs:date"/&gt;
   &lt;xs:element ref="PurchaseOrder"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;
</pre></div><div class="exampleWrapper">
<div class="p">XML representations of several different types of element declaration</div></div></div><div class="div3">
<h4><a name="Element_Declaration_details" id="Element_Declaration_details" shape="rect"></a>3.3.1 The Element Declaration Schema Component</h4><p>The element declaration schema component has the following
      properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ed" id="ed" shape="rect">Element Declaration</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ed-annotations" shape="rect" id="ed-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="ed-name" shape="rect" id="ed-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value.  Required.</div>
</div>
<div class="propDefn"><a name="ed-target_namespace" shape="rect" id="ed-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value.  Optional.</div>
</div>
<div class="propDefn"><a name="ed-type_definition" shape="rect" id="ed-type_definition"></a><div class="pdName"><span class="propdef">{type definition}</span></div>
<div class="pdDef">
A  <a href="#td" class="compref" shape="rect">Type Definition</a> component.  Required.</div>
</div>
<div class="propDefn"><a name="ed-type_table" shape="rect" id="ed-type_table"></a><div class="pdName"><span class="propdef">{type table}</span></div>
<div class="pdDef">
A  <a href="#tt" class="compref" shape="rect">Type Table</a> property record.  Optional.</div>
</div>
<div class="propDefn"><a name="ed-scope" shape="rect" id="ed-scope"></a><div class="pdName"><span class="propdef">{scope}</span></div>
<div class="pdDef">
A  <a href="#sc_e" class="compref" shape="rect">Scope</a> property record.  Required.</div>
</div>
<div class="propDefn"><a name="ed-value_constraint" shape="rect" id="ed-value_constraint"></a><div class="pdName"><span class="propdef">{value constraint}</span></div>
<div class="pdDef">
A  <a href="#vc_e" class="compref" shape="rect">Value Constraint</a> property record.  Optional.</div>
</div>
<div class="propDefn"><a name="ed-nillable" shape="rect" id="ed-nillable"></a><div class="pdName"><span class="propdef">{nillable}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
<div class="propDefn"><a name="ed-identity-constraint_definitions" shape="rect" id="ed-identity-constraint_definitions"></a><div class="pdName"><span class="propdef">{identity-constraint definitions}</span></div>
<div class="pdDef">
A set of  <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a> components.  </div>
</div>
<div class="propDefn"><a name="ed-substitution_group_affiliations" shape="rect" id="ed-substitution_group_affiliations"></a><div class="pdName"><span class="propdef">{substitution group affiliations}</span></div>
<div class="pdDef">
A set of  <a href="#ed" class="compref" shape="rect">Element Declaration</a> components.  </div>
</div>
<div class="propDefn"><a name="ed-substitution_group_exclusions" shape="rect" id="ed-substitution_group_exclusions"></a><div class="pdName"><span class="propdef">{substitution group exclusions}</span></div>
<div class="pdDef">
A subset of {<span class="enumval">extension</span>, <span class="enumval">restriction</span>}.</div>
</div>
<div class="propDefn"><a name="ed-disallowed_substitutions" shape="rect" id="ed-disallowed_substitutions"></a><div class="pdName"><span class="propdef">{disallowed substitutions}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>
    A subset of {<em>substitution</em>, <em>extension</em>, <em>restriction</em>}.
   </p></div>
</div>
</div>
<div class="propDefn"><a name="ed-abstract" shape="rect" id="ed-abstract"></a><div class="pdName"><span class="propdef">{abstract}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="tt" id="tt" shape="rect">Type Table</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="tt-alternatives" shape="rect" id="tt-alternatives"></a><div class="pdName"><span class="propdef">{alternatives}</span></div>
<div class="pdDef">
A sequence of  <a href="#tac" class="compref" shape="rect">Type Alternative</a> components.  </div>
</div>
<div class="propDefn"><a name="tt-default_type_definition" shape="rect" id="tt-default_type_definition"></a><div class="pdName"><span class="propdef">{default type definition}</span></div>
<div class="pdDef">
A  <a href="#tac" class="compref" shape="rect">Type Alternative</a> component.  Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="sc_e" id="sc_e" shape="rect">Scope</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="sc_e-variety" shape="rect" id="sc_e-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">global</span>, <span class="enumval">local</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="sc_e-parent" shape="rect" id="sc_e-parent"></a><div class="pdName"><span class="propdef">{parent}</span></div>
<div class="pdDef">
Either a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> or a <a href="#mgd" class="compref" shape="rect">Model Group Definition</a>. Required if <a href="#sc_e-variety" class="propref" shape="rect">{variety}</a> is <b><i>local</i></b>,
    otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="vc_e" id="vc_e" shape="rect">Value Constraint</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="vc_e-variety" shape="rect" id="vc_e-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">default</span>, <span class="enumval">fixed</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="vc_e-value" shape="rect" id="vc_e-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">

    An <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>.  Required.
   </div>
</div>
<div class="propDefn"><a name="vc_e-lexical_form" shape="rect" id="vc_e-lexical_form"></a><div class="pdName"><span class="propdef">{lexical form}</span></div>
<div class="pdDef">

    A character string.  Required.
    
   </div>
</div>
</div></div>
</div>
</div>
<p>The <a href="#ed-name" class="propref" shape="rect">{name}</a> property <span class="rfc2119">must</span> match the
      local part of the names of element information items being
      <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>.</p><p>
      For an element declaration <var>E</var>, if <var>E</var>.<a href="#ed-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_e-variety" class="propref" shape="rect">{variety}</a>
      = <b><i>global</i></b>, then <var>E</var> is available for use throughout the schema.
      If <var>E</var>.<a href="#ed-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_e-variety" class="propref" shape="rect">{variety}</a>
      = <b><i>local</i></b>, then <var>E</var> is available for use only within (the
      <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> or <a href="#mgd" class="compref" shape="rect">Model Group Definition</a>)
      <var>E</var>.<a href="#ed-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_e-parent" class="propref" shape="rect">{parent}</a>.
     </p><p>A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
 value of the <a href="#ed-target_namespace" class="propref" shape="rect">{target        namespace}</a> property provides for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of namespace-qualified
      element information items.  <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>Absent<span class="arrow">&#183;</span></a> values of
      <a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> unqualified items.</p><p>An element information item is normally
       required to satisfy the <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.  For such an
      item, schema information set
      contributions appropriate to the <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> are added to the
      corresponding element information
      item in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.  The type
       definition against which an element information item is
       validated (its
	<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>) can be different from the
       declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>. The <a href="#ed-type_table" class="propref" shape="rect">{type table}</a> property of an <a href="#ed" class="compref" shape="rect">Element Declaration</a>, which governs conditional type assignment, and
	the <code>xsi:type</code> attribute of an element information item
       (see <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a>) can cause the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> and the
	declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> to be different. 
     </p><p>If <a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> is <b><i>true</i></b>, then
      an element with no text or element
       content can  be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> 
       despite a 
      <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>
      which would otherwise require
      content, if it carries the
       attribute <code>xsi:nil</code> with the value
       <code>true</code> (see <a href="#xsi_nil" shape="rect">xsi:nil (&#167;2.7.2)</a>).
      Formal details of element <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> are described in
      <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>.</p><div class="p">
      <div class="termdef"><a name="key-nilled" id="key-nilled" title="" shape="rect">[Definition:]&#160;&#160;</a>An
       element information item <var>E</var> is <b>nilled</b> 
       with respect to some element declaration <var>D</var> if and only if 
       <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> has 
	   <code>xsi:nil</code> = <b><i>true</i></b>. </span></div>
<div class="clnumber">2 <span class="p"><var>D</var>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> = <b><i>true</i></b>. </span></div>
</div>
      </div>
      If <var>E</var> is said to be <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> without the
      identity of <var>D</var> being clear from the context, then <var>D</var> is assumed to
      be <var>E</var>'s <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>.
     </div><p><a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> establishes a
      default or fixed value for an element.  If a <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> 
       with 
       <a href="#vc_e-variety" class="propref" shape="rect">{variety}</a> =
      <b><i>default</i></b> is present, and if the element being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> is 
      empty, then  for
	purposes of calculating the <a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a>
	and other contributions to the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the element is
       treated as if  
       <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a>
       was
       used as the content of the element. If <b><i>fixed</i></b>
      is specified, then the element's content <span class="rfc2119">must</span> either be empty,
      in which case <b><i>fixed</i></b> behaves as <b><i>default</i></b>, or its
      value <span class="rfc2119">must</span> be equal or identical to 
       
      <a href="#ed-value_constraint" class="propref" shape="rect">{value  constraint}</a>.<a href="#vc_e-value" class="propref" shape="rect">{value}</a>.</p><div class="note"><div class="p"><b>Note:</b> When a default value is supplied and used, as described in
       the second sentence of the preceding paragraph, the default
       value is used to calculate the
       <a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a>, etc.,
       but the actual content of the element is not changed: the
       element contained no character information items in the input 
       information set, and it contains none in the PSVI.</div></div><div class="note"><div class="p"><b>Note:</b> The provision of defaults for elements goes beyond what is
       possible in XML DTDs,
       and does not exactly correspond to defaults for attributes.  In
	particular, an element with a non-empty <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> whose simple type definition includes the empty
       string in its lexical space will nonetheless never receive that
	value, because the <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> will override it.</div></div><p><a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a> express
      constraints establishing uniquenesses and reference
      relationships among the values of related elements and
      attributes.  See <a href="#cIdentity-constraint_Definitions" shape="rect">Identity-constraint Definitions (&#167;3.11)</a>.</p><p>The 
      <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> property of an element declaration indicates
      which <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution groups<span class="arrow">&#183;</span></a>, if any, it can potentially be a member of. 
      Potential membership is transitive but not
      symmetric; an element declaration is a potential member of any
      group named in its <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a>, and 
       also of any group of which any entry
       in its <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> is a potential member. Actual
      membership <span class="rfc2119">may</span> be blocked by the effects of <a href="#ed-substitution_group_exclusions" class="propref" shape="rect">{substitution        group exclusions}</a> or <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed        substitutions}</a>, see below.</p><p>An empty <a href="#ed-substitution_group_exclusions" class="propref" shape="rect">{substitution group        exclusions}</a> allows a declaration to be named in the <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> of other
      element declarations having the same declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> or
      some type <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> therefrom.  
      The explicit values of <a href="#ed-substitution_group_exclusions" class="propref" shape="rect">{substitution group exclusions}</a>,
      <b><i>extension</i></b> or <b><i>restriction</i></b>,
      rule out element declarations having 
      types whose
       derivation from <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> involves any
       <b><i>extension</i></b> steps, or <b><i>restriction</i></b> steps,
       respectively.

      </p><p>The supplied values for <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed        substitutions}</a> determine whether an element declaration
      appearing in a <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content
       model<span class="arrow">&#183;</span></a> will be prevented from additionally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validating<span class="arrow">&#183;</span></a> elements (a) with an
      <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a> that identifies an <b><i>extension</i></b>
      or <b><i>restriction</i></b> of the type of the declared element,
      and/or (b) from <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validating<span class="arrow">&#183;</span></a>
      elements which are in the <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a> headed by the declared
      element. If <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a>
      is empty, then
      all <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> types and <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a> members are allowed.</p><p>Element declarations for which <a href="#ed-abstract" class="propref" shape="rect">{abstract}</a> is <b><i>true</i></b> can appear in content models
      only when substitution is allowed; such declarations <span class="rfc2119">must not</span> themselves ever be used to
      <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> element content.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role
      of the 
      <a href="#ed-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-element" id="declare-element" shape="rect"></a>3.3.2 XML Representation of Element Declaration Schema Components</h4><p>The XML representation for an element declaration schema
      component is an <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information
      item.  It specifies a type definition for an element either by
      reference or explicitly, and <span class="rfc2119">may</span> provide occurrence and
      default information.  The correspondences between the properties
      of the information item 
      after the appropriate
      <a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
      and the
      properties of the component(s) it
      corresponds to are given in this section.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>element</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-element" name="element-element" shape="rect">&lt;element</a><br clear="none" />&#160;&#160;abstract = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;block = 
  
  (<var>#all</var> | List of (<var>extension</var> | <var>restriction</var> | <var>substitution</var>))
 <br clear="none" />&#160;&#160;default = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a><br clear="none" />&#160;&#160;final = 
  
  (<var>#all</var> | List of (<var>extension</var> | <var>restriction</var>))
 <br clear="none" />&#160;&#160;fixed = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a><br clear="none" />&#160;&#160;form = (<var>qualified</var> | <var>unqualified</var>)<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs = 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a> | <var>unbounded</var>)
 &#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a>&#160;:&#160;1<br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;nillable = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;substitutionGroup = List of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;targetNamespace = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;type = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, ((<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a> | <a href="#element-complexType" class="eltref" shape="rect">complexType</a>)?, <a href="#element-alternative" class="eltref" shape="rect">alternative</a>*, (<a href="#element-unique" class="eltref" shape="rect">unique</a> | <a href="#element-key" class="eltref" shape="rect">key</a> | <a href="#element-keyref" class="eltref" shape="rect">keyref</a>)*))<br clear="none" />&lt;/element&gt;</p></div></div><p>An
<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element
information item in a schema document 
maps to an 
element declaration and allows the
type definition of that declaration to be specified either by
reference or by explicit inclusion.</p><p>Top-level <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>
elements  
(i.e. those which appear within
the schema document as children of 
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> 
elements) 
produce
<b><i>global</i></b> element declarations; <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>s within <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> or <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> produce either particles which contain <b><i>global</i></b> element declarations (if there's a <code>ref</code> attribute) or local declarations (otherwise).  For complete declarations, top-level or local, the <code>type</code> attribute is used when the declaration can use a
built-in or 
user-defined global type definition.  Otherwise an
anonymous <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> or <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> is provided inline.</p><div class="note"><div class="p"><b>Note:</b> 
	 Children of <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> are not strictly speaking top-level
	 declarations, but they will become top-level declarations if they
	 override corresponding declarations in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a>
	 of their parent. See <a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a> for details.
       </div></div><p>Element information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by a top-level 
declaration <span class="rfc2119">must</span> be qualified with the
<a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a> of that 
declaration.
If the 
<a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>,
the item <span class="rfc2119">must</span> be unqualified.
Control over whether element information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by a local declaration <span class="rfc2119">must</span> be similarly qualified or not
is provided by the <code>form</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, whose default is provided
by the <code>elementFormDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> on the enclosing <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, via its determination of <a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a>.</p><p>
The names for top-level element declarations are in a separate
<a href="#key-symbolSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>symbol space<span class="arrow">&#183;</span></a> from the symbol spaces for
the names of type definitions, so there can (but need
not be) a simple or complex type definition with the same name as a
top-level element.  The names of locally-scoped
element declarations need not be unique and thus 
reside in no symbol space at all (but the element declarations are
constrained by <a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a>).</p><p>Note that the above allows for two levels of defaulting for unspecified
type definitions.  An <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> with no referenced or included type definition will
correspond to an element declaration which has






the 
same type definition as the first 
substitution-group head named in the
<code>substitutionGroup</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present,

otherwise <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.  
This has the important consequence that the minimum valid element declaration, 
that is, one with only a <code>name</code> attribute and no contents, 
is also (nearly) the most general, validating any combination of text and 
element content and allowing any attributes, and providing for recursive 
validation where possible.</p><p>See 
  <a href="#declare-key" shape="rect">XML Representation of Identity-constraint Definition Schema Components (&#167;3.11.2)</a> for <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>, <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> and <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a>.</p><div class="block">The following sections specify several
      sets of XML mapping rules which apply in different circumstances.
      <ul><li><div class="p">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has
	 <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> as its parent, it maps to 
	 an <a href="#ed" class="compref" shape="rect">Element Declaration</a> using the mappings described in 
	 <a href="#dcl.elt.common" shape="rect">Common Mapping Rules for Element Declarations (&#167;3.3.2.1)</a> and
	 <a href="#dcl.elt.global" shape="rect">Mapping Rules for Top-Level Element Declarations (&#167;3.3.2.2)</a>.
	</div></li><li><div class="p">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information
	 item has
	 <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> as an ancestor,
	 and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is absent, 
	 and it does not have <code>minOccurs=maxOccurs=0</code>,
	 then it maps both to a <a href="#p" class="compref" shape="rect">Particle</a>, as described
	 in <a href="#dcl.elt.local" shape="rect">Mapping Rules for Local Element Declarations (&#167;3.3.2.3)</a>, and also to an
	 <a href="#ed" class="compref" shape="rect">Element Declaration</a>, using the mappings described in
	 <a href="#dcl.elt.common" shape="rect">Common Mapping Rules for Element Declarations (&#167;3.3.2.1)</a> and
	 <a href="#dcl.elt.local" shape="rect">Mapping Rules for Local Element Declarations (&#167;3.3.2.3)</a>.
	</div></li><li><div class="p">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has
	 <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> as an
	 ancestor, and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present,
	 and it does not have <code>minOccurs=maxOccurs=0</code>,
	 then it maps to a <a href="#p" class="compref" shape="rect">Particle</a>
	 as described in <a href="#ref.elt.global" shape="rect">References to Top-Level Element Declarations (&#167;3.3.2.4)</a>.</div></li><li><div class="p">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has
	 <code>minOccurs=maxOccurs=0</code>,
	 then it maps to no component at all.</div><div class="note"><div class="p"><b>Note:</b> The <code>minOccurs</code> and <code>maxOccurs</code>
	  attributes are not allowed on top-level 
	  <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> elements, so in valid schema
	  documents this will happen only when the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has
	 <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> as an
	  ancestor.
	 </div></div></li></ul>
     </div><div class="div4">
<h5><a name="dcl.elt.common" id="dcl.elt.common" shape="rect"></a>3.3.2.1 Common Mapping Rules for Element Declarations</h5><p>The following mapping rules apply
       in all cases where an <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element
       maps to an <a href="#ed" class="compref" shape="rect">Element Declaration</a> component.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Element_Declaration_details" shape="rect">Element Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="mapRepr">
	The first of the following
	 that applies:
	<div class="constraintlist"><div class="clnumber">1 <span class="p">The type definition corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> or
	   <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information item in the
	   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if either is present.
	  </span></div>
<div class="clnumber">2 <span class="p">
	   The type definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
	   the <code>type</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if it is present.
	  </span></div>
<div class="clnumber">3 <span class="p">The declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>
	   of the <a href="#ed" class="compref" shape="rect">Element Declaration</a> 
	   <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the first 
	   <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> in the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	   <code>substitutionGroup</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present.
	  </span></div>
<div class="clnumber">4 <span class="p">
	   <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
	  </span></div>
</div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-type_table" class="propref" shape="rect">{type table}</a></div><div class="mapRepr">A 
	<a href="#tt" class="compref" shape="rect">Type Table</a> corresponding to the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element
	information
	items among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, as follows, otherwise
	<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a></div><div class="pvVal">
	   A sequence of <a href="#tac" class="compref" shape="rect">Type Alternative</a>s, each corresponding, in
	  order, to one of
	  the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> elements which have a
	  <code>test</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
	 </div></div><div class="pvpair"><div class="pvProp"><a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a></div><div class="pvVal">
	   Depends upon the final <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element among the
	   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.  If it has no <code>test</code>
	    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, the final <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> maps to 
	    the <a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>; 
	    if it does have a <code>test</code> attribute, it is covered by
	    the rule for <a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> and
	    the <a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>
	    is taken from the declared type of the <a href="#ed" class="compref" shape="rect">Element Declaration</a>.
	    So the value of the <a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>
	    is given by
	   the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> has no <code>test</code>
	     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, <b>then </b>a <a href="#tac" class="compref" shape="rect">Type Alternative</a> corresponding to the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a>.</div><div class="clnumber">2 <b>otherwise </b>(the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> has a
	     <code>test</code>) a <a href="#tac" class="compref" shape="rect">Type Alternative</a> with the following properties: <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#tac-test" class="propref" shape="rect">{test}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div><div class="pvpair"><div class="pvProp"><a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="pvVal">the <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> property of
	       the parent <a href="#ed" class="compref" shape="rect">Element Declaration</a>.</div></div><div class="pvpair"><div class="pvProp"><a href="#tac-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">the empty sequence.</div></div></div></div></div>
	 </div></div></div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-nillable" class="propref" shape="rect">{nillable}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>nillable</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a></div><div class="mapRepr">If there is a
	 <code>default</code> or a <code>fixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>,
	 then a <a href="#vc_e" class="compref" shape="rect">Value Constraint</a> as follows, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>. <span class="termdef"><a name="l-std" id="l-std" title="" shape="rect">[Definition:]&#160;&#160;</a>Use the name <b>effective simple type
	  definition</b> for the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>, if it is a
	 simple type definition, 
	 or, if <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>simple</i></b>,
	 for <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>, 
	 or else for the built-in
	 <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a> simple
	 type definition).</span>
	<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_e-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">either <b><i>default</i></b> or
	  <b><i>fixed</i></b>, as appropriate</div></div><div class="pvpair"><div class="pvProp"><a href="#vc_e-value" class="propref" shape="rect">{value}</a></div><div class="pvVal">the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (with respect
	  to the <a href="#l-std" class="termref" shape="rect"><span class="arrow">&#183;</span>effective simple type definition<span class="arrow">&#183;</span></a>) of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div><div class="pvpair"><div class="pvProp"><a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a></div><div class="pvVal">the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> (with respect to the <a href="#l-std" class="termref" shape="rect"><span class="arrow">&#183;</span>effective simple type definition<span class="arrow">&#183;</span></a>) of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div></div></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-identity-constraint_definitions" class="propref" shape="rect">{identity- constraint definitions}</a></div><div class="mapRepr">A set
	consisting of the identity-constraint-definitions corresponding to
	all the <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>,
	<a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> and <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a> element
	information items in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, otherwise the
	empty set.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a></div><div class="mapRepr">A set of the element declarations
	<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the items in the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>substitutionGroup</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present,
	otherwise the empty set.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a></div><div class="mapRepr">A set
	depending on the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>block</code>
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise on the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the ancestor
	<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item, if present,
	otherwise on the empty string.  Call this the
	<b>EBV</b> (for effective block value).  Then the
	value of this property is
	the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <b>EBV</b> is the empty string, <b>then </b>the empty set;</div><div class="clnumber">2 <b>If </b>the <b>EBV</b> is <code>#all</code>, <b>then </b><code>{</code><b><i>extension</i></b>,
	   <b><i>restriction</i></b>,
	   <b><i>substitution</i></b><code>}</code>;</div><div class="clnumber">3 <b>otherwise </b>a set with members drawn from the set
	   above, each being present or absent depending on whether
	   the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (which is a list) contains an equivalently
	   named item.
	   <div class="note"><div class="p"><b>Note:</b> Although the <code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
	     <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> <span class="rfc2119">may</span> include values other than
	     <b><i>extension</i></b>, <b><i>restriction</i></b> or
	     <b><i>substitution</i></b>, those values are ignored in the
	     determination of <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> for element
	     declarations (they <em>are</em> used elsewhere).</div></div>
	  </div></div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-substitution_group_exclusions" class="propref" shape="rect">{substitution group exclusions}</a></div><div class="mapRepr">As for
	<a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> above,
	but using the <code>final</code> and <code>finalDefault</code>
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> in place of the <code>block</code> and
	<code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and with the relevant
	set being <code>{</code><b><i>extension</i></b>,
	<b><i>restriction</i></b><code>}</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-abstract" class="propref" shape="rect">{abstract}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>abstract</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr"> The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
	 <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element
	  and any of its <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a>, <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a> and
	  <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> with a <code>ref</code>
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>. 
       </div></div></div></div><div class="div4">
<h5><a name="dcl.elt.global" id="dcl.elt.global" shape="rect"></a>3.3.2.2 Mapping Rules for Top-Level Element Declarations</h5><p id="xr.elt4">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has
       <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> as its parent, 
       it
	maps to a
	global <a href="#ed" class="compref" shape="rect">Element Declaration</a>, 
	using the mapping given
	in <a href="#dcl.elt.common" shape="rect">Common Mapping Rules for Element Declarations (&#167;3.3.2.1)</a>,
	supplemented by the following.
      </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Element_Declaration_details" shape="rect">Element Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	 <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the parent
	 <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item, or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> if there is none.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-scope" class="propref" shape="rect">{scope}</a></div><div class="mapRepr">A
	  <a href="#sc_e" class="compref" shape="rect">Scope</a> as follows
	 <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_e-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>global</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_e-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
	</div></div></div></div><div class="div4">
<h5><a name="dcl.elt.local" id="dcl.elt.local" shape="rect"></a>3.3.2.3 Mapping Rules for Local Element Declarations</h5><p id="xr.elt6">
       If
       the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information
       item has
       <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> as 
       an ancestor,
       and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is absent, 
       and it does not have
	<code>minOccurs=maxOccurs=0</code>,
       
       then it maps both to a
	<a href="#p" class="compref" shape="rect">Particle</a> and to a local 
	<a href="#ed" class="compref" shape="rect">Element Declaration</a> which is the <a href="#p-term" class="propref" shape="rect">{term}</a>
	of that <a href="#p" class="compref" shape="rect">Particle</a>.  The <a href="#p" class="compref" shape="rect">Particle</a>
	is as follows:
      </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Particle_details" shape="rect">Particle</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>minOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="mapRepr"><b><i>unbounded</i></b>, if the
	<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> equals
	<b><i>unbounded</i></b>, otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="mapRepr">A (local) element declaration as
	given below.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
	The same annotations as the <a href="#ed-annotations" class="propref" shape="rect">{annotations}</a> of the 
	 <a href="#p-term" class="propref" shape="rect">{term}</a>.
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p id="xr.elt8">
       The <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> 
	element also maps to an
       element declaration using the
	mapping rules given in 
	<a href="#dcl.elt.common" shape="rect">Common Mapping Rules for Element Declarations (&#167;3.3.2.1)</a>, supplemented by those
	below:
      </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Element_Declaration_details" shape="rect">Element Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">
	The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>
	   <code>targetNamespace</code> is present
	  , <b>then </b>
	   its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>.
	  </div><div class="clnumber">2 <b>If </b>
	   <code>targetNamespace</code> is not present and
	   <b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
	      <code>form</code> 
	      = <code>qualified</code>
	     </span></div>
<div class="clnumber">2.2 <span class="p">
	      <code>form</code> is absent and  the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
	      ancestor 
	      has <code>elementFormDefault</code> =
	      <code>qualified</code>
	     </span></div>
</div>
	   <b>then </b>
	   the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
	   of the ancestor <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
	   information item,
	   or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> if there is
	   none.
	  </div><div class="clnumber">3 <b>otherwise </b>
	   <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	  </div></div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ed-scope" class="propref" shape="rect">{scope}</a></div><div class="mapRepr">
	 
	 A
	 <a href="#sc_e" class="compref" shape="rect">Scope</a> as follows:
	<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_e-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>local</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#sc_e-parent" class="propref" shape="rect">{parent}</a></div><div class="pvVal">If the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> as an ancestor, the <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> corresponding to that item, otherwise (the
	  <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>
	  element information item is within a named <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element information
	   item), the <a href="#mgd" class="compref" shape="rect">Model Group Definition</a> corresponding to
	   that item.</div></div></div>
       </div></div></div></div><div class="div4">
<h5><a name="ref.elt.global" id="ref.elt.global" shape="rect"></a>3.3.2.4 References to Top-Level Element Declarations</h5><p id="xr.elt10">
       If the
       <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information
       item has
       <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> as an
       ancestor, 
       and the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is 
       present,
       and it does not have
	<code>minOccurs=maxOccurs=0</code>,
       
       then it maps to
	a <a href="#p" class="compref" shape="rect">Particle</a> as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Particle_details" shape="rect">Particle</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>minOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="mapRepr"><b><i>unbounded</i></b>, if the
	<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> equals
	<b><i>unbounded</i></b>, otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="mapRepr">The (top-level) element
	declaration <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
	  The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of
	 the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>. 
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div4">
<h5><a name="dcl.elt.exx" id="dcl.elt.exx" shape="rect"></a>3.3.2.5 Examples of Element Declarations</h5><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:element name="unconstrained"/&gt;

&lt;xs:element name="emptyElt"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:attribute ...&gt;. . .&lt;/xs:attribute&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

&lt;xs:element name="contextOne"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="myLocalElement" type="myFirstType"/&gt;
   &lt;xs:element ref="globalElement"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

&lt;xs:element name="contextTwo"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="myLocalElement" type="mySecondType"/&gt;
   &lt;xs:element ref="globalElement"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;</pre></div><div class="exampleWrapper">
<div class="p">The first example above declares an element whose type, by default, is 
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
The second uses an embedded anonymous complex
type definition.</div></div><div class="exampleWrapper">
<div class="p">The last two examples illustrate the use of local element declarations.  Instances of <code>myLocalElement</code> within
<code>contextOne</code> will be constrained by <code>myFirstType</code>,
while those within <code>contextTwo</code> will be constrained by
<code>mySecondType</code>. </div></div></div><div class="note"><div class="p"><b>Note:</b> The possibility that differing attribute declarations and/or content models
would apply to elements with the same name in different contexts is an
extension beyond the expressive power of a DTD in XML.</div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve"> &lt;xs:complexType name="facet"&gt;
  &lt;xs:complexContent&gt;
   &lt;xs:extension base="xs:annotated"&gt;
    &lt;xs:attribute name="value" use="required"/&gt;
   &lt;/xs:extension&gt;
  &lt;/xs:complexContent&gt;
 &lt;/xs:complexType&gt;

 &lt;xs:element name="facet" type="xs:facet" abstract="true"/&gt;

 &lt;xs:element name="encoding" substitutionGroup="xs:facet"&gt;
  &lt;xs:complexType&gt;
   &lt;xs:complexContent&gt;
    &lt;xs:restriction base="xs:facet"&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element ref="annotation" minOccurs="0"/&gt;
     &lt;/xs:sequence&gt;
     &lt;xs:attribute name="value" type="xs:encodings"/&gt;
    &lt;/xs:restriction&gt;
   &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
 &lt;/xs:element&gt;

 &lt;xs:element name="period" substitutionGroup="xs:facet"&gt;
  &lt;xs:complexType&gt;
   &lt;xs:complexContent&gt;
    &lt;xs:restriction base="xs:facet"&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element ref="annotation" minOccurs="0"/&gt;
     &lt;/xs:sequence&gt;
     &lt;xs:attribute name="value" type="xs:duration"/&gt;
    &lt;/xs:restriction&gt;
   &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
 &lt;/xs:element&gt;

 &lt;xs:complexType name="datatype"&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element ref="facet" minOccurs="0" maxOccurs="unbounded"/&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="name" type="xs:NCName" use="optional"/&gt;
  . . .
 &lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p">An example from a previous version of the schema for datatypes.  The
<code>facet</code> type is defined
and the <code>facet</code> element is declared to use it. The <code>facet</code> element is abstract -- it's
<em>only</em> defined to stand as the head for a <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a>.  Two further
elements are declared, each a member of the <code>facet</code> <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a>.  Finally a type is defined which refers to <code>facet</code>, thereby
allowing <em>either</em> <code>period</code> or <code>encoding</code> (or
any other member of the group).</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">The following example illustrates conditional type assignment
to an element, based on the value of one of the element's attributes.
Each instance of the <code>message</code> element will be
assigned either to type <code>messageType</code> or to a more
specific type derived from it.  
</div></div><div class="exampleWrapper">
<div class="p">The type <code>messageType</code> accepts any well-formed XML
or character sequence as content, and carries a <code>kind</code>
attribute which can be used to describe the kind or format of 
the message.  The value of <code>kind</code> is either one of a 
few well known keywords or, failing that, any string.</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="messageType" mixed="true"&gt;
 &lt;xs:sequence&gt;
  &lt;xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/&gt;
 &lt;/xs:sequence&gt;
 &lt;xs:attribute name="kind"&gt;
  &lt;xs:simpleType&gt;
   &lt;xs:union&gt;
    &lt;xs:simpleType&gt;
     &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:enumeration value="string"/&gt;
      &lt;xs:enumeration value="base64"/&gt;
      &lt;xs:enumeration value="binary"/&gt;
      &lt;xs:enumeration value="xml"/&gt;
      &lt;xs:enumeration value="XML"/&gt;
     &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
    &lt;xs:simpleType&gt;
     &lt;xs:restriction base="xs:string"/&gt;
    &lt;/xs:simpleType&gt;
   &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
 &lt;/xs:attribute&gt;
 &lt;xs:anyAttribute processContents="skip"/&gt;
&lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p">Three restrictions of <code>messageType</code> are defined, each
corresponding to one of the three well-known formats:
<code>messageTypeString</code> for <code>kind="string"</code>,
<code>messageTypeBase64</code> for <code>kind="base64"</code> 
and <code>kind="binary"</code>, and
<code>messageTypeXML</code> for <code>kind="xml"</code> or
<code>kind="XML"</code>.
</div></div><div class="exampleInner">
<pre xml:space="preserve">
&lt;xs:complexType name="messageTypeString"&gt;
 &lt;xs:simpleContent&gt;
  &lt;xs:restriction base="messageType"&gt;
   &lt;xs:simpleType&gt;
    &lt;xs:restriction base="xs:string"/&gt;
   &lt;/xs:simpleType&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name="messageTypeBase64"&gt;
 &lt;xs:simpleContent&gt;
  &lt;xs:restriction base="messageType"&gt;
   &lt;xs:simpleType&gt;
    &lt;xs:restriction base="xs:base64Binary"/&gt;
   &lt;/xs:simpleType&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name="messageTypeXML"&gt;
 &lt;xs:complexContent&gt;
  &lt;xs:restriction base="messageType"&gt;
   &lt;xs:sequence&gt;
    &lt;xs:any processContents="strict"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p"><a name="anchor6013" id="anchor6013" shape="rect"></a>
The <code>message</code> element itself uses
<code>messageType</code> both as its declared type and
as its default type, and uses <code>test</code> attributes on its
<a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> to assign the appropriate
specialized message type to messages with the well known
values for the <code>kind</code> attribute.
Because the declared type and the default type are the same, the last
<a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> (without the <code>test</code> attribute)
can be omitted.</div></div><div class="exampleInner">
<pre xml:space="preserve">
&lt;xs:element name="message" type="messageType"&gt;
  &lt;xs:alternative test="@kind='string'" type="messageTypeString"/&gt;
  &lt;xs:alternative test="@kind='base64'" type="messageTypeBase64"/&gt;
  &lt;xs:alternative test="@kind='binary'" type="messageTypeBase64"/&gt;
  &lt;xs:alternative test="@kind='xml'"    type="messageTypeXML"/&gt;
  &lt;xs:alternative test="@kind='XML'"    type="messageTypeXML"/&gt; 
  &lt;xs:alternative                       type="messageType"/&gt;
&lt;/xs:element&gt;
</pre></div></div></div></div><div class="div3">
<h4><a name="sec-src-element" id="sec-src-element" shape="rect"></a>3.3.3 Constraints on XML Representations of Element Declarations</h4><div class="constraintnote"><a id="src-element" name="src-element" shape="rect"></a><b>Schema Representation Constraint: Element Declaration Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element
information items by the schema for schema documents:
   <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><code>default</code> and <code>fixed</code> 
are not
both present.</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->If the item's parent is not <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, then
      <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">One of <code>ref</code> or <code>name</code> is present, but not both.</span></div>
<div class="clnumber">2.2 <span class="p"><a name="anchor8458" id="anchor8458" shape="rect"></a>If <code>ref</code> is present, then

no unqualified attributes are 
present other than <code>minOccurs</code>, <code>maxOccurs</code>, 
and <code>id</code>, 
and no children in the Schema namespace (<code>xs</code>) other than
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a>.</span></div>
</div>
     </div>
<div class="clnumber">3 <span class="p">The <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element does not have both a
<a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> or <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> child and a
<code>type</code> attribute.</span></div>
<div class="clnumber">4<a id="ed-with-ns" name="ed-with-ns" shape="rect"> </a><!--* no span class='p' possible here *-->
     If <code>targetNamespace</code> is present then 
     <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">4.1 <span class="p">
       <code>name</code> is present.
      </span></div>
<div class="clnumber">4.2 <span class="p">
       <code>form</code> is not present.
      </span></div>
<div class="clnumber">4.3 <!--* no span class='p' possible here *-->
       If the ancestor <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> does not have a
       <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
       is different from the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <code>targetNamespace</code> of
       <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>, then
       <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">4.3.1 <span class="p">
         <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> has <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> as an ancestor
        </span></div>
<div class="clnumber">4.3.2<a id="ed-with-ns-must-be-old" name="ed-with-ns-must-be-old" shape="rect"> </a><span class="p">
		There is a <a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> ancestor
		between the <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> and the nearest
		<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> ancestor, and the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
		<code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
		<a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> does not 
		<a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
		name of <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
	       </span></div>
</div>
	    </div>
</div>
	 </div>
<div class="clnumber">5 <span class="p">Every <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element but
the last has a <code>test</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>; the last 
<a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element <span class="rfc2119">may</span> have such an <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</span></div>
</div>
  </div></div></div></div><div class="div3">
<h4><a name="eldec_vr" id="eldec_vr" shape="rect"></a>3.3.4 Element Declaration Validation Rules</h4><p>When an element is <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>, it is
      first checked against its <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>, if any; this in turn
      entails checking it against its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>. The
      second step is recursive: the element's <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> are
      <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> in turn with respect to the declarations assigned to
      them by their parent's <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>.</p><div class="div4">
<h5><a name="sec-sistd" id="sec-sistd" shape="rect"></a>3.3.4.1 Selected and Instance-specified Type Definitions</h5><p>The <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> of an element
       is normally the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> associated with the
       <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>, but this may be <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overridden<span class="arrow">&#183;</span></a> using conditional type assignment in the <a href="#ed" class="compref" shape="rect">Element Declaration</a> or using an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a>, or both.
       When the element is declared with
	conditional type assignment, the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> is used as the
	<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> unless <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overridden<span class="arrow">&#183;</span></a> by an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a>.</p><div class="p"><div class="termdef"><a name="key-selected-type" id="key-selected-type" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>selected type
	 definition</b> <var>S</var> of an element information item <var>E</var> is a
	type definition associated with <var>E</var> in the following way. Let
	<var>D</var> be the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> of <var>E</var>.  Then: <div class="constraintlist"><div class="clnumber">1<a id="hack-will-it-work-haha-yes" name="hack-will-it-work-haha-yes" shape="rect"> </a><span class="p"> If <var>D</var> has a <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>,  then <var>S</var> is the type <a href="#key-cta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>conditionally selected<span class="arrow">&#183;</span></a> for
	   <var>E</var> by <var>D</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>. </span></div>
<div class="clnumber">2 <span class="p">If
	   <var>D</var> has no <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>,  then <var>S</var> is <var>D</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</span></div>
</div> 
	If <var>E</var> has no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>, then <var>E</var> has no selected
	type definition.</div>
       <div class="note"><div class="p"><b>Note:</b> It is a consequence of <a href="#e-props-correct" shape="rect">Element Declaration Properties Correct (&#167;3.3.6.1)</a>
	 that if <var>D</var>  is valid, then
	 <var>S</var> will be <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>D</var>'s 
	 
	  declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>, or else that <var>S</var> will be
	  <a href="#key-error" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:error</code><span class="arrow">&#183;</span></a>.</div></div>
      </div><div class="p"><div class="termdef"><a name="key-cta-select" id="key-cta-select" title="" shape="rect">[Definition:]&#160;&#160;</a> Given a <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T</var> and an element
	information item <var>E</var>, <var>T</var> <b>conditionally selects</b> a
	type <var>S</var> for <var>E</var> in 
	 the following way. The <a href="#tac-test" class="propref" shape="rect">{test}</a>
	 expressions in <var>T</var>'s <a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> are evaluated, in order,
	 until one of the <a href="#tac" class="compref" shape="rect">Type Alternative</a>s <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition for <var>E</var>, or until
	 all have been tried without success.  If any
	 <a href="#tac" class="compref" shape="rect">Type Alternative</a> <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition, none of the following
	 <a href="#tac" class="compref" shape="rect">Type Alternative</a>s are tried. Then the type <var>S</var> <b>conditionally
	  selected</b> for <var>E</var> by <var>T</var> is
	as described in
	
       the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="hack-to-force-template-match-2" name="hack-to-force-template-match-2" shape="rect"> </a><span class="p">
	  If at least one <a href="#tac" class="compref" shape="rect">Type Alternative</a> in <var>T</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a>
	  <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition for <var>E</var>, then <var>S</var>
	  is the type definition selected by the first such <a href="#tac" class="compref" shape="rect">Type Alternative</a>.
	 </span></div><div class="clnumber">2 <span class="p">
	  If no <a href="#tac" class="compref" shape="rect">Type Alternative</a> in <var>T</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a>
	  a type definition, then <var>S</var> is 
	   <var>T</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a>.
	 </span></div></div>
      </div></div><div class="p">
      <div class="termdef"><a name="key-itd" id="key-itd" title="" shape="rect">[Definition:]&#160;&#160;</a>An <b>instance-specified type definition</b>
       is a type definition associated with an element information
       item in the following way: <div class="constraintlist"><div class="clnumber">1<a id="xsi-type-att" name="xsi-type-att" shape="rect"> </a><span class="p">Among the element's attribute information items is one
	   named <code>xsi:type</code>.</span></div>
<div class="clnumber">2 <span class="p">The <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of that attribute information item is a
	  qualified name <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
	  respect to the built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> simple type, as
	  defined by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>. </span></div>
<div class="clnumber">3 <span class="p">The 
	   <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (a <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>)
	   <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a>
	  to a type definition.
	  It is this type definition which is the
	  <b>instance-specified type definition</b>.</span></div>
</div> </div></div></div><div class="div4">
<h5><a name="sec-type-override" id="sec-type-override" shape="rect"></a>3.3.4.2 Type Override and Valid Substitutability</h5><div class="p"><div class="termdef"><a name="key-overrides" id="key-overrides" title="" shape="rect">[Definition:]&#160;&#160;</a>An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> <var>S</var> is said to
       <b>override</b> another type definition <var>T</var> if and only
       if all of the following are true: <div class="constraintlist"><div class="clnumber">1 <span class="p"><var>S</var> is the
	  <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> on some element information item
	  <var>E</var>. A <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> may or may not be known for <var>E</var>.</span></div>
<div class="clnumber">2 <span class="p"><var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var>, subject to the blocking keywords of
	  the <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> of
	  <var>E</var>'s <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>, if any, or <a href="#key-val-sub-type-absolute" class="termref" shape="rect"><span class="arrow">&#183;</span>validly
	    substitutable without limitation<span class="arrow">&#183;</span></a> for
	   <var>T</var> (if no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> is known).</span></div>
</div> <div class="note"><div class="p"><b>Note:</b>  Typically, <var>T</var>
	 would be the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> for <var>E</var> if it were not
	 overridden.  (This will be the case if <var>T</var> was stipulated by
	 the processor, as described in <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>, or <var>E</var> has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> and
	 <var>T</var> is its declared type, or <var>T</var> is the 
  <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of <var>E</var>.) </div></div> </div></div><div class="note"><div class="p"><b>Note:</b> The use of the term "<a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>override<span class="arrow">&#183;</span></a>"
	to denote the relation between an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a>
	<var>S</var> and another type <var>T</var> has nothing to do with the
	<a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element; the two mechanisms are
	distinct and unrelated.</div></div><div class="p"><div class="termdef"><a name="key-val-sub-type" id="key-val-sub-type" title="" shape="rect">[Definition:]&#160;&#160;</a>A type definition <var>S</var> is
       <b>validly substitutable</b> for another type  <var>T</var>,
       subject to a
	set of blocking keywords <var>K</var>  (typically drawn from the set
	{<b><i>substitution</i></b>, <b><i>extension</i></b>,
	<b><i>restriction</i></b>, <b><i>list</i></b>, <b><i>union</i></b>} used in
	the <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> and
	<a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> of
	element declarations and type definitions), if and
       only if either <ul><li><div class="p"><var>S</var> and <var>T</var> are both complex
	  type definitions and <var>S</var> is  validly derived from <var>T</var>
	  subject to the
	   blocking keywords in the union of <var>K</var> and <var>T</var>.
	  <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>, 
	   as defined in <a href="#cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex) (&#167;3.4.6.5)</a></div></li></ul> or
       <ul><li><div class="p"><var>S</var> is a complex type definition, <var>T</var> is a
	  simple type definition, and <var>S</var> is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
	  <var>T</var> subject to the
	   blocking keywords in <var>K</var>, as defined in <a href="#cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex) (&#167;3.4.6.5)</a></div></li></ul> or
       <ul><li><div class="p"><var>S</var> is a simple type definition and <var>S</var> is
	  validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <var>T</var> subject to the blocking keywords in
	  <var>K</var>, as defined in <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</div></li></ul></div></div><p><span class="termdef"><a name="key-val-sub-type-absolute" id="key-val-sub-type-absolute" title="" shape="rect">[Definition:]&#160;&#160;</a>If the set of keywords controlling whether
       a type <var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for another type <var>T</var> is the
       empty set, then <var>S</var> is said to be <b>validly
	substitutable</b> for <var>T</var> <b>without limitation</b>
       or <b>absolutely</b>.  The phrase <b>validly
	substitutable</b>, without mention of any set of blocking
       keywords, means "validly substitutable without
	limitation".</span>
     </p><p>Sometimes one type <var>S</var> is
      <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for another type <var>T</var> only if <var>S</var> is derived
      from <var>T</var> by a chain of restrictions, or if <var>T</var> is a union type
      and <var>S</var> a member type of the union.  The concept of <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>valid substitutability<span class="arrow">&#183;</span></a> is
      appealed to often enough in such contexts that it is convenient
      to define a term to cover this specific case. <span class="termdef"><a name="key-val-sub-type-restricts" id="key-val-sub-type-restricts" title="" shape="rect">[Definition:]&#160;&#160;</a>A type definition <var>S</var> is <b>validly
	substitutable as a restriction</b> for another type  <var>T</var> if
       and only if <var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var>, subject to the
       blocking keywords {<b><i>extension</i></b>, <b><i>list</i></b>,
       <b><i>union</i></b>}.</span>
     </p></div><div class="div4">
<h5><a name="sec-cvc-elt" id="sec-cvc-elt" shape="rect"></a>3.3.4.3 Element Locally Valid (Element)</h5><p>The concept of local validity of an
       element information item against an element declaration is
       an important part of the schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
       of elements.  (The other important part is the recursive
       <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of attributes and descendant elements.)
       Local validity partially determines the element information item's
       <a href="#e-validity" class="propref" shape="rect">[validity]</a> property,
       and fully determines the 
       <a href="#e-local_elem_validity" class="propref" shape="rect">[local element validity]</a>
       property, in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
      </p><div class="block">Informally, an element is locally valid
       against an element declaration when:
       <ol class="enumar"><li><div class="p">The declaration is present in the schema
	  and the name of the element matches the name of the declaration.</div></li><li><div class="p">The element is declared concrete (i.e. not abstract).</div></li><li><div class="p">Any <code>xsi:nil</code> attribute on the element obeys the 
	  rules. The element is allowed to have an <code>xsi:nil</code>
	  attribute only if the element is declared nillable, and 
	  <code>xsi:nil = 'true'</code> is allowed only if the element
	  itself is empty. If the element declaration specifies a 
	  fixed value for the element, <code>xsi:nil='true'</code>
	  will make the element invalid.
	 </div></li><li><div class="p">Any <code>xsi:type</code> attribute present names a
	  type which is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for the element's
	  declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</div></li><li><div class="p">
	  The element's content satisfies the appropriate constraints:
	  If the element is empty and the declaration specifies a
	  default value, the default is checked against the
	  appropriate type definitions.
	  Otherwise, the content of the element is checked against
	  the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>; additionally, if the element
	  declaration specifies a fixed value, the content is
	  checked against that value.</div></li><li><div class="p">
	  The element satisfies all the identity constraints specified
	  on the element declaration.</div></li><li><div class="p">
	  Additionally, on the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>, document-level
	  ID and IDREF constraints are checked.
	 </div></li></ol>
      </div><p>The following validation rule gives
       the normative formal definition of local validity of an element
       against an element declaration.</p><div class="constraintnote"><a id="cvc-elt" name="cvc-elt" shape="rect"></a><b>Validation Rule: Element Locally Valid (Element)</b><br clear="none" /><div class="constraint"><div class="p">For an element information item <var>E</var> to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to an element
       declaration <var>D</var>
       <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-ea" name="c-ea" shape="rect"> </a><span class="p"><var>D</var>
	  is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
	  and <var>E</var> and <var>D</var> have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.</span></div>
<div class="clnumber">2 <span class="p"><var>D</var>.<a href="#ed-abstract" class="propref" shape="rect">{abstract}</a> 
	   =
	   <b><i>false</i></b>.</span></div>
<div class="clnumber">3 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p"><var>D</var>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> 
	     =
	     <b><i>false</i></b>,
	     and <var>E</var> has no
	      <code>xsi:nil</code> attribute.</span></div>
<div class="clnumber">3.2<a id="c-nl" name="c-nl" shape="rect"> </a><!--* no span class='p' possible here *--><var>D</var>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> 
	     = 
	     <b><i>true</i></b>
	     and 
	     <b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">3.2.1 <span class="p">
		<var>E</var> has no <code>xsi:nil</code>
	        attribute information item.</span></div>
<div class="clnumber">3.2.2 <span class="p"><var>E</var> has <code>xsi:nil</code> = <code>false</code>.</span></div>
<div class="clnumber">3.2.3<a id="c-nl-11" name="c-nl-11" shape="rect"> </a><!--* no span class='p' possible here *--><var>E</var> has <code>xsi:nil</code>
		= <code>true</code>
		
		(that is, <var>E</var> is <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a>), and 
	       <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.2.3.1 <span class="p"><var>E</var> has no character or element
		   information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</span></div>
<div class="clnumber">3.2.3.2 <span class="p"><var>D</var>
		    has no <a href="#ed-value_constraint" class="propref" shape="rect">{value      constraint}</a> with
		    <a href="#vc_e-variety" class="propref" shape="rect">{variety}</a> =
		    <b><i>fixed</i></b>.</span></div>
</div></div>
</div>
      
	     
	   </div>
</div></div>
<div class="clnumber">4<a id="c-itd" name="c-itd" shape="rect"> </a><span class="p">
	   <a name="anchor11764a" id="anchor11764a" shape="rect"></a>
	   
	    
	   
	   
	     If <var>E</var> has an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> <var>T</var>, then <var>T</var>
	     <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>.
	   
	 </span></div>
<div class="clnumber">5<a id="c-evagtd" name="c-evagtd" shape="rect"> </a>The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">5.1<a id="c-evc" name="c-evc" shape="rect"> </a><b>If </b>
	     <var>D</var> has a <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>, and 
	     
	     <var>E</var> has neither
	     element nor character <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, and 
	     <var>E</var> is not
	      <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> with respect to <var>D</var>
             
	     , <b>then </b>
	    <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">5.1.1 <span class="p">If 
		<var>E</var>'s 
		<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> 
		is 
		an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a>,
		then 
		<var>D</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> 
		is a valid default for the 
		<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> 
		as defined in <a href="#cos-valid-default" shape="rect">Element Default Valid (Immediate) (&#167;3.3.6.2)</a>.
	      </span></div>
<div class="clnumber">5.1.2 <span class="p">The element information item with 
		<var>D</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a> 
		used as its <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> is
		locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
		the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> as defined
		by <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>.</span></div>
</div>
	   </div><div class="clnumber">5.2 <b>If </b><var>D</var> has no <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>, or <var>E</var> has either element or
	    character <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, or <var>E</var> is 
	      <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> with respect to <var>D</var>, <b>then </b><b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">5.2.1 <span class="p"><var>E</var> is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the
	       <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> as defined
	       by <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>.</span></div>
<div class="clnumber">5.2.2 <!--* no span class='p' possible here *-->If <var>D</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-variety" class="propref" shape="rect">{variety}</a> = <b><i>fixed</i></b> and
		<var>E</var>
		 is not <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> with respect to <var>D</var>, then
	       <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">5.2.2.1 <span class="p"><var>E</var> has no element
		  information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</span></div>
<div class="clnumber">5.2.2.2 The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">5.2.2.2.1 <b>If </b><var>E</var>'s <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> is a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>
		      with <a href="#ctd-content_type" class="propref" shape="rect">{content         type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>mixed</i></b>
		    , <b>then </b>the <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial
		      value<span class="arrow">&#183;</span></a> of <var>E</var> 
		     matches <var>D</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a>.</div><div class="clnumber">5.2.2.2.2 <b>If </b><var>E</var>'s <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> 
		      is a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
		      or a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> with 
		      <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>simple</i></b>, <b>then </b>the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <var>E</var> is equal or identical to
		     
		      <var>D</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_e-value" class="propref" shape="rect">{value}</a>.
		   </div></div></div>
</div>
	      </div>
</div></div></div></div>
<div class="clnumber">6 <span class="p"><var>E</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to each of the
	  <a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint     definitions}</a> as per <a href="#cvc-identity-constraint" shape="rect">Identity-constraint Satisfied (&#167;3.11.4)</a>.</span></div>
<div class="clnumber">7 <span class="p">If <var>E</var> is the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>,
	  then it is
	  <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> per <a href="#cvc-id" shape="rect">Validation Root Valid (ID/IDREF) (&#167;3.3.4.5)</a>.</span></div>
</div>      
      </div></div></div><div class="note"><div class="p"><b>Note:</b> 
	
	
	  If an element has an <code>xsi:type</code> attribute, the
	  type definition indicated by that attribute normally takes
	  precedence over the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> which would otherwise
	  govern the element.
	  <a name="anchor11764b" id="anchor11764b" shape="rect"></a>
	  
	    If an <code>xsi:type</code> attribute is present
	    and <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> 
	    to a known type definition, but
	    fails to <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>override<span class="arrow">&#183;</span></a> the 
	    <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a>, then <var>E</var> is not
	    locally valid against <var>D</var>,
	    since <var>E</var> has failed to satisfy 
	    clause <a href="#c-itd" shape="rect">4</a>.
	    
	  
	  In this case
	  (or if <code>xsi:type</code> fails to
	  <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a>), the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> of the
	  element is the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of its
	  <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>, and the element is 
	  validated against that type as described in 
	  clause <a href="#c-evagtd" shape="rect">5</a>.
	  The local validity of the element
	  with respect to the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> is recorded in the
	  <a href="#e-local_type_validity" class="propref" shape="rect">[local type validity]</a>
	  property.
	  The use of the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> when the 
	  <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> cannot be used
	  allows useful validation to proceed in some cases (not all) even
	  when the schema is incomplete.  It also
	  helps ensure consistent typing for sub-elements
	  with the same name.
	
	</div></div></div><div class="div4">
<h5><a name="sec-cvc-type" id="sec-cvc-type" shape="rect"></a>3.3.4.4 Element Locally Valid (Type)</h5><p>The following validation rule specifies
       formally what it means for an element to be locally valid 
       against a type definition.  This concept is appealed to in the
       course of checking an element's local validity against its
       
       <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>. It
       is also part of schema-validity
       <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of an element when  the element is
       <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a>, by checking its local validity
        against <code>xs:anyType</code>.</p><p>
       Informally, local validity against a type requires first
       that the type definition be present in the schema and not declared abstract.
       For a simple type definition, the element must lack attributes
       (except for namespace declarations and the special attributes
       in the <code>xsi</code> namespace) and child elements, and must
       be type-valid against that simple type definition.
       For a complex type definition, the element must
       be locally valid against that complex type definition.
       
      </p><div class="constraintnote"><a id="cvc-type" name="cvc-type" shape="rect"></a><b>Validation Rule: Element Locally Valid (Type)</b><br clear="none" /><div class="constraint"><div class="p">For an element information item <var>E</var> 
	to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to 
	a type definition <var>T</var>
      <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-ct" name="c-ct" shape="rect"> </a><span class="p"><var>T</var> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">2 <span class="p">
	   If <var>T</var> is a complex type definition, then
	   <var>T</var>.<a href="#ctd-abstract" class="propref" shape="rect">{abstract}</a> = <b><i>false</i></b>.</span></div>
<div class="clnumber">3 The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b><var>T</var> is a simple type
	    definition, <b>then </b>
         <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1.1 <span class="p"><var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
		 is empty, except for attributes named <code>xsi:type</code>,
		 <code>xsi:nil</code>,
		 <code>xsi:schemaLocation</code>, or
		 <code>xsi:noNamespaceSchemaLocation</code>.</span></div>
<div class="clnumber">3.1.2 <span class="p"><var>E</var> has no element
	       information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</span></div>
<div class="clnumber">3.1.3<a id="c-sv1" name="c-sv1" shape="rect"> </a><span class="p">If <var>E</var> is not <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a>, then the <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a>
	       is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
	       respect to <var>T</var> as defined by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</span></div>
</div>
	   </div><div class="clnumber">3.2 <b>If </b><var>T</var> is a complex type
	    definition, <b>then </b><var>E</var> is
	    locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to <var>T</var>
	     as per <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>;</div></div></div>
</div>
      </div></div></div></div><div class="div4">
<h5><a name="sec-cvc-id" id="sec-cvc-id" shape="rect"></a>3.3.4.5 Validation Root Valid (ID/IDREF)</h5><p>The following validation rule
       specifies document-level ID/IDREF constraints checked on the 
       <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> if it is an element; this rule is not checked on other
       elements.  Informally, the requirement is that each ID
       identifies a single element within the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>, 
       and that each IDREF value matches one ID.
      </p><div class="constraintnote"><a id="cvc-id" name="cvc-id" shape="rect"></a><b>Validation Rule: Validation Root Valid (ID/IDREF)</b><br clear="none" /><div class="constraint"><div class="p">For an element information item <var>E</var>
	which is the
	<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> to be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
	<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">There is no <b>ID/IDREF binding</b> in 
	   <var>E</var>.<a href="#e-ii_table" class="propref" shape="rect">[ID/IDREF table]</a> whose <a href="#iib-binding" class="propref" shape="rect">[binding]</a> is the empty set.</span></div>
<div class="clnumber">2<a id="c-uba" name="c-uba" shape="rect"> </a><span class="p">There is no <b>ID/IDREF binding</b> in 
	   <var>E</var>.<a href="#e-ii_table" class="propref" shape="rect">[ID/IDREF table]</a> whose
	  <a href="#iib-binding" class="propref" shape="rect">[binding]</a> has more than one
	  member.</span></div>
</div>
      </div><div class="p">See <a href="#sic-id" shape="rect">ID/IDREF Table (&#167;3.17.5.2)</a> for the definition of
       <b>ID/IDREF binding</b>.</div></div></div><div class="note"><div class="p"><b>Note:</b> The first clause above is
	violated when there is a reference to an undefined
	ID.  
      The second is violated when there is
      a multiply-defined ID. The
      cases are separated out to ensure that distinct error
      codes (see <a href="#outcomes" shape="rect">Outcome Tabulations (normative) (&#167;B)</a>) are associated with these
      two cases.</div></div><div class="note"><div class="p"><b>Note:</b> Since an element governed by type <code>xs:ID</code> provides
	a unique identifier for the element's parent element, it is not useful
	to have an element governed by <code>xs:ID</code> when the element
	has no parent element or when the parent element lies outside the
	scope of validation.</div><div class="p">In the following examples, <code>DOC</code> 
	and <code>Y</code> are governed by type <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>,
	the element <code>X</code> and the attribute <code>xml:id</code> are 
	governed by <code>xs:ID</code>, and the element
	<code>Z</code> is governed by a complex type with simple content 
	derived from <code>xs:ID</code>.</div><ul><li><div class="p">In the document <code>&lt;DOC&gt;&lt;X&gt;abcd&lt;/X&gt;&lt;/DOC&gt;</code>,
	the ID value '<code>abcd</code>' will normally be bound to
	the <code>DOC</code> element.  But if the <code>X</code>
	element is the validation root, then '<code>abcd</code>'
	will have no element binding, because <code>DOC</code>
	is outside the scope of the validation episode.
	So the first clause is violated and the document is invalid.</div></li><li><div class="p">The superficially similar case 
	<code>&lt;DOC&gt;&lt;Y xml:id="abcd"/&gt;&lt;/DOC&gt;</code>
	will, in contrast, be valid whether the <code>DOC</code> element
	or the <code>Y</code> element is the validation root.  The
	ID/IDREF table will have one entry in either case, binding
	'<code>abcd</code>' to the <code>Y</code> element.
	</div></li><li><div class="p">For the document <code>&lt;DOC&gt;&lt;Z
	xml:id="abcd"&gt;abcd&lt;/Z&gt;&lt;/DOC&gt;</code>,
	if <code>Z</code>
	is the validation root, then the ID/IDREF table for the document
	will have a single entry for '<code>abcd</code>' 
	and will be valid. The single binding comes from the 
	<code>xml:id</code> attribute; the content of
	<code>Z</code> produces no binding, just as the content of
	<code>X</code> above produces no binding.</div><div class="p">But if <code>DOC</code> is the
	validation root, then the ID/IDREF table for the document will
	have two entries for '<code>abcd</code>' (one, from the
	<code>xml:id</code> attribute, binding '<code>abcd</code>' to
	the <code>Z</code> element, one from the content of <code>Z</code> 
	binding '<code>abcd</code>' to the <code>DOC</code> element) and
	will be invalid.
	</div></li></ul></div><div class="note"><div class="p"><b>Note:</b> Although this rule applies at the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>, in
	practice processors, particularly streaming processors,
	will perhaps wish to detect and signal the
	clause <a href="#c-uba" shape="rect">2</a> case as it arises.</div></div><div class="note"><div class="p"><b>Note:</b> This reconstruction of <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>'s
	<code>ID/IDREF</code> functionality is imperfect in that if
	the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> is not the document element of an XML
	document, the results will not necessarily be the same as
	those a validating parser would give were the document to have
	a DTD with equivalent declarations.</div></div></div><div class="div4">
<h5><a name="sec-cvc-assess-elt" id="sec-cvc-assess-elt" shape="rect"></a>3.3.4.6 Schema-Validity Assessment (Element)</h5><div class="block">This section gives the top-level rule
       for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of an element information item.  Informally:
       <ol class="enumar"><li><div class="p">Assessment begins with the identification of a
	  <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> for the element and then checks that the
	  element is locally valid against the declaration; if no
	  <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> is available, a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> can be
	  used instead.</div></li><li><div class="p">The element's attributes are to be <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> recursively, 
	  unless they match a <b><i>skip</i></b> wildcard and are thus 
	  <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>.  
	 </div></li><li><div class="p">The element's children are to be <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> recursively, 
	  unless they match a <b><i>skip</i></b>
	  wildcard and are thus <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>.  For each child element,
	  the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> is the one identified in the course
	  of checking the local validity of the parent, unless that
	  declaration is not available. If the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> is not
	  available, the element may still be <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>
	  if a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> can be identified (e.g. via the
	  <code>xsi:type</code> attribute), otherwise the element
	  will be <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a>.
	 </div></li></ol>
       
      </div><div class="p">
       <div class="termdef"><a name="key-governing-ed" id="key-governing-ed" title="" shape="rect">[Definition:]&#160;&#160;</a> The <b>governing element declaration</b> of
	an element information item <var>E</var>, 
	in a given schema-validity
	<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is the first of the following
	which applies: 
	<div class="constraintlist"><div class="clnumber">1<a id="elem-stipulated" name="elem-stipulated" shape="rect"> </a><span class="p">A
	   declaration stipulated by the processor (see <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2<a id="elem-cdd" name="elem-cdd" shape="rect"> </a><span class="p"><var>E</var>'s 
	   <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined
	    declaration<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">3<a id="elem-wc-split" name="elem-wc-split" shape="rect"> </a><span class="p">A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a>
	   to by <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[local name]</a>
	   and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace
	    name]</a>, provided that <var>E</var>
	   is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> either to a <b><i>strict</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>
	   or to a <b><i>lax</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>. 
	  </span></div>
<div class="clnumber">4<a id="elem-wc" name="elem-wc" shape="rect"> </a><!--* no span class='p' possible here *-->A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by 
	   <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[local 
	    name]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace 
	    name]</a>, provided  that
	    <b>none</b> of the following is true:
	   <div class="constraintlist"><div class="clnumber">4.1<a id="no-id-if-skipped" name="no-id-if-skipped" shape="rect"> </a><span class="p"><var>E</var> is 
        <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> </span></div>
<div class="clnumber">4.2 <span class="p">the
	      processor has stipulated a type definition  for
	       <var>E</var> </span></div>
<div class="clnumber">4.3 <span class="p">a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>

	      
	      <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> exists for 
	      <var>E</var></span></div>
</div> 
	  </div>
</div> 
       
       If none of these
       applies,
	 <var>E</var> has
	no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> (or, in equivalent words, 
	 <var>E</var>'s <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>). </div>
     </div><div class="p">
       <div class="termdef"><a name="key-governing-type-elem" id="key-governing-type-elem" title="" shape="rect">[Definition:]&#160;&#160;</a> The <b>governing type definition</b> of an
       element information item <var>E</var>, 
	in a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is the first of the following which
       applies: <div class="constraintlist"><div class="clnumber">1<a id="stipulated-plus-xsitype" name="stipulated-plus-xsitype" shape="rect"> </a><span class="p">An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> a type
	   definition stipulated by the processor (see <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2<a id="stipulated" name="stipulated" shape="rect"> </a><span class="p">A type definition stipulated by the processor (see
	   <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">3<a id="governing-plus-xsitype" name="governing-plus-xsitype" shape="rect"> </a><span class="p">An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>.</span></div>
<div class="clnumber">4<a id="gov-no-xsitype" name="gov-no-xsitype" shape="rect"> </a><span class="p">The <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>.</span></div>
<div class="clnumber">5 <span class="p">The value <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
	   if <var>E</var> is <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>. </span></div>
<div class="clnumber">6 <span class="p"> An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>. </span></div>
<div class="clnumber">7 <span class="p">The <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">8 <span class="p">An
	  <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a>.</span></div>
</div> 
	If none of these
    applies,
    there is no
       <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> (or, in equivalent words, it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>). </div>
     </div><div class="constraintnote"><a id="cvc-assess-elt" name="cvc-assess-elt" shape="rect"></a><b>Validation Rule: Schema-Validity Assessment (Element)</b><br clear="none" /><div class="constraint"><div class="p">The schema-validity assessment of an element information item
	<var>E</var> is performed as follows:<div class="constraintlist"><div class="clnumber">1 <span class="p">If <var>E</var> has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> or a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>,
	   then <var>E</var> <span class="rfc2119">must</span> be <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2 <span class="p">If <var>E</var> is <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>,
	   then <var>E</var> <span class="rfc2119">must not</span> be <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">3 <span class="p">Otherwise, <var>E</var> <span class="rfc2119">must</span> be <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a>.</span></div>
</div>
       </div></div></div><div class="p">
       <div class="termdef"><a name="key-sva" id="key-sva" title="" shape="rect">[Definition:]&#160;&#160;</a>An element
	information item <var>E</var> is said to be <b>strictly assessed</b>
	if and only if 
	<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="c-xd" name="c-xd" shape="rect"> </a><!--* no span class='p' possible here *-->
	   <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.1<a id="c-ed" name="c-ed" shape="rect"> </a><b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1.1<a id="dummy-id-to-force-special-list-processing-for-parent" name="dummy-id-to-force-special-list-processing-for-parent" shape="rect"> </a><span class="p">A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a> element declaration
		 is known for <var>E</var>, namely its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
		  declaration.
		 </span></div>
<div class="clnumber">1.1.2 <span class="p"><var>E</var>'s local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> with
		respect to that declaration has been evaluated as per
		<a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>.</span></div>
<div class="clnumber">1.1.3 <span class="p">If that evaluation involved the evaluation of 
		<a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>, clause <a href="#c-ct" shape="rect">1</a> thereof is satisfied.</span></div>
</div></div>
<div class="clnumber">1.2<a id="c-td" name="c-td" shape="rect"> </a><b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.2.1 <span class="p">
		<var>E</var> does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>.
	       </span></div>
<div class="clnumber">1.2.2 <span class="p">A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
 type definition is known for <var>E</var>, namely its
		  <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>
		 
		</span></div>
<div class="clnumber">1.2.3<a id="another-dummy-id-to-force-special-list-processing-for-parent" name="another-dummy-id-to-force-special-list-processing-for-parent" shape="rect"> </a><span class="p">The  local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> of <var>E</var> with respect to its
		 <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> has been evaluated as
		per <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>.</span></div>
</div></div>
</div>
	  </div>
<div class="clnumber">2<a id="c-deepa" name="c-deepa" shape="rect"> </a><!--* no span class='p' possible here *-->
	   For each of the attribute information items among 
	   <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>,
	   the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b>
	      the attribute has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>
	     , <b>then </b>
	      its schema-validity is assessed with respect to that
	      declaration, as defined in <a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute) (&#167;3.2.4.3)</a>.
	     </div><div class="clnumber">2.2 <b>otherwise </b>
	      its schema-validity is not assessed.
	     </div></div>
	  </div>
<div class="clnumber">3<a id="c-deepe" name="c-deepe" shape="rect"> </a><!--* no span class='p' possible here *-->
	   For each of the element information items among its
	   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>,
	   the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b>
	      the child has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> or a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>
	     , <b>then </b>
	      its schema-validity is assessed with respect to that
	      declaration or type definition, as defined in <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>.
	     </div><div class="clnumber">3.2 <b>If </b>
	      the child is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> a <b><i>skip</i></b>
	      <a href="#w" class="compref" shape="rect">Wildcard</a>
	     , <b>then </b>
	      its schema-validity is not assessed.
	     </div><div class="clnumber">3.3 <b>otherwise </b>
	      its schema-validity is <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a> with
	      respect to <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
	     </div></div>
	  </div>
</div>
       </div>
      </div><div class="p"><div class="termdef"><a name="key-lva" id="key-lva" title="" shape="rect">[Definition:]&#160;&#160;</a>The schema validity of an element information item <var>E</var> is 
	said to be <b>laxly assessed</b> if and only if
	<b>both</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> has neither a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>
	   nor a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2 <span class="p"><var>E</var> is locally
	   <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> with respect to 
	   <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> as defined in
	   <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>, and the schema-validity of 
	   <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> 
	   is assessed as described in clause <a href="#c-deepa" shape="rect">2</a> and clause <a href="#c-deepe" shape="rect">3</a> 
	   of <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>.</span></div>
</div>
       </div>
      </div><div class="note"><div class="p"><b>Note:</b> It follows from the definitions given that no element
	information item can be both <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>
	and <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a> in the same schema-validity 
	<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode.</div></div></div></div><div class="div3">
<h4><a name="edisc" id="edisc" shape="rect"></a>3.3.5 Element Declaration Information Set Contributions</h4><div class="div4">
<h5><a name="sec-sic-e-outcome" id="sec-sic-e-outcome" shape="rect"></a>3.3.5.1 Assessment Outcome (Element)</h5><div class="constraintnote"><a id="sic-e-outcome" name="sic-e-outcome" shape="rect"></a><b>Schema Information Set Contribution: Assessment Outcome (Element)</b><br clear="none" /><div class="constraint"><div class="p">If and only if the schema-validity of an element information item
       has been assessed as per <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>, then
       in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> it has properties as follows:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-validation_context" name="e-validation_context" shape="rect"><span class="propdef">[validation context]</span></a></dt><dd>The nearest ancestor element
	information item with a <a href="#e-schema_information" class="propref" shape="rect">[schema information]</a> property (or this element item
	itself if it has such a property).</dd><dt><a id="e-validity" name="e-validity" shape="rect"><span class="propdef">[validity]</span></a></dt><dd>
        The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>it was <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a>, <b>then </b>
	    the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>
	       <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1.1 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.1.1.1 <span class="p">clause <a href="#c-ed" shape="rect">1.1</a> of <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> applied and the item was
		    locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> as defined by
		   <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>;</span></div>
<div class="clnumber">1.1.1.2 <span class="p">clause <a href="#c-td" shape="rect">1.2</a> of <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> applied and the item was
		   locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> as defined by
		   <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>.</span></div>
</div></div>
<div class="clnumber">1.1.2 <span class="p">Neither its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> nor its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
		 contains an information item (element or attribute
		 respectively) whose  <span class="anonRef">[validity]</span> is
		 <b><i>invalid</i></b>.</span></div>
<div class="clnumber">1.1.3 <span class="p">Neither its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> nor its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
		 contains an information item (element or attribute
		 respectively) which is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a
		  <b><i>strict</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> and whose
		 <span class="anonRef">[validity]</span> is
		 <b><i>notKnown</i></b>.</span></div>
</div>
	      <b>then </b><b><i>valid</i></b>;</div><div class="clnumber">1.2 <b>otherwise </b><b><i>invalid</i></b>.</div></div>
	  </div><div class="clnumber">2 <b>otherwise </b><b><i>notKnown</i></b>.</div></div>
       </dd><dt><a id="e-validation_attempted" name="e-validation_attempted" shape="rect"><span class="propdef">[validation attempted]</span></a></dt><dd>
       The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>it was <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a> and neither its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> nor its
	   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> contains an information item (element or
	   attribute respectively) whose  <span class="anonRef">[validation attempted]</span> is not
	   <b><i>full</i></b>, <b>then </b><b><i>full</i></b>;</div><div class="clnumber">2 <b>If </b>it was not <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a> and neither its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> nor its
	   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> contains an information item (element or
	   attribute respectively) whose  <span class="anonRef">[validation attempted]</span> is not
	   <b><i>none</i></b>, <b>then </b><b><i>none</i></b>;</div><div class="clnumber">3 <b>otherwise </b><b><i>partial</i></b>.</div></div></dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-elt-error-code" id="sec-sic-elt-error-code" shape="rect"></a>3.3.5.2 Validation Failure (Element)</h5><div class="constraintnote"><a id="sic-elt-error-code" name="sic-elt-error-code" shape="rect"></a><b>Schema Information Set Contribution: Validation Failure (Element)</b><br clear="none" /><div class="constraint"><div class="p">If and only if the local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a>,
       as defined by
<a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above and/or <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a> below,
       of an element information item has been assessed, then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the item
       has a property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-schema_error_code" name="e-schema_error_code" shape="rect"><span class="propdef">[schema error code]</span></a></dt><dd>
       The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the item is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>invalid<span class="arrow">&#183;</span></a>, <b>then </b>a list.  Applications wishing to provide
	   information as to the reason(s) for the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> failure are encouraged
	   to record one or more error codes (see <a href="#outcomes" shape="rect">Outcome Tabulations (normative) (&#167;B)</a>) herein.</div><div class="clnumber">2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div>
       </dd><dt><a id="e-subsequence_valid" name="e-subsequence_valid" shape="rect"><span class="propdef">[subsequence-valid]</span></a></dt><dd>
The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the element information item is locally
	   <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>invalid<span class="arrow">&#183;</span></a>, because unexpected
	   attributes or elements were found among its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
	   and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>  <b>and</b>
	   clause <a href="#c-cvct" shape="rect">1</a> of
	    <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> would be
	    satisfied, if those unexpected attributes and
	   children (those with <a href="#e-match_info" class="propref" shape="rect">[match information]</a> = <b><i>none</i></b>) were removed, <b>then </b><b><i>true</i></b>
	  </div><div class="clnumber">2 <b>otherwise </b> <b><i>false</i></b></div></div>
       </dd><dt><a id="e-idcs" name="e-idcs" shape="rect"><span class="propdef">[failed identity constraints]</span></a></dt><dd>
	 A list of <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a>s that are
	   not satisfied
	  by the element information item, as defined by <a href="#cvc-identity-constraint" shape="rect">Identity-constraint Satisfied (&#167;3.11.4)</a>. <div class="note"><div class="p"><b>Note:</b> 
	   In
	    principle, the value of this property includes all of the
	    <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a>s which are not satisfied for this element item;
	    in practice, some processors will expose a subset of the 
	    items in this value, rather than the full value.  
	    For example, a processor could choose not to check
	    further identity constraints after detecting the first 
	    failure.	    
	 </div></div>
       </dd><dt><a id="e-assertions" name="e-assertions" shape="rect"><span class="propdef">[failed assertions]</span></a></dt><dd>
       A list of <a href="#as" class="compref" shape="rect">Assertion</a>s that are not 
	  satisfied by the element information item, as defined by <a href="#cvc-assertion" shape="rect">Assertion Satisfied (&#167;3.13.4.1)</a>. <div class="note"><div class="p"><b>Note:</b> 
	  In
	    principle, the value of this property includes all of the
	    <a href="#as" class="compref" shape="rect">Assertion</a>s which are not satsfied by this element item;
	    in practice, some processors will expose a subset of the items in this
	    value, rather than the full value.  For example, a processor
	    could choose not to check further assertions after detecting the first 
	    failure.
	 </div></div>
       </dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-elt-decl" id="sec-sic-elt-decl" shape="rect"></a>3.3.5.3 Element Declaration</h5><div class="constraintnote"><a id="sic-elt-decl" name="sic-elt-decl" shape="rect"></a><b>Schema Information Set Contribution: Element Declaration</b><br clear="none" /><div class="constraint"><div class="p">If and only if a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> is known
	for an element information item, then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the element
       information item has the properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-declaration" name="e-declaration" shape="rect"><span class="propdef">[element declaration]</span></a></dt><dd>
	an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to the
	<a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration
	component itself</dd><dt><a id="e-nil" name="e-nil" shape="rect"><span class="propdef">[nil]</span></a></dt><dd><b><i>true</i></b> if clause <a href="#c-nl-11" shape="rect">3.2.3</a>
        of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above is satisfied,
	otherwise <b><i>false</i></b>
       </dd><dt><a id="e-expected-ed" name="e-expected-ed" shape="rect"><span class="propdef">[expected element declaration]</span></a></dt><dd>if the element information item is
	<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, then the <a href="#p-term" class="propref" shape="rect">{term}</a> of that <a href="#p" class="compref" shape="rect">Particle</a>, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
	<div class="note"><div class="p"><b>Note:</b> 
        The <a href="#e-declaration" class="propref" shape="rect">[element declaration]</a> either is the
	  same as or is in the <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a> of the <a href="#e-expected-ed" class="propref" shape="rect">[expected element declaration]</a>.
	 </div></div>
       </dd><dt><a id="e-declared_type" name="e-declared_type" shape="rect"><span class="propdef">[declared type]</span></a></dt><dd>an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a>
	to the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>
       </dd><dt><a id="e-local_elem_validity" name="e-local_elem_validity" shape="rect"><span class="propdef">[local element validity]</span></a></dt><dd>
       The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the item was locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> as defined by <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>, <b>then </b><b><i>valid</i></b></div><div class="clnumber">2 <b>otherwise </b>(the item was 
	    locally
	    <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>invalid<span class="arrow">&#183;</span></a> as defined by <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>) <b><i>invalid</i></b>.</div></div>
       </dd></dl>
</div>
</div>
</div></div></div><div class="div4">
<h5><a name="sec-sic-eltType" id="sec-sic-eltType" shape="rect"></a>3.3.5.4 Element Validated by Type</h5><div class="constraintnote"><a id="sic-eltType" name="sic-eltType" shape="rect"></a><b>Schema Information Set Contribution: Element Validated by Type</b><br clear="none" /><div class="constraint"><div class="p">If and only if  a
	 <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> is known for an element
	information item, then in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the item has
	the properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-schema_normalized_value" name="e-schema_normalized_value" shape="rect"><span class="propdef">[schema normalized value]</span></a></dt><dd>
	 
	 The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the element information item is not <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> and either the
	    <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>
	    is a simple type definition or its
	    <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> has
	    <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>simple</i></b>, <b>then </b>
	    the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>
	       clause <a href="#c-evc" shape="rect">5.1</a> of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>
	       above has applied, <b>then </b>
	       the 
		<a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a> of the
		<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>
	       
	      </div><div class="clnumber">1.2 <b>If </b>
	       clause <a href="#c-evc" shape="rect">5.1</a> of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above has
	       <em>not</em> applied and 
	       the  
               element's <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a>
	       is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the simple
	       type definition as defined by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>, <b>then </b>
	       the <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of the item as <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a>
	      </div><div class="clnumber">1.3 <b>otherwise </b>
	       <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	      </div></div>
	   </div><div class="clnumber">2 <b>otherwise </b>
	    <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	   </div></div>
       </dd><dt><a id="e-schema_actual_value" name="e-schema_actual_value" shape="rect"><span class="propdef">[schema actual value]</span></a></dt><dd>
	 If the <a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> is not
	 <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then the corresponding <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
	 ; otherwise
	 <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	</dd><dt><a id="e-type_definition" name="e-type_definition" shape="rect"><span class="propdef">[type definition]</span></a></dt><dd>An <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
	 the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> component
	 itself.</dd><dt><a id="e-type_definition_type" name="e-type_definition_type" shape="rect"><span class="propdef">[type definition   type]</span></a></dt><dd>
	 <b><i>simple</i></b> or <b><i>complex</i></b>, depending on the 
	  <a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>.</dd><dt><a id="e-type_definition_namespace" name="e-type_definition_namespace" shape="rect"><span class="propdef">[type definition namespace]</span></a></dt><dd>
	 <a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>.<span class="anonRef">{target namespace}</span>.</dd><dt><a id="e-type_definition_anonymous" name="e-type_definition_anonymous" shape="rect"><span class="propdef">[type definition anonymous]</span></a></dt><dd><b><i>true</i></b>
	 if 
	 <a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>.<span class="anonRef">{name}</span>
	 is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise
	 <b><i>false</i></b>.</dd><dt><a id="e-type_definition_name" name="e-type_definition_name" shape="rect"><span class="propdef">[type definition name]</span></a></dt><dd>
	 If <a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>.<span class="anonRef">{name}</span> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then
	  <a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>.<span class="anonRef">{name}</span>, otherwise
	 schema processors <span class="rfc2119">may</span>, but
	 need not, provide a value unique to the definition. It
	   is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor provides a name for
	   such a type definition.  If a processor does
	  provide a value in this situation, the choice of what value
	  to use is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
	</dd><dt><a id="e-type_fallback" name="e-type_fallback" shape="rect"><span class="propdef">[type fallback]</span></a></dt><dd>A keyword indicating whether the expected type
	 definition was unavailable and the element had a fallback type
	 as its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>
	 <ul><li><div class="p">
	    <b><i>declared</i></b> if the element information item has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> which has no <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>,
	    and also an
	    <code>xsi:type</code> attribute which fails to <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a> to
	    a type definition that <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the
	    declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>
	   </div></li><li><div class="p"> <b><i>selected</i></b> if the
	     element information item has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> with a
	     <a href="#ed-type_table" class="propref" shape="rect">{type table}</a> and also has an <code>xsi:type</code>
	     attribute which fails to <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a> to a type
	     definition that <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a>
	    </div></li><li><div class="p"><b><i>lax</i></b> if  the
	    element was <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a>
	    using <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
	   </div></li><li><div class="p"><b><i>none</i></b> otherwise </div></li></ul>
	</dd><dt><a id="e-type_alternative" name="e-type_alternative" shape="rect"><span class="propdef">[type alternative]</span></a></dt><dd>
	 If the element's <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> does not
	  have a <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>, then <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>; otherwise the first <a href="#tac" class="compref" shape="rect">Type Alternative</a> that
	  <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selected<span class="arrow">&#183;</span></a> the
	  element's <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a>, if any; otherwise the <a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>.
	</dd><dt><a id="e-local_type_validity" name="e-local_type_validity" shape="rect"><span class="propdef">[local type validity]</span></a></dt><dd>
	 The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the element information item was locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> as defined by
	   <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>, <b>then </b><b><i>valid</i></b></div><div class="clnumber">2 <b>otherwise </b>(the item was locally
	    <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>invalid<span class="arrow">&#183;</span></a> as defined by <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>) <b><i>invalid</i></b>.</div></div>
       </dd><dt><a id="e-descendent_validity" name="e-descendent_validity" shape="rect"><span class="propdef">[descendent validity]</span></a></dt><dd>
 The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>
    neither its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> nor its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> contains an
	   information item <b>I</b> (element or attribute
	   respectively) where either <b>I</b>'s <a href="#e-validity" class="propref" shape="rect">[validity]</a> is <b><i>invalid</i></b> or
	   <b>I</b> is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a strict <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>
	   and <b>I</b>'s
    <a href="#e-validity" class="propref" shape="rect">[validity]</a> is <b><i>notKnown</i></b>
	  , <b>then </b><b><i>valid</i></b>;</div><div class="clnumber">2 <b>otherwise </b><b><i>invalid</i></b>.</div></div>
       </dd></dl>
</div>
</div>
<div class="note"><div class="p"><b>Note:</b> The <span class="anonRef">[type definition
	 type]</span>, <span class="anonRef">[type definition
	 namespace]</span>, <span class="anonRef">[type
	 definition name]</span>, and <span class="anonRef">[type definition anonymous]</span>
	properties are redundant with the <span class="anonRef">[type definition]</span> property; they are
	defined for the convenience of implementations which wish to
	expose those specific properties but not the entire type
	definition.</div></div><div class="note"><div class="p"><b>Note:</b> 
	 When clause <a href="#c-evc" shape="rect">5.1</a> of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above
	 applies and the default or
	  fixed value constraint
	 <a href="#vc_a-value" class="propref" shape="rect">{value}</a>  is of type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> or <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a>,  it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> whether 
	 <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> occurs;
	 if it does not, the prefix used in the lexical representation
	 (in <a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a>) will not
	 necessarily map to the namespace name of the value (in <a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>).  To reduce problems and confusion, users may
	 prefer to ensure that the required namespace information item
	 is 
	 present in the input
	  infoset.
       </div></div><div class="p"><a name="anchor10662d" id="anchor10662d" shape="rect"></a>If 
	the
	 <a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> is not
	 <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> and
	the
	
	<a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> 
	is
       a simple type definition with
	<a href="#std-variety" class="propref" shape="rect">{variety}</a> <b><i>union</i></b>,
       or its <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> has <a href="#ct-variety" class="propref" shape="rect">{variety}</a>
	<b><i>simple</i></b> and <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type   definition}</a> a simple type definition with <a href="#std-variety" class="propref" shape="rect">{variety}</a> <b><i>union</i></b>, then  there
       are four additional
       properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-member_type_definition" name="e-member_type_definition" shape="rect"><span class="propdef">[member type definition]</span></a></dt><dd>An <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item
	 isomorphic<span class="arrow">&#183;</span></a> to the 
<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the
<a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>.
	
       </dd><dt><a id="e-member_type_definition_namespace" name="e-member_type_definition_namespace" shape="rect"><span class="propdef">[member type definition namespace]</span></a></dt><dd>The <a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>.</dd><dt><a id="e-member_type_definition_anonymous" name="e-member_type_definition_anonymous" shape="rect"><span class="propdef">[member type definition anonymous]</span></a></dt><dd><b><i>true</i></b> if the
	<a href="#std-name" class="propref" shape="rect">{name}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> is
	<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise
	<b><i>false</i></b>.</dd><dt><a id="e-member_type_definition_name" name="e-member_type_definition_name" shape="rect"><span class="propdef">[member type definition name]</span></a></dt><dd>The <a href="#std-name" class="propref" shape="rect">{name}</a> of the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>, if it is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.  If it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, schema processors <span class="rfc2119">may</span>, but
	need not, provide a value unique to the definition. It
	  is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor provides a name for
	  such a type definition.  If a processor does
	 provide a value in this situation, the choice of what value
	 to use is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
       </dd></dl>
</div>
</div>
<div class="p">The <a href="#e-type_definition" class="propref" shape="rect">[type definition]</a>
	property is provided for applications such as query
	processors which need access to the full range of details about
	an item's <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, for
	example the type hierarchy; the <a href="#e-type_definition_type" class="propref" shape="rect">[type definition   type]</a>,
	<a href="#e-type_definition_namespace" class="propref" shape="rect">[type definition namespace]</a>,
	<a href="#e-type_definition_name" class="propref" shape="rect">[type definition name]</a>, and
	<a href="#e-type_definition_anonymous" class="propref" shape="rect">[type definition anonymous]</a> properties are defined
	for the convenience of those specifying
	lighter-weight interfaces, in which
	exposing the entire type hierarchy and full component details
	might be a significant
	burden.</div><div class="p">
 If
 <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
   the <a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> is not
	  <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;
	 </span></div>
<div class="clnumber">2 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
    the simple type  definition used to validate the
	    <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> (either the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> or its
	    <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type       definition}</a>) has <a href="#std-variety" class="propref" shape="rect">{variety}</a>
	     = <b><i>list</i></b>;
	   </span></div>
<div class="clnumber">2.2 <span class="p">
	    the simple type  definition has <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>union</i></b> and the
	    <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the
	    <a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> has
	    <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>;
	  </span></div>
</div></div>
<div class="clnumber">3 <span class="p">
   the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of the list
	  type (from the previous clause) has <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>union</i></b>;
	 </span></div>
</div> then there is an additional property:
      </div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-member_type_definitions" name="e-member_type_definitions" shape="rect"><span class="propdef">[member type definitions]</span></a></dt><dd>
  a sequence of <a href="#std" class="compref" shape="rect">Simple Type Definition</a> components, with the same length
	as the
  <a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>, each one an
	<a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to the
	
 <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of the corresponding
	
 item in the <a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>.
       </dd></dl>
</div>
</div>
<div class="p">Also, if the declaration has a <a href="#ed-value_constraint" class="propref" shape="rect">{value  constraint}</a>, the item has a property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-schema_default" name="e-schema_default" shape="rect"><span class="propdef">[schema default]</span></a></dt><dd>
	 The
	 <a href="#vc_e-lexical_form" class="propref" shape="rect">{lexical form}</a> 
	 of the declaration's 
	 <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>.</dd></dl>
</div>
</div>
<div class="p">Note that if an element is <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a>, then the <a href="#e-type_definition" class="propref" shape="rect">[type definition]</a> and
<a href="#e-member_type_definition" class="propref" shape="rect">[member type definition]</a> properties, or
       their alternatives, are based on <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.</div></div></div></div><div class="div4">
<h5><a name="sec-sic-eltDefault" id="sec-sic-eltDefault" shape="rect"></a>3.3.5.5 Element Default Value</h5><div class="constraintnote"><a id="sic-eltDefault" name="sic-eltDefault" shape="rect"></a><b>Schema Information Set Contribution: Element Default Value</b><br clear="none" /><div class="constraint"><div class="p">If and only if the local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a>,
       as defined by <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above, of an element
       information item has been assessed, in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> the item
       has a property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-schema_specified" name="e-schema_specified" shape="rect"><span class="propdef">[schema specified]</span></a></dt><dd>
	The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b> clause <a href="#c-evc" shape="rect">5.1</a> of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> above applies, <b>then </b>
	   <b><i>schema</i></b>. </div><div class="clnumber">2 <b>otherwise </b><b><i>infoset</i></b>.</div></div></dd></dl>
</div>
</div>
</div></div><p>See also <a href="#sic-match-info" shape="rect">Match Information (&#167;3.4.5.2)</a>,
      <a href="#sic-key" shape="rect">Identity-constraint Table (&#167;3.11.5)</a>, <a href="#sic-notation-used" shape="rect">Validated with Notation (&#167;3.14.5)</a>,
      and
      <a href="#sic-schema" shape="rect">Schema Information (&#167;3.17.5.1)</a>, which describe other information set contributions
       related to element information items. 
     </p></div><div class="div4">
<h5><a name="Inherited_attributes" id="Inherited_attributes" shape="rect"></a>3.3.5.6 Inherited Attributes</h5><div class="constraintnote"><a id="sic-inheritedAttrs" name="sic-inheritedAttrs" shape="rect"></a><b>Schema Information Set Contribution: Inherited Attributes</b><br clear="none" /><div class="constraint"><div class="p"><div class="termdef"><a name="key-p-inherited" id="key-p-inherited" title="" shape="rect">[Definition:]&#160;&#160;</a>An attribute
       information item <var>A</var>, whether explicitly specified in the input
       information set or defaulted as described in
       <a href="#sic-attrDefault" shape="rect">Attribute Default Value (&#167;3.4.5.1)</a>, is <b>potentially inherited</b> by
       an element information item <var>E</var> if and only if
       <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
         <var>A</var> is among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of one of <var>E</var>'s ancestors.
        </span></div>
<div class="clnumber">2 <span class="p">
         <var>A</var> and <var>E</var> have the same
         <span class="anonRef">[validation context]</span>.
        </span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *--><b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">
          <var>A</var> is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an <a href="#au" class="compref" shape="rect">Attribute Use</a> whose
          <a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a> = <b><i>true</i></b>.
         </span></div>
<div class="clnumber">3.2 <span class="p">
          <var>A</var> is <em>not</em> <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> any <a href="#au" class="compref" shape="rect">Attribute Use</a>
          but <var>A</var> has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> whose
          <a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a> = <b><i>true</i></b>.
         </span></div>
</div></div>
</div>
      </div></div><div class="p">If and only if an element information item <var>P</var> is not
       <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> (that is, it is either
       <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly<span class="arrow">&#183;</span></a> or
       <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly<span class="arrow">&#183;</span></a> assessed), in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> each of
       <var>P</var>'s element information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> <var>E</var> which is not
       <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> a <b><i>skip</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a>, has a
       property:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-inherited_attributes" name="e-inherited_attributes" shape="rect"><span class="propdef">[inherited attributes]</span></a></dt><dd>
        A list of attribute information items. An attribute information item
        <var>A</var> is included if and only if <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
          <var>A</var> is <a href="#key-p-inherited" class="termref" shape="rect"><span class="arrow">&#183;</span>potentially inherited<span class="arrow">&#183;</span></a> by <var>E</var>.
         </span></div>
<div class="clnumber">2 <span class="p">
          Let <var>O</var> be <var>A</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a>. <var>A</var> does not have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
          as another attribute which is also <a href="#key-p-inherited" class="termref" shape="rect"><span class="arrow">&#183;</span>potentially inherited<span class="arrow">&#183;</span></a> by <var>E</var>
          and whose <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a> is a descendant of <var>O</var>.
         </span></div>
</div>
       </dd></dl>
</div>
</div>
</div></div></div></div><div class="div3">
<h4><a name="coss-element" id="coss-element" shape="rect"></a>3.3.6 Constraints on Element Declaration Schema Components</h4><p>All element declarations (see <a href="#cElement_Declarations" shape="rect">Element Declarations (&#167;3.3)</a>) <span class="rfc2119">must</span> satisfy the following
      constraint.</p><div class="div4">
<h5><a name="sec-e-props-correct" id="sec-e-props-correct" shape="rect"></a>3.3.6.1 Element Declaration Properties Correct</h5><div class="constraintnote"><a id="e-props-correct" name="e-props-correct" shape="rect"></a><b>Schema Component Constraint: Element Declaration Properties Correct</b><br clear="none" /><div class="constraint"><div class="p">
	For 
	  any element declaration <var>E</var>,
	<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of <var>E</var>'s properties 
	   .
	   are as described in the property tableau in
	   <a href="#Element_Declaration_details" shape="rect">The Element Declaration Schema Component (&#167;3.3.1)</a>, modulo the
	   impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">If <var>E</var> has a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
	   <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>,
	 then 
	     <var>E</var>.<a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> 
	    is a valid default with
	   respect to <var>E</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> 
	   as defined in <a href="#cos-valid-default" shape="rect">Element Default Valid (Immediate) (&#167;3.3.6.2)</a>.</span></div>
<div class="clnumber">3 <span class="p">If <var>E</var>.<a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> is 
	    non-empty, then 
	   
	    <var>E</var>.<a href="#ed-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_e-variety" class="propref" shape="rect">{variety}</a> 
	    = <b><i>global</i></b>.</span></div>
<div class="clnumber">4<a id="c-vs-sg" name="c-vs-sg" shape="rect"> </a><span class="p">For each member <var>M</var> of <var>E</var>.<a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a>,
	  <var>E</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> 
	  is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>M</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>, 
	  subject to the blocking keywords 
	  in <var>M</var>.<a href="#ed-substitution_group_exclusions" class="propref" shape="rect">{substitution group exclusions}</a>.
	 </span></div>
<div class="clnumber">5 <span class="p">There are no circular substitution groups.
	    That is, it is not possible to return to 
	   <var>E</var> 
	   by repeatedly following any member of the
	   <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> property.</span></div>
<div class="clnumber">6 <span class="p">If <var>E</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a> exists, 
	   then 
	   for each <a href="#tac" class="compref" shape="rect">Type Alternative</a> in 
	   <var>E</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a>,
	   the <a href="#tac-test" class="propref" shape="rect">{test}</a> property is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	  </span></div>
<div class="clnumber">7 <!--* no span class='p' possible here *-->If <var>E</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a> exists, 
	    then for each <a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> <var>T</var> in 
	    <var>E</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a>, and also for 
	     <var>E</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a>,
	   <b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">7.1 <span class="p"><var>T</var> is
	       <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>E</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>, subject
	       to the blocking keywords of <var>E</var>.<a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a>.</span></div>
<div class="clnumber">7.2 <span class="p"><var>T</var> is the type
	       <a href="#key-error" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:error</code><span class="arrow">&#183;</span></a>.</span></div>
</div>
	  </div>
</div>
       </div></div></div></div><div class="div4">
<h5><a name="sec-cos-valid-default" id="sec-cos-valid-default" shape="rect"></a>3.3.6.2 Element Default Valid (Immediate)</h5><p>
       This and the following sections
       define relations appealed to
       elsewhere in this specification.</p><div class="constraintnote"><a id="cos-valid-default" name="cos-valid-default" shape="rect"></a><b>Schema Component Constraint: Element Default Valid (Immediate)</b><br clear="none" /><div class="constraint"><div class="p">For a 
	<a href="#vc_e" class="compref" shape="rect">Value Constraint</a> 
	<var>V</var>
	to be a
	valid default with respect to a type definition <var>T</var>
	
	the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <b>If </b><var>T</var> is a simple type
	   definition or a complex type
	    definition with
	     <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>simple</i></b>
	  , <b>then </b>
	   <var>V</var> is a valid default
	    with respect either
	    to <var>T</var> (if <var>T</var> is simple) or 
	     (if <var>T</var> is complex) to
	    
	     <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>
	    as defined by <a href="#cos-valid-simple-default" shape="rect">Simple Default Valid (&#167;3.2.6.2)</a>.
	  </div><div class="clnumber">2 <b>If </b><var>T</var> is a complex type definition
	  with <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> 
	    &#8800; <b><i>simple</i></b>
	  , <b>then </b>
       <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>mixed</i></b>.</span></div>
<div class="clnumber">2.2 <span class="p">The particle <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
	      is <a href="#cd-emptiable" class="termref" shape="rect"><span class="arrow">&#183;</span>emptiable<span class="arrow">&#183;</span></a>
	      as defined by <a href="#cos-group-emptiable" shape="rect">Particle Emptiable (&#167;3.9.6.3)</a>.</span></div>
</div>
	 </div></div>
	
      </div></div></div></div><div class="div4">
<h5><a name="sec-cos-equiv-derived-ok-rec" id="sec-cos-equiv-derived-ok-rec" shape="rect"></a>3.3.6.3 Substitution Group OK (Transitive)</h5><div class="constraintnote"><a id="cos-equiv-derived-ok-rec" name="cos-equiv-derived-ok-rec" shape="rect"></a><b>Schema Component Constraint: Substitution Group OK (Transitive)</b><br clear="none" /><div class="constraint"><div class="p">For an element declaration (call it <b>M</b>,
       for member) to be
        substitutable
       for another element declaration (call it <b>H</b>,
       for head)
	at least
    <b>one</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><b>M</b> and <b>H</b> are the same element
	  declaration.</span></div>
<div class="clnumber">2 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
	    <b>H</b>.
	    <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> does not contain
	    <b><i>substitution</i></b>.</span></div>
<div class="clnumber">2.2 <span class="p">There is a chain of <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a>
	      properties from
	    <b>M</b> to <b>H</b>, that is, either
	    <b>M</b>.<a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> contains <b>H</b>, or
	    <b>M</b>.<a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a> contains a declaration whose <a href="#ed-substitution_group_affiliations" class="propref" shape="rect">{substitution group affiliations}</a>
	     contains <b>H</b>, or . . .</span></div>
<div class="clnumber">2.3 <span class="p">The set of all 
	     <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>s involved in 
	     the <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> of <var>M</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> from
	      <var>H</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> does not
	     intersect with the union of 
	     (1)
	     <var>H</var>.<a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a>, 
	     (2)
	     <var>H</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.<a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> 
	      (if <b>H</b>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> is complex, otherwise
	      the empty set), 
	     and 
	     (3)
	     the
	     <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>
	     (respectively the empty set) of any intermediate
	     declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>s
	     in the <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> of <var>M</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> from
	       <var>H</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</span></div>
</div></div>
</div>
    
      </div></div></div></div><div class="div4">
<h5><a name="sec-cos-equiv-class" id="sec-cos-equiv-class" shape="rect"></a>3.3.6.4 Substitution Group</h5><p><span class="termdef"><a name="key-validly-sub" id="key-validly-sub" title="" shape="rect">[Definition:]&#160;&#160;</a>One element declaration is <b> substitutable</b>
       for another if together they satisfy constraint <a href="#cos-equiv-derived-ok-rec" shape="rect">Substitution Group OK (Transitive) (&#167;3.3.6.3)</a>.</span> </p><p><span class="termdef"><a name="key-eq" id="key-eq" title="" shape="rect">[Definition:]&#160;&#160;</a> Every element declaration (call this
       <b>HEAD</b>) in the <a href="#s-element_declarations" class="propref" shape="rect">{element  declarations}</a> of a schema defines a <b>substitution
	group</b>, a subset of those <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>. An element declaration is in
       the <b>substitution group</b> of <b>HEAD</b> if
       and only if it is <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a> for
       <b>HEAD</b>. </span></p></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cElement_Declarations" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cAttributeUse" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="Complex_Type_Definitions" id="Complex_Type_Definitions" shape="rect"></a>3.4 Complex Type Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.1 <a href="#Complex_Type_Definition_details" shape="rect">The Complex Type Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2 <a href="#declare-type" shape="rect">XML Representation of Complex Type Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.1 <a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.2 <a href="#dcl.ctd.ctsc" shape="rect">Mapping Rules for Complex Types with Simple Content</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.3 <a href="#dcl.ctd.ctcc" shape="rect">Mapping Rules for Complex Types with Complex Content</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.4 <a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.5 <a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.6 <a href="#dcl.ctd.exx" shape="rect">Examples of Complex Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.3 <a href="#sec-src-ct" shape="rect">Constraints on XML Representations of Complex Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4 <a href="#formal-complex-type" shape="rect">Complex Type Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4.1 <a href="#sec-cdtt" shape="rect">Locally Declared Type</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4.2 <a href="#sec-cvc-complex-type" shape="rect">Element Locally Valid (Complex Type)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4.3 <a href="#sec-cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4.4 <a href="#sec-particle-attribution" shape="rect">Attribution
      </a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.5 <a href="#sec-ctdsic" shape="rect">Complex Type Definition Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.5.1 <a href="#sec-sic-attrDefault" shape="rect">Attribute Default Value</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.5.2 <a href="#sec-sic-match-info" shape="rect">Match Information</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6 <a href="#coss-ct" shape="rect">Constraints on Complex Type Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.1 <a href="#sec-ct-props-correct" shape="rect">Complex Type Definition Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.2 <a href="#sec-cos-ct-extends" shape="rect">Derivation Valid (Extension)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.3 <a href="#sec-derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.4 <a href="#sec-cos-content-act-restrict" shape="rect">Content Type Restricts (Complex Content)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.5 <a href="#sec-cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.7 <a href="#builtin-ctd" shape="rect">Built-in Complex Type Definition</a><br clear="none" />
</div><p>Complex Type Definitions provide for:</p><ul><li><div class="p">Constraining element information items by providing <a href="#Attribute_Declaration" shape="rect">Attribute Declaration (&#167;2.2.2.3)</a>s governing the appearance and content of
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a></div></li><li><div class="p">Constraining element information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> to be empty,
or to conform to a specified element-only or mixed content model, or else
constraining the character information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> to conform to a
specified simple type definition.</div></li><li><div class="p">Constraining 
elements and attributes to exist,
not to exist, or to have specified values, with <a href="#Assertion" shape="rect">Assertion (&#167;2.2.4.3)</a>s.</div></li><li><div class="p">Using the mechanisms of <a href="#Type_Derivation" shape="rect">Type Definition Hierarchy (&#167;2.2.1.1)</a> to <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derive<span class="arrow">&#183;</span></a> a complex type from another simple or complex type.</div></li><li><div class="p">Specifying <a href="#gloss-sic" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset contributions<span class="arrow">&#183;</span></a> for elements. </div></li><li><div class="p">Limiting the ability to <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derive<span class="arrow">&#183;</span></a> additional types from a given complex type.</div></li><li><div class="p">Controlling the permission to substitute, in an instance, elements of a <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
type for elements declared in a content model to be of a given complex type.</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="PurchaseOrderType"&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="shipTo" type="USAddress"/&gt;
   &lt;xs:element name="billTo" type="USAddress"/&gt;
   &lt;xs:element ref="comment" minOccurs="0"/&gt;
   &lt;xs:element name="items"  type="Items"/&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="orderDate" type="xs:date"/&gt;
 &lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p">The XML representation of a complex type definition.</div></div></div><div class="div3">
<h4><a name="Complex_Type_Definition_details" id="Complex_Type_Definition_details" shape="rect"></a>3.4.1 The Complex Type Definition Schema Component</h4><p>A complex type definition schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ctd" id="ctd" shape="rect">Complex Type Definition</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ctd-annotations" shape="rect" id="ctd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="ctd-name" shape="rect" id="ctd-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value.  Optional.</div>
</div>
<div class="propDefn"><a name="ctd-target_namespace" shape="rect" id="ctd-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value.  Optional.</div>
</div>
<div class="propDefn"><a name="ctd-base_type_definition" shape="rect" id="ctd-base_type_definition"></a><div class="pdName"><span class="propdef">{base type definition}</span></div>
<div class="pdDef">
A  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#" class="compref" shape="rect">type definition</a> component.  Required.</div>
</div>
<div class="propDefn"><a name="ctd-final" shape="rect" id="ctd-final"></a><div class="pdName"><span class="propdef">{final}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>
    A subset of {<em>extension</em>, <em>restriction</em>}.
   </p></div>
</div>
</div>
<div class="propDefn"><a name="ctd-context" shape="rect" id="ctd-context"></a><div class="pdName"><span class="propdef">{context}</span></div>
<div class="pdDef">
Required if <a href="#ctd-name" class="propref" shape="rect">{name}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>,
    otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.<div class="ownDesc">
<p>Either 
    
    
    an <a href="#ed" class="compref" shape="rect">Element Declaration</a>
    or a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>.</p></div>
</div>
</div>
<div class="propDefn"><a name="ctd-derivation_method" shape="rect" id="ctd-derivation_method"></a><div class="pdName"><span class="propdef">{derivation method}</span></div>
<div class="pdDef">
One of {<span class="enumval">extension</span>, <span class="enumval">restriction</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="ctd-abstract" shape="rect" id="ctd-abstract"></a><div class="pdName"><span class="propdef">{abstract}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
<div class="propDefn"><a name="ctd-attribute_uses" shape="rect" id="ctd-attribute_uses"></a><div class="pdName"><span class="propdef">{attribute uses}</span></div>
<div class="pdDef">
A set of  <a href="#au" class="compref" shape="rect">Attribute Use</a> components.  </div>
</div>
<div class="propDefn"><a name="ctd-attribute_wildcard" shape="rect" id="ctd-attribute_wildcard"></a><div class="pdName"><span class="propdef">{attribute wildcard}</span></div>
<div class="pdDef">
A  <a href="#w" class="compref" shape="rect">Wildcard</a> component.  Optional.</div>
</div>
<div class="propDefn"><a name="ctd-content_type" shape="rect" id="ctd-content_type"></a><div class="pdName"><span class="propdef">{content type}</span></div>
<div class="pdDef">
A  <a href="#ct" class="compref" shape="rect">Content Type</a> property record.  Required.</div>
</div>
<div class="propDefn"><a name="ctd-prohibited_substitutions" shape="rect" id="ctd-prohibited_substitutions"></a><div class="pdName"><span class="propdef">{prohibited substitutions}</span></div>
<div class="pdDef">
A subset of {<span class="enumval">extension</span>, <span class="enumval">restriction</span>}.</div>
</div>
<div class="propDefn"><a name="ctd-assertions" shape="rect" id="ctd-assertions"></a><div class="pdName"><span class="propdef">{assertions}</span></div>
<div class="pdDef">
A sequence of  <a href="#as" class="compref" shape="rect">Assertion</a> components.  </div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="ct" id="ct" shape="rect">Content Type</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ct-variety" shape="rect" id="ct-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">empty</span>, <span class="enumval">simple</span>, <span class="enumval">element-only</span>, <span class="enumval">mixed</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="ct-particle" shape="rect" id="ct-particle"></a><div class="pdName"><span class="propdef">{particle}</span></div>
<div class="pdDef">
A  <a href="#p" class="compref" shape="rect">Particle</a> component.  Required if <a href="#ct-variety" class="propref" shape="rect">{variety}</a> is <b><i>element-only</i></b> or <b><i>mixed</i></b>, otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div>
</div>
<div class="propDefn"><a name="ct-open_content" shape="rect" id="ct-open_content"></a><div class="pdName"><span class="propdef">{open content}</span></div>
<div class="pdDef">
An  <a href="#oc" class="compref" shape="rect">Open Content</a> property record.  Optional if <a href="#ct-variety" class="propref" shape="rect">{variety}</a> is <b><i>element-only</i></b> or <b><i>mixed</i></b>, otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div>
</div>
<div class="propDefn"><a name="ct-simple_type_definition" shape="rect" id="ct-simple_type_definition"></a><div class="pdName"><span class="propdef">{simple type definition}</span></div>
<div class="pdDef">
A  <a href="#std" class="compref" shape="rect">Simple Type Definition</a> component.  Required if <a href="#ct-variety" class="propref" shape="rect">{variety}</a> is <b><i>simple</i></b>, otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="oc" id="oc" shape="rect">Open Content</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="oc-mode" shape="rect" id="oc-mode"></a><div class="pdName"><span class="propdef">{mode}</span></div>
<div class="pdDef">
One of {<span class="enumval">interleave</span>, <span class="enumval">suffix</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="oc-wildcard" shape="rect" id="oc-wildcard"></a><div class="pdName"><span class="propdef">{wildcard}</span></div>
<div class="pdDef">
A  <a href="#w" class="compref" shape="rect">Wildcard</a> component.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>Complex type definitions are identified by their <a href="#ctd-name" class="propref" shape="rect">{name}</a> and <a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a>.  Except
for anonymous complex type definitions (those with no <a href="#ctd-name" class="propref" shape="rect">{name}</a>), since
type definitions (i.e. both simple and complex type definitions taken together) <span class="rfc2119">must</span> be uniquely identified within an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>, no complex type definition can have the same name as another
simple or complex type definition.  Complex type <a href="#ctd-name" class="propref" shape="rect">{name}</a>s and <a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a>s
are provided for reference from
instances (see <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a>), and for use in the XML
representation of schema components
(specifically in <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>).  See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for the use of component
identifiers when importing one schema into another.</p><div class="note"><div class="p"><b>Note:</b> The <a href="#ctd-name" class="propref" shape="rect">{name}</a> of a complex type is not <em>ipso
facto</em> the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[(local) name]</a> of the
  element information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by that definition. The connection between a
  name and a type definition is described in <a href="#cElement_Declarations" shape="rect">Element Declarations (&#167;3.3)</a>. </div></div><p>As described in <a href="#Type_Derivation" shape="rect">Type Definition Hierarchy (&#167;2.2.1.1)</a>, each complex type is <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> which is itself either a <a href="#Simple_Type_Definition" shape="rect">Simple Type Definition (&#167;2.2.1.2)</a> or a <a href="#Complex_Type_Definition" shape="rect">Complex Type Definition (&#167;2.2.1.3)</a>.  <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> specifies the means of <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> as either <b><i>extension</i></b> or <b><i>restriction</i></b> (see <a href="#Type_Derivation" shape="rect">Type Definition Hierarchy (&#167;2.2.1.1)</a>).</p><p>A complex type with an empty specification for <a href="#ctd-final" class="propref" shape="rect">{final}</a> can be used as a
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> for other types <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by either of
extension or restriction; the explicit values <b><i>extension</i></b>, and <b><i>restriction</i></b> prevent further
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivations<span class="arrow">&#183;</span></a> by extension and restriction respectively.  If all values are specified, then <span class="termdef"><a name="key-ct-final" id="key-ct-final" title="" shape="rect">[Definition:]&#160;&#160;</a>the complex type is said to be
<b>final</b>, because no
further <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivations<span class="arrow">&#183;</span></a> are possible</span>.  Finality is <em>not</em>
inherited, that is, a type definition <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by restriction from a type
definition which is final for extension is not itself, in the absence of any
explicit <code>final</code> attribute of its own, final for anything.</p><p>The <a href="#ctd-context" class="propref" shape="rect">{context}</a> property is only relevant for anonymous type
definitions, for which its value is the component in which this type
definition appears as the value of a property, e.g.
<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</p><p>Complex types for which <a href="#ctd-abstract" class="propref" shape="rect">{abstract}</a> is
<b><i>true</i></b> have
no valid instances and thus cannot be used in the normal way as 
the <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> for the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> 
of element information items (if for some reason an abstract
type is identified as the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> of an element
information item, the item will invariably be invalid).  It
follows that such
abstract types <span class="rfc2119">must not</span> be referenced from an
<a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a> attribute in an instance document.  Abstract
complex types can be used as <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>s, or even as
the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>s of element declarations, provided in every
case a concrete <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> type definition is used for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, either via <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a> or the operation of a <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution        group<span class="arrow">&#183;</span></a>.</p><p><a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> are a set of attribute uses.  See <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>
and <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a> for details of attribute <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>.</p><p><a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>s provide a more flexible specification for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of
attributes not explicitly included in <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>.


See <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>, <a href="#Wildcard_details" shape="rect">The Wildcard Schema Component (&#167;3.10.1)</a> and
<a href="#cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name (&#167;3.10.4.2)</a> for formal
details of attribute wildcard <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>. </p><div class="block"><a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> determines the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of element information items.  Informally:
<ul><li><div class="p">A <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>empty</i></b> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> elements
with no character or element information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</div></li><li><div class="p">A <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>simple</i></b> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a>
elements with character-only <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>using its <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>.</div></li><li><div class="p">A <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>element-only</i></b> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> elements with <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> that
conform to the <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content model<span class="arrow">&#183;</span></a> supplied by its <a href="#ct-particle" class="propref" shape="rect">{particle}</a>.</div></li><li><div class="p">A <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>mixed</i></b> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> elements whose element <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> (i.e. specifically ignoring other <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> such as character information items)
conform to the <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content model<span class="arrow">&#183;</span></a> supplied by its <a href="#ct-particle" class="propref" shape="rect">{particle}</a>.</div></li><li><div class="p">
 A <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>

 <a href="#ct-open_content" class="propref" shape="rect">{open content}</a> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a>
 elements with some <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> conforming to the
 <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content model<span class="arrow">&#183;</span></a>
 and
 others conforming to
 the <a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.
</div></li></ul>
</div><div class="note"><div class="p"><b>Note:</b> 
       Not all combinations of <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> and <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
       are compatible with all properties of the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.  For example,
       it is not allowed to derive a complex type with complex content
       from a simple type. 
       The XML mapping rules specified in the following
       section 
       (in particular  clause <a href="#c-ctsc-bad" shape="rect">5</a>
       of the rule for 
	the 
	<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>
	in the rule for 
	<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
	of complex types with simple content, and
       clause <a href="#c-ctr" shape="rect">4.1</a> 
       and 
       clause <a href="#c-ctes" shape="rect">4.2.1</a>
       of the rule for 
	<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
       for complex types with complex content)
       do not detect such incompatible combinations of properties;
       in such cases the mapping rules will build a complex type
       regardless of the fact that the properties specified are
       incompatible.  But the resulting complex type does
       not satisfy component rules outlined in <a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension) (&#167;3.4.6.2)</a>
       or <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>.       
     </div></div><div class="block"><a name="anchor6382" id="anchor6382" shape="rect"></a>
The <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> property of a complex type definition <var>T</var> determines
whether type definitions derived from <var>T</var> are or are not
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var>.  Examples include (but are not limited
to) the substitution of another type definition:
      <ul><li><div class="p">as the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> of an element instance <var>E</var>,
	 when <var>T</var> is the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var> 
	 (often, the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of <var>E</var>'s
	 <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>); this can occur when <var>E</var> specifies a type
	 definition using the <code>xsi:type</code> attribute; 
	 see <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a>;
	</div></li><li><div class="p">as the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of an element instance <var>E</var>,
	 when <var>T</var> is the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of <var>E</var>'s
	 <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>; this can occur when conditional type
	 assignment is used; 
	 see <a href="#cTypeAlternative" shape="rect">Type Alternatives (&#167;3.12)</a>;
	</div></li><li><div class="p">as the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> of element instances
	 whose <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> is included in a model group only 
	 <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>,
	 by virtue of being included in the
	 <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a> of
	 some element declaration present <a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly<span class="arrow">&#183;</span></a>
	 <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly<span class="arrow">&#183;</span></a>
	 in the model group, whose declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> is <var>T</var>.
	</div></li><li><div class="p">
        as the <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of an
        <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>E1</var> where <ul><li><div class="p">
          <var>E1</var> is contained in a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> <var>D</var>
         </div></li><li><div class="p">
          <var>D</var> is derived from another <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> <var>B</var>
         </div></li><li><div class="p">
          <var>B</var> contains an <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>E2</var> that has the same
          <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as <var>E1</var>
         </div></li><li><div class="p">
          <var>E2</var> has <var>T</var> as its <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.
         </div></li></ul>
       </div></li></ul>
If <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> is empty,
then all such substitutions are allowed;
if it contains the keyword <b><i>restriction</i></b>, then no type definition is
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var> if its derivation from <var>T</var> involves
any restriction steps;
if <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> contains 
the keyword <b><i>extension</i></b>, then no type definition is
<a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var> if its derivation from <var>T</var> involves
any extension steps.</div><div class="notice"><p><b>Editorial Note: </b><span style="color: red">Priority Feedback Request</span></p><p style="color: black;"><span class="edtext">
In version 1.0 of this specification, <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>
of a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> is only used when type substitution
(<code>xsi:type</code>) or element substitution (substitution groups) appear in
the instance document. It has been changed to take effect whenever complex type
derivation is checked, including cases beyond type and element substitutions in
instance documents. In particular, it affects
clause <a href="#c-vs-sg" shape="rect">4</a> of <a href="#e-props-correct" shape="rect">Element Declaration Properties Correct (&#167;3.3.6.1)</a>,

clause <a href="#c-vs-ctd-e" shape="rect">1.6</a> of <a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension) (&#167;3.4.6.2)</a>,
clause <a href="#c-vs-ctd-r" shape="rect">4</a> of <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>,
and clause <a href="#c-vs-ct" shape="rect">4.5</a> of <a href="#cos-content-act-restrict" shape="rect">Content type restricts (Complex Content) (&#167;3.4.6.4)</a>.
Because of the consideration of <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>,
existing schemas may be rendered invalid by the above rules. The XML Schema Working Group
solicits input from implementors and users of this specification as to whether
this change is desirable and acceptable.
</span></p></div><p><a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> constrain 
 
elements and attributes
to exist, not to exist, or to 
have specified values.
Though specified as a sequence, the order
among the assertions is not significant during assessment.
See <a href="#cAssertions" shape="rect">Assertions (&#167;3.13)</a>.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#ctd-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-type" id="declare-type" shape="rect"></a>3.4.2 XML Representation of Complex Type Definition Schema Components</h4><p>The XML representation for a complex type definition schema component is a
      <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information item.</p><p>The XML representation for complex type definitions with a
      <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> with <a href="#ct-variety" class="propref" shape="rect">{variety}</a>
       <b><i>simple</i></b> is significantly different from that
      of those with other <a href="#ctd-content_type" class="propref" shape="rect">{content        type}</a>s, and this is reflected in the presentation below,
      which describes
       the mappings for the two cases in separate subsections.
       Common mapping rules are factored out and given in 
       separate sections.
       As always, the mapping rules
       given here apply after, not before, the appropriate
       <a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>.
     </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>complexType</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-complexType" name="element-complexType" shape="rect">&lt;complexType</a><br clear="none" />&#160;&#160;abstract = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;block = 
  
  (<var>#all</var> | List of (<var>extension</var> | <var>restriction</var>))
 <br clear="none" />&#160;&#160;final = 
  
  (<var>#all</var> | List of (<var>extension</var> | <var>restriction</var>))
 <br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;mixed = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;defaultAttributesApply = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a>&#160;:&#160;true<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-simpleContent" class="eltref" shape="rect">simpleContent</a> | <a href="#element-complexContent" class="eltref" shape="rect">complexContent</a> | (<a href="#element-openContent" class="eltref" shape="rect">openContent</a>?, (<a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-all" class="eltref" shape="rect">all</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a>)?, ((<a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>)*, <a href="#element-anyAttribute" class="eltref" shape="rect">anyAttribute</a>?), <a href="#element-assert" class="eltref" shape="rect">assert</a>*)))<br clear="none" />&lt;/complexType&gt;</p></div></div><div class="note"><div class="p"><b>Note:</b> 
       It is
	a consequence of the concrete syntax given above that
       a top-level
       type definition need consist of no more than a name, i.e. that
       <code>&lt;complexType name="anyThing"/&gt;</code> is allowed.
      </div></div><div class="note"><div class="p"><b>Note:</b> 
       Aside from the simple coherence requirements outlined below, the requirement that type
       definitions identified as restrictions actually <em>be</em>
       restrictions &#8212; that is, the requirement that they accept
       as valid only a subset of the items which are accepted as valid
       by their base type definition &#8212; is enforced in <a href="#coss-ct" shape="rect">Constraints on Complex Type Definition Schema Components (&#167;3.4.6)</a>.</div></div><div class="block">The following sections describe
      different sets of mapping rules for complex types; some
      are common to all or many source declarations, others
      only in specific circumstances.
      <ul><li><div class="p">If the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration
	 has a <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> element as a child,
	 then it maps to a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> using the mapping
	 rules in
	 <ul><li><div class="p"><a href="#dcl.ctd.ctsc" shape="rect">Mapping Rules for Complex Types with Simple Content (&#167;3.4.2.2)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, and</div></li><li><div class="p"><a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.</div></li></ul>
	</div></li><li><div class="p">If the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration
	 has a <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> element as a child,
	 then it maps to a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> using the mapping
	 rules in
	 <ul><li><div class="p"><a href="#dcl.ctd.ctcc.explicit" shape="rect">Mapping Rules for Complex Types with Explicit Complex Content (&#167;3.4.2.3.1)</a>, </div></li><li><div class="p"><a href="#dcl.ctd.ctcc.common" shape="rect">Mapping Rules for Content Type Property of Complex Content (&#167;3.4.2.3.3)</a>, </div></li><li><div class="p"><a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, and</div></li><li><div class="p"><a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.</div></li></ul>
	 
	</div></li><li><div class="p">If the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration
	 has neither a 
	 <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> nor a
	 <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> element as a child,
	 then it maps to a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> using the mapping
	 rules in
	 <ul><li><div class="p"><a href="#dcl.ctd.ctcc.implicit" shape="rect">Mapping Rules for Complex Types with Implicit Complex Content (&#167;3.4.2.3.2)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.ctcc.common" shape="rect">Mapping Rules for Content Type Property of Complex Content (&#167;3.4.2.3.3)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,</div></li><li><div class="p"><a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, and</div></li><li><div class="p"><a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.</div></li></ul>
	</div></li></ul>
     </div><p>Where convenient, the mapping rules are
      described exclusively in terms of the schema document's
      information set.  The mappings, however, depend not only upon
      the source declaration but also upon the schema context. Some
      mappings, that is, depend on the properties of other components
      in the schema.  In particular, several of the mapping rules
      given in the following sections depend upon the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> having
      been identified before they apply.</p><div class="div4">
<h5><a name="dcl.ctd.common" id="dcl.ctd.common" shape="rect"></a>3.4.2.1 Common Mapping Rules for Complex Type Definitions</h5><p id="xr.ct1">Whichever
      alternative for the content of <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> is
      chosen, the following property mappings 
       apply.
	Except where otherwise specified, attributes and child
	elements are to be sought among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element.
       </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
	the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor element information item if present,
	otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-abstract" class="propref" shape="rect">{abstract}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>abstract</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<b><i>false</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a></div><div class="mapRepr">A set
	corresponding to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>block</code>
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the ancestor
	<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item, if present,
	otherwise on the empty string.  Call this the
	<b>EBV</b> (for effective block value).  Then the
	value of this property is
	the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <b>EBV</b> is the empty string, <b>then </b>the empty set;</div><div class="clnumber">2 <b>If </b>the <b>EBV</b> is <code>#all</code>, <b>then </b><code>{</code><b><i>extension</i></b>,
	   <b><i>restriction</i></b><code>}</code>;</div><div class="clnumber">3 <b>otherwise </b>a set with members drawn from the set
	   above, each being present or absent depending on whether
	   the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (which is a list) contains an equivalently
	   named item.
	   <div class="note"><div class="p"><b>Note:</b> Although the <code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
	     <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> <span class="rfc2119">may</span> include values other than
	     <b><i>restriction</i></b> or <b><i>extension</i></b>, those values
	     are ignored in the determination of <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> for complex type
	     definitions (they <em>are</em> used elsewhere).</div></div>
	  </div></div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-final" class="propref" shape="rect">{final}</a></div><div class="mapRepr">As for <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> above, but using the
       <code>final</code> and <code>finalDefault</code>
       <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> in place of the <code>block</code> and
       <code>blockDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-context" class="propref" shape="rect">{context}</a></div><div class="mapRepr"><a name="anchor11290b" id="anchor11290b" shape="rect"></a>
       If the <code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present, then <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise (among the ancestor element information
       items there will be a nearest <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>), 
       the <a href="#ed" class="compref" shape="rect">Element Declaration</a> 
       corresponding to 
       the nearest <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> 
       information item among the 
       the ancestor element information items.
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a></div><div class="mapRepr">
	A sequence whose members are <a href="#as" class="compref" shape="rect">Assertion</a>s drawn from the following sources, in order:
	<div class="constraintlist"><div class="clnumber">1 <span class="p">The
	     <a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> of the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</span></div>
<div class="clnumber">2 <span class="p"><a href="#as" class="compref" shape="rect">Assertion</a>s corresponding to
	   all the <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a>  element
	   information items among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>, <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> and <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>, if
	   any, in document
	   order.
	   </span></div>
</div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">  The <a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the set of
	 elements containing the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>, the <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a>
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>, if present, the <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present, the <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> and <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>
	 <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present, and their <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> and <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present, and their <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> and <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present,
	 as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>. 
       </div></div></div><div class="note"><div class="p"><b>Note:</b> 
	If the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is a
	complex type definition, then the <a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> always
	contain members of the
	<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> of the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>, no matter which
	alternatives are chosen in the XML representation,
	<a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> or <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>,
	<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> or <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>.
       </div></div></div><div class="div4">
<h5><a name="dcl.ctd.ctsc" id="dcl.ctd.ctsc" shape="rect"></a>3.4.2.2 Mapping Rules for Complex Types with Simple Content</h5><p id="xr.ct3">When the
       <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
	source declaration has a <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> 
	child, the
      following elements are relevant 
	(as are <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>,
	<a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>, and 
	<a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>), 
       and the  
       property
       mappings are as below,
	supplemented by the mappings in
	<a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,
	<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>,
	and <a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.  
       Note that either
      <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> or <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> <span class="rfc2119">must</span>  
       appear in
      the content of <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>.</p>

<div class="reprdef">
<div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>simpleContent</code>&#160;Element Information Item et al.</div>
<div class="reprBody">

<p class="element-syntax-1"><a id="element-simpleContent"
name="element-simpleContent" shape="rect">&lt;simpleContent</a><br
clear="none" />&#160;&#160;id = <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID"
shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes
with non-schema namespace . . .}</em>&gt;<br clear="none"
/><em>&#160;&#160;Content: </em>(<a href="#element-annotation"
class="eltref" shape="rect">annotation</a>?, (<a
href="#element-simpleContent..restriction" class="eltref"
shape="rect">restriction</a> | <a
href="#element-simpleContent..extension" class="eltref"
shape="rect">extension</a>))<br clear="none"
/>&lt;/simpleContent&gt;</p>

<p class="element-syntax"><a id="element-simpleContent..restriction"
name="element-simpleContent..restriction"
shape="rect">&lt;restriction</a><br clear="none"
/>&#160;&#160;<b>base</b> = <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName"
shape="rect">QName</a><br clear="none" />&#160;&#160;id = <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID"
shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes
with non-schema namespace . . .}</em>&gt;<br clear="none"
/><em>&#160;&#160;Content: </em>(<a href="#element-annotation"
class="eltref" shape="rect">annotation</a>?, (<a
href="#element-simpleType" class="eltref"
shape="rect">simpleType</a>?, (<a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minExclusive"
class="eltref" shape="rect">minExclusive</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minInclusive"
class="eltref" shape="rect">minInclusive</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxExclusive"
class="eltref" shape="rect">maxExclusive</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxInclusive"
class="eltref" shape="rect">maxInclusive</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-totalDigits"
class="eltref" shape="rect">totalDigits</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-fractionDigits"
class="eltref" shape="rect">fractionDigits</a> | <!--* <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxScale"
class="eltref" shape="rect">maxScale</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minScale"
class="eltref" shape="rect">minScale</a> | *--> 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-length"
class="eltref" shape="rect">length</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minLength"
class="eltref" shape="rect">minLength</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxLength"
class="eltref" shape="rect">maxLength</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-enumeration"
class="eltref" shape="rect">enumeration</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-whiteSpace"
class="eltref" shape="rect">whiteSpace</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-pattern"
class="eltref" shape="rect">pattern</a> | <a
href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-assertion"
class="eltref" shape="rect">assertion</a> | <em>{any with namespace:
##other}</em>)*)?, ((<a href="#element-attribute" class="eltref"
shape="rect">attribute</a> | <a href="#element-attributeGroup"
class="eltref" shape="rect">attributeGroup</a>)*, <a
href="#element-anyAttribute" class="eltref"
shape="rect">anyAttribute</a>?), <a href="#element-assert"
class="eltref" shape="rect">assert</a>*)<br clear="none"
/>&lt;/restriction&gt;</p>
<p class="element-syntax"><a id="element-simpleContent..extension" name="element-simpleContent..extension" shape="rect">&lt;extension</a><br clear="none" />&#160;&#160;<b>base</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, ((<a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>)*, <a href="#element-anyAttribute" class="eltref" shape="rect">anyAttribute</a>?), <a href="#element-assert" class="eltref" shape="rect">assert</a>*)<br clear="none" />&lt;/extension&gt;</p>
</div>
</div>

<p>When 
       the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
	element has a <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> child, then
       the
       <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element maps to a complex type with
       simple content, as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition with simple content</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="mapRepr">The type
	definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
	 on the 
	  <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> or
	  <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> element appearing as a child of
	  <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>
	</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a></div><div class="mapRepr">If the
	<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative
	is chosen, then <b><i>restriction</i></b>, otherwise (the <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> alternative is
	chosen) <b><i>extension</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-content_type" class="propref" shape="rect">{content type}</a></div><div class="mapRepr">
	A <a href="#ct" class="compref" shape="rect">Content Type</a> as follows:
	<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>simple</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-open_content" class="propref" shape="rect">{open content}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal">the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the 
	      
	      <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> 
	      is a
	     complex type definition whose own <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> has <a href="#ct-variety" class="propref" shape="rect">{variety}</a>
	      <b><i>simple</i></b> and the <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative
	     is chosen, <b>then </b><a name="anchor11290c" id="anchor11290c" shape="rect"></a>
	     
	     let <var>B</var> be
	     <div class="constraintlist"><div class="clnumber">1.1<a id="std1cl" name="std1cl" shape="rect"> </a><span class="p">the simple type definition corresponding to the
		<a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
		<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> if there is one;</span></div>
<div class="clnumber">1.2<a id="std2cl" name="std2cl" shape="rect"> </a><span class="p">otherwise (<a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> has no <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>), the
		simple type definition which is the <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type     definition}</a> of the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of
		the 
		 
		 <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> 
		</span></div>
</div> a simple type definition 
	     as follows:
	     <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
        <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the ancestor
        <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item if present,
        otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal">The <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> 
       whose 
       <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a> 
       is being defined</div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal"><var>B</var></div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">a set of facet components corresponding
        to the appropriate element information items among the
        <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> (i.e.
        those which specify facets, if any), as defined in
        <a href="#st-restrict-facets" shape="rect">Simple Type Restriction (Facets) (&#167;3.16.6.4)</a>;</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal">Based on
        <a href="#std-variety" class="propref" shape="rect">{variety}</a>, <a href="#std-facets" class="propref" shape="rect">{facets}</a>,
        <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and
        <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>, a set of
        <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ff" class="compref" shape="rect">Fundamental Facet</a> components, one each as
        specified in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-ordered" shape="rect">The ordered Schema
        Component </a>, <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-bounded" shape="rect">The
        bounded Schema Component </a>,
        <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-cardinality" shape="rect">The cardinality Schema
        Component </a> and <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-numeric" shape="rect">The
        numeric Schema Component </a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><var>B</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal"><var>B</var>.<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal"><var>B</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal"><var>B</var>.<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">The empty sequence</div></div></div>
	    </div><div class="clnumber">2 <b>If </b>the 
	      
	      <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> 
	      is a
	     complex type definition whose own <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
	     has <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>mixed</i></b> and <a href="#ct-particle" class="propref" shape="rect">{particle}</a> a <a href="#p" class="compref" shape="rect">Particle</a> which is
	     <a href="#cd-emptiable" class="termref" shape="rect"><span class="arrow">&#183;</span>emptiable<span class="arrow">&#183;</span></a>, as
	     defined in <a href="#cos-group-emptiable" shape="rect">Particle Emptiable (&#167;3.9.6.3)</a> and the
	     <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
	     alternative is chosen, <b>then </b> (let <var>S</var><sub><var>B</var></sub>
	      be the simple type definition corresponding to
	     the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>  if any, otherwise
	      <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>) a simple type definition which
	     restricts  <var>S</var><sub><var>B</var></sub> with a set of facet
	     components corresponding to the appropriate element
	     information items among the <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> (i.e. those
	     which specify facets, if any), as defined in <a href="#st-restrict-facets" shape="rect">Simple Type Restriction (Facets) (&#167;3.16.6.4)</a>;
	    <div class="note"><div class="p"><b>Note:</b> 
	     If there is no <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
	     <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> (and if therefore
	     <var>S</var><sub><var>B</var></sub> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>), the result will be a simple type definition component
	     which fails to obey the constraints on simple type definitions, including
	     for example clause <a href="#c-base_atomic" shape="rect">1.1</a> of
	     <a href="#cos-st-restricts" shape="rect">Derivation Valid (Restriction, Simple) (&#167;3.16.6.2)</a>.
	    </div></div></div><div class="clnumber">3 <b>If </b>the 
	      
	      <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> 
	      is a
	     complex type definition whose own
	     <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>   has <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>simple</i></b> and the
	     <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> alternative is chosen, <b>then </b>
	     the <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a> of the
	     <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of
	     that complex type definition;</div><div class="clnumber">4 <b>If </b>the 
	      
	      <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> 
	      is a
	     simple type definition and the
	     <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>
	     alternative is chosen, <b>then </b>that simple type definition;</div><div class="clnumber">5<a id="c-ctsc-bad" name="c-ctsc-bad" shape="rect"> </a><b>otherwise </b><a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</div></div></div></div></div>
	
       </div></div></div></div><div class="div4">
<h5><a name="dcl.ctd.ctcc" id="dcl.ctd.ctcc" shape="rect"></a>3.4.2.3 Mapping Rules for Complex Types with Complex Content</h5><p id="xr.ct10">When the
      
       <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
	element does not have a <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> child
	element, then it maps to a complex type with complex
	content.  The
       following elements are relevant (as are the 
        
	<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>,
       <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>, 
       and <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>
       elements, 
       which are described 
	more fully in
	<a href="#declare-attribute" shape="rect">XML Representation of Attribute Declaration Schema Components (&#167;3.2.2)</a>,
	<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, and
	<a href="#declare-openness" shape="rect">XML Representation of Wildcard Schema Components (&#167;3.10.2)</a>, respectively, and which are 
       	
	not repeated here), and the additional property
       mappings are as below, supplemented
	by the mappings in 
	<a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>,
	<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, 
	<a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>,
	<a href="#dcl.att.local" shape="rect">Mapping Rules for Local Attribute Declarations (&#167;3.2.2.2)</a>, and
	<a href="#ref.att.local" shape="rect">Mapping Rules for References to Top-level Attribute Declarations (&#167;3.2.2.3)</a>. Note that either
       <a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> or <a href="#element-complexContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> <span class="rfc2119">must</span> 
       appear in
      the content of <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>, but their
      content
      models are different in this case from the case above when they
      occur as children of
      <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>.</p><p id="xr.ct11">
       </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>complexContent</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-complexContent" name="element-complexContent" shape="rect">&lt;complexContent</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;mixed = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-complexContent..restriction" class="eltref" shape="rect">restriction</a> | <a href="#element-complexContent..extension" class="eltref" shape="rect">extension</a>))<br clear="none" />&lt;/complexContent&gt;</p><p class="element-syntax"><a id="element-complexContent..restriction" name="element-complexContent..restriction" shape="rect">&lt;restriction</a><br clear="none" />&#160;&#160;<b>base</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-openContent" class="eltref" shape="rect">openContent</a>?, (<a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-all" class="eltref" shape="rect">all</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a>)?, ((<a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>)*, <a href="#element-anyAttribute" class="eltref" shape="rect">anyAttribute</a>?), <a href="#element-assert" class="eltref" shape="rect">assert</a>*)<br clear="none" />&lt;/restriction&gt;</p><p class="element-syntax"><a id="element-complexContent..extension" name="element-complexContent..extension" shape="rect">&lt;extension</a><br clear="none" />&#160;&#160;<b>base</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-openContent" class="eltref" shape="rect">openContent</a>?, ((<a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-all" class="eltref" shape="rect">all</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a>)?, ((<a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>)*, <a href="#element-anyAttribute" class="eltref" shape="rect">anyAttribute</a>?), <a href="#element-assert" class="eltref" shape="rect">assert</a>*))<br clear="none" />&lt;/extension&gt;</p><p class="element-syntax"><a id="element-openContent" name="element-openContent" shape="rect">&lt;openContent</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;mode = (<var>none</var> | <var>interleave</var> | <var>suffix</var>)&#160;:&#160;interleave<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-any" class="eltref" shape="rect">any</a>?)<br clear="none" />&lt;/openContent&gt;</p></div></div><p>Complex types with complex content can
       be the image of two different forms of
       <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element:  one with a <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> child (discussed in
       <a href="#dcl.ctd.ctcc.explicit" shape="rect">Mapping Rules for Complex Types with Explicit Complex Content (&#167;3.4.2.3.1)</a>), and one with neither
       <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> nor
       <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> as a child (discussed in
       <a href="#dcl.ctd.ctcc.implicit" shape="rect">Mapping Rules for Complex Types with Implicit Complex Content (&#167;3.4.2.3.2)</a>).
       The mapping of the 
       <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> is the same
       in both cases; it is described in 
       <a href="#dcl.ctd.ctcc.common" shape="rect">Mapping Rules for Content Type Property of Complex Content (&#167;3.4.2.3.3)</a>.
      </p><div class="div5">
<h6><a name="dcl.ctd.ctcc.explicit" id="dcl.ctd.ctcc.explicit" shape="rect"></a>3.4.2.3.1 Mapping Rules for Complex Types with Explicit Complex Content</h6><p>When the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
	source declaration has a <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>
	child, the following mappings apply, supplemented by those
	specified in 
	<a href="#dcl.ctd.ctcc.common" shape="rect">Mapping Rules for Content Type Property of Complex Content (&#167;3.4.2.3.3)</a>,
	<a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>, 
	<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, 
	and
	<a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.
       </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition with complex content</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="mapRepr">The type
	  definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	  <code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a></div><div class="mapRepr">If the
	  <a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
	  alternative is chosen, then <b><i>restriction</i></b>, otherwise
	  (the <a href="#element-complexContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a> alternative is
	  chosen) <b><i>extension</i></b>.</div></div></div></div><div class="div5">
<h6><a name="dcl.ctd.ctcc.implicit" id="dcl.ctd.ctcc.implicit" shape="rect"></a>3.4.2.3.2 Mapping Rules for Complex Types with Implicit Complex Content</h6><p>When the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration
	has neither <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> nor
	<a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> as a child, it is taken
	as shorthand for complex content restricting
	<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>. The mapping rules specific to this
	situation are as follows; the mapping rules for properties
	not described here are as given in 
	<a href="#dcl.ctd.ctcc.common" shape="rect">Mapping Rules for Content Type Property of Complex Content (&#167;3.4.2.3.3)</a>, 
	<a href="#dcl.ctd.common" shape="rect">Common Mapping Rules for Complex Type Definitions (&#167;3.4.2.1)</a>, 
	<a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>, 
	and 
	<a href="#dcl.ctd.anyatt" shape="rect">Mapping Rule for Attribute Wildcard Property (&#167;3.4.2.5)</a>.
       </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition with complex content</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="mapRepr">
	  <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
	 </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a></div><div class="mapRepr">
	  <b><i>restriction</i></b>
	 <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div5">
<h6><a name="dcl.ctd.ctcc.common" id="dcl.ctd.ctcc.common" shape="rect"></a>3.4.2.3.3 Mapping Rules for Content Type Property of Complex Content</h6><p>For complex types with complex content,
	the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> property is
	calculated as follows.  (For the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> on complex types with simple content,
	see <a href="#dcl.ctd.ctsc" shape="rect">Mapping Rules for Complex Types with Simple Content (&#167;3.4.2.2)</a>.)
     </p><div class="note"><div class="p"><b>Note:</b> The mapping rule below refers here and there to elements
	 not necessarily present within a <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
	 source declaration.  For purposes of evaluating tests like
	 "If the <code>abc</code> attribute is present
	  on the <code>xyz</code> element", if no <code>xyz</code>
	 element information item is present, then no
	 <code>abc</code> attribute is present on the
	 (non-existent) <code>xyz</code> element.</div><div class="p">When the mapping rule below refers to "the
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>", then for a
	 <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration with a
	 <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> child, then the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
	 of <a href="#element-complexContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>
	 or <a href="#element-complexContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> (whichever
	 appears as a child of <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>) are meant.  If no <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> is present, then the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
	 the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source
	 declaration itself are meant.
	</div><div class="p">The mapping rule also refers to the value of the
	 <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> 
	 property, whose value is determined as specified in
	 the preceding sections.</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition with complex content</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-content_type" class="propref" shape="rect">{content type}</a></div><div class="mapRepr">
	  <div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *--><span class="termdef"><a name="key-efm" id="key-efm" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the <b>effective mixed</b> be
	     </span>
	     the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1<a id="ccmixed" name="ccmixed" shape="rect"> </a><b>If </b>the <code>mixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
		present on <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>, <b>then </b>its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>;</div><div class="clnumber">1.2<a id="ctmixed" name="ctmixed" shape="rect"> </a><b>If </b>the <code>mixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
		present on
		<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>, <b>then </b>its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>;</div><div class="clnumber">1.3 <b>otherwise </b><code>false</code>.</div></div><div class="note"><div class="p"><b>Note:</b> It is a consequence of clause <a href="#ccmixed-eq-ctmixed" shape="rect">5</a> of 
	      <a href="#src-ct" shape="rect">Complex Type Definition Representation OK (&#167;3.4.3)</a> that 
	      clause <a href="#ccmixed" shape="rect">1.1</a> and
	      clause <a href="#ctmixed" shape="rect">1.2</a> above will never contradict
	      each other in a conforming schema document.</div></div></div>
<div class="clnumber">2 <!--* no span class='p' possible here *--><span class="termdef"><a name="key-expcon" id="key-expcon" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the <b>explicit content</b> be
	     </span>
	     the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.1<a id="c-cme-bis" name="c-cme-bis" shape="rect"> </a><b>If </b> 
		at least
		<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">2.1.1 <span class="p">There is no <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>, <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a> or <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> among the
		   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>;</span></div>
<div class="clnumber">2.1.2 <span class="p">There is an <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a> or <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> with no
		   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of its own excluding <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a>;</span></div>
<div class="clnumber">2.1.3 <span class="p">There is among the
		    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> a <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a> element
		    
		    whose <code>minOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> 
		    has the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <code>0</code> 
		    and which has no
		    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of its own except for <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a>; 
		  </span></div>
<div class="clnumber">2.1.4 <span class="p">The
		   <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>, <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a> or <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> 
		   element
		   among the
		   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> has a <code>maxOccurs</code>
		   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> with an <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of 0;</span></div>
</div>
	        <b>then </b><b><i>empty</i></b></div><div class="clnumber">2.2 <b>otherwise </b>the particle corresponding to the
		<a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a>,
		<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> or
		<a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</div></div></div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->
	     <span class="termdef"><a name="key-exg" id="key-exg" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the <b>effective content</b> be
	     </span>the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">3.1<a id="c-cme" name="c-cme" shape="rect"> </a><b>If </b> 
		 the <a href="#key-expcon" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content<span class="arrow">&#183;</span></a> is <b><i>empty</i></b>
	       , <b>then </b>
		the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">3.1.1 <b>If </b>the <a href="#key-efm" class="termref" shape="rect"><span class="arrow">&#183;</span>effective
		    mixed<span class="arrow">&#183;</span></a> is <code>true</code>, <b>then </b>A particle whose properties are as
		   follows:
		   
		   <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="pvVal">
		     a model group whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is <b><i>sequence</i></b> and whose
		     <a href="#mg-particles" class="propref" shape="rect">{particles}</a> is empty.
		    </div></div></div>
		  </div><div class="clnumber">3.1.2 <b>otherwise </b><b><i>empty</i></b></div></div></div><div class="clnumber">3.2 <b>otherwise </b>the <a href="#key-expcon" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content<span class="arrow">&#183;</span></a>.</div></div></div>
<div class="clnumber">4 <!--* no span class='p' possible here *-->
	       <span class="termdef"><a name="key-ect" id="key-ect" title="" shape="rect">[Definition:]&#160;&#160;</a>
	       Let the <b>explicit content type</b>
	       be</span>
	     the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">4.1<a id="c-ctr" name="c-ctr" shape="rect"> </a><b>If </b>
		<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>restriction</i></b>, <b>then </b>
		the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">4.1.1<a id="c-ctr-empty" name="c-ctr-empty" shape="rect"> </a><b>If </b>the <a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective
		    content<span class="arrow">&#183;</span></a> is <b><i>empty</i></b> , <b>then </b>a <a href="#ct" class="compref" shape="rect">Content Type</a> as follows:
		   <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>empty</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-open_content" class="propref" shape="rect">{open content}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
		  </div><div class="clnumber">4.1.2<a id="c-ctrp" name="c-ctrp" shape="rect"> </a><b>otherwise </b>a <a href="#ct" class="compref" shape="rect">Content Type</a>
		    as follows: 
		   
		   <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>mixed</i></b> if
		     the <a href="#key-efm" class="termref" shape="rect"><span class="arrow">&#183;</span>effective
		      mixed<span class="arrow">&#183;</span></a> is <code>true</code>, otherwise
		     <b><i>element-only</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal">The <a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective
		      content<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-open_content" class="propref" shape="rect">{open content}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
		  </div></div>
	       </div><div class="clnumber">4.2<a id="ct-extension" name="ct-extension" shape="rect"> </a><b>If </b>
		
		<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>extension</i></b>, <b>then </b>
		the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">4.2.1<a id="c-ctes" name="c-ctes" shape="rect"> </a><b>If </b>the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is a simple type
		   definition or is a complex type definition whose
		   <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>empty</i></b> or
		   <b><i>simple</i></b>, <b>then </b>a <a href="#ct" class="compref" shape="rect">Content Type</a> as per
		    clause <a href="#c-ctr-empty" shape="rect">4.1.1</a>
		    and clause <a href="#c-ctrp" shape="rect">4.1.2</a> above;</div><div class="clnumber">4.2.2 <b>If </b>the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is a complex type
		   definition whose <a href="#ctd-content_type" class="propref" shape="rect">{content       type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
		   <b><i>element-only</i></b> or <b><i>mixed</i></b> and  the
		   <a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective content<span class="arrow">&#183;</span></a> is <b><i>empty</i></b>, <b>then </b><a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>;</div><div class="clnumber">4.2.3 <b>otherwise </b>a <a href="#ct" class="compref" shape="rect">Content Type</a> as
		    follows:
		   <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>mixed</i></b> 
		     if
		     the <a href="#key-efm" class="termref" shape="rect"><span class="arrow">&#183;</span>effective
		      mixed<span class="arrow">&#183;</span></a> is <code>true</code>, otherwise
		     
		     <b><i>element-only</i></b>
		     
		     
		    </div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal">
		     <span class="termdef"><a name="key-baseparticle" id="key-baseparticle" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the <b>base particle</b> be
		      the particle of the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of the 
		      
		      <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</span> Then
		     the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">4.2.3.1 <b>If </b>the
			<a href="#p-term" class="propref" shape="rect">{term}</a> of
			the <a href="#key-baseparticle" class="termref" shape="rect"><span class="arrow">&#183;</span>base         particle<span class="arrow">&#183;</span></a> has
			<a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> <b><i>all</i></b> and the
			<a href="#key-expcon" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content<span class="arrow">&#183;</span></a> is empty, <b>then </b>the <a href="#key-baseparticle" class="termref" shape="rect"><span class="arrow">&#183;</span>base         particle<span class="arrow">&#183;</span></a>.</div><div class="clnumber">4.2.3.2 <b>If </b>the
			<a href="#p-term" class="propref" shape="rect">{term}</a> of
			the <a href="#key-baseparticle" class="termref" shape="rect"><span class="arrow">&#183;</span>base         particle<span class="arrow">&#183;</span></a> has
			<a href="#mg-compositor" class="propref" shape="rect">{compositor}</a>
			<b><i>all</i></b> and the <a href="#p-term" class="propref" shape="rect">{term}</a> of the
			<a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective content<span class="arrow">&#183;</span></a> also has <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a>
			<b><i>all</i></b>, <b>then </b>a <a href="#p" class="compref" shape="rect">Particle</a> whose properties are
			as follows: <div class="glist"><div class="gitem"><div class="giLabel"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="giDef"><div class="p">the <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>
			    of the <a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective content<span class="arrow">&#183;</span></a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="giDef"><div class="p"><code>1</code></div></div></div><div class="gitem"><div class="giLabel"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="giDef"><div class="p">a model group whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is
			    <b><i>all</i></b> and whose <a href="#mg-particles" class="propref" shape="rect">{particles}</a> are the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of the
			    <a href="#p-term" class="propref" shape="rect">{term}</a> of the
			    <a href="#key-baseparticle" class="termref" shape="rect"><span class="arrow">&#183;</span>base         particle<span class="arrow">&#183;</span></a> followed
			    by the  <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of the <a href="#p-term" class="propref" shape="rect">{term}</a> of the <a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective content<span class="arrow">&#183;</span></a>. </div></div></div></div>
		       </div><div class="clnumber">4.2.3.3<a id="c-suffix-extension" name="c-suffix-extension" shape="rect"> </a><b>otherwise </b>
			<div class="glist"><div class="gitem"><div class="giLabel"><a href="#p-min_occurs" class="propref" shape="rect">{min        occurs}</a></div><div class="giDef"><div class="p"><code>1</code></div></div></div><div class="gitem"><div class="giLabel"><a href="#p-max_occurs" class="propref" shape="rect">{max        occurs}</a></div><div class="giDef"><div class="p"><code>1</code></div></div></div><div class="gitem"><div class="giLabel"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="giDef"><div class="p">
			    a model group whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is <b><i>sequence</i></b>
			    and whose <a href="#mg-particles" class="propref" shape="rect">{particles}</a> are the <a href="#key-baseparticle" class="termref" shape="rect"><span class="arrow">&#183;</span>base         particle<span class="arrow">&#183;</span></a> followed by the
			    <a href="#key-exg" class="termref" shape="rect"><span class="arrow">&#183;</span>effective content<span class="arrow">&#183;</span></a>. 
			   </div></div></div></div>
		       </div></div>
		    </div></div><div class="pvpair"><div class="pvProp"><a href="#ct-open_content" class="propref" shape="rect">{open content}</a></div><div class="pvVal">
		     the <a href="#ct-open_content" class="propref" shape="rect">{open content}</a> of the
		     <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of the
		     <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
		     
		    </div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div></div></div>
	       </div></div></div>
<div class="clnumber">5 <!--* no span class='p' possible here *-->
	     <span class="termdef"><a name="key-we" id="key-we" title="" shape="rect">[Definition:]&#160;&#160;</a>
	      Let the <b>wildcard element</b> be</span>
	     the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">5.1 <b>If </b>
		the <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> is present
	       , <b>then </b>
		the <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>.
	       </div><div class="clnumber">5.2 <b>If </b>
		the <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> is not
		present, 
		the
		<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor has a 
		<a href="#element-defaultOpenContent" class="eltref" shape="rect">&lt;defaultOpenContent&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>, and
		<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">5.2.1 <span class="p">
		    the <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> has <a href="#ct-variety" class="propref" shape="rect">{variety}</a> &#8800; <b><i>empty</i></b>
		  </span></div>
<div class="clnumber">5.2.2 <span class="p">
		    the <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> has <a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>empty</i></b> and the <a href="#element-defaultOpenContent" class="eltref" shape="rect">&lt;defaultOpenContent&gt;</a> element has
		    <code>appliesToEmpty</code> = <b><i>true</i></b>
		  </span></div>
</div>
	        <b>then </b>
		the <a href="#element-defaultOpenContent" class="eltref" shape="rect">&lt;defaultOpenContent&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> of the
		<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>.
	       </div><div class="clnumber">5.3 <b>otherwise </b>
		<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	       </div></div>
	    </div>
<div class="clnumber">6 <!--* no span class='p' possible here *-->
	     Then the value of the property is
	     the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">6.1 <b>If </b>
		the <a href="#key-we" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard element<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
		or is present and has
		 <code>mode</code> = <code>'none'</code>
	       , <b>then </b>
		the <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a>.
	       </div><div class="clnumber">6.2 <b>otherwise </b>
		<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">
		  The <a href="#ct-variety" class="propref" shape="rect">{variety}</a> of the
		  <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> if it's not <b><i>empty</i></b>;
		  otherwise <b><i>element-only</i></b>. 
		 </div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal">
		  The <a href="#ct-particle" class="propref" shape="rect">{particle}</a> of the
		  <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> if the <a href="#ct-variety" class="propref" shape="rect">{variety}</a> of the
		  <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> is not <b><i>empty</i></b>;
		  otherwise a <a href="#p" class="compref" shape="rect">Particle</a>
		  as follows:
		  <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="pvVal">
		    a model group whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is <b><i>sequence</i></b> and whose
		    <a href="#mg-particles" class="propref" shape="rect">{particles}</a> is empty.
		   </div></div></div>
		 </div></div><div class="pvpair"><div class="pvProp"><a href="#ct-open_content" class="propref" shape="rect">{open content}</a></div><div class="pvVal">
		  An <a href="#oc" class="compref" shape="rect">Open Content</a> as follows:
		  <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#oc-mode" class="propref" shape="rect">{mode}</a></div><div class="pvVal">
		    The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>mode</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
		    of the <a href="#key-we" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard element<span class="arrow">&#183;</span></a>, if present,
		    otherwise <b><i>interleave</i></b>.
		   </div></div><div class="pvpair"><div class="pvProp"><a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a></div><div class="pvVal">
		    
		    Let <var>W</var> be the
		     wildcard  corresponding to the <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> of the <a href="#key-we" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard element<span class="arrow">&#183;</span></a>.
		    If the
		    <a href="#ct-open_content" class="propref" shape="rect">{open content}</a> of the
		    <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then <var>W</var>; otherwise
                    a wildcard whose <a href="#w-process_contents" class="propref" shape="rect">{process contents}</a>
                    and	<a href="#w-annotations" class="propref" shape="rect">{annotations}</a> are	those of <var>W</var>, and whose
                    <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a> is the
                    wildcard union of the
                    <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a> of <var>W</var> and
		    of <a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.<a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a> of
		    the <a href="#key-ect" class="termref" shape="rect"><span class="arrow">&#183;</span>explicit content type<span class="arrow">&#183;</span></a>, as defined in
		    <a href="#cos-aw-union" shape="rect">Attribute Wildcard Union (&#167;3.10.6.3)</a>.
		   </div></div></div>
		 </div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal">
		  <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
		 </div></div></div>
	       </div></div>
	    </div>
</div>
	 </div></div></div><div class="note"><a name="xr.ctd.n4-bis" id="xr.ctd.n4-bis" shape="rect"></a><div class="p"><b>Note:</b> 
	 It is a consequence of clause <a href="#ct-extension" shape="rect">4.2</a> above that
	 when a type definition is extended, the same particles appear
	 in both the base type definition and the extension;
	 the particles are reused without being copied.
	</div></div></div></div><div class="div4">
<h5><a name="dcl.ctd.attuses" id="dcl.ctd.attuses" shape="rect"></a>3.4.2.4 Mapping Rule for Attribute Uses Property</h5><p>Any <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
       source declaration can have <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> and
       <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> elements as 
       children, or descendants.  The <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>
       element is described in
       <a href="#declare-attribute" shape="rect">XML Representation of Attribute Declaration Schema Components (&#167;3.2.2)</a>
       and will not be repeated here.
      </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>attributeGroup</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-simpleContent..attributeGroup" name="element-simpleContent..attributeGroup" shape="rect">&lt;attributeGroup</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>ref</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/attributeGroup&gt;</p></div></div><p>The <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> and
       <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> elements map to
       the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
       property of the <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> component
       as described below.  This mapping rule
       is the same for all complex type definitions.  
       
      </p><div class="note"><div class="p"><b>Note:</b> In the following rule, references to "the
	 <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>" refer to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
	the <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>
	or <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> 
	element (whichever
	appears as a child of  <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> or
	<a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> in the
	<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration),
	if present, otherwise to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the
	<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration itself.
       </div><div class="p">The rule also refers to the value of the
	<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
	property, which is described elsewhere.
       </div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition (Attribute Uses)</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a></div><div class="mapRepr">
	 <p> If the
	   <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor has a
	   <code>defaultAttributes</code> attribute, and the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element does not have
	   <code>defaultAttributesApply</code> =
	   <code>false</code>, then the  <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> 
	   property is
	   computed as if there were an
	  <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> with empty content
	  and a <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> whose <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is the
	  same as that of the 
	  <code>defaultAttributes</code>
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> appearing after any other
	  <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>. Otherwise proceed as if there were no such
	  <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>. </p>  Then the value is a union of sets of
	 attribute uses as follows 
	 <div class="constraintlist"><div class="clnumber">1<a id="c-add1" name="c-add1" shape="rect"> </a><span class="p">The set of attribute uses corresponding to the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any.</span></div>
<div class="clnumber">2<a id="c-add2" name="c-add2" shape="rect"> </a><span class="p">The <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> of the
	    attribute groups <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>s of the
	    <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any.</span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->
	    The attribute uses "inherited" from the
	    <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> <var>T</var>, as described by the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b><var>T</var> is a complex type definition and
	       <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>extension</i></b>, <b>then </b>the attribute
	       uses in <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
	       are inherited.</div><div class="clnumber">3.2 <b>If </b><var>T</var> is a
	       complex type definition and 
	       
	       <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>restriction</i></b>, <b>then </b>the attribute uses in
	       <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> are
	       inherited, with the exception of those with an <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> whose
	       <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> is 
	       <b>one</b> of the following:<div class="constraintlist"><div class="clnumber">3.2.1<a id="att-locally-specified" name="att-locally-specified" shape="rect"> </a><span class="p">the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of the <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of an attribute use
		  which has already been included in the set, following
		  the rules in clause <a href="#c-add1" shape="rect">1</a> or clause <a href="#c-add2" shape="rect">2</a> above;</span></div>
<div class="clnumber">3.2.2<a id="att-prohibited" name="att-prohibited" shape="rect"> </a><span class="p">the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of the <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of what would have
		  been an attribute use corresponding to an <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>, if the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> had not had <code>use</code> =
		   <b><i>prohibited</i></b>.</span><div class="note"><div class="p"><b>Note:</b> This sub-clause handles the case where the
		   base type definition <var>T</var> allows the attribute
		   in question, but the restriction prohibits it.</div></div></div>
</div>
	      </div><div class="clnumber">3.3 <b>otherwise </b>no attribute use
	       is inherited.</div></div> 
	    
	   </div>
</div>
	</div></div></div><div class="note"><a name="xr.ctd.n3bis" id="xr.ctd.n3bis" shape="rect"></a><div class="p"><b>Note:</b> 
	The <em>only</em> substantive function of the value
	<b><i>prohibited</i></b> for the <code>use</code> attribute of an
	<a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> is in
	establishing the correspondence between a complex type defined
	by restriction and its XML representation.  It serves to
	prevent inheritance of an identically named attribute use from
	the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.  Such an <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> does not correspond to any component, and
	hence there is no interaction with either explicit or
	inherited wildcards in the operation of <a href="#formal-complex-type" shape="rect">Complex Type Definition Validation Rules (&#167;3.4.4)</a> or <a href="#coss-ct" shape="rect">Constraints on Complex Type Definition Schema Components (&#167;3.4.6)</a>.
	It is pointless, though not an
	 error, for the <code>use</code> attribute to have the value
	 <b><i>prohibited</i></b> in other contexts (e.g. in complex type
	 extensions or named model group definitions), in which cases
	 the &lt;attribute&gt; element is simply ignored, provided that
	 it does not violate other constraints in this
	 specification.</div></div></div><div class="div4">
<h5><a name="dcl.ctd.anyatt" id="dcl.ctd.anyatt" shape="rect"></a>3.4.2.5 Mapping Rule for Attribute Wildcard Property</h5><p>The <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>
       property of a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> depends on the 
       <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> element which may be present
       within the <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element
       or within the attribute groups referred to
       within <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>.
       The <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
       element is described in the preceding section
       <a href="#dcl.ctd.attuses" shape="rect">Mapping Rule for Attribute Uses Property (&#167;3.4.2.4)</a>
       and will not be repeated here.
      </p><div class="note"><div class="p"><b>Note:</b> The following mapping rule
	is the same for all complex type definitions.  
       </div><div class="p">References to "the
	 <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>" refer to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
	the <a href="#element-simpleContent..extension" class="eltref" shape="rect">&lt;extension&gt;</a>
	or <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> 
	element (whichever
	appears as a child of  <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> or
	<a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> in the
	<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration),
	if present, otherwise to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the
	<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> source declaration itself.
       </div><div class="p">The rule also refers to the value of the
	<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
	property, which is described elsewhere.
       </div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Complex_Type_Definition_details" shape="rect">Complex Type Definition (Attribute Wildcard)</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a></div><div class="mapRepr">
	 <p>If the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor has a
	  <code>defaultAttributes</code> attribute, and the
	  <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element does not have
	  <code>defaultAttributesApply</code> = <code>false</code>, then the
	  <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> property is computed
	  as if there were an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> with empty content and a <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
	  whose <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is the same as that of the
	  <code>defaultAttributes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> appearing after any
	  other <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>. Otherwise proceed as if there were no such
	  <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>.</p>
         <div class="constraintlist"><div class="clnumber">1 <span class="p"><span class="termdef"><a name="key-eaw" id="key-eaw" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the <b>complete wildcard</b> be the
	     <a href="#w" class="compref" shape="rect">Wildcard</a> computed as described in 
	      <a href="#declare-attributeGroup-wildcard" shape="rect">Common Rules for Attribute Wildcards (&#167;3.6.2.2)</a>.</span>
	   </span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->The value is then determined by
	    the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b>
	       <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>restriction</i></b>, <b>then </b>the <a href="#key-eaw" class="termref" shape="rect"><span class="arrow">&#183;</span>complete
		wildcard<span class="arrow">&#183;</span></a>;</div><div class="clnumber">2.2 <b>If </b>
	       <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> = <b><i>extension</i></b>, <b>then </b>
	       <div class="constraintlist"><div class="clnumber">2.2.1 <!--* no span class='p' possible here *--><span class="termdef"><a name="key-baw" id="key-baw" title="" shape="rect">[Definition:]&#160;&#160;</a>let the <b>base wildcard</b> be
		   defined as</span>
		  the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.2.1.1 <b>If </b>the 
		     
		     <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> 
		     is a complex type definition with an
		     <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute         wildcard}</a>, <b>then </b>that <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>.</div><div class="clnumber">2.2.1.2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div>
		 </div>
<div class="clnumber">2.2.2 <!--* no span class='p' possible here *-->The value is then determined by
		  the first <b>case</b> among the following which applies:<div class="constraintlist"><div class="clnumber">2.2.2.1 <b>If </b>the <a href="#key-baw" class="termref" shape="rect"><span class="arrow">&#183;</span>base wildcard<span class="arrow">&#183;</span></a> is
		     <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, <b>then </b>the <a href="#key-eaw" class="termref" shape="rect"><span class="arrow">&#183;</span>complete wildcard<span class="arrow">&#183;</span></a>;</div><div class="clnumber">2.2.2.2 <b>If </b>the <a href="#key-eaw" class="termref" shape="rect"><span class="arrow">&#183;</span>complete wildcard<span class="arrow">&#183;</span></a> is
		     <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, <b>then </b>the <a href="#key-baw" class="termref" shape="rect"><span class="arrow">&#183;</span>base wildcard<span class="arrow">&#183;</span></a>;</div><div class="clnumber">2.2.2.3 <b>otherwise </b>
		    a wildcard whose <a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> and
		    <a href="#w-annotations" class="propref" shape="rect">{annotations}</a> are those of the
		    <a href="#key-eaw" class="termref" shape="rect"><span class="arrow">&#183;</span>complete wildcard<span class="arrow">&#183;</span></a>, and whose <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>
		    is the	wildcard	union of the <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>
		    of the <a href="#key-eaw" class="termref" shape="rect"><span class="arrow">&#183;</span>complete wildcard<span class="arrow">&#183;</span></a> and of the <a href="#key-baw" class="termref" shape="rect"><span class="arrow">&#183;</span>base wildcard<span class="arrow">&#183;</span></a>, as
		    defined in <a href="#cos-aw-union" shape="rect">Attribute Wildcard Union (&#167;3.10.6.3)</a>.
		   </div></div></div>
</div>
	      </div></div></div>
</div>
	</div></div></div></div><div class="div4">
<h5><a name="dcl.ctd.exx" id="dcl.ctd.exx" shape="rect"></a>3.4.2.6 Examples of Complex Type Definitions</h5><div class="exampleOuter">
<div class="exampleHeader">Example: Three ways to define a type for length</div>
<div class="exampleWrapper">
<p>The following declaration defines a type for specifications of length
by creating a complex type with simple content, with
<code>xs:nonNegativeInteger</code> as the type of the 
content, and a <code>unit</code> attribute to give the
unit of measurement.</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="length1"&gt;
 &lt;xs:simpleContent&gt;
  &lt;xs:extension base="xs:nonNegativeInteger"&gt;
   &lt;xs:attribute name="unit" type="xs:NMTOKEN"/&gt;
  &lt;/xs:extension&gt;
 &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name="width" type="length1"/&gt;
</pre></div><div class="exampleWrapper">
<p>An instance using this type might look like this:</p></div><div class="exampleInner">
<pre xml:space="preserve">  &lt;width unit="cm"&gt;25&lt;/width&gt;
</pre></div><div class="exampleWrapper">
<p>A second approach to defining length
uses two elements, one for size and one for the unit of 
measure.  The definition of the type and the
declaration of the element might look like this:
</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="length2"&gt;
 &lt;xs:complexContent&gt;
  &lt;xs:restriction base="xs:anyType"&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="size" type="xs:nonNegativeInteger"/&gt;
    &lt;xs:element name="unit" type="xs:NMTOKEN"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name="depth" type="length2"/&gt;
</pre></div><div class="exampleWrapper">
<p>An instance using this method might look like this:</p></div><div class="exampleInner">
<pre xml:space="preserve">  &lt;depth&gt;
   &lt;size&gt;25&lt;/size&gt;&lt;unit&gt;cm&lt;/unit&gt;
  &lt;/depth&gt;</pre></div><div class="exampleWrapper">
<p>A third definition of type leaves the base type
implicit; at the component level, the following declaration
is equivalent to the preceding one.</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="length3"&gt;
 &lt;xs:sequence&gt;
  &lt;xs:element name="size" type="xs:nonNegativeInteger"/&gt;
  &lt;xs:element name="unit" type="xs:NMTOKEN"/&gt;
 &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;</pre></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="personName"&gt;
 &lt;xs:sequence&gt;
  &lt;xs:element name="title" minOccurs="0"/&gt;
  &lt;xs:element name="forename" minOccurs="0" maxOccurs="unbounded"/&gt;
  &lt;xs:element name="surname"/&gt;
 &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name="extendedName"&gt;
 &lt;xs:complexContent&gt;
  &lt;xs:extension base="personName"&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="generation" minOccurs="0"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:extension&gt;
 &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name="addressee" type="extendedName"/&gt;

  &lt;addressee&gt;
   &lt;forename&gt;Albert&lt;/forename&gt;
   &lt;forename&gt;Arnold&lt;/forename&gt;
   &lt;surname&gt;Gore&lt;/surname&gt;
   &lt;generation&gt;Jr&lt;/generation&gt;
  &lt;/addressee&gt;</pre></div><div class="exampleWrapper">
<div class="p">A type definition for personal names, and a definition <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by
extension which adds a single element; an element declaration referencing the
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> definition, and a <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> instance thereof.</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="simpleName"&gt;
 &lt;xs:complexContent&gt;
  &lt;xs:restriction base="personName"&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="forename" minOccurs="1" maxOccurs="1"/&gt;
    &lt;xs:element name="surname"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name="who" type="simpleName"/&gt;

   &lt;who&gt;
    &lt;forename&gt;Bill&lt;/forename&gt;
    &lt;surname&gt;Clinton&lt;/surname&gt;
   &lt;/who&gt;</pre></div><div class="exampleWrapper">
<div class="p">A simplified type definition
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from the base type from the previous example by restriction, eliminating 
one optional child and
fixing another to occur exactly once; an element declared by reference to it,
and a <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> instance thereof.</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="paraType" mixed="true"&gt;
 &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
  &lt;xs:element ref="emph"/&gt;
  &lt;xs:element ref="strong"/&gt;
 &lt;/xs:choice&gt;
 &lt;xs:attribute name="version" type="xs:decimal"/&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">An illustration of the abbreviated form, with the
<code>mixed</code> attribute appearing on <code>complexType</code> itself.</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="name"&gt;
  &lt;xs:openContent&gt;
    &lt;xs:any namespace="##other" processContents="skip"/&gt;
  &lt;/xs:openContent&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="given" type="xs:string"/&gt;
    &lt;xs:element name="middle" type="xs:string" minOccurs="0"/&gt;
    &lt;xs:element name="family" type="xs:string"/&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">
  A complex type definition that
  
  allows three explicitly declared child
  elements, in the specified order (but not necessarily adjacent), and
  furthermore allows additional elements of any name from any namespace other
  than the target namespace to appear anywhere in the children.
 </div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">To restrict away a local element declaration that <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>competes<span class="arrow">&#183;</span></a> with
   a wildcard, use a wildcard in the derived type that explicitly
   disallows the element's <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.  For example:</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="computer"&gt;
 &lt;xs:all&gt;
  &lt;xs:element name="CPU" type="CPUType"/&gt;
  &lt;xs:element name="memory" type="memoryType"/&gt;
  &lt;xs:element name="monitor" type="monitorType"/&gt;
  &lt;xs:element name="speaker" type="speakerType"
              minOccurs="0"/&gt;
  &lt;!-- Any additional information about the computer --&gt;
  &lt;xs:any processContents="lax"
          minOccurs="0" maxOccurs="unbounded"/&gt;
 &lt;/xs:all&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name="quietComputer"&gt;
 &lt;xs:complexContent&gt;
  &lt;xs:restriction base="computer"&gt;
   &lt;xs:all&gt;
    &lt;xs:element name="CPU" type="CPUType"/&gt;
    &lt;xs:element name="memory" type="memoryType"/&gt;
    &lt;xs:element name="monitor" type="monitorType"/&gt;
    &lt;!-- Any additional information about the computer --&gt;
    &lt;xs:any processContents="lax" notQName="speaker"
            minOccurs="0" maxOccurs="unbounded"/&gt;
   &lt;/xs:all&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">The restriction type <code>quietComputer</code> has
   a <b><i>lax</i></b> wildcard, which <a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> any element but one with the name
   <code>speaker</code>.</div></div><div class="exampleWrapper">
<div class="p">Without the specification of the <code>notQName</code> attribute,
   
   the wildcard would <a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> elements named
   <code>speaker</code>, as well.  In that case, the restriction 
   would be valid only if there is a
   top-level declaration for <code>speaker</code> that also has type
   <code>speakerType</code> or a type derived from it. 
   Otherwise, there would be instances locally valid against the restriction
   <code>quietComputer</code> that are not locally valid against the base type 
   <code>computer</code>.</div></div><div class="exampleWrapper">
<div class="p">
   For example, if there is no <code>notQName</code> attribute on the wildcard and 
   no top-level declaration for <code>speaker</code>, then the following is allowed
   by <code>quietComputer</code>, but not by <code>computer</code>:
  </div></div><div class="exampleInner">
<pre xml:space="preserve">   &lt;speaker xsi:type="xs:string"/&gt;</pre></div><div class="exampleWrapper">
<div class="p">The specific rule violated in this case  
   is clause <a href="#ctr-child-type-subsumption" shape="rect">2</a> of 
   constraint <a href="#cos-content-act-restrict" shape="rect">Content type restricts (Complex Content) (&#167;3.4.6.4)</a>  </div></div></div></div></div><div class="div3">
<h4><a name="sec-src-ct" id="sec-src-ct" shape="rect"></a>3.4.3 Constraints on XML Representations of Complex Type Definitions</h4><div class="constraintnote"><a id="src-ct" name="src-ct" shape="rect"></a><b>Schema Representation Constraint: Complex Type Definition Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information items by the schema for schema documents,
       <b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1<a id="simple-content-rules" name="simple-content-rules" shape="rect"> </a><span class="p">If the <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a> alternative is chosen,
	  the 
	   <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element <span class="rfc2119">must not</span> 
	   have <code>mixed</code> = <b><i>true</i></b>.
	   
	  
	 </span></div>
<div class="clnumber">2 <span class="p">
	    <a name="anchor11222bx" id="anchor11222bx" shape="rect"></a>
	    If <a href="#element-simpleContent..restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
	    is present under <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>, then
	    the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> 
	    <span class="rfc2119">must not</span> include any two elements with the same 
	    <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> in the Schema (<code>xs</code>) namespace, 
	    unless that <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> is one of 
	    <code>xs:enumeration</code>,
	    <code>xs:pattern</code>, or
	    <code>xs:assert</code>.
	  </span></div>
<div class="clnumber">3 <span class="p">
	  If <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> is present 
	  and has
	  <code>mode</code> &#8800; <code>'none'</code>, 
	  then there
	  <span class="rfc2119">must</span> be an <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
	  <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a>.
	 </span></div>
<div class="clnumber">4 <span class="p">If <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> is present 
	  and has <code>mode</code> = <code>'none'</code>, 
	  then there <span class="rfc2119">must not</span> be an <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
	  <a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a>.
	 </span></div>
<div class="clnumber">5<a id="ccmixed-eq-ctmixed" name="ccmixed-eq-ctmixed" shape="rect"> </a><span class="p">
	  If the <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a> alternative is chosen and the
	  <code>mixed</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present on both
	  <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> and <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>,
	  then <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual values<span class="arrow">&#183;</span></a> of those <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
	  <span class="rfc2119">must</span> be the same.
	 </span></div>
</div>
      </div></div></div></div><div class="div3">
<h4><a name="formal-complex-type" id="formal-complex-type" shape="rect"></a>3.4.4 Complex Type Definition Validation Rules</h4><div class="div4">
<h5><a name="sec-cdtt" id="sec-cdtt" shape="rect"></a>3.4.4.1 Locally Declared Type</h5><p>This section defines 
      
      the concept of
      <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>; this concept plays a role
      in determining whether restrictions
      and extensions of complex type definitions are legitimate.
      The <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>
      is also used to help determine the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> and
      <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> of an element information item.</p><p>
      <span class="termdef"><a name="key-ldtype" id="key-ldtype" title="" shape="rect">[Definition:]&#160;&#160;</a>
	Every <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> determines a partial functional mapping from
	element or attribute
	information items (and their <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a>) to type
	definitions.  This mapping serves as a <b>locally declared type</b>
 for elements 
	and attributes which are allowed by
	the <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>.</span></p><p>
       The attribute case is simpler and will be taken first.</p><div class="p">
       <div class="termdef"><a name="key-ldt-att" id="key-ldt-att" title="" shape="rect">[Definition:]&#160;&#160;</a>
	For a given <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> <var>CTD</var> and a given attribute
	information item <var>A</var>, the 
 <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
	<var>A</var> within <var>CTD</var> is
	the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="dummy3" name="dummy3" shape="rect"> </a><b>If </b>
	   <var>CTD</var> is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
	  , <b>then </b>
	   
	   <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	  </div><div class="clnumber">2 <b>If </b>
	   <var>A</var> has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as some
	   attribute declaration <var>D</var> which is the
	   <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of some
	   <a href="#au" class="compref" shape="rect">Attribute Use</a> contained by <var>CTD</var>'s
	   <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
	  , <b>then </b>
	   the <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> of <var>D</var>.
	  </div><div class="clnumber">3 <b>otherwise </b>
	   the 
	   <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of <var>A</var> within 
	   <var>CTD</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
	  </div></div>
       </div>
      </div><p>The definition for elements is slightly
	more complex.</p><div class="p">
       
       <div class="termdef"><a name="key-ldt-elem" id="key-ldt-elem" title="" shape="rect">[Definition:]&#160;&#160;</a>
	
	For a given <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>
	<var>CTD</var> and a given element information item <var>E</var>, the
	
	
	<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
	<var>E</var> within <var>CTD</var> is 
	the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="dummy1" name="dummy1" shape="rect"> </a><b>If </b>
	   <var>CTD</var> is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
	  , <b>then </b>
	   
	   <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	  </div><div class="clnumber">2 <b>If </b>
	   <var>E</var>
	   has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as
	   some element declaration <var>D</var> which is <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a> by <var>CTD</var>'s
	   content model, whether <a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly<span class="arrow">&#183;</span></a>, <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly<span class="arrow">&#183;</span></a>, or <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>
	  , <b>then </b>
	   the
	    declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of <var>D</var>.
	   </div><div class="clnumber">3 <b>otherwise </b>
	   
	   the 
	    <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
	    <var>E</var> within 
	    <var>CTD</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
	  </div></div>
       </div>
     </div><div class="note"><div class="p"><b>Note:</b> The constraint <a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a>
       ensures that even if there is more than one such declaration
       <var>D</var>, there will be just one type definition.
      </div></div><div class="note"><div class="p"><b>Note:</b> The reference to <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicit<span class="arrow">&#183;</span></a>
       containment ensures that if <var>E</var> has a 
       <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a> for a declaration 
       <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a>
       by <var>CTD</var>'s content model, a 
	      <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>
       is defined for <var>E</var>.</div></div></div><div class="div4">
<h5><a name="sec-cvc-complex-type" id="sec-cvc-complex-type" shape="rect"></a>3.4.4.2 Element Locally Valid (Complex Type)</h5><div class="constraintnote"><a id="cvc-complex-type" name="cvc-complex-type" shape="rect"></a><b>Validation Rule: Element Locally Valid (Complex Type)</b><br clear="none" /><div class="constraint"><div class="p">For an element information item <var>E</var>
       to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a 
       complex type definition <var>T</var>
       <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-cvct" name="c-cvct" shape="rect"> </a><!--* no span class='p' possible here *-->If <var>E</var> is not <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a>, then <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = 
	      <b><i>empty</i></b>, <b>then </b><var>E</var> has no character or element information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.</div><div class="clnumber">1.2<a id="c-sv2" name="c-sv2" shape="rect"> </a><b>If </b><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = 
	       <b><i>simple</i></b>, <b>then </b><var>E</var> has no element
	      information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, and the <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> of <var>E</var>
	     is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect 
	     to <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>
	       as defined 
	       by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</div><div class="clnumber">1.3 <b>If </b><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
	       <b><i>element-only</i></b>, <b>then </b><var>E</var> has no character information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> other
	      than those whose <a href="http://www.w3.org/TR/xml-infoset/#infoitem.character" class="xpropref" shape="rect">[character code]</a> is defined as 
	     a <a href="http://www.w3.org/TR/xml11/#NT-S" shape="rect">white space</a>
	     in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>.
	     
	    </div><div class="clnumber">1.4 <b>If </b><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
	       <b><i>element-only</i></b> or
	      <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
	      <b><i>mixed</i></b>, <b>then </b>the sequence of  element
	      information items in
	       <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, taken in order, 
	      is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
	      respect to <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>,
	      as defined in 
	      <a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content) (&#167;3.4.4.3)</a>.</div></div></div>
<div class="clnumber">2<a id="c-aam" name="c-aam" shape="rect"> </a><!--* no span class='p' possible here *-->For each attribute information item <var>A</var>
	   in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> 
	   excepting those named <code>xsi:type</code>, <code>xsi:nil</code>, 
	   <code>xsi:schemaLocation</code>, or <code>xsi:noNamespaceSchemaLocation</code>
	   (see <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations (&#167;3.2.7)</a>),
	  the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">2.1<a id="c-ctma" name="c-ctma" shape="rect"> </a><b>If </b>there is among the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> an
	      attribute use <var>U</var>
	      whose 
	       <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> 
	       has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as <var>A</var>	      
	    , <b>then </b><var>A</var> is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> 
	     with respect to <var>U</var> 
	      as per <a href="#cvc-au" shape="rect">Attribute Locally Valid (Use) (&#167;3.5.4)</a>.  
	      In this case <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> 
	      is the <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined 
	      declaration<span class="arrow">&#183;</span></a> for <var>A</var> with respect 
	     to <a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute) (&#167;3.2.4.3)</a> and 
	     <a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute) (&#167;3.2.5.1)</a>.
	     Also <var>A</var> is 
	      <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> <var>U</var>.</div><div class="clnumber">2.2<a id="c-avaw" name="c-avaw" shape="rect"> </a><b>otherwise </b>
	     <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.2.1 <span class="p">There is an <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>.</span></div>
<div class="clnumber">2.2.2 <span class="p"><var>A</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect 
		 to it as defined in <a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.</span></div>
</div>
	     In this case <var>A</var> is
	      <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> the <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>.
	    </div></div>
	 </div>
<div class="clnumber">3<a id="c-ra" name="c-ra" shape="rect"> </a><span class="p">For each attribute use <var>U</var>
	   in <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>,
	   if <var>U</var>.<a href="#au-required" class="propref" shape="rect">{required}</a> = <b><i>true</i></b>,
	   then <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> 
	    
	   has the same
	    <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as
	   one of the attribute information items in
	   <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</span><div class="note"><div class="p"><b>Note:</b> It is a consequence that 
	   (with few exceptions)
	   each such <var>U</var> will have 
	    the matching attribute information item
	    <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> it by 
	    clause <a href="#c-ctma" shape="rect">2.1</a> above.
	    The exceptions are 
	    uses of <code>xsi:type</code> and the other 
	    attributes named in 
	    clause <a href="#c-ctma" shape="rect">2.1</a>; no
	    <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attribution<span class="arrow">&#183;</span></a>
	    is performed for them.
	   </div></div></div>
<div class="clnumber">4 <span class="p">
	   
	  For each <a href="#key-dflt-att" class="termref" shape="rect"><span class="arrow">&#183;</span>defaulted attribute<span class="arrow">&#183;</span></a>
	    <var>A</var> belonging to <var>E</var>,
	  the <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a> of 
	   <var>A</var>'s
	  <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
	  respect to <var>A</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#a-type_definition" class="propref" shape="rect">{type definition}</a> 
	   as defined by
	  <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.
	 </span><div class="note"><div class="p"><b>Note:</b> When an <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> is
	   present, this does <em>not</em> introduce any ambiguity with
	   respect to how attribute information items for which an attribute use
	   is present amongst the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> whose name and target namespace match are
	   <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>.  In such cases the attribute
	   use <em>always</em> takes precedence, and the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of such items stands or falls
	   entirely on the basis of the attribute use and its <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.  This follows from the details of
	   clause <a href="#c-aam" shape="rect">2</a>.</div></div></div>
<div class="clnumber">5 <span class="p">
	  For each element information item  in 
	  
	  
	  <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
	   and each attribute information item in 
	    <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>, if
	  neither the
	  <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> nor the
	  
	  <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> 
	  is  <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then
	  
	   the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> is the same as, or is
	   <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for, the <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>, <a href="#key-val-sub-type-absolute" class="termref" shape="rect"><span class="arrow">&#183;</span>without limitation<span class="arrow">&#183;</span></a>.
	  
	 </span></div>
<div class="clnumber">6<a id="c-as" name="c-as" shape="rect"> </a><span class="p"><var>E</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
	  with respect to each of the assertions in 
	    <var>T</var>.<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> as 
	  per <a href="#cvc-assertion" shape="rect">Assertion Satisfied (&#167;3.13.4.1)</a>.</span></div>
</div>
      </div></div></div><div class="p">
       <div class="termdef"><a name="key-dflt-att" id="key-dflt-att" title="" shape="rect">[Definition:]&#160;&#160;</a>A
	<b>defaulted attribute</b> 
	belonging to an element information item <var>E</var>
	 <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governed by<span class="arrow">&#183;</span></a> a complex type <var>T</var>
	is any <a href="#au" class="compref" shape="rect">Attribute Use</a> 
	<var>U</var>
	
	for which
	<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
	   <var>U</var> is a member of <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>.
	  </span></div>
<div class="clnumber">2 <span class="p">
	   <var>U</var>.<a href="#au-required" class="propref" shape="rect">{required}</a> = <b><i>false</i></b>.
	  </span></div>
<div class="clnumber">3 <span class="p">
	   <var>U</var>'s <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	  </span></div>
<div class="clnumber">4 <span class="p">
	   <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> is not one
	   of the <a href="#ad" class="compref" shape="rect">Attribute Declaration</a>s from <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations (&#167;3.2.7)</a>.
	  </span></div>
<div class="clnumber">5 <span class="p">
	   <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> does not match
	   any of the 
	   attribute information items in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> 
	   as per clause <a href="#c-ctma" shape="rect">2.1</a> of
	   <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> above.
	  </span></div>
</div>
       </div></div></div><div class="div4">
<h5><a name="sec-cvc-complex-content" id="sec-cvc-complex-content" shape="rect"></a>3.4.4.3 Element Sequence Locally Valid (Complex Content)</h5><div class="constraintnote"><a id="cvc-complex-content" name="cvc-complex-content" shape="rect"></a><b>Validation Rule: Element Sequence Locally Valid (Complex Content)</b><br clear="none" /><div class="constraint"><div class="p">
      For a sequence <var>S</var> (possibly empty) of element information items
      to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a
      <a href="#ct" class="compref" shape="rect">Content Type</a> <var>CT</var>,
	the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <b>If </b>
	   <var>CT</var>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>
	    is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
	  , <b>then </b>
	   <var>S</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect
	   to <var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>, as defined in
	   <a href="#cvc-particle" shape="rect">Element Sequence Locally Valid (Particle) (&#167;3.9.4.2)</a>.
	  </div><div class="clnumber">2 <b>If </b><var>CT</var>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.<a href="#oc-mode" class="propref" shape="rect">{mode}</a> =  
	   <b><i>suffix</i></b>
	  , <b>then </b>
	   <var>S</var> can be represented as two subsequences <var>S1</var> and
	   <var>S2</var> (either can be empty) such that
	   <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
	      <var>S</var> = <var>S1</var> + <var>S2</var>
	     </span></div>
<div class="clnumber">2.2 <span class="p">
	      <var>S1</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect
	      to <var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>, as defined
	      in <a href="#cvc-particle" shape="rect">Element Sequence Locally Valid (Particle) (&#167;3.9.4.2)</a>.
	     </span></div>
<div class="clnumber">2.3 <span class="p">
	      If <var>S2</var> is not empty, let <var>E</var> be the first element
	      in <var>S2</var>, then <var>S1</var> + <var>E</var> does
	      <em>not</em> have a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> in 
	      <var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
	     </span></div>
<div class="clnumber">2.4 <span class="p">
	      Every element in <var>S2</var> is
	      <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the wildcard
	       <var>CT</var>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.<a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a>, as defined in
	      <a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.
	     </span></div>
</div>
	  </div><div class="clnumber">3 <b>otherwise </b>
	   (<var>CT</var>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.<a href="#oc-mode" class="propref" shape="rect">{mode}</a> = 
	   <b><i>interleave</i></b>) <var>S</var>
	   can be represented as two subsequences <var>S1</var> and <var>S2</var>
	   (either can be empty) such that
	   <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">
	      <var>S</var> is a member of <var>S1</var> &#215; <var>S2</var>
	      (where &#215; is the interleave
	       operator, see <a href="#all-mg" shape="rect">All-groups (&#167;3.8.4.1.3)</a>)
	     </span></div>
<div class="clnumber">3.2 <span class="p">
	      <var>S1</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
	      respect to <var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>, as
	      defined in <a href="#cvc-particle" shape="rect">Element Sequence Locally Valid (Particle) (&#167;3.9.4.2)</a>.
	     </span></div>
<div class="clnumber">3.3 <span class="p">
	      For every element <var>E</var> in <var>S2</var>, let <var>S3</var> be
	      
	      the longest
	      prefix of <var>S1</var> where members of <var>S3</var> are before
	      <var>E</var> in <var>S</var>, then <var>S3</var> + <var>E</var> does
	      <em>not</em> have a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> in 
	      <var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
	     </span></div>
<div class="clnumber">3.4 <span class="p">
	      Every element in <var>S2</var> is
	      <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the wildcard 
	       <var>CT</var>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a>.<a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a>, 
	      as defined in
	      <a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.
	     </span></div>
</div>
	  </div></div>
       </div></div></div><p><span class="termdef"><a name="loc-locallyValid-seq" id="loc-locallyValid-seq" title="" shape="rect">[Definition:]&#160;&#160;</a>
     A sequence of element information items is <b>locally valid</b> with
     respect to a <a href="#ct" class="compref" shape="rect">Content Type</a> if and only if it satisfies
     <a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content) (&#167;3.4.4.3)</a> with respect to that <a href="#ct" class="compref" shape="rect">Content Type</a>.
    </span></p></div><div class="div4">
<h5><a name="sec-particle-attribution" id="sec-particle-attribution" shape="rect"></a>3.4.4.4 Attribution
      </h5><p><a name="anchor5748" id="anchor5748" shape="rect"></a><span class="termdef"><a name="key-att-to" id="key-att-to" title="" shape="rect">[Definition:]&#160;&#160;</a>
     During <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of an element
     information item against its (complex) <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>,
     associations 
     between element and attribute information items among the
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> on the one hand, and the attribute uses,
     attribute wildcard, particles
     and open contentproperty record  on the other, are
     established. The element or attribute information item is
     <b>attributed to</b> the corresponding component.
    </span></p><p> 
     When an attribute information item
     has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as
     the
     <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of an
     <a href="#au" class="compref" shape="rect">Attribute Use</a>, then the item is <b>attributed to</b> that
     attribute use. Otherwise, if the item matches an attribute wildcard, as
     described in <a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>, then the item is
     <b>attributed to</b> that wildcard. Otherwise the item is
     <em>not</em> <b>attributed to</b> any component.
    </p><div class="block">
     When a sequence <var>S</var> of <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> element information items are checked
     against the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>'s <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
     <var>CT</var>, let <var>S1</var> and <var>S2</var> be subsequences of <var>S</var>
     such that
     <ol class="enumar"><li><div class="p">
       <var>S</var> is a member of <var>S1</var> &#215; <var>S2</var>
      </div></li><li><div class="p">
       <var>S1</var> is a prefix of some element sequence that is
       
       <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
       with respect to <var>CT</var>,
       as defined in <a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content) (&#167;3.4.4.3)</a>.
      </div></li><li><div class="p">
       for every element <var>E</var> in <var>S2</var>, let <var>S3</var> be
       
       the longest
       prefix of <var>S1</var> where members of <var>S3</var> are before
       <var>E</var> in <var>S</var>, then <var>S3</var> + <var>E</var> is
       <em>not</em> a prefix of any element sequence that is
       
       <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
       with respect to <var>CT</var>.
      </div></li></ol>
     Then members of <var>S1</var> that form a
      <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in
      <var>CT</var>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a> (see
      <a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content) (&#167;3.4.4.3)</a>) are <b>attributed to</b>
      the particles they match up with in the
      <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a>. Other members of
      <var>S1</var> are <b>attributed to</b> the
      <a href="#ct-open_content" class="propref" shape="rect">{open content}</a> of <var>CT</var>.
      Members of <var>S2</var> are <em>not</em> <b>attributed to</b>
      any component.
    </div><div class="note"><div class="p"><b>Note:</b> 
     The above definition 
     makes sure that
     <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attribution<span class="arrow">&#183;</span></a> happens even when the
     sequence of element information items is not
     <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> with respect to a
     <a href="#ct" class="compref" shape="rect">Content Type</a>. For example, if a complex type definition has the
     following content model:
<pre xml:space="preserve">   &lt;xs:sequence&gt;
     &lt;xs:element name="a"/&gt;
     &lt;xs:element name="b"/&gt;
     &lt;xs:element name="c"/&gt;
   &lt;/xs:sequence&gt;</pre>
     and an input sequence
<pre xml:space="preserve">   &lt;a/&gt;&lt;b/&gt;&lt;d/&gt;</pre>
     Then the element &lt;a&gt; is
     <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to the particle whose term is the
     "a" element declaration. Similarly, &lt;b&gt; is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to the "b"
     particle.
    </div></div><p>
     <span class="termdef"><a name="key-dd" id="key-dd" title="" shape="rect">[Definition:]&#160;&#160;</a>
      During <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, associations between
      element and attribute information items among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and
      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> on the one hand, and element and attribute declarations on
      the other, are also established. When an item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
      <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, then it is associated with the declaration which is the
      <a href="#p-term" class="propref" shape="rect">{term}</a> of the particle. Similarly, when an
      attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an <a href="#au" class="compref" shape="rect">Attribute Use</a>,
      then the item is associated with the
      <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of that
      <a href="#au" class="compref" shape="rect">Attribute Use</a>. Such declarations are called the
      <b>context-determined declarations</b>.
     </span>
     See clause <a href="#c-ctma" shape="rect">2.1</a> (in <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>)
     for attribute declarations, clause <a href="#c-cdde" shape="rect">2</a> (in
     <a href="#cvc-particle" shape="rect">Element Sequence Locally Valid (Particle) (&#167;3.9.4.2)</a>) for element declarations.
    </p></div></div><div class="div3">
<h4><a name="sec-ctdsic" id="sec-ctdsic" shape="rect"></a>3.4.5 Complex Type Definition Information Set Contributions</h4><div class="div4">
<h5><a name="sec-sic-attrDefault" id="sec-sic-attrDefault" shape="rect"></a>3.4.5.1 Attribute Default Value</h5><div class="constraintnote"><a id="sic-attrDefault" name="sic-attrDefault" shape="rect"></a><b>Schema Information Set Contribution: Attribute Default Value</b><br clear="none" /><div class="constraint"><div class="p">For each <a href="#key-dflt-att" class="termref" shape="rect"><span class="arrow">&#183;</span>defaulted attribute<span class="arrow">&#183;</span></a>,
the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> has an attribute information item whose
properties are as below added to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of the element
information item.</div><div class="p">In addition, if necessary 
<a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is performed on the element
information item for the <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>'s 
<a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a>.</div><div class="glist"><div class="gitem"><div class="giLabel"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[local name]</a></div><div class="giDef"><div class="p">The <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>'s <a href="#ad-name" class="propref" shape="rect">{name}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a></div><div class="giDef"><div class="p">The <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>'s <a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[prefix]</a></div><div class="giDef"><div class="p">If the 
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> has a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>

<a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> <var>N</var>, then
a namespace prefix bound to <var>N</var> in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> property 
of the element information item in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
If the 
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>'s
<a href="#ad-target_namespace" class="propref" shape="rect">{target namespace}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then
<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</div><div class="p">
 If  
 more than one 
 prefix is
 bound to <var>N</var> in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a>, it is
 <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> which of those prefixes is used.
</div></div></div><div class="gitem"><div class="giLabel"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized value]</a></div><div class="giDef"><div class="p">The <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>'s <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a></div><div class="giDef"><div class="p">The element information item being assessed.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a></div><div class="giDef"><div class="p">The <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>'s <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a></div><div class="giDef"><div class="p">The <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>'s
          <a href="#vc_a-value" class="propref" shape="rect">{value}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-schema_default" class="propref" shape="rect">[schema default]</a></div><div class="giDef"><div class="p">The <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>'s <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-validation_context" class="propref" shape="rect">[validation context]</a></div><div class="giDef"><div class="p">The nearest ancestor element information item with a
<a href="#e-schema_information" class="propref" shape="rect">[schema information]</a> property.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-validity" class="propref" shape="rect">[validity]</a></div><div class="giDef"><div class="p"><b><i>valid</i></b>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-validation_attempted" class="propref" shape="rect">[validation attempted]</a></div><div class="giDef"><div class="p"><b><i>full</i></b>.</div></div></div><div class="gitem"><div class="giLabel"><a href="#a-schema_specified" class="propref" shape="rect">[schema specified]</a></div><div class="giDef"><div class="p"><b><i>schema</i></b>.</div></div></div></div><div class="p">The added items 

also  
have <a href="#a-type_definition" class="propref" shape="rect">[type definition]</a>
(and <a href="#a-member_type_definition" class="propref" shape="rect">[member type definition]</a>
and <a href="#a-member_type_definitions" class="propref" shape="rect">[member type definitions]</a>
if appropriate) properties, 
and 
their lighter-weight alternatives, as specified in <a href="#sic-attrType" shape="rect">Attribute Validated by Type (&#167;3.2.5.4)</a>.</div></div></div><div class="p"> <a name="anchor6445" id="anchor6445" shape="rect"></a>
<div class="termdef"><a name="term-ns-fixup" id="term-ns-fixup" title="" shape="rect">[Definition:]&#160;&#160;</a>When
default values are supplied for attributes, <b>namespace fixup</b>
may be required, to ensure that the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> includes 
the namespace bindings needed and maintains the consistency
of the namespace information in the infoset.  To perform
namespace fixup on an element information item <var>E</var> for
a namespace <var>N</var>:
<div class="constraintlist"><div class="clnumber">1 <span class="p">If the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var>

binds a prefix to <var>N</var>, no
namespace fixup is needed; the properties of <var>E</var> 
are not changed.</span></div>
<div class="clnumber">2 <span class="p">Otherwise, first select some prefix <var>P</var> which is not bound by
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var> (the choice of
prefix 
is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>).</span></div>
<div class="clnumber">3 <span class="p">Add an entry to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var> binding <var>P</var> to <var>N</var>.</span></div>
<div class="clnumber">4 <span class="p">Add a namespace attribute to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a> of <var>E</var>.</span></div>
<div class="clnumber">5 <!--* no span class='p' possible here *-->Maintain the consistency of the information set by adjusting
the namespace bindings on the descendants of <var>E</var>.  This may
be done in either of two ways:<div class="constraintlist"><div class="clnumber">5.1 <span class="p">Add the binding of <var>P</var> to <var>N</var> to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of all
descendants of <var>E</var>, except where that binding is overridden 
by another binding for <var>P</var>.</span></div>
<div class="clnumber">5.2 <span class="p">Add to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a> of each child of <var>E</var> a namespace 
attribute which undeclares the binding for <var>P</var> (i.e. a
namespace attribute for prefix <var>P</var> whose <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> 
is the empty string), unless that child already has a
namespace declaration for prefix <var>P</var>.
Note that this approach is possible
only if <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> is in use,
rather than <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>.</span></div>
</div>
<div class="p">The choice between the two methods of maintaining
consistency in the information set is

<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.</div></div>
</div></div>
If the <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is occasioned by a defaulted attribute 
with a non-absent target namespace, then (as noted above), the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[prefix]</a> of the attribute information item supplied
in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is set to <var>P</var>.</div><div class="note"><div class="p"><b>Note:</b> 
       When a default value of type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
       or <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a> is applied,
       
       it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> whether
       <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> occurs; if it does not, the prefix
       used in the lexical representation (in
       <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized value]</a>
       or <a href="#a-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a>) will
       not necessarily map to the namespace name of the value
       (in <a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>).
       
       To reduce problems and
       confusion, users may prefer to ensure that the required namespace
       information item is 
       present in the input infoset.
      </div></div></div><div class="div4">
<h5><a name="sec-sic-match-info" id="sec-sic-match-info" shape="rect"></a>3.4.5.2 Match Information</h5><div class="constraintnote"><a id="sic-match-info" name="sic-match-info" shape="rect"></a><b>Schema Information Set Contribution: Match Information</b><br clear="none" /><div class="constraint"><div class="p">
      To allow users of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
      to distinguish element information
      items which are <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particles<span class="arrow">&#183;</span></a> from those 
      <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particles<span class="arrow">&#183;</span></a>, if
      and only if the
      local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> of an element 
      information item has been assessed as defined by
      <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>,
      then each attribute information item in its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> 
      has the following properties in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;attribute&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="a-attribution" name="a-attribution" shape="rect"><span class="propdef">[attribute attribution]</span></a></dt><dd>
       The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
         an <a href="#au" class="compref" shape="rect">Attribute Use</a>, <b>then </b>an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
          the <a href="#au" class="compref" shape="rect">Attribute Use</a>.</div><div class="clnumber">2 <b>If </b>the attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
         an <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>, <b>then </b>an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
          the attribute wildcard.</div><div class="clnumber">3 <b>otherwise </b>(the item is not <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
         an <a href="#au" class="compref" shape="rect">Attribute Use</a> or an
         <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>) <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div>
      </dd><dt><a id="a-match_info" name="a-match_info" shape="rect"><span class="propdef">[match information]</span></a></dt><dd>
       A keyword indicating what kind of component the
       attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to.
       The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
         <a href="#au" class="compref" shape="rect">Attribute Use</a>, <b>then </b><b><i>attribute</i></b></div><div class="clnumber">2 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>strict</i></b>
         <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>, <b>then </b><b><i>strict</i></b></div><div class="clnumber">3 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>lax</i></b>
         <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>, <b>then </b><b><i>lax</i></b></div><div class="clnumber">4 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b>
         <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>, <b>then </b><b><i>skip</i></b></div><div class="clnumber">5 <b>otherwise </b>(the item is not <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
         an <a href="#au" class="compref" shape="rect">Attribute Use</a> or an
         <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>)
         <b><i>none</i></b></div></div>
      </dd></dl>
</div>
</div>
<div class="p">And each element information item in
      its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> has the following properties in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-attribution" name="e-attribution" shape="rect"><span class="propdef">[element attribution]</span></a></dt><dd>
       The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the element information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
         an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> or a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, <b>then </b>an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
          the <a href="#p" class="compref" shape="rect">Particle</a>.</div><div class="clnumber">2 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
         <a href="#oc" class="compref" shape="rect">Open Content</a>, <b>then </b>an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
          the <a href="#oc" class="compref" shape="rect">Open Content</a>.</div><div class="clnumber">3 <b>otherwise </b>(the item is not <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
         a <a href="#p" class="compref" shape="rect">Particle</a> or an
         <a href="#oc" class="compref" shape="rect">Open Content</a>) <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div>
      </dd><dt><a id="e-match_info" name="e-match_info" shape="rect"><span class="propdef">[match information]</span></a></dt><dd>
       A keyword indicating what kind of <a href="#p" class="compref" shape="rect">Particle</a> the
       item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to.
       The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
         <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, <b>then </b><b><i>element</i></b></div><div class="clnumber">2 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>strict</i></b>
         <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, <b>then </b><b><i>strict</i></b></div><div class="clnumber">3 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>lax</i></b>
         <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, <b>then </b><b><i>lax</i></b></div><div class="clnumber">4 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b>
         <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, <b>then </b><b><i>skip</i></b></div><div class="clnumber">5 <b>If </b>the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
         <a href="#oc" class="compref" shape="rect">Open Content</a>, <b>then </b><b><i>open</i></b></div><div class="clnumber">6 <b>otherwise </b>(the item is not
         <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <a href="#p" class="compref" shape="rect">Particle</a> or
          an <a href="#oc" class="compref" shape="rect">Open Content</a>) <b><i>none</i></b></div></div>
      </dd></dl>
</div>
</div>
</div></div></div></div><div class="div3">
<h4><a name="coss-ct" id="coss-ct" shape="rect"></a>3.4.6 Constraints on Complex Type Definition Schema Components</h4><p>All complex type definitions (see <a href="#Complex_Type_Definitions" shape="rect">Complex Type Definitions (&#167;3.4)</a>) <span class="rfc2119">must</span> satisfy the following constraints.</p><div class="div4">
<h5><a name="sec-ct-props-correct" id="sec-ct-props-correct" shape="rect"></a>3.4.6.1 Complex Type Definition Properties Correct</h5><div class="constraintnote"><a id="ct-props-correct" name="ct-props-correct" shape="rect"></a><b>Schema Component Constraint: Complex Type Definition Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a complex type definition are as described in
the property tableau in
<a href="#Complex_Type_Definition_details" shape="rect">The Complex Type Definition Schema Component (&#167;3.4.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">If the <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is a simple type
definition, the <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> is <b><i>extension</i></b>.</span></div>
<div class="clnumber">3 <span class="p">There are no circular 
definitions, except for that of <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.  That is, it is 
possible to reach the definition of 
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> by repeatedly following the 
<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</span></div>
<div class="clnumber">4 <span class="p">
	  No two distinct members of the 
	  <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> have
	  <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>s 
	  with the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.
	 </span></div>
<div class="clnumber">5 <span class="p">
	  If <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>, then 
	  <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
	   is either <b><i>element-only</i></b>
	  or <b><i>mixed</i></b>.
	 </span></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-ct-extends" id="sec-cos-ct-extends" shape="rect"></a>3.4.6.2 Derivation Valid (Extension)</h5><div class="constraintnote"><a id="cos-ct-extends" name="cos-ct-extends" shape="rect"></a><b>Schema Component Constraint: Derivation Valid (Extension)</b><br clear="none" /><div class="constraint"><div class="p">
  For every complex type <var>T</var> with
  <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> <var>B</var> where
	 <var>T</var>.<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> 
	 = <b><i>extension</i></b>,
	the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <b>If </b><var>B</var> is a complex type definition, <b>then </b>
	   <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1 <span class="p"><var>B</var>.<a href="#ctd-final" class="propref" shape="rect">{final}</a>
	      does not contain <b><i>extension</i></b>.</span></div>
<div class="clnumber">1.2<a id="c-cte" name="c-cte" shape="rect"> </a><span class="p"><var>B</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> 
	      is a subset of <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>. 
	      That is, for every attribute use <var>U</var> in
	      <var>B</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>, 
	      there is an attribute use in 
	      <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> 
	      whose properties, recursively, are identical to
	      those of <var>U</var>.
	     </span></div>
<div class="clnumber">1.3 <span class="p">If <var>B</var> has an <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>,
	      then <var>T</var>
	      also
	       has one, and <var>B</var>.<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>
	       is a subset of 
	       <var>T</var>.<a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>, as
	      defined by <a href="#cos-ns-subset" shape="rect">Wildcard Subset (&#167;3.10.6.2)</a>.</span></div>
<div class="clnumber">1.4 <!--* no span class='p' possible here *-->
            <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.4.1 <span class="p"><var>B</var> and <var>T</var> both 
		 have <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> 
		 = <b><i>simple</i></b> and both have the same 
		 <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>.
		</span></div>
<div class="clnumber">1.4.2 <span class="p"><var>B</var> and <var>T</var> both have 
		 <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
		 = 
		 <b><i>empty</i></b>.</span></div>
<div class="clnumber">1.4.3 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.4.3.1 <span class="p"><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
		   =
		   <b><i>element-only</i></b> or
		   <b><i>mixed</i></b>.</span></div>
<div class="clnumber">1.4.3.2 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.4.3.2.1 <span class="p"><var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>empty</i></b>.</span></div>
<div class="clnumber">1.4.3.2.2 <!--* no span class='p' possible here *-->
                   <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.4.3.2.2.1 <span class="p">Both <var>B</var> and <var>T</var> have
			<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> 
			= <b><i>mixed</i></b> or
			both have <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
			= <b><i>element-only</i></b>.</span></div>
<div class="clnumber">1.4.3.2.2.2 <span class="p">
			<var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
			is a <a href="#cd-model-extension" class="termref" shape="rect"><span class="arrow">&#183;</span>valid
			 extension<span class="arrow">&#183;</span></a> of 
			<var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>, 
			as defined in <a href="#cos-particle-extend" shape="rect">Particle Valid (Extension) (&#167;3.9.6.2)</a>.</span></div>
<div class="clnumber">1.4.3.2.2.3 <!--* no span class='p' possible here *-->
                     <b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.4.3.2.2.3.1 <span class="p"><var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a> 
			     (call it <b>BOT</b>) is
			   <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
			  </span></div>
<div class="clnumber">1.4.3.2.2.3.2 <span class="p"><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-open_content" class="propref" shape="rect">{open content}</a> 
			   (call it <b>EOT</b>) has
			   <a href="#oc-mode" class="propref" shape="rect">{mode}</a>
			   <b><i>interleave</i></b>.
			  </span></div>
<div class="clnumber">1.4.3.2.2.3.3 <span class="p">
			   Both <b>BOT</b> and <b>EOT</b>
			   have
			   <a href="#oc-mode" class="propref" shape="rect">{mode}</a>
			   <b><i>suffix</i></b>.
			  </span></div>
</div>
		       </div>
<div class="clnumber">1.4.3.2.2.4 <span class="p">
                     If neither <b>BOT</b> nor
			<b>EOT</b> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then 
			<b>BOT</b>.<a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>
			is a subset of 
			
			 <b>EOT</b>.<a href="#oc-wildcard" class="propref" shape="rect">{wildcard}</a>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>, as defined
			by
			<a href="#cos-ns-subset" shape="rect">Wildcard Subset (&#167;3.10.6.2)</a>.</span></div>
</div>
		    </div>
</div></div>
</div></div>
</div>
	     </div>
<div class="clnumber">1.5 <span class="p">It is in principle
	      possible to <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derive<span class="arrow">&#183;</span></a> <var>T</var> in two steps, the first
	      an extension and the second a restriction (possibly
	      vacuous), from that type definition among its ancestors
	      whose <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>
	      is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.</span><div class="note"><div class="p"><b>Note:</b> This requirement ensures that
	       nothing removed by a restriction is subsequently added
	       back by an extension in an incompatible way (for example,
		with a conflicting type assignment or value
		constraint).</div><div class="p">Constructing the intermediate type definition to
	       check this constraint is straightforward:  simply
	       re-order the <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> to put all the extension
	       steps first, then collapse them into a single
	       extension.  If the resulting definition can be the
	       basis for a valid restriction to the desired
	       definition, the constraint is satisfied.</div></div></div>
<div class="clnumber">1.6<a id="c-vs-ctd-e" name="c-vs-ctd-e" shape="rect"> </a><span class="p">
	      For any element or attribute information item, its
	      
	      <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> within <var>T</var> is
	      <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for the 
	      <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>
	      within <var>B</var>, <a href="#key-val-sub-type-absolute" class="termref" shape="rect"><span class="arrow">&#183;</span>without limitation<span class="arrow">&#183;</span></a>, if neither is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	     </span></div>
<div class="clnumber">1.7 <span class="p"><var>B</var>.<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a>
	      is a prefix of <var>T</var>.<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a>.</span></div>
</div>
	  </div><div class="clnumber">2 <b>If </b><var>B</var> is a simple type definition, <b>then </b>
         <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
	      <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> 
	      = <b><i>simple</i></b> and 
	      <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a> =
	      <var>B</var>.</span></div>
<div class="clnumber">2.2 <span class="p"><var>B</var>.<a href="#std-final" class="propref" shape="rect">{final}</a>
	      does not contain <b><i>extension</i></b>.</span></div>
</div>
	  </div></div> .
     </div></div></div><p><span class="termdef"><a name="cd-ct-extension" id="cd-ct-extension" title="" shape="rect">[Definition:]&#160;&#160;</a>
	A complex type <b>T</b> is a <b>valid extension</b> of its 
	<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> if and only if 
	<b>T</b>.<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
	 = <b><i>extension</i></b> 
	and
	<var>T</var>
	satisfies the constraint <a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension) (&#167;3.4.6.2)</a></span>.</p></div><div class="div4">
<h5><a name="sec-derivation-ok-restriction" id="sec-derivation-ok-restriction" shape="rect"></a>3.4.6.3 Derivation Valid (Restriction, Complex)</h5><div class="constraintnote"><a id="derivation-ok-restriction" name="derivation-ok-restriction" shape="rect"></a><b>Schema Component Constraint: Derivation Valid (Restriction, Complex)</b><br clear="none" /><div class="constraint"><div class="p">
  For every complex type <var>T</var> with
  <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> <var>B</var> where
	 <var>T</var>.<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> 
	 = <b><i>restriction</i></b>,
	<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>B</var>   is a complex type definition whose
	   <a href="#ctd-final" class="propref" shape="rect">{final}</a> does not contain <b><i>restriction</i></b>.</span></div>
<div class="clnumber">2 <b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><var>B</var> is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2.2 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.2.1 <span class="p"><var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
	       = <b><i>simple</i></b></span></div>
<div class="clnumber">2.2.2 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.2.2.1 <span class="p">Let <var>S</var><sub><var>B</var></sub> be 
		 <var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>, 
		 and
		 <var>S</var><sub><var>T</var></sub> be 
		 <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a>.
		 Then <var>S</var><sub><var>T</var></sub> is validly derived from <var>S</var><sub><var>B</var></sub> as defined
		 in
		 <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</span></div>
<div class="clnumber">2.2.2.2 <span class="p"><var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>mixed</i></b> and
		 <var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
		 is a <a href="#p" class="compref" shape="rect">Particle</a> which is
		 <a href="#cd-emptiable" class="termref" shape="rect"><span class="arrow">&#183;</span>emptiable<span class="arrow">&#183;</span></a> as
		 defined in <a href="#cos-group-emptiable" shape="rect">Particle Emptiable (&#167;3.9.6.3)</a>.</span></div>
</div></div>
</div></div>
<div class="clnumber">2.3 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.3.1 <span class="p">
	       <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
	       = <b><i>empty</i></b>.
	      </span></div>
<div class="clnumber">2.3.2 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.3.2.1 <span class="p"><var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> 
		 = <b><i>empty</i></b>.</span></div>
<div class="clnumber">2.3.2.2 <span class="p"><var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> =
		 <b><i>element-only</i></b> or
		 <b><i>mixed</i></b>, and
		   <var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-particle" class="propref" shape="rect">{particle}</a>
		  is a
		  <a href="#p" class="compref" shape="rect">Particle</a> which is <a href="#cd-emptiable" class="termref" shape="rect"><span class="arrow">&#183;</span>emptiable<span class="arrow">&#183;</span></a> as defined in
		 <a href="#cos-group-emptiable" shape="rect">Particle Emptiable (&#167;3.9.6.3)</a>.</span></div>
</div></div>
</div></div>
<div class="clnumber">2.4 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.4.1 <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.4.1.1 <span class="p">
		 <var>T</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a>
		 = <b><i>element-only</i></b>
		  and <var>B</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> 
		 = <b><i>element-only</i></b> or <b><i>mixed</i></b>. </span></div>
<div class="clnumber">2.4.1.2 <span class="p">
		 <var>T</var> and <var>B</var> both have 
		 <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-variety" class="propref" shape="rect">{variety}</a> 
		 =
		 <b><i>mixed</i></b>.</span></div>
</div></div>
<div class="clnumber">2.4.2<a id="T.ct.restricts.B.ct" name="T.ct.restricts.B.ct" shape="rect"> </a><span class="p">The <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of
	       <var>T</var> <a href="#pt-actual-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restricts<span class="arrow">&#183;</span></a>
	       that of <var>B</var> as defined
	       in <a href="#cos-content-act-restrict" shape="rect">Content type restricts (Complex Content) (&#167;3.4.6.4)</a>.</span></div>
</div></div>
</div></div>
<div class="clnumber">3<a id="c-ran" name="c-ran" shape="rect"> </a><span class="p">For every element information item  <var>E</var>, if the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of  <var>E</var> satisfy clause <a href="#c-aam" shape="rect">2</a> and
	    clause <a href="#c-ra" shape="rect">3</a> of 
<a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> with respect to   <var>T</var>, then they also satisfy the same
	    clauses with respect to
	    <var>B</var>,
	    and for every attribute information item <var>A</var> in  <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>,
	    <var>B</var>'s <a href="#key-dft-binding" class="termref" shape="rect"><span class="arrow">&#183;</span>default binding<span class="arrow">&#183;</span></a> for <var>A</var> <a href="#loc-testSubP" class="termref" shape="rect"><span class="arrow">&#183;</span>subsumes<span class="arrow">&#183;</span></a> that defined by
	    
	    <var>T</var>.</span></div>
<div class="clnumber">4<a id="c-vs-ctd-r" name="c-vs-ctd-r" shape="rect"> </a><span class="p">
	   For any element or
	    attribute information item, its 
	    <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>
	    within <var>T</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a>
	     for its 
	    <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> within
	    <var>B</var>, subject to the blocking keywords
	   {<b><i>extension</i></b>, <b><i>list</i></b>, <b><i>union</i></b>}, if the item has a 
	     <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> both in
	     <var>T</var> and in <var>B</var>.
	  </span></div>
<div class="clnumber">5 <span class="p"><var>B</var>.<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a> is a prefix of
	   <var>T</var>.<a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a>.</span></div>
</div> 
	
	<span class="termdef"><a name="cd-ct-restriction" id="cd-ct-restriction" title="" shape="rect">[Definition:]&#160;&#160;</a>A complex
	 type definition with <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation    method}</a> = <b><i>restriction</i></b> is a <b>valid
	  restriction</b> of its <a href="#ctd-base_type_definition" class="propref" shape="rect">{base    type definition}</a> if and only if the constraint <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a> is
	 satisfied</span>.
       </div></div></div><div class="note"><div class="p"><b>Note:</b>  Valid
	restriction involves both a subset relation on the set of
	elements valid against <var>T</var> and those valid against <var>B</var>, and a derivation relation, explicit in the
	type hierarchy, between the types assigned to attributes and
	child elements by <var>T</var> and those assigned to the same
	attributes and children by <var>B</var>.</div></div><p>The constraint just given,
       like other constraints on schemas, 
       <span class="rfc2119">must</span> be satisfied by every complex type <var>T</var> to which it
       applies.
      </p><div class="notice"><p><b>Editorial Note: </b><span style="color: red">Priority Feedback Request</span></p><p style="color: black;"><span class="edtext">
       <a name="anchor5293far1" id="anchor5293far1" shape="rect"></a>
       The above constraint allows a complex type with an <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>
       model groups to restrict another complex type with either
       <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a>, or <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a>
       model groups. Even when the base type has an <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a> model
       group, the list of member elements and wildcard may be very different
       between the two types. The working group solicits feedback on how useful
       this is in practice, and on the difficulty in implementing this feature.
      </span></p></div><p>
       However, under certain conditions conforming processors
       need not (although they <span class="rfc2119">may</span>) detect some violations of this constraint.
       If (1) the type definition being checked
       has <var>T</var> . <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> . <a href="#ct-particle" class="propref" shape="rect">{particle}</a> . <a href="#p-term" class="propref" shape="rect">{term}</a> . <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a>
       = <b><i>all</i></b>
       and (2) an implementation is unable to determine
       
       by examination of the schema in isolation
       whether or not clause <a href="#T.ct.restricts.B.ct" shape="rect">2.4.2</a>
       is satisfied, then the implementation <span class="rfc2119">may</span> 
       provisionally accept the derivation.
       If any instance encountered in the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode
       is valid against <var>T</var> but not against <var>T</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>,
       then the derivation of <var>T</var> does not satisfy this
       constraint, the schema does not conform to this
       specification, and no <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> can be performed
       using that schema.
      </p><p>It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor (a) always
       detects violations of clause <a href="#T.ct.restricts.B.ct" shape="rect">2.4.2</a>
       by examination of the schema in isolation, (b)
       detects them only when some element information item
       in the input document is valid against <var>T</var> but not
       against <var>T</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>, or (c) sometimes detects
       such violations by examination of the schema in isolation
       and sometimes not.  In the latter case, the circumstances
       in which the processor does one or the other are 
       <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
      </p><div class="notice"><p><b>Editorial Note: </b><span style="color: red">Priority Feedback Request</span></p><p style="color: black;"><span class="edtext">
       <a name="anchor5293far2" id="anchor5293far2" shape="rect"></a>
       The above rule allows an implementation to use a potentially non-conforming
       schema to perform schema assessment and produce PSVI. This results in
       an exception of rules specified in <a href="#conformance-schemaValidity" shape="rect">Errors in Schema Construction and Structure (&#167;5.1)</a>.
       The Working Group solicits input from implementors and users of this
       specification as to whether this is an acceptable implementation
       behavior.
      </span></p></div></div><div class="div4">
<h5><a name="sec-cos-content-act-restrict" id="sec-cos-content-act-restrict" shape="rect"></a>3.4.6.4 Content Type Restricts (Complex Content)</h5><div class="constraintnote"><a id="cos-content-act-restrict" name="cos-content-act-restrict" shape="rect"></a><b>Schema Component Constraint: Content type restricts (Complex Content)</b><br clear="none" /><div class="constraint"><div class="p"><div class="termdef"><a name="pt-actual-restriction" id="pt-actual-restriction" title="" shape="rect">[Definition:]&#160;&#160;</a>A
   <a href="#ct" class="compref" shape="rect">Content Type</a> <b>R</b> (for "restriction")
   with complex content (i.e. one with a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
   <a href="#ct-particle" class="propref" shape="rect">{particle}</a>)
   <b>restricts</b> another <a href="#ct" class="compref" shape="rect">Content Type</a> <b>B</b> (for
   "base") with complex content
   if and only if
   <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">Every sequence of element information items which is 
       <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> 
       with respect to <b>R</b>
       is also <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> 
       with respect to <b>B</b>.</span></div>
<div class="clnumber">2<a id="ctr-child-type-subsumption" name="ctr-child-type-subsumption" shape="rect"> </a><span class="p">For all sequences of element information items <b>ES</b> which are 
       <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> 
       with respect to <b>R</b>, for all
       elements <b>E</b> in <b>ES</b>,
       <b>B</b>'s <a href="#key-dft-binding" class="termref" shape="rect"><span class="arrow">&#183;</span>default binding<span class="arrow">&#183;</span></a> for <b>E</b>
       <a href="#loc-testSubP" class="termref" shape="rect"><span class="arrow">&#183;</span>subsumes<span class="arrow">&#183;</span></a> 
       that defined by <b>R</b>.
       </span></div>
</div>
 </div>    
   </div><div class="p"><div class="termdef"><a name="key-dft-binding" id="key-dft-binding" title="" shape="rect">[Definition:]&#160;&#160;</a>
    When a sequence of  element information items <b>ES</b> 
    is <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
    with respect to a 
    <a href="#ct" class="compref" shape="rect">Content Type</a> <b>CT</b>
    or when a set of attribute information items
    <b>AS</b> satisfies clause <a href="#c-aam" shape="rect">2</a> and clause <a href="#c-ra" shape="rect">3</a>
    of <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> with respect to a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>,
    there is a (partial) functional mapping from
    the element information items <var>E</var> in the sequence <var>ES</var>
    or the attribute information items in
    <var>AS</var>
    to a <b>default binding</b> for the item,
    where the default binding is 
    an <a href="#ed" class="compref" shape="rect">Element Declaration</a>, 
    an <a href="#au" class="compref" shape="rect">Attribute Use</a>,
    or one
    of the keywords <b><i>strict</i></b>, <b><i>lax</i></b>, or <b><i>skip</i></b>,
    as follows:
    <div class="constraintlist"><div class="clnumber">1 <span class="p">When the item has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>, the 
       default binding is that <a href="#ed" class="compref" shape="rect">Element Declaration</a>.</span></div>
<div class="clnumber">2 <span class="p">
      When the item has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and it is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
      <a href="#au" class="compref" shape="rect">Attribute Use</a>, the default binding is 
      that <a href="#au" class="compref" shape="rect">Attribute Use</a>.
     </span></div>
<div class="clnumber">3 <span class="p">
      When the item has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and it is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
      attribute wildcard, the default binding is 
      an <a href="#au" class="compref" shape="rect">Attribute Use</a> whose
      <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> is the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>,
      whose <a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, and
      whose <a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a> is the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>'s
      <a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a> (the other properties in the
      <a href="#au" class="compref" shape="rect">Attribute Use</a> are not relevant).
     </span></div>
<div class="clnumber">4 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>strict</i></b>
       <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
       or an <a href="#oc" class="compref" shape="rect">Open Content</a>
       with a <b><i>strict</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> and 
       it does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> or
       a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>, then
       the default binding is the keyword <b><i>strict</i></b>.</span></div>
<div class="clnumber">5 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>lax</i></b>
       <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
       or an <a href="#oc" class="compref" shape="rect">Open Content</a>
       with a <b><i>lax</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> and 
       it does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> or
       a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>, then
       the default binding is 
       
       the keyword <b><i>lax</i></b>.</span></div>
<div class="clnumber">6 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b>
       <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
       or an <a href="#oc" class="compref" shape="rect">Open Content</a>
       with a <b><i>skip</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> then
       the default binding is the keyword
       
       <b><i>skip</i></b>.</span></div>
</div>
   </div>
   </div><div class="p"><span class="termdef"><a name="loc-testSubP" id="loc-testSubP" title="" shape="rect">[Definition:]&#160;&#160;</a>A 
    <a href="#key-dft-binding" class="termref" shape="rect"><span class="arrow">&#183;</span>default binding<span class="arrow">&#183;</span></a>
    <b>G</b> (for general) <b>subsumes</b> another 
    <a href="#key-dft-binding" class="termref" shape="rect"><span class="arrow">&#183;</span>default binding<span class="arrow">&#183;</span></a>
    <b>S</b> (for specific) if and only if </span>
    <b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">1 <span class="p"><b>G</b> is <b><i>skip</i></b>.</span></div>
<div class="clnumber">2 <span class="p"><b>G</b> is <b><i>lax</i></b>
	and <b>S</b> is not <b><i>skip</i></b>.</span></div>
<div class="clnumber">3 <span class="p">Both <b>G</b> and <b>S</b> are <b><i>strict</i></b>.</span></div>
<div class="clnumber">4 <!--* no span class='p' possible here *--><b>G</b> and <b>S</b> are both Element Declarations and
	<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">4.1 <span class="p">Either 
	    <b>G</b>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> = <b><i>true</i></b>
	    or 
	    <b>S</b>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> = <b><i>false</i></b>.</span></div>
<div class="clnumber">4.2 <span class="p">Either <b>G</b> has no <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a>, or it is not <b><i>fixed</i></b>,
	    or <b>S</b> has a <b><i>fixed</i></b> <a href="#ed-value_constraint" class="propref" shape="rect">{value constraint}</a> with 
	    an equal or
                    identical
	    value.</span></div>
<div class="clnumber">4.3 <span class="p"><b>S</b>.<a href="#ed-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a> 
	    is 
	    a superset of <b>G</b>.<a href="#ed-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a>.</span></div>
<div class="clnumber">4.4 <span class="p"><b>S</b> disallows a superset of the substitutions that <b>G</b> does.</span></div>
<div class="clnumber">4.5<a id="c-vs-ct" name="c-vs-ct" shape="rect"> </a><span class="p">
	      <b>S</b>'s declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> is
	      <a href="#key-val-sub-type-restricts" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable as        a restriction<span class="arrow">&#183;</span></a> for <b>G</b>'s
	      declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</span></div>
<div class="clnumber">4.6<a id="c-tt-equiv" name="c-tt-equiv" shape="rect"> </a><span class="p">
	      <b>S</b>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a> and
	      <b>G</b>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a> either are both <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
	      or are both <a href="#key-nonnull" class="termref" shape="rect"><span class="arrow">&#183;</span>present<span class="arrow">&#183;</span></a> and 
	      <a href="#key-equiv-tt" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.
	    </span></div>
</div>
	</div>
<div class="clnumber">5 <!--* no span class='p' possible here *--><b>G</b> and <b>S</b> are both 
	   <a href="#au" class="compref" shape="rect">Attribute Use</a>s and
	   <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">5.1 <span class="p"><var>G</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> is
	      validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from 
	      <var>S</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a>, 
	       as
	      defined in <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</span></div>
<div class="clnumber">5.2 <!--* no span class='p' possible here *-->
	     Let <b>GVC</b> be <var>G</var>'s
	     <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a> and <b>SVC</b> be <var>S</var>'s
	     <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>, then
	     <b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">5.2.1 <span class="p"><b>GVC</b> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or has
		 <a href="#vc_a-variety" class="propref" shape="rect">{variety}</a> <b><i>default</i></b>.</span></div>
<div class="clnumber">5.2.2 <span class="p"><b>SVC</b>.<a href="#vc_a-variety" class="propref" shape="rect">{variety}</a>
		 = <b><i>fixed</i></b> and 
		 <b>SVC</b>.<a href="#vc_a-value" class="propref" shape="rect">{value}</a> is 
		 equal or identical to
		 <b>GVC</b>.<a href="#vc_a-value" class="propref" shape="rect">{value}</a>.</span></div>
</div>
	     </div>
<div class="clnumber">5.3 <span class="p">
	     <var>G</var>.<a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a> =
	     <var>S</var>.<a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a>.
	    </span></div>
</div>
	  </div>
</div>
   </div></div></div><div class="note"><div class="p"><b>Note:</b> To restrict a complex type definition with a simple base type definition
to <b><i>empty</i></b>, use a simple type definition with a <b><i>fixed</i></b> value of
the empty string: this preserves the type information.</div></div><div class="note"><div class="p"><b>Note:</b> To restrict away a local element declaration that <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>competes<span class="arrow">&#183;</span></a> with
    a wildcard, use a wildcard in the derived type that explicitly
    disallows the element's <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>. See the example given in
    <a href="#declare-type" shape="rect">XML Representation of Complex Type Definition Schema Components (&#167;3.4.2)</a>.</div></div></div><div class="div4">
<h5><a name="sec-cos-ct-derived-ok" id="sec-cos-ct-derived-ok" shape="rect"></a>3.4.6.5 Type Derivation OK (Complex)</h5><p>The following constraint defines a relation appealed to elsewhere
in this specification.</p><div class="constraintnote"><a id="cos-ct-derived-ok" name="cos-ct-derived-ok" shape="rect"></a><b>Schema Component Constraint: Type Derivation OK (Complex)</b><br clear="none" /><div class="constraint"><div class="p">For a complex type definition (call it <b>D</b>, for
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>) to be validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a type definition (call this
<b>B</b>, for base) subject to 
the blocking keywords in
a subset of {<b><i>extension</i></b>,
<b><i>restriction</i></b>}
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">If <b>B</b> and <b>D</b> are not the same type
definition, then the <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a> of
<b>D</b> is not
in the subset.</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->
<b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1<a id="c-tid" name="c-tid" shape="rect"> </a><span class="p"><b>B</b> = <b>D</b>.</span></div>
<div class="clnumber">2.2 <span class="p"><b>B</b> = <b>D</b>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</span></div>
<div class="clnumber">2.3 <!--* no span class='p' possible here *-->
<b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.3.1 <span class="p"><b>D</b>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> &#8800; <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2.3.2 <!--* no span class='p' possible here *-->
The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">2.3.2.1 <b>If </b><b>D</b>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is complex, <b>then </b>it is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <b>B</b>
subject to the subset as defined by this constraint.</div><div class="clnumber">2.3.2.2 <b>If </b><b>D</b>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> is simple, <b>then </b>it is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <b>B</b>
subject to the subset as defined in <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div><div class="note"><div class="p"><b>Note:</b> This constraint is used to check that when someone uses a type in a
context where another type was expected (either via <code>xsi:type</code> or
<a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution groups<span class="arrow">&#183;</span></a>), that the type used is actually <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from the expected
type, and that that <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> does not involve a form of <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> which was
ruled out by the expected type.</div></div><div class="note"><a name="no-identity" id="no-identity" shape="rect"></a><div class="p"><b>Note:</b> The wording of clause <a href="#c-tid" shape="rect">2.1</a> above appeals to a notion of component identity which
is only incompletely defined by this version of this specification.
In some cases, the wording of this specification does make clear the
rules for component identity.  These cases include:
    <ul><li><div class="p">When they are both top-level components with the same component type,
namespace name, and local name;</div></li><li><div class="p">When they are necessarily the same type definition (for example, when
the two type
definitions in question are the type definitions associated with
two attribute or element declarations, which are discovered to be the same
declaration);</div></li><li><div class="p">When they are the same by construction (for example, when an element's
type definition defaults to being the same type definition as that of its
substitution-group head or when a complex type definition inherits an attribute
declaration from its base type definition).</div></li></ul>
   </div><div class="p">In other cases  
it is possible
that conforming implementations will
disagree as to whether components are identical.</div></div><div class="note"><div class="p"><b>Note:</b> When a complex type definition <var>S</var> is said to be 
"validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>" from a type definition <var>T</var>,
without mention of any specific set of blocking keywords,
or with the explicit phrase "without limitation",
then what is meant is that <var>S</var> is validly derived from
<var>T</var>, subject to the empty set of blocking keywords,
i.e. without any particular limitations.</div></div></div></div><div class="div3">
<h4><a name="builtin-ctd" id="builtin-ctd" shape="rect"></a>3.4.7 Built-in Complex Type Definition</h4><p>There is a complex
type definition for <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> present in every schema
by definition.  It has the following properties:</p><div class="scInstance"><div class="scHead"><a id="any-type-itself" name="any-type-itself" shape="rect">Complex Type Definition of anyType</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">anyType</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">http://www.w3.org/2001/XMLSchema</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal">itself</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a></div><div class="pvVal"><b><i>restriction</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-content_type" class="propref" shape="rect">{content type}</a></div><div class="pvVal">A <a href="#ct" class="compref" shape="rect">Content Type</a> as follows:
       <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>mixed</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#ct-particle" class="propref" shape="rect">{particle}</a></div><div class="pvVal">a
<a href="#p" class="compref" shape="rect">Particle</a> with the properties shown
         below in <a href="#anyType-outer-particle" shape="rect">Outer Particle for Content Type of anyType (&#167;3.4.7)</a>.
       </div></div><div class="pvpair"><div class="pvProp"><a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div></div>
      </div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a></div><div class="pvVal">
        a wildcard with the following properties::
             <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a></div><div class="pvVal">
               A <a href="#nc" class="compref" shape="rect">Namespace Constraint</a> with the following properties:
               <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#nc-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>any</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a></div><div class="pvVal">The empty set</div></div></div>
              </div></div><div class="pvpair"><div class="pvProp"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a></div><div class="pvVal"><b><i>lax</i></b></div></div></div></div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-assertions" class="propref" shape="rect">{assertions}</a></div><div class="pvVal">The empty sequence</div></div><div class="pvpair"><div class="pvProp"><a href="#ctd-abstract" class="propref" shape="rect">{abstract}</a></div><div class="pvVal"><b><i>false</i></b></div></div></div></div><p>
The outer particle of <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> contains a sequence with a single term:
</p><div class="scInstance"><div class="scHead"><a id="anyType-outer-particle" name="anyType-outer-particle" shape="rect">Outer Particle for Content Type of anyType</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="pvVal">1</div></div><div class="pvpair"><div class="pvProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="pvVal">a model group with
the following properties:
         <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#mg-compositor" class="propref" shape="rect">{compositor}</a></div><div class="pvVal"><b><i>sequence</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#mg-particles" class="propref" shape="rect">{particles}</a></div><div class="pvVal">
           a list containing one particle with the properties shown
           below in <a href="#anyType-inner-particle" shape="rect">Inner Particle for Content Type of anyType (&#167;3.4.7)</a>.
           </div></div></div>
        </div></div></div></div><p>
The inner particle of <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> contains a wildcard which matches any element:
</p><div class="scInstance"><div class="scHead"><a id="anyType-inner-particle" name="anyType-inner-particle" shape="rect">Inner Particle for Content Type of anyType</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="pvVal">0</div></div><div class="pvpair"><div class="pvProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="pvVal"><b><i>unbounded</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="pvVal">a wildcard with the following properties:
      <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a></div><div class="pvVal">
        A <a href="#nc" class="compref" shape="rect">Namespace Constraint</a> with the following properties:
        <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#nc-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>any</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a></div><div class="pvVal">The empty set</div></div></div>
       </div></div><div class="pvpair"><div class="pvProp"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a></div><div class="pvVal"><b><i>lax</i></b></div></div></div>
    </div></div></div></div><div class="note"><div class="p"><b>Note:</b> This specification does not provide an inventory of built-in complex
type definitions for use in user schemas.  A preliminary library of complex type
definitions is available which includes both mathematical (e.g.
<code>rational</code>) and utility (e.g. <code>array</code>) type definitions. 
In particular, there is a <code>text</code> type definition which is recommended for use
as the type definition in element declarations intended for general text
content, as it makes sensible provision for various aspects of
internationalization.  For more details, see the schema document for the type
library at its namespace name: <a href="http://www.w3.org/2001/03/XMLSchema/TypeLibrary.xsd" shape="rect">http://www.w3.org/2001/03/XMLSchema/TypeLibrary.xsd</a>.</div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#Complex_Type_Definitions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cAttribute_Group_Definitions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cAttributeUse" id="cAttributeUse" shape="rect"></a>3.5 Attribute Uses</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.1 <a href="#AU_details" shape="rect">The Attribute Use Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.2 <a href="#sec-xrau" shape="rect">XML Representation of Attribute Use Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.3 <a href="#sec-src-au" shape="rect">Constraints on XML Representations of Attribute Uses</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.4 <a href="#sec-cvc-au" shape="rect">Attribute Use Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.5 <a href="#sec-ausic" shape="rect">Attribute Use Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.5.6 <a href="#coss-attruse" shape="rect">Constraints on Attribute Use Schema Components</a><br clear="none" />
</div><p>An attribute use is a utility component which controls the occurrence and
defaulting behavior of attribute declarations.  It plays the same role for
attribute declarations in complex types that particles play for element declarations.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType&gt;
 . . .
 &lt;xs:attribute ref="xml:lang" use="required"/&gt;
 &lt;xs:attribute ref="xml:space" default="preserve"/&gt;
 &lt;xs:attribute name="version" type="xs:decimal" fixed="1.0"/&gt;
&lt;/xs:complexType&gt;
     </pre></div><div class="exampleWrapper">
<div class="p">XML representations which all involve attribute uses, illustrating some of
the possibilities for controlling occurrence.</div></div></div><div class="div3">
<h4><a name="AU_details" id="AU_details" shape="rect"></a>3.5.1 The Attribute Use Schema Component</h4><p>The attribute use schema component has the following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="au" id="au" shape="rect">Attribute Use</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="au-annotations" shape="rect" id="au-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="au-required" shape="rect" id="au-required"></a><div class="pdName"><span class="propdef">{required}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
<div class="propDefn"><a name="au-attribute_declaration" shape="rect" id="au-attribute_declaration"></a><div class="pdName"><span class="propdef">{attribute declaration}</span></div>
<div class="pdDef">
An  <a href="#ad" class="compref" shape="rect">Attribute Declaration</a> component.  Required.</div>
</div>
<div class="propDefn"><a name="au-value_constraint" shape="rect" id="au-value_constraint"></a><div class="pdName"><span class="propdef">{value constraint}</span></div>
<div class="pdDef">
A  <a href="#vc_au" class="compref" shape="rect">Value Constraint</a> property record.  Optional.</div>
</div>
<div class="propDefn"><a name="au-inheritable" shape="rect" id="au-inheritable"></a><div class="pdName"><span class="propdef">{inheritable}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="vc_au" id="vc_au" shape="rect">Value Constraint</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="vc_au-variety" shape="rect" id="vc_au-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">default</span>, <span class="enumval">fixed</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="vc_au-value" shape="rect" id="vc_au-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">

    An <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>.  Required.
   </div>
</div>
<div class="propDefn"><a name="vc_au-lexical_form" shape="rect" id="vc_au-lexical_form"></a><div class="pdName"><span class="propdef">{lexical form}</span></div>
<div class="pdDef">

    A character string.  Required.
    
   </div>
</div>
</div></div>
</div>
</div>
<p><a href="#au-required" class="propref" shape="rect">{required}</a> determines whether this use of an attribute
declaration requires an appropriate attribute information item to be present, or
merely allows it.</p><p><a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> provides the attribute declaration itself,
which will in turn determine the simple type definition used.</p><p><a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a> allows for local
      specification of a default or fixed value.  This <span class="rfc2119">must</span> be
      consistent with that of the
      <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>, in that if
      the <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> specifies
      a fixed value, the only allowed <a href="#au-value_constraint" class="propref" shape="rect">{value        constraint}</a> is the same fixed value, or a value equal or
                    identical to it.</p><p>
      See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
      <a href="#au-annotations" class="propref" shape="rect">{annotations}</a> property.
     </p></div><div class="div3">
<h4><a name="sec-xrau" id="sec-xrau" shape="rect"></a>3.5.2 XML Representation of Attribute Use Schema Components</h4><p>Attribute uses correspond to all uses of <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> which
allow a <code>use</code> attribute.  These in turn correspond to
<em>two</em> components in each case, an attribute use and its <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> (although note the latter is not new when the attribute use is a reference to a top-level attribute declaration).  The appropriate mapping is described in <a href="#declare-attribute" shape="rect">XML Representation of Attribute Declaration Schema Components (&#167;3.2.2)</a>.</p></div><div class="div3">
<h4><a name="sec-src-au" id="sec-src-au" shape="rect"></a>3.5.3 Constraints on XML Representations of Attribute Uses</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-au" id="sec-cvc-au" shape="rect"></a>3.5.4 Attribute Use Validation Rules</h4><p>
      <span class="termdef"><a name="key-evc" id="key-evc" title="" shape="rect">[Definition:]&#160;&#160;</a>
       The <b>effective value constraint</b> of an attribute use 
       <var>U</var>
       is <var>U</var>.<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>, if present, otherwise 
       <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>, if present, 
       otherwise
       the <b>effective value constraint</b> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</span>
     </p><div class="constraintnote"><a id="cvc-au" name="cvc-au" shape="rect"></a><b>Validation Rule: Attribute Locally Valid (Use)</b><br clear="none" /><div class="constraint"><div class="p">For an attribute information item to be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to an attribute use
       its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <span class="rfc2119">must</span> be equal or identical to the <a href="#vc_a-value" class="propref" shape="rect">{value}</a> of the attribute use's <a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>, if it is present and has <a href="#vc_a-variety" class="propref" shape="rect">{variety}</a>
       <b><i>fixed</i></b>.</div></div></div></div><div class="div3">
<h4><a name="sec-ausic" id="sec-ausic" shape="rect"></a>3.5.5 Attribute Use Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-attruse" id="coss-attruse" shape="rect"></a>3.5.6 Constraints on Attribute Use Schema Components</h4><p>All attribute uses (see <a href="#cAttributeUse" shape="rect">Attribute Uses (&#167;3.5)</a>) <span class="rfc2119">must</span> satisfy the following constraints.</p><div class="constraintnote"><a id="au-props-correct" name="au-props-correct" shape="rect"></a><b>Schema Component Constraint: Attribute Use Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of an attribute use 
	 <var>U</var> are as
	 described in the property tableau in
	 <a href="#AU_details" shape="rect">The Attribute Use Schema Component (&#167;3.5.1)</a>, modulo 
	 the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">If <var>U</var>.<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a> is 
	 not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then it is a valid default with
	 respect to  
	 <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> 
	 as defined in <a href="#cos-valid-simple-default" shape="rect">Simple Default Valid (&#167;3.2.6.2)</a>.</span></div>
<div class="clnumber">3 <span class="p">If <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> has 
	 <a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_a-variety" class="propref" shape="rect">{variety}</a> 
	 = <b><i>fixed</i></b> and <var>U</var> itself has a
	 <a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>, then 
	 <var>U</var>.<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_au-variety" class="propref" shape="rect">{variety}</a> 
	 = <b><i>fixed</i></b> and
	 <var>U</var>.<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_au-value" class="propref" shape="rect">{value}</a> 
	 is identical to
	 <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>.<a href="#vc_a-value" class="propref" shape="rect">{value}</a>.</span></div>
</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cAttributeUse" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cModel_Group_Definitions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cAttribute_Group_Definitions" id="cAttribute_Group_Definitions" shape="rect"></a>3.6 Attribute Group Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.1 <a href="#Attribute_Group_Definition_details" shape="rect">The Attribute Group Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.2 <a href="#declare-attributeGroup" shape="rect">XML Representation of Attribute Group Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.2.1 <a href="#declare-attributeGroup-core" shape="rect">XML Mapping Rule for Named Attribute Groups</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.2.2 <a href="#declare-attributeGroup-wildcard" shape="rect">Common Rules for Attribute Wildcards</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.3 <a href="#constrain-attribute-group-xml" shape="rect">Constraints on XML Representations of Attribute Group Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.4 <a href="#sec-cvc-agd" shape="rect">Attribute Group Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.5 <a href="#sec-sic-agd" shape="rect">Attribute Group Definition Information Set
Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.6.6 <a href="#coss-attrGroup" shape="rect">Constraints on Attribute Group Definition Schema Components</a><br clear="none" />
</div><p>A schema can name a group of attribute declarations so that they can be incorporated as a
group into complex type definitions.</p><p>
Attribute group definitions do not participate in <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as such, but the
<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>
of one or
more complex type definitions <span class="rfc2119">may</span> be constructed in whole or part by reference
to an attribute group.  Thus, attribute group definitions provide a
replacement for some uses of XML's
<a href="http://www.w3.org/TR/xml11/#dt-PE" shape="rect">parameter entity</a> facility.
Attribute group definitions are provided primarily for reference from the XML
representation of schema components
(see <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> and <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>).
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:attributeGroup name="myAttrGroup"&gt;
    &lt;xs:attribute . . ./&gt;
    . . .
&lt;/xs:attributeGroup&gt;

&lt;xs:complexType name="myelement"&gt;
    . . .
    &lt;xs:attributeGroup ref="myAttrGroup"/&gt;
&lt;/xs:complexType&gt;
</pre></div><div class="exampleWrapper">
<div class="p">XML representations for attribute group definitions. The effect is as if the attribute
declarations in the group were present in the type definition.</div></div></div><p>The example above illustrates the pattern
     mentioned in <a href="#xroc" shape="rect">XML Representations of Components (&#167;3.1.2)</a>:  The same
     element, in this case <code>attributeGroup</code>, serves both to
     define and to incorporate by reference.  In the first
     <code>attributeGroup</code> element in the example, the
     <code>name</code> attribute is required and the
     <code>ref</code> attribute is forbidden; in the second the
     <code>ref</code> attribute is required, the 
     <code>name</code> attribute is forbidden.</p><div class="div3">
<h4><a name="Attribute_Group_Definition_details" id="Attribute_Group_Definition_details" shape="rect"></a>3.6.1 The Attribute Group Definition Schema Component</h4><p>The attribute group definition schema component has the
following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="agd" id="agd" shape="rect">Attribute Group Definition</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="agd-annotations" shape="rect" id="agd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="agd-name" shape="rect" id="agd-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value.  Required.</div>
</div>
<div class="propDefn"><a name="agd-target_namespace" shape="rect" id="agd-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value.  Optional.</div>
</div>
<div class="propDefn"><a name="agd-attribute_uses" shape="rect" id="agd-attribute_uses"></a><div class="pdName"><span class="propdef">{attribute uses}</span></div>
<div class="pdDef">
A set of  <a href="#au" class="compref" shape="rect">Attribute Use</a> components.  </div>
</div>
<div class="propDefn"><a name="agd-attribute_wildcard" shape="rect" id="agd-attribute_wildcard"></a><div class="pdName"><span class="propdef">{attribute wildcard}</span></div>
<div class="pdDef">
A  <a href="#w" class="compref" shape="rect">Wildcard</a> component.  Optional.</div>
</div>
</div></div>
</div>
</div>
<p>Attribute groups are identified by their <a href="#agd-name" class="propref" shape="rect">{name}</a> and <a href="#agd-target_namespace" class="propref" shape="rect">{target namespace}</a>; attribute group identities <span class="rfc2119">must</span> be unique within an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>.  See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for the use of component
identifiers when importing one schema into another.</p><p><a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> is 
a set of
attribute uses, allowing
for local specification of occurrence and default or fixed values.</p><p><a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> provides for an attribute wildcard to be included in an
attribute group.
See above under <a href="#Complex_Type_Definitions" shape="rect">Complex Type Definitions (&#167;3.4)</a> for the
interpretation of
attribute wildcards during <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#agd-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-attributeGroup" id="declare-attributeGroup" shape="rect"></a>3.6.2 XML Representation of Attribute Group Definition Schema Components</h4><div class="div4">
<h5><a name="declare-attributeGroup-core" id="declare-attributeGroup-core" shape="rect"></a>3.6.2.1 XML Mapping Rule for Named Attribute Groups</h5><p>The XML representation for an attribute group definition
       schema component is an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> 
       element information item. It provides for naming a group of
       attribute declarations and an attribute wildcard for use by
       reference in the XML representation of complex type definitions
       and other attribute group definitions.   The correspondences between the
       properties of the information item 
       after the appropriate
       <a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
       and the
       properties of the
       component it corresponds to are given in this section.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>attributeGroup</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-attributeGroup" name="element-attributeGroup" shape="rect">&lt;attributeGroup</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, ((<a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>)*, <a href="#element-anyAttribute" class="eltref" shape="rect">anyAttribute</a>?))<br clear="none" />&lt;/attributeGroup&gt;</p></div></div><p id="ag_p1">When an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> appears as a child of
       <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
       or <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, it corresponds to an
       attribute group definition as below.  When it appears as a
       child of <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> or <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>, it does
       not correspond to any component as such.</p><div class="note"><div class="p"><b>Note:</b> 
	 If the <a href="#element-attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> is a child of 
	 <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, 
	 and it overrides a corresponding declaration in the 
	 <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of its parent,
	 it will also correspond to
	 an attribute group definition as shown below. 
	 See <a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a> for details.
       </div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Attribute_Group_Definition_details" shape="rect">Attribute Group Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#agd-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#agd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	 <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the
	 <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor
	 
	 element information item if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a></div><div class="mapRepr">
	 The union of the set of attribute uses corresponding to the
	 <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, with the
	 <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> of the attribute groups
	 <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>s of the <code>ref</code>
	 <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	 <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any.
	 <div class="note"><div class="p"><b>Note:</b> As described below, circular references from <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	   to <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> are not errors.</div></div>
	</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a></div><div class="mapRepr">
	 
	 The <a href="#w" class="compref" shape="rect">Wildcard</a> determined by
	  applying the attribute-wildcard mapping described 
	  in 
	   <a href="#declare-attributeGroup-wildcard" shape="rect">Common Rules for Attribute Wildcards (&#167;3.6.2.2)</a>
	  to the <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	  element information item.
	</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#agd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
	 
	  The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
	  <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> element and
	   its <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present,
	  as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
	 
	</div></div></div><div class="note"><div class="p"><b>Note:</b> 
	It is a consequence of this rule and the rule in <a href="#declare-type" shape="rect">XML Representation of Complex Type Definition Schema Components (&#167;3.4.2)</a>
	that any annotations specified in attribute group references are included in
	the sequence of <a href="#a" class="compref" shape="rect">Annotation</a>s of the enclosing <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> or
	<a href="#agd" class="compref" shape="rect">Attribute Group Definition</a> components.
       </div></div><p>The rules given above for 
       <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
       and <a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> specify that 
       if an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> element <var>A</var> contains a reference
       to another attribute group <var>B</var> (i.e. <var>A</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> include an
       <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> with a <code>ref</code> attribute pointing
       at <var>B</var>), then <var>A</var> maps to an <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a> component whose
       <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> reflect not only 
       the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>A</var> but also those of
       <var>B</var> and of any <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> elements referred
       to in <var>B</var>.  The same is true for attribute groups referred to from
       complex types.
      </p><p>
       Circular reference is <em>not</em> disallowed.  That is, it
       is not an error if <var>B</var>, or some <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
       element referred to by <var>B</var> (directly, or indirectly at some 
       remove) contains a reference to <var>A</var>.  An <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
       element involved in such a reference cycle maps to a
       component whose <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
       and <a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> properties
       reflect all the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> and <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a>
       elements contained in, or referred to (directly or indirectly)
       by elements in the cycle.  
      </p><div class="note"><div class="p"><b>Note:</b> 
	In version 1.0 of this specification, circular group reference was not
	allowed except in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>.  
	As described above, this version allows it.
	The effect is to take the transitive closure of the 
	reference relation between <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> 
	elements and take into account
	all their <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and
	<a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> properties.
       </div></div></div><div class="div4">
<h5><a name="declare-attributeGroup-wildcard" id="declare-attributeGroup-wildcard" shape="rect"></a>3.6.2.2 Common Rules for Attribute Wildcards</h5><div class="p">
       The following mapping for attribute-wildcards forms part of the
       XML mapping rules for different kinds of source declaration
       (most prominently <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>).  It can be
       applied to any element which can have an <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>
       element as a child, and produces as a result either a
       <a href="#w" class="compref" shape="rect">Wildcard</a> or the special value <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
       The mapping depends on the concept of the <a href="#key-law" class="termref" shape="rect"><span class="arrow">&#183;</span>local wildcard<span class="arrow">&#183;</span></a>:
       <div class="termdef"><a name="key-law" id="key-law" title="" shape="rect">[Definition:]&#160;&#160;</a>
	The 
	<b>local wildcard</b> of 
	 an element information item <var>E</var>
	is the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="local-wc-yes" name="local-wc-yes" shape="rect"> </a><b>If </b><var>E</var> has
	    an <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> child, <b>then </b>the
	    <a href="#w" class="compref" shape="rect">Wildcard</a> mapped to by the <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> element using the wildcard
	    mapping set out in
	   <a href="#declare-openness" shape="rect">XML Representation of Wildcard Schema Components (&#167;3.10.2)</a>;</div><div class="clnumber">2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div></div>
      </div><div class="block">The mapping is defined as follows:
       <div class="constraintlist"><div class="clnumber">1<a id="local-wc" name="local-wc" shape="rect"> </a><span class="p">
	  
	  Let <var>L</var> be the 
	   <a href="#key-law" class="termref" shape="rect"><span class="arrow">&#183;</span>local wildcard<span class="arrow">&#183;</span></a>
	 </span></div>
<div class="clnumber">2 <span class="p">Let <var>W</var> be a sequence containing all the <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a> 
	  <a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a>s
	  of the attribute groups referenced
	  by <var>E</var>, in document order.
	 </span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->
	  The value is then determined by the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b><var>W</var> is empty, <b>then </b>the <a href="#key-law" class="termref" shape="rect"><span class="arrow">&#183;</span>local 
	      wildcard<span class="arrow">&#183;</span></a> 
	      <var>L</var>.</div><div class="clnumber">3.2 <b>otherwise </b>the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">3.2.1<a id="c-awi1" name="c-awi1" shape="rect"> </a><b>If </b><var>L</var> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>, <b>then </b>a wildcard whose 
		properties are as follows:
		<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a></div><div class="pvVal">
		  <var>L</var>.<a href="#w-process_contents" class="propref" shape="rect">{process contents}</a>		
		 </div></div><div class="pvpair"><div class="pvProp"><a href="#w-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">
		  <var>L</var>.<a href="#w-annotations" class="propref" shape="rect">{annotations}</a>		
		 </div></div><div class="pvpair"><div class="pvProp"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a></div><div class="pvVal">the
		  wildcard intersection
		  
		  of <var>L</var>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>  and of the 
		  <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>s of all
		  the the wildcards in <var>W</var>,
		  as defined in <a href="#cos-aw-intersect" shape="rect">Attribute Wildcard Intersection (&#167;3.10.6.4)</a>
		  
		 </div></div></div>
	       </div><div class="clnumber">3.2.2<a id="c-awi2" name="c-awi2" shape="rect"> </a><b>otherwise </b>(no <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> is
		present)
		a wildcard whose properties are as follows: <div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a></div><div class="pvVal">
		  The <a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> of the first
		  wildcard in <var>W</var>
		 </div></div><div class="pvpair"><div class="pvProp"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a></div><div class="pvVal">
		  The wildcard intersection
		  
		  of the <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>s
		  of all the wildcards in <var>W</var>,
		  as defined in <a href="#cos-aw-intersect" shape="rect">Attribute Wildcard Intersection (&#167;3.10.6.4)</a>
		  
		 </div></div><div class="pvpair"><div class="pvProp"><a href="#w-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">
		  <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>The empty sequence<span class="arrow">&#183;</span></a>
		 </div></div></div>
	       </div></div>
	    </div></div>
	 </div>
</div>
      </div></div></div><div class="div3">
<h4><a name="constrain-attribute-group-xml" id="constrain-attribute-group-xml" shape="rect"></a>3.6.3 Constraints on XML Representations of Attribute Group Definitions</h4><div class="constraintnote"><a id="src-attribute_group" name="src-attribute_group" shape="rect"></a><b>Schema Representation Constraint: Attribute Group Definition Representation OK</b><br clear="none" /><div class="constraint"><div class="p">None as such.</div></div></div></div><div class="div3">
<h4><a name="sec-cvc-agd" id="sec-cvc-agd" shape="rect"></a>3.6.4 Attribute Group Definition Validation Rules</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-sic-agd" id="sec-sic-agd" shape="rect"></a>3.6.5 Attribute Group Definition Information Set
Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-attrGroup" id="coss-attrGroup" shape="rect"></a>3.6.6 Constraints on Attribute Group Definition Schema Components</h4><p>All attribute group definitions (see <a href="#cAttribute_Group_Definitions" shape="rect">Attribute Group Definitions (&#167;3.6)</a>) <span class="rfc2119">must</span> satisfy the following constraint.</p><div class="constraintnote"><a id="ag-props-correct" name="ag-props-correct" shape="rect"></a><b>Schema Component Constraint: Attribute Group Definition Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of an attribute group definition
are as described in the property tableau in
<a href="#Attribute_Group_Definition_details" shape="rect">The Attribute Group Definition Schema Component (&#167;3.6.1)</a>, modulo the impact
of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>;</span></div>
<div class="clnumber">2 <span class="p">No two 
distinct members of the <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>  have
<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>s with the same
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.</span></div>
</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cAttribute_Group_Definitions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Model_Groups" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cModel_Group_Definitions" id="cModel_Group_Definitions" shape="rect"></a>3.7 Model Group Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.1 <a href="#Model_Group_Definition_details" shape="rect">The Model Group Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.2 <a href="#declare-namedModelGroup" shape="rect">XML Representation of Model Group Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.3 <a href="#sec-src-model_group_defn" shape="rect">Constraints on XML Representations of Model Group Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.4 <a href="#sec-cvc-mg" shape="rect">Model Group Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.5 <a href="#sec-sic-mg" shape="rect">Model Group Definition Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.7.6 <a href="#coss-groupDef" shape="rect">Constraints on Model Group Definition Schema Components</a><br clear="none" />
</div><p>A model group definition associates a name and optional annotations with
 a <a href="#mg" class="compref" shape="rect">Model Group</a>.
By reference to the name, the entire model group can be incorporated by reference into
 a <a href="#p-term" class="propref" shape="rect">{term}</a>.</p><p>
Model group definitions are provided
primarily for reference from the <a href="#declare-type" shape="rect">XML Representation of Complex Type Definition Schema Components (&#167;3.4.2)</a> (see <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
and <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>).  Thus, model group definitions provide a
replacement for some uses of XML's
<a href="http://www.w3.org/TR/xml11/#dt-PE" shape="rect">parameter entity</a> facility.
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:group name="myModelGroup"&gt;
 &lt;xs:sequence&gt;
  &lt;xs:element ref="someThing"/&gt;
  . . .
 &lt;/xs:sequence&gt;
&lt;/xs:group&gt;

&lt;xs:complexType name="trivial"&gt;
 &lt;xs:group ref="myModelGroup"/&gt;
 &lt;xs:attribute .../&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name="moreSo"&gt;
 &lt;xs:choice&gt;
  &lt;xs:element ref="anotherThing"/&gt;
  &lt;xs:group ref="myModelGroup"/&gt;
 &lt;/xs:choice&gt;
 &lt;xs:attribute .../&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">A minimal model group is defined and used by reference, first as the whole
content model, then as one alternative in a choice. </div></div></div><div class="div3">
<h4><a name="Model_Group_Definition_details" id="Model_Group_Definition_details" shape="rect"></a>3.7.1 The Model Group Definition Schema Component</h4><p>The model group definition schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="mgd" id="mgd" shape="rect">Model Group Definition</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="mgd-annotations" shape="rect" id="mgd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="mgd-name" shape="rect" id="mgd-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value.  Required.</div>
</div>
<div class="propDefn"><a name="mgd-target_namespace" shape="rect" id="mgd-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value.  Optional.</div>
</div>
<div class="propDefn"><a name="mgd-model_group" shape="rect" id="mgd-model_group"></a><div class="pdName"><span class="propdef">{model group}</span></div>
<div class="pdDef">
A  <a href="#mg" class="compref" shape="rect">Model Group</a> component.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>Model group definitions are identified by their <a href="#mgd-name" class="propref" shape="rect">{name}</a> and <a href="#mgd-target_namespace" class="propref" shape="rect">{target namespace}</a>; model group identities <span class="rfc2119">must</span> be unique within an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>.  See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for the use of component
identifiers when importing one schema into another.</p><p>Model group definitions <em>per se</em> do not participate in <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, but the <a href="#p-term" class="propref" shape="rect">{term}</a> of
a particle <span class="rfc2119">may</span> correspond in whole or in part
to a model group from a model group definition.</p><p><a href="#mgd-model_group" class="propref" shape="rect">{model group}</a> is the <a href="#mg" class="compref" shape="rect">Model Group</a> for which the model group definition provides a name.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#mgd-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-namedModelGroup" id="declare-namedModelGroup" shape="rect"></a>3.7.2 XML Representation of Model Group Definition Schema Components</h4><p>The XML representation for a model group definition schema component is a
<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element information item.
It provides for
naming a model group for use by reference in the XML representation of
complex type definitions and model groups. The correspondences between the
properties of the information item 
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component it corresponds to are given in this section.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>group</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-group" name="element-group" shape="rect">&lt;group</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs = 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a> | <var>unbounded</var>)
 &#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a>&#160;:&#160;1<br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-all" class="eltref" shape="rect">all</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a>)?)<br clear="none" />&lt;/group&gt;</p></div></div><p id="xr.mgd1">If 
     
     the item has <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
       or <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>
     as its parent (in which case there will be a 
      <code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, 
      then the item maps
      to a model group definition component with properties as
      follows:</p><div class="note"><div class="p"><b>Note:</b> 
	 If the item is a child of <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, it will
	 also have a <code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>; if it overrides
	 a corresponding declaration in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of its parent, it will also (in the
	 overridden schema document) map to a component as described
	 below. See <a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a> for details.
       </div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Model_Group_Definition_details" shape="rect">Model Group Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mgd-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mgd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
	the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the
	<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
 ancestor  element information
	item if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mgd-model_group" class="propref" shape="rect">{model group}</a></div><div class="mapRepr">A model group which is
	the <a href="#p-term" class="propref" shape="rect">{term}</a> of a particle
	corresponding to the <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a> or
	<a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> (there <span class="rfc2119">must</span>
	be exactly one).</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mgd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">  The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
	 <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>. 
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p id="xr.mgd3">Otherwise,
      if
      the item 
      has
      a <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
       and does <em>not</em> have <code>minOccurs=maxOccurs=0</code>
      , then
       the <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element maps
      to a particle component with properties
      as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Particle" shape="rect">Particle</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>minOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="mapRepr"><b><i>unbounded</i></b>, if the
	<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> equals
	<b><i>unbounded</i></b>, otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="mapRepr">The <a href="#mgd-model_group" class="propref" shape="rect">{model group}</a> of the model group definition
	<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>ref</code>
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mgd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
	The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
	<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p>Otherwise, the <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>
      has <code>minOccurs=maxOccurs=0</code>, in which
      case it maps to no component at all.</p><div class="note"><div class="p"><b>Note:</b> The name of this section is slightly misleading, in that the
      second, un-named, case above (with a <code>ref</code> and no
      <code>name</code>) is not really a named model group at all, but
      a reference to one.  Also note that in the first (named) case
      above no reference is made to <code>minOccurs</code> or
      <code>maxOccurs</code>: this is because the schema for schema documents does not
      allow them on the child of <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> when it is
      named.  This in
      turn is because the <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> and
      <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of the particles which
      <em>refer</em> to the definition are what count.</div></div></div><div class="div3">
<h4><a name="sec-src-model_group_defn" id="sec-src-model_group_defn" shape="rect"></a>3.7.3 Constraints on XML Representations of Model Group Definitions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-mg" id="sec-cvc-mg" shape="rect"></a>3.7.4 Model Group Definition Validation Rules</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-sic-mg" id="sec-sic-mg" shape="rect"></a>3.7.5 Model Group Definition Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-groupDef" id="coss-groupDef" shape="rect"></a>3.7.6 Constraints on Model Group Definition Schema Components</h4><p>All model group definitions (see <a href="#cModel_Group_Definitions" shape="rect">Model Group Definitions (&#167;3.7)</a>) <span class="rfc2119">must</span> satisfy the following constraint.</p><div class="constraintnote"><a id="mgd-props-correct" name="mgd-props-correct" shape="rect"></a><b>Schema Component Constraint: Model Group Definition Properties Correct</b><br clear="none" /><div class="constraint"><div class="p">The values of the properties of a model group definition <span class="rfc2119">must</span> be as described in
the property tableau in
<a href="#Model_Group_Definition_details" shape="rect">The Model Group Definition Schema Component (&#167;3.7.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cModel_Group_Definitions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cParticles" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="Model_Groups" id="Model_Groups" shape="rect"></a>3.8 Model Groups</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.1 <a href="#Model_Group_details" shape="rect">The Model Group Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.2 <a href="#declare-contentModel" shape="rect">XML Representation of Model Group Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.3 <a href="#sec-src-model_group" shape="rect">Constraints on XML Representations of Model Groups</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.4 <a href="#sec-cvc-mgrp" shape="rect">Model Group Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.4.1 <a href="#group-recognition" shape="rect">Language Recognition by Groups</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.4.2 <a href="#group-validation" shape="rect">Principles of Validation against Groups</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.4.3 <a href="#sec-cvc-model-group" shape="rect">Element Sequence Valid</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.5 <a href="#sec-sic-mgrp" shape="rect">Model Group Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6 <a href="#coss-modelGroup" shape="rect">Constraints on Model Group Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.1 <a href="#sec-mg-props-correct" shape="rect">Model Group Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.2 <a href="#sec-cos-all-limited" shape="rect">All Group Limited</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.3 <a href="#sec-cos-element-consistent" shape="rect">Element Declarations Consistent</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.4 <a href="#sec-cos-nonambig" shape="rect">Unique Particle Attribution</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.5 <a href="#sec-cos-seq-range" shape="rect">Effective Total Range (all and sequence)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.8.6.6 <a href="#sec-cos-choice-range" shape="rect">Effective Total Range (choice)</a><br clear="none" />
</div><p>When the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of element information items are not constrained
to be <b><i>empty</i></b> or by reference to a simple type definition
(<a href="#Simple_Type_Definitions" shape="rect">Simple Type Definitions (&#167;3.16)</a>), the sequence of element
information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> content <span class="rfc2119">may</span> be specified in
more detail with a model group.  Because the <a href="#p-term" class="propref" shape="rect">{term}</a> 
property of a particle can be a
model group, and model groups contain particles, model groups can indirectly 
contain other model groups; the grammar for model groups
is therefore recursive.
<span class="termdef"><a name="key-contain-dgp" id="key-contain-dgp" title="" shape="rect">[Definition:]&#160;&#160;</a>A model group 
<b>directly contains</b> the particles in the value of its
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> property.</span>
<span class="termdef"><a name="key-contain-igx" id="key-contain-igx" title="" shape="rect">[Definition:]&#160;&#160;</a>A model group 
<b>indirectly contains</b> the particles, groups, wildcards, and
element declarations which are <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a> 
by the particles it
<a href="#key-contain-dgp" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>.</span>
<span class="termdef"><a name="key-contain-xgx" id="key-contain-xgx" title="" shape="rect">[Definition:]&#160;&#160;</a>A model group 
<b>contains</b> the components which it either
<a href="#key-contain-dgp" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>
or <a href="#key-contain-igx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly contains<span class="arrow">&#183;</span></a>.</span>
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:group name="otherPets"&gt;
  &lt;xs:all&gt;
   &lt;xs:element name="birds"/&gt;
   &lt;xs:element name="fish"/&gt;
  &lt;/xs:all&gt;
 &lt;/xs:group&gt;
 
&lt;xs:all&gt;
 &lt;xs:element ref="cats"/&gt;
 &lt;xs:element ref="dogs"/&gt;
 &lt;xs:group ref="otherPets"/&gt;
&lt;/xs:all&gt;

&lt;xs:sequence&gt;
 &lt;xs:choice&gt;
  &lt;xs:element ref="left"/&gt;
  &lt;xs:element ref="right"/&gt;
 &lt;/xs:choice&gt;
 &lt;xs:element ref="landmark"/&gt;
&lt;/xs:sequence&gt;
</pre></div><div class="exampleWrapper">
<div class="p">XML representations for the three kinds of model group, the third nested
inside the second.</div></div></div><div class="div3">
<h4><a name="Model_Group_details" id="Model_Group_details" shape="rect"></a>3.8.1 The Model Group Schema Component</h4><p>The model group schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="mg" id="mg" shape="rect">Model Group</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="mg-annotations" shape="rect" id="mg-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="mg-compositor" shape="rect" id="mg-compositor"></a><div class="pdName"><span class="propdef">{compositor}</span></div>
<div class="pdDef">
One of {<span class="enumval">all</span>, <span class="enumval">choice</span>, <span class="enumval">sequence</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="mg-particles" shape="rect" id="mg-particles"></a><div class="pdName"><span class="propdef">{particles}</span></div>
<div class="pdDef">
A sequence of  <a href="#p" class="compref" shape="rect">Particle</a> components.  </div>
</div>
</div></div>
</div>
</div>
<div class="block">specifies a sequential (<b><i>sequence</i></b>),
disjunctive (<b><i>choice</i></b>) or conjunctive (<b><i>all</i></b>) interpretation of
the <a href="#mg-particles" class="propref" shape="rect">{particles}</a>.  This in turn 
determines whether the element
information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by the model group <span class="rfc2119">must</span>:
<ul><li><div class="p">(<b><i>sequence</i></b>) correspond, in order, to the specified <a href="#mg-particles" class="propref" shape="rect">{particles}</a>;</div></li><li><div class="p">(<b><i>choice</i></b>) correspond 
to exactly one of the specified <a href="#mg-particles" class="propref" shape="rect">{particles}</a>;</div></li><li><div class="p">(<b><i>all</i></b>) correspond to the specified  <a href="#mg-particles" class="propref" shape="rect">{particles}</a>.  The elements can occur in any
order.  </div></li></ul></div><p>When two or more 
     element declarations contained
     
     <a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly<span class="arrow">&#183;</span></a>,
      <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly<span class="arrow">&#183;</span></a>, or
      <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a> in the
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> of a model group have identical names, the type definitions of those declarations <span class="rfc2119">must</span> be the
same. </p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#mg-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-contentModel" id="declare-contentModel" shape="rect"></a>3.8.2 XML Representation of Model Group Schema Components</h4><p>The XML representation for a model group schema component is
either an
<a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, a <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a> or a <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a>
element information item.    The correspondences between the
properties of those information items
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component they correspond to are given in this section.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>all</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-all" name="element-all" shape="rect">&lt;all</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs = <var>1</var>&#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = (<var>0</var> | <var>1</var>)&#160;:&#160;1<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-element" class="eltref" shape="rect">element</a> | <a href="#element-any" class="eltref" shape="rect">any</a> | <a href="#element-group" class="eltref" shape="rect">group</a>)*)<br clear="none" />&lt;/all&gt;</p><p class="element-syntax"><a id="element-choice" name="element-choice" shape="rect">&lt;choice</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs = 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a> | <var>unbounded</var>)
 &#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a>&#160;:&#160;1<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-element" class="eltref" shape="rect">element</a> | <a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a> | <a href="#element-any" class="eltref" shape="rect">any</a>)*)<br clear="none" />&lt;/choice&gt;</p><p class="element-syntax"><a id="element-sequence" name="element-sequence" shape="rect">&lt;sequence</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs = 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a> | <var>unbounded</var>)
 &#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a>&#160;:&#160;1<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-element" class="eltref" shape="rect">element</a> | <a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-choice" class="eltref" shape="rect">choice</a> | <a href="#element-sequence" class="eltref" shape="rect">sequence</a> | <a href="#element-any" class="eltref" shape="rect">any</a>)*)<br clear="none" />&lt;/sequence&gt;</p></div></div><p id="xr.mg3">Each of the
      above items corresponds to a particle containing a model group,
      with properties as follows (unless <code>minOccurs=maxOccurs=0</code>,
      in which case the item corresponds to no component at all):</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Particle_details" shape="rect">Particle</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>minOccurs</code>
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise <code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="mapRepr"><b><i>unbounded</i></b>, if the <code>maxOccurs</code>
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> equals <b><i>unbounded</i></b>, otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>maxOccurs</code>
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise <code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="mapRepr">A model group as given below.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
	The same annotations as the <a href="#mg-annotations" class="propref" shape="rect">{annotations}</a> of
	the model group. See below.
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p>The particle just described has a 
      <a href="#mg" class="compref" shape="rect">Model Group</a> as the value of its <a href="#p-term" class="propref" shape="rect">{term}</a> property, as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Model_Group_details" shape="rect">Model Group</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mg-compositor" class="propref" shape="rect">{compositor}</a></div><div class="mapRepr">One of <b><i>all</i></b>,
	<b><i>choice</i></b>, <b><i>sequence</i></b> depending on the element
	information item.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mg-particles" class="propref" shape="rect">{particles}</a></div><div class="mapRepr">A sequence of particles
	corresponding to all the <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a>,
	<a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a>, <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a>,
	<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> or <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> items among
	the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, in order.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#mg-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">  The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
	 <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a>, or <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a> element, whichever is present, as defined
	 in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>. 
       </div></div></div></div><div class="div3">
<h4><a name="sec-src-model_group" id="sec-src-model_group" shape="rect"></a>3.8.3 Constraints on XML Representations of Model Groups</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-mgrp" id="sec-cvc-mgrp" shape="rect"></a>3.8.4 Model Group Validation Rules</h4><p>In order to define the validation rules for model
groups clearly, it will be useful to define some basic terminology;
this is done in the next two sections, before the validation rules
themselves are formulated.</p><div class="div4">
<h5><a name="group-recognition" id="group-recognition" shape="rect"></a>3.8.4.1 Language Recognition by Groups</h5><p>Each model group <var>M</var> denotes a language
<var>L</var>(<var>M</var>), whose members are the sequences of element information items
<a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>M</var>.</p><p>Within <var>L</var>(<var>M</var>) a smaller language <var>V</var>(<var>M</var>) can be
identified, which is of particular importance for schema-validity
assessment.  The difference between the two languages is that
<var>V</var>(<var>M</var>) enforces some constraints which are ignored in the definition
of <var>L</var>(<var>M</var>).
Informally <var>L</var>(<var>M</var>) is the set of sequences which are accepted by a model
group if no account is taken of the schema component
constraint <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> or the related provisions 
in the validation rules which specify how to choose a unique <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> 
in a non-deterministic model group. By contrast, <var>V</var>(<var>M</var>) takes
account of those constraints and includes only the sequences which are
<a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against <var>M</var>.  For all model groups <var>M</var>, <var>V</var>(<var>M</var>) is a
subset of <var>L</var>(<var>M</var>).  <var>L</var>(<var>M</var>) and related concepts are described in this
section; <var>V</var>(<var>M</var>) is described in the next section, <a href="#group-validation" shape="rect">Principles of Validation against Groups (&#167;3.8.4.2)</a>.
</p><p>
<span class="termdef"><a name="key-path" id="key-path" title="" shape="rect">[Definition:]&#160;&#160;</a>When a sequence <var>S</var> of element information
items is checked against a model group <var>M</var>, the sequence of 
<a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particles<span class="arrow">&#183;</span></a> 
which the items of <var>S</var> match, in order, is a
<b>path</b> of <var>S</var> in <var>M</var>.  For a given <var>S</var> and 
<var>M</var>, the
path of <var>S</var> in 
<var>M</var> is not necessarily unique.
Detailed rules for the matching, and thus for the construction of
paths, are given in <a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a> and <a href="#particle-validation" shape="rect">Principles of Validation against Particles (&#167;3.9.4.1)</a>.
</span>
Not every sequence has a path in every model group, but every
sequence accepted by the model group does have a path.
<span class="termdef"><a name="key-complete-path" id="key-complete-path" title="" shape="rect">[Definition:]&#160;&#160;</a>For
a model group <var>M</var> and a sequence <var>S</var> in <var>L</var>(<var>M</var>), the path
of <var>S</var> in <var>M</var> is a <b>complete path</b>; prefixes of
complete paths which are themselves not complete paths
are <b>incomplete paths</b>.</span>  

For example, in the model group</p><pre xml:space="preserve">   &lt;xs:sequence&gt;
    &lt;xs:element name="a"/&gt;
    &lt;xs:element name="b"/&gt;
    &lt;xs:element name="c"/&gt;
   &lt;/xs:sequence&gt;</pre><p>the sequences (<code>&lt;a/&gt;&lt;b/&gt;&lt;c/&gt;</code>)
and (<code>&lt;a/&gt;&lt;b/&gt;</code>) have <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a>
(the first a <a href="#key-complete-path" class="termref" shape="rect"><span class="arrow">&#183;</span>complete path<span class="arrow">&#183;</span></a> and the second
an <a href="#key-complete-path" class="termref" shape="rect"><span class="arrow">&#183;</span>incomplete path<span class="arrow">&#183;</span></a>),
but the sequences (<code>&lt;a/&gt;&lt;b/&gt;&lt;c/&gt;&lt;d/&gt;</code>) and
(<code>&lt;a/&gt;&lt;x/&gt;</code>) do not 
have paths.</p><div class="note"><div class="p"><b>Note:</b> It is possible, but unusual, for a model group to
have some paths which are neither complete paths, nor
prefixes of complete paths.  For example, the model group
<pre xml:space="preserve">   &lt;xs:sequence&gt;
    &lt;xs:element name="a"/&gt;
    &lt;xs:element name="b"/&gt;
    &lt;xs:choice/&gt;
   &lt;/xs:sequence&gt;</pre>
accepts no sequences because the empty <code>choice</code> recognizes
no input sequences.  But the sequences (<code>&lt;a/&gt;</code>)
and (<code>&lt;a/&gt;&lt;b/&gt;</code>) have paths in the model group.</div></div><p>The definitions of <var>L</var>(<var>M</var>) and <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>M</var>, when <var>M</var> is a <a href="#key-basic-term" class="termref" shape="rect"><span class="arrow">&#183;</span>basic term<span class="arrow">&#183;</span></a> or
a <a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particle<span class="arrow">&#183;</span></a>, are given in
<a href="#particle-validation" shape="rect">Principles of Validation against Particles (&#167;3.9.4.1)</a>.  The definitions for groups are
given below.
</p><div class="div5">
<h6><a name="sec-sequences" id="sec-sequences" shape="rect"></a>3.8.4.1.1 Sequences</h6><p>This section defines <var>L</var>(<var>M</var>), the set of
<a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>M</var>, and <var>V</var>(<var>M</var>), if <var>M</var>
is a sequence group.</p><p>If <var>M</var> is a <a href="#mg" class="compref" shape="rect">Model Group</a>,
and the <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> of <var>M</var> is <b><i>sequence</i></b>, 
and the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of <var>M</var> is the sequence <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ...,
<var>P</var><sub><var>n</var></sub>, then <var>L</var>(<var>M</var>) is the set of sequences <var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... +
<var>Sn</var> (taking "+" as the concatenation operator), where
<var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>P</var><sub><var>i</var></sub>) for 0 &lt; <var>i</var> &#8804; <var>n</var>.
The sequence of sequences <var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var> is a <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> of
<var>S</var>.
Less formally, when <var>M</var> is a sequence of <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><var>n</var></sub>, then
<var>L</var>(<var>M</var>) is the set of sequences formed by taking one sequence which is
accepted by <var>P</var><sub>1</sub>, then one accepted by <var>P</var><sub>2</sub>, and so on, up through
<var>P</var><sub><var>n</var></sub>, and then concatenating them together in order.</p><p><span class="termdef"><a name="key-partition" id="key-partition" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>partition</b> of a sequence is a sequence of sub-sequences,
some or all of which <span class="rfc2119">may</span> be empty, such that concatenating all
the sub-sequences yields the original sequence</span>.</p><div class="block">When <var>M</var> is a sequence group
and <var>S</var> is a sequence of input items, the set of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of <var>S</var> 
in <var>M</var> is the set of all
paths <var>Q</var> = <var>Q</var><sub>1</sub> + <var>Q</var><sub>2</sub> + ... + <var>Q</var><sub><var>j</var></sub>, where<ul><li><div class="p"><var>j</var> &#8804; <var>n</var>, and</div></li><li><div class="p"><var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... + <var>S</var><sub><var>j</var></sub> (i.e. <var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>S</var><sub><var>j</var></sub> is
a <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> of <var>S</var>), and</div></li><li><div class="p"><var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>P</var><sub><var>i</var></sub>) for 0 &lt; <var>i</var> &lt; <var>j</var>, and</div></li><li><div class="p"><var>Q</var><sub><var>i</var></sub> is a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var><sub><var>i</var></sub> in <var>P</var><sub><var>i</var></sub> for 0 &lt; <var>i</var> &#8804; <var>j</var>.</div></li></ul>
</div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
By this definition, some sequences which do not satisfy the
entire model group nevertheless have <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in a model group.
For example, given the model group <var>M</var>
</div></div><div class="exampleInner">
<pre xml:space="preserve">   &lt;xs:sequence&gt;
    &lt;xs:element name="a"/&gt;
    &lt;xs:element name="b"/&gt;
    &lt;xs:element name="c"/&gt;
   &lt;/xs:sequence&gt;</pre></div><div class="exampleWrapper">
<div class="p">and an input sequence <var>S</var></div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;a/&gt;&lt;b/&gt;</pre></div><div class="exampleWrapper">
<div class="p">where <var>n</var> = 3, <var>j</var> = 2, then 
<var>S</var><sub>1</sub> is (<code>&lt;a/&gt;</code>),
<var>S</var><sub>2</sub> is (<code>&lt;b/&gt;</code>),
and
<var>S</var> has a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> in <var>M</var>, even though <var>S</var> is not in
<var>L</var>(<var>M</var>).  The <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> has two items, first the <a href="#p" class="compref" shape="rect">Particle</a>
for the <code>a</code> element, then the <a href="#p" class="compref" shape="rect">Particle</a> for the
<code>b</code> element.</div></div></div><p>When <var>M</var> is a sequence group,
the set <var>V</var>(<var>M</var>) (the set of sequences 
<a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against <var>M</var>) is the set of sequences <var>S</var> which
are in <var>L</var>(<var>M</var>) and which have a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>M</var>.
Informally, <var>V</var>(<var>M</var>) contains those sequences which are
accepted by <var>M</var> and for which no element information item
is ever <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> if it can, in
context, instead be <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>.
There will invariably be a <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> of <var>S</var> whose
members are <a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against <a href="#mg-particles" class="propref" shape="rect">{particles}</a>
of <var>M</var>.
</p><div class="note"><div class="p"><b>Note:</b> For sequences with more than one <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> in <var>M</var>,
the <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributions<span class="arrow">&#183;</span></a> of
the <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> are used in validation and for determining
the contents of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.  For example, if <var>M</var> is
<pre xml:space="preserve">
  &lt;xs:sequence&gt;
   &lt;xs:any minOccurs="0"/&gt;
   &lt;xs:element name="a" minOccurs="0"/&gt;
  &lt;/xs:sequence&gt;</pre>
then the sequence (<code>&lt;a/&gt;</code>) has two <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a>
in <var>M</var>, one containing just the <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> and the other
containing just the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>.  It is the latter
which is a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> and which determines which 
<a href="#p" class="compref" shape="rect">Particle</a> the item in the input is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a>.
</div></div><div class="note"><div class="p"><b>Note:</b> There are model groups for which some members of
<var>L</var>(<var>M</var>) are not in <var>V</var>(<var>M</var>).  For example, if <var>M</var> is
<pre xml:space="preserve">
  &lt;xs:sequence&gt;
   &lt;xs:any minOccurs="0"/&gt;
   &lt;xs:element name="a"/&gt;
  &lt;/xs:sequence&gt;</pre>
then the sequence (<code>&lt;a/&gt;&lt;a/&gt;</code>) is in <var>L</var>(<var>M</var>), but not
in <var>V</var>(<var>M</var>), because the validation rules require that the first 
<code>a</code> be <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> the <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>.
In a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> the initial <code>a</code> will invariably be
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, and so no sequence
with an initial <code>a</code>  can be <a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against
this model group.</div></div></div><div class="div5">
<h6><a name="sec-choices" id="sec-choices" shape="rect"></a>3.8.4.1.2 Choices</h6><p>This section defines <var>L</var>(<var>M</var>), the set of
<a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>M</var>, and <var>V</var>(<var>M</var>), if <var>M</var>
is a choice group.</p><p>When the <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> of <var>M</var> is <b><i>choice</i></b>, and the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of <var>M</var> is the sequence <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ..., <var>P</var><sub><var>n</var></sub>,
then 
<var>L</var>(<var>M</var>) is
<var>L</var>(<var>P</var><sub>1</sub>) &#8746; <var>L</var>(<var>P</var><sub>2</sub>) &#8746; ... &#8746; <var>L</var>(<var>P</var><sub><var>n</var></sub>),
and the set of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var> is the set
<var>Q</var> = <var>Q</var><sub>1</sub> &#8746; <var>Q</var><sub>2</sub> &#8746; ... &#8746; <var>Q</var><sub><var>n</var></sub>, where
<var>Q</var><sub><var>i</var></sub> is the set of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var><sub><var>i</var></sub>, for
0 &lt; <var>i</var> &#8804; <var>n</var>.
Less formally, when <var>M</var> is a choice of <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><var>n</var></sub>, then
<var>L</var>(<var>M</var>) contains any sequence accepted by any of the particles <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><var>n</var></sub>,
and any <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in any of the particles <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><var>n</var></sub>
is a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var>.
</p><p>The set <var>V</var>(<var>M</var>) (the set of sequences 
<a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against <var>M</var>) is the set of sequences <var>S</var> which
are in <var>L</var>(<var>M</var>) and which have a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>M</var>.
In effect, this means that if one of the choices in <var>M</var>
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributes<span class="arrow">&#183;</span></a> an initial element information item to
a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, and another <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributes<span class="arrow">&#183;</span></a> the same
item to an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, then the latter choice is used
for validation.</p><div class="note"><div class="p"><b>Note:</b> For example, if <var>M</var> is
<pre xml:space="preserve">
  &lt;xs:choice&gt;
   &lt;xs:any/&gt;
   &lt;xs:element name="a"/&gt;
  &lt;/xs:choice&gt;</pre>
then the <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> for the sequence (<code>&lt;a/&gt;</code>)
contains just the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> and it is to the
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> that the input element will be
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a>; the alternate <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a>
containing just the <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> is not relevant for
validation as defined in this specification.
</div></div></div><div class="div5">
<h6><a name="all-mg" id="all-mg" shape="rect"></a>3.8.4.1.3 All-groups</h6><p>This section defines <var>L</var>(<var>M</var>), the set of
<a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>M</var>, and <var>V</var>(<var>M</var>), if <var>M</var>
is an all-group.</p><p>When the <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> of <var>M</var> is <b><i>all</i></b>, and the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of <var>M</var> is the sequence <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ..., <var>P</var><sub><var>n</var></sub>,
then 
<var>L</var>(<var>M</var>) is the set of sequences
<var>S</var> = <var>S</var><sub>1</sub> &#215; <var>S</var><sub>2</sub> &#215; ... &#215; <var>Sn</var>
(taking "&#215;" as the interleave operator),
where
for 0 &lt; <var>i</var> &#8804; <var>n</var>, <var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>P</var><sub><var>i</var></sub>).
The set of sequences
{<var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var>} is a <a href="#key-grouping" class="termref" shape="rect"><span class="arrow">&#183;</span>grouping<span class="arrow">&#183;</span></a> of <var>S</var>.
The set of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var> is
the set of all <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a>
<var>Q</var> = <var>Q</var><sub>1</sub> &#215; <var>Q</var><sub>2</sub> &#215; ... &#215; <var>Q</var><sub><var>n</var></sub>,
where <var>Q</var><sub><var>i</var></sub> is a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var><sub><var>i</var></sub> in <var>P</var><sub><var>i</var></sub>, 
for 0 &lt; <var>i</var> &#8804; <var>n</var>.
</p><p>
Less formally, when <var>M</var> is an <b><i>all</i></b>-group of <var>P</var><sub>1</sub>, <var>P</var><sub>2</sub>, ... <var>P</var><sub><var>n</var></sub>, then
<var>L</var>(<var>M</var>) is the set of sequences formed by taking one sequence which
is accepted by <var>P</var><sub>1</sub>, 
then one accepted by <var>P</var><sub>2</sub>,
and so on, up through <var>P</var><sub><var>n</var></sub>, and then interleaving them
together.  Equivalently, <var>L</var>(<var>M</var>) is the set of sequences <var>S</var>
such that the set {<var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var>} is a 
<a href="#key-grouping" class="termref" shape="rect"><span class="arrow">&#183;</span>grouping<span class="arrow">&#183;</span></a> of <var>S</var>, and 
for 0 &lt; <var>i</var> &#8804; <var>n</var>, <var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>P</var><sub><var>i</var></sub>).
</p><p><span class="termdef"><a name="key-grouping" id="key-grouping" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>grouping</b> of a sequence is a set of sub-sequences, some or
all of which may be empty, such that each member of the original
sequence appears once and only once in one of the sub-sequences and
all members of all sub-sequences are in the original
sequence.</span> </p><div class="block">For example, given the model group <var>M</var>
<pre xml:space="preserve">  &lt;xs:all&gt;
   &lt;xs:element name="a" minOccurs="0" maxOccurs="5"/&gt;
   &lt;xs:element name="b" minOccurs="1" maxOccurs="1"/&gt;
   &lt;xs:element name="c" minOccurs="0" maxOccurs="5"/&gt;
  &lt;/xs:all&gt;</pre>
and an input sequence <var>S</var> <pre xml:space="preserve">&lt;a/&gt;&lt;b/&gt;&lt;a/&gt;</pre>
where <var>n</var> = 3, then 
<var>S</var><sub>1</sub> is (<code>&lt;a/&gt;&lt;a/&gt;</code>),
<var>S</var><sub>2</sub> is (<code>&lt;b/&gt;</code>),
and the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of
<var>S</var> in <var>M</var> is the sequence containing first the <a href="#p" class="compref" shape="rect">Particle</a>
for the <code>a</code> element, then the <a href="#p" class="compref" shape="rect">Particle</a> for the
<code>b</code> element, then once more the 
<a href="#p" class="compref" shape="rect">Particle</a> for the <code>a</code> element.
</div><p>The set <var>V</var>(<var>M</var>) (the set of sequences 
<a href="#key-lvip" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a> against <var>M</var>) is the set of sequences <var>S</var> which
are in <var>L</var>(<var>M</var>) and which have a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>M</var>.
In effect, this means that if one of the <a href="#p" class="compref" shape="rect">Particles</a> in <var>M</var>
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributes<span class="arrow">&#183;</span></a> an element information item to
a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, and a <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>competing<span class="arrow">&#183;</span></a> <a href="#p" class="compref" shape="rect">Particle</a>
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributes<span class="arrow">&#183;</span></a> the same item to an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, then the
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> is used for validation.</p><div class="note"><div class="p"><b>Note:</b> For example, if <var>M</var> is
<pre xml:space="preserve">
  &lt;xs:all&gt;
   &lt;xs:any/&gt;
   &lt;xs:element name="a"/&gt;
  &lt;/xs:all&gt;</pre>
then <var>M</var> accepts sequences of length two, containing
one <code>a</code> element and one other element.
</div><div class="p">
The other element can be anything at all, including a second
<code>a</code> element. After the first <code>a</code>
the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> accepts no more elements
and so no longer <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>competes<span class="arrow">&#183;</span></a> with the <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>.
So if the sequence (<code>&lt;a/&gt;&lt;a/&gt;</code>)
is checked against <var>M</var>, in the <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> the
first <code>a</code> element will be <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a>
the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> and the second to the 
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>.
</div><div class="p">If the intention is not to allow the second <code>a</code>,
use a wildcard that explicitly disallows it. That is,
<pre xml:space="preserve">
  &lt;xs:all&gt;
   &lt;xs:any notQName="a"/&gt;
   &lt;xs:element name="a"/&gt;
  &lt;/xs:all&gt;</pre>
Now the sequence (<code>&lt;a/&gt;&lt;a/&gt;</code>) is not
accepted by the particle.
</div></div></div><div class="div5">
<h6><a name="sec-multiplepaths" id="sec-multiplepaths" shape="rect"></a>3.8.4.1.4 Multiple Paths in Groups</h6><p>It is possible for a given sequence of element information items
to have multiple <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in a given model group <var>M</var>; this is
the case, for example, when <var>M</var> is ambiguous, as for example</p><pre xml:space="preserve">  &lt;xs:choice&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element ref="my:a" maxOccurs="unbounded"/&gt;
    &lt;xs:element ref="my:b"/&gt;
   &lt;/xs:sequence&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element ref="my:a"/&gt;
    &lt;xs:element ref="my:b" maxOccurs="unbounded"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:choice&gt;</pre><p>which can match the sequence (<code>&lt;a/&gt;&lt;b/&gt;</code>)
in more than one way.
It may also be the case with unambiguous model groups, if
they do not correspond to a <a href="http://www.w3.org/TR/xml11/#determinism" shape="rect">deterministic</a>
expression (as it is termed in <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>)
or a "1-unambiguous" expression, as it
is defined by <a href="#ABK-DW" shape="rect">[Br&#252;ggemann-Klein / Wood 1998]</a>.
For example,</p><pre xml:space="preserve">  &lt;xs:sequence&gt;
   &lt;xs:element name="a" minOccurs="0"/&gt;
   &lt;xs:element name="a"/&gt;
  &lt;/xs:sequence&gt;</pre><div class="note"><div class="p"><b>Note:</b> Because these model groups do not obey the
constraint <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a>, they cannot
appear in a conforming schema.</div></div></div></div><div class="div4">
<h5><a name="group-validation" id="group-validation" shape="rect"></a>3.8.4.2 Principles of Validation against Groups</h5><p>As noted above, each model group <var>M</var> denotes a
language <var>L</var>(<var>M</var>), whose members are sequences of element information
items.  Each member of <var>L</var>(<var>M</var>) has one or more <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>M</var>, as do
other sequences of element information items.</p><p>By imposing conditions on <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in a model group <var>M</var>
it is possible to identify a set of <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-paths<span class="arrow">&#183;</span></a> in <var>M</var>,
such that if <var>M</var> is a  
model group which obeys the
<a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> constraint, then 
any sequence <var>S</var> has at most one <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>M</var>.
The language <var>V</var>(<var>M</var>) can then be defined as the set of
sequences which have <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-paths<span class="arrow">&#183;</span></a> in <var>M</var>.</p><p><span class="termdef"><a name="key-compete" id="key-compete" title="" shape="rect">[Definition:]&#160;&#160;</a>Two
<a href="#p" class="compref" shape="rect">Particles</a> <var>P</var><sub>1</sub> and <var>P</var><sub>2</sub> contained in some <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var>
<b>compete</b> with each other if and only if some sequence <var>S</var>
of element information items has two <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>P</var> which are
identical except that one path has <var>P</var><sub>1</sub> as its last item and the other
has <var>P</var><sub>2</sub>.</span></p><p>For example, in the content model</p><pre xml:space="preserve">  &lt;xs:sequence&gt;
   &lt;xs:element name="a"/&gt;
   &lt;xs:choice&gt;
    &lt;xs:element name="b"/&gt;
    &lt;xs:any/&gt;
   &lt;/xs:choice&gt;
  &lt;/xs:sequence&gt;</pre><p>the sequence (<code>&lt;a/&gt;&lt;b/&gt;</code>) has two paths,
one (<var>Q</var><sub>1</sub>) consisting of the <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is
the declaration for <code>a</code> followed by the 
<a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is
the declaration for <code>b</code>, and
a second (<var>Q</var><sub>2</sub>) consisting of the <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is
the declaration for <code>a</code> followed by the 
<a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is
the wildcard.  The sequences <var>Q</var><sub>1</sub> and <var>Q</var><sub>2</sub> are 
identical except for their last items, and so the
two <a href="#p" class="compref" shape="rect">Particles</a> which are the last items of <var>Q</var><sub>1</sub> and 
<var>Q</var><sub>2</sub> are said to <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a> with each other.
</p><div class="block">By contrast, in the content model
<pre xml:space="preserve">
  &lt;xs:choice&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="a"/&gt;
    &lt;xs:element name="b"/&gt;
   &lt;/xs:sequence&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="c"/&gt;
    &lt;xs:any/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:choice&gt;</pre>
the <a href="#p" class="compref" shape="rect">Particles</a> for <code>b</code> and the 
wildcard do not <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a>, because there is no
pair of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>P</var> which differ only in one 
having the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> for <code>b</code> and
the other having the <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>.
</div><p><span class="termdef"><a name="key-competing-paths" id="key-competing-paths" title="" shape="rect">[Definition:]&#160;&#160;</a>Two
(or more) <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of a sequence <var>S</var> in a <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var>
are <b>competing paths</b> if and only if
they are identical except for their final items, which 
differ.</span></p><p><span class="termdef"><a name="key-vpath" id="key-vpath" title="" shape="rect">[Definition:]&#160;&#160;</a>For any sequence <var>S</var> of element
information items and any particle <var>P</var>, a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var>
is a <b>validation-path</b> if and only if for each
prefix of the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> which ends with a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, the
corresponding prefix of <var>S</var> has no <a href="#key-competing-paths" class="termref" shape="rect"><span class="arrow">&#183;</span>competing path<span class="arrow">&#183;</span></a> which
ends with an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>.
</span></p><div class="note"><div class="p"><b>Note:</b> It is a consequence of the definition of <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> that for
any content model <var>M</var> which obeys constraint
<a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> and for any sequence <var>S</var> of
element information items, <var>S</var> has at most one
<a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>M</var>.
</div></div><p><span class="termdef"><a name="key-lvip" id="key-lvip" title="" shape="rect">[Definition:]&#160;&#160;</a>A sequence <var>S</var> of
element information items is <b>locally valid</b> against
a particle <var>P</var> if and only if 
<var>S</var> has a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>P</var>.  The set of all such 
sequences is written <var>V</var>(<var>P</var>).</span></p></div><div class="div4">
<h5><a name="sec-cvc-model-group" id="sec-cvc-model-group" shape="rect"></a>3.8.4.3 Element Sequence Valid</h5><div class="constraintnote"><a id="cvc-model-group" name="cvc-model-group" shape="rect"></a><b>Validation Rule: Element Sequence Valid</b><br clear="none" /><div class="constraint"><div class="p">For a sequence <var>S</var> (possibly empty) of element information items to be
locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
a model group <var>M</var>, <var>S</var> <span class="rfc2119">must</span> be in <var>V</var>(<var>M</var>).
</div><div class="note"><div class="p"><b>Note:</b> It is possible to define groups whose <a href="#mg-particles" class="propref" shape="rect">{particles}</a> 
is empty.  When a <b><i>choice</i></b>-group <var>M</var> has an empty
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> property, then
<var>L</var>(<var>M</var>) is the empty set.
When <var>M</var> is a <b><i>sequence</i></b>- or <b><i>all</i></b>-group with an empty
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> property, then
<var>L</var>(<var>M</var>) is the set containing the empty (zero-length) sequence.
</div></div></div></div></div></div><div class="div3">
<h4><a name="sec-sic-mgrp" id="sec-sic-mgrp" shape="rect"></a>3.8.5 Model Group Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-modelGroup" id="coss-modelGroup" shape="rect"></a>3.8.6 Constraints on Model Group Schema Components</h4><p>All model groups (see <a href="#Model_Groups" shape="rect">Model Groups (&#167;3.8)</a>) <span class="rfc2119">must</span> satisfy the following constraints.</p><div class="div4">
<h5><a name="sec-mg-props-correct" id="sec-mg-props-correct" shape="rect"></a>3.8.6.1 Model Group Correct</h5><div class="constraintnote"><a id="mg-props-correct" name="mg-props-correct" shape="rect"></a><b>Schema Component Constraint: Model Group Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a model group are as
	  described in the property tableau in
	  <a href="#Model_Group_details" shape="rect">The Model Group Schema Component (&#167;3.8.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2<a id="no-circular-groups" name="no-circular-groups" shape="rect"> </a><span class="p">There are no circular
	   groups. That is, within the
	  <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of a group there
	  is no
	   particle at any depth whose
	  <a href="#p-term" class="propref" shape="rect">{term}</a> is the group itself.</span></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-all-limited" id="sec-cos-all-limited" shape="rect"></a>3.8.6.2 All Group Limited</h5><div class="constraintnote"><a id="cos-all-limited" name="cos-all-limited" shape="rect"></a><b>Schema Component Constraint: All Group Limited</b><br clear="none" /><div class="constraint"><div class="p">When a model group has <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> <b><i>all</i></b>, then
    <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">It appears only as the value of one or more of the following properties:</span><div class="constraintlist"><div class="clnumber">1.1 <span class="p">the <a href="#mgd-model_group" class="propref" shape="rect">{model group}</a> property of a model group definition.</span></div>
<div class="clnumber">1.2 <span class="p">the <a href="#p-term" class="propref" shape="rect">{term}</a> property of a <a href="#p" class="compref" shape="rect">Particle</a> with
       <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a><code> = 1</code> which is
       
       the <a href="#ct-particle" class="propref" shape="rect">{particle}</a>
       of the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of a complex
       type definition.</span></div>
<div class="clnumber">1.3 <span class="p">the <a href="#p-term" class="propref" shape="rect">{term}</a> property of a <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var> with
       <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> <code>=</code>
       <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> <code>= 1</code>, where
       <var>P</var> is among the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of a
       <a href="#mg" class="compref" shape="rect">Model Group</a> whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is
       <b><i>all</i></b>.</span></div>
</div></div>
<div class="clnumber">2 <span class="p">For every particle <var>P</var> in its <a href="#mg-particles" class="propref" shape="rect">{particles}</a>,
	   if <var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> is a model group, 
	   then <var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a>.<a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> 
	   = <b><i>all</i></b>.</span></div>
</div> 

   </div></div></div></div><div class="div4">
<h5><a name="sec-cos-element-consistent" id="sec-cos-element-consistent" shape="rect"></a>3.8.6.3 Element Declarations Consistent</h5><div class="constraintnote"><a id="cos-element-consistent" name="cos-element-consistent" shape="rect"></a><b>Schema Component Constraint: Element Declarations Consistent</b><br clear="none" /><div class="constraint"><div class="p">If the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> 
property contains, either
directly, indirectly (that is, within the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> 
property of a
contained model group, recursively), 
or <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>, two or more 
element
declarations with the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>, then all their type
definitions <span class="rfc2119">must</span> be the same top-level definition, that is,
<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">All 
their declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>s  have a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
 <a href="#ctd-name" class="propref" shape="rect">{name}</a>.</span></div>
<div class="clnumber">2 <span class="p">All 
their
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>s  have the same
<a href="#ctd-name" class="propref" shape="rect">{name}</a>.</span></div>
<div class="clnumber">3 <span class="p">All 
their
declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>s  have the same
<a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a>.</span></div>
<div class="clnumber">4 <span class="p">All their <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>s are either
all <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or else all are present and 

<a href="#key-equiv-tt" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.</span></div>
</div>
</div><div class="p">If 
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
  The <a href="#mg-particles" class="propref" shape="rect">{particles}</a> property contains (either directly,
  indirectly, or <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>) one or more
  element declarations with the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <var>Q</var>;
call these element
  declarations <var>EDS</var>.
 </span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->
  At least	<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
    The <a href="#mg-particles" class="propref" shape="rect">{particles}</a> property contains one or more
    <b><i>strict</i></b> or <b><i>lax</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particles<span class="arrow">&#183;</span></a> which <a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> <var>Q</var>.
   </span></div>
<div class="clnumber">2.2 <span class="p">
    The <a href="#mg" class="compref" shape="rect">Model Group</a> is the <a href="#p-term" class="propref" shape="rect">{term}</a> of the
    <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content model<span class="arrow">&#183;</span></a> of some <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> <var>CTD</var> and
    <var>CTD</var>.<a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> has an <a href="#ct-open_content" class="propref" shape="rect">{open content}</a>
    with a <b><i>strict</i></b> or <b><i>lax</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> which
    <a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <var>Q</var>.
   </span></div>
</div>
 </div>
<div class="clnumber">3 <span class="p">
  There exists a top-level element declaration <var>G</var> with the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
  <var>Q</var>.
 </span></div>
</div>
then the <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>s of  <var>EDS</var>
and the <a href="#ed-type_table" class="propref" shape="rect">{type table}</a> of 
<var>G</var> <span class="rfc2119">must</span> either
all be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or else all be present and
<a href="#key-equiv-tt" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.</div><div class="p"><span class="termdef"><a name="key-impl-cont" id="key-impl-cont" title="" shape="rect">[Definition:]&#160;&#160;</a>A list
of particles <b>implicitly contains</b> an element declaration if and only if a
member of the list contains that
element declaration in its <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a></span>.</div><div class="p"><div class="termdef"><a name="key-equiv-tt" id="key-equiv-tt" title="" shape="rect">[Definition:]&#160;&#160;</a>
A <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T1</var> is <b>equivalent</b> to a <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T2</var> 
if and only if <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
  <var>T1</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> has the same length as <var>T2</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> and their
  corresponding entries are <a href="#key-equiv-ta" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.
 </span></div>
<div class="clnumber">2 <span class="p">
  <var>T1</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a> and <var>T2</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a> are
  <a href="#key-equiv-ta" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.
 </span></div>
</div></div></div><div class="p">
<div class="termdef"><a name="key-equiv-ta" id="key-equiv-ta" title="" shape="rect">[Definition:]&#160;&#160;</a>
Any <a href="#tac" class="compref" shape="rect">Type Alternative</a> is <b>equivalent</b> to itself.
Otherwise, any <a href="#tac" class="compref" shape="rect">Type Alternative</a> <var>T1</var> is <b>equivalent</b> 
to a different <a href="#tac" class="compref" shape="rect">Type Alternative</a>
<var>T2</var> if and only if 
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> and
<var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> are true for the same
set of input element information items
and 
<var>T1</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> and
<var>T2</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> accept
the same set of input information items as valid.
In the general case, equivalence and non-equivalence
can be difficult to establish.
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> under just what conditions a
processor detects that two type
alternatives are equivalent, but all
processors <span class="rfc2119">must</span> detect <var>T1</var> and <var>T2</var> as
equivalent if 
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
  <var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
  and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
  have the same number of <a href="#nb" class="compref" shape="rect">Namespace Binding</a>s, and for each entry in
  <var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
  there is a corresponding entry in
  <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
  with the same <a href="#nb-prefix" class="propref" shape="rect">{prefix}</a> and <a href="#nb-namespace" class="propref" shape="rect">{namespace}</a>.
 </span></div>
<div class="clnumber">2 <span class="p">
  <var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a>
  and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a>
  either are both <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or have the same value. 
 </span></div>
<div class="clnumber">3 <span class="p">
  <var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-base_URI" class="propref" shape="rect">{base URI}</a>
  and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-base_URI" class="propref" shape="rect">{base URI}</a>
  either are both <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or have the same value. 
 </span></div>
<div class="clnumber">4 <span class="p">
  <var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-expression" class="propref" shape="rect">{expression}</a>
  and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-expression" class="propref" shape="rect">{expression}</a>
  have the same value. 
 </span></div>
<div class="clnumber">5 <span class="p">
  <var>T1</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> and
  <var>T2</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> are the same type definition.
 </span></div>
</div>
A processor <span class="rfc2119">may</span> treat two type alternatives as 
non-equivalent if they do not satisfy the conditions just
given and the processor does not detect that they
are nonetheless equivalent.
</div></div><div class="note"><div class="p"><b>Note:</b> 
  In the general case, equivalence can be
  difficult to prove, so the minimum required of implementations
  is kept relatively simple.  Schema authors can avoid
  interoperability issues by ensuring that any type alternatives
  for which equivalence must be established do satisfy
  the tests above.
  Implementations <span class="rfc2119">may</span> recognize cases
  when differences of namespace bindings, base URIs,
  and white space in the XPath expression do not affect
  the meaning of the expression.  
</div></div></div></div></div><div class="div4">
<h5><a name="sec-cos-nonambig" id="sec-cos-nonambig" shape="rect"></a>3.8.6.4 Unique Particle Attribution</h5><p>
<span class="termdef"><a name="key-ep" id="key-ep" title="" shape="rect">[Definition:]&#160;&#160;</a>
An <b>element particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is an <a href="#ed" class="compref" shape="rect">Element Declaration</a>.
</span>
<span class="termdef"><a name="key-wp" id="key-wp" title="" shape="rect">[Definition:]&#160;&#160;</a>
A <b>wildcard particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a <a href="#w" class="compref" shape="rect">Wildcard</a>.
Wildcard particles may be
referred to as "strict", "lax",
or "skip" particles, 
depending on the
<a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> property
of their <a href="#p-term" class="propref" shape="rect">{term}</a>.</span>
</p><div class="constraintnote"><a id="cos-nonambig" name="cos-nonambig" shape="rect"></a><b>Schema Component Constraint: Unique Particle Attribution</b><br clear="none" /><div class="constraint"><div class="p">A content model <span class="rfc2119">must not</span> contain two
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particles<span class="arrow">&#183;</span></a> which <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a> with each other, nor two
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particles<span class="arrow">&#183;</span></a> which <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a> with each other.</div></div></div><div class="note"><div class="p"><b>Note:</b> Content models in which an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> and a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>
<a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a> with each other are <em>not</em> prohibited.
In such cases, the <a href="#ed" class="compref" shape="rect">Element Declaration</a> is chosen; 
see the definitions of
<a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attribution<span class="arrow">&#183;</span></a>
and <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a>.
</div></div><div class="note"><div class="p"><b>Note:</b> This constraint reconstructs for XSD the equivalent
constraints of <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and SGML.  See 
<a href="#non-ambig" shape="rect">Analysis of the Unique Particle Attribution Constraint (non-normative) (&#167;J)</a> for further
discussion.</div><div class="p">Since this constraint is expressed at the component level, it
applies to content models whose origins (e.g. via type <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> and
references to named model groups) are no longer evident.  So particles at
different points in the content model are always distinct from one another,
even if they originated from the same named model group.</div></div><div class="note"><div class="p"><b>Note:</b> It is a consequence of <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a>, together with
the definition of <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a>, that any sequence <var>S</var> of element
information items has at most one <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in any particle <var>P</var>.
This means in turn that each item in <var>S</var> is attributed to at most one particle in <var>P</var>.
No item can match more than one <a href="#w" class="compref" shape="rect">Wildcard</a>
or more than one <a href="#ed" class="compref" shape="rect">Element Declaration</a> (because no two <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particles<span class="arrow">&#183;</span></a>
and no two <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particles<span class="arrow">&#183;</span></a> <span class="rfc2119">may</span> <a href="#key-compete" class="termref" shape="rect"><span class="arrow">&#183;</span>compete<span class="arrow">&#183;</span></a>), and if an item matches
both a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> and an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, it is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> by
the rules for <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-paths<span class="arrow">&#183;</span></a> to the <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>.</div></div><div class="note"><div class="p"><b>Note:</b> Because locally-scoped element declarations sometimes
have and sometimes do not have a
<a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a>, the scope of
declarations is <em>not</em> relevant to enforcing either 
the
<a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> constraint or the 
<a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a> constraint.</div></div></div><div class="div4">
<h5><a name="sec-cos-seq-range" id="sec-cos-seq-range" shape="rect"></a>3.8.6.5 Effective Total Range (<b><i>all</i></b> and <b><i>sequence</i></b>)</h5><p>The following constraints define relations appealed to elsewhere in this specification.</p><div class="constraintnote"><a id="cos-seq-range" name="cos-seq-range" shape="rect"></a><b>Schema Component Constraint: Effective Total Range (<b><i>all</i></b> and <b><i>sequence</i></b>)</b><br clear="none" /><div class="constraint"><div class="p">The effective total range of a particle <var>P</var>
	whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a group <var>G</var>
	whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is
	<b><i>all</i></b> or <b><i>sequence</i></b> is a pair of minimum and maximum, as follows: </div><div class="glist"><div class="gitem"><div class="giLabel">minimum</div><div class="giDef"><div class="p">The product of <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> and the
	   sum of the <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> of every wildcard or element
	   declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> and the minimum
	   part of the effective total range of each of the group particles in 
	   <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> (or <code>0</code> 
	   if there are no 
	   <a href="#mg-particles" class="propref" shape="rect">{particles}</a>).</div></div></div><div class="gitem"><div class="giLabel">maximum</div><div class="giDef"><div class="p"><b><i>unbounded</i></b> if the <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of any wildcard or element
	   declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> or the maximum
	   part of the effective total range of any of the group particles in 
	   <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> is <b><i>unbounded</i></b>, 
	   or if any of those is non-zero
	   and <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> 
	    = <b><i>unbounded</i></b>,
	   otherwise the product of <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> and the
	   sum of the <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of every wildcard or element
	   declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> and the maximum
	   part of the effective total range of each of the group particles in 
	   <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> 
	   (or <code>0</code> if there are no 
	   <a href="#mg-particles" class="propref" shape="rect">{particles}</a>).</div></div></div></div></div></div></div><div class="div4">
<h5><a name="sec-cos-choice-range" id="sec-cos-choice-range" shape="rect"></a>3.8.6.6 Effective Total Range (<b><i>choice</i></b>)</h5><div class="constraintnote"><a id="cos-choice-range" name="cos-choice-range" shape="rect"></a><b>Schema Component Constraint: Effective Total Range (<b><i>choice</i></b>)</b><br clear="none" /><div class="constraint"><div class="p">The effective total range of a particle <var>P</var>
	whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a group <var>G</var>
	whose <a href="#mg-compositor" class="propref" shape="rect">{compositor}</a> is
	<b><i>choice</i></b> is a pair of minimum and maximum, as follows:</div><div class="glist"><div class="gitem"><div class="giLabel">minimum</div><div class="giDef"><div class="p">The product of <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> and the
	   minimum of the <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> of every wildcard or element
	   declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> and 
	   the minimum part of the effective total range of each of the group particles 
	   in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> 
	   (or <code>0</code> if there are no <a href="#mg-particles" class="propref" shape="rect">{particles}</a>).</div></div></div><div class="gitem"><div class="giLabel">maximum</div><div class="giDef"><div class="p"><b><i>unbounded</i></b> if the <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of any wildcard or element
	   declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> or the maximum
	   part of the effective total range of any of the group particles in 
	   <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> is <b><i>unbounded</i></b>, 
	   or if any of those is non-zero and 
	   <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> = <b><i>unbounded</i></b>,
	   otherwise the product of <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> and the
	   maximum of the <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of every wildcard or element
	   declaration particle in <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> and the maximum
	   part of the effective total range of each of the group particles in 
	   <var>G</var>.<a href="#mg-particles" class="propref" shape="rect">{particles}</a> 
	   (or <code>0</code> if there are no <a href="#mg-particles" class="propref" shape="rect">{particles}</a>).</div></div></div></div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#Model_Groups" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Wildcards" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cParticles" id="cParticles" shape="rect"></a>3.9 Particles</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.1 <a href="#Particle_details" shape="rect">The Particle Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.2 <a href="#declare-particles" shape="rect">XML Representation of Particle Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.3 <a href="#sec-src-p" shape="rect">Constraints on XML Representations of Particles</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.4 <a href="#sec-cvc-p" shape="rect">Particle Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.4.1 <a href="#particle-validation" shape="rect">Principles of Validation against Particles</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.4.2 <a href="#sec-cvc-particle" shape="rect">Element Sequence Locally Valid (Particle)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.4.3 <a href="#sec-cvc-accept" shape="rect">Element Sequence Accepted (Particle)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.5 <a href="#sec-sic-p" shape="rect">Particle Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.6 <a href="#coss-particle" shape="rect">Constraints on Particle Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.6.1 <a href="#sec-p-props-correct" shape="rect">Particle Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.6.2 <a href="#sec-cos-particle-extend" shape="rect">Particle Valid (Extension)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.9.6.3 <a href="#sec-cos-group-emptiable" shape="rect">Particle Emptiable</a><br clear="none" />
</div><p>As described in <a href="#Model_Groups" shape="rect">Model Groups (&#167;3.8)</a>, particles contribute 
to the definition
of content models.</p><p>When an element is validated against a complex type, 
its sequence of child elements is checked against the content model of
the complex type and the children are <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> to
<a href="#p" class="compref" shape="rect">Particles</a> of the content model.
The attribution of items to <a href="#p" class="compref" shape="rect">Particles</a>

determines the calculation of the items' 
<a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined 
declarations<span class="arrow">&#183;</span></a>
and thus partially determines the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing
element declarations<span class="arrow">&#183;</span></a> for the children:
when 
an element information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an
<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, that <a href="#p" class="compref" shape="rect">Particle</a>'s <a href="#ed" class="compref" shape="rect">Element Declaration</a>,
or an <a href="#ed" class="compref" shape="rect">Element Declaration</a> <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a> for it,
becomes
the item's <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined 
declaration<span class="arrow">&#183;</span></a> and
thus normally its <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>; when the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> a
<a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> 
depends on the <a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> property of the wildcard and
on <a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance) (&#167;3.17.6.3)</a>.
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:element ref="egg" minOccurs="12" maxOccurs="12"/&gt;

&lt;xs:group ref="omelette" minOccurs="0"/&gt;

&lt;xs:any maxOccurs="unbounded"/&gt;
     </pre></div><div class="exampleWrapper">
<div class="p">XML representations which all involve particles, illustrating some of
the possibilities for controlling occurrence.</div></div></div><div class="div3">
<h4><a name="Particle_details" id="Particle_details" shape="rect"></a>3.9.1 The Particle Schema Component</h4><p>The particle schema component has the following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="p" id="p" shape="rect">Particle</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="p-min_occurs" shape="rect" id="p-min_occurs"></a><div class="pdName"><span class="propdef">{min occurs}</span></div>
<div class="pdDef">
An xs:nonNegativeInteger value.  Required.</div>
</div>
<div class="propDefn"><a name="p-max_occurs" shape="rect" id="p-max_occurs"></a><div class="pdName"><span class="propdef">{max occurs}</span></div>
<div class="pdDef">
Either a positive integer or <b><i>unbounded</i></b>. Required.</div>
</div>
<div class="propDefn"><a name="p-term" shape="rect" id="p-term"></a><div class="pdName"><span class="propdef">{term}</span></div>
<div class="pdDef">
A  <a href="#t" class="compref" shape="rect">Term</a> component.  Required.</div>
</div>
<div class="propDefn"><a name="p-annotations" shape="rect" id="p-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
</div></div>
</div>
</div>
<p>In general, multiple element
information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, possibly with intervening character <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> if the content type
is <b><i>mixed</i></b>, can be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> with
respect to a single particle.  When the <a href="#p-term" class="propref" shape="rect">{term}</a> is an element
declaration or wildcard, <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> determines the minimum number of such element <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> that can occur.  The number of such children <span class="rfc2119">must</span> be greater than or equal to <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>.  If <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> is <b><i>0</i></b>, then occurrence of such children is optional.</p><p>Again, when the <a href="#p-term" class="propref" shape="rect">{term}</a> is an element
declaration or wildcard, the number of such element <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> <span class="rfc2119">must</span> be less than or equal to any numeric specification of
<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>; if <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> is <b><i>unbounded</i></b>, then there is no
upper bound on the number of such children.</p><p>When the <a href="#p-term" class="propref" shape="rect">{term}</a> is a model group, the permitted
occurrence range is determined by a combination of <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> and <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> and the occurrence ranges of the <a href="#p-term" class="propref" shape="rect">{term}</a>'s <a href="#mg-particles" class="propref" shape="rect">{particles}</a>.</p><p>
<span class="termdef"><a name="key-contain-dpt" id="key-contain-dpt" title="" shape="rect">[Definition:]&#160;&#160;</a>A particle
<b>directly contains</b> the component which is the value of its
<a href="#p-term" class="propref" shape="rect">{term}</a> property.</span>
<span class="termdef"><a name="key-contain-ipx" id="key-contain-ipx" title="" shape="rect">[Definition:]&#160;&#160;</a>A particle 
<b>indirectly contains</b> the particles, groups, wildcards, and
element declarations which are contained by the value of its
<a href="#p-term" class="propref" shape="rect">{term}</a> property.</span>
<span class="termdef"><a name="key-contain-xpx" id="key-contain-xpx" title="" shape="rect">[Definition:]&#160;&#160;</a>A particle 
<b>contains</b> the components which it either
<a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>
or <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly contains<span class="arrow">&#183;</span></a>.</span>
</p><p>
      See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
      <a href="#p-annotations" class="propref" shape="rect">{annotations}</a> property.
     </p></div><div class="div3">
<h4><a name="declare-particles" id="declare-particles" shape="rect"></a>3.9.2 XML Representation of Particle Schema Components</h4><div class="block"><a name="anchor11228" id="anchor11228" shape="rect"></a>
     
      Particles in the schema typically
      correspond to element
      information items that can bear <code>minOccurs</code> and <code>maxOccurs</code>
      attributes in the schema document:<ul><li><div class="p">Local <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>, see <a href="#declare-element" shape="rect">XML Representation of Element Declaration Schema Components (&#167;3.3.2)</a></div></li><li><div class="p">Model groups <a href="#element-all" class="eltref" shape="rect">&lt;all&gt;</a>, <a href="#element-sequence" class="eltref" shape="rect">&lt;sequence&gt;</a>, and <a href="#element-choice" class="eltref" shape="rect">&lt;choice&gt;</a>, see <a href="#declare-contentModel" shape="rect">XML Representation of Model Group Schema Components (&#167;3.8.2)</a></div></li><li><div class="p">Group references <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>, see <a href="#declare-namedModelGroup" shape="rect">XML Representation of Model Group Definition Schema Components (&#167;3.7.2)</a></div></li><li><div class="p">Wildcard <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a>, see <a href="#declare-openness" shape="rect">XML Representation of Wildcard Schema Components (&#167;3.10.2)</a></div></li></ul>
      Sometimes particles do not correspond to any of these
      elements. For example, particles may be synthesized in complex
      type extension.
     </div></div><div class="div3">
<h4><a name="sec-src-p" id="sec-src-p" shape="rect"></a>3.9.3 Constraints on XML Representations of Particles</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-p" id="sec-cvc-p" shape="rect"></a>3.9.4 Particle Validation Rules</h4><div class="div4">
<h5><a name="particle-validation" id="particle-validation" shape="rect"></a>3.9.4.1 Principles of Validation against Particles</h5><p>Every particle <var>P</var> <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>recognizes<span class="arrow">&#183;</span></a> some language <var>L</var>(<var>P</var>).
When <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> and <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> of <var>P</var> are
both 1, <var>L</var>(<var>P</var>) is the language of <var>P</var>'s <a href="#p-term" class="propref" shape="rect">{term}</a>,
as described in <a href="#term-recognition" shape="rect">Validation of Basic Terms (&#167;3.9.4.1.2)</a>.  The
following section (<a href="#particle-recognition" shape="rect">Language Recognition for Repetitions (&#167;3.9.4.1.1)</a>)
describes how more complicated counts are handled.</p><div class="div5">
<h6><a name="particle-recognition" id="particle-recognition" shape="rect"></a>3.9.4.1.1 Language Recognition for Repetitions</h6><p>When <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> = <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> = <var>n</var>, 
	and <var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> = <var>T</var>, 
	then <var>L</var>(<var>P</var>) is the set  of sequences <var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... + <var>Sn</var> such that <var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>T</var>) for 0 &lt; <var>i</var> &#8804; <var>n</var>.
	Less formally: <var>L</var>(<var>P</var>) is 
	the
	set of sequences which have <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partitions<span class="arrow">&#183;</span></a> into <var>n</var> sub-sequences
	for which each of the <var>n</var> subsequences
	 is in the language accepted by the <a href="#p-term" class="propref" shape="rect">{term}</a> of <var>P</var>.
       </p><p>When <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> = <var>j</var> 
and <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> = <var>k</var>,
and <var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> = <var>T</var>, 
then <var>L</var>(<var>P</var>) is the set  of sequences <var>S</var> = <var>S</var><sub>1</sub>, + <var>S</var><sub>2</sub> + ... + <var>Sn</var>, i.e. the
set of sequences which have <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partitions<span class="arrow">&#183;</span></a> into <var>n</var> sub-sequences
such that <var>n</var> &#8805; <var>j</var> and <var>n</var> &#8804; <var>k</var> (or <var>k</var> is <b><i>unbounded</i></b>)
and <var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>T</var>) for 0 &lt; <var>i</var> &#8804; <var>n</var>.</p><p>When <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> = 0, 
then <var>L</var>(<var>P</var>) also includes the empty sequence.</p><div class="block">If (1) <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var> has
<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> = <var>j</var>, <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> = <var>k</var>, and <a href="#p-term" class="propref" shape="rect">{term}</a> = <var>T</var>, 
and (2) <var>S</var> is a sequence of element information items
such that <var>S</var> = <var>S</var><sub>1</sub> + <var>S</var><sub>2</sub> + ... + <var>Sn</var> (i.e. <var>S</var><sub>1</sub>, <var>S</var><sub>2</sub>, ..., <var>Sn</var> is
a <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> of <var>S</var>), 
and (3) <var>n</var> &#8804; <var>k</var> (or <var>k</var> is <b><i>unbounded</i></b>), 
and (4) <var>S</var><sub><var>i</var></sub> is in <var>L</var>(<var>T</var>) for 0 &lt; <var>i</var> &lt; <var>n</var>, 
then:
<ul><li><div class="p">If <var>T</var> is a model group, 
then the set of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var> is the set of all <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> <var>Q</var> such that
<var>Q</var> = <var>Q</var><sub>1</sub> + <var>Q</var><sub>2</sub> + ... + <var>Q</var><sub><var>n</var></sub>, where
<var>Q</var><sub><var>i</var></sub> is a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var><sub><var>i</var></sub> in <var>T</var> for 0 &lt; <var>i</var> &#8804; <var>n</var>.
(For the definition of <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in model groups,
see <a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a>.)
</div></li><li><div class="p">
If <var>T</var> is a <a href="#key-basic-term" class="termref" shape="rect"><span class="arrow">&#183;</span>basic term<span class="arrow">&#183;</span></a>, then the (sole) <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var>
is a sequence of <var>n</var> occurrences of <var>P</var>.
</div></li></ul>
<div class="note"><div class="p"><b>Note:</b> 
Informally:  the path of an input sequence <var>S</var> in a 
particle <var>P</var> may go through the <a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particles<span class="arrow">&#183;</span></a> in
<var>P</var> as many times as is allowed by 
<var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.
If the path goes through <var>P</var> more than once, each
time before the last one must correspond to a sequence
accepted by 
<var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a>; 
because the last 
iteration in the path
may not be complete, it need not be accepted by the
<a href="#p-term" class="propref" shape="rect">{term}</a>.</div></div>
</div></div><div class="div5">
<h6><a name="term-recognition" id="term-recognition" shape="rect"></a>3.9.4.1.2 Validation of Basic Terms</h6><p>In the preceding section (<a href="#particle-recognition" shape="rect">Language Recognition for Repetitions (&#167;3.9.4.1.1)</a>), the language <var>L</var>(<var>P</var>) <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by a
<a href="#p" class="compref" shape="rect">Particle</a> <var>P</var> is defined in terms of the language <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>P</var>'s
<a href="#p-term" class="propref" shape="rect">{term}</a>.  This section defines <var>L</var>(<var>T</var>) for <a href="#key-basic-term" class="termref" shape="rect"><span class="arrow">&#183;</span>basic terms<span class="arrow">&#183;</span></a>;
for the definition of <var>L</var>(<var>T</var>) when <var>T</var> is a group, 
see <a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a>.</p><p>
<span class="termdef"><a name="key-L.ed" id="key-L.ed" title="" shape="rect">[Definition:]&#160;&#160;</a>
For any <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>D</var>, the language 
<b><var>L</var>(<var>D</var>)</b> <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>D</var> 
is the set of all sequences of
length 1 whose sole member is an element information item which
<a href="#key-e-d-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <var>D</var>.</span></p><div class="p">
<div class="termdef"><a name="key-e-d-match" id="key-e-d-match" title="" shape="rect">[Definition:]&#160;&#160;</a>
An element information item <var>E</var> <b>matches</b> an <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>D</var> if and only if
<b>one</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> and <var>D</var> have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>,</span></div>
<div class="clnumber">2 <span class="p">The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>E</var> <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to an element
declaration <var>D</var><sub>2</sub> which is <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a>
for <var>D</var>.</span></div>
</div>

</div>

</div><div class="p"><div class="termdef"><a name="key-en-match" id="key-en-match" title="" shape="rect">[Definition:]&#160;&#160;</a>An 
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <var>E</var> <b>matches</b> an
<a href="#gloss-NCName" class="termref" shape="rect"><span class="arrow">&#183;</span>NCName<span class="arrow">&#183;</span></a> <var>N</var> and
a namespace name <var>NS</var> (or, equivalently, <var>N</var> and <var>NS</var> 
<b>match</b> <var>E</var>)
if and only if all of the following
are true:
<ul><li><div class="p">The local name of <var>E</var> is identical to <var>N</var>.</div></li><li><div class="p">Either the namespace name of <var>E</var> is identical to <var>NS</var>,
or else <var>E</var> has no namespace name (<var>E</var> is an unqualified
name) and <var>NS</var> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></li></ul>
</div>
</div><div class="note"><div class="p"><b>Note:</b> For convenience, <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a>
are sometimes spoken of as <a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matching<span class="arrow">&#183;</span></a>
a <a href="#td" class="compref" shape="rect">Type Definition</a>, an <a href="#ed" class="compref" shape="rect">Element Declaration</a>, an <a href="#ad" class="compref" shape="rect">Attribute Declaration</a>,
or other schema component which has both a <span class="anonRef">{name}</span>
and a <span class="anonRef">{target namespace}</span> property (or vice versa,
the component is spoken of as <a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matching<span class="arrow">&#183;</span></a>
the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>), when what is meant
is, strictly speaking, that the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
<a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> the <span class="anonRef">{name}</span>
and <span class="anonRef">{target namespace}</span> 
properties of the component.</div></div><p>
<span class="termdef"><a name="key-L.w" id="key-L.w" title="" shape="rect">[Definition:]&#160;&#160;</a>
For any <a href="#w" class="compref" shape="rect">Wildcard</a> <var>W</var>, the language
<b><var>L</var>(<var>W</var>)</b> <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>W</var>
is the set of all sequences of
length 1 whose sole member is an element information item which
<a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <var>W</var>.</span>
</p><p><a name="anchor6159-2" id="anchor6159-2" shape="rect"></a>
<span class="termdef"><a name="key-wc-match" id="key-wc-match" title="" shape="rect">[Definition:]&#160;&#160;</a>An element information item <var>E</var>
<b>matches</b> a <a href="#w" class="compref" shape="rect">Wildcard</a> <var>W</var> 
(or a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is <var>W</var>)
if and only if  <var>E</var>
is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to <var>W</var>, as defined in the validation rule
<a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.
</span>
</p><p><span class="termdef"><a name="key-ns-match" id="key-ns-match" title="" shape="rect">[Definition:]&#160;&#160;</a>Two namespace
names <var>N</var><sub>1</sub> and <var>N</var><sub>2</sub> are said to <b>match</b> 
if and only if they are identical or both are <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</span></p><p>For principles of validation when the <a href="#p-term" class="propref" shape="rect">{term}</a> is a model group
instead of a <a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particle<span class="arrow">&#183;</span></a>, see
<a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a> and
<a href="#group-validation" shape="rect">Principles of Validation against Groups (&#167;3.8.4.2)</a>.</p></div></div><div class="div4">
<h5><a name="sec-cvc-particle" id="sec-cvc-particle" shape="rect"></a>3.9.4.2 Element Sequence Locally Valid (Particle)</h5><div class="constraintnote"><a id="cvc-particle" name="cvc-particle" shape="rect"></a><b>Validation Rule: Element Sequence Locally Valid (Particle)</b><br clear="none" /><div class="constraint"><div class="p">For a sequence (possibly empty) of element information items to be
locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a
<a href="#p" class="compref" shape="rect">Particle</a>
 <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The sequence must be accepted by the <a href="#p" class="compref" shape="rect">Particle</a>, as defined
in <a href="#cvc-accept" shape="rect">Element Sequence Accepted (Particle) (&#167;3.9.4.3)</a>.</span></div>
</div>

</div></div></div></div><div class="div4">
<h5><a name="sec-cvc-accept" id="sec-cvc-accept" shape="rect"></a>3.9.4.3 Element Sequence Accepted (Particle)</h5><div class="constraintnote"><a id="cvc-accept" name="cvc-accept" shape="rect"></a><b>Validation Rule: Element Sequence Accepted (Particle)</b><br clear="none" /><div class="constraint"><div class="p">For a sequence (possibly empty) of 
	element information items to be
	accepted by a <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var>, </div>the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-pw" name="c-pw" shape="rect"> </a><b>If </b><var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> is a
	  wildcard, <b>then </b>
	  <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1 <span class="p">The length of the sequence is greater than or
	     equal to <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>.</span></div>
<div class="clnumber">1.2 <span class="p">If <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> is a number,
	     then the length of
	     the sequence is less than or equal to the <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.</span></div>
<div class="clnumber">1.3 <span class="p">Each element information item in the sequence is
	     <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to the
	     wildcard as defined by <a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.</span></div>
</div> In this case, each
	   element information item in the sequence is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> <var>P</var> and has no <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>.</div><div class="clnumber">2<a id="c-cdde" name="c-cdde" shape="rect"> </a><b>If </b><var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> is an
	  element declaration <var>D</var>, <b>then </b>
	  <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">The length of the sequence is greater than or
	     equal to <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>.</span></div>
<div class="clnumber">2.2 <span class="p">If <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> is a number,
	     then the length of
	     the sequence is less than or equal to the
	     <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.</span></div>
<div class="clnumber">2.3 <!--* no span class='p' possible here *-->For each element information item <var>E</var> in the sequence
	     <b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.3.1 <span class="p"><var>D</var>  
		  
		  has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as <var>E</var>.</span><div class="p">In this case <var>D</var> is the <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>
		for <var>E</var> with respect to
		<a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> and
		<a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element) (&#167;3.3.5.1)</a>.</div></div>
<div class="clnumber">2.3.2<a id="c-psg" name="c-psg" shape="rect"> </a><span class="p"><var>D</var> is top-level (i.e. <var>D</var>.<a href="#ed-scope" class="propref" shape="rect">{scope}</a>.<a href="#sc_e-variety" class="propref" shape="rect">{variety}</a> = 
		 <b><i>global</i></b>), its <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> does not contain
		<b><i>substitution</i></b>,  <var>E</var>'s
		 <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to
		 an element declaration
		 <var>S</var> &#8212;
		<span class="termdef"><a name="key-eqd" id="key-eqd" title="" shape="rect">[Definition:]&#160;&#160;</a>call this declaration the
		 <b>substituting declaration</b></span> &#8212; and <a href="#key-eqd" class="termref" shape="rect"><span class="arrow">&#183;</span><var>S</var><span class="arrow">&#183;</span></a>  is
		<a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a> for  <var>D</var> as defined in
		<a href="#cos-equiv-derived-ok-rec" shape="rect">Substitution Group OK (Transitive) (&#167;3.3.6.3)</a>.</span><div class="p">In this case <a href="#key-eqd" class="termref" shape="rect"><span class="arrow">&#183;</span><var>S</var><span class="arrow">&#183;</span></a> is the <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>
		for <var>E</var> with respect to
		<a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> and <a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element) (&#167;3.3.5.1)</a>.</div></div>
</div><div class="p">In this case <var>E</var> is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> <var>P</var>.</div><div class="note"><div class="p"><b>Note:</b> 
	     This clause is equivalent to requiring that the sequence
	     of length 1 containing <var>E</var> is in
	     <a href="#key-L.ed" class="termref" shape="rect"><span class="arrow">&#183;</span><var>L</var>(<var>D</var>)<span class="arrow">&#183;</span></a>.
	    </div></div></div>
</div>
	 </div><div class="clnumber">3 <b>If </b><var>P</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> is a model
	  group, <b>then </b>
	  <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">There is a <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> of the sequence
	     into <var>n</var> sub-sequences such that
	     <var>n</var> is greater than or equal to 
	     <var>P</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>.</span></div>
<div class="clnumber">3.2 <span class="p">If <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> is a
	     number, <var>n</var> is less than or equal to
	     <var>P</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max        occurs}</a>.</span></div>
<div class="clnumber">3.3 <span class="p">Each sub-sequence in the <a href="#key-partition" class="termref" shape="rect"><span class="arrow">&#183;</span>partition<span class="arrow">&#183;</span></a> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to that model
	     group as defined in <a href="#cvc-model-group" shape="rect">Element Sequence Valid (&#167;3.8.4.3)</a>.</span></div>
</div> In this case, the
	   element information items in each sub-sequence are <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> <a href="#p" class="compref" shape="rect">Particles</a>
	   within the model group which is the <a href="#p-term" class="propref" shape="rect">{term}</a>, as described in
	   <a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a>.</div></div><div class="note"><div class="p"><b>Note:</b> The rule just given does not require that the
content model be deterministic.  In practice, however, 
most 
non-determinism in content models is ruled out by the schema
component constraint <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a>.
Non-determinism can occur despite that constraint for
several reasons.
In some such cases, 
some particular element information item may be accepted by either a
<a href="#w" class="compref" shape="rect">Wildcard</a> or an <a href="#ed" class="compref" shape="rect">Element Declaration</a>.  In such situations,
the validation process defined in this specification matches the
element information item against the <a href="#ed" class="compref" shape="rect">Element Declaration</a>, both in
identifying the <a href="#ed" class="compref" shape="rect">Element Declaration</a> as the item's 
<a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>, 
and in choosing alternative paths through a content model.
Other cases of non-determinism involve nested particles each of
which has <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> greater than 1,
where the input sequence can be partitioned in multiple ways.
In those cases, there is no fixed rule for eliminating the
non-determinism.</div></div><div class="note"><div class="p"><b>Note:</b> clause <a href="#c-pw" shape="rect">1</a> and clause <a href="#c-psg" shape="rect">2.3.2</a> do not
interact: an element information item validatable by a declaration
with a substitution group head is
<em>not</em> validatable by a wildcard which accepts the head's
(namespace, name) pair but not its own.</div></div></div></div></div></div><div class="div3">
<h4><a name="sec-sic-p" id="sec-sic-p" shape="rect"></a>3.9.5 Particle Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-particle" id="coss-particle" shape="rect"></a>3.9.6 Constraints on Particle Schema Components</h4><div class="div4">
<h5><a name="sec-p-props-correct" id="sec-p-props-correct" shape="rect"></a>3.9.6.1 Particle Correct</h5><p>All particles (see <a href="#cParticles" shape="rect">Particles (&#167;3.9)</a>) <span class="rfc2119">must</span> satisfy the following constraint.</p><div class="constraintnote"><a id="p-props-correct" name="p-props-correct" shape="rect"></a><b>Schema Component Constraint: Particle Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a particle are as described in
the property tableau in
<a href="#Particle_details" shape="rect">The Particle Schema Component (&#167;3.9.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->If <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a> is not <b><i>unbounded</i></b>, that is, it has a
numeric value, then
    <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> is not greater than <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.</span></div>
</div>
   </div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-particle-extend" id="sec-cos-particle-extend" shape="rect"></a>3.9.6.2 Particle Valid (Extension)</h5><p>The following constraint
   defines a
   relation
   appealed to elsewhere in this specification.</p><div class="constraintnote"><a id="cos-particle-extend" name="cos-particle-extend" shape="rect"></a><b>Schema Component Constraint: Particle Valid (Extension)</b><br clear="none" /><div class="constraint"><div class="p"><span class="termdef"><a name="cd-model-extension" id="cd-model-extension" title="" shape="rect">[Definition:]&#160;&#160;</a>For a particle
(call it <b>E</b>, for extension) to be a <b>valid extension</b> of
another particle (call it <b>B</b>, for base)</span>
    <b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p">They are the same particle.</span></div>
<div class="clnumber">2 <span class="p"><var>E</var>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>
	   = <var>E</var>.<a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>
	   = 1 and <var>E</var>.<a href="#p-term" class="propref" shape="rect">{term}</a> is a 
	   <b><i>sequence</i></b> group whose <a href="#mg-particles" class="propref" shape="rect">{particles}</a>' first member is a
	   particle all of whose properties, recursively, are
	   identical to those of <b>B</b>.</span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->
       <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">
          <b>E</b>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> =
          <b>B</b>.<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a>.
         </span></div>
<div class="clnumber">3.2 <span class="p">
          Both <b>E</b> and <b>B</b> have <b><i>all</i></b> groups
          as their <a href="#p-term" class="propref" shape="rect">{term}</a>s.
         </span></div>
<div class="clnumber">3.3 <span class="p">The 
          <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of <b>B</b>'s
          <b><i>all</i></b> group is a prefix of the
	      <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of
          <b>E</b>'s <b><i>all</i></b> group.
         </span></div>
</div>
      </div>
</div>
   </div></div></div></div><div class="div4">
<h5><a name="sec-cos-group-emptiable" id="sec-cos-group-emptiable" shape="rect"></a>3.9.6.3 Particle Emptiable</h5><p>The following constraint defines a relation appealed
  to elsewhere in this specification.</p><div class="constraintnote"><a id="cos-group-emptiable" name="cos-group-emptiable" shape="rect"></a><b>Schema Component Constraint: Particle Emptiable</b><br clear="none" /><div class="constraint"><div class="p"><span class="termdef"><a name="cd-emptiable" id="cd-emptiable" title="" shape="rect">[Definition:]&#160;&#160;</a>For a particle to be
<b>emptiable</b></span>
   <b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p">Its <a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> is <code>0</code>.</span></div>
<div class="clnumber">2 <span class="p">Its <a href="#p-term" class="propref" shape="rect">{term}</a> is a group and the minimum part of the
effective total range of that group, as defined by <a href="#cos-seq-range" shape="rect">Effective Total Range (<b><i>all</i></b> and <b><i>sequence</i></b>) (&#167;3.8.6.5)</a> (if
the group is <b><i>all</i></b> or <b><i>sequence</i></b>) or 
<a href="#cos-choice-range" shape="rect">Effective Total Range (<b><i>choice</i></b>) (&#167;3.8.6.6)</a> (if it is <b><i>choice</i></b>), is <code>0</code>.</span></div>
</div>
  </div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cParticles" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cIdentity-constraint_Definitions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="Wildcards" id="Wildcards" shape="rect"></a>3.10 Wildcards</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.1 <a href="#Wildcard_details" shape="rect">The Wildcard Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.2 <a href="#declare-openness" shape="rect">XML Representation of Wildcard Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.2.1 <a href="#dcl.wc.p" shape="rect">Mapping from
       
       &lt;any&gt; to a Particle</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.2.2 <a href="#dcl.wc.wc" shape="rect">Mapping from
       
       &lt;any&gt;
       and
       
       &lt;anyAttribute&gt;
       to a Wildcard Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.3 <a href="#sec-src-wildcard" shape="rect">Constraints on XML Representations of Wildcards</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.4 <a href="#sec-cvc-w" shape="rect">Wildcard Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.4.1 <a href="#sec-cvc-wildcard" shape="rect">Item Valid (Wildcard)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.4.2 <a href="#sec-cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.4.3 <a href="#sec-cvc-wildcard-namespace" shape="rect">Wildcard allows Namespace Name</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.5 <a href="#sec-sic-w" shape="rect">Wildcard Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.6 <a href="#coss-wildcard" shape="rect">Constraints on Wildcard Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.6.1 <a href="#sec-w-props-correct" shape="rect">Wildcard Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.6.2 <a href="#sec-cos-ns-subset" shape="rect">Wildcard Subset</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.6.3 <a href="#sec-cos-aw-union" shape="rect">Attribute Wildcard Union</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.10.6.4 <a href="#sec-cos-aw-intersect" shape="rect">Attribute Wildcard Intersection</a><br clear="none" />
</div><p>In order to exploit the full potential for extensibility offered by XML
plus namespaces, more provision is needed than DTDs allow for targeted flexibility in content
models and attribute declarations.  A wildcard provides for <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of
attribute and element information items dependent on their namespace
names
and optionally on their local names.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:any processContents="skip"/&gt;

&lt;xs:any namespace="##other" processContents="lax"/&gt;

&lt;xs:any namespace="http://www.w3.org/1999/XSL/Transform"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        notQName="xsl:comment xsl:fallback"/&gt;

<a name="anchor6013a" id="anchor6013a" shape="rect"></a>&lt;xs:any notNamespace="##targetNamespace ##local"/&gt;

&lt;xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/&gt;</pre></div><div class="exampleWrapper">
<div class="p">XML representations of the four basic types of wildcard, plus one attribute wildcard.</div></div></div><div class="div3">
<h4><a name="Wildcard_details" id="Wildcard_details" shape="rect"></a>3.10.1 The Wildcard Schema Component</h4><p>The wildcard schema component has the following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="w" id="w" shape="rect">Wildcard</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="w-annotations" shape="rect" id="w-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="w-namespace_constraint" shape="rect" id="w-namespace_constraint"></a><div class="pdName"><span class="propdef">{namespace constraint}</span></div>
<div class="pdDef">
A  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#" class="compref" shape="rect">Namespace    Constraint</a> property record.  Required.</div>
</div>
<div class="propDefn"><a name="w-process_contents" shape="rect" id="w-process_contents"></a><div class="pdName"><span class="propdef">{process contents}</span></div>
<div class="pdDef">
One of {<span class="enumval">skip</span>, <span class="enumval">strict</span>, <span class="enumval">lax</span>}.  Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="nc" id="nc" shape="rect">Namespace Constraint</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="nc-variety" shape="rect" id="nc-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">any</span>, <span class="enumval">enumeration</span>, <span class="enumval">not</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="nc-namespaces" shape="rect" id="nc-namespaces"></a><div class="pdName"><span class="propdef">{namespaces}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>A set each of whose members is either an xs:anyURI value or 
     the distinguished value
     <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.  Required.</p></div>
</div>
</div>
<div class="propDefn"><a name="nc-disallowed_names" shape="rect" id="nc-disallowed_names"></a><div class="pdName"><span class="propdef">{disallowed names}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>A set each of whose members is either an xs:QName value or
     the keyword <b><i>defined</i></b>
     or the keyword <b><i>sibling</i></b>.  Required.</p></div>
</div>
</div>
</div></div>
</div>
</div>
<div class="block"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a> provides for
      <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of attribute and element items that:
      <ol class="enumar"><li><div class="p">(<a href="#nc-variety" class="propref" shape="rect">{variety}</a>
	 <b><i>any</i></b>) have any namespace or are not
	 namespace-qualified;</div></li><li><div class="p">(<a href="#nc-variety" class="propref" shape="rect">{variety}</a> <b><i>not</i></b> and
	 <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> a set whose members are either namespace names or
	 <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>) have any namespace
	 other than the specified namespaces and/or, if <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> is included in the set, are
	 namespace-qualified;
	 (see this <a href="#anchor6013a" shape="rect">example</a>, which accepts 
	  only namespace-qualified names distinct from the target namespace; the 
	  "<code>##local</code>" in the schema document 
	  maps to the value <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> in the
	  <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>
	  property)</div></li><li><div class="p">(<a href="#nc-variety" class="propref" shape="rect">{variety}</a>
	  <b><i>enumeration</i></b> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> a set
	 whose members are either namespace names or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>) have any of the specified
	 namespaces and/or, if <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> is included in the set, are
	 unqualified.</div></li><li><div class="p">(<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>  contains
	  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
	  members) have any <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
	 other than the specified names.</div></li><li><div class="p">
	 (<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> contains the keyword <b><i>defined</i></b>) have any
	 <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> 
	 other than those matching the
	 names of global element or attribute declarations.
	</div></li><li><div class="p">
	 (<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> contains the keyword <b><i>sibling</i></b>) have
	 any <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> other than those
	 matching the names of element or attribute declarations in
	 the containing complex type definition.
	</div></li></ol></div><div class="block"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> controls the impact on <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
of the information items allowed by wildcards, as follows:
     <div class="glist"><div class="gitem"><div class="giLabel">strict</div><div class="giDef"><div class="p">There <span class="rfc2119">must</span> be a top-level declaration for the item
available, or the item <span class="rfc2119">must</span> have an <code>xsi:type</code>, and the
item <span class="rfc2119">must</span> be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> as
appropriate.</div></div></div><div class="gitem"><div class="giLabel">skip</div><div class="giDef"><div class="p">No constraints at all:  the item <span class="rfc2119">must</span> simply be well-formed XML.</div></div></div><div class="gitem"><div class="giLabel">lax</div><div class="giDef"><div class="p">If the item has a uniquely
determined declaration available, it <span class="rfc2119">must</span> be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
that 
declaration, that is, <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a>
if you can, don't worry if you can't.</div></div></div></div>
    </div><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#w-annotations" class="propref" shape="rect">{annotations}</a> property.</p><div class="notice"><p><b>Editorial Note: </b><span style="color: red">Priority Feedback Request</span></p><p style="color: black;"><span class="edtext">The keywords
       <b><i>defined</i></b> and
	<b><i>sibling</i></b> allow a kind of wildcard which matches only
       elements not declared in the current schema or contained
	 within the current complex type,
	respectively.  They are
       new in this version of this specification. The Working Group is
       uncertain whether their value outweighs their
       liabilities; we solicit input from implementors and users of
       this specification as to whether they should be retained or not.</span></p></div></div><div class="div3">
<h4><a name="declare-openness" id="declare-openness" shape="rect"></a>3.10.2 XML Representation of Wildcard Schema Components</h4><p>The XML representation for a wildcard schema component is an
      <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> or <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> element
      information item.    </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>any</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-any" name="element-any" shape="rect">&lt;any</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;maxOccurs = 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a> | <var>unbounded</var>)
 &#160;:&#160;1<br clear="none" />&#160;&#160;minOccurs = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#nonNegativeInteger" shape="rect">nonNegativeInteger</a>&#160;:&#160;1<br clear="none" />&#160;&#160;namespace = 
  
  ((<var>##any</var> | <var>##other</var>) | List of 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##targetNamespace</var> | <var>##local</var>))
 )
 <br clear="none" />&#160;&#160;notNamespace = List of 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##targetNamespace</var> | <var>##local</var>))
 <br clear="none" />&#160;&#160;notQName = List of 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> | (<var>##defined</var> | <var>##definedSibling</var>))
 <br clear="none" />&#160;&#160;processContents = (<var>lax</var> | <var>skip</var> | <var>strict</var>)&#160;:&#160;strict<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/any&gt;</p></div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>anyAttribute</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-anyAttribute" name="element-anyAttribute" shape="rect">&lt;anyAttribute</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;namespace = 
  
  ((<var>##any</var> | <var>##other</var>) | List of 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##targetNamespace</var> | <var>##local</var>))
 )
 <br clear="none" />&#160;&#160;notNamespace = List of 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##targetNamespace</var> | <var>##local</var>))
 <br clear="none" />&#160;&#160;notQName = List of 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> | <var>##defined</var>)
 <br clear="none" />&#160;&#160;processContents = (<var>lax</var> | <var>skip</var> | <var>strict</var>)&#160;:&#160;strict<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/anyAttribute&gt;</p></div></div><p id="any_p1">An <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> information item
       corresponds both to a wildcard component and to
       a particle containing that wildcard
      (unless <code>minOccurs=maxOccurs=0</code>, in which case the
      item corresponds to no component at 
      all).
     The mapping rules are given in the following two subsections.
     As always, the mapping rules
     given here apply after, not before, the appropriate
     <a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>.</p><div class="div4">
<h5><a name="dcl.wc.p" id="dcl.wc.p" shape="rect"></a>3.10.2.1 Mapping from
       
       &lt;any&gt; to a Particle</h5><p>The mapping from an <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> information item to a particle
      is as follows.  
     </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Particle_details" shape="rect">Particle</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>minOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a></div><div class="mapRepr"><b><i>unbounded</i></b>, if 
	
	<code>maxOccurs</code> = <b><i>unbounded</i></b>, 
	otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>maxOccurs</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise
	<code>1</code>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-term" class="propref" shape="rect">{term}</a></div><div class="mapRepr">A wildcard as given
	below.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#p-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
	The same annotations as the <a href="#w-annotations" class="propref" shape="rect">{annotations}</a> of the wildcard. See below.
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div4">
<h5><a name="dcl.wc.wc" id="dcl.wc.wc" shape="rect"></a>3.10.2.2 Mapping from
       
       &lt;any&gt;
       and
       
       &lt;anyAttribute&gt;
       to a Wildcard Component</h5><p>The mapping from an <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> information item to a wildcard component 
      is as follows.  This mapping is also used for mapping 
      <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a> information items to wildcards,
      although in some cases the result of the mapping is further
      modified, as specified in the rules for 
      <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> and
      <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>.
     </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Wildcard_details" shape="rect">Wildcard</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a></div><div class="mapRepr"> A <a href="#nc" class="compref" shape="rect">Namespace Constraint</a> with
	 the following properties:
	<div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#nc-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">
	  the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
	     present, <b>then </b>
	     the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b><code>namespace</code> 
		 = <code>"##any"</code>, <b>then </b><b><i>any</i></b>;</div><div class="clnumber">1.2 <b>If </b><code>namespace</code>
		 = <code>"##other"</code>, <b>then </b><b><i>not</i></b>;</div><div class="clnumber">1.3 <b>otherwise </b><b><i>enumeration</i></b>;</div></div>
	    </div><div class="clnumber">2 <b>If </b>the <code>notNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
	     is present, <b>then </b>
	     <b><i>not</i></b>;
	     
	    </div><div class="clnumber">3 <b>otherwise </b>(neither <code>namespace</code> nor
	     <code>notNamespace</code> is present) <b><i>any</i></b>.</div></div>
	 </div></div><div class="pvpair"><div class="pvProp"><a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a></div><div class="pvVal">
	  the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>neither <code>namespace</code> nor
	     <code>notNamespace</code> is present, <b>then </b>the empty set;</div><div class="clnumber">2 <b>If </b> 
	      <code>namespace</code> = <code>"##any"</code>, <b>then </b>the empty set;</div><div class="clnumber">3 <b>If </b><code>namespace</code> 
	      = <code>"##other"</code>, <b>then </b>a set consisting of
	     <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
	     and, if the <code>targetNamespace</code> [attribute] of
	     the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor element
	     information item is present, its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>;</div><div class="clnumber">4 <b>otherwise </b>a set whose members are namespace
	     names corresponding to the space-delimited substrings of
	     the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>namespace</code> or
	     <code>notNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (whichever is
	     present), except
      <div class="constraintlist"><div class="clnumber">4.1 <span class="p">if one such substring is
		<code>##targetNamespace</code>, the corresponding
		member is the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
		<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the
		<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor
		element information item if present, otherwise
		<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">4.2 <span class="p">if one such substring is <code>##local</code>, the
		corresponding member is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</span></div>
</div>
	    </div></div>
	 </div></div><div class="pvpair"><div class="pvProp"><a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a></div><div class="pvVal">
	  If the <code>notQName</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
	   present, then a set whose members 
	  correspond to the items in the
	  <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>notQName</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, 
	  as follows.
	   
	  <ul><li><div class="p">If the item is a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
	     value (i.e. an <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>), then that 
	     <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
	     value is a member of the set.</div></li><li><div class="p">If the item is the token "<code>##defined</code>", 
	     then the keyword <b><i>defined</i></b> is a member of the set.</div></li><li><div class="p">If the item is the token "<code>##definedSibling</code>", 
	     then the keyword <b><i>sibling</i></b> is a member of the set.</div></li></ul>
	  If the <code>notQName</code> 
	   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is not present, then 
	  the empty set.
	 </div></div></div>
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#w-process_contents" class="propref" shape="rect">{process contents}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>processContents</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present,
	otherwise <b><i>strict</i></b>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#w-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">  The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
	 <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a> element, as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>. 
	<div class="note"><div class="p"><b>Note:</b> 
  When this rule is used for an attribute wildcard (see <a href="#declare-type" shape="rect">XML Representation of Complex Type Definition Schema Components (&#167;3.4.2)</a>), the <a href="#w-annotations" class="propref" shape="rect">{annotations}</a> is the
	  <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>
	  element.
	 </div></div>
       </div></div></div><p>Wildcards are subject to the same ambiguity constraints
      (<a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a>) as other content model
      particles:
      If an instance element could match one
      of two wildcards, within the content model of a type, that model
      is in error.</p></div></div><div class="div3">
<h4><a name="sec-src-wildcard" id="sec-src-wildcard" shape="rect"></a>3.10.3 Constraints on XML Representations of Wildcards</h4><div class="constraintnote"><a id="src-wildcard" name="src-wildcard" shape="rect"></a><b>Schema Representation Constraint: Wildcard Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-any" class="eltref" shape="rect">&lt;any&gt;</a>
       and <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>
       element information items by the schema for schema documents, <code>namespace</code> and
	<code>notNamespace</code> attributes <span class="rfc2119">must not</span> both be
	present.
       
   </div></div></div></div><div class="div3">
<h4><a name="sec-cvc-w" id="sec-cvc-w" shape="rect"></a>3.10.4 Wildcard Validation Rules</h4><div class="div4">
<h5><a name="sec-cvc-wildcard" id="sec-cvc-wildcard" shape="rect"></a>3.10.4.1 Item Valid (Wildcard)</h5><div class="constraintnote"><a id="cvc-wildcard" name="cvc-wildcard" shape="rect"></a><b>Validation Rule: Item Valid (Wildcard)</b><br clear="none" /><div class="constraint"><div class="p"><a name="anchor6159-1" id="anchor6159-1" shape="rect"></a>
      For an element or attribute information item <var>I</var> to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a wildcard
<var>W</var>
      <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>I</var> is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to
         <var>W</var>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>, as defined in
         <a href="#cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name (&#167;3.10.4.2)</a>.</span></div>
<div class="clnumber">2 <b>If </b><var>W</var>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>
         contains the keyword <b><i>defined</i></b>, <b>then </b><b>both</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b><var>W</var> is an element wildcard (i.e., <var>W</var> appears in a
           content model), <b>then </b>the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>I</var> does not <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a>
           to an element declaration. (Informally, no such top-level element is
           declared in the schema.)</div><div class="clnumber">2.2 <b>If </b><var>W</var> is an attribute wildcard, <b>then </b>the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>I</var> does not <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a>
           to an attribute declaration.</div></div></div><div class="clnumber">3 <b>If </b><b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p"><var>W</var>.<a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>
           contains the keyword <b><i>sibling</i></b>;</span></div>
<div class="clnumber">3.2 <span class="p"><var>W</var> is an element wildcard</span></div>
<div class="clnumber">3.3 <span class="p"><var>I</var> is an element information item</span></div>
<div class="clnumber">3.4 <span class="p"><var>I</var> has a <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[parent]</a> <var>P</var> that is
           also an element information item</span></div>
<div class="clnumber">3.5 <span class="p"><var>I</var> and <var>P</var> have the same <a href="#e-validation_context" class="propref" shape="rect">[validation context]</a></span></div>
<div class="clnumber">3.6 <span class="p"><var>P</var> has an <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> <var>T</var> (which is always a complex
           type and contains <var>W</var> in its <a href="#key-contentModel" class="termref" shape="rect"><span class="arrow">&#183;</span>content model<span class="arrow">&#183;</span></a>)</span></div>
</div> <b>then </b>the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>I</var> does not <a href="#key-en-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> any
         element declaration <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a>
         in the content model of <var>T</var>, whether
         <a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly<span class="arrow">&#183;</span></a>,
         <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly<span class="arrow">&#183;</span></a>, or
         <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>.<div class="p">Informally, the keyword <b><i>sibling</i></b> disallows any element declared as
         a possible sibling of the wildcard <var>W</var>.</div></div></div>
     </div></div></div><p>When an element or attribute information
item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a wildcard and the preceding constraint
(<a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>) is satisfied, then the item has no
<a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>.  Its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration, if any, is found by matching its
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as described in <a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance) (&#167;3.17.6.3)</a>.
Note that QName resolution is performed only if the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to
a <b><i>strict</i></b> or <b><i>lax</i></b> wildcard; if the wildcard has a
<a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> property of <b><i>skip</i></b>, 
then the item has no <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration.</p><p><span class="termdef"><a name="key-skipped" id="key-skipped" title="" shape="rect">[Definition:]&#160;&#160;</a>
      An element or attribute information item is <b>skipped</b> if it
      is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b> wildcard or if one of its ancestor
      elements is.
     </span></p></div><div class="div4">
<h5><a name="sec-cvc-wildcard-name" id="sec-cvc-wildcard-name" shape="rect"></a>3.10.4.2 Wildcard allows Expanded Name</h5><div class="constraintnote"><a id="cvc-wildcard-name" name="cvc-wildcard-name" shape="rect"></a><b>Validation Rule: Wildcard allows Expanded Name</b><br clear="none" /><div class="constraint"><div class="p">For an <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <var>E</var>, i.e. a
	(namespace name, local name) pair, 
	to be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a 
	namespace constraint <var>C</var>
	<b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The namespace name is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to 
	   <var>C</var>, as defined in <a href="#cvc-wildcard-namespace" shape="rect">Wildcard allows Namespace Name (&#167;3.10.4.3)</a>;</span></div>
<div class="clnumber">2 <span class="p"><var>C</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> does not
	   contain <var>E</var>.</span></div>
</div>
       </div></div></div></div><div class="div4">
<h5><a name="sec-cvc-wildcard-namespace" id="sec-cvc-wildcard-namespace" shape="rect"></a>3.10.4.3 Wildcard allows Namespace Name</h5><div class="constraintnote"><a id="cvc-wildcard-namespace" name="cvc-wildcard-namespace" shape="rect"></a><b>Validation Rule: Wildcard allows Namespace Name</b><br clear="none" /><div class="constraint"><div class="p">For a value <var>V</var>
        which is either a namespace name or 
	<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> to be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to 
	a 
 namespace
 constraint 
 <var>C</var>	(the
	value of a <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>)
	<b>one</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>C</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>.</span></div>
<div class="clnumber">2 <span class="p"><var>C</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b>,
	    and <var>V</var> is not identical to any of the members of 
	   <var>C</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
<div class="clnumber">3 <span class="p"><var>C</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> 
	   = <b><i>enumeration</i></b>, and <var>V</var> is
	   identical to one of the members of <var>C</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
</div>
       </div></div></div></div></div><div class="div3">
<h4><a name="sec-sic-w" id="sec-sic-w" shape="rect"></a>3.10.5 Wildcard Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-wildcard" id="coss-wildcard" shape="rect"></a>3.10.6 Constraints on Wildcard Schema Components</h4><div class="div4">
<h5><a name="sec-w-props-correct" id="sec-w-props-correct" shape="rect"></a>3.10.6.1 Wildcard Properties Correct</h5><p>All wildcards (see <a href="#Wildcards" shape="rect">Wildcards (&#167;3.10)</a>) <span class="rfc2119">must</span> satisfy
       the following constraint.</p><div class="constraintnote"><a id="w-props-correct" name="w-props-correct" shape="rect"></a><b>Schema Component Constraint: Wildcard Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a wildcard are as
	  described in the property tableau in
	  <a href="#Wildcard_details" shape="rect">The Wildcard Schema Component (&#167;3.10.1)</a>, modulo the impact of
	  <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">If <a href="#nc-variety" class="propref" shape="rect">{variety}</a> is <b><i>not</i></b>,
	  <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> has at least one member.</span></div>
<div class="clnumber">3 <span class="p">If <a href="#nc-variety" class="propref" shape="rect">{variety}</a> is <b><i>any</i></b>, <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> is
	  empty.</span></div>
<div class="clnumber">4 <span class="p">The namespace name of each <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> member
	  in <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> is allowed by the
	  <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>, as defined in
	  <a href="#cvc-wildcard-namespace" shape="rect">Wildcard allows Namespace Name (&#167;3.10.4.3)</a>.</span></div>
<div class="clnumber">5 <span class="p">Attribute wildcards do not contain <b><i>sibling</i></b> in their
	  <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>.</span></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-ns-subset" id="sec-cos-ns-subset" shape="rect"></a>3.10.6.2 Wildcard Subset</h5><p>The following constraints define a relation appealed to
       elsewhere in this specification.</p><div class="constraintnote"><a id="cos-ns-subset" name="cos-ns-subset" shape="rect"></a><b>Schema Component Constraint: Wildcard Subset</b><br clear="none" /><div class="constraint"><div class="p"><span class="termdef"><a name="key-wc_subset" id="key-wc_subset" title="" shape="rect">[Definition:]&#160;&#160;</a> Given two <a href="#nc" class="compref" shape="rect">Namespace Constraint</a>s <b>sub</b> and <b>super</b>,
	 <b>sub</b> is a  <b>wildcard subset</b> of <b>super</b>
	 if and only if</span>
	<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">1 <span class="p"><b>super</b>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
	   <b><i>any</i></b>.</span></div>
<div class="clnumber">2 <span class="p">Both <b>sub</b> and <b>super</b>
	   have 
	   <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>enumeration</i></b>, and 
	   <b>super</b>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> 
	   is a superset of <b>sub</b>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
<div class="clnumber">3 <span class="p"><b>sub</b>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
	   <b><i>enumeration</i></b>, 
	   <b>super</b>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = 
	   <b><i>not</i></b>, and the
	   <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of the two are disjoint.</span></div>
<div class="clnumber">4 <span class="p">Both <b>sub</b> and <b>super</b>
	   have 
	   <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b>, and 
	   <b>super</b>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> is a subset of 
	   <b>sub</b>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
</div>
       </div><div class="p"><a name="anchor6161" id="anchor6161" shape="rect"></a>
        
        And <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">Each <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> member
	   of <b>super</b>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> is not
	   allowed
	   by <b>sub</b>, as defined in <a href="#cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name (&#167;3.10.4.2)</a>.</span></div>
<div class="clnumber">2 <span class="p">
	   If <b>super</b>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> contains
	   <b><i>defined</i></b>, then 
	   <b>sub</b>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> also contains
	   <b><i>defined</i></b>.
	  </span></div>
<div class="clnumber">3 <span class="p">
	  If <b>super</b>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> contains <b><i>sibling</i></b>, then
	  <b>sub</b>'s <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> also contains <b><i>sibling</i></b>.
	  
	  </span></div>
</div>
       </div></div></div></div><div class="div4">
<h5><a name="sec-cos-aw-union" id="sec-cos-aw-union" shape="rect"></a>3.10.6.3 Attribute Wildcard Union</h5><div class="constraintnote"><a id="cos-aw-union" name="cos-aw-union" shape="rect"></a><b>Schema Component Constraint: Attribute Wildcard Union</b><br clear="none" /><div class="constraint"><div class="p">
	<span class="termdef"><a name="key-wc_union" id="key-wc_union" title="" shape="rect">[Definition:]&#160;&#160;</a>
	  
	 Given three <a href="#nc" class="compref" shape="rect">Namespace Constraint</a>s <var>O</var>, <var>O1</var>, and <var>O2</var>, <var>O</var> is
	 the 
	  <b>wildcard union</b> of <var>O1</var> and
	 <var>O2</var> if and only if, first, the <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and
	 <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>, and, second, the <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> of
	 <var>O</var> are  consistent
	 with <var>O</var> being the union of <var>O1</var> and <var>O2</var>, as that is defined
	 below. </span></div><div class="p">
	The <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of <var>O</var> are consistent
	with <var>O</var> being the wildcard union of <var>O1</var> and <var>O2</var> if and
	only if
	<b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>O</var>, <var>O1</var>, and <var>O2</var> all have
	    the same <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
<div class="clnumber">2 <span class="p">Either <var>O1</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
	    <b><i>any</i></b> or <var>O2</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
	   <b><i>any</i></b>, and <var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>.</span></div>
<div class="clnumber">3 <span class="p"><var>O</var>, <var>O1</var>, and <var>O2</var> all have
	    <a href="#nc-variety" class="propref" shape="rect">{variety}</a> <b><i>enumeration</i></b>, and
	   <var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> is the union of
	   <var>O1</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>
	   and <var>O2</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.</span></div>
<div class="clnumber">4 <!--* no span class='p' possible here *--><var>O1</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <var>O2</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
	    <b><i>not</i></b>, and
	   <b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">4.1 <span class="p">
	      The intersection of the <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of <var>O1</var> and <var>O2</var> is the
	      empty set, and <var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>.
	     </span></div>
<div class="clnumber">4.2 <span class="p">
	      <var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
	      <b><i>not</i></b>, and  <var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>  is the non-empty
	      intersection of <var>O1</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> and
	       <var>O2</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.
	     </span></div>
</div>
	  </div>
<div class="clnumber">5 <!--* no span class='p' possible here *-->Either <var>O1</var> or <var>O2</var> has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>
	   = <var>S1</var>, and
	   the other has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>enumeration</i></b> and
	   <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> = <var>S2</var>, and
	   <b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">5.1 <span class="p">
	      The set difference <var>S1</var> minus <var>S2</var> is the empty set, and
	      <var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>.
	     </span></div>
<div class="clnumber">5.2 <span class="p">
	      <var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b> and <var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> is
	      the non-empty set difference <var>S1</var> minus <var>S2</var>.
	     </span></div>
</div>
	  </div>
</div>
       </div><div class="p">
	The <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> property of <var>O</var> is consistent with <var>O</var> being
	the wildcard union of <var>O1</var> and
	<var>O2</var> if and only if <var>O</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> includes
	all and only the
	following:<div class="constraintlist"><div class="clnumber">1 <span class="p">
	   <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> members of
	   <var>O1</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> that are not allowed by
	   <var>O2</var>, as
	   defined in
	   <a href="#cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name (&#167;3.10.4.2)</a>.</span></div>
<div class="clnumber">2 <span class="p"><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
	   members of <var>O2</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> that are not
	   allowed by <var>O1</var>.
	  </span></div>
<div class="clnumber">3 <span class="p">
	   The keyword <b><i>defined</i></b> if it is contained in both
	   <var>O1</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> and
	    <var>O2</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>.
	  </span></div>
</div>
</div><div class="note"><div class="p"><b>Note:</b> When one of the wildcards has
<b><i>defined</i></b> in <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> and the other does not, then
<b><i>defined</i></b> is <em>not</em> included in the union. This may allow
QNames that are not allowed by either wildcard. This is to ensure
that all unions are expressible. If <b><i>defined</i></b> is intended to be
included, then it is necessary to have it in both wildcards.</div></div><div class="p">In the case where there are more than two <a href="#nc" class="compref" shape="rect">Namespace Constraint</a>s to be combined, the wildcard
union is determined by identifying the wildcard union of two
of them as above, then the wildcard union of the result with
the third, and so on as required.
    
   </div></div></div></div><div class="div4">
<h5><a name="sec-cos-aw-intersect" id="sec-cos-aw-intersect" shape="rect"></a>3.10.6.4 Attribute Wildcard Intersection</h5><div class="constraintnote"><a id="cos-aw-intersect" name="cos-aw-intersect" shape="rect"></a><b>Schema Component Constraint: Attribute Wildcard Intersection</b><br clear="none" /><div class="constraint"><div class="p"><span class="termdef"><a name="key-wc_intersect" id="key-wc_intersect" title="" shape="rect">[Definition:]&#160;&#160;</a>
Given three <a href="#nc" class="compref" shape="rect">Namespace Constraint</a>s
<var>O</var>, <var>O1</var>, and <var>O2</var>, <var>O</var> is the 

<b>wildcard intersection</b>
of <var>O1</var> and <var>O2</var> if and only if
both its <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> properties, on the
one hand, and its <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> property, on the other, are

consistent with <var>O</var> being the intersection
of <var>O1</var> and <var>O2</var>, as that is defined below.</span></div><div class="p">
The <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of <var>O</var> are consistent
with <var>O</var> being the wildcard
intersection of <var>O1</var> and <var>O2</var> if and only if
<b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>O</var>, <var>O1</var>, and <var>O2</var> have 
the same <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a>.
</span></div>
<div class="clnumber">2 <span class="p">Either <var>O1</var> or <var>O2</var> has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>
and <var>O</var> has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> identical
to those of the other.</span></div>
<div class="clnumber">3 <span class="p"><var>O</var>, <var>O1</var>, and <var>O2</var> all have <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>enumeration</i></b>,
and <var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> 
is the intersection of the
<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of <var>O1</var> and <var>O2</var>.</span></div>
<div class="clnumber">4 <span class="p"><var>O</var>, <var>O1</var>, and <var>O2</var> all have
<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b>,
and <var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> 
is the union of the
<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> of <var>O1</var> and <var>O2</var>.</span></div>
<div class="clnumber">5 <span class="p">Either <var>O1</var> or <var>O2</var> has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b> 
and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> = <var>S1</var> and the other has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> =
<b><i>enumeration</i></b> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> = <var>S2</var>,
and <var>O</var>.<a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>enumeration</i></b> and 
<var>O</var>.<a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> = the 
set difference <var>S2</var> minus <var>S1</var>.</span></div>
</div>
</div><div class="p">
The <a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a> property of <var>O</var> is consistent
with <var>O</var> being the wildcard
intersection of <var>O1</var> and <var>O2</var> if and only if
<var>O</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>
includes all and only the following:<div class="constraintlist"><div class="clnumber">1 <span class="p">
  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
members of <var>O1</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>

whose namespace names
are allowed by <var>O2</var>, as defined in
<a href="#cvc-wildcard-namespace" shape="rect">Wildcard allows Namespace Name (&#167;3.10.4.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">
 <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
members of <var>O2</var>.<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>

whose namespace names
are allowed by <var>O1</var>.
</span></div>
<div class="clnumber">3 <span class="p">
The keyword <b><i>defined</i></b> if it is a member of either
<a href="#nc-disallowed_names" class="propref" shape="rect">{disallowed names}</a>.
</span></div>
</div></div><div class="p">In the case where there are more than two <a href="#nc" class="compref" shape="rect">Namespace Constraint</a>s to be combined, the wildcard
intersection is determined by identifying the wildcard intersection of two
of them as above, then the wildcard intersection of the result with
the third, and so on as required.
</div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#Wildcards" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cTypeAlternative" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cIdentity-constraint_Definitions" id="cIdentity-constraint_Definitions" shape="rect"></a>3.11 Identity-constraint Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.1 <a href="#Identity-constraint_Definition_details" shape="rect">The Identity-constraint Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.2 <a href="#declare-key" shape="rect">XML Representation of Identity-constraint Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.3 <a href="#sec-src-identity-constraint" shape="rect">Constraints on XML Representations of Identity-constraint Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.4 <a href="#sec-cvc-identity-constraint" shape="rect">Identity-constraint Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.5 <a href="#sec-sic-key" shape="rect">Identity-constraint Definition Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.6 <a href="#coss-identity-constraint" shape="rect">Constraints on Identity-constraint Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.6.1 <a href="#sec-c-props-correct" shape="rect">Identity-constraint Definition Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.6.2 <a href="#sec-c-selector-xpath" shape="rect">Selector Value OK</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.11.6.3 <a href="#sec-c-fields-xpaths" shape="rect">Fields Value OK</a><br clear="none" />
</div><p>Identity-constraint definition components provide for uniqueness and
reference constraints with respect to the contents of multiple elements and attributes.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:key name="fullName"&gt;
 &lt;xs:selector xpath=".//person"/&gt;
 &lt;xs:field xpath="forename"/&gt;
 &lt;xs:field xpath="surname"/&gt;
&lt;/xs:key&gt;

&lt;xs:keyref name="personRef" refer="fullName"&gt;
 &lt;xs:selector xpath=".//personPointer"/&gt;
 &lt;xs:field xpath="@first"/&gt;
 &lt;xs:field xpath="@last"/&gt;
&lt;/xs:keyref&gt;

&lt;xs:unique name="nearlyID"&gt;
 &lt;xs:selector xpath=".//*"/&gt;
 &lt;xs:field xpath="@id"/&gt;
&lt;/xs:unique&gt;</pre></div><div class="exampleWrapper">
<div class="p">XML representations for the three kinds of identity-constraint definitions.</div></div></div><div class="div3">
<h4><a name="Identity-constraint_Definition_details" id="Identity-constraint_Definition_details" shape="rect"></a>3.11.1 The Identity-constraint Definition Schema Component</h4><p>The identity-constraint definition schema component has the following
properties:
</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="icd" id="icd" shape="rect">Identity-Constraint Definition</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="icd-annotations" shape="rect" id="icd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="icd-name" shape="rect" id="icd-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value.  Required.</div>
</div>
<div class="propDefn"><a name="icd-target_namespace" shape="rect" id="icd-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value.  Optional.</div>
</div>
<div class="propDefn"><a name="icd-identity-constraint_category" shape="rect" id="icd-identity-constraint_category"></a><div class="pdName"><span class="propdef">{identity-constraint category}</span></div>
<div class="pdDef">
One of {<span class="enumval">key</span>, <span class="enumval">keyref</span>, <span class="enumval">unique</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="icd-selector" shape="rect" id="icd-selector"></a><div class="pdName"><span class="propdef">{selector}</span></div>
<div class="pdDef">
An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record. Required.</div>
</div>
<div class="propDefn"><a name="icd-fields" shape="rect" id="icd-fields"></a><div class="pdName"><span class="propdef">{fields}</span></div>
<div class="pdDef">
A sequence of  <a href="#x" class="compref" shape="rect">XPath Expression</a> property records.  </div>
</div>
<div class="propDefn"><a name="icd-referenced_key" shape="rect" id="icd-referenced_key"></a><div class="pdName"><span class="propdef">{referenced key}</span></div>
<div class="pdDef">
An  <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a> component.  
    Required if <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a>
    is <b><i>keyref</i></b>, 
    otherwise (<a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a>
    is <b><i>key</i></b> or <b><i>unique</i></b>) <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.<div class="ownDesc">
<p>If a value is present, its <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> must be
     <b><i>key</i></b> or <b><i>unique</i></b>.</p></div>
</div>
</div>
</div></div>
</div>
</div>
<p>Identity-constraint definitions are identified by their <a href="#icd-name" class="propref" shape="rect">{name}</a> and <a href="#icd-target_namespace" class="propref" shape="rect">{target namespace}</a>;
identity-constraint
definition identities <span class="rfc2119">must</span> be unique within an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>.  See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for the use of component
identifiers when importing one schema into another.</p><div class="block">Informally, <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> identifies the
identity-constraint
definition as playing one of
three roles:
<ul><li><div class="p">(<b><i>unique</i></b>) the
identity-constraint
definition asserts uniqueness, with respect to the content
identified by <a href="#icd-selector" class="propref" shape="rect">{selector}</a>, of the tuples resulting from
evaluation of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> XPath expression(s). </div></li><li><div class="p">(<b><i>key</i></b>) the
identity-constraint
definition asserts uniqueness as for
<b><i>unique</i></b>.  <b><i>key</i></b> further asserts that all selected content
actually has such tuples.</div></li><li><div class="p">(<b><i>keyref</i></b>) the
identity-constraint
definition asserts a correspondence, with respect to the content
identified by <a href="#icd-selector" class="propref" shape="rect">{selector}</a>, of the tuples resulting from
evaluation of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> XPath expression(s), with those of the <a href="#icd-referenced_key" class="propref" shape="rect">{referenced key}</a>. </div></li></ul>
</div><p>These constraints are specified alongside the specification of types for the
attributes and elements involved, i.e. something declared as of type integer
can also serve as a key.  Each constraint declaration has a name, which exists in a
single symbol space for constraints.  The 
equality and inequality
conditions
appealed to in checking these constraints apply to the 
<em>values</em> of
the fields selected, not their
lexical representation, so that for example <code>3.0</code> and <code>3</code>
would be conflicting keys if they were both 
decimal, but non-conflicting if
they were both strings, or one was a string and one a decimal.  
When equality and
identity differ for the simple types involved, all three
forms of identity-constraint test for 
<em>either</em> equality
<em>or</em> identity
of values.
</p><p>Overall the augmentations to XML's <code>ID/IDREF</code> mechanism are:</p><ul><li><div class="p">Functioning as a part of an identity-constraint is in addition to, not instead of,
having a type;</div></li><li><div class="p">Not just attribute values, but also element content and combinations
of values and content can be declared to be unique;</div></li><li><div class="p">Identity-constraints are specified to hold within the scope of particular elements;</div></li><li><div class="p">(Combinations of) attribute values and/or element content can be
declared to be keys, that is, not only unique, but always present and non-nillable;</div></li><li><div class="p">The comparison between <b><i>keyref</i></b> <a href="#icd-fields" class="propref" shape="rect">{fields}</a> and
<b><i>key</i></b> or <b><i>unique</i></b> <a href="#icd-fields" class="propref" shape="rect">{fields}</a> is 
performed
on typed values, not on the lexical representations of those values.</div></li></ul><p><a href="#icd-selector" class="propref" shape="rect">{selector}</a> specifies a restricted XPath
(<a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>) expression relative to
instances of the element being declared.  This <span class="rfc2119">must</span> identify a

sequence of element nodes that are
contained within the declared element
to which the constraint applies.</p><p><a href="#icd-fields" class="propref" shape="rect">{fields}</a> specifies XPath expressions relative to each
element selected by a <a href="#icd-selector" class="propref" shape="rect">{selector}</a>.  
Each
XPath expression in the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> property 
<span class="rfc2119">must</span> identify
a single node (element or attribute), 
whose content or value, which <span class="rfc2119">must</span> be
of a simple type, is used in the constraint.  It is possible to specify an
ordered list of <a href="#icd-fields" class="propref" shape="rect">{fields}</a>s, to cater to multi-field keys,
keyrefs, and uniqueness constraints.
     </p><p>In order to reduce the burden on implementers, in particular
implementers of streaming processors, only restricted subsets of XPath
expressions are allowed in <a href="#icd-selector" class="propref" shape="rect">{selector}</a> and <a href="#icd-fields" class="propref" shape="rect">{fields}</a>.  The details are given in <a href="#coss-identity-constraint" shape="rect">Constraints on Identity-constraint Definition Schema Components (&#167;3.11.6)</a>.</p><div class="note"><div class="p"><b>Note:</b> Provision for multi-field keys etc. goes beyond what is supported by <code>xsl:key</code>.</div></div><div class="note"><div class="p"><b>Note:</b> 
 In version 1.0 of this specification, identity constraints used 
 <a href="#bib-xpath1" shape="rect">[XPath 1.0]</a>. 
They now use <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>.
 
</div></div><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#icd-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-key" id="declare-key" shape="rect"></a>3.11.2 XML Representation of Identity-constraint Definition Schema Components</h4><p>The XML representation for an identity-constraint definition schema
      component is  either a <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>, a <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a> or a <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> element information
      item.  The correspondences between the properties of those
      information items 
      after the appropriate
      <a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
      and the
      properties of the component they
      correspond to are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>unique</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-unique" name="element-unique" shape="rect">&lt;unique</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-selector" class="eltref" shape="rect">selector</a>, <a href="#element-field" class="eltref" shape="rect">field</a>+)?)<br clear="none" />&lt;/unique&gt;</p><p class="element-syntax"><a id="element-key" name="element-key" shape="rect">&lt;key</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-selector" class="eltref" shape="rect">selector</a>, <a href="#element-field" class="eltref" shape="rect">field</a>+)?)<br clear="none" />&lt;/key&gt;</p><p class="element-syntax"><a id="element-keyref" name="element-keyref" shape="rect">&lt;keyref</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;ref = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;refer = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-selector" class="eltref" shape="rect">selector</a>, <a href="#element-field" class="eltref" shape="rect">field</a>+)?)<br clear="none" />&lt;/keyref&gt;</p><p class="element-syntax"><a id="element-selector" name="element-selector" shape="rect">&lt;selector</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>xpath</b> = <em>a subset of XPath expression, see below</em><br clear="none" />&#160;&#160;xpathDefaultNamespace = 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##defaultNamespace</var> | <var>##targetNamespace</var> | <var>##local</var>))
 <br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/selector&gt;</p><p class="element-syntax"><a id="element-field" name="element-field" shape="rect">&lt;field</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>xpath</b> = <em>a subset of XPath expression, see below</em><br clear="none" />&#160;&#160;xpathDefaultNamespace = 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##defaultNamespace</var> | <var>##targetNamespace</var> | <var>##local</var>))
 <br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/field&gt;</p></div></div><p id="xr.idc5.bis">
      If the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is absent, 
       the corresponding schema
       component is as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Identity-constraint_Definition_details" shape="rect">Identity-constraint Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the 
	<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the
 <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
 ancestor 
	element information item if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity- constraint category}</a></div><div class="mapRepr">One of <b><i>key</i></b>, 
	<b><i>keyref</i></b> or
	<b><i>unique</i></b>, depending on the item.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-selector" class="propref" shape="rect">{selector}</a></div><div class="mapRepr">
	
	An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record, as described in 
	section <a href="#declare-assertion" shape="rect">XML Representation of Assertion Schema Components (&#167;3.13.2)</a>, with
	<a href="#element-selector" class="eltref" shape="rect">&lt;selector&gt;</a> as the "host element" and
	<code>xpath</code> as the designated
	expression <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
	
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-fields" class="propref" shape="rect">{fields}</a></div><div class="mapRepr">
	
	A sequence of <a href="#x" class="compref" shape="rect">XPath Expression</a> property records, corresponding to the
	<a href="#element-field" class="eltref" shape="rect">&lt;field&gt;</a> element information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, in order,
	following the rules given in <a href="#declare-assertion" shape="rect">XML Representation of Assertion Schema Components (&#167;3.13.2)</a>,
	with <a href="#element-field" class="eltref" shape="rect">&lt;field&gt;</a> as the "host element" 
	and <code>xpath</code> as the designated expression <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
	
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-referenced_key" class="propref" shape="rect">{referenced key}</a></div><div class="mapRepr">If the item is a <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a>, the
	identity-constraint definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the
	<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>refer</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, otherwise 
	<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#icd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
	
	 The <a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the set of elements containing the
	 <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>, <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a>, or <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> element,
	 whichever is present, and the <a href="#element-selector" class="eltref" shape="rect">&lt;selector&gt;</a> and <a href="#element-field" class="eltref" shape="rect">&lt;field&gt;</a>
	 <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if present,
	 as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
	
       </div></div></div><p id="xr.idc7.bis">
      Otherwise (the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is
       present), the corresponding schema component is the identity-constraint definition
       <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
       <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:element name="vehicle"&gt;
 &lt;xs:complexType&gt;
  . . .
  &lt;xs:attribute name="plateNumber" type="xs:integer"/&gt;
  &lt;xs:attribute name="state" type="twoLetterCode"/&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

&lt;xs:element name="state"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="code" type="twoLetterCode"/&gt;
   &lt;xs:element ref="vehicle" maxOccurs="unbounded"/&gt;
   &lt;xs:element ref="person" maxOccurs="unbounded"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;

 &lt;!-- vehicles are keyed by their plate within states --&gt;
 &lt;xs:key name="reg"&gt;
  &lt;xs:selector xpath=".//vehicle"/&gt;
  &lt;xs:field xpath="@plateNumber"/&gt;
 &lt;/xs:key&gt;
&lt;/xs:element&gt;

&lt;xs:element name="root"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   . . .
   &lt;xs:element ref="state" maxOccurs="unbounded"/&gt;
   . . .
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;

 &lt;!-- states are keyed by their code --&gt;
 &lt;xs:key name="state"&gt;
  &lt;xs:selector xpath=".//state"/&gt;
  &lt;xs:field xpath="code"/&gt;
 &lt;/xs:key&gt;

 &lt;xs:keyref name="vehicleState" refer="state"&gt;
  &lt;!-- every vehicle refers to its state --&gt;
  &lt;xs:selector xpath=".//vehicle"/&gt;
  &lt;xs:field xpath="@state"/&gt;
 &lt;/xs:keyref&gt;

 &lt;!-- vehicles are keyed by a pair of state and plate --&gt;
 &lt;xs:key name="regKey"&gt;
  &lt;xs:selector xpath=".//vehicle"/&gt;
  &lt;xs:field xpath="@state"/&gt;
  &lt;xs:field xpath="@plateNumber"/&gt;
 &lt;/xs:key&gt;

 &lt;!-- people's cars are a reference --&gt;
 &lt;xs:keyref name="carRef" refer="regKey"&gt;
  &lt;xs:selector xpath=".//car"/&gt;
  &lt;xs:field xpath="@regState"/&gt;
  &lt;xs:field xpath="@regPlate"/&gt;
 &lt;/xs:keyref&gt;

&lt;/xs:element&gt;

&lt;xs:element name="person"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   . . .
   &lt;xs:element name="car"&gt;
    &lt;xs:complexType&gt;
     &lt;xs:attribute name="regState" type="twoLetterCode"/&gt;
     &lt;xs:attribute name="regPlate" type="xs:integer"/&gt;
    &lt;/xs:complexType&gt;
   &lt;/xs:element&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;</pre></div><div class="exampleWrapper">
<div class="p">A <code>state</code> element is defined, which
contains a <code>code</code> child and some <code>vehicle</code> and <code>person</code>
children.  A <code>vehicle</code> in turn has a <code>plateNumber</code> attribute,
which is an integer, and a <code>state</code> attribute.  State's
<code>code</code>s are a key for them within the document.  Vehicle's
<code>plateNumber</code>s are a key for them within states, and
<code>state</code> and
<code>plateNumber</code> is asserted to be a <b><i>key</i></b> for
<code>vehicle</code> within the document as a whole.  Furthermore, a <code>person</code> element has
an empty <code>car</code> child, with <code>regState</code> and
<code>regPlate</code> attributes, which are then asserted together to refer to
<code>vehicle</code>s via the <code>carRef</code> constraint.  The requirement
that a <code>vehicle</code>'s <code>state</code> match its containing
<code>state</code>'s <code>code</code> is not expressed here.</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:element name="stateList"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
   . . .
   &lt;xs:element name="state" maxOccurs="unbounded"&gt;
    &lt;xs:complexType&gt;
     &lt;xs:sequence&gt;
      . . .
      &lt;xs:element name="code" type="twoLetterCode"/&gt;
      . . .
     &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
   &lt;/xs:element&gt;
   . . .
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;

 &lt;xs:key ref="state"/&gt; &lt;!-- reuse the key constraint from the above example --&gt;
&lt;/xs:element&gt;</pre></div><div class="exampleWrapper">
<div class="p">A list of <code>state</code> elements can appear as child elements
       under <code>stateList</code>. A <b><i>key</i></b> constraint can be used to
       ensure that there is no duplicate state <code>code</code>. We already
       defined a <b><i>key</i></b> in the above example for the exact same purpose
       (the key constraint is named "<code>state</code>"). We can reuse it
       directly via the <code>ref</code> attribute on the <code>key</code>
       element.</div></div></div></div><div class="div3">
<h4><a name="sec-src-identity-constraint" id="sec-src-identity-constraint" shape="rect"></a>3.11.3 Constraints on XML Representations of Identity-constraint Definitions</h4><div class="constraintnote"><a id="src-identity-constraint" name="src-identity-constraint" shape="rect"></a><b>Schema Representation Constraint: Identity-constraint Definition Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>, <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a> and <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> element
information items by the schema for schema documents, 
    <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
      One of <code>ref</code> or <code>name</code> is present, but not both.
     </span></div>
<div class="clnumber">2 <span class="p">
      If <code>name</code> is present, then <a href="#element-selector" class="eltref" shape="rect">&lt;selector&gt;</a> appears in
      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>.
     </span></div>
<div class="clnumber">3 <span class="p">
      If <code>name</code> is present on <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a>, then
      <code>refer</code> is also present.
     </span></div>
<div class="clnumber">4 <span class="p">
      If <code>ref</code> is present, then only <code>id</code>
      and <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> are
      allowed to appear together with <code>ref</code>.
     </span></div>
<div class="clnumber">5 <span class="p">
      If <code>ref</code> is present, then the
      <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> of the identity-constraint
      definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the
      <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> matches the name of the
      element information item.
     </span></div>
</div>
   </div></div></div></div><div class="div3">
<h4><a name="sec-cvc-identity-constraint" id="sec-cvc-identity-constraint" shape="rect"></a>3.11.4 Identity-constraint Definition Validation Rules</h4><div class="constraintnote"><a id="cvc-identity-constraint" name="cvc-identity-constraint" shape="rect"></a><b>Validation Rule: Identity-constraint Satisfied</b><br clear="none" /><div class="constraint"><div class="p">For an element information item <var>E</var>
       to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to an identity-constraint
   <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">A data model instance is constructed
 from the input information set, as described in <a href="#bib-xdm" shape="rect">[XDM]</a>.
 The <a href="#icd-selector" class="propref" shape="rect">{selector}</a>, with
 the element node corresponding to <var>E</var> as the
 context node, evaluates to a 
 sequence of element nodes, as defined in
 <a href="#cvc-xpath" shape="rect">XPath Evaluation (&#167;3.13.4.2)</a>.
 
	  <span class="termdef"><a name="key-tns" id="key-tns" title="" shape="rect">[Definition:]&#160;&#160;</a>
	   The <b>target node set</b> is the
	   set of nodes in that sequence, after omitting
	   all element nodes corresponding to element
	   information items that are
	   <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>.</span></span></div>
<div class="clnumber">2 <span class="p">Each node in the <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a> is
either the context node 
or an
element node among its descendants.</span></div>
<div class="clnumber">3 <span class="p"><a name="anchor11716" id="anchor11716" shape="rect"></a> For each node <var>N</var>
in the <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a> and each field <var>F</var> in <a href="#icd-fields" class="propref" shape="rect">{fields}</a>, when <var>N</var> is taken as the context node
<var>F</var> evaluates (as defined in <a href="#cvc-xpath" shape="rect">XPath Evaluation (&#167;3.13.4.2)</a>) to a
sequence of nodes <var>S</var>.  <var>S</var> contains zero or more <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> nodes, at most one node whose <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type
definition is either a simple type definition or a complex type
definition with <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>simple</i></b>,
and no other nodes.
As a consequence, for each field <var>F</var> the sequence <var>S</var> contains at most
one node with a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a> <span class="anonRef">[schema actual
value]</span>.  Call that one node's <span class="anonRef">[schema actual value]</span> <var>V</var>(<var>N</var>,<var>F</var>).  <span class="termdef"><a name="key-ks" id="key-ks" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>key-sequence</b> of <var>N</var></span> is the sequence 
consisting of the values <var>V</var>(<var>N</var>,<var>F</var>), in the order of 
the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> property.</span><div class="note"><div class="p"><b>Note:</b> The use of <span class="anonRef">[schema actual value]</span> in the definition of
   <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key sequence<span class="arrow">&#183;</span></a> above means that
   <b><i>default</i></b> or <b><i>fixed</i></b> value constraints <span class="rfc2119">may</span> play
   a part in <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key sequence<span class="arrow">&#183;</span></a>s.</div></div><div class="note"><div class="p"><b>Note:</b> In some cases, the <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> of node <var>N</var> will be
   shorter than <a href="#icd-fields" class="propref" shape="rect">{fields}</a> in length,
   for example whenever any field evaluates to the empty sequence or to a
   sequence consisting only of <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> or
   <a href="#key-nilled" class="termref" shape="rect"><span class="arrow">&#183;</span>nilled<span class="arrow">&#183;</span></a> nodes.  In
   such a case, the <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> of <var>N</var> does not
   participate in value comparison, because <var>N</var> is not a member of the
   <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a>. See below.</div></div></div>
<div class="clnumber">4 <!--* no span class='p' possible here *-->
	<span class="termdef"><a name="key-qns" id="key-qns" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>qualified node set</b> is the subset
	of the <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a> consisting of those nodes 
	whose <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a>
	has the same length as the <a href="#icd-fields" class="propref" shape="rect">{fields}</a></span>.
	The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">4.1<a id="c-u" name="c-u" shape="rect"> </a><b>If </b>the <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> is <b><i>unique</i></b>, <b>then </b>no two members of the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> have 
	    <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequences<span class="arrow">&#183;</span></a> whose members
	    are pairwise equal or identical, 
	    as defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#equality" shape="rect">Equality</a> and 
     <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#identity" shape="rect">Identity</a>
	    in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</div><div class="clnumber">4.2<a id="c-k" name="c-k" shape="rect"> </a><b>If </b>the <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> is <b><i>key</i></b>, <b>then </b>
	      <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">4.2.1 <span class="p">The <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a> and the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> are equal, that is, every
		  member of the <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a> is also a member of the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> and
		  <em>vice versa</em>.</span></div>
<div class="clnumber">4.2.2 <span class="p">No two members of the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> have <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequences<span class="arrow">&#183;</span></a> whose members 
		  are pairwise equal or identical, 
		  as defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#equality" shape="rect">Equality</a> and 
     <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#identity" shape="rect">Identity</a>
		  in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</span></div>
<div class="clnumber">4.2.3<a id="c-nlbl" name="c-nlbl" shape="rect"> </a><span class="p">No element member of the <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> of any
		  member of the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> was assessed as <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> by reference to an element
		  declaration whose <a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> is <b><i>true</i></b>.</span></div>
</div>
	    </div><div class="clnumber">4.3<a id="cl-krv" name="cl-krv" shape="rect"> </a><b>If </b>the <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a> is <b><i>keyref</i></b>, <b>then </b>for each member of the 
	    <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> (call this
	    the <b>keyref member</b>), there is a
	    <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node table<span class="arrow">&#183;</span></a> associated
	    with the
	    <a href="#icd-referenced_key" class="propref" shape="rect">{referenced key}</a> in the <a href="#e-id_constraint_table" class="propref" shape="rect">[identity-constraint table]</a> of <var>E</var>
	    (see <a href="#sic-key" shape="rect">Identity-constraint Table (&#167;3.11.5)</a>, which is understood
	    as logically prior to this clause of this constraint,
	    below) and there is an entry in that table whose
	    <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> is 
	    equal or identical
	    to the <b>keyref member's</b> 
	    <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> member for member,
	    as defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#equality" shape="rect">Equality</a> and 
     <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#identity" shape="rect">Identity</a>
	    in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</div></div>
	 </div>
</div>
      </div><div class="note"><div class="p"><b>Note:</b> 
	For <b><i>unique</i></b> identity constraints, the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> is
	allowed to be different from the <a href="#key-tns" class="termref" shape="rect"><span class="arrow">&#183;</span>target node set<span class="arrow">&#183;</span></a>. That is, a
	selected unique node may have fields that do not have corresponding
	<span class="anonRef">[schema actual value]</span>s.
       </div></div></div></div><div class="note"><div class="p"><b>Note:</b> Because the validation of <b><i>keyref</i></b> (see clause <a href="#cl-krv" shape="rect">4.3</a>) depends on finding appropriate entries in a
       element information item's <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node
	table<span class="arrow">&#183;</span></a>, and <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node
	tables<span class="arrow">&#183;</span></a> are assembled strictly recursively from the
       node tables of descendants, only element information items
       within the sub-tree rooted at the element information item
       being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> can be referenced successfully.</div></div><div class="note"><div class="p"><b>Note:</b> Although this specification defines a <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> contribution
       which would enable schema-aware processors to implement
       clause <a href="#c-nlbl" shape="rect">4.2.3</a> above (<a href="#sic-elt-decl" shape="rect">Element Declaration (&#167;3.3.5.3)</a>), processors are not required to provide
       it.  This clause can be read as if in the absence of this
       infoset contribution, the value of the relevant <a href="#ed-nillable" class="propref" shape="rect">{nillable}</a>
       property <span class="rfc2119">must</span> be available.</div></div><p>For purposes of checking
      identity-constraints, single atomic values are not distinguished
      from lists with single items.  An atomic value <var>V</var> and a list
      <var>L</var> with a single item are treated as equal, for
      purposes of this specification, if <var>V</var> is equal 
      
      to the atomic value which is the single item of <var>L</var>.
      And similarly for identity.
     </p></div><div class="div3">
<h4><a name="sec-sic-key" id="sec-sic-key" shape="rect"></a>3.11.5 Identity-constraint Definition Information Set Contributions</h4><div class="constraintnote"><a id="sic-key" name="sic-key" shape="rect"></a><b>Schema Information Set Contribution: Identity-constraint Table</b><br clear="none" /><div class="constraint"><div class="p"><span class="termdef"><a name="key-ec" id="key-ec" title="" shape="rect">[Definition:]&#160;&#160;</a>An
<b>eligible identity-constraint</b> of an element information item is
one such that clause <a href="#c-u" shape="rect">4.1</a> or clause <a href="#c-k" shape="rect">4.2</a> of
<a href="#cvc-identity-constraint" shape="rect">Identity-constraint Satisfied (&#167;3.11.4)</a> is satisfied with respect to that
item and that constraint, or such that any of the element information
item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of that item have an <a href="#e-id_constraint_table" class="propref" shape="rect">[identity-constraint table]</a> property whose value has an entry for
that constraint</span>.</div><div class="p"><span class="termdef"><a name="key-nt" id="key-nt" title="" shape="rect">[Definition:]&#160;&#160;</a>A <b>node
table</b> is a set of pairs each consisting of a <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> and an element node</span>.</div><div class="p">Whenever an element information item has one or more <a href="#key-ec" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible identity-constraints<span class="arrow">&#183;</span></a>, in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> that
element information item has a property as follows:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-id_constraint_table" name="e-id_constraint_table" shape="rect"><span class="propdef">[identity-constraint table]</span></a></dt><dd>
     one
<b>Identity-constraint Binding</b>
information item for each <a href="#key-ec" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible identity-constraint<span class="arrow">&#183;</span></a>, with
properties as follows:
     <div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;Identity-constraint Binding&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="cb-definition" name="cb-definition" shape="rect"><span class="propdef">[definition]</span></a></dt><dd>The <a href="#key-ec" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible identity-constraint<span class="arrow">&#183;</span></a>.</dd><dt><a id="cb-node_table" name="cb-node_table" shape="rect"><span class="propdef">[node table]</span></a></dt><dd>A <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node table<span class="arrow">&#183;</span></a> with one entry for every <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> (call it <b>k</b>) and
node (call it <b>n</b>) such that
   <b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">1<a id="c-kc" name="c-kc" shape="rect"> </a><span class="p">There is an entry in one of the <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node
tables<span class="arrow">&#183;</span></a> associated with the <a href="#cb-definition" class="propref" shape="rect">[definition]</a> in an <b>Identity-constraint Binding</b>
information item in at least one of the <a href="#e-id_constraint_table" class="propref" shape="rect">[identity-constraint table]</a>s of the element information item
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the element information item whose <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> is <b>k</b> and whose node
is <b>n</b>;</span></div>
<div class="clnumber">2 <span class="p"><b>n</b> appears with <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> <b>k</b> in the <a href="#key-qns" class="termref" shape="rect"><span class="arrow">&#183;</span>qualified node set<span class="arrow">&#183;</span></a> for the <a href="#cb-definition" class="propref" shape="rect">[definition]</a>.</span></div>
</div> provided no two entries have the same <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a> but distinct nodes.  Potential
conflicts are resolved by not including any conflicting entries which
would have owed their inclusion to clause <a href="#c-kc" shape="rect">1</a> above. Note
that if all the conflicting entries arose under clause <a href="#c-kc" shape="rect">1</a> above, this means no entry at all will appear for the
offending <a href="#key-ks" class="termref" shape="rect"><span class="arrow">&#183;</span>key-sequence<span class="arrow">&#183;</span></a>.</dd></dl>
</div>
</div>

    </dd></dl>
</div>
</div>
<div class="note"><div class="p"><b>Note:</b> The complexity of the above arises from the fact that
<b><i>keyref</i></b> identity-constraints can be defined on domains distinct from the
embedded domain of the identity-constraint they reference, or on domains which are the
same but self-embedding at some depth.  In either case the <a href="#key-nt" class="termref" shape="rect"><span class="arrow">&#183;</span>node
table<span class="arrow">&#183;</span></a> for the referenced identity-constraint needs to propagate upwards, with
conflict resolution.</div><div class="p">The <b>Identity-constraint Binding</b> information item, unlike
others in this specification, is essentially an internal bookkeeping
mechanism.  It is introduced to support the definition of <a href="#cvc-identity-constraint" shape="rect">Identity-constraint Satisfied (&#167;3.11.4)</a>
above.
</div></div></div></div></div><div class="div3">
<h4><a name="coss-identity-constraint" id="coss-identity-constraint" shape="rect"></a>3.11.6 Constraints on Identity-constraint Definition Schema Components</h4><div class="div4">
<h5><a name="sec-c-props-correct" id="sec-c-props-correct" shape="rect"></a>3.11.6.1 Identity-constraint Definition Properties Correct</h5><p>All identity-constraint definitions (see <a href="#cIdentity-constraint_Definitions" shape="rect">Identity-constraint Definitions (&#167;3.11)</a>) <span class="rfc2119">must</span> satisfy the
       following constraint.</p><div class="constraintnote"><a id="c-props-correct" name="c-props-correct" shape="rect"></a><b>Schema Component Constraint: Identity-constraint Definition Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of an identity-constraint definition
	  are as described in the property tableau in
	  <a href="#Identity-constraint_Definition_details" shape="rect">The Identity-constraint Definition Schema Component (&#167;3.11.1)</a>, modulo the
	  impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">If the <a href="#icd-identity-constraint_category" class="propref" shape="rect">{identity-constraint category}</a>
	  is <b><i>keyref</i></b>, the cardinality of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> is equal
	   to that of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a>
	  of the <a href="#icd-referenced_key" class="propref" shape="rect">{referenced     key}</a>.</span></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-c-selector-xpath" id="sec-c-selector-xpath" shape="rect"></a>3.11.6.2 Selector Value OK</h5><div class="constraintnote"><a id="c-selector-xpath" name="c-selector-xpath" shape="rect"></a><b>Schema Component Constraint: Selector Value OK</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="#icd-selector" class="propref" shape="rect">{selector}</a> 
	 
	 satisfies the constraint
	  <a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>.
	</span></div>
<div class="clnumber">2 <b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <!--* no span class='p' possible here *-->Its 
	    <a href="#x-expression" class="propref" shape="rect">{expression}</a> 
	   conforms to the following extended BNF:
	   <table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Selector XPath expressions</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="Selector" id="Selector" shape="rect"></a>[1]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Selector</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#Path" shape="rect"><i>Path</i></a> ( '|' <a href="#Path" shape="rect"><i>Path</i></a> )*</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="Path" id="Path" shape="rect"></a>[2]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Path</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a name="anchor8454" id="anchor8454" shape="rect"></a>('.' '//')? <a href="#Step" shape="rect"><i>Step</i></a> ( '/' <a href="#Step" shape="rect"><i>Step</i></a> )*</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="Step" id="Step" shape="rect"></a>[3]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Step</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'.' | <a href="#NameTest" shape="rect"><i>NameTest</i></a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="NameTest" id="NameTest" shape="rect"></a>[4]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>NameTest</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="http://www.w3.org/TR/xml-names11/#NT-QName" shape="rect">QName</a> | '*' | <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> 
	     ':*'</code></td></tr></tbody></table></td></tr></tbody></table>
	  </div>
<div class="clnumber">2.2 <span class="p">Its <a href="#x-expression" class="propref" shape="rect">{expression}</a> is an XPath expression
	   involving the <code>child</code> axis whose abbreviated
	   form is as given above.</span></div>
</div></div>
</div><div class="p">For readability, whitespace <span class="rfc2119">may</span> be used in selector XPath
       expressions even though not explicitly allowed by the grammar:
       <a href="#whitespace" shape="rect"><i>whitespace</i></a> <span class="rfc2119">may</span> be freely added
       within patterns before or after any <a href="#token" shape="rect"><i>token</i></a>.
      <table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Lexical productions</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="token" id="token" shape="rect"></a>[5]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>token</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'.' | '/' | '//' | '|' | '@' | <a href="#NameTest" shape="rect"><i>NameTest</i></a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="whitespace" id="whitespace" shape="rect"></a>[6]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>whitespace</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="http://www.w3.org/TR/xml11/#NT-S" shape="rect">S</a></code></td></tr></tbody></table></td></tr></tbody></table></div><div class="p">When tokenizing, the longest possible token is always returned.</div></div></div><p>
       <span class="termdef"><a name="key-selector-subset" id="key-selector-subset" title="" shape="rect">[Definition:]&#160;&#160;</a>
	The subset of XPath defined in 
	<a href="#c-selector-xpath" shape="rect">Selector Value OK (&#167;3.11.6.2)</a> is called the
	<b>selector subset</b> of XPath.
       </span></p></div><div class="div4">
<h5><a name="sec-c-fields-xpaths" id="sec-c-fields-xpaths" shape="rect"></a>3.11.6.3 Fields Value OK</h5><div class="constraintnote"><a id="c-fields-xpaths" name="c-fields-xpaths" shape="rect"></a><b>Schema Component Constraint: Fields Value OK</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">Each member of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> 
	 
	 satisfies the constraint
	  <a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>.
	</span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->For each member of the <a href="#icd-fields" class="propref" shape="rect">{fields}</a> <b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <!--* no span class='p' possible here *-->Its <a href="#x-expression" class="propref" shape="rect">{expression}</a> conforms to the extended BNF given
above for <a href="#Selector" shape="rect"><i>Selector</i></a>, with the following modification:
        <table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Path in Field XPath expressions</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="fPath" id="fPath" shape="rect"></a>[7]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Path</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>('.' '//')? 
	  ( <a href="#Step" shape="rect"><i>Step</i></a> '/' )* ( <a href="#Step" shape="rect"><i>Step</i></a> | '@' <a href="#NameTest" shape="rect"><i>NameTest</i></a> )</code></td></tr></tbody></table></td></tr></tbody></table>
           This production differs from the one above in allowing the final
step to match an attribute node.
        </div>
<div class="clnumber">2.2 <span class="p">Its <a href="#x-expression" class="propref" shape="rect">{expression}</a> is an XPath expression involving the <code>child</code> and/or <code>attribute</code> axes whose abbreviated form is
as given above.</span></div>
</div></div>
</div><div class="p">For readability, whitespace <span class="rfc2119">may</span> be used in field XPath expressions even though not
explicitly allowed by the grammar: <a href="#whitespace" shape="rect"><i>whitespace</i></a> <span class="rfc2119">may</span> be freely added within patterns before or after any <a href="#token" shape="rect"><i>token</i></a>.
      </div><div class="p">When tokenizing, the longest possible token is always returned.</div></div></div><p>
       <span class="termdef"><a name="key-field-subset" id="key-field-subset" title="" shape="rect">[Definition:]&#160;&#160;</a>
	The subset of XPath defined in 
	<a href="#c-fields-xpaths" shape="rect">Fields Value OK (&#167;3.11.6.3)</a> is called the
	<b>field subset</b> of XPath.
       </span></p></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cIdentity-constraint_Definitions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cAssertions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cTypeAlternative" id="cTypeAlternative" shape="rect"></a>3.12 Type Alternatives</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.1 <a href="#TA_details" shape="rect">The Type Alternative Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.2 <a href="#declare-ta" shape="rect">XML Representation of Type Alternative Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.3 <a href="#sec-src-ta" shape="rect">Constraints on XML Representations of Type Alternatives</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.4 <a href="#sec-cvc-ta" shape="rect">Type Alternative Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.5 <a href="#sec-sic-ta" shape="rect">Type Alternative Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.12.6 <a href="#coss-ta" shape="rect">Constraints on Type Alternative Schema Components</a><br clear="none" />
</div><p>Type Alternative components provide associations between boolean
     conditions (as XPath expressions) and <a href="#td" class="compref" shape="rect">Type Definition</a>s.
     They are used in conditional type assignment.
    </p><div class="div3">
<h4><a name="TA_details" id="TA_details" shape="rect"></a>3.12.1 The Type Alternative Schema Component</h4><p>The type alternative schema component has the following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="tac" id="tac" shape="rect">Type Alternative</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="tac-annotations" shape="rect" id="tac-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="tac-test" shape="rect" id="tac-test"></a><div class="pdName"><span class="propdef">{test}</span></div>
<div class="pdDef">
An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record. Optional.</div>
</div>
<div class="propDefn"><a name="tac-type_definition" shape="rect" id="tac-type_definition"></a><div class="pdName"><span class="propdef">{type definition}</span></div>
<div class="pdDef">
A  <a href="#td" class="compref" shape="rect">Type Definition</a> component.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>Type alternatives can be used by an <a href="#ed" class="compref" shape="rect">Element Declaration</a> to specify a
      condition (<a href="#tac-test" class="propref" shape="rect">{test}</a>) under which a particular type (<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a>) is used
      as the
       <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> for element information items governed by that
       <a href="#ed" class="compref" shape="rect">Element Declaration</a>.  Each <a href="#ed" class="compref" shape="rect">Element Declaration</a> <span class="rfc2119">may</span> have multiple
       <a href="#tac" class="compref" shape="rect">Type Alternative</a>s in its <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>.</p></div><div class="div3">
<h4><a name="declare-ta" id="declare-ta" shape="rect"></a>3.12.2 XML Representation of Type Alternative Schema Components</h4><p>The XML representation for a type 
       alternative schema component is an
      <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element information item. The correspondences
      between the properties of that information item 
      after the appropriate
      <a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
      and the
      properties of the
      component it corresponds to are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>alternative</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-alternative" name="element-alternative" shape="rect">&lt;alternative</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;test = <i>an XPath expression</i><br clear="none" />&#160;&#160;type = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;xpathDefaultNamespace = 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##defaultNamespace</var> | <var>##targetNamespace</var> | <var>##local</var>))
 <br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a> | <a href="#element-complexType" class="eltref" shape="rect">complexType</a>)?)<br clear="none" />&lt;/alternative&gt;</p></div></div><p>Each <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element
      maps to a <a href="#tac" class="compref" shape="rect">Type Alternative</a> component as follows.
     </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#TA_details" shape="rect">Type Alternative</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#tac-test" class="propref" shape="rect">{test}</a></div><div class="mapRepr">
	    
	    If the <code>test</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is not present, then <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;
	    otherwise an <a href="#x" class="compref" shape="rect">XPath Expression</a> property record, as described in
	    section
	    <a href="#declare-assertion" shape="rect">XML Representation of Assertion Schema Components (&#167;3.13.2)</a>, with
	    <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> as the "host element"
	    and <code>test</code> as the designated expression <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>. 
	   </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a></div><div class="mapRepr">
The type definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>type</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if one is present, otherwise the type definition corresponding
to the <code>complexType</code> or <code>simpleType</code> among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element.
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#tac-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
        The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element,
        as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div3">
<h4><a name="sec-src-ta" id="sec-src-ta" shape="rect"></a>3.12.3 Constraints on XML Representations of Type Alternatives</h4><div class="constraintnote"><a id="src-ta" name="src-ta" shape="rect"></a><b>Schema Representation Constraint: Type
	Alternative Representation OK</b><br clear="none" /><div class="constraint"><div class="p"><a name="anchor11230" id="anchor11230" shape="rect"></a>In addition to the conditions imposed 
       on <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a>
       element information items by the schema for schema documents,
	each 
	<a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element <span class="rfc2119">must</span> have 
	one (and only one)
	of the following:
	 a <code>type</code>
         attribute, or a <code>complexType</code> child element, or a
         <code>simpleType</code> child element. 
       
      </div></div></div></div><div class="div3">
<h4><a name="sec-cvc-ta" id="sec-cvc-ta" shape="rect"></a>3.12.4 Type Alternative Validation Rules</h4><div class="block"><span class="termdef"><a name="key-cta-ta-select" id="key-cta-ta-select" title="" shape="rect">[Definition:]&#160;&#160;</a>A <a href="#tac" class="compref" shape="rect">Type Alternative</a> <var>A</var>
      <b>successfully selects</b> a <a href="#td" class="compref" shape="rect">Type Definition</a> <var>T</var> for an
      element information item <var>E</var> if and only if <var>A</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> evaluates to
      <code>true</code> and <var>A</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> = <var>T</var>.</span>
      <a name="anchor6465" id="anchor6465" shape="rect"></a>
      The <a href="#tac-test" class="propref" shape="rect">{test}</a> is evaluated in the following way:<div class="constraintlist"><div class="clnumber">1<a id="hack0810-20" name="hack0810-20" shape="rect"> </a><!--* no span class='p' possible here *-->
        An instance of the <a href="#bib-xdm" shape="rect">[XDM]</a> data model is constructed as
        follows: <div class="constraintlist"><div class="clnumber">1.1<a id="hack0810-21" name="hack0810-21" shape="rect"> </a><!--* no span class='p' possible here *-->
          An information set is constructed by copying 
          the base information set properties
           (and not any of the properties specific to <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>) of the following
           information items:
          <div class="constraintlist"><div class="clnumber">1.1.1<a id="hack0810-22" name="hack0810-22" shape="rect"> </a><span class="p">
            <var>E</var> itself.
           </span></div>
<div class="clnumber">1.1.2 <span class="p">
            <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> (but not its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>).
           </span></div>
<div class="clnumber">1.1.3 <span class="p">
            
            <var>E</var>'s <a href="#e-inherited_attributes" class="propref" shape="rect">[inherited attributes]</a> which do not
            have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> as any of <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.
            They are copied as if they were among <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and had
            <var>E</var> as their <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a>.
             When an attribute with a non-empty
            <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a> is copied, <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> may need to be performed on the
            resulting information set to ensure that a prefix <var>P</var> is bound to
            the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a> and the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[prefix]</a> of
            the copied attribute is set to <var>P</var>.
           </span></div>
</div>
	  <span class="termdef"><a name="key-base-infoset-props" id="key-base-infoset-props" title="" shape="rect">[Definition:]&#160;&#160;</a>By <b>base information set properties</b>
	  are meant the properties listed in
	  <a href="#infoset" shape="rect">Required Information Set Items and Properties (normative) (&#167;D)</a>.
	  </span>
         </div>
<div class="clnumber">1.2 <span class="p">
	   In the copy of <var>E</var>, the
	   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[parent]</a> property
	   is modified to have no value.
	   The <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> property
	   is modified to have the empty list as its value.
	 </span></div>
<div class="clnumber">1.3 <span class="p">
          An <a href="#bib-xdm" shape="rect">[XDM]</a> data model instance is constructed from
          that information set, following the rules given in
          <a href="#bib-xdm" shape="rect">[XDM]</a>.
         </span></div>
</div> 
       </div>
<div class="clnumber">2 <span class="p">
	 The XPath expression 
	 which is the value of the <a href="#tac-test" class="propref" shape="rect">{test}</a>, is evaluated
	 as described in <a href="#cvc-xpath" shape="rect">XPath Evaluation (&#167;3.13.4.2)</a>.
	  If a
	  <a href="http://www.w3.org/TR/xpath20/#dt-dynamic-error" shape="rect">dynamic error</a> or a
	  <a href="http://www.w3.org/TR/xpath20/#dt-type-error" shape="rect">type error</a> is raised during
	  evaluation, then the <a href="#tac-test" class="propref" shape="rect">{test}</a> is 
	  treated as if it had evaluated (without
	   error) to <code>false</code>.
	 
	</span><div class="note"><a name="anchor11073a" id="anchor11073a" shape="rect"></a><div class="p"><b>Note:</b> 
	  <a href="http://www.w3.org/TR/xpath20/#dt-dynamic-error" shape="rect">Dynamic errors</a>
	  and <a href="http://www.w3.org/TR/xpath20/#dt-type-error" shape="rect">type errors</a> in
	  the evaluation of <a href="#tac-test" class="propref" shape="rect">{test}</a> expressions cause neither the
	  schema nor the document instance to be invalid. But
	  conforming processors <span class="rfc2119">may</span> issue a warning if they occur.
	  However, 
	  if type errors are
	  detected statically by the XPath processor, the effect is
	  the same as for other static errors in the XPath
	  expression.
	 </div></div></div>
</div></div><div class="note"><div class="p"><b>Note:</b> 
      
      As a consequence of the rules just given, the root node of the
      <a href="#bib-xdm" shape="rect">[XDM]</a> instance is necessarily constructed from
      <var>E</var>;
      the ancestors,
      siblings, children, and descendants of <var>E</var> are
      not represented in the data model instance, and they are thus
      not accessible to the tests expressed in the <a href="#tac-test" class="propref" shape="rect">{test}</a>s in the
      <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>.  The element <var>E</var> and its
       <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> will be
      represented in the data model instance by nodes labeled as
      untyped.  If the <a href="#tac-test" class="propref" shape="rect">{test}</a> expressions being evaluated include
      comparisons which require type information, then explicit casts
      will sometimes be necessary.
     </div></div></div><div class="div3">
<h4><a name="sec-sic-ta" id="sec-sic-ta" shape="rect"></a>3.12.5 Type Alternative Information Set Contributions</h4><p>None.</p></div><div class="div3">
<h4><a name="coss-ta" id="coss-ta" shape="rect"></a>3.12.6 Constraints on Type Alternative Schema Components</h4><p>All type alternatives (see <a href="#cTypeAlternative" shape="rect">Type Alternatives (&#167;3.12)</a>) <span class="rfc2119">must</span>
      satisfy the following constraints.</p><div class="constraintnote"><a id="ta-props-correct" name="ta-props-correct" shape="rect"></a><b>Schema Component Constraint: Type Alternative Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
        The values of the properties of a type alternatives
        
        are as
        described in the property tableau in <a href="#TA_details" shape="rect">The Type Alternative Schema Component (&#167;3.12.1)</a>,
        modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.
       </span></div>
<div class="clnumber">2<a id="c-cta-static" name="c-cta-static" shape="rect"> </a><!--* no span class='p' possible here *-->
        If the <a href="#tac-test" class="propref" shape="rect">{test}</a> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, then it satisfies the constraint
        <a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>.
	 The <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function
	   signatures</a> in the <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>
	  <span class="rfc2119">must</span> include signatures for 
	 <b>all</b> of the following:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">The <a href="http://www.w3.org/TR/xpath-functions/#func-not" shape="rect">fn:not</a> function
	    defined in the <a href="#bib-fno" shape="rect">[Functions and Operators]</a> specification.
	   </span></div>
<div class="clnumber">2.2 <span class="p">Constructor functions for the built-in datatypes.</span></div>
</div>
	 The further contents of <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function
	  signatures</a> are <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
	</div>
</div><div class="p">
       A conforming processor <span class="rfc2119">must</span> accept and process any XPath expression
       conforming to the "required subset" of <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> defined
       by the following grammar.
      </div><div class="note"><a name="anchor11073b" id="anchor11073b" shape="rect"></a><div class="p"><b>Note:</b> 
       Any XPath expression containing no static errors as defined in 
       <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> may
       appear in a conforming schema.  Conforming processors <span class="rfc2119">may</span> but are not
       required to support XPath expressions not belonging to the required
       subset of XPath.
      </div></div><div class="p">
       An XPath expression belongs to the required subset of XPath if and only
       if <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="anchor11073c" name="anchor11073c" shape="rect"> </a><span class="p">
         The <a href="#x-expression" class="propref" shape="rect">{expression}</a> property of the
         <a href="#x" class="compref" shape="rect">XPath Expression</a> is an XPath expression containing
	 no static errors, as defined in
         <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>.
        </span></div>
<div class="clnumber">2 <b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <!--* no span class='p' possible here *-->
           It conforms to the following extended BNF:
           <table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Test XPath expressions</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-Test" id="ta-Test" shape="rect"></a>[8]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Test</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#ta-OrExpr" shape="rect"><i>OrExpr</i></a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-OrExpr" id="ta-OrExpr" shape="rect"></a>[9]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>OrExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#ta-AndExpr" shape="rect"><i>AndExpr</i></a>
                  ( 'or' <a href="#ta-AndExpr" shape="rect"><i>AndExpr</i></a> )*</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-AndExpr" id="ta-AndExpr" shape="rect"></a>[10]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>AndExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#ta-BooleanExpr" shape="rect"><i>BooleanExpr</i></a>
                  ( 'and' <a href="#ta-BooleanExpr" shape="rect"><i>BooleanExpr</i></a> )*</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-BooleanExpr" id="ta-BooleanExpr" shape="rect"></a>[11]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>BooleanExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'(' <a href="#ta-OrExpr" shape="rect"><i>OrExpr</i></a> ')' |</code></td></tr><tr valign="baseline"><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"><code><a href="#ta-BooleanFunction" shape="rect"><i>BooleanFunction</i></a> |</code></td></tr><tr valign="baseline"><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"></td><td rowspan="1" colspan="1"><code>
	       <a href="#ta-ValueExpr" shape="rect"><i>ValueExpr</i></a>
	       
	       ( <a href="#ta-Comparator" shape="rect"><i>Comparator</i></a>
	       <a href="#ta-ValueExpr" shape="rect"><i>ValueExpr</i></a>
	        )?</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-BooleanFunction" id="ta-BooleanFunction" shape="rect"></a>[12]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>BooleanFunction</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="http://www.w3.org/TR/xml-names11/#NT-QName" shape="rect">QName</a>
                  '(' <a href="#ta-OrExpr" shape="rect"><i>OrExpr</i></a> ')'</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-Comparator" id="ta-Comparator" shape="rect"></a>[13]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Comparator</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'=' | '!=' | '&lt;' | '&lt;=' | '&gt;' | '&gt;='</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-ValueExpr" id="ta-ValueExpr" shape="rect"></a>[14]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>ValueExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>
	       
	       <a href="#ta-CastExpr" shape="rect"><i>CastExpr</i></a>
	       |
		<a href="#ta-ConstructorFunction" shape="rect"><i>ConstructorFunction</i></a>
		
	       
	      </code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-CastExpr" id="ta-CastExpr" shape="rect"></a>[15]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>CastExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>
	       <a href="#ta-SimpleValue" shape="rect"><i>SimpleValue</i></a>
	       
		( 'cast' 'as' QName '?'? )?
	       
	      </code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-SimpleValue" id="ta-SimpleValue" shape="rect"></a>[16]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>SimpleValue</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#ta-AttrName" shape="rect"><i>AttrName</i></a>
                   |
                  <a href="http://www.w3.org/TR/xpath20/#doc-xpath-Literal" shape="rect">Literal</a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-AttrName" id="ta-AttrName" shape="rect"></a>[17]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>AttrName</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'@' <a href="#NameTest" shape="rect"><i>NameTest</i></a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="ta-ConstructorFunction" id="ta-ConstructorFunction" shape="rect"></a>[18]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>ConstructorFunction</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="http://www.w3.org/TR/xml-names11/#NT-QName" shape="rect">QName</a>
                  '(' <a href="#ta-SimpleValue" shape="rect"><i>SimpleValue</i></a> ')'</code></td></tr></tbody></table></td></tr></tbody></table>
           
          </div>
<div class="clnumber">2.2 <span class="p">
           It is an XPath expression involving the <code>attribute</code> axis
           whose abbreviated form is as given above.
          </span></div>
</div><div class="note"><div class="p"><b>Note:</b> 
          For readability, <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> allows whitespace to be
          used between tokens in XPath expressions, even though this is not
          explicitly shown in the grammar. For details of whitespace handling,
          consult <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>.
         </div></div></div>
<div class="clnumber">3 <span class="p">
   Any strings matching the <a href="#ta-BooleanFunction" shape="rect"><i>BooleanFunction</i></a>
   production are function calls to <a href="http://www.w3.org/TR/xpath-functions/#func-not" shape="rect">fn:not</a>
   defined in the <a href="#bib-fno" shape="rect">[Functions and Operators]</a> specification.
   Any strings matching the <a href="#ta-ConstructorFunction" shape="rect"><i>ConstructorFunction</i></a>
   production are function calls to constructor functions for the built-in
   datatypes.
  </span><div class="note"><div class="p"><b>Note:</b> The minimal content of the <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function
	   signatures</a> in the <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>
	   is given in clause <a href="#c-cta-static" shape="rect">2</a>
	   of <a href="#ta-props-correct" shape="rect">Type Alternative Properties Correct (&#167;3.12.6)</a>:  <code>fn:not</code> and
	   constructors for the built-in datatypes.
	  </div></div><div class="note"><div class="p"><b>Note:</b> 
   The above extended BNF is ambiguous. For example, the string
   "<code>a:b('123')</code>" has 2 paths in the grammar, by matching either
   <a href="#ta-BooleanFunction" shape="rect"><i>BooleanFunction</i></a> or
   <a href="#ta-ConstructorFunction" shape="rect"><i>ConstructorFunction</i></a>. The rules given
   here require different function names for the productions. As a result, the
   ambiguity can be resolved based on the function name.
  </div></div></div>
<div class="clnumber">4 <span class="p">
	  Any explicit casts (i.e. any strings which match
	  the optional "<code>cast as</code>" <em>QName</em> in the
	  <a href="#ta-CastExpr" shape="rect"><i>CastExpr</i></a> production)
	  are casts to built-in datatypes.
	 </span></div>
</div>
      </div><div class="note"><div class="p"><b>Note:</b> 
       Implementations <span class="rfc2119">may</span> choose to support a bigger subset of
       <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>.
      </div></div><div class="note"><div class="p"><b>Note:</b> The rule given above for the construction of the data model
	instance has as a consequence that even when implementations
	support full <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> expressions, it is not
	possible to refer successfully to the children, siblings,
	ancestors, etc. of the element whose type is being selected.
       </div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cTypeAlternative" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cNotation_Declarations" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cAssertions" id="cAssertions" shape="rect"></a>3.13 Assertions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.1 <a href="#Assertion_details" shape="rect">The Assertion Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.2 <a href="#declare-assertion" shape="rect">XML Representation of Assertion Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.3 <a href="#sec-src-assertion" shape="rect">Constraints on XML Representations of Assertions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.4 <a href="#assertion-validation" shape="rect">Assertion Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.4.1 <a href="#sec-cvc-assertion" shape="rect">Assertion Satisfied</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.4.2 <a href="#sec-cvc-xpath" shape="rect">XPath Evaluation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.5 <a href="#sec-sic-assertion" shape="rect">Assertion Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.6 <a href="#coss-assertion" shape="rect">Constraints on Assertion Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.6.1 <a href="#sec-as-props-correct" shape="rect">Assertion Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.13.6.2 <a href="#sec-xpath-valid" shape="rect">XPath Valid</a><br clear="none" />
</div><p>Assertion components constrain the existence and values of related 
    elements and attributes.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:assert test="@min le @max"/&gt;</pre></div><div class="exampleWrapper">
<div class="p">The XML representation 
      for  assertions.</div></div><div class="exampleWrapper">
<div class="p">The <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> element requires that the 
     value of the <code>min</code> attribute be less than or equal to that of the
     <code>max</code> attribute, and fails if that is not the case.  
     </div></div></div><div class="div3">
<h4><a name="Assertion_details" id="Assertion_details" shape="rect"></a>3.13.1 The Assertion Schema Component</h4><p>The assertion schema component has the following properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="as" id="as" shape="rect">Assertion</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="as-annotations" shape="rect" id="as-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="as-test" shape="rect" id="as-test"></a><div class="pdName"><span class="propdef">{test}</span></div>
<div class="pdDef">
An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record. Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="x" id="x" shape="rect">XPath Expression</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="x-namespace_bindings" shape="rect" id="x-namespace_bindings"></a><div class="pdName"><span class="propdef">{namespace bindings}</span></div>
<div class="pdDef">
A set of  <a href="#nb" class="compref" shape="rect">Namespace Binding</a> property records.  </div>
</div>
<div class="propDefn"><a name="x-default_namespace" shape="rect" id="x-default_namespace"></a><div class="pdName"><span class="propdef">{default namespace}</span></div>
<div class="pdDef">
An xs:anyURI value.  Optional.</div>
</div>
<div class="propDefn"><a name="x-base_URI" shape="rect" id="x-base_URI"></a><div class="pdName"><span class="propdef">{base URI}</span></div>
<div class="pdDef">
An xs:anyURI value.  Optional.</div>
</div>
<div class="propDefn"><a name="x-expression" shape="rect" id="x-expression"></a><div class="pdName"><span class="propdef">{expression}</span></div>
<div class="pdDef">
An <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> expression. Required.</div>
</div>
</div></div>
</div>
</div>
<div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Property Record: </span><a name="nb" id="nb" shape="rect">Namespace Binding</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="nb-prefix" shape="rect" id="nb-prefix"></a><div class="pdName"><span class="propdef">{prefix}</span></div>
<div class="pdDef">
An xs:NCName value.  Required.</div>
</div>
<div class="propDefn"><a name="nb-namespace" shape="rect" id="nb-namespace"></a><div class="pdName"><span class="propdef">{namespace}</span></div>
<div class="pdDef">
An xs:anyURI value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>To check an assertion, 
      an instance of the XPath 2.0 data
      model (<a href="#bib-xdm" shape="rect">[XDM]</a>) is constructed, 
      <a name="anchor12127" id="anchor12127" shape="rect"></a>
      in which the element
      information item being <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>
      is the (parentless) root node, 
      and 
      elements and attributes are assigned types and values according to
      XPath 2.0 data model construction rules, with some exceptions. See
      <a href="#cvc-assertion" shape="rect">Assertion Satisfied (&#167;3.13.4.1)</a> for details about how the data model is
      constructed.
      When evaluated against this data model 
      instance, <a href="#as-test" class="propref" shape="rect">{test}</a> evaluates to either 
      <code>true</code>
      or <code>false</code> (if any other value is returned, it's converted to
      either <code>true</code> or <code>false</code> as if by a call to the XPath
      <a href="http://www.w3.org/TR/xpath-functions/#func-boolean" shape="rect">fn:boolean</a> function).</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of
      the <a href="#as-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-assertion" id="declare-assertion" shape="rect"></a>3.13.2 XML Representation of Assertion Schema Components</h4><p>The XML representation for an assertion schema component 
      is 
      an <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> 
      element information item.
      The correspondences between the properties of 
      
      that information item 
      after the appropriate
      <a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
      and the
      properties of the component 
      it corresponds to are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>assert</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-assert" name="element-assert" shape="rect">&lt;assert</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>test</b> = <i>an XPath expression</i><br clear="none" />&#160;&#160;xpathDefaultNamespace = 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##defaultNamespace</var> | <var>##targetNamespace</var> | <var>##local</var>))
 <br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/assert&gt;</p></div></div><p>The <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> element
      maps to an <a href="#as" class="compref" shape="rect">Assertion</a> component as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Assertion_details" shape="rect">Assertion</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#as-test" class="propref" shape="rect">{test}</a></div><div class="mapRepr">
	
	An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record, as described below,
	with <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> as the "host element"
	and <code>test</code> as the designated expression <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
	
	
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#as-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
        
	
	 The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
	 <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a>  element,
	 
	 as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
	
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><p>
      
      Assertions, like identity constraints and conditional type 
      assignment, use <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> expressions.
      The expression itself is recorded, together with relevant parts
      of the context, in an <a href="#x" class="compref" shape="rect">XPath Expression</a> property record.
      The mapping is as described below; in each case, the XPath
      expression itself is given in a <b>designated attribute</b> of
      the appropriate "<b>host element</b>".
     </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#x" shape="rect">XPath Expression</a> <strong>Property Record</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a></div><div class="mapRepr">
	 A set of <a href="#nb" class="compref" shape="rect">Namespace Binding</a> property records. Each member
	 corresponds to an entry in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of
	 the host element, with
	 <a href="#nb-prefix" class="propref" shape="rect">{prefix}</a> being the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[prefix]</a> 
	 and <a href="#nb-namespace" class="propref" shape="rect">{namespace}</a> the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[namespace 
	  name]</a>.
	</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a></div><div class="mapRepr">
	 Let <b>D</b> be the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	 <code>xpathDefaultNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if
	 present on the host 
	  element, otherwise that of the
	 <code>xpathDefaultNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
	 the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor. Then
	 the value is
	 the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b><b>D</b> is
	    <code>##defaultNamespace</code>, <b>then </b>the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>there is an entry in the
	       <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of the host element whose <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[prefix]</a> 
	       is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, <b>then </b>the corresponding <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[namespace 
		name]</a>;</div><div class="clnumber">1.2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;</div></div></div><div class="clnumber">2 <b>If </b><b>D</b> is
	    <code>##targetNamespace</code>, <b>then </b>the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b>the <code>targetNamespace</code>
	       <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present on the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
	       ancestor, <b>then </b>its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>;</div><div class="clnumber">2.2 <b>otherwise </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;</div></div></div><div class="clnumber">3 <b>If </b><b>D</b> is <code>##local</code>, <b>then </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;</div><div class="clnumber">4 <b>otherwise </b>(<b>D</b> is an xs:anyURI
	    value) <b>D</b>.</div></div>
	</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#x-base_URI" class="propref" shape="rect">{base URI}</a></div><div class="mapRepr">
	 The <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[base
	  URI]</a> of the host element.
	</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#x-expression" class="propref" shape="rect">{expression}</a></div><div class="mapRepr">
	 An XPath expression corresponding to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	 designated <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the host element.
	</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="intRange"&gt;
 &lt;xs:attribute name="min" type="xs:int"/&gt;
 &lt;xs:attribute name="max" type="xs:int"/&gt;
 &lt;xs:assert test="@min le @max"/&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">The value of the <code>min</code> attribute must be less than or equal to
       that of the <code>max</code> attribute.
	Note that the attributes are validated before the assertion 
	on the parent element is checked, so the typed values of the attributes
	are available for comparison; it is not necessary to cast the values
	to <code>int</code> or some other numeric type before comparing them.
      </div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:complexType name="arrayType"&gt;
 &lt;xs:sequence&gt;
  &lt;xs:element name="entry" minOccurs="0" maxOccurs="unbounded"/&gt;
 &lt;/xs:sequence&gt;
 &lt;xs:attribute name="length" type="xs:int"/&gt;
 &lt;xs:assert test="@length eq fn:count(./entry)"/&gt;
&lt;/xs:complexType&gt;</pre></div><div class="exampleWrapper">
<div class="p">The value of the <code>length</code> attribute must be the same as
       the number of occurrences of <code>entry</code> sub-elements.</div></div></div></div><div class="div3">
<h4><a name="sec-src-assertion" id="sec-src-assertion" shape="rect"></a>3.13.3 Constraints on XML Representations of Assertions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="assertion-validation" id="assertion-validation" shape="rect"></a>3.13.4 Assertion Validation Rules</h4><div class="div4">
<h5><a name="sec-cvc-assertion" id="sec-cvc-assertion" shape="rect"></a>3.13.4.1 Assertion Satisfied</h5><div class="constraintnote"><a id="cvc-assertion" name="cvc-assertion" shape="rect"></a><b>Validation Rule: Assertion Satisfied</b><br clear="none" /><div class="constraint"><div class="p">An element information item
	<var>E</var> is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to an
	assertion if
	  and only if the <a href="#as-test" class="propref" shape="rect">{test}</a>
	 evaluates to <code>true</code> (see below) without raising
	 any <a href="http://www.w3.org/TR/xpath20/#dt-dynamic-error" shape="rect">dynamic error</a>
	  or <a href="http://www.w3.org/TR/xpath20/#dt-type-error" shape="rect">type
	  error</a>.
       
      </div><div class="p">
	Evaluation of <a href="#as-test" class="propref" shape="rect">{test}</a> is performed as defined
	in <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>, with the following conditions:</div><div class="constraintlist"><div class="clnumber">1<a id="c-buildxdm" name="c-buildxdm" shape="rect"> </a><!--* no span class='p' possible here *-->
	 A data model
	 instance (see <a href="#bib-xdm" shape="rect">[XDM]</a>)
	  is constructed in the following way:
	 <div class="constraintlist"><div class="clnumber">1.1 <span class="p"><var>E</var> is validated 
	    
	    with respect to its <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>, as defined
	     in <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>, if the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> exists, otherwise 
	      
	      against
	     its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>, as defined in <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>,
	     except that for <var>E</var> itself (though not for its element
	     information item descendents), clause <a href="#c-as" shape="rect">6</a> 
	     of <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>
	     is skipped. (Informally, 
	     the element is validated normally, 
	     except that assertions are not checked.)
	   </span><div class="note"><div class="p"><b>Note:</b> It is a consequence of this rule that the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> 
	     of <var>E</var> will be validated in the usual way.</div></div></div>
<div class="clnumber">1.2<a id="c-as-partialpsvi" name="c-as-partialpsvi" shape="rect"> </a><span class="p">A "partial" <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> describing the results 
	    of this partial validation
	    of <var>E</var> is constructed.  The <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> properties
	    of <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> are defined in the
	    usual way.  On <var>E</var> itself, all <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
	    properties are supplied as described elsewhere in this specification
	    if their values are known.  The element's
	    <a href="#e-validity" class="propref" shape="rect">[validity]</a> property is given
	    the value <b><i>invalid</i></b> if and only if the element is known
	    to be invalid; otherwise it is given the value <b><i>notKnown</i></b>.
	    The element's <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> property 
	    is given the value <b><i>partial</i></b>.</span><div class="note"><div class="p"><b>Note:</b> Since the assertions of its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> have not been
	     checked, <var>E</var> has been only partially
	     validated, and can be known to be invalid, but not known to be
	     valid.  The values of the <a href="#e-validity" class="propref" shape="rect">[validity]</a>
	     and <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> properties
	     are set accordingly.</div></div></div>
<div class="clnumber">1.3 <span class="p">From the "partial" <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, a data model
	     instance is constructed as described in <a href="#bib-xdm" shape="rect">[XDM]</a>.
	     The root node of the <a href="#bib-xdm" shape="rect">[XDM]</a> instance is
	     constructed from <var>E</var>; the data model instance contains only
	     that node and nodes constructed from the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>,
	     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, and descendants of <var>E</var>.</span><div class="note"><div class="p"><b>Note:</b> It is a consequence of this construction that attempts
	      to refer, in an assertion, to the siblings or ancestors of
	      <var>E</var>, or to any part of the input document outside of <var>E</var>
	      itself, will be unsuccessful.
	      Such attempted references
	      are not in themselves errors, but the data model instance
	      used to evaluate them does not include any representation
	      of any parts of the document outside of <var>E</var>, so they
	      cannot be referred to.
	     </div></div></div>
</div>
	</div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->
	   The XPath expression <a href="#as-test" class="propref" shape="rect">{test}</a> is evaluated, following the rules
	   given in <a href="#cvc-xpath" shape="rect">XPath Evaluation (&#167;3.13.4.2)</a>, with the 
	   following
	    conditions and modifications:
	  <div class="constraintlist"><div class="clnumber">2.1 <span class="p">The root node of the <a href="#bib-xdm" shape="rect">[XDM]</a> instance
	     described in clause <a href="#c-buildxdm" shape="rect">1</a> serves as the <a href="http://www.w3.org/TR/xpath20/#dt-context-node" shape="rect">context 
	      node</a> for evaluation of the XPath
	     expression.</span></div>
<div class="clnumber">2.2 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>
	     is augmented with the variable "<code>$value</code>",
	     as described in
	     <a href="#as-props-correct" shape="rect">Assertion Properties Correct (&#167;3.13.6.1)</a>.
	    </span></div>
<div class="clnumber">2.3 <!--* no span class='p' possible here *-->
	    The variable "<code>$value</code>" appears as a member
	    of the <a href="http://www.w3.org/TR/xpath20/#dt-variable-values" shape="rect">variable values</a> in
	    the <a href="http://www.w3.org/TR/xpath20/#dt-dynamic-context" shape="rect">dynamic context</a>.  The
	    <code>expanded QName</code> of that member has no namespace URI and has
		   "<code>value</code>" as the local name.
	    The <code>value</code> of the member is determined by the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.3.1 <b>If </b>
	     <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.3.1.1 <span class="p">
		<var>E</var>'s <a href="#e-validity" class="propref" shape="rect">[validity]</a> in the "partial"
		<a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is not <b><i>invalid</i></b>;
	       </span></div>
<div class="clnumber">2.3.1.2 <span class="p">
		<var>E</var>'s <a href="#e-nil" class="propref" shape="rect">[nil]</a> in the "partial" <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
		does not exist or has value <b><i>false</i></b>;
	       </span></div>
<div class="clnumber">2.3.1.3 <span class="p">
		the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of <var>E</var>'s <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>
		has <a href="#ct-variety" class="propref" shape="rect">{variety}</a> <b><i>simple</i></b>,
	       </span></div>
</div> 
	      <b>then </b>
	 the <code>value</code> is the 
		<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-xdmrep" shape="rect">XDM representation</a> of
		<var>E</var>.<a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a>
		under the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> 
		. <a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a> 
		of <var>E</var>'s <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>.
	    <div class="note"><div class="p"><b>Note:</b> 
	      This clause provides type information to simple contents
	      of elements, to make type-aware comparisons and
	      operations possible without explicit casting in the
	      XPath expressions.
	     </div></div><div class="note"><div class="p"><b>Note:</b> For complex types with simple content, the element node
	      may be referred to as "<code>.</code>", while
	      its content may be referred to as
	      "<code>$value</code>". Since the element node,
	      as a consequence of clause <a href="#c-as-partialpsvi" shape="rect">1.2</a>, will normally have the type
	      annotation <code>anyType</code>, its <a href="http://www.w3.org/TR/xpath20/#dt-atomization" shape="rect">atomized</a> 
	      value will be a single atomic value of type
	      <code>untypedAtomic</code>. By contrast,
	      <code>$value</code> will be a sequence of one or more
	      atomic values, whose types are the most specific
	      (narrowest) built-in types available.</div></div></div><div class="clnumber">2.3.2 <b>otherwise </b>(in the "partial" <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>,
	     <var>E</var>.<a href="#e-validity" class="propref" shape="rect">[validity]</a> = <b><i>invalid</i></b> 
	     or 
	     <var>E</var>.<a href="#e-nil" class="propref" shape="rect">[nil]</a> = <b><i>true</i></b> 
	     or 
	     <var>E</var>'s <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> does not have 
	     <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>
	     . <a href="#ct-variety" class="propref" shape="rect">{variety}</a> = <b><i>simple</i></b>)
	     the <code>value</code> is the empty sequence.
	    </div></div>
	   </div>
</div>
	 </div>
<div class="clnumber">3 <span class="p">
	 The evaluation result
	 is converted to either <code>true</code>
	 or <code>false</code> as if by a call to the XPath
	 <a href="http://www.w3.org/TR/xpath-functions/#func-boolean" shape="rect">fn:boolean</a> function.</span></div>
</div></div></div><div class="note"><div class="p"><b>Note:</b> 
       Although the  rules 
       just given describe 
       how an <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> and a <a href="#bib-xdm" shape="rect">[XDM]</a>
       instance are constructed, processors are not required 
       to  construct
       actual data structures representing them. 
       However, the result of XPath evaluation <span class="rfc2119">must</span> be the same as if such
       <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> and <a href="#bib-xdm" shape="rect">[XDM]</a> instance 
       data structures were 
       constructed.
      </div></div></div><div class="div4">
<h5><a name="sec-cvc-xpath" id="sec-cvc-xpath" shape="rect"></a>3.13.4.2 XPath Evaluation</h5><div class="constraintnote"><a id="cvc-xpath" name="cvc-xpath" shape="rect"></a><b>Validation Rule: XPath Evaluation</b><br clear="none" /><div class="constraint"><div class="p">An <a href="#x" class="compref" shape="rect">XPath Expression</a> property record <var>X</var>, with a context node <var>E</var>,
       is evaluated as defined in <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>, 
	with a 
	 <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>
	 as described in <a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>
	(unless otherwise specified
	elsewhere)
	 and with the following
	<a href="http://www.w3.org/TR/xpath20/#dt-dynamic-context" shape="rect">dynamic context</a>
	(again, unless otherwise specified
	elsewhere): 
       <div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-context-item" shape="rect">context item</a> is
	     <var>E</var>.</span></div>
<div class="clnumber">2 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-context-position" shape="rect">context position</a>
          is 1.</span></div>
<div class="clnumber">3 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-context-size" shape="rect">context size</a> is
          1.</span></div>
<div class="clnumber">4 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-variable-values" shape="rect">variable values</a> is
          the empty set.</span></div>
<div class="clnumber">5 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-function-implementation" shape="rect">function
          implementations</a> include an implementation of every function
          in the
	  <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function
          signatures</a> of the
	   <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>. 
	  See <a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>.</span></div>
<div class="clnumber">6 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-date-time" shape="rect">current dateTime</a> is
          <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>, but is constant during an
          <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode.</span></div>
<div class="clnumber">7 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-timezone" shape="rect">implicit timezone</a> is
          <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>, but is constant during an
          <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode.</span></div>
<div class="clnumber">8 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-available-docs" shape="rect">available documents</a> is
          
	         the empty set.</span></div>
<div class="clnumber">9 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-available-collections" shape="rect">available collections</a> is
          <a name="anchor6540" id="anchor6540" shape="rect"></a>
          
          the empty set.</span></div>
<div class="clnumber">10 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-default-collection" shape="rect">default collection</a> is
          
          the empty sequence.</span></div>
</div>

       
       
      </div></div></div><p id="anchor11073d">
       It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> (both in this specification and in <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>) when type errors are detected and whether,
       when detected, they are treated as static or dynamic errors.
     </p><div class="note"><div class="p"><b>Note:</b> It is a consequence of this rule that a conforming processor which
       treats a type error in an XPath expression as a dynamic error will
       treat the expression as having evaluated to false, while a conforming
       processor which treats type errors as static errors will report an
       error in the schema.
       </div></div><div class="note"><div class="p"><b>Note:</b> <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> does not currently require support
	for the 
       precisionDecimal datatype,
       but conforming XPath processors are allowed to support additional primitive
       data types, including precisionDecimal. 
              
      </div><div class="p">
       For interoperability, it is recommended that XPath processors
       intending to support precisionDecimal as an additional
       primitive data type follow the recommendations in <a href="#bib-chamberlin-2006" shape="rect">[Chamberlin 2006]</a>.  If the XPath processor used to
       evaluate XPath expressions supports precisionDecimal, then any
       precisionDecimal values in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> <span class="rfc2119">should</span> be labeled as
       <code>xs:precisionDecimal</code> in the data model instance
       and handled accordingly in XPath.
      </div><div class="p">
       If the XPath processor does not support precisionDecimal, 
        
       then any precisionDecimal
	values in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> <span class="rfc2119">should</span> be mapped into 
       <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#decimal" shape="rect">decimal</a>, unless the
       numericalValue
       is not a decimal number (for example, it is
       <b>positiveInfinity</b>,
       <b>negativeInfinity</b>, or <b>notANumber</b>),
       in which case 
       
       they <span class="rfc2119">should</span> be mapped to
       <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#float" shape="rect">float</a>.
       
       
	Whether this is done by altering the type information in the
	partial <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, or by altering the usual rules for mapping
	from a <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> to an <a href="#bib-xdm" shape="rect">[XDM]</a> data model instance,
	or by treating precisionDecimal as an unknown type which is
	coerced as appropriate into decimal or float by the XPath
	processor, is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> and out of scope for this 
	specification.
       
      </div><div class="p">As a consequence of the above variability, it is possible
       that XPath expressions that perform various kinds of type
       introspections will produce different results when different
       XPath processors are used. If the schema author wishes to
       ensure interoperable results, such introspections will need to
       be avoided.</div></div></div></div><div class="div3">
<h4><a name="sec-sic-assertion" id="sec-sic-assertion" shape="rect"></a>3.13.5 Assertion Information Set Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-assertion" id="coss-assertion" shape="rect"></a>3.13.6 Constraints on Assertion Schema Components</h4><p>All assertions (see <a href="#cAssertions" shape="rect">Assertions (&#167;3.13)</a>) <span class="rfc2119">must</span>
      satisfy the following constraints.</p><div class="div4">
<h5><a name="sec-as-props-correct" id="sec-as-props-correct" shape="rect"></a>3.13.6.1 Assertion Properties Correct</h5><div class="constraintnote"><a id="as-props-correct" name="as-props-correct" shape="rect"></a><b>Schema Component Constraint: Assertion Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
	  The values of the properties of an assertion are as
	  described in the property tableau in <a href="#Assertion_details" shape="rect">The Assertion Schema Component (&#167;3.13.1)</a>,
	  modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.
	 </span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *--><a name="anchor6541" id="anchor6541" shape="rect"></a>
	  The <a href="#as-test" class="propref" shape="rect">{test}</a> satisfies the constraint
	  
	  <a href="#xpath-valid" shape="rect">XPath Valid (&#167;3.13.6.2)</a>,
	  
	 with the following modifications to the
	 <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a>:
	 <div class="constraintlist"><div class="clnumber">2.1 <span class="p">
	   The <a href="http://www.w3.org/TR/xpath20/#dt-in-scope-variables" shape="rect">in-scope variables</a>
	   is a set with a single member. The <code>expanded QName</code> of that
	   member has no namespace URI and has <code>value</code> as the local
	   name. The (static) <code>type</code> of the member is
	   <code>anyAtomicType*</code>.
	  </span></div>
<div class="clnumber">2.2 <!--* no span class='p' possible here *-->
	   The <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function signatures</a>
	   includes signatures for	<b>all</b> of the following:<div class="constraintlist"><div class="clnumber">2.2.1 <span class="p">
	     Functions in the <code>http://www.w3.org/2005/xpath-functions</code>
	     namespace as defined in the <a href="#bib-fno" shape="rect">[Functions and Operators]</a> specification.
	    </span></div>
<div class="clnumber">2.2.2 <span class="p">
	     Constructor functions for the built-in datatypes.
	    </span></div>
</div>
	  </div>
</div>
	<div class="note"><div class="p"><b>Note:</b> The XDM type label <code>anyAtomicType*</code> simply says
     that for static typing purposes the variable <code>$value</code>
     will have a value consisting of a sequence of zero or more
     atomic values.</div></div></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-xpath-valid" id="sec-xpath-valid" shape="rect"></a>3.13.6.2 XPath Valid</h5><div class="constraintnote"><a id="xpath-valid" name="xpath-valid" shape="rect"></a><b>Schema Component Constraint: XPath Valid</b><br clear="none" /><div class="constraint"><div class="p">For an <a href="#x" class="compref" shape="rect">XPath Expression</a> property record <var>X</var>
	to be valid,
       <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
	  The <a href="#x-expression" class="propref" shape="rect">{expression}</a> of <var>X</var> is a valid XPath
	  expression, as defined in <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>.
	 </span></div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->
	  <var>X</var> does not produce any <a href="http://www.w3.org/TR/xpath20/#dt-static-error" shape="rect">static
	   error</a>, under the following conditions
	    (except as specified elsewhere):<div class="constraintlist"><div class="clnumber">2.1 <span class="p">
	     The <a href="http://www.w3.org/TR/xpath20/#dt-xpath-static-typing-feature" shape="rect">Static Typing
	      Feature</a> is disabled.
	    </span></div>
<div class="clnumber">2.2 <!--* no span class='p' possible here *-->
	     The <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a> is
	     given as follows:
	     <div class="constraintlist"><div class="clnumber">2.2.1 <span class="p"><a href="http://www.w3.org/TR/xpath20/#dt-xpath-compat-mode" shape="rect">XPath 1.0
		 compatibility mode</a> is <b><i>false</i></b>.</span></div>
<div class="clnumber">2.2.2 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-static-namespaces" shape="rect">statically
		 known namespaces</a> is the 
		<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a> of <var>X</var>.</span></div>
<div class="clnumber">2.2.3 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-def-elemtype-ns" shape="rect">default element/type
		 namespace</a> is the <a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a>
		of <var>X</var>.</span></div>
<div class="clnumber">2.2.4 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-def-fn-ns" shape="rect">default function
		 namespace</a> is <code>http://www.w3.org/2005/xpath-functions</code>.</span></div>
<div class="clnumber">2.2.5 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-issd" shape="rect">in-scope schema definitions</a>
		are those components that are present in every schema by definition,
		as defined in <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations (&#167;3.2.7)</a>,
		<a href="#builtin-ctd" shape="rect">Built-in Complex Type Definition (&#167;3.4.7)</a> and <a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions (&#167;3.16.7)</a>.</span></div>
<div class="clnumber">2.2.6 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-in-scope-variables" shape="rect">in-scope variables</a>
		is the empty set.</span></div>
<div class="clnumber">2.2.7 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-context-item-static-type" shape="rect">context item
		 static type</a> is not applicable, because the
		<a href="http://www.w3.org/TR/xpath20/#dt-xpath-static-typing-feature" shape="rect">Static Typing
		 Feature</a> is disabled.</span></div>
<div class="clnumber">2.2.8 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-function-signature" shape="rect">function
		 signatures</a> are <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
	       </span><div class="note"><div class="p"><b>Note:</b> 
		  If <var>X</var> belongs to an <a href="#as" class="compref" shape="rect">Assertion</a> or a <a href="#tac" class="compref" shape="rect">Type Alternative</a>,
		  <a href="#as-props-correct" shape="rect">Assertion Properties Correct (&#167;3.13.6.1)</a> and <a href="#ta-props-correct" shape="rect">Type Alternative Properties Correct (&#167;3.12.6)</a>
		  impose additional constraints on the set of required functions.
		 </div></div></div>
<div class="clnumber">2.2.9 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-static-collations" shape="rect">statically known
		 collations</a> are <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>, but always include the
		<a href="http://www.w3.org/TR/xquery-operators/#collations" shape="rect">Unicode 
		 codepoint collation</a>
		(<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>)
		defined by <a href="#bib-fno" shape="rect">[Functions and Operators]</a>.</span></div>
<div class="clnumber">2.2.10 <span class="p">
		The <a href="http://www.w3.org/TR/xpath20/#dt-def-collation" shape="rect">default collation</a>
		is the Unicode codepoint collation.
	       </span></div>
<div class="clnumber">2.2.11 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-base-uri" shape="rect">base URI</a> is the
		<a href="#x-base_URI" class="propref" shape="rect">{base URI}</a> of <var>X</var>.</span></div>
<div class="clnumber">2.2.12 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-known-docs" shape="rect">statically known
	        documents</a> is 
	        the empty set.</span></div>
<div class="clnumber">2.2.13 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-known-collections" shape="rect">statically known
		 collections</a> is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2.2.14 <span class="p">The <a href="http://www.w3.org/TR/xpath20/#dt-known-default-collection" shape="rect">statically
		 known default collection type</a> is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</span></div>
</div>
	    </div>
</div>
	 </div>
</div></div></div></div><p>
       It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> (both in this specification and in <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>) when type errors are detected and whether,
       when detected, they are treated as static or dynamic errors.
     </p><div class="note"><div class="p"><b>Note:</b> It is a consequence of this rule that a conforming processor which
       treats a type error in an XPath expression as a dynamic error will
       treat the expression as having evaluated to false, while a conforming
       processor which treats type errors as static errors will report an
       error in the schema.
       </div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cAssertions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#cAnnotations" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cNotation_Declarations" id="cNotation_Declarations" shape="rect"></a>3.14 Notation Declarations</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.1 <a href="#Notation_Declaration_details" shape="rect">The Notation Declaration Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.2 <a href="#declare-notation" shape="rect">XML Representation of Notation Declaration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.3 <a href="#sec-src-notation" shape="rect">Constraints on XML Representations of Notation Declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.4 <a href="#sec-cvc-notation" shape="rect">Notation Declaration Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.5 <a href="#sec-sic-notation" shape="rect">Notation Declaration Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.14.6 <a href="#coss-notation" shape="rect">Constraints on Notation Declaration Schema Components</a><br clear="none" />
</div><p>Notation declarations reconstruct XML NOTATION declarations.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:notation name="jpeg" public="image/jpeg" system="viewer.exe"&gt;</pre></div><div class="exampleWrapper">
<div class="p">The XML representation of a notation declaration.</div></div></div><div class="div3">
<h4><a name="Notation_Declaration_details" id="Notation_Declaration_details" shape="rect"></a>3.14.1 The Notation Declaration Schema Component</h4><p>The notation declaration schema component has the following
properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="nd" id="nd" shape="rect">Notation Declaration</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="nd-annotations" shape="rect" id="nd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="nd-name" shape="rect" id="nd-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value.  Required.</div>
</div>
<div class="propDefn"><a name="nd-target_namespace" shape="rect" id="nd-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value.  Optional.</div>
</div>
<div class="propDefn"><a name="nd-system_identifier" shape="rect" id="nd-system_identifier"></a><div class="pdName"><span class="propdef">{system identifier}</span></div>
<div class="pdDef">
An xs:anyURI value.  Required if <a href="#nd-public_identifier" class="propref" shape="rect">{public identifier}</a> is
    <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise (<a href="#nd-public_identifier" class="propref" shape="rect">{public identifier}</a> is present) optional.</div>
</div>
<div class="propDefn"><a name="nd-public_identifier" shape="rect" id="nd-public_identifier"></a><div class="pdName"><span class="propdef">{public identifier}</span></div>
<div class="pdDef">
A publicID value.  Required if <a href="#nd-system_identifier" class="propref" shape="rect">{system identifier}</a> is
    <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise (<a href="#nd-system_identifier" class="propref" shape="rect">{system identifier}</a> is present) optional.<div class="ownDesc">
<p>As defined in 
     
     <a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a> or <a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>.
    </p></div>
</div>
</div>
</div></div>
</div>
</div>
<p>Notation declarations do not participate in <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as such. They are referenced in the
course of <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validating<span class="arrow">&#183;</span></a> strings as
members of the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a> simple type. An element or attribute information item with
its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type definition or its

<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>
derived from the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a>
simple type is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> only if its
value was among the enumerations of such simple type.
As a consequence such a value is required to be the
<a href="#nd-name" class="propref" shape="rect">{name}</a>
of a notation declaration.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#nd-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-notation" id="declare-notation" shape="rect"></a>3.14.2 XML Representation of Notation Declaration Schema Components</h4><p>The XML representation for a notation declaration schema component is
a
<a href="#element-notation" class="eltref" shape="rect">&lt;notation&gt;</a>
element information item.    The correspondences between the
properties of that information item
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component it corresponds to are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>notation</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-notation" name="element-notation" shape="rect">&lt;notation</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>name</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a><br clear="none" />&#160;&#160;public = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#token" shape="rect">token</a><br clear="none" />&#160;&#160;system = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/notation&gt;</p></div></div><p>The <a href="#element-notation" class="eltref" shape="rect">&lt;notation&gt;</a> element
      maps to a <a href="#nd" class="compref" shape="rect">Notation Declaration</a> component as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Notation_Declaration_details" shape="rect">Notation Declaration</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#nd-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#nd-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the 
 <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> ancestor
	element information item if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#nd-system_identifier" class="propref" shape="rect">{system identifier}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>system</code>
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#nd-public_identifier" class="propref" shape="rect">{public identifier}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>public</code>
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, if present, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#nd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
	
	 The <a href="#key-am-one" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the
	 <a href="#element-notation" class="eltref" shape="rect">&lt;notation&gt;</a> element,
	 as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
	
       <!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:notation name="jpeg"
             public="image/jpeg" system="viewer.exe" /&gt;

&lt;xs:element name="picture"&gt;
 &lt;xs:complexType&gt;
  &lt;xs:simpleContent&gt;
   &lt;xs:extension base="xs:hexBinary"&gt;
    &lt;xs:attribute name="pictype"&gt;
     &lt;xs:simpleType&gt;
      &lt;xs:restriction base="xs:NOTATION"&gt;
       &lt;xs:enumeration value="jpeg"/&gt;
       &lt;xs:enumeration value="png"/&gt;
       . . .
      &lt;/xs:restriction&gt;
     &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
   &lt;/xs:extension&gt;
  &lt;/xs:simpleContent&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

&lt;picture pictype="jpeg"&gt;...&lt;/picture&gt;</pre></div></div></div><div class="div3">
<h4><a name="sec-src-notation" id="sec-src-notation" shape="rect"></a>3.14.3 Constraints on XML Representations of Notation Declarations</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-notation" id="sec-cvc-notation" shape="rect"></a>3.14.4 Notation Declaration Validation Rules</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-sic-notation" id="sec-sic-notation" shape="rect"></a>3.14.5 Notation Declaration Information Set Contributions</h4><div class="constraintnote"><a id="sic-notation-used" name="sic-notation-used" shape="rect"></a><b>Schema Information Set Contribution: Validated with Notation</b><br clear="none" /><div class="constraint"><div class="p">Whenever an attribute information item is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a>, in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> its
parent element information item has the following
properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-notation" name="e-notation" shape="rect"><span class="propdef">[notation]</span></a></dt><dd>An <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to the notation declaration

<a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the
attribute item's <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a></dd><dt><a id="e-notation_system" name="e-notation_system" shape="rect"><span class="propdef">[notation system]</span></a></dt><dd>The value of the <a href="#nd-system_identifier" class="propref" shape="rect">{system identifier}</a> of that notation
declaration.</dd><dt><a id="e-notation_public" name="e-notation_public" shape="rect"><span class="propdef">[notation public]</span></a></dt><dd>The value of the <a href="#nd-public_identifier" class="propref" shape="rect">{public identifier}</a> of that notation
declaration.</dd></dl>
</div>
</div>
<div class="note"><div class="p"><b>Note:</b> For compatibility, only one such attribute <span class="rfc2119">should</span> appear
on any given element.  If more than one such attribute
<em>does</em> appear, which one supplies the infoset property or
properties above is not defined.</div></div></div></div><div class="note"><div class="p"><b>Note:</b> Element as well as attribute information items may be <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a>, but only attribute
information items cause a notation declaration to appear in the
<a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> as a property of their parent.</div></div></div><div class="div3">
<h4><a name="coss-notation" id="coss-notation" shape="rect"></a>3.14.6 Constraints on Notation Declaration Schema Components</h4><p>All notation declarations (see <a href="#cNotation_Declarations" shape="rect">Notation Declarations (&#167;3.14)</a>) <span class="rfc2119">must</span> satisfy the following
      constraint.</p><div class="constraintnote"><a id="n-props-correct" name="n-props-correct" shape="rect"></a><b>Schema Component Constraint: Notation Declaration Correct</b><br clear="none" /><div class="constraint"><div class="p">The values of the properties of a notation declaration <span class="rfc2119">must</span>
       be as described in the property tableau in
       <a href="#Notation_Declaration_details" shape="rect">The Notation Declaration Schema Component (&#167;3.14.1)</a>, modulo the impact of
       <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cNotation_Declarations" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Simple_Type_Definitions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="cAnnotations" id="cAnnotations" shape="rect"></a>3.15 Annotations</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.1 <a href="#Annotation_details" shape="rect">The Annotation Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.2 <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.3 <a href="#sec-src-annotation" shape="rect">Constraints on XML Representations of Annotations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.4 <a href="#sec-cvc-annotation" shape="rect">Annotation Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.5 <a href="#sec-sic-annotation" shape="rect">Annotation Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.15.6 <a href="#coss-annotation" shape="rect">Constraints on Annotation Schema Components</a><br clear="none" />
</div><p>Annotations provide for human- and machine-targeted annotations
     of schema components.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:simpleType
       fn:note="special"&gt; &lt;xs:annotation&gt; &lt;xs:documentation&gt;A type for
       experts only&lt;/xs:documentation&gt; &lt;xs:appinfo&gt;
       &lt;fn:specialHandling&gt;checkForPrimes&lt;/fn:specialHandling&gt;
       &lt;/xs:appinfo&gt; &lt;/xs:annotation&gt;
       </pre></div><div class="exampleWrapper">
<div class="p">XML representations of three kinds of annotation.</div></div></div><div class="div3">
<h4><a name="Annotation_details" id="Annotation_details" shape="rect"></a>3.15.1 The Annotation Schema Component</h4><p>The annotation schema component has the following
       properties:</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="a" id="a" shape="rect">Annotation</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="a-application_information" shape="rect" id="a-application_information"></a><div class="pdName"><span class="propdef">{application information}</span></div>
<div class="pdDef">
A sequence of Element information items.  </div>
</div>
<div class="propDefn"><a name="a-user_information" shape="rect" id="a-user_information"></a><div class="pdName"><span class="propdef">{user information}</span></div>
<div class="pdDef">
A sequence of Element information items.  </div>
</div>
<div class="propDefn"><a name="a-attributes" shape="rect" id="a-attributes"></a><div class="pdName"><span class="propdef">{attributes}</span></div>
<div class="pdDef">
A set of Attribute information items.  </div>
</div>
</div></div>
</div>
</div>
<p><a href="#a-user_information" class="propref" shape="rect">{user information}</a> is intended for
       human consumption, <a href="#a-application_information" class="propref" shape="rect">{application        information}</a> for automatic processing.  In both cases,
       provision is made for an optional URI reference to supplement the
       local information, as the value of the <code>source</code>
       attribute of the respective element information items.
       <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> does <em>not</em> involve dereferencing these
       URIs, when present.  In the case of <a href="#a-user_information" class="propref" shape="rect">{user information}</a>, indication <span class="rfc2119">should</span> be given as
       to the identity of the (human) language used in the contents,
       using the <code>xml:lang</code> attribute.</p><p><a href="#a-attributes" class="propref" shape="rect">{attributes}</a> ensures that when
       schema authors take advantage of the provision for adding
       attributes from namespaces other than the XSD
       namespace to schema documents, they are available within the
       components corresponding to the element items where such
       attributes appear.</p><p>Annotations do not participate in <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> as such.  Provided
an annotation itself satisfies all relevant <a href="#gloss-cos" class="termref" shape="rect"><span class="arrow">&#183;</span>Schema Component Constraints<span class="arrow">&#183;</span></a> it
<em>cannot</em> affect the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of element information
items.</p><p>
The mapping defined in this specification from XML representations to
components does not apply to XML elements contained within an <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element; such elements do not correspond to
components, when the mapping defined here is used.
</p><p>
  It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> what effect, if any, the invalidity of
  a descendant of <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> has on the
  construction of schema components from the enclosing
  schema document.
</p><p>The name <span class="termdef"><a name="ac" id="ac" title="Annotated Component" shape="rect">[Definition:]&#160;&#160;</a><b>Annotated Component</b> covers all the different kinds of component which may
have annotations.</span></p></div><div class="div3">
<h4><a name="declare-annotation" id="declare-annotation" shape="rect"></a>3.15.2 XML Representation of Annotation Schema Components</h4><p>Annotation of schemas and schema components, with material for human or
computer consumption, is provided for by allowing application information and
human information at the beginning of most major schema elements, and anywhere
at the top level of schemas.  The XML representation for an annotation schema component is
an
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a>
element information item.    The correspondences between the
properties of that information item 
after the appropriate
<a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>
and the
properties of the component it corresponds to are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>annotation</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-annotation" name="element-annotation" shape="rect">&lt;annotation</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-appinfo" class="eltref" shape="rect">appinfo</a> | <a href="#element-documentation" class="eltref" shape="rect">documentation</a>)*<br clear="none" />&lt;/annotation&gt;</p><p class="element-syntax"><a id="element-appinfo" name="element-appinfo" shape="rect">&lt;appinfo</a><br clear="none" />&#160;&#160;source = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<em>{any}</em>)*<br clear="none" />&lt;/appinfo&gt;</p><p class="element-syntax"><a id="element-documentation" name="element-documentation" shape="rect">&lt;documentation</a><br clear="none" />&#160;&#160;source = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;xml:lang = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#language" shape="rect">language</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<em>{any}</em>)*<br clear="none" />&lt;/documentation&gt;</p></div></div><p>The <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element and its
      descendants map to an <a href="#a" class="compref" shape="rect">Annotation</a> component as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Annotation_details" shape="rect">Annotation</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#a-application_information" class="propref" shape="rect">{application information}</a></div><div class="mapRepr">A sequence of
	the <a href="#element-appinfo" class="eltref" shape="rect">&lt;appinfo&gt;</a> element information items from
	among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, in order, if any, otherwise the empty
	sequence.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#a-user_information" class="propref" shape="rect">{user information}</a></div><div class="mapRepr">A sequence of the
	<a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a> element information items from
	among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, in order, if any, otherwise the empty
	sequence.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#a-attributes" class="propref" shape="rect">{attributes}</a></div><div class="mapRepr">A set of attribute information items,
	namely those allowed by the attribute wildcard in the type
	definition for the <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> item itself or
	for the
	enclosing items which correspond to the component within which
	the annotation component is located.</div></div></div><p>The annotation component corresponding to the <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element in the example above will have one
      element item in each of its <a href="#a-user_information" class="propref" shape="rect">{user        information}</a> and <a href="#a-application_information" class="propref" shape="rect">{application information}</a> and one attribute
      item in its <a href="#a-attributes" class="propref" shape="rect">{attributes}</a>.</p><p>
Virtually every kind of schema component defined in this specification
has an <span class="anonRef">{annotations}</span> property.  When
the component is described in a schema document, the mapping from
the XML representation of the component to the <a href="#a" class="compref" shape="rect">Annotation</a>
components in the appropriate <span class="anonRef">{annotations}</span> 
property follows the rules described in the next paragraph.</p><div class="p">
<div class="termdef"><a name="key-am-set" id="key-am-set" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>annotation
mapping</b> of a set of element information items <var>ES</var>
is a sequence of annotations <var>AS</var>, with the following properties:
<div class="constraintlist"><div class="clnumber">1<a id="am-set-exp.ann" name="am-set-exp.ann" shape="rect"> </a><span class="p">
For every <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element information item among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of any element information item in <var>ES</var>, there
is a corresponding <a href="#a" class="compref" shape="rect">Annotation</a> component in <var>AS</var>.
</span><div class="note"><div class="p"><b>Note:</b> As noted above,
the <a href="#a-attributes" class="propref" shape="rect">{attributes}</a> property of
each <a href="#a" class="compref" shape="rect">Annotation</a> component includes 
all
the attribute information items on the
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element itself, on the
XML element which represents (and maps to) the
component being annotated, and on any intervening
XML elements, if those attribute information items
have <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a>s 
different from the XSD namespace.</div></div></div>
<div class="clnumber">2<a id="am-set-imp.ann" name="am-set-imp.ann" shape="rect"> </a><!--* no span class='p' possible here *-->
If any element information item <var>E</var> in <var>ES</var> has any attribute information items
<var>A</var> such that
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><var>A</var> is in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</span></div>
<div class="clnumber">2.2 <span class="p"><var>A</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a>
is present and not the XSD namespace.</span></div>
<div class="clnumber">2.3 <span class="p"><var>A</var> is not included in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> property 
of any annotation component described in 
clause <a href="#am-set-exp.ann" shape="rect">1</a>.
</span></div>
</div>
then for each such <var>E</var>, an <a href="#a" class="compref" shape="rect">Annotation</a> component
<var>C</var> will appear in <var>AS</var>, with
<var>C</var>.<a href="#a-application_information" class="propref" shape="rect">{application information}</a>
and
<var>C</var>.<a href="#a-user_information" class="propref" shape="rect">{user information}</a>
each being the empty sequence and
<var>C</var>.<a href="#a-attributes" class="propref" shape="rect">{attributes}</a>
containing all and only those attribute information
items <var>A</var> among <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</div>
<div class="clnumber">3 <span class="p">
<var>AS</var> contains no other <a href="#a" class="compref" shape="rect">Annotation</a> components.</span></div>
</div>
</div>
<span class="termdef"><a name="key-am-one" id="key-am-one" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>annotation
mapping</b> of a single element information item is the
<a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the singleton set containing that
element.</span>
</div><div class="note"><div class="p"><b>Note:</b> 
The order of <a href="#a" class="compref" shape="rect">Annotation</a> components within the sequence 
is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.

</div></div><div class="note"><div class="p"><b>Note:</b> 
When the input set has more than one
member, the <a href="#a" class="compref" shape="rect">Annotation</a> components in the resulting sequence
do not record which element in the set they
correspond to.  The attribute information items in the
<a href="#a-attributes" class="propref" shape="rect">{attributes}</a> of any <a href="#a" class="compref" shape="rect">Annotation</a>
similarly do not indicate which element information item in the
schema document was their parent.
</div></div></div><div class="div3">
<h4><a name="sec-src-annotation" id="sec-src-annotation" shape="rect"></a>3.15.3 Constraints on XML Representations of Annotations</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-cvc-annotation" id="sec-cvc-annotation" shape="rect"></a>3.15.4 Annotation Validation Rules</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-sic-annotation" id="sec-sic-annotation" shape="rect"></a>3.15.5 Annotation Information Set Contributions</h4><p>None as such: 
      the addition of annotations to the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is
      covered by the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> contributions of the enclosing components.</p></div><div class="div3">
<h4><a name="coss-annotation" id="coss-annotation" shape="rect"></a>3.15.6 Constraints on Annotation Schema Components</h4><p>All annotations (see <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a>) <span class="rfc2119">must</span> satisfy the following constraint.</p><div class="constraintnote"><a id="an-props-correct" name="an-props-correct" shape="rect"></a><b>Schema Component Constraint: Annotation Correct</b><br clear="none" /><div class="constraint"><div class="p">The values of the properties of an annotation <span class="rfc2119">must</span> be as described in
the property tableau in
<a href="#Annotation_details" shape="rect">The Annotation Schema Component (&#167;3.15.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#cAnnotations" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#Schemas" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="Simple_Type_Definitions" id="Simple_Type_Definitions" shape="rect"></a>3.16 Simple Type Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.1 <a href="#Simple_Type_Definition_details" shape="rect">The Simple Type Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.2 <a href="#declare-datatype" shape="rect">XML Representation of Simple Type Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.2.1 <a href="#map.std.common" shape="rect">Common mapping rules for Simple Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.2.2 <a href="#map.std.atomic" shape="rect">Mapping Rules for Atomic Simple Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.2.3 <a href="#map.std.list" shape="rect">Mapping Rules for Lists</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.2.4 <a href="#map.std.union" shape="rect">Mapping Rules for Unions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.3 <a href="#sec-src-simple-type" shape="rect">Constraints on XML Representations of Simple Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.4 <a href="#sec-cvc-simple-type" shape="rect">Simple Type Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.5 <a href="#sec-sic-simple-type" shape="rect">Simple Type Definition Information Set
Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.6 <a href="#coss-st" shape="rect">Constraints on Simple Type Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.6.1 <a href="#sec-st-props-correct" shape="rect">Simple Type Definition Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.6.2 <a href="#sec-cos-st-restricts" shape="rect">Derivation Valid (Restriction, Simple)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.6.3 <a href="#sec-cos-st-derived-ok" shape="rect">Type Derivation OK (Simple)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.6.4 <a href="#sec-st-restrict-facets" shape="rect">Simple Type Restriction (Facets)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7 <a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7.1 <a href="#sec-anySimpleType" shape="rect">xs:anySimpleType</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7.2 <a href="#sec-anyAtomicType" shape="rect">xs:anyAtomicType</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7.3 <a href="#xsd-error" shape="rect">xs:error</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7.4 <a href="#sec-builtin-primitives" shape="rect">Built-in primitive datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.16.7.5 <a href="#sec-other-builtins" shape="rect">Other built-in datatypes</a><br clear="none" />
</div><div class="note"><div class="p"><b>Note:</b> This section consists of a combination of copies of
normative material from <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, for local cross-reference
purposes, and material
unique to this specification, relating to the interface between schema
components defined in this specification and the simple type definition component.</div></div><p>Simple type definitions provide for constraining character information item <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of element and attribute
information items.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:simpleType name="celsiusWaterTemp"&gt;
 &lt;xs:restriction base="xs:decimal"&gt;
  &lt;xs:fractionDigits value="2"/&gt;
  &lt;xs:minExclusive value="0.00"/&gt;
  &lt;xs:maxExclusive value="100.00"/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;</pre></div><div class="exampleWrapper">
<div class="p">The XML representation of a simple type definition.</div></div></div><div class="div3">
<h4><a name="Simple_Type_Definition_details" id="Simple_Type_Definition_details" shape="rect"></a>3.16.1 The Simple Type Definition Schema Component</h4><p><a name="anchor11103" id="anchor11103" shape="rect"></a>The simple type definition schema component has the following properties:
</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="std" id="std" shape="rect">Simple Type Definition</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="std-annotations" shape="rect" id="std-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="std-name" shape="rect" id="std-name"></a><div class="pdName"><span class="propdef">{name}</span></div>
<div class="pdDef">
An xs:NCName value.  Optional.</div>
</div>
<div class="propDefn"><a name="std-target_namespace" shape="rect" id="std-target_namespace"></a><div class="pdName"><span class="propdef">{target namespace}</span></div>
<div class="pdDef">
An xs:anyURI value.  Optional.</div>
</div>
<div class="propDefn"><a id="std-final" name="std-final" shape="rect"></a><div class="pdName"><span class="propdef">{final}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>
    A subset of {<em>extension</em>, <em>restriction</em>, <em>list</em>, <em>union</em>}.
   </p></div>
</div>
</div>
<div class="propDefn"><a name="std-context" shape="rect" id="std-context"></a><div class="pdName"><span class="propdef">{context}</span></div>
<div class="pdDef">
Required if <a href="#std-name" class="propref" shape="rect">{name}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>,
    otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.<div class="ownDesc">
<p>Either an <a href="#ad" class="compref" shape="rect">Attribute Declaration</a>, 
    
    
    
    an <a href="#ed" class="compref" shape="rect">Element Declaration</a>, 
    a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>,
    or a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>.</p></div>
</div>
</div>
<div class="propDefn"><a name="std-base_type_definition" shape="rect" id="std-base_type_definition"></a><div class="pdName"><span class="propdef">{base type definition}</span></div>
<div class="pdDef">
A  <a href="#td" class="compref" shape="rect">Type Definition</a> component.  Required.<div class="ownDesc">
<p>With one exception, the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> of any <a href="#std" class="compref" shape="rect">Simple Type Definition</a> is a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>.  The exception is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, which has
     <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, a
     <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>, as its <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
    </p></div>
</div>
</div>
<div class="propDefn"><a name="std-facets" shape="rect" id="std-facets"></a><div class="pdName"><span class="propdef">{facets}</span></div>
<div class="pdDef">
A set of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#" class="compref" shape="rect">Constraining Facet</a> components.  </div>
</div>
<div class="propDefn"><a name="std-fundamental_facets" shape="rect" id="std-fundamental_facets"></a><div class="pdName"><span class="propdef">{fundamental facets}</span></div>
<div class="pdDef">
A set of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#" class="compref" shape="rect">Fundamental Facet</a> components.  </div>
</div>
<div class="propDefn"><a name="std-variety" shape="rect" id="std-variety"></a><div class="pdName"><span class="propdef">{variety}</span></div>
<div class="pdDef">
One of {<span class="enumval">atomic</span>, <span class="enumval">list</span>, <span class="enumval">union</span>}.  Required for all <a href="#std" class="compref" shape="rect">Simple Type Definition</a>s
    except <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>,
    in which it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div>
</div>
<div class="propDefn"><a name="std-primitive_type_definition" shape="rect" id="std-primitive_type_definition"></a><div class="pdName"><span class="propdef">{primitive type definition}</span></div>
<div class="pdDef">
A  <a href="#std" class="compref" shape="rect">Simple Type Definition</a> component.  With one exception, required if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is
    <b><i>atomic</i></b>,
    otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.  The exception
     is
     <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a>, whose
     <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.<div class="ownDesc">
<p>If
      non-<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, <span class="rfc2119">must</span> be a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-primitive" shape="rect">primitive</a>  definition.</p></div>
</div>
</div>
<div class="propDefn"><a name="std-item_type_definition" shape="rect" id="std-item_type_definition"></a><div class="pdName"><span class="propdef">{item type definition}</span></div>
<div class="pdDef">
A  <a href="#std" class="compref" shape="rect">Simple Type Definition</a> component.  Required if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b>, 
   otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.<div class="ownDesc">
<p>
	The value of this property 
	<span class="rfc2119">must</span> be 
	a primitive or ordinary simple type definition
	with <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>atomic</i></b>,
	or 
	an ordinary simple type definition 
	with <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>union</i></b>
	whose basic members are all atomic; 
	the value <span class="rfc2119">must not</span> itself be 
	a list type 
	(have <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>)
	or have any basic members which are list types.
      </p></div>
</div>
</div>
<div class="propDefn"><a name="std-member_type_definitions" shape="rect" id="std-member_type_definitions"></a><div class="pdName"><span class="propdef">{member type definitions}</span></div>
<div class="pdDef">
A sequence of primitive or ordinary <a href="#std" class="compref" shape="rect">Simple Type Definition</a> components.  <div class="ownDesc">
<p>
     <span class="rfc2119">Must</span> be present 
     (but <span class="rfc2119">may</span> be empty) 
     if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>union</i></b>, 
     otherwise <span class="rfc2119">must</span> be <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</p><p>The sequence may contain any primitive or ordinary simple type definition, but
      <span class="rfc2119">must not</span> contain any special type definitions.</p></div>
</div>
</div>
</div></div>
</div>
</div>
<p>Simple types are identified by their <a href="#std-name" class="propref" shape="rect">{name}</a> and <a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a>.  Except
for anonymous simple types (those with no <a href="#std-name" class="propref" shape="rect">{name}</a>), since
type definitions (i.e. both simple and complex type definitions taken together) <span class="rfc2119">must</span> be uniquely identified within an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>, no simple type definition can have the same name as another
simple or complex type definition.  Simple type <a href="#std-name" class="propref" shape="rect">{name}</a>s and <a href="#ctd-target_namespace" class="propref" shape="rect">{target namespace}</a>s
are provided for reference from
instances (see <a href="#xsi_type" shape="rect">xsi:type (&#167;2.7.1)</a>), and for use in the XML
representation of schema components
(specifically in <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> and <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>).  See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for the use of component
identifiers when importing one schema into another.</p><div class="note"><div class="p"><b>Note:</b> The <a href="#std-name" class="propref" shape="rect">{name}</a> of a simple type is not <em>ipso
facto</em> the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[(local) name]</a> of the
  element or attribute information items <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by that definition. The connection between a
  name and a type definition is described in <a href="#cElement_Declarations" shape="rect">Element Declarations (&#167;3.3)</a> and <a href="#cAttribute_Declarations" shape="rect">Attribute Declarations (&#167;3.2)</a>. </div></div><p>A simple type definition with an empty specification for <a href="#std-final" class="propref" shape="rect">{final}</a> can be used as the
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> for other types <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by either of
extension or restriction, or as the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> in
the definition of a list, or in the <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> of
a union; the explicit values <b><i>extension</i></b>, <b><i>restriction</i></b>,
<b><i>list</i></b> and <b><i>union</i></b> prevent further
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivations<span class="arrow">&#183;</span></a> by extension (to yield a complex type) and restriction (to yield a
simple type) and use in <a href="#key-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructing<span class="arrow">&#183;</span></a> lists and unions respectively.</p><p><a href="#std-variety" class="propref" shape="rect">{variety}</a> determines whether the simple type corresponds to
an <b><i>atomic</i></b>, <b><i>list</i></b> or <b><i>union</i></b> type as defined by <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</p><p>As described in <a href="#Type_Derivation" shape="rect">Type Definition Hierarchy (&#167;2.2.1.1)</a>, every simple type definition is
a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of some other simple
type (the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>), which is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> if and only if the type
definition in question is <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a> or a list or
union type definition which is not itself <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by restriction from a
list or union respectively.
A type definition
has <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a> as its <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> if and only if it is one of the  primitive datatypes.  Each
<em>atomic</em> type is ultimately a restriction of exactly one such
 primitive datatype, which is its <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a>.</p><p>The <a href="#std-facets" class="propref" shape="rect">{facets}</a> property 
      contains a set of constraining facets which are used to specify
      constraints on the datatype described by the simple type definition.
      For <b><i>atomic</i></b> definitions, these are restricted
      to those appropriate for the corresponding <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a>.  Therefore, the value space
      and lexical space (i.e. what is <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> by any atomic simple
      type) is determined by the pair (<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a>, <a href="#std-facets" class="propref" shape="rect">{facets}</a>). 
     </p><p>
      Constraining facets are defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>. All conforming
      implementations of this specification <span class="rfc2119">must</span> support all of the
      facets defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.  It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether additional
      facets are supported; if they are, the implementation <span class="rfc2119">must</span>
      satisfy the rules for <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facets
      described in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
     </p><p>As specified in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, <b><i>list</i></b> simple type definitions <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> space separated tokens, each of
which conforms to a specified simple type definition, the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>.  The item type specified
<span class="rfc2119">must not</span> itself be a <b><i>list</i></b> type, and <span class="rfc2119">must</span> be one of the types identified in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> as a
suitable item type for a list simple type.  In this case the <a href="#std-facets" class="propref" shape="rect">{facets}</a>
apply to the list itself, and are restricted to those appropriate for lists.</p><p>A <b><i>union</i></b> simple type definition <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> strings which satisfy at
least one of its <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>.  As in the case of
<b><i>list</i></b>, the <a href="#std-facets" class="propref" shape="rect">{facets}</a>
apply to the union itself, and are restricted to those appropriate for unions.</p><p><a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> or <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a>
      <span class="rfc2119">must</span> <em>not</em> be named as the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> of any user-defined
      atomic simple type definitions:  
       as they allow no constraining facets, this
      would be incoherent.</p><p>See <a href="#cAnnotations" shape="rect">Annotations (&#167;3.15)</a> for information on the role of the
<a href="#std-annotations" class="propref" shape="rect">{annotations}</a> property.</p></div><div class="div3">
<h4><a name="declare-datatype" id="declare-datatype" shape="rect"></a>3.16.2 XML Representation of Simple Type Definition Schema Components</h4><p>As always, the mapping rules
  given in this section apply after, not before, the appropriate
  <a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> This section reproduces a version of material from <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, for 
local cross-reference purposes.</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>simpleType</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-simpleType" name="element-simpleType" shape="rect">&lt;simpleType</a><br clear="none" />&#160;&#160;final = 
  
  (<var>#all</var> | List of (<var>list</var> | <var>union</var> | <var>restriction</var> | <var>extension</var>))
 <br clear="none" />&#160;&#160;id = 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>
<br clear="none" />&#160;&#160;name = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a>
<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;
<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-restriction" class="eltref" shape="rect">restriction</a> | <a href="#element-list" class="eltref" shape="rect">list</a> | <a href="#element-union" class="eltref" shape="rect">union</a>))
<br clear="none" />&lt;/simpleType&gt;</p><p class="element-syntax"><a id="element-restriction" name="element-restriction" shape="rect">&lt;restriction</a>
<br clear="none" />&#160;&#160;base = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>
<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;
<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a>?, 
(<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minExclusive" class="eltref" shape="rect">minExclusive</a> | 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minInclusive" class="eltref" shape="rect">minInclusive</a> | 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxExclusive" class="eltref" shape="rect">maxExclusive</a> | 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxInclusive" class="eltref" shape="rect">maxInclusive</a> | 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-totalDigits" class="eltref" shape="rect">totalDigits</a> | 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-fractionDigits" class="eltref" shape="rect">fractionDigits</a> | <!--* 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxScale" class="eltref" shape="rect">maxScale</a> | 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minScale" class="eltref" shape="rect">minScale</a> | *-->
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-length" class="eltref" shape="rect">length</a> | 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-minLength" class="eltref" shape="rect">minLength</a> | 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-maxLength" class="eltref" shape="rect">maxLength</a> | 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-enumeration" class="eltref" shape="rect">enumeration</a> | <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-whiteSpace" class="eltref" shape="rect">whiteSpace</a> | <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-pattern" class="eltref" shape="rect">pattern</a> | <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-assertion" class="eltref" shape="rect">assertion</a> | <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-explicitTimezone" class="eltref" shape="rect">explicitTimezone</a> | <em>{any with namespace: ##other}</em>)*))
<br clear="none" />&lt;/restriction&gt;</p><p class="element-syntax"><a id="element-list" name="element-list" shape="rect">&lt;list</a>
<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>
<br clear="none" />&#160;&#160;itemType = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;
<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-simpleType" class="eltref" shape="rect">simpleType</a>?)<br clear="none" />&lt;/list&gt;</p><p class="element-syntax"><a id="element-union" name="element-union" shape="rect">&lt;union</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;memberTypes = List of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-simpleType" class="eltref" shape="rect">simpleType</a>*)<br clear="none" />&lt;/union&gt;</p></div></div><p>
The <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element and its descendants
normally, when there are no errors, map to a 
<a href="#std" class="compref" shape="rect">Simple Type Definition</a> component.  The case in which 
an <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-f" shape="rect">unknown</a> facet is used in the definition of a simple type
definition is handled specially:  the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> 
in question is not in error, but it does not map to any component at all.  
</p><div class="note"><div class="p"><b>Note:</b> The effect of the special handling of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-f" shape="rect">unknown</a> facets is to 
ensure (1) that <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facets which are not supported by 
a particular implementation result in the types which depend upon them
not being present in the schema, and (2) that the presence of 
references to <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-f" shape="rect">unknown</a> facets in a schema document does not prevent
the rest of the schema document being processed and used.</div></div><div class="block">
The following subsections define one set of common mapping
rules for simple type definitions, and three specialized
sets of mapping rules for atomic, list, and union datatypes,
respectively.
<ul><li><div class="p">If the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element
has a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element among its children,
and the base type definition has <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>atomic</i></b>, 
then the mapping rules in 
<a href="#map.std.common" shape="rect">Common mapping rules for Simple Type Definitions (&#167;3.16.2.1)</a>
and <a href="#map.std.atomic" shape="rect">Mapping Rules for Atomic Simple Type Definitions (&#167;3.16.2.2)</a>
apply.
</div></li><li><div class="p">If the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element
has a <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> element among its children,
or if it has a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> child
and the base type definition has <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>, 
then the mapping rules in 
<a href="#map.std.common" shape="rect">Common mapping rules for Simple Type Definitions (&#167;3.16.2.1)</a>
and <a href="#map.std.list" shape="rect">Mapping Rules for Lists (&#167;3.16.2.3)</a>
apply.
</div></li><li><div class="p">If the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element
has a <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> element among its children,
or if it has a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> child
and the base type definition has <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>union</i></b>, 
then the mapping rules in 
<a href="#map.std.common" shape="rect">Common mapping rules for Simple Type Definitions (&#167;3.16.2.1)</a>
and <a href="#map.std.union" shape="rect">Mapping Rules for Unions (&#167;3.16.2.4)</a>
apply.
</div></li></ul>
</div><div class="div4">
<h5><a name="map.std.common" id="map.std.common" shape="rect"></a>3.16.2.1 Common mapping rules for Simple Type Definitions</h5><p>The following rules apply to all 
simple type definitions.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Simple_Type_Definition_details" shape="rect">Simple Type Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> 
if present on the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element, 
otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="mapRepr">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of 
the ancestor <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> 
element information item if present, 
otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="mapRepr">
   The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative is chosen, <b>then </b>the type definition <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>, if present, otherwise the
type definition corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>.</div><div class="clnumber">2 <b>If </b>the <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> or <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> alternative is chosen, <b>then </b><a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</div></div>
  </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="mapRepr">
A subset of 
<code>{</code><b><i>restriction</i></b>, <b><i>extension</i></b>, <b><i>list</i></b>,
<b><i>union</i></b><code>}</code>, determined as follows.
<span class="termdef"><a name="lt-vs" id="lt-vs" title="" shape="rect">[Definition:]&#160;&#160;</a>Let
<b>FS</b> be
the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>final</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, 
if present, otherwise the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>finalDefault</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the ancestor
<code>schema</code> element, 
if present, otherwise the empty string.</span>  Then the property value is
the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b><a href="#lt-vs" class="termref" shape="rect"><span class="arrow">&#183;</span>FS<span class="arrow">&#183;</span></a> is the empty string, <b>then </b>the empty set;</div><div class="clnumber">2 <b>If </b><a href="#lt-vs" class="termref" shape="rect"><span class="arrow">&#183;</span>FS<span class="arrow">&#183;</span></a> is 

"<code>#all</code>", <b>then </b><code>{</code><b><i>restriction</i></b>, <b><i>extension</i></b>, <b><i>list</i></b>,
<b><i>union</i></b><code>}</code>;</div><div class="clnumber">3 <b>otherwise </b>Consider <a href="#lt-vs" class="termref" shape="rect"><span class="arrow">&#183;</span>FS<span class="arrow">&#183;</span></a> as
a space-separated list, and include <b><i>restriction</i></b> if

"<code>restriction</code>" is in that list, and similarly for
<b><i>extension</i></b>, <b><i>list</i></b> and <b><i>union</i></b>.
</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="mapRepr">
  The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the
<code>name</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present, <b>then </b><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div><div class="clnumber">2 <b>otherwise </b>
     the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b>the parent element information item is <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>, <b>then </b>the corresponding <a href="#ad" class="compref" shape="rect">Attribute Declaration</a></div><div class="clnumber">2.2 <b>If </b>the parent element information item is <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>, <b>then </b>the corresponding <a href="#ed" class="compref" shape="rect">Element Declaration</a></div><div class="clnumber">2.3 <b>If </b>the parent element information item is <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> or <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a>, <b>then </b>the <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
corresponding to the grandparent <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element information item</div><div class="clnumber">2.4 <b>If </b><a name="anchor11290a" id="anchor11290a" shape="rect"></a>the parent element information item 
       is <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a>, <b>then </b>
	 
	 
	 the <a href="#ed" class="compref" shape="rect">Element Declaration</a> corresponding to the
       nearest enclosing <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information item</div><div class="clnumber">2.5 <b>otherwise </b>(the parent element information item is <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>), 
     the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">2.5.1 <b>If </b>the grandparent element information item is <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>, <b>then </b>the <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
corresponding to the grandparent</div><div class="clnumber">2.5.2 <b>otherwise </b>(the grandparent element information item
       is <a href="#element-simpleContent" class="eltref" shape="rect">&lt;simpleContent&gt;</a>), the <a href="#std" class="compref" shape="rect">Simple        Type Definition</a> which is the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a>.<a href="#ct-simple_type_definition" class="propref" shape="rect">{simple type definition}</a> of the
       <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>
       corresponding to the great-grandparent <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information item.</div></div>
    </div></div>
    </div></div>
 </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="mapRepr">If the <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> alternative is chosen,
then <b><i>list</i></b>, otherwise if the <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> alternative is
chosen, then <b><i>union</i></b>, otherwise (the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
alternative is chosen), then the <a href="#std-variety" class="propref" shape="rect">{variety}</a>
of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="mapRepr">The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative is chosen
  <b>and</b>

 
the children of the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element are all
either <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> elements,
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> elements, 
or elements which specify constraining facets 
supported by the processor, <b>then </b> 
the set of
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f" class="compref" shape="rect">Constraining Facet</a> components
obtained by 
<a href="#key-facets-overlay" class="termref" shape="rect"><span class="arrow">&#183;</span>overlaying<span class="arrow">&#183;</span></a> 
the <a href="#std-facets" class="propref" shape="rect">{facets}</a> of the
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> with the
set of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f" class="compref" shape="rect">Constraining Facet</a> components
corresponding to those <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> 
which specify facets, as defined in <a href="#st-restrict-facets" shape="rect">Simple Type Restriction (Facets) (&#167;3.16.6.4)</a>.</div><div class="clnumber">2 <b>If </b>the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative is chosen
  <b>and</b>
the children of the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element
include at least one element of which the processor has no
prior knowledge (i.e. not a <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element,
an <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element, or an element
denoting a constraining facet known to and 
supported by the processor), <b>then </b>the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element
maps to no component at all (but is not in error solely on account of
the presence of the unknown element).</div><div class="clnumber">3 <b>If </b>the <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> alternative is chosen, <b>then </b>a set with one member, a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w" class="compref" shape="rect">whiteSpace</a> facet with 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-value" class="xpropref" shape="rect">{value}</a> = <b><i>collapse</i></b> and <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-fixed" class="xpropref" shape="rect">{fixed}</a> = <b><i>true</i></b>.</div><div class="clnumber">4 <b>otherwise </b>the empty set</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="mapRepr">Based on
<a href="#std-variety" class="propref" shape="rect">{variety}</a>, <a href="#std-facets" class="propref" shape="rect">{facets}</a>,
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>, a set of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ff" class="compref" shape="rect">Fundamental Facet</a> components, one
each as specified in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-ordered" shape="rect">The ordered Schema Component </a>, <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-bounded" shape="rect">The bounded Schema Component </a>,
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-cardinality" shape="rect">The cardinality Schema Component </a> and <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-numeric" shape="rect">The numeric Schema Component </a>.</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
   
   
    The <a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the set of elements containing the
    <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>, and one of 
    the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>,
    <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> or <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> 
    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>,
    whichever is present,
    as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
   
  </div></div></div></div><div class="div4">
<h5><a name="map.std.atomic" id="map.std.atomic" shape="rect"></a>3.16.2.2 Mapping Rules for Atomic Simple Type Definitions</h5><p id="std.atomic.p">
The following rule applies if the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>atomic</i></b></p><p>

<span class="termdef"><a name="std-ancestor" id="std-ancestor" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>ancestors</b> of a 
<a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a> are its 
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and the 
<a href="#std-ancestor" class="termref" shape="rect"><span class="arrow">&#183;</span>ancestors<span class="arrow">&#183;</span></a> of its 
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</span>
(The ancestors of a 
<a href="#std" class="compref" shape="rect">Simple Type Definition</a> <var>T</var> in the type hierarchy are themselves
<a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definitions<span class="arrow">&#183;</span></a>; they are distinct from
the XML elements which may be ancestors, in the XML document
hierarchy, of the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element which 
declares <var>T</var>.)
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Simple_Type_Definition_details" shape="rect">Atomic Simple Type Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="mapRepr">From among the <a href="#std-ancestor" class="termref" shape="rect"><span class="arrow">&#183;</span>ancestors<span class="arrow">&#183;</span></a> of this <a href="#std" class="compref" shape="rect">Simple Type Definition</a>, that <a href="#std" class="compref" shape="rect">Simple Type Definition</a> which corresponds to a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-primitive" shape="rect">primitive</a> datatype.<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div></div></div></div><div class="div4">
<h5><a name="map.std.list" id="map.std.list" shape="rect"></a>3.16.2.3 Mapping Rules for Lists</h5><p id="std.list.p">If the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b>, the following additional
property mapping 

applies:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Simple_Type_Definition_details" shape="rect">List Simple Type Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="mapRepr">
    The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, <b>then </b>the <a href="#std" class="compref" shape="rect">Simple Type Definition</a> (a) <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> 
to by the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>itemType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a>,
or (b), corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a>, whichever is present.
      <div class="note"><div class="p"><b>Note:</b> In
this case, a <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> element will invariably be present; it will
invariably have either an <code>itemType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or a <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>, but not both.</div></div>
      </div><div class="clnumber">2 <b>otherwise </b>(that is, the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is not <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>), the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
       <div class="note"><div class="p"><b>Note:</b> In this case, a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element will invariably
be present.</div></div>
      </div></div>
   </div></div></div></div><div class="div4">
<h5><a name="map.std.union" id="map.std.union" shape="rect"></a>3.16.2.4 Mapping Rules for Unions</h5><p id="std.union.p">If the
<a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>union</i></b>, the following
additional property mapping  applies:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#Simple_Type_Definition_details" shape="rect">Union Simple Type Definition</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="mapRepr">The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, <b>then </b>the sequence of 
 <a href="#std" class="compref" shape="rect">Simple Type Definition</a>s (a) 
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by the items in the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>memberTypes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a>,
if any, and (b) 
corresponding to the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>s among
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a>, if any, in order.  

      <div class="note"><div class="p"><b>Note:</b> In
this case, a <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> element will invariably be present; it will
invariably have either a <code>memberTypes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or one or more <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, or both.</div></div>
</div><div class="clnumber">2 <b>otherwise </b>(that is, the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is not <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>), the <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
      <div class="note"><div class="p"><b>Note:</b> In this case, a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element will invariably
be present.</div></div></div></div>



   </div></div></div></div></div><div class="div3">
<h4><a name="sec-src-simple-type" id="sec-src-simple-type" shape="rect"></a>3.16.3 Constraints on XML Representations of Simple Type Definitions</h4><div class="constraintnote"><a id="src-simple-type" name="src-simple-type" shape="rect"></a><b>Schema Representation Constraint: Simple Type Definition Representation OK</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element information items by the schema for schema documents,
   <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
       No two elements among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of 
       <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> have the same 
       <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> in the Schema (<code>xs</code>) namespace, 
       unless that 
       <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> is one of 
       <code>xs:enumeration</code>,
       <code>xs:pattern</code>, or
       <code>xs:assert</code>.
     </span><div class="note"><div class="p"><b>Note:</b> That is, most of the facets for simple types defined
       by this specification are forbidden to occur more than once.
       But <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-enumeration" class="eltref" shape="rect">&lt;enumeration&gt;</a>,
       <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#element-pattern" class="eltref" shape="rect">&lt;pattern&gt;</a>, and
       <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> may occur multiple times,
       and facets defined in other namespaces and
       made available as extensions to this specification
       may occur multiple times.
       </div></div></div>
<div class="clnumber">2 <span class="p">If the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> alternative is chosen,
 it has 
either a <code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> 
or a <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but not
both.</span></div>
<div class="clnumber">3 <span class="p">If the <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> alternative is chosen, 
 it has 
either an <code>itemType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> 
or a <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> among its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>,
but not both.</span></div>
<div class="clnumber">4 <span class="p">
If the <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a> alternative is chosen, either it
has a non-empty <code>memberTypes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or it
has at least one <code>simpleType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>.</span></div>
</div>
  </div></div></div></div><div class="div3">
<h4><a name="sec-cvc-simple-type" id="sec-cvc-simple-type" shape="rect"></a>3.16.4 Simple Type Definition Validation Rules</h4><div class="constraintnote"><a id="cvc-simple-type" name="cvc-simple-type" shape="rect"></a><b>Validation Rule: String Valid</b><br clear="none" /><div class="constraint"><div class="p">For a string <var>S</var>
       to be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to a simple type definition 
       <var>T</var>
       <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of <var>S</var>, <var>N</var>, is calculated using
	  the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a>, and any other <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facets</a> associated with <var>T</var>, as described in the definition
	  of the term "<a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>".</span></div>
<div class="clnumber">2 <span class="p"><var>N</var> is schema-valid with respect to 
	  <var>T</var> as
	  defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-datatype-valid" shape="rect">Datatype
	   Valid</a> in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</span></div>
<div class="clnumber">3 <span class="p">Let <var>V</var> be the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <var>N</var> with respect to <var>T</var>. Then:</span><div class="p">Every
	 
	 <a href="#key-TYPE-value" class="termref" shape="rect"><span class="arrow">&#183;</span>ENTITY value<span class="arrow">&#183;</span></a>
	 in <var>V</var>
	 is a <a href="#key-vde" class="termref" shape="rect"><span class="arrow">&#183;</span>declared entity name<span class="arrow">&#183;</span></a>.</div></div>
</div>
 </div><div class="p"><div class="termdef"><a name="key-vtype" id="key-vtype" title="" shape="rect">[Definition:]&#160;&#160;</a>
  When a string <var>N</var> is schema-valid with respect to a simple type definition
  <var>T</var> as defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-datatype-valid" shape="rect">Datatype
  Valid</a> with the corresponding <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>V</var>,
  <div class="constraintlist"><div class="clnumber">1 <span class="p">
     The <b>validating type</b> of <var>V</var> is <var>T</var> if <var>T</var> is not a union type,
     otherwise the validating type is the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-basicmember" shape="rect">basic
     member</a> of <var>T</var>'s <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
     membership</a> which actually <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> <var>N</var>.
   </span></div>
<div class="clnumber">2 <span class="p">
     If the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of <var>V</var> is a list type <var>L</var> and the
     <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of <var>L</var> is <var>I</var>, then the
     <b>validating type</b> of an (atomic) item value <var>A</var> occurring in <var>V</var> is
     <var>I</var> if <var>I</var> is not a union type, otherwise the validating type is the 
     <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-basicmember" shape="rect">basic member</a> of
     <var>I</var>'s <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
     membership</a> which actually <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> the substring in <var>N</var>
     that corresponds to <var>A</var>.
   </span></div>
</div></div> 
  <span class="termdef"><a name="key-TYPE-value" id="key-TYPE-value" title="" shape="rect">[Definition:]&#160;&#160;</a>
    When the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of an <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is
    or is <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a simple type definition <var>T</var>, the value is also
    referred to as a <b><var>T</var> value</b>.
    </span>
    For example, an <b>ENTITY value</b> 
    is an
    <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> whose <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> is or is derived from the
    built-in simple type definition <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ENTITY" shape="rect">ENTITY</a>,
    and an <b>ID value</b> is one whose <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a>
    is or is derived from <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>.
  </div><div class="p"><span class="termdef"><a name="key-vde" id="key-vde" title="" shape="rect">[Definition:]&#160;&#160;</a>A string is a
  <b>declared entity name</b> if and only if it is equal to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed" class="xpropref" shape="rect">[name]</a> 
  of some unparsed entity information item in the value of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.document" class="xpropref" shape="rect">[unparsedEntities]</a> 
  property of the document information item at the root of the infoset
  containing the element or attribute information item whose <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>
  the string is.</span></div></div></div></div><div class="div3">
<h4><a name="sec-sic-simple-type" id="sec-sic-simple-type" shape="rect"></a>3.16.5 Simple Type Definition Information Set
Contributions</h4><p>None as such.</p></div><div class="div3">
<h4><a name="coss-st" id="coss-st" shape="rect"></a>3.16.6 Constraints on Simple Type Definition Schema Components</h4><div class="div4">
<h5><a name="sec-st-props-correct" id="sec-st-props-correct" shape="rect"></a>3.16.6.1 Simple Type Definition Properties Correct</h5><p>All simple type definitions <span class="rfc2119">must</span> satisfy both
       the following constraints.</p><div class="constraintnote"><a id="st-props-correct" name="st-props-correct" shape="rect"></a><b>Schema Component Constraint: Simple Type Definition Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a simple type
	  definition are as described in the property tableau in
	  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dc-defn" shape="rect">The Simple Type Definition
	    Schema Component</a>, modulo the impact of
	  <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.</span></div>
<div class="clnumber">2 <span class="p">All simple type definitions are, or are <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
	  ultimately from, <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> (so circular
	  definitions are disallowed).  That is, it is possible
	  to reach a  primitive datatype or <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> by
	  
	  following the <a href="#std-base_type_definition" class="propref" shape="rect">{base type     definition}</a> zero or more
	   times.</span></div>
<div class="clnumber">3 <span class="p">The <a href="#std-final" class="propref" shape="rect">{final}</a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> does not
	  contain <b><i>restriction</i></b>.</span></div>
<div class="clnumber">4 <span class="p">There is not
	  more than one member of <a href="#std-facets" class="propref" shape="rect">{facets}</a>
	  of the same kind.</span></div>
<div class="clnumber">5 <span class="p">Each member of <a href="#std-facets" class="propref" shape="rect">{facets}</a> is
	  supported by the processor.</span><div class="note"><div class="p"><b>Note:</b> As specified normatively elsewhere, all conforming
	   processors <span class="rfc2119">must</span> support the facets defined by 
	   <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>; support for additional facets is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
	   If a schema document applies an <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-f" shape="rect">unknown</a> facet,
	   the immediate result will be a violation of this constraint,
	   so that the simple type defined by means of that facet
	   will be excluded from the schema, and any references to it
	   will be treated as undischarged references.
	  </div></div></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-cos-st-restricts" id="sec-cos-st-restricts" shape="rect"></a>3.16.6.2 Derivation Valid (Restriction, Simple)</h5><div class="constraintnote"><a id="cos-st-restricts" name="cos-st-restricts" shape="rect"></a><b>Schema Component Constraint: Derivation Valid (Restriction, Simple)</b><br clear="none" /><div class="constraint"><div class="p"><a name="anchor11103a" id="anchor11103a" shape="rect"></a>
	For any <a href="#std" class="compref" shape="rect">Simple Type Definition</a> <var>D</var> whose 
	 <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is some 
	 <a href="#std" class="compref" shape="rect">Simple Type Definition</a> <var>B</var>,
	the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <b>If </b><var>D</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> =  
	   <b><i>atomic</i></b>, <b>then </b>
	   <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1<a id="c-base_atomic" name="c-base_atomic" shape="rect"> </a><span class="p">Either <var>D</var> is 
	      <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a>, or else <var>B</var> is an atomic simple type
	      definition. </span><div class="note"><div class="p"><b>Note:</b> 
	      The type
	       <a href="#key-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a> is an exception because its 
	      <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, whose
	       <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></div></div>
<div class="clnumber">1.2 <span class="p"><var>B</var>.<a href="#std-final" class="propref" shape="rect">{final}</a> 
	      does not contain <b><i>restriction</i></b>.</span></div>
<div class="clnumber">1.3 <!--* no span class='p' possible here *-->For each facet in <var>D</var>.<a href="#std-facets" class="propref" shape="rect">{facets}</a>
	      (call this <b>DF</b>) 
	      <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.3.1 <span class="p"><b>DF</b> is 	applicable to
		 <var>D</var>, as specified in 
		 <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-applicable-facets" shape="rect">Applicable
		 Facets</a>  of <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</span></div>
<div class="clnumber">1.3.2 <span class="p"><b>DF</b> satisfies the constraints
	         on facet components given in the appropriate subsection of
	         <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-facets" shape="rect">Constraining Facets</a>
          in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
	        </span></div>
</div>
	     </div>
</div></div><div class="clnumber">2 <b>If </b><var>D</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> 
	    = <b><i>list</i></b>, <b>then </b>
	   <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><var>D</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>
	      is not a special type definition and either
	      
	       <var>D</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> 
	      =
	      <b><i>atomic</i></b> or <var>D</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> =
	      <b><i>union</i></b> 
	      and
	      there 
	       are no
	       types whose <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b> among
	       the union's <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
		membership</a>.</span></div>
<div class="clnumber">2.2 The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">2.2.1 <b>If </b><var>B</var>
		is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>
	       , <b>then </b>
		<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.2.1.1 <span class="p"><var>D</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>.<a href="#std-final" class="propref" shape="rect">{final}</a>
		    does not contain <b><i>list</i></b>.</span></div>
<div class="clnumber">2.2.1.2 <span class="p"><a name="anchor6735" id="anchor6735" shape="rect"></a>
		   <var>D</var>.<a href="#std-facets" class="propref" shape="rect">{facets}</a> 
		   
		   contains only the
		   <b><i>whiteSpace</i></b> facet component
		    with <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-value" class="xpropref" shape="rect">{value}</a>
		    = <b><i>collapse</i></b> and
		    <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-fixed" class="xpropref" shape="rect">{fixed}</a>
		    = <b><i>true</i></b>.</span></div>
</div>
	       </div><div class="clnumber">2.2.2 <b>otherwise </b>
		<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.2.2.1 <span class="p"><var>B</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> 
		   = <b><i>list</i></b>.</span></div>
<div class="clnumber">2.2.2.2 <span class="p"><var>B</var>.<a href="#std-final" class="propref" shape="rect">{final}</a> 
		    does not contain <b><i>restriction</i></b>.</span></div>
<div class="clnumber">2.2.2.3 <span class="p"><var>D</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>
		   is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from 
		   <var>B</var>.<a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>, as defined in 
		   <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</span></div>
<div class="clnumber">2.2.2.4 <span class="p">All facets in <a href="#std-facets" class="propref" shape="rect">{facets}</a>
  		 are applicable to <var>D</var>, as specified in
		   <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-applicable-facets" shape="rect">Applicable
		   Facets</a>.</span></div>
<div class="clnumber">2.2.2.5 <span class="p">All facets in <a href="#std-facets" class="propref" shape="rect">{facets}</a>
	    satisfy the constraints on facet components given in the appropriate subsection
	    of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-facets" shape="rect">Constraining Facets</a>.
	   </span></div>
</div>
	       </div></div><div class="p">The first case above will apply when a list is <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-constructed" shape="rect">constructed</a> by
	      specifying an item type, the second when <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by restriction from another list.</div></div>
</div></div><div class="clnumber">3 <b>If </b><var>D</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> 
	   is <b><i>union</i></b>, <b>then </b>
	   <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p"><var>D</var>.<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>
	      does not contain a special type definition.</span></div>
<div class="clnumber">3.2 The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">3.2.1 <b>If </b><var>B</var> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>      
	       , <b>then </b>
		<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.2.1.1 <span class="p">All of the <a href="#std-member_type_definitions" class="propref" shape="rect">{member type       definitions}</a>  have a
		   <a href="#std-final" class="propref" shape="rect">{final}</a> which does not contain <b><i>union</i></b>.</span></div>
<div class="clnumber">3.2.1.2 <span class="p"><var>D</var>.<a href="#std-facets" class="propref" shape="rect">{facets}</a> 
		    
		   is empty.</span></div>
</div>
           </div><div class="clnumber">3.2.2 <b>otherwise </b>
		<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.2.2.1 <span class="p"><var>B</var>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> 
		   = <b><i>union</i></b>.</span></div>
<div class="clnumber">3.2.2.2 <span class="p"><var>B</var>.<a href="#std-final" class="propref" shape="rect">{final}</a> 
		    
		   does not contain
		   <b><i>restriction</i></b>.</span></div>
<div class="clnumber">3.2.2.3 <span class="p">Each type definition in 
		   <var>D</var>.<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>
		   is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from the corresponding type definition in 
		   <var>B</var>.<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>, as
		   defined in <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</span></div>
<div class="clnumber">3.2.2.4 <span class="p">All facets in <a href="#std-facets" class="propref" shape="rect">{facets}</a>
  		 are applicable to <var>D</var>, as specified in
		   <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-applicable-facets" shape="rect">Applicable
		   Facets</a>.</span></div>
<div class="clnumber">3.2.2.5 <span class="p">All facets in <a href="#std-facets" class="propref" shape="rect">{facets}</a>
	    satisfy the constraints on facet components given in the appropriate subsection
	    of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-facets" shape="rect">Constraining Facets</a>.
	   </span></div>
</div>
	       </div></div><div class="p">The first case above will apply when a union is
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-constructed" shape="rect">constructed</a> by specifying one or more member types, the second
when <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by restriction from another union.</div></div>
<div class="clnumber">3.3<a id="no-self-membership" name="no-self-membership" shape="rect"> </a><span class="p">
Neither 
<var>D</var> 
nor any type
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from it is a member of its
own <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive 
membership</a>.</span></div>
</div></div></div></div></div></div><p><span class="termdef"><a name="cd-st-restriction" id="cd-st-restriction" title="" shape="rect">[Definition:]&#160;&#160;</a>A
simple type definition <b>T</b> is a 
<b>valid restriction</b> of its <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
if and only if <b>T</b> satisfies constraint 
<a href="#cos-st-restricts" shape="rect">Derivation Valid (Restriction, Simple) (&#167;3.16.6.2)</a></span>.</p></div><div class="div4">
<h5><a name="sec-cos-st-derived-ok" id="sec-cos-st-derived-ok" shape="rect"></a>3.16.6.3 Type Derivation OK (Simple)</h5><p>The following constraint defines relations appealed to elsewhere in
this specification.</p><div class="constraintnote"><a id="cos-st-derived-ok" name="cos-st-derived-ok" shape="rect"></a><b>Schema Component Constraint: Type Derivation OK (Simple)</b><br clear="none" /><div class="constraint"><div class="p">For a simple type definition (call it <b>D</b>, for
<a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>) to be validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a type definition (call this
<b>B</b>, for base) subject to a set of blocking keywords
drawn from the set {<b><i>extension</i></b>,
<b><i>restriction</i></b>, <b><i>list</i></b>, <b><i>union</i></b>} (of which only
<b><i>restriction</i></b> is actually relevant; call this set <var>S</var>)
<b>one</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="c-stid" name="c-stid" shape="rect"> </a><span class="p">They are the same type definition.</span></div>
<div class="clnumber">2 <b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><b><i>restriction</i></b> is not in <var>S</var>, or in 
<b>D</b>.<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.<a href="#std-final" class="propref" shape="rect">{final}</a>;</span></div>
<div class="clnumber">2.2 <b>One or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.2.1 <span class="p"><b>D</b>.<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> = <b>B</b>.</span></div>
<div class="clnumber">2.2.2 <span class="p"><b>D</b>.<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> is not 
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> and is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <b>B</b>
given <var>S</var>,
as defined by this constraint.</span></div>
<div class="clnumber">2.2.3 <span class="p"><b>D</b>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> 
= <b><i>list</i></b> or <b><i>union</i></b> and <b>B</b> is <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2.2.4<a id="member_as_derived" name="member_as_derived" shape="rect"> </a><b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.2.4.1 <span class="p"><b>B</b>.<a href="#std-variety" class="propref" shape="rect">{variety}</a> =
<b><i>union</i></b>.</span></div>
<div class="clnumber">2.2.4.2 <span class="p"><b>D</b> is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a type definition <b>M</b> in <b>B</b>'s
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
membership</a> given <var>S</var>, as defined by this
constraint.</span></div>
<div class="clnumber">2.2.4.3 <span class="p">The <a href="#std-facets" class="propref" shape="rect">{facets}</a> property of <b>B</b>
and of any <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-interveningunion" shape="rect">intervening
union</a> datatypes is empty.</span><div class="note"><div class="p"><b>Note:</b> It is a consequence of this requirement that the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-value-space" shape="rect">value space</a>, <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-lexical-space" shape="rect">lexical space</a>, and
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-lexical-mapping" shape="rect">lexical
mapping</a> of <b>D</b> will be subsets of those of
<b>B</b>.
</div></div></div>
</div></div>
</div></div>
</div></div>
</div>    
</div></div></div><div class="note"><div class="p"><b>Note:</b> With respect to clause <a href="#c-stid" shape="rect">1</a>, see the Note on identity at
the end of <a href="#no-identity" shape="rect"> (&#167;3.4.6.5)</a> above.</div></div><div class="note"><div class="p"><b>Note:</b> When a simple type definition <var>S</var> is said to be 
"validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>" from a type definition <var>T</var>,
without mention of any specific set of blocking keywords,
then what is meant is that <var>S</var> is validly derived from
<var>T</var>, subject to the empty set of blocking keywords,
i.e. without any particular limitations.</div></div><div class="note"><div class="p"><b>Note:</b> It is a consequence of clause <a href="#member_as_derived" shape="rect">2.2.4</a> that
the constraint <a href="#cd-st-restriction" shape="rect"> (&#167;3.16.6.2)</a> can hold between
a <a href="#std" class="compref" shape="rect">Simple Type Definition</a> in the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive membership</a> of a union type, and the union type,
even though neither is actually <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from the other.  The 
slightly misleading terminology is retained for historical reasons
and for compatibility with version 1.0 of this specification.
</div></div></div><div class="div4">
<h5><a name="sec-st-restrict-facets" id="sec-st-restrict-facets" shape="rect"></a>3.16.6.4 Simple Type Restriction (Facets)</h5><div class="constraintnote"><a id="st-restrict-facets" name="st-restrict-facets" shape="rect"></a><b>Schema Component Constraint: Simple Type Restriction (Facets)</b><br clear="none" /><div class="constraint"><div class="p">For a simple type definition (call it <b>R</b>) to restrict another simple type
definition (call it <b>B</b>) with a
set of facets (call this <b>S</b>)
    <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="#std-variety" class="propref" shape="rect">{variety}</a>  of <b>R</b> is the same as that of <b>B</b>.</span></div>
<div class="clnumber">2 <span class="p">If <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>atomic</i></b>, the 
<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> of <b>R</b> is the same as that of <b>B</b>.</span></div>
<div class="clnumber">3<a id="c-fr" name="c-fr" shape="rect"> </a><span class="p">The <a href="#std-facets" class="propref" shape="rect">{facets}</a> of <b>R</b>
	   are the <a href="#std-facets" class="propref" shape="rect">{facets}</a> of
	    <var>B</var> <a href="#key-facets-overlay" class="termref" shape="rect"><span class="arrow">&#183;</span>overlaid<span class="arrow">&#183;</span></a> 
	    with <var>S</var>.</span><div class="p">Additional constraint(s) sometimes apply depending on the kind of
	   facet, see the appropriate sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-facets" shape="rect">4.3 Constraining
	    Facets</a>.</div></div>
</div>
   </div><div class="p">
     
     
     
     <div class="termdef"><a name="key-facets-overlay" id="key-facets-overlay" title="" shape="rect">[Definition:]&#160;&#160;</a>  
       Given two sets of facets <var>B</var> and <var>S</var>,
       the result of <b>overlaying</b> <var>B</var> with <var>S</var> is the set of facets <var>R</var>
       for which
       
	    
	    

	    
	    

	    
	    <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="fr1" name="fr1" shape="rect"> </a><span class="p">Every facet in <b>S</b> is in <b>R</b>.</span></div>
<div class="clnumber">2<a id="fr2" name="fr2" shape="rect"> </a><span class="p">
		Every facet in <b>B</b> is in <b>R</b>,
		unless
		
		it is  of the same kind as some
		facet in <b>S</b>,
		in which case it is not included in <b>R</b>.
	      </span></div>
<div class="clnumber">3 <span class="p">Every facet in <b>R</b> is required by clause <a href="#fr1" shape="rect">1</a>
		or clause <a href="#fr2" shape="rect">2</a> above.</span></div>
</div>
     </div>
   </div></div></div></div></div><div class="div3">
<h4><a name="builtin-stds" id="builtin-stds" shape="rect"></a>3.16.7 Built-in Simple Type Definitions</h4><div class="div4">
<h5><a name="sec-anySimpleType" id="sec-anySimpleType" shape="rect"></a>3.16.7.1 <code>xs:anySimpleType</code></h5><p>
The <a href="#std" class="compref" shape="rect">Simple Type Definition</a> of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anySimpleType" shape="rect">anySimpleType</a>
is
present in every schema.  
It has the following properties:</p><div class="scInstance"><div class="scHead"><a id="simple-ur-type-itself" name="simple-ur-type-itself" shape="rect">Simple Type Definition of anySimpleType</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">'<code>anySimpleType</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">'<code>http://www.w3.org/2001/XMLSchema</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal"><a href="#any-type-itself" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">The empty sequence</div></div></div></div><p>The definition
of <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> is the 
root of the simple type definition
 hierarchy, and as such mediates between the other simple type
 definitions, which all eventually trace back to it via their 
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> properties, 
and 
<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, which is
<em>its</em> <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</p></div><div class="div4">
<h5><a name="sec-anyAtomicType" id="sec-anyAtomicType" shape="rect"></a>3.16.7.2 <code>xs:anyAtomicType</code></h5><p>

 The <a href="#std" class="compref" shape="rect">Simple Type Definition</a> of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyAtomicType" shape="rect">anyAtomicType</a>
is present in every schema.  
It has the following properties:</p><div class="scInstance"><div class="scHead"><a id="aat-def" name="aat-def" shape="rect">Simple Type Definition of anyAtomicType</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">'<code>anyAtomicType</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">'<code>http://www.w3.org/2001/XMLSchema</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal"><a href="#simple-ur-type-itself" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>atomic</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">The empty sequence</div></div></div></div></div><div class="div4">
<h5><a name="xsd-error" id="xsd-error" shape="rect"></a>3.16.7.3 <code>xs:error</code></h5><p>A <a href="#std" class="compref" shape="rect">Simple Type Definition</a> for <a href="#key-error" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:error</code><span class="arrow">&#183;</span></a> is present in every schema
       by definition.  It has the following properties:</p><div class="scInstance"><div class="scHead"><a id="xsd-error-tableau" name="xsd-error-tableau" shape="rect">Simple Type Definition of <code>xs:error</code></a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">'<code>error</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">'<code>http://www.w3.org/2001/XMLSchema</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">{<b><i>extension</i></b>, <b><i>restriction</i></b>, 
	 <b><i>list</i></b>, <b><i>union</i></b>}</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal"><a href="#simple-ur-type-itself" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>union</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal">The empty sequence</div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">The empty sequence</div></div></div></div><div class="note"><div class="p"><b>Note:</b> The datatype <code>xs:error</code> has no valid instances
	(i.e. it has an empty value space and an empty lexical space).
	This is a natural consequence of its construction:  a value is
	a value of a union type if and only if it is a value of at
	least one member of the <a href="#std-member_type_definitions" class="propref" shape="rect">{member type   definitions}</a> of the union.  Since <code>xs:error</code> has
	no member type definitions, there can be no values which are
	values of at least one of its member types.  And since the value
	space is empty, the lexical space is also empty.</div><div class="p">The type <code>xs:error</code> is expected to be used
	mostly in conditional type assignment.  Whenever it serves as the
	<a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type definition for an attribute or element information
	item, that item will be invalid.</div></div></div><div class="div4">
<h5><a name="sec-builtin-primitives" id="sec-builtin-primitives" shape="rect"></a>3.16.7.4 Built-in primitive datatypes</h5><p>Simple type definitions corresponding to all the built-in
       primitive datatypes, namely <b><i>string</i></b>, <b><i>boolean</i></b>,
       <b><i>float</i></b>, <b><i>double</i></b>, <b><i>decimal</i></b>, <b><i>precisionDecimal</i></b>,
       <b><i>dateTime</i></b>, <b><i>duration</i></b>, <b><i>time</i></b>,
       <b><i>date</i></b>, <b><i>gMonth</i></b>, <b><i>gMonthDay</i></b>,
       <b><i>gDay</i></b>, <b><i>gYear</i></b>, <b><i>gYearMonth</i></b>,
       <b><i>hexBinary</i></b>, <b><i>base64Binary</i></b>,
       <b><i>anyURI</i></b>,
	<b><i>QName</i></b> and <b><i>NOTATION</i></b> (see the
       <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#built-in-primitive-datatypes" shape="rect">Primitive
	Datatypes</a> section of <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>) are present by
       definition in
       every schema
	as follows:</p><div class="scInstance"><div class="scHead"><a id="dummy-def" name="dummy-def" shape="rect">Simple Type Definition corresponding to the built-in primitive datatypes</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">[as appropriate]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">'<code>http://www.w3.org/2001/XMLSchema</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal"><a href="#aat-def" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal"><b><i>atomic</i></b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal">[this simple type
definition itself]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">{a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w" class="compref" shape="rect">whitespace</a> facet with 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-value" class="xpropref" shape="rect">[value]</a> =
<b><i>collapse</i></b> and <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-fixed" class="xpropref" shape="rect">[fixed]</a> = <b><i>true</i></b> in all cases except
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#string" shape="rect">string</a>, which has
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-value" class="xpropref" shape="rect">[value]</a> =
<b><i>preserve</i></b> and <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f-w-fixed" class="xpropref" shape="rect">[fixed]</a> = <b><i>false</i></b>}</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal"><p>[as appropriate]</p></div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">The empty sequence</div></div></div></div><p>
       All conforming implementations of this specification
       <span class="rfc2119">must</span> support all the primitive datatypes defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
       It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether additional primitive datatypes
       are supported, and whether, if so, they are automatically
       incorporated in every schema or not.  If <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>
       primitives are supported, the implementation <span class="rfc2119">must</span>
       satisfy the rules for <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> primitive datatypes
       described in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
      </p><p><span class="termdef"><a name="key-automatic" id="key-automatic" title="" shape="rect">[Definition:]&#160;&#160;</a>
	A type about which a processor possesses prior knowledge, and 
	which the processor can support without any declaration of the
	type being supplied by the user, is said to be <b>automatically known</b>
	to the processor.	
       </span></p><div class="note"><div class="p"><b>Note:</b> By their nature, primitive types can be supported by a
	processor only if <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to that processor.</div><div class="p">Types <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to a processor, whether primitive or
	derived, can be included automatically by that processor in
	all schemas, but need not be.  It is possible, for example,
	for a processor to have built-in prior knowledge of a set of
	primitive and derived types, but to include them in the schema
	only when the relevant namespace is explicitly imported, or a
	given run-time option is selected, or on some other
	conditions; such conditions are not defined by this
	specification.
       </div></div><div class="note"><div class="p"><b>Note:</b> The definition of "<a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a>" is not 
	intended to prevent implementations from allowing users
	to specify new primitive types.
	If an implementation defines a mechanism by which users can
	define or supply an implementation of a primitive type, then
	when those mechanisms are successfully used, such user-supplied
	types are <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to the implementation, as that term is
	used in this specification.</div></div></div><div class="div4">
<h5><a name="sec-other-builtins" id="sec-other-builtins" shape="rect"></a>3.16.7.5 Other built-in datatypes</h5><p>Similarly, simple type definitions corresponding to all the other built-in datatypes (see the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a> section
of <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>) are present by definition in
every schema, with properties as specified in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> and as
represented in XML in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#drvd.nxsd" shape="rect">Illustrative XML representations for the built-in ordinary type definitions</a>.</p><div class="scInstance"><div class="scHead"><a id="dummy-ddef" name="dummy-ddef" shape="rect">Simple Type Definition corresponding to the built-in ordinary datatypes</a></div><div class="pvlist"><div class="pvpair"><div class="pvProp"><b>Property</b></div><div class="pvVal"><b>Value</b></div></div><div class="pvpair"><div class="pvProp"><a href="#std-name" class="propref" shape="rect">{name}</a></div><div class="pvVal">[as appropriate]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a></div><div class="pvVal">'<code>http://www.w3.org/2001/XMLSchema</code>'</div></div><div class="pvpair"><div class="pvProp"><a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a></div><div class="pvVal">[as specified in the appropriate
sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-final" class="propref" shape="rect">{final}</a></div><div class="pvVal">The empty set</div></div><div class="pvpair"><div class="pvProp"><a href="#std-variety" class="propref" shape="rect">{variety}</a></div><div class="pvVal">[<b><i>atomic</i></b> or <b><i>list</i></b>, as specified in the appropriate
sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a></div><div class="pvVal">[if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is
<b><i>atomic</i></b>, then the <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-facets" class="propref" shape="rect">{facets}</a></div><div class="pvVal">[as specified in the appropriate
sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a></div><div class="pvVal">[as specified in the appropriate
sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a></div><div class="pvVal">if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is
<b><i>atomic</i></b>, then <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, otherwise as specified in the appropriate
sub-section of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a></div><div class="pvVal"><a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a></div></div><div class="pvpair"><div class="pvProp"><a href="#std-annotations" class="propref" shape="rect">{annotations}</a></div><div class="pvVal">As shown in the XML representations
of the ordinary built-in datatypes in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#drvd.nxsd" shape="rect">Illustrative XML representations for the built-in ordinary type definitions</a></div></div></div></div><p>
       All conforming implementations of this specification
       <span class="rfc2119">must</span> support all the built-in datatypes defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
       It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether additional derived types
       are <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to the implementation without declaration
       and whether, if so, they are automatically
       incorporated in every schema or not.
      </p></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#Simple_Type_Definitions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="Schemas" id="Schemas" shape="rect"></a>3.17 Schemas as a Whole</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.1 <a href="#Schema_details" shape="rect">The Schema Itself</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.2 <a href="#declare-schema" shape="rect">XML Representations of Schemas</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.2.1 <a href="#refSchemaConstructs" shape="rect">References to Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.2.2 <a href="#sec-refs-from-elsewhere" shape="rect">References to Schema Components from Elsewhere</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.3 <a href="#coxr.schemas" shape="rect">Constraints on XML Representations of Schemas</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.4 <a href="#sec-del-cvc-resolve-instance" shape="rect">Validation Rules for Schemas as a Whole</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.5 <a href="#sec-sic-schema-all" shape="rect">Schema Information Set Contributions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.5.1 <a href="#sec-sic-schema" shape="rect">Schema Information</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.5.2 <a href="#sec-sic-id" shape="rect">ID/IDREF Table</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.6 <a href="#coss-schema" shape="rect">Constraints on Schemas as a Whole</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.6.1 <a href="#sec-sch-props-correct" shape="rect">Schema Properties Correct</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.6.2 <a href="#sec-src-resolve" shape="rect">QName resolution (Schema Document)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.17.6.3 <a href="#sec-cvc-resolve-instance" shape="rect">QName resolution (Instance)</a><br clear="none" />
</div><p>A schema consists of a set of schema components.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.example.com/example"&gt;
  . . .
&lt;/xs:schema&gt;</pre></div><div class="exampleWrapper">
<div class="p">The XML representation of the skeleton of a schema.</div></div></div><div class="div3">
<h4><a name="Schema_details" id="Schema_details" shape="rect"></a>3.17.1 The Schema Itself</h4><p>At the abstract level, the schema itself is just a container
for its components.</p><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="s" id="s" shape="rect">Schema</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="s-annotations" shape="rect" id="s-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="s-type_definitions" shape="rect" id="s-type_definitions"></a><div class="pdName"><span class="propdef">{type definitions}</span></div>
<div class="pdDef">
A set of  <a href="#td" class="compref" shape="rect">Type Definition</a> components.  </div>
</div>
<div class="propDefn"><a name="s-attribute_declarations" shape="rect" id="s-attribute_declarations"></a><div class="pdName"><span class="propdef">{attribute declarations}</span></div>
<div class="pdDef">
A set of  <a href="#ad" class="compref" shape="rect">Attribute Declaration</a> components.  </div>
</div>
<div class="propDefn"><a name="s-element_declarations" shape="rect" id="s-element_declarations"></a><div class="pdName"><span class="propdef">{element declarations}</span></div>
<div class="pdDef">
A set of  <a href="#ed" class="compref" shape="rect">Element Declaration</a> components.  </div>
</div>
<div class="propDefn"><a name="s-attribute_group_definitions" shape="rect" id="s-attribute_group_definitions"></a><div class="pdName"><span class="propdef">{attribute group definitions}</span></div>
<div class="pdDef">
A set of  <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a> components.  </div>
</div>
<div class="propDefn"><a name="s-model_group_definitions" shape="rect" id="s-model_group_definitions"></a><div class="pdName"><span class="propdef">{model group definitions}</span></div>
<div class="pdDef">
A set of  <a href="#mgd" class="compref" shape="rect">Model Group Definition</a> components.  </div>
</div>
<div class="propDefn"><a name="s-notation_declarations" shape="rect" id="s-notation_declarations"></a><div class="pdName"><span class="propdef">{notation declarations}</span></div>
<div class="pdDef">
A set of  <a href="#nd" class="compref" shape="rect">Notation Declaration</a> components.  </div>
</div>
<div class="propDefn"><a name="s-identity-constraint_definitions" shape="rect" id="s-identity-constraint_definitions"></a><div class="pdName"><span class="propdef">{identity-constraint definitions}</span></div>
<div class="pdDef">
A set of  <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a> components.  </div>
</div>
</div></div>
</div>
</div>
</div><div class="div3">
<h4><a name="declare-schema" id="declare-schema" shape="rect"></a>3.17.2 XML Representations of Schemas</h4><p>A schema is represented in XML by one or more
     <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, that is, one or more <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
     element information items.  A <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> contains
     representations for a collection of schema components, e.g. type
     definitions and element declarations, which have a common
     <span class="anonRef">{target namespace}</span>.  A
     <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> which has one or more <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>
     element information items corresponds to a schema with components
     with more than one <span class="anonRef">{target
     namespace}</span>, see <a href="#src-import" shape="rect">Import Constraints and Semantics (&#167;4.2.6.2)</a>.</p><p>As always, the mapping rules
     given in this section apply after, not before, the appropriate
     <a href="#key-pre-processing" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-processing<span class="arrow">&#183;</span></a>.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>schema</code>&#160;Element Information Item et al.</div><div class="reprBody"><p class="element-syntax-1"><a id="element-schema" name="element-schema" shape="rect">&lt;schema</a><br clear="none" />&#160;&#160;attributeFormDefault = (<var>qualified</var> | <var>unqualified</var>)&#160;:&#160;unqualified<br clear="none" />&#160;&#160;blockDefault = 
  
  (<var>#all</var> | List of (<var>extension</var> | <var>restriction</var> | <var>substitution</var>))
 &#160;:&#160;''<br clear="none" />&#160;&#160;defaultAttributes = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;xpathDefaultNamespace = 
  
  (<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a> | (<var>##defaultNamespace</var> | <var>##targetNamespace</var> | <var>##local</var>))
 &#160;:&#160;##local<br clear="none" />&#160;&#160;elementFormDefault = (<var>qualified</var> | <var>unqualified</var>)&#160;:&#160;unqualified<br clear="none" />&#160;&#160;finalDefault = 
  
  (<var>#all</var> | List of (<var>extension</var> | <var>restriction</var> | <var>list</var> | <var>union</var>))
 &#160;:&#160;''<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;targetNamespace = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;version = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#token" shape="rect">token</a><br clear="none" />&#160;&#160;xml:lang = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#language" shape="rect">language</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>((<a href="#element-include" class="eltref" shape="rect">include</a> | <a href="#element-import" class="eltref" shape="rect">import</a> | <a href="#element-redefine" class="eltref" shape="rect">redefine</a> | <a href="#element-override" class="eltref" shape="rect">override</a> | <a href="#element-annotation" class="eltref" shape="rect">annotation</a>)*, (<a href="#element-defaultOpenContent" class="eltref" shape="rect">defaultOpenContent</a>, <a href="#element-annotation" class="eltref" shape="rect">annotation</a>*)?, ((<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a> | <a href="#element-complexType" class="eltref" shape="rect">complexType</a> | <a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a> | <a href="#element-element" class="eltref" shape="rect">element</a> | <a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-notation" class="eltref" shape="rect">notation</a>), <a href="#element-annotation" class="eltref" shape="rect">annotation</a>*)*)<br clear="none" />&lt;/schema&gt;</p><p class="element-syntax"><a id="element-defaultOpenContent" name="element-defaultOpenContent" shape="rect">&lt;defaultOpenContent</a><br clear="none" />&#160;&#160;appliesToEmpty = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;mode = (<var>interleave</var> | <var>suffix</var>)&#160;:&#160;interleave<br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?, <a href="#element-any" class="eltref" shape="rect">any</a>)<br clear="none" />&lt;/defaultOpenContent&gt;</p></div></div><p>The <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item
      maps to a <a href="#s" class="compref" shape="rect">Schema</a> component as follows.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Mapping Summary for <a href="#key-schema" shape="rect">Schema</a> <strong>Schema Component</strong></span></div><div class="reprBody"><div class="reprcomp"></div><div class="mapProp"><strong>Property</strong></div><div class="mapRepr"><strong>Representation</strong></div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-type_definitions" class="propref" shape="rect">{type definitions}</a></div><div class="mapRepr"><a name="anchor5918" id="anchor5918" shape="rect"></a>The simple and complex type definitions
       corresponding to all the <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> and 
       <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information items 
       in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any 
        
       definitions brought in via
       <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> (see <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
      multiple schema definition documents
       (<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>),
       <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> 
       (see <a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a>),
       <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> 
       (see <a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a>),
       and <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> 
       (see <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a>).
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-attribute_declarations" class="propref" shape="rect">{attribute declarations}</a></div><div class="mapRepr">
	 The (top-level) attribute declarations corresponding to all
	 the <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a> element information items in
	 the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any 
	  
	 declarations brought in via
	 <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, 
	 <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, 
	 <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, and 
	 <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a></div><div class="mapRepr">The (top-level)
       element declarations corresponding to all the 
       <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> element information items in the
       <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any 
        
       declarations brought in via
       <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, 
       <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, 
       <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, 
       and <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-attribute_group_definitions" class="propref" shape="rect">{attribute group definitions}</a></div><div class="mapRepr">The attribute group definitions
corresponding to all the <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a> element information items in the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any 
        definitions brought in via
         <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, 
	 <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
	 <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, and
         <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-model_group_definitions" class="propref" shape="rect">{model group definitions}</a></div><div class="mapRepr">The model group definitions
corresponding to all the <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> element information items in the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any 
        definitions brought in via
         <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> and
         <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-notation_declarations" class="propref" shape="rect">{notation declarations}</a></div><div class="mapRepr">The notation declarations
corresponding to all the <a href="#element-notation" class="eltref" shape="rect">&lt;notation&gt;</a> element information items in the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any 
        declarations brought in via
         <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, 
	 <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
	 <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, and
         <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity- constraint definitions}</a></div><div class="mapRepr">
	 The identity-constraint definitions corresponding to all the 
	 <a href="#element-key" class="eltref" shape="rect">&lt;key&gt;</a>, <a href="#element-keyref" class="eltref" shape="rect">&lt;keyref&gt;</a>, and 
	 <a href="#element-unique" class="eltref" shape="rect">&lt;unique&gt;</a> element information items anywhere 
	 within the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any, plus any 
	  
	 definitions brought in via
	 <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, 
	 <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, 
	 <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, and 
	 <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
       </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#s-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
        
        
         The <a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the set of elements containing the
         <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> and all the <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>,
         <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>,
         <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
         
         <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>,
          and <a href="#element-defaultOpenContent" class="eltref" shape="rect">&lt;defaultOpenContent&gt;</a>
         <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, if any,
         as defined in <a href="#declare-annotation" shape="rect">XML Representation of Annotation Schema Components (&#167;3.15.2)</a>.
        
       </div></div></div><p>Note that none of the attribute information items displayed
     above correspond directly to properties of schemas.  The
     <code>blockDefault</code>, <code>finalDefault</code>,
     <code>attributeFormDefault</code>,
     <code>elementFormDefault</code> and <code>targetNamespace</code>
     attributes are appealed to in the sub-sections above, as they
     provide global information applicable to many
     representation/component correspondences.  The other attributes
     (<code>id</code> and <code>version</code>) are for user
     convenience, and this specification defines no semantics for
     them.</p><p>The definition of the schema abstract data model in <a href="#concepts-data-model" shape="rect">XSD Abstract Data Model (&#167;2.2)</a> makes clear that most components have a
 <span class="anonRef">{target namespace}</span>.  Most components
 corresponding to representations within a given <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item will have a <span class="anonRef">{target namespace}</span> which corresponds to the
 <code>targetNamespace</code> attribute. </p><p>Since the empty string is not a legal namespace name,
     supplying an empty string for <code>targetNamespace</code> is
     incoherent, and is <em>not</em> the same as not specifying it
     at all.  The appropriate form of schema document corresponding to
     a <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>schema<span class="arrow">&#183;</span></a> whose components have no <a href="#ed-target_namespace" class="propref" shape="rect">{target namespace}</a> is one which has no
     <code>targetNamespace</code> attribute specified at all.</p><div class="note"><div class="p"><b>Note:</b> <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> 
discusses only instance document syntax for
elements and attributes; it therefore provides no direct framework for managing
the names of type definitions, attribute group definitions, and so on.
Nevertheless, the specification applies the target namespace facility uniformly to all
schema components, i.e. not only declarations but also definitions have a <span class="anonRef">{target namespace}</span>.</div></div><p>Although the example schema at the beginning of this section might be a complete XML document, <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
need not be the document element, but can appear within other documents.
Indeed there is no requirement that a schema correspond to a (text) document
at all:  it could correspond to an element information item constructed 'by
hand', for instance via a DOM-conformant API.</p><p>Aside from <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> and <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>,
which do not correspond directly to any schema component at all, each
of the element information items which <span class="rfc2119">may</span> appear in the content
of <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
corresponds to a schema component, and all except <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> are
named.  The sections below present each such item in turn, setting out
the components to which it 
corresponds.</p><div class="div4">
<h5><a name="refSchemaConstructs" id="refSchemaConstructs" shape="rect"></a>3.17.2.1 References to Schema Components</h5><p>Reference to schema components from a schema document is managed in
a uniform way, whether the component corresponds to an element
information item from the same schema document or is imported
(<a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a>) from an external schema
(which <span class="rfc2119">may</span>, but need not, correspond to an actual schema
document). The form of all such references is a <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>.</p><p><span class="termdef"><a name="gloss-QName" id="gloss-QName" title="" shape="rect">[Definition:]&#160;&#160;</a>A <b>QName</b> is a
name with an optional namespace qualification, as defined in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>.  When used in connection with the XML
representation of schema components or references to them, this refers
to the simple type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
as defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a></span>.
For brevity, the term <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>
is also used to refer to <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual values<span class="arrow">&#183;</span></a> in the value space of the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> simple type, which are
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> with a 

<span class="termdef"><a name="q-local" id="q-local" title="" shape="rect">[Definition:]&#160;&#160;</a><b>local name</b></span>
and a 
<span class="termdef"><a name="q-uri" id="q-uri" title="" shape="rect">[Definition:]&#160;&#160;</a><b>namespace name</b></span>.
</p><p><span class="termdef"><a name="gloss-NCName" id="gloss-NCName" title="" shape="rect">[Definition:]&#160;&#160;</a>An <b>NCName</b> is
a name with no colon, as defined in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>.  When used in connection with the XML
representation of schema components in this specification, this refers
to the simple type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a> as defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a></span>.</p><div class="note"><div class="p"><b>Note:</b> It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a
schema processor supports the definitions of <a href="http://www.w3.org/TR/xml-names11/#NT-QName" shape="rect">QName</a> and <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> found in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> or those found in <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a> or both.
</div></div><p><span class="termdef"><a name="key-resolve" id="key-resolve" title="" shape="rect">[Definition:]&#160;&#160;</a>
  A <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> in a schema document
  <b>resolves to</b> a component in a schema if and only if in the
  context of that schema the QName and the component together satisfy the rule
  <a href="#src-resolve" shape="rect">QName resolution (Schema Document) (&#167;3.17.6.2)</a>. A <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> in
  an input document, or a pair consisting of a local name and a namespace name, 
  <b>resolves to</b> a component in a schema if and only if in the
  context of that schema the QName (or the name + namespace pair) and the
  component together satisfy the rule <a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance) (&#167;3.17.6.3)</a>.
 </span></p><p>In each of the XML
representation expositions in the following sections, an attribute is shown as
having type <code>QName</code> if and only if it is
interpreted as referencing a schema component.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:xhtml="http://www.w3.org/1999/xhtml"
            xmlns="http://www.example.com"
            targetNamespace="http://www.example.com"&gt;
  . . .

  &lt;xs:element name="elem1" type="Address"/&gt;

  &lt;xs:element name="elem2" type="xhtml:blockquote"/&gt;

  &lt;xs:attribute name="attr1"
                type="xsl:quantity"/&gt;
  . . .
&lt;/xs:schema&gt;

</pre></div><div class="exampleWrapper">
<div class="p">The first of these is most probably a local reference, i.e. a reference
to a type
definition corresponding to a <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element information item
located elsewhere in the schema document, the other two refer to type
definitions from schemas for other namespaces and assume that their namespaces
have been declared for import.  See <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a> for a discussion of importing.</div></div></div></div><div class="div4">
<h5><a name="sec-refs-from-elsewhere" id="sec-refs-from-elsewhere" shape="rect"></a>3.17.2.2 References to Schema Components from Elsewhere</h5><p><a name="anchor5167a1" id="anchor5167a1" shape="rect"></a>
     The names of schema components such as type definitions and element
declarations are not of type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>:  they are not
unique within a schema, just within a symbol space.  This means that simple
fragment identifiers using these names
will not  work to reference schema components from outside
the context of schema documents.</p><p>The preferred way to refer to schema components
     is to use <a href="#ref-scds" shape="rect">[XML Schema: Component Designators]</a>, which defines a mechanism to designate
     schema components using the <code>xscd()</code> <a href="#ref-xpointer" shape="rect">[XPointer]</a>
     scheme.</p><p>Alternatively, references to specific
element information items in the schema document can be interpreted as to their
corresponding schema documents. This can be done using mechanisms supported by
<a href="#ref-xpointer" shape="rect">[XPointer]</a>, for example, by using shorthand pointers.
It is a matter for applications to specify whether they interpret
these
references 
as being to the relevant element information item (i.e. without
special recognition of the relation of schema documents to schema components) or as being to the
corresponding schema component.</p></div></div><div class="div3">
<h4><a name="coxr.schemas" id="coxr.schemas" shape="rect"></a>3.17.3 Constraints on XML Representations of Schemas</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-del-cvc-resolve-instance" id="sec-del-cvc-resolve-instance" shape="rect"></a>3.17.4 Validation Rules for Schemas as a Whole</h4><p>None as such.</p></div><div class="div3">
<h4><a name="sec-sic-schema-all" id="sec-sic-schema-all" shape="rect"></a>3.17.5 Schema Information Set Contributions</h4><div class="div4">
<h5><a name="sec-sic-schema" id="sec-sic-schema" shape="rect"></a>3.17.5.1 Schema Information</h5><div class="constraintnote"><a id="sic-schema" name="sic-schema" shape="rect"></a><b>Schema Information Set Contribution: Schema Information</b><br clear="none" /><div class="constraint"><div class="p">Schema components provide a wealth of information about the
basis of <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, which can often be useful for subsequent
processing.  Reflecting component structure into a form suitable for
inclusion in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is the way this specification provides for
making this information available.</div><div class="p">Accordingly, <span class="termdef"><a name="key-iso" id="key-iso" title="" shape="rect">[Definition:]&#160;&#160;</a> by an <b>item isomorphic</b> to a component is meant
an information item whose type is equivalent to the component's, with
one property per property of the component, with the same name, and
value either the same atomic value, or an information item
corresponding in the same way to its component value, recursively, as
necessary</span>.</div><div class="p">The <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>
has the following properties:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element or attribute&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-schema_information" name="e-schema_information" shape="rect"><span class="propdef">[schema information]</span></a></dt><dd>A
set of <b>namespace schema information</b> information
items, one for each namespace name which appears as the <span class="anonRef">{target namespace}</span> of any schema component in the
schema used for that assessment, and one for <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> if any schema component in the schema
had no <span class="anonRef">{target namespace}</span>.  Each
<b>namespace schema information</b> information item has the
following properties and values:
        <div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;namespace schema information&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="nsi-schema_namespace" name="nsi-schema_namespace" shape="rect"><span class="propdef">[schema namespace]</span></a></dt><dd>A
namespace name or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</dd><dt><a id="nsi-schema_components" name="nsi-schema_components" shape="rect"><span class="propdef">[schema components]</span></a></dt><dd>A (possibly empty) set of schema component information
items, each one an <a href="#key-iso" class="termref" shape="rect"><span class="arrow">&#183;</span>item isomorphic<span class="arrow">&#183;</span></a> to
a component whose <span class="anonRef">{target namespace}</span> is
the sibling <a href="#nsi-schema_namespace" class="propref" shape="rect">[schema namespace]</a> property above, drawn from
the schema used for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.</dd><dt><a id="nsi-schema_documents" name="nsi-schema_documents" shape="rect"><span class="propdef">[schema documents]</span></a></dt><dd>A
(possibly empty) set of <b>schema document</b> information
items, with properties and values as follows, for each schema document
which contributed components to the schema, and whose
<code>targetNamespace</code> matches the sibling <a href="#nsi-schema_namespace" class="propref" shape="rect">[schema namespace]</a> property above (or whose
<code>targetNamespace</code> was <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> but that contributed components to
that namespace by being <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>d by a schema document with that
<code>targetNamespace</code> as per
<a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
      multiple schema definition documents
       (<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>):
          <div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;schema document&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="sd-document_location" name="sd-document_location" shape="rect"><span class="propdef">[document location]</span></a></dt><dd>Either a URI reference, if available,
otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
           </dd><dt><a id="sd-document" name="sd-document" shape="rect"><span class="propdef">[document]</span></a></dt><dd>A document
information item, if available, otherwise <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</dd></dl>
</div>
</div>

         </dd></dl>
</div>
</div>

       </dd></dl>
</div>
</div>
<div class="p">The <a href="#nsi-schema_components" class="propref" shape="rect">[schema components]</a> property is provided for
processors which wish to provide a single access point to the
components of the schema which was used during <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.  Lightweight processors are free to leave it empty, but if it <em>is</em> provided, it <span class="rfc2119">must</span> contain at a minimum all the top-level (i.e. named) components which actually figured in the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, either directly or (because an anonymous component which figured is contained within) indirectly.</div></div></div></div><div class="div4">
<h5><a name="sec-sic-id" id="sec-sic-id" shape="rect"></a>3.17.5.2 ID/IDREF Table</h5><div class="constraintnote"><a id="sic-id" name="sic-id" shape="rect"></a><b>Schema Information Set Contribution: ID/IDREF Table</b><br clear="none" /><div class="constraint"><div class="p">In the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> a set of <b>ID/IDREF binding</b> information items 
is 
associated with the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;element&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="e-ii_table" name="e-ii_table" shape="rect"><span class="propdef">[ID/IDREF table]</span></a></dt><dd>A (possibly empty) set of
<b>ID/IDREF binding</b> information items, as specified below.</dd></dl>
</div>
</div>
<div class="p"><span class="termdef"><a name="key-eas" id="key-eas" title="" shape="rect">[Definition:]&#160;&#160;</a>Let the
	<b>eligible item set</b> be the set  
	consisting of every attribute or element
	information item</span> for which
       <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">its  <span class="anonRef">[validation context]</span> is the
	  <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">2 <span class="p"><a name="anchor9923" id="anchor9923" shape="rect"></a>
	  its <span class="anonRef">[schema actual value]</span> is
	  not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>;
	 </span></div>
<div class="clnumber">3 <span class="p"><a name="anchor10235" id="anchor10235" shape="rect"></a>
	  its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type definition
	  is the built-in simple type definition for 
	  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>,
	  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#IDREF" shape="rect">IDREF</a>, or
	  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#IDREFS" shape="rect">IDREFS</a>,
	  or a  type definition <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> or <a href="#key-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> 
	  directly (in a single derivation step) or 
	  indirectly (through one or more steps) from any 
	  of these.
	 </span></div>
</div></div><div class="note"><div class="p"><b>Note:</b> 
	The use of <span class="anonRef">[schema actual value]</span>
	in the definition of <a href="#key-eas" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible item set<span class="arrow">&#183;</span></a> above means that
	<b><i>default</i></b> or <b><i>fixed</i></b> value constraints <span class="rfc2119">may</span> play a
	part in the <a href="#key-eas" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible item set<span class="arrow">&#183;</span></a>.
       </div></div><div class="note"><div class="p"><b>Note:</b> 
	Element information items that have complex types with simple content
	can appear in the <a href="#key-eas" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible item set<span class="arrow">&#183;</span></a>.
       </div></div><div class="p"><a name="anchor10662b" id="anchor10662b" shape="rect"></a>Then there is one <b>ID/IDREF binding</b> in the <a href="#e-ii_table" class="propref" shape="rect">[ID/IDREF table]</a>
       for every distinct string which is an
       
       <a href="#key-TYPE-value" class="termref" shape="rect"><span class="arrow">&#183;</span>ID value<span class="arrow">&#183;</span></a>
       or an
       
       <a href="#key-TYPE-value" class="termref" shape="rect"><span class="arrow">&#183;</span>IDREF value<span class="arrow">&#183;</span></a>
       in the
       <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of a member of the <a href="#key-eas" class="termref" shape="rect"><span class="arrow">&#183;</span>eligible item set<span class="arrow">&#183;</span></a>.</div><div class="p">Each <b>ID/IDREF binding</b> has properties as follows:</div><div class="psviDef">
<div class="psviHeader">
<span class="psviDef">PSVI Contributions for</span>&#160;ID/IDREF binding&#160;information items
     </div>
<div class="psviBody">
<dl class="psvi">
<dt><a id="iib-id" name="iib-id" shape="rect"><span class="propdef">[id]</span></a></dt><dd>The string identified above.</dd><dt><a id="iib-binding" name="iib-binding" shape="rect"><span class="propdef">[binding]</span></a></dt><dd>A set consisting of every element information item for which
          <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">its <a href="#e-validation_context" class="propref" shape="rect">[validation context]</a> is the
<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">2 <span class="p">it has an attribute information item in
its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> or an element information item in its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
              
              whose <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is or contains
              the <a href="#iib-id" class="propref" shape="rect">[id]</a> of
this <b>ID/IDREF binding</b> and the
              corresponding type definition is or is <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
              <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>.</span></div>
</div>
        </dd></dl>
</div>
</div>
<div class="p">The net effect of the above is to have one entry for every string used as an
id, whether by declaration or by reference, associated with those elements, if
any, which actually purport to have that id.  See <a href="#cvc-id" shape="rect">Validation Root Valid (ID/IDREF) (&#167;3.3.4.5)</a> above
for the validation rule which actually checks for errors here.</div><div class="note"><div class="p"><b>Note:</b> The <b>ID/IDREF binding</b>
information item, unlike most other aspects of this
specification, is essentially an internal bookkeeping mechanism.  It is introduced to
support the definition of <a href="#cvc-id" shape="rect">Validation Root Valid (ID/IDREF) (&#167;3.3.4.5)</a> above. 
</div></div></div></div></div></div><div class="div3">
<h4><a name="coss-schema" id="coss-schema" shape="rect"></a>3.17.6 Constraints on Schemas as a Whole</h4><div class="div4">
<h5><a name="sec-sch-props-correct" id="sec-sch-props-correct" shape="rect"></a>3.17.6.1 Schema Properties Correct</h5><p>All schemas (see <a href="#Schemas" shape="rect">Schemas as a Whole (&#167;3.17)</a>) <span class="rfc2119">must</span> satisfy the following constraint.</p><div class="constraintnote"><a id="sch-props-correct" name="sch-props-correct" shape="rect"></a><b>Schema Component Constraint: Schema Properties Correct</b><br clear="none" /><div class="constraint"><b>All</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <span class="p">The values of the properties of a schema are as described in
the property tableau in
<a href="#Schema_details" shape="rect">The Schema Itself (&#167;3.17.1)</a>, modulo the impact of <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>;</span></div>
<div class="clnumber">2<a id="c-nmd" name="c-nmd" shape="rect"> </a><span class="p">None of the 
	  <a href="#s-type_definitions" class="propref" shape="rect">{type definitions}</a>,  
	  
	   <a href="#s-attribute_declarations" class="propref" shape="rect">{attribute declarations}</a>,
	  
	  <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>,
	  <a href="#s-attribute_group_definitions" class="propref" shape="rect">{attribute group definitions}</a>, 
	  <a href="#s-model_group_definitions" class="propref" shape="rect">{model group definitions}</a>,
	  
	  <a href="#s-notation_declarations" class="propref" shape="rect">{notation declarations}</a>, or
	   <a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a>
	   
	  properties contains two or more schema components with the
	  same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.</span></div>
</div></div></div></div><div class="div4">
<h5><a name="sec-src-resolve" id="sec-src-resolve" shape="rect"></a>3.17.6.2 QName resolution (Schema Document)</h5><div class="constraintnote"><a id="src-resolve" name="src-resolve" shape="rect"></a><b>Schema Representation Constraint: QName resolution (Schema Document)</b><br clear="none" /><div class="constraint"><div class="p">For a <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>
        to resolve to a schema component of a specified kind
        <b>all</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *-->That component is a member of the value of the appropriate
           property of the schema which corresponds to the schema
           document within which the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>
           appears, that is
           the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>the kind specified is simple or complex type definition, <b>then </b>the property is the <a href="#s-type_definitions" class="propref" shape="rect">{type definitions}</a>.</div><div class="clnumber">1.2 <b>If </b>the kind specified is attribute declaration, <b>then </b>the property is the <a href="#s-attribute_declarations" class="propref" shape="rect">{attribute declarations}</a>.</div><div class="clnumber">1.3 <b>If </b>the kind specified is element declaration, <b>then </b>the property is the <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>.</div><div class="clnumber">1.4 <b>If </b>the kind specified
              is attribute group, <b>then </b>the property is the <a href="#s-attribute_group_definitions" class="propref" shape="rect">{attribute group definitions}</a>.</div><div class="clnumber">1.5 <b>If </b>the kind specified is
              model group, <b>then </b>the property is the <a href="#s-model_group_definitions" class="propref" shape="rect">{model group definitions}</a>.</div><div class="clnumber">1.6 <b>If </b>the kind specified is notation declaration, <b>then </b>the property is the <a href="#s-notation_declarations" class="propref" shape="rect">{notation declarations}</a>.</div><div class="clnumber">1.7 <b>If </b>the kind specified is identity-constraint 
               definition, <b>then </b>the property is 
               the <a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint definitions}</a>.</div></div>
          </div>
<div class="clnumber">2 <span class="p">The
           component's <span class="anonRef">{name}</span> matches the <a href="#q-local" class="termref" shape="rect"><span class="arrow">&#183;</span>local
            name<span class="arrow">&#183;</span></a> of the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">3 <span class="p">The component's <span class="anonRef">{target namespace}</span> is identical to the <a href="#q-uri" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace name<span class="arrow">&#183;</span></a> of the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">4<a id="cl.qnr.nsdeclared" name="cl.qnr.nsdeclared" shape="rect"> </a>The appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">4.1 <b>If </b>the <a href="#q-uri" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace name<span class="arrow">&#183;</span></a> of the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, <b>then </b>
             <b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">4.1.1 <span class="p">The <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item of the schema document containing the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> has no <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</span></div>
<div class="clnumber">4.1.2 <span class="p">The <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item of the that schema document contains an <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element
                information item with no <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</span></div>
</div>
            </div><div class="clnumber">4.2 <b>otherwise </b>
             
             the <a href="#q-uri" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace name<span class="arrow">&#183;</span></a> of the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> is
             the same as
             <b>one</b> of the following:<div class="constraintlist"><div class="clnumber">4.2.1 <span class="p">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
                the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item of the schema document containing the <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">4.2.2 <span class="p">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of some
                <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element information item contained in the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item of that schema document.</span></div>
<div class="clnumber">4.2.3 <span class="p">
                
                <code>http://www.w3.org/2001/XMLSchema</code>.
               </span></div>
<div class="clnumber">4.2.4 <span class="p">
                
                <code>http://www.w3.org/2001/XMLSchema-instance</code>.
               </span></div>
</div></div></div></div>
</div>
       </div></div></div></div><div class="div4">
<h5><a name="sec-cvc-resolve-instance" id="sec-cvc-resolve-instance" shape="rect"></a>3.17.6.3 QName resolution (Instance)</h5><p>As the discussion above at <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> makes clear, 
at the level of schema components and <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, 
reference to components by name is normally not involved.  In a
few cases, however, qualified names appearing in information items being
<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> <span class="rfc2119">must</span> be resolved to schema 
components by such lookup.  The following
constraint is appealed to in these cases.</p><div class="constraintnote"><a id="cvc-resolve-instance" name="cvc-resolve-instance" shape="rect"></a><b>Validation Rule: QName resolution (Instance)</b><br clear="none" /><div class="constraint"><div class="p">A pair of a local name and a namespace name (or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>)
resolve to a schema component of a specified kind in the context of <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> by appeal to the appropriate
property of the schema being used for the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.  Each such property indexes components by name.  The property to use is determined by the kind of component specified, that is,
   the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1 <b>If </b>the kind specified is simple or complex type definition, <b>then </b>the property is the <a href="#s-type_definitions" class="propref" shape="rect">{type definitions}</a>.</div><div class="clnumber">2 <b>If </b>the kind specified is attribute declaration, <b>then </b>the property is the <a href="#s-attribute_declarations" class="propref" shape="rect">{attribute declarations}</a>.</div><div class="clnumber">3 <b>If </b>the kind specified is element declaration, <b>then </b>the property is the <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>.</div><div class="clnumber">4 <b>If </b>the kind specified
is attribute group, <b>then </b>the property is the <a href="#s-attribute_group_definitions" class="propref" shape="rect">{attribute group definitions}</a>.</div><div class="clnumber">5 <b>If </b>the kind specified is
model group, <b>then </b>the property is the <a href="#s-model_group_definitions" class="propref" shape="rect">{model group definitions}</a>.</div><div class="clnumber">6 <b>If </b>the kind specified is notation declaration, <b>then </b>the property is the <a href="#s-notation_declarations" class="propref" shape="rect">{notation declarations}</a>.</div></div>
   The component resolved to is the entry in the table whose <span class="anonRef">{name}</span> matches the local name of the pair and whose <span class="anonRef">{target namespace}</span> is identical to the namespace name of the pair.
  </div></div></div></div></div></div></div><div class="div1">
<h2><a name="composition" id="composition" shape="rect"></a>4 Schemas and Namespaces: Access and Composition</h2><p>This chapter defines the mechanisms by which this specification establishes the necessary
precondition for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, namely access to
one or more schemas. This chapter also sets out in detail the relationship
between schemas and namespaces, as well as mechanisms for
modularization of schemas, including provision for incorporating definitions
and declarations from one schema in another, possibly with modifications.</p><p><a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a> describes three levels of conformance for schema
processors, and <a href="#conformance" shape="rect">Schemas and Schema-validity Assessment (&#167;5)</a> provides a formal definition of
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. This section sets out
in detail the 3-layer architecture implied by the three conformance levels.
The layers
are: </p><ol class="enumar"><li><div class="p">The <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> core, relating schema components and instance
information items; </div></li><li><div class="p">Schema representation: the connections between XML
representations and schema components, including the
  relationships between namespaces and schema components; </div></li><li><div class="p">XSD web-interoperability guidelines: 
  connections
  from instance to schema (or schema document) and from schema document
  to schema (or schema document) for the WWW. </div></li></ol><p>Layer 1 specifies the manner in which a schema composed of schema components
can be applied to in the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of an  
element information item. Layer 2 specifies the use of <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
elements in XML documents as the standard XML representation for
schema information in a broad range of computer systems and execution
environments. To support interoperation over the World Wide Web in particular,
layer 3 provides a set of conventions for schema reference on the
Web. Additional details on each of the three layers 
are 
provided in the sections below.</p><div class="div2">
<h3><span class="nav"> <a href="#layer2" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="layer1" id="layer1" shape="rect"></a>4.1 Layer 1: Summary of the Schema-validity Assessment Core</h3><p>The fundamental purpose of the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> core is to define <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> for a single
element information item and its descendants, 
with respect to a
complex type
definition. All processors are required to implement this core predicate in a
manner which conforms exactly to this specification. </p><p><a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>Assessment<span class="arrow">&#183;</span></a> is defined with reference to
an <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a> (note <em>not</em> a 
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>).</p><p>As specified above, each schema component is associated directly or
indirectly with a target namespace, or explicitly with no namespace. In the case of multi-namespace documents,
components for more than one target namespace will co-exist in a schema.</p><p>Processors have the option to assemble (and perhaps to optimize or
pre-compile) the entire schema prior to the start of an 
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, or to
gather the schema lazily as individual components are required. In all
cases it is required that:</p><ul><li><div class="p">The processor succeed in locating the <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a>
  transitively required to complete an <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> (note that components derived
from <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a> can be integrated
with components obtained through other means);</div></li><li><div class="p">no definition or declaration changes once it has been established;</div></li><li><div class="p">if the processor chooses to acquire declarations and definitions
  dynamically, that there be no side effects of such dynamic acquisition that
  would cause the results of <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> to differ from that which would have
  been obtained from the same schema components acquired in bulk.</div></li></ul><div class="note"><div class="p"><b>Note:</b>  the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> core is defined in terms of schema components at the
abstract level, and no mention is made of the schema definition
syntax (i.e. <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>). Although many processors will acquire
schemas in this format, others <span class="rfc2119">may</span> operate on compiled representations, on a
programmatic representation as exposed in some programming language, etc.
</div></div><p>The obligation of a schema-aware processor as far as the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
core is concerned is to implement one or more of the options for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> given below in <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>. Neither the
choice of element information item for that <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, nor which of the
means of initiating <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> are used, is within the scope of this specification.</p><p>Although <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> is defined recursively, it is also intended to be
implementable in streaming
processors.  Such processors <span class="rfc2119">may</span> choose to incrementally assemble the schema during
processing in response, for example, to encountering new namespaces. 
The implication of the
invariants expressed above is that such incremental assembly <span class="rfc2119">must</span>
result in an <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> 
outcome that is the 
<em>same</em> as would
be given if <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> were 
undertaken again
with the final, fully assembled schema. </p></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#layer1" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#composition-instances" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="layer2" id="layer2" shape="rect"></a>4.2 Layer 2: Schema Documents, Namespaces and Composition</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.1 <a href="#composition-concepts" shape="rect">Basic concepts of schema construction and composition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.2 <a href="#cip" shape="rect">Conditional inclusion</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.3 <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
      multiple schema definition documents
       (&lt;include&gt;)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.4 <a href="#modify-schema" shape="rect">Including modified component definitions (&lt;redefine&gt;)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.5 <a href="#override-schema" shape="rect">Overriding component definitions (&lt;override&gt;)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.6 <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (&lt;import&gt;)</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.6.1 <a href="#composition-importLicenseReferences" shape="rect">Licensing References to Components Across Namespaces</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.6.2 <a href="#schemaLocationHints" shape="rect">Providing Hints for Imported Schema Document Locations</a><br clear="none" />
</div><p>The sub-sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> define an
XML representation for type definitions and element declarations and so on,
specifying their target namespace and collecting them into schema documents.

The following sections describe how to
assemble a complete schema from multiple sources.</p><div class="note"><div class="p"><b>Note:</b>  The core <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
architecture requires that a complete schema with all the necessary
declarations and definitions be available. 
This will
sometimes involve resolving both instance &#8594; schema 
(or schema document)
and schema-document &#8594; schema 
(or schema document) references. 
As observed earlier in <a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a>,  the
precise mechanisms for resolving such references are expected to
evolve over time. In support of such evolution, this specification
observes the design principle that references from one schema document
to a schema use mechanisms that directly parallel those used to
reference a schema from an instance document.</div></div><div class="note"><div class="p"><b>Note:</b> In the sections below, "schemaLocation" really belongs at layer 3. 
For convenience, it is documented with the layer 2 mechanisms of import and
include, with which it is closely associated.</div></div><div class="div3">
<h4><a name="composition-concepts" id="composition-concepts" shape="rect"></a>4.2.1 Basic concepts of schema construction and composition</h4><p>
      When a schema is assembled from multiple sources, those sources
      can include both <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a> and other sources of 
      components.  Several of the mechanisms described below
      allow a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> to refer to a schema, either
      by giving the target namespace of its components,
      or indirectly, by referring to a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> (and
      thus implicitly to the schema corresponding to that <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>).
     </p><p>
      The sections that follow appeal often to the following
      concepts.</p><div class="glist"><div class="gitem"><div class="giLabel"><a name="key-pre-processing" id="key-pre-processing" shape="rect"></a>pre-processing</div><div class="giDef"><div class="p">The pre-processing of a schema document before
	 attempting to map its contents into components,
	 or the pre-processing of a set of components
	 before they take their final form among the
	 components of a schema being constructed.
	 The following sections define several forms of
	 pre-processing, including:
	 conditional-inclusion pre-processing,
	 chameleon pre-processing,
	 redefinition pre-processing,
	 and 
	 override pre-processing.
	 Conditional-inclusion pre-processing is always performed first;
	 the sequence in which other forms of pre-processing 
	 are applied varies; details are given below.
	</div></div></div><div class="gitem"><div class="giLabel"><a name="key-vc-preprocessing" id="key-vc-preprocessing" shape="rect"></a>conditional-inclusion pre-processing</div><div class="giDef"><div class="p">The process of applying to a schema document the
	 filtering described in section <a href="#cip" shape="rect">Conditional inclusion (&#167;4.2.2)</a>.
	 This pre-processing is usually assumed silently; when
	 it is explicitly described, then 
	 for a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> <var>D</var>, the result of conditional-inclusion 
	 pre-processing of <var>D</var> is written "<var>ci</var>(<var>D</var>)".
	</div></div></div><div class="gitem"><div class="giLabel"><a name="key-imm-components" id="key-imm-components" shape="rect"></a>immediate components</div><div class="giDef"><div class="p">The immediate components of a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> <var>D</var>
	 are the components corresponding to its definition and 
	 declaration <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>; also written
	 "<var>immed</var>(<var>D</var>)".</div></div></div><div class="gitem"><div class="giLabel"><a name="key-inter-sc-ref" id="key-inter-sc-ref" shape="rect"></a>inter-schema-document references</div><div class="giDef"><div class="p">The 
	 <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>,
	 <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>,
	 <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, and
	 <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> elements defined below.
	</div></div></div><div class="gitem"><div class="giLabel"><a name="key-corresponding-schema" id="key-corresponding-schema" shape="rect"></a>corresponding schema</div><div class="giDef"><div class="p">The schema corresponding to a given <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> <var>D</var>
	 is the schema containing the built-in components,
	 the <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> components automatically included
	 in the schema by the schema processor, 
	 <a href="#key-imm-components" class="termref" shape="rect"><span class="arrow">&#183;</span><var>immed</var>(<var>D</var>)<span class="arrow">&#183;</span></a>,
	 and the 
	 components included by virtue of the inter-schema-document
	 references included in <var>D</var> (for which see the rules below),
	 and no other components.
	 Also written
	 "<var>schema</var>(<var>D</var>)".</div></div></div><div class="gitem"><div class="giLabel"><a name="key-tns-f" id="key-tns-f" shape="rect"></a>target namespace</div><div class="giDef"><div class="p">The target namespace specified in a schema document <var>D</var>;
	 also written
	 "<var>tns</var>(<var>D</var>)".
	</div></div></div><div class="gitem"><div class="giLabel"><a name="key-chameleon-pre-processing" id="key-chameleon-pre-processing" shape="rect"></a>chameleon pre-processing</div><div class="giDef"><div class="p">The application, to a schema document <var>D</var>, of the 
	 transformation specified in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a>,
	 with respect to some namespace <var>N</var>, so as to convert
	 it to use <var>N</var> as its target namespace;
	 also written
	 "<var>chameleon</var>(<var>N</var>,<var>D</var>)".
	</div></div></div><div class="gitem"><div class="giLabel"><a name="key-override-pre-processing" id="key-override-pre-processing" shape="rect"></a>override pre-processing</div><div class="giDef"><div class="p">The application, to a schema document <var>D</var>, of the 
	 overrides specified in an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
	 element <var>E</var>, using the rules specified in detail
	 in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>;
	 also written
	 "<var>override</var>(<var>E</var>,<var>D</var>)".
	</div></div></div><div class="gitem"><div class="giLabel"><a name="key-redefine-pre-processing" id="key-redefine-pre-processing" shape="rect"></a>redefine pre-processing</div><div class="giDef"><div class="p">The application, to a schema <var>S</var>, of the 
	 redefinitions specified in an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
	 element <var>E</var>, using the rules specified in detail
	 in <a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a>;
	 also written
	 "<var>redefine</var>(<var>E</var>,<var>S</var>)".
	</div></div></div></div><div class="note"><div class="p"><b>Note:</b> This specification defines several attributes to allow
       schema documents and XML instance documents to provide
       information about the location of relevant schema components.
       Experience has shown that the similarities and differences
       among these attributes can be elusive for some readers; a
       compact overview may be helpful.</div><div class="p">
       The <code>xsi:schemaLocation</code> and
       <code>xsi:noNamespaceSchemaLocation</code> attributes
       may validly appear on elements in an XML instance
       document.  They are technically <b>hints</b>:  
       conforming schema-aware processors <span class="rfc2119">may</span> but need not
       attempt to dereference the schema documents named
       in these attributes and include the components described
       there in the schema used for validation.
      </div><div class="p">
       The <code>schemaLocation</code> attribute on the 
       <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element in a schema document is
       similarly a hint:  a conformaing schema-aware
       processor <span class="rfc2119">may</span> but need not attempt to dereference
       the schema document named by the attribute.
      </div><div class="p">
       The <code>schemaLocation</code> attributes on the
       <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, and 
       <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> elements in a schema document, on the
       other hand, are not hints: conforming processors <span class="rfc2119">must</span> attempt
       to de-reference the schema document named by the attribute.
       For non-empty <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> elements, it is
       an error for the attempt to fail; otherwise, the
       attempt <span class="rfc2119">must</span> be made but it is not an error for it
       to fail.
      </div><div class="p">In all cases, the use of the attribute in a document
       indicates 
       the existence of a suitable schema document
       at the location indicated.  This is stated explicitly
       below for some attributes, but not for all; where not
       stated explicitly, the inference follows implicitly
       from other rules.
      </div></div></div><div class="div3">
<h4><a name="cip" id="cip" shape="rect"></a>4.2.2 Conditional inclusion</h4><p>Whenever a conforming XSD processor reads a
      <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> in order to include the components defined
      in it in a schema, it first performs on the schema document
      the pre-processing described in this section.</p><p>Every element in the <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> is examined to
      see whether any of
      the attributes <code>vc:minVersion</code>,
      <code>vc:maxVersion</code>,
       <code>vc:typeAvailable</code>,  
       <code>vc:typeUnavailable</code>,
       <code>vc:facetAvailable</code>, or 
       <code>vc:facetUnavailable</code>
      
      appear among its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.
     </p><p>
      Where they appear, the
      attributes <code>vc:minVersion</code> 
       and <code>vc:maxVersion</code> are treated as if declared
      with type <code>xs:decimal</code>, and their <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual values<span class="arrow">&#183;</span></a> are compared to a decimal
      value representing the version of XSD supported by the
      processor (here represented as a variable <var>V</var>).  For processors
      conforming to this version of this specification, the value of
      <var>V</var> is 1.1.
     </p><p>
      If <var>V</var> is less than the value of 
      <code>vc:minVersion</code>, or
      if <var>V</var> is greater than  or equal to the value of 
      <code>vc:maxVersion</code>, 
      then the element on which the attribute appears is
      to be ignored, along with all its
      attributes and
      descendants.
      The effect is that portions of the
       schema document marked with <code>vc:minVersion</code> and/or
       <code>vc:maxVersion</code> are retained if 
       <code>vc:minVersion</code> &#8804; <var>V</var> &lt; <code>vc:maxVersion</code>.
     </p><p>
      Where they appear, the attributes <code>vc:typeAvailable</code>
      and <code>vc:typeUnavailable</code> are treated as if declared
      with type <code>list of xs:QName</code>, and the items in their
      <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual values<span class="arrow">&#183;</span></a> are checked to see whether they name types
      <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to the processor. The attributes
      <code>vc:facetAvailable</code> and <code>vc:facetUnavailable</code>
      are similarly typed, and checked to see if they name facets
      supported by the processor.
     </p><div class="block">
      If an element in a schema document has any of the following:
      <ol class="enumar"><li><div class="p"><code>vc:typeAvailable</code> = <var>T</var>, where any item in the
	 <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>T</var> is <em>not</em> the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of some   type definition <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to the
	 processor
	</div></li><li><div class="p">
	 <code>vc:typeUnavailable</code> = <var>T</var>, where
	 
	 every item in the
	 <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>T</var> is the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of some  type
	 definition <a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> to and supported by the processor
	</div></li><li><div class="p"><code>vc:facetAvailable</code> = <var>F</var>, where any item in the
	 <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>F</var> is not the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of some  facet
	 known to and supported by the processor</div></li><li><div class="p">
	 <code>vc:facetUnavailable</code> = <var>F</var>, where
	 
	 every item in the
	 <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>F</var> is the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of some facet known to and supported
	 by the processor</div></li></ol>
      then the element on which the attribute appears is to be
      ignored, along with all its attributes and descendants.</div><div class="note"><div class="p"><b>Note:</b> It is expected that <code>vc:typeAvailable</code> etc. will be
       most useful in testing for <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> primitive datatypes
       and facets, or for derived types for which the processor
       supplies a definition automatically. The rules just given do
       not, however, attempt to restrict their use to such tests.  If
       the <code>vc:typeAvailable</code> attribute is used with the 
       <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
       associated with one of the built-in primitive datatypes, the
       datatype will (in a conforming processor) always be available,
       so the test is unlikely to filter out any elements, ever, from
       the schema document. But such a usage is not in itself an
       error.
      </div></div><div class="note"><div class="p"><b>Note:</b> The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> of the built-in datatypes are as specified
       in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>; the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of any <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> datatype
       is required by <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> to be specified by the implementation.
      </div></div><div class="note"><div class="p"><b>Note:</b> The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> of the facets (built-in or <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>)
       are the <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> of the elements used in XSD schema documents
       to apply the facets, e.g. <code>xs:pattern</code> for the <b><i>pattern</i></b>
       facet.
      </div></div><div class="note"><div class="p"><b>Note:</b> It is a consequence of the rules given above that
       if the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <code>vc:typeAvailable</code> is the empty list
       (i.e. <code>vc:typeAvailable=""</code>), then the corresponding element
       is <em>not</em> ignored. (It does not list any type that is
       not available.)  Conversely, if the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of
       <code>vc:typeUnavailable</code> is the empty list, then the corresponding
       element is ignored. Similar results hold for
       <code>vc:facetAvailable</code> and <code>vc:facetUnavailable</code>.</div></div><p>
      The pre-processing of a schema document <var>S1</var> results
      in a second schema document <var>S2</var>, identical to <var>S1</var>
      except that all elements and
      attributes in <var>S1</var> which are to be ignored
      are absent from <var>S2</var>.  
      We write <var>S2</var> = <var>ci</var>(<var>S1</var>).
      If the <code>&lt;schema&gt;</code>
      element information item in <var>S1</var> is to be ignored, then <var>S2</var> is identical
      to <var>S1</var> except that any attributes other than <code>targetNamespace</code>,
      <code>vc:minVersion</code> or <code>vc:maxVersion</code> are removed from its
      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>, and its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> is the empty sequence.
      It is <var>S2</var>, not <var>S1</var>, which
      is required to conform to this specification.
     </p><div class="note"><div class="p"><b>Note:</b> If <var>S1</var> contains no elements 
      or attributes to be ignored, then <var>S1</var> and 
       <var>S2</var> are identical.</div></div><p>Except where conditional-inclusion pre-processing is
      explicitly mentioned, references to <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>
      elsewhere in this specification invariably refer to
      the result of the pre-processing step described here,
      not to its input, which need not, and in the general
      case will not, always conform to the rules for 
      schema documents laid out in this specification.
     </p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">Suppose some future version of XSD (say, version 3.2)
       introduces a new form of element declaration. A schema author 
       might wish to exploit that new form of declaration if
       possible, but wish also to ensure that the schema
       document can be handled successfully by a processor
       written for XSD 1.1.  In such a case, a schema document
       of the following form would be handled correctly by a
       conforming XSD 1.1 processor:</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"&gt;

  &lt;xs:element name="e" vc:minVersion="3.2"&gt;
    &lt;!--* declaration suitable for 3.2 
        * and later processors *--&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="e" 
    vc:minVersion="1.1"
    vc:maxVersion="3.2"&gt;
    &lt;!--* declaration suitable for processors
        * supporting versions 1.1 through versions
        * up to (but not including) 3.2
        *--&gt;
  &lt;/xs:element&gt;
  ...
&lt;/xs:schema&gt;
</pre></div><div class="exampleWrapper">
<div class="p">      
       Even though the schema document as shown has two element
       declarations for element <code>e</code> and thus 
       violates clause <a href="#c-nmd" shape="rect">2</a> of constraint
       <a href="#sch-props-correct" shape="rect">Schema Properties Correct (&#167;3.17.6.1)</a>, the pre-processing step
       described in this section filters out the first element
       declaration, making it possible for the resulting schema
       document to be valid and to conform to this specification.
      </div></div><div class="exampleWrapper">
<div class="p">
       Note that the semantics of the <code>vc:maxVersion</code> attribute is
       "exclusive". This makes it easier for schema authors to use this feature
       without leaving gaps 
       
       in the numeric ranges used to select version numbers.
      </div></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<p>Suppose that a processor supports an <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> primitive
       named <code>xpath_expression</code> in namespace
       "<code>http://example.org/extension_types</code>",
       and is presented with the following schema document:
      </p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema 
 xmlns:xs="http://www.w3.org/2001/XMLSchema" 
 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
 xmlns:tns="http://example.org/extension_types"
 targetNamespace="http://example.org/extension_types" &gt;

 &lt;xs:element vc:typeAvailable="tns:xpath_expression"
          name="e" type="tns:xpath_expression" /&gt;
 &lt;xs:element vc:typeUnavailable="tns:xpath_expression"
          name="e" type="string" /&gt;
&lt;/xs:schema&gt;</pre></div><div class="exampleWrapper">
<p>The effect of conditional inclusion is to include the
       first declaration for <code>e</code> and omit the second, so
       that the effective schema document, after pre-processing
       for conditional inclusion, is:
      </p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema 
 xmlns:xs="http://www.w3.org/2001/XMLSchema" 
 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
 xmlns:tns="http://example.org/extension_types"
 targetNamespace="http://example.org/extension_types" &gt;

 &lt;xs:element vc:typeAvailable="tns:xpath_expression"
          name="e" type="tns:xpath_expression" /&gt;
&lt;/xs:schema&gt;</pre></div><div class="exampleWrapper">
<p>A processor which does not support type "tns:xpath_expression",
       by contrast, will use the other declaration for <code>e</code>:
       type in the namespace in question</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema 
 xmlns:xs="http://www.w3.org/2001/XMLSchema" 
 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
 xmlns:tns="http://example.org/extension_types"
 targetNamespace="http://example.org/extension_types" &gt;

 &lt;xs:element vc:typeUnavailable="tns:xpath_expression"
          name="e" type="string" /&gt;
&lt;/xs:schema&gt;</pre></div></div><div class="constraintnote"><a id="src-cip" name="src-cip" shape="rect"></a><b>Schema Representation Constraint: Conditional Inclusion Constraints</b><br clear="none" /><div class="constraint"><div class="p">Whenever the attribute <code>vc:minVersion</code> or
       <code>vc:maxVersion</code> appears on an element information item in a
       <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>, its <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> 
       <span class="rfc2119">must</span> 
       be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
       with respect to <code>xs:decimal</code> as per
       <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</div><div class="p">Whenever any of the attributes 
       <code>vc:typeAvailable</code>,
       <code>vc:typeUnavailable</code>,
       <code>vc:facetAvailable</code>, or
       <code>vc:facetUnavailable</code>,
       appears on an element information item in a
       <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>, its <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> 
       <span class="rfc2119">must</span> 
       be locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a>
       with respect to a simple type definition with
       <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>
       and
       <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> = 
       <code>xs:QName</code>, as per
       <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</div><div class="p">

       Any attribute from the <code>vc:</code> namespace that appears 
       on an element information item in a
       <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> <span class="rfc2119">should</span> be one of the attributes described
       elsewhere in this document (i.e. one of 
       <code>vc:minVersion</code>, <code>vc:maxVersion</code>, <code>vc:typeAvailable</code>,
       <code>vc:typeUnavailable</code>, <code>vc:facetAvailable</code>, or
       <code>vc:facetUnavailable</code>).
       <div class="note"><div class="p"><b>Note:</b> 
	 Processors are encouraged to issue warnings about
	 <code>vc:</code> attributes other than those named,
  but it is not an error for such
	 attributes to appear in a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>.  The rule just
	 given is formulated with a "<span class="rfc2119">should</span>" and not
	 a "<span class="rfc2119">must</span>" in order to preserve the ability of
	 future versions of this specification to add new attributes
	 to the schema-versioning namespace.
       </div></div>
      </div></div></div></div><div class="div3">
<h4><a name="compound-schema" id="compound-schema" shape="rect"></a>4.2.3 Assembling a schema for a single target namespace from
      multiple schema definition documents
       (<code>&lt;include&gt;</code>)</h4><p>Schema components for a single target namespace can be
      assembled from several <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, that is several
      <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
      element information items: </p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>include</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-include" name="element-include" shape="rect">&lt;include</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>schemaLocation</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/include&gt;</p></div></div><p>A <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item <span class="rfc2119">may</span> contain any
      number of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements. Their
      <code>schemaLocation</code> attributes, consisting of a URI reference,
      identify other <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, that is <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information items. 
     </p><p>If two <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements 
      specify the same schema location (after resolving
      relative URI references) then they refer to the same schema document. If
      they specify different schema locations, then they refer to different schema
      documents, unless the implementation is able to determine that the two URIs
      are references to the same resource.</p><p>
      If a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> <var>D</var><sub>1</sub>
       contains one or more <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements,
       then <var>schema</var>(<var>D</var><sub>1</sub>) contains not only
       <var>immed</var>(<var>D</var><sub>1</sub>) but also all the components
       of <var>schema</var>(<var>D</var><sub>2</sub>), for each <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a>
       <var>D</var><sub>2</sub> identified by an <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element
       child of <var>D</var><sub>1</sub>.
      Such included schema
      documents <var>D</var><sub>2</sub>
      <span class="rfc2119">must</span> either (a) have the same
      <code>targetNamespace</code> as <var>D</var><sub>1</sub>, 
      or (b) no <code>targetNamespace</code> at all,
      in which case the
       components included in <var>schema</var>(<var>D</var><sub>1</sub>) are
       not those of <var>schema</var>(<var>D</var><sub>2</sub>) itself,  but instead
       those of <var>schema</var>(<var>chameleon</var>(<var>tns</var>(<var>D</var><sub>1</sub>),<var>D</var><sub>2</sub>)), 
       that is, the schema corresponding to the result of applying
       chameleon pre-processing to <var>D</var><sub>2</sub> to convert it to 
       target namespace <var>tns</var>(<var>D</var><sub>1</sub>).
     </p><div class="constraintnote"><a id="src-include" name="src-include" shape="rect"></a><b>Schema Representation Constraint: Inclusion Constraints and Semantics</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element
       information items by the schema for schema documents, 
       <b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1<a id="c-ins" name="c-ins" shape="rect"> </a><!--* no span class='p' possible here *-->If the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>schemaLocation</code>
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> successfully resolves
	  <b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.1<a id="c-vxd" name="c-vxd" shape="rect"> </a><span class="p">It resolves to (a fragment of) a resource which is an
	     XML document (of type <code>application/xml</code> or
	     <code>text/xml</code> with an XML declaration for
	     preference, but this is not required), which in turn
	     corresponds to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
	     information item in a well-formed information set.</span></div>
<div class="clnumber">1.2 <span class="p">It resolves to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
	     information item in a well-formed information set.</span></div>
</div> 
	  In either case call the <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>d
	  <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <b>D2</b> and the
	  <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>ing item's parent <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <b>D1</b>.</div>
<div class="clnumber">2 <b>One</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">2.1<a id="c-normi" name="c-normi" shape="rect"> </a><span class="p"><b>D2</b> has a <code>targetNamespace</code>
	    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, and its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is identical to the
	    <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code>
	    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <b>D1</b> (which <span class="rfc2119">must</span> have such an
	    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>).</span></div>
<div class="clnumber">2.2<a id="c-normi2" name="c-normi2" shape="rect"> </a><span class="p">Neither <b>D2</b> nor <b>D1</b> have a
	    <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</span></div>
<div class="clnumber">2.3<a id="c-chami" name="c-chami" shape="rect"> </a><span class="p"><b>D2</b> has no
	    <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (but <b>D1</b>
	    does).</span></div>
<div class="clnumber">2.4 <span class="p"><b>D2</b> does not exist (e.g. because the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	    <code>schemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> does not
	    resolve successfully).</span></div>
</div></div>
<div class="clnumber">3 The appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b>clause <a href="#c-normi" shape="rect">2.1</a> or clause <a href="#c-normi2" shape="rect">2.2</a> above is satisfied, <b>then </b>
	    <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.1.1 <span class="p">
	      <b>D2</b> corresponds to a conforming schema (call it <b>S2</b>).
	     </span></div>
<div class="clnumber">3.1.2<a id="c-incl-incl" name="c-incl-incl" shape="rect"> </a><span class="p">
	      The schema corresponding to <b>D1</b> includes not only definitions or
	      declarations corresponding to the appropriate members of its own
	      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also components identical to all the
	      <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> of 
	       <b>S2</b> (with the possible
	      exception of its <a href="#s" class="compref" shape="rect">Schema</a> component).
	     </span></div>
</div></div><div class="clnumber">3.2<a id="c-docham" name="c-docham" shape="rect"> </a><b>If </b>clause <a href="#c-chami" shape="rect">2.3</a> above is
	    satisfied, <b>then </b>
	    <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">3.2.1<a id="c-chamvalidi" name="c-chamvalidi" shape="rect"> </a><span class="p">
	      Let <b>D2&#8242;</b> be a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item
	      
	      obtained by performing on <b>D2</b> the transformation
		specified in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a>;
	       <b>D2&#8242;</b> corresponds to a conforming schema (call it <b>S2</b>).
	      </span><div class="note"><div class="p"><b>Note:</b> The transformation in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a>
		(a) adds a <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> to <b>D2</b>,
		whose value is the same as that of the <code>targetNamespace</code>
		<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <b>D1</b>, and (b) updates all unqualified
		QName references so that their namespace names become the
		<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
		Implementations need not use the <a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a>
		stylesheet given in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a>, 
		as long as an equivalent result 
		is produced.
		In particular, different
		 algorithms for generating a unique namespace
		 prefix <span class="rfc2119">may</span> be used, even if they produce different
		 results.
	       </div></div></div>
<div class="clnumber">3.2.2<a id="c-incl-ns-capture" name="c-incl-ns-capture" shape="rect"> </a><span class="p">
	      The schema corresponding to <b>D1</b> includes not only definitions or
	      declarations corresponding to the appropriate members of its own
	      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also components identical to all the
	      <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> of <b>S2</b> (with the possible
	      exception of its <a href="#s" class="compref" shape="rect">Schema</a> component).
	     </span></div>
</div>
	    <div class="note"><div class="p"><b>Note:</b> 
	      The above rule applies recursively. For example, if
	      <b>A</b> includes <b>B</b> and
	      <b>B</b> includes <b>C</b>, where
	      <b>A</b> has a <code>targetNamespace</code>
	      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, but neither <b>B</b> nor
	      <b>C</b> does, then the effect is as if
	      <b>A</b> included <b>B'</b> and
	      <b>B'</b> included <b>C'</b>, where
	      <b>B'</b> and <b>C'</b> are identical to
	      <b>B</b> and <b>C</b> respectively,
	      except that they both have a
	      <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> the same as
	      <b>A</b>'s.
	     </div></div>
          
	    
	    <div class="note"><div class="p"><b>Note:</b> In this case, it is <b>D2&#8242;</b>, not <b>D2</b>, which is required 
	      by clause <a href="#c-chamvalidi" shape="rect">3.2.1</a> to correspond to a conforming schema.
	      In particular, it is not an error for <b>D2</b> to
	      fail to satisfy
	      all of the constraints governing schema documents, while
	      it <em>is</em> an error if <b>D2&#8242;</b> fails to satisfy them.
	     </div></div>
	    
	    <div class="note"><div class="p"><b>Note:</b> 
	      If <b>D2</b> imports the target namespace of <b>D1</b>, then
	      the effect of clause <a href="#c-docham" shape="rect">3.2</a> will be to
	      cause an error owing to the violation of clause <a href="#src-import-noselfimport" shape="rect">1</a> of <a href="#src-import" shape="rect">Import Constraints and Semantics (&#167;4.2.6.2)</a> (which forbids a schema document to
	      import its own target namespace).  Other constraint
	      violations may also be brought about; caution is
	      advised.
	     </div></div>
	   </div></div></div>
</div>
   </div><div class="p">It is <em>not</em> an error for the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
<code>schemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> to fail to resolve 
at all,
in which case the corresponding inclusion <span class="rfc2119">must not</span> be performed.  It
<em>is</em> an error for it to resolve but the rest of clause 1
above to fail to be satisfied.  Failure to resolve is likely
to cause less than complete <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> outcomes, of course.</div><div class="p">As discussed in <a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>, <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>s in XML representations will
sometimes fail to <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a>, rendering components incomplete
and unusable because of missing subcomponents.  During schema
construction, implementations <span class="rfc2119">must</span> retain <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> values for such references, in case
an appropriately-named component becomes available to discharge the
reference by the time it is actually needed.  <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>Absent<span class="arrow">&#183;</span></a> target <a href="#q-uri" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace
name<span class="arrow">&#183;</span></a>s of such as-yet unresolved reference <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>s in <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>d
components <span class="rfc2119">must</span> also be converted if clause <a href="#c-docham" shape="rect">3.2</a> is
satisfied.</div></div></div><div class="note"><div class="p"><b>Note:</b> The above is carefully worded so that
	 multiple <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>ing of the same schema document will not
       constitute a violation of
       clause <a href="#c-nmd" shape="rect">2</a> of <a href="#sch-props-correct" shape="rect">Schema Properties Correct (&#167;3.17.6.1)</a>, but
       applications are allowed, indeed encouraged, to avoid <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>ing the
       same schema document more than once to forestall the necessity
       of establishing identity component by component.</div></div><p>If there is a sequence of schema documents <var>S1</var>, <var>S2</var>, ... <var>Sn</var>,
      and a sequence of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements <var>E1</var>, <var>E2</var>, ... <var>En</var>,
      such that each <var>S</var><sub><var>i</var></sub> contains the corresponding <var>E</var><sub><var>i</var></sub>, and each <var>E</var><sub><var>i</var></sub> 
      (where <var>i</var> &lt; <var>n</var>)
      points to
      schema document <var>S</var><sub><var>i</var> + 1</sub>, and
      <var>En</var> points to <var>S1</var> (i.e. if there is a cycle in the relation defined by the
      <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element), then the same schema corresponds to all
      of the schema documents <var>S1</var>, ... <var>Sn</var> in the cycle, and it includes the same
      components as the schema corresponding
       to <var>S1</var> in the similar case where 
      <var>Sn</var> has no
      <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element pointing at <var>S1</var>.
     </p><div class="note"><div class="p"><b>Note:</b> Informally:  
       cycles of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements are legal, and
       processors should guard against infinite loops.
      </div></div></div><div class="div3">
<h4><a name="modify-schema" id="modify-schema" shape="rect"></a>4.2.4 Including modified component definitions (<code>&lt;redefine&gt;</code>)</h4><div class="note"><div class="p"><b>Note:</b> The redefinition feature described in the remainder of this
section is <a href="#key-deprecated" class="termref" shape="rect"><span class="arrow">&#183;</span>deprecated<span class="arrow">&#183;</span></a> and may be removed from future versions of
this specification.  Schema authors are encouraged to avoid its
use in cases where interoperability or compatibility with later
versions of this specification are important.
</div></div><div class="notice"><p><b>Editorial Note: </b><span style="color: red">Priority Feedback Request</span></p><p style="color: black;"><span class="edtext">The Working Group requests feedback from readers, schema
       authors, implementors, and other users of this specification as
       to the desirability of retaining, removing, deprecating, or not
       deprecating the use of <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>.  Since the
       <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> facility provides similar
       functionality but does not require a restriction or extension
       relation between the new and the old definitions of redefined
       components, the Working Group is particularly interested in
       learning whether users of this specification find that 
       requirement useful or not.
      </span></p></div><p>In order to provide some support for evolution and versioning, it is
possible to incorporate components corresponding to a schema document
<em>with modifications</em>.  The modifications have a pervasive impact,
that is, only the redefined components are used, even when referenced from
other incorporated components, whether redefined themselves or not.</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>redefine</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-redefine" name="element-redefine" shape="rect">&lt;redefine</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>schemaLocation</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a> | (<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a> | <a href="#element-complexType" class="eltref" shape="rect">complexType</a> | <a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a>))*<br clear="none" />&lt;/redefine&gt;</p></div></div><p>A <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item <span class="rfc2119">may</span> contain any number of <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> elements. Their <code>schemaLocation</code> attributes, consisting of a URI reference, identify other <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, that is <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information items. 
</p><p>If a schema document <var>D</var><sub>1</sub> 
      contains a <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> element <var>E</var> 
      pointing to some schema document <var>D</var><sub>2</sub>, then 
      <var>schema</var>(<var>D</var><sub>1</sub>) contains not only the components in <var>immed</var>(<var>D</var><sub>1</sub>), but also
      all the components (with the exception, in most cases, 
      of the schema-as-a-whole component) of
      <var>redefine</var>(<var>E</var>,<var>schema</var>(<var>D</var><sub>2</sub>)).  
      For any document <var>D</var><sub>2</sub> pointed at by a <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> element
      in <var>D</var><sub>1</sub>, it <span class="rfc2119">must</span> be the case either (a) that <var>tns</var>(<var>D</var><sub>1</sub>) = <var>tns</var>(<var>D</var><sub>2</sub>) 
      or else (b) that <var>tns</var>(<var>D</var><sub>2</sub>) is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, in which case <var>schema</var>(<var>D</var><sub>1</sub>) includes not 
      <var>redefine</var>(<var>E</var>,<var>schema</var>(<var>D</var><sub>2</sub>)) itself 
      but <var>redefine</var>(<var>E</var>,<var>schema</var>(<var>chameleon</var>(<var>tns</var>(<var>D</var><sub>1</sub>),<var>D</var><sub>2</sub>))).
      That is, the redefinition pre-processing is applied not to the 
      schema corresponding to <var>D</var><sub>2</sub> but instead to the schema corresponding
      to the schema document <var>chameleon</var>(<var>tns</var>(<var>D</var><sub>1</sub>),<var>D</var><sub>2</sub>),
      which is the result of applying chameleon pre-processing to <var>D</var><sub>2</sub>
      to convert it to target namespace <var>tns</var>(<var>D</var><sub>1</sub>).
     </p><div class="block">The definitions within the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> element itself are
restricted to be redefinitions of components from the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d
schema document, <em>in terms of themselves</em>.  That is, 
  <ul><li><div class="p">Type
definitions <span class="rfc2119">must</span> use themselves as their base type definition;</div></li><li><div class="p">
     Attribute
group definitions and model group definitions <span class="rfc2119">must</span> be supersets or subsets of their original
definitions, either by including exactly one
reference to themselves or by containing only (possibly restricted) components
which appear in a corresponding way in their <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d selves.</div></li></ul>Not all the components of the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d
schema document need be redefined.</div><p>This mechanism is intended to provide a declarative and modular approach to
schema modification, with functionality no different except in scope from what
would be achieved by wholesale text copying and redefinition by editing.  In
particular redefining a type is not guaranteed to be side-effect free:  it can
have unexpected impacts on other type definitions which are based
on the redefined one, even to the extent that some such definitions become
ill-formed.</p><div class="note"><div class="p"><b>Note:</b> The pervasive impact of redefinition reinforces the need for
implementations to adopt some form of lazy or 'just-in-time' approach to
component construction, which is also called for in order to avoid
inappropriate dependencies on the order in which definitions and references appear in (collections of) schema documents.</div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">v1.xsd:
 &lt;xs:complexType name="personName"&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="title" minOccurs="0"/&gt;
   &lt;xs:element name="forename" minOccurs="0" maxOccurs="unbounded"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;

 &lt;xs:element name="addressee" type="personName"/&gt;

v2.xsd:
 &lt;xs:redefine schemaLocation="v1.xsd"&gt;
  &lt;xs:complexType name="personName"&gt;
   &lt;xs:complexContent&gt;
    &lt;xs:extension base="personName"&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element name="generation" minOccurs="0"/&gt;
     &lt;/xs:sequence&gt;
    &lt;/xs:extension&gt;
   &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
 &lt;/xs:redefine&gt;

 &lt;xs:element name="author" type="personName"/&gt;
  </pre></div><div class="exampleWrapper">
<div class="p">The schema corresponding to <code>v2.xsd</code> has everything specified
by <code>v1.xsd</code>, with the <code>personName</code> type redefined, as
well as everything it specifies itself.  According to
this schema, elements constrained
by the <code>personName</code> type <span class="rfc2119">may</span> end with a <code>generation</code>
element.  This includes not only the <code>author</code> element, but also the
<code>addressee</code> element.</div></div></div><div class="constraintnote"><a id="src-redefine" name="src-redefine" shape="rect"></a><b>Schema Representation Constraint: Redefinition Constraints and Semantics</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> element information items by the schema for schema documents
       <b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1 <span class="p">If there are any element information items among the
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> other than <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> then the
	  <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>
	  of the <code>schemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> <span class="rfc2119">must</span>
	  successfully resolve.</span></div>
<div class="clnumber">2<a id="redef-resolves" name="redef-resolves" shape="rect"> </a><!--* no span class='p' possible here *-->If the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>schemaLocation</code>
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> successfully resolves
	  <b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p">it resolves to (a fragment of) a resource which is an
	     XML document (see clause <a href="#c-vxd" shape="rect">1.1</a> of <a href="#src-include" shape="rect">Inclusion Constraints and Semantics (&#167;4.2.3)</a>), which in turn
	     corresponds to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
	     information item in a well-formed information set.</span></div>
<div class="clnumber">2.2 <span class="p">It resolves to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
	     information item in a well-formed information set.</span></div>
</div> 
	  In either case call the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d
	  <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <b>D2</b> and the
	  <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing item's parent <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
	  item <b>D1</b>.</div>
<div class="clnumber">3 <b>One</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1<a id="c-normir" name="c-normir" shape="rect"> </a><span class="p"><b>D2</b> has a <code>targetNamespace</code>
	    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, and its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is identical to the
	    <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code>
	    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <b>D1</b> (which <span class="rfc2119">must</span> have such an
	    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>).</span></div>
<div class="clnumber">3.2<a id="c-normi2r" name="c-normi2r" shape="rect"> </a><span class="p">Neither <b>D2</b> nor <b>D1</b> have a
	    <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</span></div>
<div class="clnumber">3.3<a id="c-chamir" name="c-chamir" shape="rect"> </a><span class="p"><b>D2</b> has no
	    <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (but <b>D1</b>
	    does).</span></div>
</div></div>
<div class="clnumber">4 The appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">4.1 <b>If </b>clause <a href="#c-normir" shape="rect">3.1</a> or clause <a href="#c-normi2r" shape="rect">3.2</a> above is satisfied, <b>then </b>
	    <div class="constraintlist"><div class="clnumber">4.1.1 <span class="p">
	      <b>D2</b> corresponds to a conforming schema (call it <b>S2</b>).
	     </span></div>
<div class="clnumber">4.1.2 <span class="p">
	      The schema corresponding to <b>D1</b> includes not only definitions or
	      declarations corresponding to the appropriate members of its own
	      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also components identical to all the
	      <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> of <b>S2</b>, with the
	      exception of those explicitly redefined
	       (see <a href="#src-expredef" shape="rect">Individual Component Redefinition (&#167;4.2.4)</a> below 
	      and with the possible
	      exception of the <a href="#s" class="compref" shape="rect">Schema</a> component
	      of <b>S2</b>)).
	     </span></div>
</div>
	   </div><div class="clnumber">4.2<a id="c-dochamr" name="c-dochamr" shape="rect"> </a><b>If </b>clause <a href="#c-chamir" shape="rect">3.3</a> above is
	    satisfied, <b>then </b>
	    <div class="constraintlist"><div class="clnumber">4.2.1<a id="c-chamvalidr" name="c-chamvalidr" shape="rect"> </a><span class="p">
	       Let <b>D2&#8242;</b> be a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item
	       
	       obtained by performing on <b>D2</b> the transformation
		specified in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a>;
	       <b>D2&#8242;</b> corresponds to a conforming schema (call it <b>S2</b>).
	      </span></div>
<div class="clnumber">4.2.2 <span class="p">
	       The schema corresponding to <b>D1</b> includes not only definitions or
	       declarations corresponding to the appropriate members of its own
	       <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also components identical to all the
	       <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> of <b>S2</b>, with the
	       exception of those explicitly redefined
	       (see <a href="#src-expredef" shape="rect">Individual Component Redefinition (&#167;4.2.4)</a> below).
	      </span></div>
</div>
	   </div></div><div class="note"><div class="p"><b>Note:</b> In this case, it is <b>D2&#8242;</b> and not <b>D2</b>, which is required 
	   by clause <a href="#c-chamvalidr" shape="rect">4.2.1</a> to correspond to a conforming schema.
	   In particular, it is not an error for <b>D2</b> to
	   fail to satisfy
	   all of the constraints governing schema documents, while
	   it <em>is</em> an error if <b>D2&#8242;</b> fails to satisfy them.
	  </div></div></div>
<div class="clnumber">5 <span class="p">Within the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, each <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>
	  <span class="rfc2119">must</span> have a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> among its
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and
	  each <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> <span class="rfc2119">must</span> have a
	  <code>restriction</code> or <code>extension</code> among its
	  grand-<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of whose <code>base</code>
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> <span class="rfc2119">must</span> be the same as the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of its own
	  <code>name</code> attribute plus target namespace;</span></div>
<div class="clnumber">6 <!--* no span class='p' possible here *-->Within the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, for each <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>
	  the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">6.1 <b>If </b>it has a <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> among its
	     contents at some level the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of whose
	     <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is the same as the
	     <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of its own <code>name</code> attribute plus
	     target namespace
	     and that <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> does not have an <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>
	     ancestor, <b>then </b>
	     <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">6.1.1 <span class="p">It has exactly one such group.</span></div>
<div class="clnumber">6.1.2 <span class="p">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of both that group's
		<code>minOccurs</code> and <code>maxOccurs</code>
		<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is <code>1</code> (or <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>).</span></div>
</div>
	    </div><div class="clnumber">6.2 <b>If </b>it has no such self-reference, <b>then </b>
	     <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">6.2.1 <span class="p">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of its own <code>name</code> attribute
		plus target namespace  successfully <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to a
		model group definition in <b>S2</b>.</span></div>
<div class="clnumber">6.2.2 <span class="p"><a name="anchor6685D" id="anchor6685D" shape="rect"></a>
	        The <a href="#mgd-model_group" class="propref" shape="rect">{model group}</a> of the
		model group definition which corresponds to it per
		<a href="#declare-namedModelGroup" shape="rect">XML Representation of Model Group Definition Schema Components (&#167;3.7.2)</a> accepts a subset of the element
		 sequences accepted by that model group definition in
		 <b>S2</b>.</span></div>
</div></div></div></div>
<div class="clnumber">7 <!--* no span class='p' possible here *-->Within the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, for each <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	  the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">7.1 <b>If </b>it has an <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
	     among its contents the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of whose
	     <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is the same as the
	     <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of its own <code>name</code> attribute plus
	     target namespace, <b>then </b>it has exactly one such group.</div><div class="clnumber">7.2<a id="c-agrere" name="c-agrere" shape="rect"> </a><b>If </b>it has no such self-reference, <b>then </b>
	     <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">7.2.1 <span class="p">The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of its own <code>name</code> attribute
		plus target namespace  successfully <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to an
		attribute group definition in <b>S2</b>.</span></div>
<div class="clnumber">7.2.2 <span class="p">The <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and 
		<a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> of the attribute group
		definition which corresponds to it per <a href="#declare-attributeGroup" shape="rect">XML Representation of Attribute Group Definition Schema Components (&#167;3.6.2)</a>  viewed as the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> of a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> and the <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and <a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> of that attribute group
		 definition in <b>S2</b> viewed as the <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a> and <a href="#ctd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> of the
		 <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>
		 satisfy clause <a href="#c-ran" shape="rect">3</a> of <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>.</span></div>
</div></div></div>
	  <div class="note"><div class="p"><b>Note:</b> An attribute group restrictively redefined per
	    clause <a href="#c-agrere" shape="rect">7.2</a> corresponds to an attribute
	    group whose <a href="#agd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
	    consist all and only of those attribute uses corresponding
	    to <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>s  explicitly present among
	    the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing
	    <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>. No inheritance from the
	    <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d attribute group occurs.  Its
	    <a href="#agd-attribute_wildcard" class="propref" shape="rect">{attribute wildcard}</a> is
	    similarly based purely on an explicit <a href="#element-anyAttribute" class="eltref" shape="rect">&lt;anyAttribute&gt;</a>, if present.</div></div>
	 </div>
</div>
      </div></div></div><div class="constraintnote"><a id="src-expredef" name="src-expredef" shape="rect"></a><b>Schema Representation Constraint: Individual Component Redefinition</b><br clear="none" /><div class="constraint"><div class="p">Corresponding to each non-<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> member of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of a <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> there are one or two schema components in
the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing schema:</div><div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> and <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> information items each
correspond to two components:</span><div class="constraintlist"><div class="clnumber">1.1<a id="icr-c11" name="icr-c11" shape="rect"> </a><span class="p">One component which corresponds to the top-level definition item with
the same <code>name</code> in
the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d schema document, as defined in <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, except that its <span class="anonRef">{name}</span> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> and its <span class="anonRef">{context}</span> is the redefining component, as defined in clause <a href="#icr-c12" shape="rect">1.2</a> below;</span></div>
<div class="clnumber">1.2<a id="icr-c12" name="icr-c12" shape="rect"> </a><span class="p">One component which corresponds to the information item itself, as defined
in <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, except that its <span class="anonRef">{base type definition}</span> is
the component defined in clause <a href="#icr-c11" shape="rect">1.1</a> above.</span></div>
</div><div class="p">This pairing ensures the coherence constraints on type definitions
are respected, while at the same time achieving the desired effect, namely that
references to names of redefined components in both the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing and
<a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d schema documents <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a> to the redefined component
as specified in 1.2 above.</div></div>
<div class="clnumber">2 <span class="p">The <a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a> and <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> each correspond to a single component, as defined in <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, except that if and when a self-reference based on a  <code>ref</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> whose <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is the same as the item's <code>name</code> plus target namespace is 
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a>, a component which corresponds to the top-level definition item of that name and the appropriate kind in
<b>S2</b> is used.</span></div>
</div><div class="p">In all cases there <span class="rfc2119">must</span> be a top-level definition item of the appropriate name and kind in
the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>d schema document.</div></div></div><div class="note"><div class="p"><b>Note:</b> The above is carefully worded so that
multiple equivalent <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing of the same schema document will not constitute a violation of
clause <a href="#c-nmd" shape="rect">2</a> of <a href="#sch-props-correct" shape="rect">Schema Properties Correct (&#167;3.17.6.1)</a>, but applications are
allowed, indeed encouraged, to avoid <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>ing the same
schema document in the same way more than once to forestall the necessity of
establishing identity component by component (although this will have to be
done for the individual redefinitions themselves).</div></div></div><div class="div3">
<h4><a name="override-schema" id="override-schema" shape="rect"></a>4.2.5 Overriding component definitions (<code>&lt;override&gt;</code>)</h4><p>The <code>&lt;redefine&gt;</code> construct defined 
  in <a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a>
  is useful in schema evolution and versioning,
  when it is desirable to have some guaranteed restriction or extension
  relation between the old component and the redefined component. 
  But there are occasions when the schema author simply wants to
  replace old components with new ones without any constraint.
  Also, existing XSD processors
  have implemented conflicting and non-interoperable interpretations
  of <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, and the <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>
  construct is <a href="#key-deprecated" class="termref" shape="rect"><span class="arrow">&#183;</span>deprecated<span class="arrow">&#183;</span></a>.
  The <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> construct defined in this section
  allows such unconstrained replacement.</p><div class="note"><div class="p"><b>Note:</b> The name of the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element
       has nothing to do with the use of the term 
       "<a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>override<span class="arrow">&#183;</span></a>"
       to denote the relation between an <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a>
       and another type.  The two mechanisms are
       distinct and unrelated.</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>override</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-override" name="element-override" shape="rect">&lt;override</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>schemaLocation</b> = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a> | (<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a> | <a href="#element-complexType" class="eltref" shape="rect">complexType</a> | <a href="#element-group" class="eltref" shape="rect">group</a> | <a href="#element-attributeGroup" class="eltref" shape="rect">attributeGroup</a> | <a href="#element-element" class="eltref" shape="rect">element</a> | <a href="#element-attribute" class="eltref" shape="rect">attribute</a> | <a href="#element-notation" class="eltref" shape="rect">notation</a>))*<br clear="none" />&lt;/override&gt;</p></div></div><p>A <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item <span class="rfc2119">may</span> contain any number of
  <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements. Their <code>schemaLocation</code>
  attributes, consisting of a URI reference, identify 
      ("point to")
  other <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>,
  that is <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information items.</p><p>If a schema document <var>D</var><sub><var>new</var></sub>
      contains an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element <var>E</var>
      pointing to some schema document <var>D</var><sub><var>old</var></sub>, then 
      <var>schema</var>(<var>D</var><sub><var>new</var></sub>) contains not only the components in <var>immed</var>(<var>D</var><sub><var>new</var></sub>), 
      but also the components in 
      <var>schema</var>(<var>override</var>(<var>E</var>,<var>D</var><sub><var>old</var></sub>)).
      For all such schema documents <var>D</var><sub><var>old</var></sub>,
      it <span class="rfc2119">must</span> be the case either (a) that <var>tns</var>(<var>D</var><sub><var>old</var></sub>) = <var>tns</var>(<var>D</var><sub><var>new</var></sub>),
      or (b) that <var>tns</var>(<var>D</var><sub><var>old</var></sub>) is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, in which case
      <var>schema</var>(<var>D</var><sub><var>new</var></sub>) contains not the components in
      <var>schema</var>(<var>override</var>(<var>E</var>,<var>D</var><sub><var>old</var></sub>)), but those in
      <var>schema</var>(<var>override</var>(<var>E</var>,<var>chameleon</var>(<var>tns</var>(<var>D</var><sub><var>new</var></sub>),<var>D</var><sub><var>old</var></sub>))).
      That is, before the override pre-processsing is applied,
      chameleon pre-processing is applied to <var>D</var><sub><var>old</var></sub> to convert it
      to target namespace <var>tns</var>(<var>D</var><sub><var>new</var></sub>); the override
      pre-processing is applied to the result, namely
      <var>chameleon</var>(<var>tns</var>(<var>D</var><sub><var>new</var></sub>),<var>D</var><sub><var>old</var></sub>).
     </p><div class="ednote"><div class="note"><p><b>Editorial Note: </b><span class="edtext">Several alternative formattings are possible for the new
       variable names here.  Which is preferable?
       (a) <var>D</var><sub><var>new</var></sub> and <var>D</var><sub><var>old</var></sub>, or
       (b) <var>D</var>_<var>new</var> and <var>D</var>_<var>old</var>, or
       (c) <var>D_new</var> and <var>D_old</var>, or
       (d) <var>D-new</var> and <var>D-old</var>, or
       (e) <var>Dnew</var> and <var>Dold</var>?
      </span></p></div></div><div class="note"><div class="p"><b>Note:</b> If the above definition is naively translated into an
       algorithm, the algorithm may fail to terminate in the case
       where the graph of <code>include</code> and <code>override</code>
       references among schema documents contains cycles. To
       guarantee termination, the algorithm must detect when it has
       reached closure, that is, when further computation will have no
       effect on the outcome. In particular, it is useful to recognize
       (a) that it is possible to terminate as soon as conflicting
       components have been generated (for example, two different type
       definitions with the same name), and (b) that when 
       <var>override</var>(<var>E</var>, <var>D</var>) (for some <var>E</var> and <var>D</var>) is 
       equivalent to <var>D</var>, no new schema
       components will be contributed by further processing: this can
       be detected either by comparing the input and output of the
       override transformation using a comparator such as the 
       <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a>
       <code>fn:deep-equal</code> function, or by observing the
       conditions that cause <var>override</var>(<var>E</var>, <var>D</var>) to be
       idempotent, for example the fact that <var>E</var> is empty.
       </div></div><p>The  children of the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
       element <span class="rfc2119">may</span> override any source declarations for
      <a href="#key-compName" class="termref" shape="rect"><span class="arrow">&#183;</span>named<span class="arrow">&#183;</span></a> components which
      appear among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the
      <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>,
      <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, or
      <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of
       the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element information item..
     </p><div class="p"><div class="termdef"><a name="key-targetset" id="key-targetset" title="" shape="rect">[Definition:]&#160;&#160;</a>The
       <b>target set</b> of an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element information       
       item <var>E</var> contains <b>all</b> of the following:<div class="constraintlist"><div class="clnumber">1 <span class="p">The schema document identified by the <code>schemaLocation</code>
	  attribute of <var>E</var>.</span></div>
<div class="clnumber">2 <span class="p">The schema document identified by the <code>schemaLocation</code>
	  attribute of any <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element information item
	  in a schema document contained in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> 
	  of <var>E</var>.</span></div>
<div class="clnumber">3 <span class="p">The schema document identified by the <code>schemaLocation</code>
	  attribute of any <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element information item
	  in a schema document contained in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> 
	  of <var>E</var>.</span></div>
</div>
       The <b>target set</b> of <var>E</var> contains no other schema documents.
      </div></div><div class="note"><div class="p"><b>Note:</b> 
       The <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element is
       the transitive closure of the union of the inclusion relation (which contains
       the pair (<var>S1</var>, <var>S2</var>) if and only if <var>S1</var> contains an <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> 
       element pointing to <var>S2</var>) and the override relation (which contains
       the pair (<var>S1</var>, <var>S2</var>) if and only if <var>S1</var> contains an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> 
       element pointing to <var>S2</var>).  It does not include schema documents which 
       are pointed to by <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> or <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> elements,
       unless they are also pointed to by <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> or
       <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements in the relevant schema documents.
      </div><div class="p">
       Source declarations not present in the target set of <var>E</var> cannot
       be overridden, even if they are present in other schema
       documents consulted in the creation of the schema (e.g. in
       schema documents pointed to by a <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>
       element).  It is not an error for
       an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element to contain a source declaration
       which matches nothing in the target set, but it will be ignored;
       in particular, it will not succeed in overriding source declarations
       in schema documents not part of the target set.
      </div></div><div class="note"><div class="p"><b>Note:</b> 
       The transformation described in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>
       translates both <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> and <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements
       into <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements.  These <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
       elements will, in turn, be handled by transforming their target schema
       documents.  Since every schema document in the target set of the original
       <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element is the target of either an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
       element or of an <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element, it follows that the
       transformation described in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a> will be
       applied to every schema document in the target set.
      </div></div><div class="note"><div class="p"><b>Note:</b> It is <em>not</em> forbidden for the schema document <var>D</var> containing
       an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element <var>E</var> to be in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a>
       of <var>E</var>.</div><div class="p">If applying the override transformation specified in 
       <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a> to <var>D</var> and <var>E</var> results in 
       a schema document equivalent to <var>D</var> (e.g. when none of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>
       of <var>D</var>, or of any <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> and <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
       elements in <var>D</var> match any of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>E</var>, except 
       for the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>E</var> themselves), then the effect is the same
       as for a cyclic set of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> references, or
       as for multiple inclusions of the same document (as
       described in the note at the end of 
       <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
      multiple schema definition documents
       (<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>).
      </div><div class="p">If applying the override transformation to <var>D</var> and <var>E</var> changes
       any of the XML representations of components, then the effect of
       <var>D</var> being in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of <var>E</var> is the same
       as if two different schema documents containing conflicting
       definitions for the same components were included.  ("As if"
       is inexact; in this case what happens is, precisely,
       that two schema documents with conflicting contents are
       included.)
      </div></div><p>The definitions within the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element itself are
  <em>not</em> required to be similar in any way to 
  the
  source declarations being
  overridden. Not all the source declarations 
  of the overridden schema document need be
  overridden.</p><p>As this mechanism is very similar to <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, many similar
  kinds of caution need to be taken in using <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>. Please
  refer to <a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a> for details.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">v1.xsd:
 &lt;xs:complexType name="personName"&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element name="firstName"/&gt;
   &lt;xs:element name="lastName"/&gt;
  &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;

 &lt;xs:element name="addressee" type="personName"/&gt;

v2.xsd:
 &lt;xs:override schemaLocation="v1.xsd"&gt;
  &lt;xs:complexType name="personName"&gt;
   &lt;xs:sequence&gt;
    &lt;xs:element name="givenName"/&gt;
    &lt;xs:element name="surname"/&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
 &lt;/xs:override&gt;

 &lt;xs:element name="author" type="personName"/&gt;
  </pre></div><div class="exampleWrapper">
<div class="p">The schema corresponding to <code>v1.xsd</code> has a complex type named
   <code>personName</code> with a sequence of <code>firstName</code>
   and <code>lastName</code> children. The schema corresponding to <code>v2.xsd</code>
   overrides <code>personName</code>, by providing a different sequence of
   element children. All elements with the <code>personName</code> type are
   now constrained to have the sequence of <code>givenName</code> and
   <code>surname</code>. This includes not only the <code>author</code>
   element, but also the <code>addressee</code> element.</div></div></div><div class="constraintnote"><a id="src-override" name="src-override" shape="rect"></a><b>Schema Representation Constraint: Override Constraints and Semantics</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element
       information items by the schema for schema documents <b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *-->
	  If the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>schemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>
	  successfully resolves <b>one or more</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.1 <span class="p">
	     It resolves to (a fragment of) a resource which is an XML document (see
	     clause <a href="#c-vxd" shape="rect">1.1</a> of <a href="#src-include" shape="rect">Inclusion Constraints and Semantics (&#167;4.2.3)</a>), which in turn
	     corresponds to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item in a
	     well-formed information set.
	    </span></div>
<div class="clnumber">1.2 <span class="p">
	     It resolves to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item in a
	     well-formed information set.
	    </span></div>
</div>
	  In either case call the overridden <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <var>D</var><sub><var>old</var></sub>
	  and the overriding item's parent <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <var>D</var><sub><var>new</var></sub>.
	 </div>
<div class="clnumber">2 <b>One</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">2.1<a id="c-o-normir" name="c-o-normir" shape="rect"> </a><span class="p">
	    <var>D</var><sub><var>old</var></sub> has a <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, and its
	    <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is identical to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code>
	    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <var>D</var><sub><var>new</var></sub> (which <span class="rfc2119">must</span> have such an <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>).
	   </span></div>
<div class="clnumber">2.2<a id="c-o-normi2r" name="c-o-normi2r" shape="rect"> </a><span class="p">
	    Neither <var>D</var><sub><var>old</var></sub> nor <var>D</var><sub><var>new</var></sub> have a <code>targetNamespace</code>
	    <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
	   </span></div>
<div class="clnumber">2.3<a id="c-o-chamir" name="c-o-chamir" shape="rect"> </a><span class="p">
	    <var>D</var><sub><var>old</var></sub> has no <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> (but <var>D</var><sub><var>new</var></sub>
	    does).
	   </span></div>
</div></div>
<div class="clnumber">3 The appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b>clause <a href="#c-o-normir" shape="rect">2.1</a> or clause <a href="#c-o-normi2r" shape="rect">2.2</a>
	    above is satisfied, <b>then </b><div class="constraintlist"><div class="clnumber">3.1.1<a id="c-e1e2" name="c-e1e2" shape="rect"> </a><span class="p">
	       Let <var>D<sub>old</sub>&#8242;</var> be a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item obtained by
	       performing on <var>D</var><sub><var>old</var></sub> the transformation
		specified in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>. Then
	       <var>D<sub>old</sub>&#8242;</var> corresponds to a conforming schema (call it <var>S</var><sub><var>old</var></sub>).
	      </span></div>
<div class="clnumber">3.1.2 <span class="p">
	       The <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element in schema document <var>D</var><sub><var>new</var></sub> 
	       pointing to <var>D</var><sub><var>old</var></sub> is replaced by an
	       <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element pointing to <var>D<sub>old</sub>&#8242;</var>
	       and the inclusion is handled as described in
	       <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
      multiple schema definition documents
       (<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>.
	      </span><div class="note"><div class="p"><b>Note:</b> It is not necessary to perform a literal replacement
		of the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element in <var>D</var><sub><var>new</var></sub> with an
		<a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element; any implementation technique
		can be used as long as it produces the required result.
	       </div></div><div class="note"><div class="p"><b>Note:</b> One effect of the rule just given is that  
		the schema corresponding to <var>D</var><sub><var>new</var></sub> includes not only definitions or
		declarations corresponding to the appropriate members of its own
		<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also components identical to all the
		<a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> of <var>S</var><sub><var>old</var></sub> 
		 (with the possible
		 exception of the <a href="#s" class="compref" shape="rect">Schema</a> component
		 of <var>S</var><sub><var>old</var></sub>).
	       </div></div><div class="note"><div class="p"><b>Note:</b> Another effect is that if schema document <var>A</var> contains
		a source declaration for a component <var>E</var>, and schema document <var>B</var>
		overrides <var>A</var> with its own declaration for <var>E</var>, 
		and schema document <var>C</var> in turn overrides <var>B</var> with a 
		third declaration for <var>E</var>, then in
		calculating <var>schema</var>(<var>C</var>)
		<div class="constraintlist"><div class="clnumber">3.1.2.1 <span class="p">First, the override of <var>B</var> by <var>C</var> is handled.  The
		   resulting schema document 
		   (<var>B</var>&#8242;, a
		   modified version of <var>B</var>)
		   still contains an 
		   <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element referring to 
		   <var>A</var>,
		   but the declaration for <var>E</var> contained in it has 
		   been replaced by that specified in <var>C</var>.</span></div>
<div class="clnumber">3.1.2.2 <span class="p">Then, the override of <var>A</var> by 
		  
		  <var>B</var>&#8242; 
		  (the modified version of <var>B</var>)
		   is handled.</span></div>
<div class="clnumber">3.1.2.3 <span class="p">The resulting version of <var>A</var>, containing
		   the declaration for <var>E</var> originally present in <var>C</var>,
		   is included by 
		   
		   <var>B</var>&#8242;,
		   which is itself included by <var>C</var>.
		  </span></div>
<div class="clnumber">3.1.2.4 <span class="p">The resulting schema contains the version of <var>E</var>
		  originally specified in schema document <var>C</var>.
		  </span></div>
</div>
		(The references to "first" and 
		"then" 
		here refer to the logical precedence
		of operations, not to a required order in which implementations
		are required to perform particular tasks.)
	       </div></div></div>
</div></div><div class="clnumber">3.2 <b>If </b>clause <a href="#c-o-chamir" shape="rect">2.3</a> above is satisfied, <b>then </b><div class="constraintlist"><div class="clnumber">3.2.1<a id="c-o-chamvalidr" name="c-o-chamvalidr" shape="rect"> </a><span class="p">
	       Let <var>D<sub>old</sub>&#8242;</var> be a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item obtained by
	       performing on <var>D</var><sub><var>old</var></sub> first the transformation
		specified in <a href="#chameleon-xslt" shape="rect">Transformation for Chameleon Inclusion (&#167;F.1)</a> and then the
		transformation specified in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>. Then
	       <var>D<sub>old</sub>&#8242;</var> corresponds to a conforming schema (call it <b>S2</b>).
	      </span></div>
<div class="clnumber">3.2.2 <span class="p">
	       The <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element in schema document <var>D</var><sub><var>new</var></sub> 
	       pointing to <var>D</var><sub><var>old</var></sub> is replaced by an
	       <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element pointing to <var>D<sub>old</sub>&#8242;</var>
	       and the inclusion is handled as described in
	       <a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
      multiple schema definition documents
       (<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>.
	      </span></div>
</div></div></div></div>
</div></div></div></div><div class="note"><div class="p"><b>Note:</b> The effect of applying the stylesheet in <a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>
   is to make <var>D<sub>old</sub>&#8242;</var> identical to <var>D</var><sub><var>old</var></sub> except that some elements in
   <var>D</var><sub><var>old</var></sub> are replaced 
       or modified, as described in 
	<a href="#override-xslt" shape="rect">Transformation for <code>xs:override</code> (&#167;F.2)</a>.
   Implementations do not have to use <a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a>
	  transformation, as long as the same result is produced.</div></div><div class="note"><div class="p"><b>Note:</b> It is <var>D<sub>old</sub>&#8242;</var> and not <var>D</var><sub><var>old</var></sub>, which is required to correspond to a
   conforming schema. In particular, it is not an error for <var>D</var><sub><var>old</var></sub> to fail to
   satisfy all of the constraints governing schema documents, while it
   <em>is</em> an error if <var>D<sub>old</sub>&#8242;</var> fails to satisfy them.
  </div></div><div class="note"><a name="anchor10652" id="anchor10652" shape="rect"></a><div class="p"><b>Note:</b> 
     The effect of override pre-processing is that any declarations
     and definitions contained within an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> will
     be substituted for matching declarations and definitions within
     the target set; the resulting schema documents will then be
     processed normally, as described in the relevant portions of this
     specification.  This has the effect that the rules for
     document-level defaults (<code>elementFormDefault</code>,
     <code>attributeFormDefault</code>, <code>blockDefault</code>,
     <code>finalDefault</code>, and so on) are applied not in the
     context of the document containing the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
     (<var>D</var><sub><var>new</var></sub>) but in the context of the document containing the
     original overridden declaration or definition (<var>D</var><sub><var>old</var></sub>).
     Unexpected results may be minimized if the children of an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> are made independent of the document-level
     defaults by explicitly specifying the desired values for
     the properties in question.
   </div></div><div class="note"><div class="p"><b>Note:</b> 
  In <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, components are allowed or required to refer to
  themselves. There is no similar special treatment in <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>.
  Overriding components are constructed as if the overridden components had never
  existed.
 </div></div><div class="note"><div class="p"><b>Note:</b> 
  The above is carefully worded so that
  multiple equivalent overrides of the
  same schema document will not constitute a violation of clause <a href="#c-nmd" shape="rect">2</a>
  of <a href="#sch-props-correct" shape="rect">Schema Properties Correct (&#167;3.17.6.1)</a>, but applications are allowed, indeed
  encouraged, to avoid overriding the same schema document in the same way
  more than once to forestall the necessity of establishing identity component
  by component.
 </div></div><div class="note"><div class="p"><b>Note:</b> 
   It is a consequence of the semantics of inclusion, as
   defined in <a href="#src-include" shape="rect">Inclusion Constraints and Semantics (&#167;4.2.3)</a> (in particular
   clause <a href="#c-incl-incl" shape="rect">3.1.2</a> and
   clause <a href="#c-incl-ns-capture" shape="rect">3.2.2</a>); 
   redefinition, as defined in 
   <a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a>;
   import, as defined in 
   <a href="#composition-schemaImport" shape="rect">References to schema components across namespaces (<code>&lt;import&gt;</code>) (&#167;4.2.6)</a>;
   and overriding, as defined in this section, 
   that if the same schema document is both (a) included, imported, or
   redefined, and (b) non-vacuously overridden, or if the same
   schema document overridden twice in 
   different ways, then
   the resulting schema will have duplicate and conflicting versions
   of some components and will not be conforming,
   just as if two different schema documents had been
   included, with different declarations for the same
   <a href="#key-compName" class="termref" shape="rect"><span class="arrow">&#183;</span>named<span class="arrow">&#183;</span></a> components.
  </div></div></div><div class="div3">
<h4><a name="composition-schemaImport" id="composition-schemaImport" shape="rect"></a>4.2.6 References to schema components across namespaces (<code>&lt;import&gt;</code>)</h4><p>As described in <a href="#concepts-data-model" shape="rect">XSD Abstract Data Model (&#167;2.2)</a>, every top-level schema component is associated with
a target namespace (or, explicitly, with none).  Furthermore,
each schema document carries on its <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element
at most one <code>targetNamespace</code> attribute associating that document
with a target namespace. This section sets out
the 
syntax and mechanisms by which references
<span class="rfc2119">may</span> be made from within a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> to components

outside that document's target
namespace.  Also included within the same syntax is an optional
facility for suggesting the URI of a 
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> containing 
definitions and declarations for components from the foreign 
target namespace.</p><div class="note"><div class="p"><b>Note:</b> 
Some users of version 1.0 of this specification have mistakenly
assumed that the
primary purpose of the <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> is to cause retrieval of
a resource identified by the <code>schemaLocation</code> attribute.
Although the function of <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> is
unchanged in this version, the presentation below has been
reorganized to clarify the two separate purposes served by 
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>, namely
(1) to license references, within a schema document, to
components in the imported namespace, and (2) to provide information
about the location of schema documents for imported namespaces.
</div></div><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>import</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-import" name="element-import" shape="rect">&lt;import</a><br clear="none" />&#160;&#160;id = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;namespace = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;schemaLocation = <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#anyURI" shape="rect">anyURI</a><br clear="none" />&#160;&#160;<em>{any attributes with non-schema namespace . . .}</em>&gt;<br clear="none" /><em>&#160;&#160;Content: </em>(<a href="#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/import&gt;</p></div></div><p>The <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element information item identifies namespaces
used in external references, i.e. those whose
<a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> identifies them as coming from a
different namespace (or none) than the enclosing schema document's
<code>targetNamespace</code>.</p><div class="div4">
<h5><a name="composition-importLicenseReferences" id="composition-importLicenseReferences" shape="rect"></a>4.2.6.1 Licensing References to Components Across Namespaces</h5><p>At least two conditions must be satisfied for a
reference to be made to a foreign component: (1)
there must be  a
means of addressing such foreign components, 
and
(2) there must be a signal to
schema-aware processors that a schema document contains such
references. The namespace
mechanisms defined by <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>
satisfy the first requirement by allowing foreign components
to be addressed.
(How those components are located is governed by the
processor's strategies for locating schema components
in a given namespace, in which the <code>schemaLocation</code> attribute
on the <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element can play a role;
see also <a href="#var_schema_con" shape="rect">
Terminology of schema construction
 (&#167;C.2)</a>.)

The <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element information item
serves
to satisfy the second requirement, by identifying 
namespaces used in external component
references, i.e.  those whose 
<a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> identifies them as coming 
from a namespace different from that of the enclosing schema
document's <code>targetNamespace</code>. 

By contrast, a namespace used for other purposes in a schema document
       need not be imported. 
</p><div class="note"><div class="p"><b>Note:</b> 
	There is 
	 no need, for example, to import the
	 namespace of a vocabulary such as XHTML 
	 for use in schema 
	 <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a> elements, unless that same namespace is also
	 used as the target namespace for component references.
       </div><div class="p">       
	If the schema document does refer to components in the XHTML
	namespace, then the schema document <span class="rfc2119">must</span> include an element of the form 
	<pre xml:space="preserve">&lt;xs:import namespace="http://www.w3.org/1999/xhtml"/&gt;</pre>
	(with the  possible addtion of a <code>schemaLocation</code> attribute
	and annotations).  As just described, this explicit import 
	makes it legitimate to refer to components in the XHTML namespace,
	as base type definitions, or from within content models.
       </div><div class="p">
	No import is needed in order to use XHTML to mark up the text
	appearing within <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a> elements, since
	that usage does not require the schema being constructed to
	include components from the XHTML namespace.  (As a 
	practical matter, this saves the processor the effort to
	locate a schema for the XHTML namespace.)  Importing or
	not importing the XHTML namespace in a schema document
	has no effect on the validity of XHTML within <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a>
	elements:  elements in the XHTML
	namespace (or any other namesapce) are allowed within 
	<a href="#element-appinfo" class="eltref" shape="rect">&lt;appinfo&gt;</a> or <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a>
	element in the schema document, because the schema for
	schema documents in <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>
	declares the type of those elements with a lax wildcard.
	Also, importing the namespace affects the schema being 
	constructed, not the schema used to validate schema
	documents.  The latter is specified in <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.
       </div></div><div class="note"><div class="p"><b>Note:</b> Different designs for namespace import could of course be
	imagined.  In particular, declaring a prefix for a namespace could
	automatically import that namespace.</div><div class="p">If each use of a foreign namespace within a schema document
	implicitly imported that namespace into the schema being
	constructed, then using XHTML for documentation would automatically
	result in the inclusion of XHTML components in the schema
	described by the schema document.  The same logic would also
	apply to any vocabulary used for documentation. Such automatic import
	would lead processors to expend unnecessary extra effort
	to find components for the documentation namespace and would in many
	cases result in a schema which is not the one intended or desired
	by the schema author.
       </div><div class="p">Additionally, the requirement that the <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>
	element be used explicitly provides a modest level of
	redundancy that makes it easier to detect some kinds of errors
	in the schema document.
       </div></div><p>The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of 
the 
<code>namespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> indicates that the containing schema document <span class="rfc2119">may</span> contain
qualified references to schema components in that namespace (via one or more
prefixes declared with namespace declarations in the normal way).  If that
attribute is absent, then the import allows unqualified reference to components
with no target namespace.

</p><p>It is a consequence of rules defined elsewhere
that if references to components in a given namespace <var>N</var>
appear in a schema document <var>S</var>,
then <var>S</var> <span class="rfc2119">must</span> contain an <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element
importing <var>N</var>.
Otherwise, the references will fail to resolve; see
clause <a href="#cl.qnr.nsdeclared" shape="rect">4</a> of
<a href="#src-resolve" shape="rect">QName resolution (Schema Document) (&#167;3.17.6.2)</a>.
References in a schema document to foreign namespaces not imported
by that schema document (or otherwise accounted for by
<a href="#src-resolve" shape="rect">QName resolution (Schema Document) (&#167;3.17.6.2)</a>) are <em>not</em>
"forward references" in the sense of
<a href="#mapping.xr.c" shape="rect">The Mapping between XML Representations and
      Components (&#167;3.1.3)</a> and are <em>not</em>
handled as if they referred to
"missing components" in the sense of
<a href="#conformance-missing" shape="rect">Missing Sub-components (&#167;5.3)</a>.
</p><p>

Note that components to be imported need not be in the form of a
<a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> and 
need not in particular be declared in the particular schema document identified 
by a <code>schemaLocation</code> attribute;  the processor
is free to access or construct components using means of its own
choosing, whether or not a <code>schemaLocation</code> 
hint is provided.

</p><div class="exampleOuter">
<a name="eg.import.html" id="eg.import.html" shape="rect"></a><div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">The same namespace can be used both as the namespace
of elements and attributes appearing in the schema document, 
and in the course of
defining schema components in terms of foreign 
components.
The import in this example is necessary because there is a reference to the element
component 
<code>xhtml:p</code>.
if there were no component reference, then
the import would be unnecessary;  no import is needed for use of a namespace 
in a <a href="#element-documentation" class="eltref" shape="rect">&lt;documentation&gt;</a> 
or similar schema document element or attribute name.</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
        targetNamespace="uri:mywork" xmlns:my="uri:mywork"&gt;

 &lt;xs:import namespace="http://www.w3.org/1999/xhtml"/&gt;

 &lt;xs:annotation&gt;
  &lt;xs:documentation&gt;
   &lt;!--* The XHTML 'p' element below requires us to 
         define a prefix for the XHTML namespace, but it
         does NOT require us to import the XHTML 
         namespace into the schema.  The use of XHTML
         (or other) markup here is allowed by the lax
         wildcard in the schema for schema documents.
       *--&gt;
   &lt;xhtml:p&gt;[Some documentation for my schema]&lt;/xhtml:p&gt;
  &lt;/xs:documentation&gt;
 &lt;/xs:annotation&gt;

 . . .

 &lt;xs:complexType name="myType"&gt;
  &lt;xs:sequence&gt;
   &lt;xs:element ref="xhtml:p" minOccurs="0"/&gt;
  &lt;/xs:sequence&gt;
  . . .
 &lt;/xs:complexType&gt;

 &lt;xs:element name="myElt" type="my:myType"/&gt;
&lt;/xs:schema&gt;
</pre></div><div class="exampleWrapper">
<div class="p">Since
component references are given as <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QNames<span class="arrow">&#183;</span></a>,
and since the default namespace declaration can
only be used for one of  the target namespace and the XSD namespace
(which typically differ, except
in the case of the schema for schema documents),
<em>either</em> internal references to the names being defined in a schema document
<em>or</em> the schema declaration and definition elements themselves 
will normally be explicitly qualified.
This example takes the first option &#8212; most other
examples in this specification have taken the second.</div></div></div></div><div class="div4">
<h5><a name="schemaLocationHints" id="schemaLocationHints" shape="rect"></a>4.2.6.2 Providing Hints for Imported Schema Document Locations</h5><p>The <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>schemaLocation</code> attribute, if present on
an <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element, gives a hint as to where a
serialization of a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> with declarations and definitions for the
imported namespace (or none) can
possibly be found.  When no <code>schemaLocation</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present, the schema author is leaving the
identification of that schema to the instance, application or user,
via the mechanisms described below in <a href="#composition-instances" shape="rect">Layer 3: Schema Document Access and Web-interoperability (&#167;4.3)</a>.  When a
<code>schemaLocation</code> attribute 
is present, it <span class="rfc2119">must</span> contain a single URI reference which 
the schema author warrants will resolve to a
serialization of a <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema document<span class="arrow">&#183;</span></a> containing 
definitions and declarations of

component(s) in the
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>ed namespace.</p><p>Conformance profiles may further 
restrict the use of the <code>schemaLocation</code> attribute.   For example, 
one profile might mandate that the hint be 

honored by the schema software, perhaps calling for a 
processor-dependent error should the URI fail to resolve, 
or mandating that the hint agree with some expected URI value;  
another profile might mandate that the hint not 
be honored,

etc.
</p><div class="note"><div class="p"><b>Note:</b> Since both the <code>namespace</code> and <code>schemaLocation</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> are optional, a bare <code>&lt;import/&gt;</code> information item
is allowed.  This simply allows unqualified reference to foreign
components with no target namespace without giving any hints as to where to find them.</div></div><div class="constraintnote"><a id="src-import" name="src-import" shape="rect"></a><b>Schema Representation Constraint: Import Constraints and Semantics</b><br clear="none" /><div class="constraint"><div class="p">In addition to the conditions imposed on <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element
information items by the schema for schema documents
    <b>all</b> of the following also apply:<div class="constraintlist"><div class="clnumber">1<a id="src-import-noselfimport" name="src-import-noselfimport" shape="rect"> </a>The appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1.1 <b>If </b>the <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is present, <b>then </b>its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> does not match the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
enclosing <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>'s <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</div><div class="clnumber">1.2 <b>If </b>the <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is not present, <b>then </b>the enclosing <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> has a <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div></div>
<div class="clnumber">2<a id="c-ims" name="c-ims" shape="rect"> </a><!--* no span class='p' possible here *-->If the application schema reference strategy succeeds using the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>s of
the <code>schemaLocation</code> and <code>namespace</code>
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
      <b>one</b> of the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">2.1<a id="c-ivr" name="c-ivr" shape="rect"> </a><span class="p">The result is (a fragment of) a resource which is an XML document
(see clause <a href="#c-vxd" shape="rect">1.1</a>), which in turn corresponds to a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
element information item in a well-formed information set, which in turn
corresponds to a conforming schema.</span></div>
<div class="clnumber">2.2<a id="c-ivs" name="c-ivs" shape="rect"> </a><span class="p">The result is a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
element information item in a well-formed information set, which in turn
corresponds to a conforming schema.</span></div>
</div>
      In either case call the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> item <b>D2</b> and the conforming schema <b>S2</b>.</div>
<div class="clnumber">3 <!--* no span class='p' possible here *-->If <b>D2</b> exists, that is, clause <a href="#c-ivr" shape="rect">2.1</a> or clause <a href="#c-ivs" shape="rect">2.2</a>
above were satisfied, then the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b>there is a <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, <b>then </b>its <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is identical to the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of <b>D2</b>.</div><div class="clnumber">3.2 <b>If </b>there is no <code>namespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, <b>then </b><b>D2</b>
has no <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div></div></div>
</div>
   </div><div class="p">It is <em>not</em> an error for the application schema component reference strategy to fail.
 It <em>is</em> an error for it to  succeed but
the rest of clause <a href="#c-ims" shape="rect">2</a> above to
fail to be satisfied.  Failure is likely to cause
less than complete <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
outcomes, of course.</div><div class="p">The <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a> (that is
<a href="#s-type_definitions" class="propref" shape="rect">{type definitions}</a>, <a href="#s-attribute_declarations" class="propref" shape="rect">{attribute declarations}</a>, <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>, <a href="#s-attribute_group_definitions" class="propref" shape="rect">{attribute group definitions}</a>, <a href="#s-model_group_definitions" class="propref" shape="rect">{model group definitions}</a>,
<a href="#s-notation_declarations" class="propref" shape="rect">{notation declarations}</a>) of a schema
corresponding to a
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item with one or more
<a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element information items <span class="rfc2119">must</span> include not
only definitions or declarations corresponding to the appropriate
members of its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, but also, for each of those <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> element information items for which clause <a href="#c-ims" shape="rect">2</a> above is satisfied, a set of <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema
components<span class="arrow">&#183;</span></a> identical to all the <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema
components<span class="arrow">&#183;</span></a> of <b>S2</b> 
		 (with the possible
		 exception of the <a href="#s" class="compref" shape="rect">Schema</a> component
		 of <b>S2</b>).</div></div></div><div class="note"><div class="p"><b>Note:</b> The above is carefully worded so that
multiple <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>ing of the same schema document will not constitute a
violation of
clause <a href="#c-nmd" shape="rect">2</a> of <a href="#sch-props-correct" shape="rect">Schema Properties Correct (&#167;3.17.6.1)</a>, but
applications are allowed, indeed encouraged, to avoid <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>ing the
same schema document more than once to forestall the necessity of
establishing identity component by component.  Given that the
<code>schemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is only a hint, it is open
to applications to ignore all but the first <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> for
a given namespace, regardless of the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of <code>schemaLocation</code>, but such a strategy risks
missing useful information when new <code>schemaLocation</code>s are
offered.</div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#layer2" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="composition-instances" id="composition-instances" shape="rect"></a>4.3 Layer 3: Schema Document Access and Web-interoperability</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.1 <a href="#schema-repr" shape="rect">Standards for representation of schemas and retrieval of schema documents on the Web</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.2 <a href="#schema-loc" shape="rect">How schema definitions are located on the Web</a><br clear="none" />
</div><p>Layers 1 and 2 provide a framework for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> and XML definition of schemas in a
broad variety of environments. Over time, it is possible that a range of standards and
conventions will evolve to support
interoperability of XSD implementations on the World Wide Web.
Layer 3 defines the minimum level of function required of all
conformant processors operating on the Web: it is intended that, over
time, future standards (e.g. XML Packages) for interoperability on the
Web and in other environments can be introduced without the need to
republish this specification.</p><div class="div3">
<h4><a name="schema-repr" id="schema-repr" shape="rect"></a>4.3.1 Standards for representation of schemas and retrieval of schema documents on the Web</h4><p>For interoperability, serialized <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>, like all other Web
resources, <span class="rfc2119">should</span> be identified by URI and
retrieved using the standard mechanisms of the Web (e.g. http, https,
etc.) Such documents on the Web <span class="rfc2119">must</span> be part of XML documents (see
clause <a href="#c-vxd" shape="rect">1.1</a>), and are represented in the standard XML
schema definition form described by layer 2 (that is as
<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information items). </p><div class="note"><div class="p"><b>Note:</b> <a name="anchor5167a2" id="anchor5167a2" shape="rect"></a>
there will often be times when a schema document will be a
complete XML document whose document element is <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>. There will be
other occasions in which <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> items will be contained in other
documents, perhaps referenced using fragment and/or

<a href="#ref-xpointer" shape="rect">[XPointer]</a> notation.
</div></div><div class="note"><div class="p"><b>Note:</b> The variations among server software and web site administration policies
make it difficult to recommend any particular approach to retrieval requests
intended to retrieve serialized <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a>.  An <code>Accept</code> header of <code>application/xml,
text/xml; q=0.9, */*</code> is perhaps a reasonable starting point.</div></div></div><div class="div3">
<h4><a name="schema-loc" id="schema-loc" shape="rect"></a>4.3.2 How schema definitions are located on the Web</h4><p>As described in <a href="#layer1" shape="rect">Layer 1: Summary of the Schema-validity Assessment Core (&#167;4.1)</a>, processors are responsible for providing the
schema components (definitions and declarations) needed for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. This
section introduces a set of  conventions to facilitate interoperability
for instance and schema documents retrieved and processed from the Web.</p><div class="note"><div class="p"><b>Note:</b>  As discussed above in <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition (&#167;4.2)</a>, other non-Web
mechanisms for delivering schemas for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>  exist, but are outside the scope of this
specification.</div></div><div class="block">Processors on the Web are free to undertake <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> against arbitrary
schemas in any of the ways set out in <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>. However, it
is useful to have a common convention for determining the schema to use. Accordingly, general-purpose schema-aware processors (i.e. those not
specialized to one or a fixed set of pre-determined schemas)
undertaking <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> of an instance document on the web
<span class="rfc2119">must</span> behave as follows:
<ul><li><div class="p">unless directed otherwise by the user, <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> is undertaken on the document
element information item of the 
instance document;</div></li><li><div class="p">unless directed otherwise by the user, the
processor is required to construct a schema corresponding to a schema document
whose <code>targetNamespace</code> is
identical to the
namespace name, if any, of the element information item on which <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> is undertaken.</div></li></ul>
</div><p>The composition of the complete
schema for use in <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> is discussed in <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition (&#167;4.2)</a> above.
The means used to locate appropriate schema document(s) are processor and
application dependent, subject to the following requirements: </p><ol class="enumar"><li><div class="p">Schemas are represented on the Web in the form specified above in <a href="#schema-repr" shape="rect">Standards for representation of schemas and retrieval of schema documents on the Web (&#167;4.3.1)</a>;</div></li><li><div class="p">The author of a document uses namespace declarations to
indicate the intended interpretation of names appearing therein;
it is possible but not guaranteed that
a schema is retrievable via
the namespace name.  Accordingly whether a processor's default
behavior is or is not to attempt such dereferencing, it <span class="rfc2119">must</span> always
provide for user-directed overriding of that default.
</div><div class="note"><div class="p"><b>Note:</b>  Experience suggests that it is not in all cases safe or desirable from
a performance point of view to dereference namespace names as a matter of course.  User community and/or
consumer/provider agreements may 
establish circumstances in which such dereference is a sensible
default strategy:  this specification allows but does not require particular communities to
establish and implement such conventions.  Users are always free to supply namespace names as schema location information when dereferencing <em>is</em> desired:  see below.</div></div></li><li><div class="p">
On the other hand, in case a document author (human or not) created a
document with a particular schema in view, and warrants that some or
all of the document conforms to that schema, the
<code>xsi:schemaLocation</code> 
and <code>xsi:noNamespaceSchemaLocation</code> 
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>  are provided.  The first records
the author's warrant with pairs of URI references (one for the namespace name, and
one for a hint as to the location of a schema document defining names for that
namespace name).  The second similarly provides a URI reference as a hint as to
the location of a schema document with no <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.</div><div class="p"> Processors <span class="rfc2119">may</span>
attempt to dereference each schema document location URI in the
<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of such
<code>xsi:schemaLocation</code> and <code>xsi:noNamespaceSchemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.
Schema processors <span class="rfc2119">should</span> provide an option to
control whether they do so.
It is <em>not</em> an error for such
an attempt to fail, but failure may cause less than complete
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> outcomes.</div><div class="note"><div class="p"><b>Note:</b> Whether schema location information in the document
	 instance should or should not be dereferenced may vary with
	 the purpose in view.
	</div><div class="p">
	 When systems rely on an input document being schema-valid
	 with respect to a particular agreed-upon schema, it is
	 important that they be able to have complete control over the
	 choice of schema used in assessment and in particular that
	 they be able to instruct the processor <em>not</em> to
	 follow any <code>schemaLocation</code> hints in the input.
	 Otherwise, the input document could circumvent the agreement
	 and the consumer's validation of the input, by referring to
	 an alternative schema for the same namespaces, which declares
	 the input document schema-valid but which does not adhere to
	 the prior agreement between the data source and the data
	 consumer.
	</div><div class="p">
	 In other cases the purpose of assessment may be not to
	 enforce a prior agreement between data source and consumer,
	 but to annotate the input with type definitions and other
	 useful information from the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.  In such cases it will
	 often be better to follow the <code>schemaLocation</code> hints.
	</div><div class="p">
	 Users who need to exert control over the choice of schema can
	 normally be expected to be aware of the requirement;
	 conversely, users unaware of the issue will typically be
	 those who are not relying on the use of a particular schema
	 to enforce a specific agreement with the data source.  Casual
	 users will often benefit from a default behavior of following
	 <code>schemaLocation</code> hints.
	</div><div class="p">
	 Useful guidance on how to present this and other questions to
	 end users may be found in the W3C's User Agent Accessibility
	 Guidelines <a href="#UAAG-1.0" shape="rect">[UAAG 1.0]</a>, <a href="#UAAG-2.0" shape="rect">[UAAG 2.0]</a>.
	</div></div></li><li><div class="p">
 When schema location values (i.e. <code>schemaLocation</code> attributes on
 <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>,
 and <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> in schema documents, or
 <code>xsi:schemaLocation</code> and <code>xsi:noNamespaceSchemaLocation</code>
 attributes in instance documents) are dereferenced and the values are relative
 references, then the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[base URI]</a> of the
 <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a> <span class="rfc2119">must</span> be used to resolve the relative references.
</div></li><li><div class="p"> According to the rules of
  <a href="#layer1" shape="rect">Layer 1: Summary of the Schema-validity Assessment Core (&#167;4.1)</a>, the corresponding schema <span class="rfc2119">may</span> be lazily assembled, but is otherwise
  stable throughout <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. Although schema location attributes can occur
  on any element, and can be processed incrementally as discovered, their effect
  is essentially global to the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>. Definitions and declarations remain
  in effect beyond the scope of the element on which the binding is declared.
  </div></li></ol><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">Multiple schema bindings can be declared using a single
attribute.  For example consider a stylesheet:</div></div><div class="exampleInner">
<pre xml:space="preserve">
 &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xhtml="http://www.w3.org/1999/xhtml"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform
                       http://www.w3.org/1999/XSL/Transform.xsd
                       http://www.w3.org/1999/xhtml
                       http://www.w3.org/1999/xhtml.xsd"&gt;
</pre></div><div class="exampleWrapper">
<div class="p">The namespace names used in <code>schemaLocation</code> can, but need not
  be identical to those actually qualifying the element within whose start tag
it is found or its other attributes. For example, as above, all
  schema location information can be declared on the document element
of a document, if desired,
  regardless of where the namespaces are actually used. </div></div></div><p>Improved or alternative conventions for Web interoperability can
be standardized in the future without reopening this specification. For
example, the W3C is currently considering initiatives to standardize the
packaging of resources relating to particular documents and/or namespaces: this
would be an addition to the mechanisms described here for layer 3. This
architecture also facilitates innovation at layer 2: for example, it would be
possible in the future to define an additional standard for the representation of
schema components which allowed e.g. type definitions to be specified piece by
piece, rather than all at once.</p></div></div></div><div class="div1">
<h2><a name="conformance" id="conformance" shape="rect"></a>5 Schemas and Schema-validity Assessment</h2><p>The architecture of schema-aware processing allows for a rich
characterization of XML documents:  schema validity is not a binary
predicate.</p><p>This specification distinguishes between errors in schema
construction and structure, on the one hand, and schema validation
outcomes, on the other.</p><div class="div2">
<h3><span class="nav"> <a href="#validation_outcome" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="conformance-schemaValidity" id="conformance-schemaValidity" shape="rect"></a>5.1 Errors in Schema Construction and Structure</h3><p>Before <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> can be
     attempted, a schema is required. Special-purpose applications are
     free to determine a schema for use in <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> by whatever means are
     appropriate, but general purpose processors <span class="rfc2119">should</span> implement
     and document a strategy for assembling a schema,
      exploiting at least some if not all of the non-hard-coded
      methods outlined in <a href="#var_schema_con" shape="rect">
Terminology of schema construction
 (&#167;C.2)</a>,
     starting with the namespaces declared in the document whose
     <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> is being undertaken,
     and the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a>s of the <code>xsi:schemaLocation</code> and
     <code>xsi:noNamespaceSchemaLocation</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>
     thereof, if any, along with any other information about schema
     identity or schema document location provided by users in
     application-specific ways, if any.</p><p>It is an error if a schema and all the components which are the
     value of any of its properties, recursively, fail to satisfy all
     the relevant Constraints on Schemas set out in 
      the subsections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>.</p><div class="block">If a schema is derived from one or more schema documents (that
     is, one or more <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information items)
     based on the
     correspondence rules set out in <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and
     <a href="#composition" shape="rect">Schemas and Namespaces: Access and Composition (&#167;4)</a>, two additional conditions 
     hold; both apply to the
     schema document after the conditional-inclusion
      pre-processing described in <a href="#cip" shape="rect">Conditional inclusion (&#167;4.2.2)</a>
      is performed:
     <ul><li><div class="p">It is an error if any such schema document would not be
	fully valid with respect to a schema corresponding to the
	<a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>, that is, following
	schema-validation with such a schema, the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information items would have a
	<a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> property with value
	<b><i>full</i></b> or <b><i>partial</i></b> and a
<a href="#e-validity" class="propref" shape="rect">[validity]</a> property with value
	<b><i>valid</i></b>.</div></li><li><div class="p">It is an error if any such schema document is or contains
	any element information items which violate any of the
	relevant Schema Representation Constraints set out in <a href="#outcome-src" shape="rect">Schema Representation Constraints (&#167;B.3)</a>.</div></li></ul>
    </div><p>The  cases described above are the only types of error
     which this specification defines.  With respect to the processes
     of the checking of schema structure and the construction of
     schemas corresponding to schema documents, this specification
     imposes no restrictions on processors  in the
      presence of errors, beyond the
       requirement that if there are errors in a schema, or in one
       or more
       schema documents used in constructing a schema, then a 
       conforming processor <span class="rfc2119">must</span> report 
       the fact. 
      However, any further 
      operations performed in the
      presence of errors are outside the scope of this specification
      and are not <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>schema-validity
       assessment<span class="arrow">&#183;</span></a> as that term is defined here.</p></div><div class="div2">
<h3><span class="nav"><a href="#conformance-schemaValidity" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#conformance-missing" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="validation_outcome" id="validation_outcome" shape="rect"></a>5.2 Assessing Schema-Validity</h3><p>With a schema which satisfies the conditions expressed in <a href="#conformance-schemaValidity" shape="rect">Errors in Schema Construction and Structure (&#167;5.1)</a> above, the schema-validity of an
element or attribute
information item (the
<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>) can be assessed.  Five
primary approaches to this are described
and given names here; conforming processors <span class="rfc2119">may</span> but are not required
to provide interfaces so that they can be invoked in ways consistent 
with any or all of these approaches.
</p><div class="block">

<div class="glist"><div class="gitem"><div class="giLabel">type-driven validation</div><div class="giDef"><div class="p">The user or application identifies a  type definition from among the type
definitions of the schema. If the
<a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> is an element, then it is validated as described
in <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>
(with the stipulated type definition
as the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>); if it is an
attribute, then it is validated with respect to that type definition
as described in <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>.</div><div class="note"><div class="p"><b>Note:</b> Top-level (named) types <span class="rfc2119">should</span> be supported; 
support for local types is optional.</div></div></div></div><div class="gitem"><div class="giLabel"><a name="c-res" id="c-res" shape="rect"></a>element-driven validation</div><div class="giDef"><div class="p">The user or application identifies an element declaration  from among the element
declarations of the schema and the
item is validated as described in <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> (with
the stipulated element declaration as the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration);</div><div class="note"><div class="p"><b>Note:</b> Top-level elements 
<span class="rfc2119">should</span> be supported; support for local elements is optional.</div></div></div></div><div class="gitem"><div class="giLabel">attribute-driven validation</div><div class="giDef"><div class="p">The user or application identifies an attribute declaration from
among the attribute declarations of the schema and the item is validated as described in
<a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute) (&#167;3.2.4.3)</a> (with
the stipulated attribute declaration as its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
declaration);</div></div></div><div class="gitem"><div class="giLabel">lax wildcard validation</div><div class="giDef"><div class="p">The processor starts from <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> with
no stipulated declaration or definition. If the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> and the schema determine an
element declaration (by the name of the element), an attribute
declaration (by the name of the attribute), or a type definition (by
<code>xsi:type</code>), then <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strict
validation<span class="arrow">&#183;</span></a> is performed.  If they do
not identify any declaration or definition, then 
<a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>lax assessment
<span class="arrow">&#183;</span></a> is
performed.
<div class="note"><div class="p"><b>Note:</b> The name for this method of
invocation reflects the fact that it is analogous to the validation of
an element information item which matches a <b><i>lax</i></b>
wildcard.</div></div></div></div></div><div class="gitem"><div class="giLabel"><a name="key-strict-wc-mode" id="key-strict-wc-mode" shape="rect"></a>strict wildcard validation</div><div class="giDef"><div class="p">The processor starts from <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a> with no
stipulated declaration or definition. If the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>
and the schema determine an element declaration (by the name of the element),
an attribute declaration (by the name of the attribute), or a
type definition (via <code>xsi:type</code>), then <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strict<span class="arrow">&#183;</span></a> validation is
performed; if they do not identify any declaration or
definition, then 
<a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>lax assessment<span class="arrow">&#183;</span></a> is performed.
</div><div class="note"><div class="p"><b>Note:</b> From the point of view of schema-validity assessment and the
resulting <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, lax and strict wildcard validation 
produce 
the same result.  
The distinction is provided in order to provide two different terms
to express the different expectations of the invoking process.
</div><div class="p">
In typical cases strict wildcard validation will be
performed when the invoking process expects the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>
to be declared and valid and will otherwise 
report an error to its environment.  If the absence of
a declaration for the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a> counts as a successful
outcome of validation, then it is preferable to use
lax wildcard 
validation instead.
</div><div class="p">
The name for this method of invocation
reflects the fact that it is analogous to the
validation of an element information item which matches a
<b><i>strict</i></b> wildcard.
</div></div></div></div></div>
</div><div class="note"><div class="p"><b>Note:</b> For type-, element-, and attribute-driven validation,
there is no requirement that the declaration or definition
identified by the user or application be a top-level
component of the schema.  Mechanisms for referring to 
other components are out of scope for this specification,
but see <a href="#ref-scds" shape="rect">[XML Schema: Component Designators]</a>.</div></div><p><span class="termdef"><a name="key-vr" id="key-vr" title="" shape="rect">[Definition:]&#160;&#160;</a>The element or attribute information item at which <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> begins is called the
<b>validation root</b>.</span></p><p>The outcome of schema-validity
assessment will be manifest in the <span class="anonRef">[validation attempted]</span> and <span class="anonRef">[validity]</span> properties on the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>, and if the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>
is an element information item then also
on its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, recursively, as
defined by <a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element) (&#167;3.3.5.1)</a> and <a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute) (&#167;3.2.5.1)</a>.  There is no
requirement that input which is not schema-valid be rejected by an
application. It is up to applications to decide what
constitutes a successful outcome of
validation.</p><p>Note that every element and attribute information item
participating in the <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> will
also have a <span class="anonRef">[validation context]</span>
property which refers back to the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>.  </p><div class="note"><div class="p"><b>Note:</b> This specification does not reconstruct the XML notion of
      <em>root</em> in either schemas or instances.  Equivalent
functionality is provided for at <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
invocation, via <a href="#c-res" shape="rect">element-driven validation</a> above.</div></div><div class="note"><div class="p"><b>Note:</b> This specification has nothing normative to say about multiple
<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episodes.  It should
however be clear from the above that if a processor restarts <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> with respect to a <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> some <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
contributions from the previous <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> are likely
to be overwritten.  Restarting can
nonetheless be useful, particularly at a node whose <span class="anonRef">[validation attempted]</span> property is
<b><i>none</i></b>, in which case there are three obvious cases in which
additional useful information could
result:
    <ul><li><div class="p"><a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> was not attempted
because of a <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> failure, but
declarations and/or definitions are available for at least some of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> or <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>;</div></li><li><div class="p"><a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> was not attempted
because a named definition or declaration was missing, but after
further effort the processor has retrieved it.</div></li><li><div class="p"><a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> was not attempted
because it was 
<a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>,
but the processor has at least some
declarations and/or definitions available for at least some of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> or <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</div></li></ul>
   </div></div></div><div class="div2">
<h3><span class="nav"><a href="#validation_outcome" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#conformance-processorResponsibilities" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="conformance-missing" id="conformance-missing" shape="rect"></a>5.3 Missing Sub-components</h3><p>At the beginning of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a>, attention is drawn to the
fact that most kinds of schema components have properties which are described therein
as having other components, or sets of other components, as values, but that
when components are constructed on the basis of their correspondence with
element information items in schema documents, such properties usually
correspond to <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QNames</a>, and the
<a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolution<span class="arrow">&#183;</span></a> of such <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QNames</a> can fail, resulting in one or more values of or containing <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> where a component is mandated.</p><p>If at any time during <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>, an element or attribute
information item is being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> with respect to a component of
any kind any of whose properties has or contains such an <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> value, 
the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> is modified,
as following:


</p><div class="block">
<ul><li><div class="p">In the case of 
attribute information items, the effect is as if
clause <a href="#c-a1" shape="rect">1</a> of <a href="#cvc-attribute" shape="rect">Attribute Locally Valid (&#167;3.2.4.1)</a> had
failed;</div></li><li><div class="p">In the case of 
element information items, the effect is as if
clause <a href="#c-ea" shape="rect">1</a> of <a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a> had
failed;</div></li><li><div class="p">In the case of element information items, processors
<span class="rfc2119">must</span> fall back to
<a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>lax assessment<span class="arrow">&#183;</span></a>.</div></li></ul>
</div><p>Because of the value specification for <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a> in <a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element) (&#167;3.3.5.1)</a>, if this situation ever arises, the
document as a whole cannot show a <a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a>
of <b><i>full</i></b>.</p><p>References in a <a href="#std" class="compref" shape="rect">Simple Type Definition</a> to
     <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-dt" shape="rect">unknown</a>
      datatypes, or to 
     <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-unknown-dt" shape="rect">unknown</a>
      constraining facets, make the
     simple type definition unusable in ways similar to
     having <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> property values.   Often, such references will 
     result in component properties with <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> values, but 
     not necessarily.  In either case they,
     and likewise any types derived or constructed from them,
     are handled in the same way as described above for components 
     with <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> property values.
    </p></div><div class="div2">
<h3><span class="nav"><a href="#conformance-missing" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="conformance-processorResponsibilities" id="conformance-processorResponsibilities" shape="rect"></a>5.4 Responsibilities of Schema-aware Processors</h3><p>Schema-aware processors are responsible for processing XML documents,
schemas and schema documents, as appropriate given the level of conformance
(as defined in <a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a>) they support,
consistently with the conditions set out above.</p></div></div></div><div class="back"><div class="div1">
<h2><a name="normative-schemaSchema" id="normative-schemaSchema" shape="rect"></a>A Schema for Schema Documents (Structures) (normative)</h2><p>The XML representation of the schema for schema documents is
presented here as a normative part of the specification, and as an
illustrative example of how the XML Schema Definition Language can define itself
using its own constructs. The names of XSD types,
elements, attributes and groups defined here are evocative of their
purpose, but are occasionally verbose. </p><p>There is some annotation in comments, but a fuller annotation will
require the use of embedded documentation facilities or a hyperlinked
external annotation for which tools are not yet readily available.</p><p>Like any other XML document, schema
documents may carry XML and document type declarations. An XML
declaration and a document type declaration are provided here for
convenience. Since this schema document describes the XSD
language, the <code>targetNamespace</code> attribute on the
<code>schema</code> element refers to the XSD namespace
itself.</p><p>
Schema documents conforming to this specification may be in XML
1.0 or XML 1.1.  Conforming implementations may accept input in
XML 1.0 or XML 1.1 or both.  See <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.4)</a>.
</p><p>
Independent copies of this material are
available in an undated (mutable) version at
<a href="http://www.w3.org/2009/XMLSchema/XMLSchema.xsd" shape="rect">http://www.w3.org/2009/XMLSchema/XMLSchema.xsd</a>
and in a dated (immutable) version at
<a href="http://www.w3.org/2011/07/XMLSchema.xsd" shape="rect">http://www.w3.org/2011/07/XMLSchema.xsd</a>
&#8212; the mutable version will be updated with future revisions of 
this specification, and the immutable one will not.

</p><div class="sfsScrap" id="div_sdfsd">
<a id="sdfsd" name="sdfsd" shape="rect"></a>
<div class="sfsHead">Schema for schema documents</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;?xml version='1.0'?&gt;

&lt;!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [

&lt;!-- provide ID type information even for parsers which only read the
     internal subset --&gt;
&lt;!ATTLIST xs:schema          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:complexType     id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:complexContent  id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:simpleContent   id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:extension       id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:element         id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:group           id  ID  #IMPLIED&gt; 
&lt;!ATTLIST xs:all             id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:choice          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:sequence        id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:any             id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:anyAttribute    id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:attribute       id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:attributeGroup  id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:unique          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:key             id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:keyref          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:selector        id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:field           id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:assert          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:include         id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:import          id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:redefine        id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:override        id  ID  #IMPLIED&gt;
&lt;!ATTLIST xs:notation        id  ID  #IMPLIED&gt;
]&gt;

&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified" xml:lang="EN"
           targetNamespace="http://www.w3.org/2001/XMLSchema"
           version="structures.xsd (cr-20110721)"&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation  source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html"&gt;
   The schema corresponding to this document is normative,
   with respect to the syntactic constraints it expresses in the
   XML Schema Definition Language.  The documentation (within &amp;lt;documentation&gt; elements)
   below, is not normative, but rather highlights important aspects of
   the W3C Recommendation of which this is a part.

      See below (at the bottom of this document) for information about
      the revision and namespace-versioning policy governing this
      schema document.

    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
   The simpleType element and all of its members are defined
   in datatypes.xsd&lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:include schemaLocation="datatypes.xsd"/&gt;
  &lt;xs:import namespace="http://www.w3.org/XML/1998/namespace"
             schemaLocation="http://www.w3.org/2001/xml.xsd"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
       Get access to the xml: attribute groups for xml:lang
       as declared on 'schema' and 'documentation' below
     &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:import&gt;
  &lt;xs:complexType name="openAttrs"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
       This type is extended by almost all schema types
       to allow attributes from other namespaces to be
       added to user schemas.
     &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:anyType"&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="annotated"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
       This type is extended by all types which allow annotation
       other than &amp;lt;schema&gt; itself
     &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:openAttrs"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="id" type="xs:ID"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:group name="composition"&gt;
    &lt;xs:choice&gt;
      &lt;xs:element ref="xs:include"/&gt;
      &lt;xs:element ref="xs:import"/&gt;
      &lt;xs:element ref="xs:redefine"/&gt;
      &lt;xs:element ref="xs:override"/&gt;
      &lt;xs:element ref="xs:annotation"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:group name="schemaTop"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   This group is for the
   elements which occur freely at the top level of schemas.
   All of their types are based on the "annotated" type by extension.&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:choice&gt;
      &lt;xs:group ref="xs:redefinable"/&gt;
      &lt;xs:element ref="xs:element"/&gt;
      &lt;xs:element ref="xs:attribute"/&gt;
      &lt;xs:element ref="xs:notation"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:group name="redefinable"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   This group is for the
   elements which can self-redefine (see &amp;lt;redefine&gt; below).&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:choice&gt;
      &lt;xs:element ref="xs:simpleType"/&gt;
      &lt;xs:element ref="xs:complexType"/&gt;
      &lt;xs:element ref="xs:group"/&gt;
      &lt;xs:element ref="xs:attributeGroup"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:simpleType name="formChoice"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:NMTOKEN"&gt;
      &lt;xs:enumeration value="qualified"/&gt;
      &lt;xs:enumeration value="unqualified"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="reducedDerivationControl"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:derivationControl"&gt;
      &lt;xs:enumeration value="extension"/&gt;
      &lt;xs:enumeration value="restriction"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="derivationSet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
      &lt;xs:documentation&gt;
   #all or (possibly empty) subset of {extension, restriction}&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:union&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:token"&gt;
          &lt;xs:enumeration value="#all"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list itemType="xs:reducedDerivationControl"/&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="typeDerivationControl"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:derivationControl"&gt;
      &lt;xs:enumeration value="extension"/&gt;
      &lt;xs:enumeration value="restriction"/&gt;
      &lt;xs:enumeration value="list"/&gt;
      &lt;xs:enumeration value="union"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="fullDerivationSet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
      &lt;xs:documentation&gt;
   #all or (possibly empty) subset of {extension, restriction, list, union}&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:union&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:token"&gt;
          &lt;xs:enumeration value="#all"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list itemType="xs:typeDerivationControl"/&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:element name="schema" id="schema"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-schema"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:openAttrs"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:group ref="xs:composition" minOccurs="0" maxOccurs="unbounded"/&gt;
            &lt;xs:sequence minOccurs="0"&gt;
              &lt;xs:element ref="xs:defaultOpenContent"/&gt;
              &lt;xs:element ref="xs:annotation" minOccurs="0"
                          maxOccurs="unbounded"/&gt;
            &lt;/xs:sequence&gt;
            &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
              &lt;xs:group ref="xs:schemaTop"/&gt;
              &lt;xs:element ref="xs:annotation" minOccurs="0"
                          maxOccurs="unbounded"/&gt;
            &lt;/xs:sequence&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
          &lt;xs:attribute name="version" type="xs:token"/&gt;
          &lt;xs:attribute name="finalDefault" type="xs:fullDerivationSet"
                        default="" use="optional"/&gt;
          &lt;xs:attribute name="blockDefault" type="xs:blockSet" default=""
                        use="optional"/&gt;
          &lt;xs:attribute name="attributeFormDefault" type="xs:formChoice"
                        default="unqualified" use="optional"/&gt;
          &lt;xs:attribute name="elementFormDefault" type="xs:formChoice"
                        default="unqualified" use="optional"/&gt;
          &lt;xs:attribute name="defaultAttributes" type="xs:QName"/&gt;
          &lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"
                        default="##local" use="optional"/&gt;
          &lt;xs:attribute name="id" type="xs:ID"/&gt;
          &lt;xs:attribute ref="xml:lang"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
    &lt;xs:key name="element"&gt;
      &lt;xs:selector xpath="xs:element"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="attribute"&gt;
      &lt;xs:selector xpath="xs:attribute"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="type"&gt;
      &lt;xs:selector xpath="xs:complexType|xs:simpleType"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="group"&gt;
      &lt;xs:selector xpath="xs:group"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="attributeGroup"&gt;
      &lt;xs:selector xpath="xs:attributeGroup"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="notation"&gt;
      &lt;xs:selector xpath="xs:notation"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
    &lt;xs:key name="identityConstraint"&gt;
      &lt;xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/&gt;
      &lt;xs:field xpath="@name"/&gt;
    &lt;/xs:key&gt;
  &lt;/xs:element&gt;
  &lt;xs:simpleType name="allNNI"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   for maxOccurs&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:union memberTypes="xs:nonNegativeInteger"&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:NMTOKEN"&gt;
          &lt;xs:enumeration value="unbounded"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:attributeGroup name="occurs"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   for all particles&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:attribute name="minOccurs" type="xs:nonNegativeInteger" default="1"
                  use="optional"/&gt;
    &lt;xs:attribute name="maxOccurs" type="xs:allNNI" default="1" use="optional"/&gt;
  &lt;/xs:attributeGroup&gt;
  &lt;xs:attributeGroup name="defRef"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   for element, group and attributeGroup,
   which both define and reference&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:attribute name="name" type="xs:NCName"/&gt;
    &lt;xs:attribute name="ref" type="xs:QName"/&gt;
  &lt;/xs:attributeGroup&gt;
  &lt;xs:group name="typeDefParticle"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   'complexType' uses this&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:choice&gt;
      &lt;xs:element name="group" type="xs:groupRef"/&gt;
      &lt;xs:element ref="xs:all"/&gt;
      &lt;xs:element ref="xs:choice"/&gt;
      &lt;xs:element ref="xs:sequence"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:group name="nestedParticle"&gt;
    &lt;xs:choice&gt;
      &lt;xs:element name="element" type="xs:localElement"/&gt;
      &lt;xs:element name="group" type="xs:groupRef"/&gt;
      
      &lt;xs:element ref="xs:choice"/&gt;
      &lt;xs:element ref="xs:sequence"/&gt;
      &lt;xs:element ref="xs:any"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:group name="particle"&gt;
    &lt;xs:choice&gt;
      &lt;xs:element name="element" type="xs:localElement"/&gt;
      &lt;xs:element name="group" type="xs:groupRef"/&gt;
      &lt;xs:element ref="xs:all"/&gt;
      &lt;xs:element ref="xs:choice"/&gt;
      &lt;xs:element ref="xs:sequence"/&gt;
      &lt;xs:element ref="xs:any"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:complexType name="attribute"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attributeGroup ref="xs:defRef"/&gt;
        &lt;xs:attribute name="type" type="xs:QName"/&gt;
        &lt;xs:attribute name="use" default="optional" use="optional"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:NMTOKEN"&gt;
              &lt;xs:enumeration value="prohibited"/&gt;
              &lt;xs:enumeration value="optional"/&gt;
              &lt;xs:enumeration value="required"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="default" type="xs:string"/&gt;
        &lt;xs:attribute name="fixed" type="xs:string"/&gt;
        &lt;xs:attribute name="form" type="xs:formChoice"/&gt;
        &lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
          
        &lt;xs:attribute name="inheritable" type="xs:boolean"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="topLevelAttribute"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:attribute"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="ref" use="prohibited"/&gt;
        &lt;xs:attribute name="form" use="prohibited"/&gt;
        &lt;xs:attribute name="use" use="prohibited"/&gt;
        &lt;xs:attribute name="targetNamespace" use="prohibited"/&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
        &lt;xs:attribute name="inheritable" type="xs:boolean"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:group name="attrDecls"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
        &lt;xs:element name="attribute" type="xs:attribute"/&gt;
        &lt;xs:element name="attributeGroup" type="xs:attributeGroupRef"/&gt;
      &lt;/xs:choice&gt;
      &lt;xs:element ref="xs:anyAttribute" minOccurs="0"/&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:group&gt;
  &lt;xs:element name="anyAttribute"  id="anyAttribute"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-anyAttribute"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:wildcard"&gt;
          &lt;xs:attribute name="notQName" type="xs:qnameListA"
                        use="optional"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:group name="assertions"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element name="assert" type="xs:assertion"
                  minOccurs="0" maxOccurs="unbounded"/&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:group&gt;
  &lt;xs:complexType name="assertion"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:attribute name="test" type="xs:string"/&gt;
        &lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:group name="complexTypeModel"&gt;
    &lt;xs:choice&gt;
      &lt;xs:element ref="xs:simpleContent"/&gt;
      &lt;xs:element ref="xs:complexContent"/&gt;
      &lt;xs:sequence&gt;
        &lt;xs:annotation&gt;
          &lt;xs:documentation&gt;
   This branch is short for
   &amp;lt;complexContent&gt;
   &amp;lt;restriction base="xs:anyType"&gt;
   ...
   &amp;lt;/restriction&gt;
   &amp;lt;/complexContent&gt;&lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;
        &lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;
        &lt;xs:group ref="xs:typeDefParticle" minOccurs="0"/&gt;
        &lt;xs:group ref="xs:attrDecls"/&gt;
        &lt;xs:group ref="xs:assertions"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:complexType name="complexType" abstract="true"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:group ref="xs:complexTypeModel"/&gt;
        &lt;xs:attribute name="name" type="xs:NCName"&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
      Will be restricted to required or prohibited&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="mixed" type="xs:boolean" use="optional"&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
      Not allowed if simpleContent child is chosen.
      May be overridden by setting on complexContent child.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="abstract" type="xs:boolean" default="false"
                      use="optional"/&gt;
        &lt;xs:attribute name="final" type="xs:derivationSet"/&gt;
        &lt;xs:attribute name="block" type="xs:derivationSet"/&gt;
        &lt;xs:attribute name="defaultAttributesApply" type="xs:boolean"
                      default="true" use="optional"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="topLevelComplexType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:complexType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:complexTypeModel"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="localComplexType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:complexType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:complexTypeModel"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" use="prohibited"/&gt;
        &lt;xs:attribute name="abstract" use="prohibited"/&gt;
        &lt;xs:attribute name="final" use="prohibited"/&gt;
        &lt;xs:attribute name="block" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="restrictionType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:choice minOccurs="0"&gt;
            
            &lt;xs:sequence&gt;
              &lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;
              &lt;xs:group ref="xs:typeDefParticle"/&gt;
            &lt;/xs:sequence&gt;
            &lt;xs:group ref="xs:simpleRestrictionModel"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          &lt;xs:group ref="xs:assertions"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="base" type="xs:QName" use="required"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="complexRestrictionType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:restrictionType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="0"&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;This choice is added simply to
                   make this a valid restriction per the REC&lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
            
            &lt;xs:sequence&gt;
              &lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;
              &lt;xs:group ref="xs:typeDefParticle"/&gt;
            &lt;/xs:sequence&gt;
          &lt;/xs:choice&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          &lt;xs:group ref="xs:assertions"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="extensionType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:openContent" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:typeDefParticle" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          &lt;xs:group ref="xs:assertions"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="base" type="xs:QName" use="required"/&gt;
        
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="complexContent" id="complexContent"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-complexContent"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:choice&gt;
            &lt;xs:element name="restriction" type="xs:complexRestrictionType"/&gt;
            &lt;xs:element name="extension" type="xs:extensionType"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:attribute name="mixed" type="xs:boolean"&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;
       Overrides any setting on complexType parent.&lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
          &lt;/xs:attribute&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="openContent" id="openContent"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-openContent"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element name="any" minOccurs="0" type="xs:wildcard"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="mode" default="interleave" use="optional"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="none"/&gt;
                &lt;xs:enumeration value="interleave"/&gt;
                &lt;xs:enumeration value="suffix"/&gt;
              &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
          
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="defaultOpenContent" id="defaultOpenContent"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-defaultOpenContent"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element name="any" type="xs:wildcard"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="appliesToEmpty" type="xs:boolean"
                        default="false" use="optional"/&gt;
          &lt;xs:attribute name="mode" default="interleave" use="optional"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="interleave"/&gt;
                &lt;xs:enumeration value="suffix"/&gt;
              &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
          
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:complexType name="simpleRestrictionType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:restrictionType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="0"&gt;
            &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;This choice is added simply to
                   make this a valid restriction per the REC&lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
            &lt;xs:group ref="xs:simpleRestrictionModel"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          &lt;xs:group ref="xs:assertions"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="simpleExtensionType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:extensionType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
      No typeDefParticle group reference&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          &lt;xs:group ref="xs:assertions"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="simpleContent" id="simpleContent"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-simpleContent"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:choice&gt;
            &lt;xs:element name="restriction" type="xs:simpleRestrictionType"/&gt;
            &lt;xs:element name="extension" type="xs:simpleExtensionType"/&gt;
          &lt;/xs:choice&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="complexType" type="xs:topLevelComplexType" id="complexType"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-complexType"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:simpleType name="blockSet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
    A utility type, not for public use&lt;/xs:documentation&gt;
      &lt;xs:documentation&gt;
    #all or (possibly empty) subset of {substitution, extension,
    restriction}&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:union&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:token"&gt;
          &lt;xs:enumeration value="#all"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:derivationControl"&gt;
              &lt;xs:enumeration value="extension"/&gt;
              &lt;xs:enumeration value="restriction"/&gt;
              &lt;xs:enumeration value="substitution"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:list&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:complexType name="element" abstract="true"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   The element element can be used either
   at the top level to define an element-type binding globally,
   or within a content model to either reference a globally-defined
   element or type or declare an element-type binding locally.
   The ref form is not allowed at the top level.&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:choice minOccurs="0"&gt;
            &lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
            &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:element name="alternative" type="xs:altType" 
                    minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;xs:group ref="xs:identityConstraint" minOccurs="0"
                    maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attributeGroup ref="xs:defRef"/&gt;
        &lt;xs:attribute name="type" type="xs:QName"/&gt;
        
        &lt;xs:attribute name="substitutionGroup"&gt;
         &lt;xs:simpleType&gt;
          &lt;xs:list itemType="xs:QName"/&gt;
         &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attributeGroup ref="xs:occurs"/&gt;
        &lt;xs:attribute name="default" type="xs:string"/&gt;
        &lt;xs:attribute name="fixed" type="xs:string"/&gt;
        &lt;xs:attribute name="nillable" type="xs:boolean" use="optional"/&gt;
        &lt;xs:attribute name="abstract" type="xs:boolean" default="false"
                      use="optional"/&gt;
        &lt;xs:attribute name="final" type="xs:derivationSet"/&gt;
        &lt;xs:attribute name="block" type="xs:blockSet"/&gt;
        &lt;xs:attribute name="form" type="xs:formChoice"/&gt;
        &lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="topLevelElement"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:element"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="0"&gt;
            &lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
            &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:element name="alternative" type="xs:altType" 
                    minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;xs:group ref="xs:identityConstraint" minOccurs="0"
                    maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="ref" use="prohibited"/&gt;
        &lt;xs:attribute name="form" use="prohibited"/&gt;
        &lt;xs:attribute name="targetNamespace" use="prohibited"/&gt;
        &lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
        &lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="localElement"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:element"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="0"&gt;
            &lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
            &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:element name="alternative" type="xs:altType" 
                    minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;xs:group ref="xs:identityConstraint" minOccurs="0"
                    maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="substitutionGroup" use="prohibited"/&gt;
        &lt;xs:attribute name="final" use="prohibited"/&gt;
        &lt;xs:attribute name="abstract" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="element" type="xs:topLevelElement" id="element"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-element"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:complexType name="altType"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
        This type is used for 'alternative' elements.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:choice minOccurs="0"&gt;
          &lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
          &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
        &lt;/xs:choice&gt;
        &lt;xs:attribute name="test" type="xs:string" use="optional"/&gt;
        &lt;xs:attribute name="type" type="xs:QName" use="optional"/&gt;
        &lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="group" abstract="true"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   group type for explicit groups, named top-level groups and
   group references&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        
          &lt;xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/&gt;
          
        &lt;xs:attributeGroup ref="xs:defRef"/&gt;
        &lt;xs:attributeGroup ref="xs:occurs"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="realGroup"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:group"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="0" maxOccurs="1"&gt;
            &lt;xs:element ref="xs:all"/&gt;
            &lt;xs:element ref="xs:choice"/&gt;
            &lt;xs:element ref="xs:sequence"/&gt;
          &lt;/xs:choice&gt;
          
        &lt;/xs:sequence&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="namedGroup"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:realGroup"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:choice minOccurs="1" maxOccurs="1"&gt;
            &lt;xs:element name="all"&gt;
              &lt;xs:complexType&gt;
                &lt;xs:complexContent&gt;
                  &lt;xs:restriction base="xs:all"&gt;
                    &lt;xs:group ref="xs:allModel"/&gt;
                    &lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
                    &lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
                    &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
                  &lt;/xs:restriction&gt;
                &lt;/xs:complexContent&gt;
              &lt;/xs:complexType&gt;
            &lt;/xs:element&gt;
            &lt;xs:element name="choice" type="xs:simpleExplicitGroup"/&gt;
            &lt;xs:element name="sequence" type="xs:simpleExplicitGroup"/&gt;
          &lt;/xs:choice&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
        &lt;xs:attribute name="ref" use="prohibited"/&gt;
        &lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
        &lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="groupRef"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:realGroup"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="ref" type="xs:QName" use="required"/&gt;
        &lt;xs:attribute name="name" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="explicitGroup"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   group type for the three kinds of group&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:group"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" use="prohibited"/&gt;
        &lt;xs:attribute name="ref" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="simpleExplicitGroup"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:explicitGroup"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="minOccurs" use="prohibited"/&gt;
        &lt;xs:attribute name="maxOccurs" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:group name="allModel"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
      &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
        &lt;xs:annotation&gt;
          &lt;xs:documentation&gt;This choice with min/max is here to
                          avoid a pblm with the Elt:All/Choice/Seq
                          Particle derivation constraint&lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;
        &lt;xs:element name="element" type="xs:localElement"/&gt;
        &lt;xs:element ref="xs:any"/&gt;
        &lt;xs:element name="group"&gt;<a name="anchor11092" id="anchor11092" shape="rect"></a>
          &lt;xs:complexType&gt;
            &lt;xs:complexContent&gt;
              &lt;xs:restriction base="xs:groupRef"&gt;
                &lt;xs:sequence&gt;
                  &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
                &lt;/xs:sequence&gt;
                &lt;xs:attribute name="minOccurs" fixed="1" type="xs:nonNegativeInteger"/&gt;
                &lt;xs:attribute name="maxOccurs" fixed="1" type="xs:nonNegativeInteger"/&gt;
              &lt;/xs:restriction&gt;
            &lt;/xs:complexContent&gt;
          &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
      &lt;/xs:choice&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:group&gt;
  &lt;xs:complexType name="all"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   Only elements allowed inside&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:explicitGroup"&gt;
        &lt;xs:group ref="xs:allModel"/&gt;
        &lt;xs:attribute name="minOccurs" default="1" use="optional"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:nonNegativeInteger"&gt;
              &lt;xs:enumeration value="0"/&gt;
              &lt;xs:enumeration value="1"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="maxOccurs" default="1" use="optional"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:allNNI"&gt;
              &lt;xs:enumeration value="0"/&gt;
              &lt;xs:enumeration value="1"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="all" type="xs:all" id="all"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-all"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="choice" type="xs:explicitGroup" id="choice"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-choice"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="sequence" type="xs:explicitGroup" id="sequence"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-sequence"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="group" type="xs:namedGroup" id="group"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-group"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:attributeGroup name="anyAttrGroup"&gt;
    &lt;xs:attribute name="namespace" type="xs:namespaceList"
                  use="optional"/&gt;
    &lt;xs:attribute name="notNamespace" use="optional"&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:basicNamespaceList"&gt;
          &lt;xs:minLength value="1"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
    &lt;xs:attribute name="processContents" default="strict" use="optional"&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:NMTOKEN"&gt;
          &lt;xs:enumeration value="skip"/&gt;
          &lt;xs:enumeration value="lax"/&gt;
          &lt;xs:enumeration value="strict"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
  &lt;/xs:attributeGroup&gt;
  &lt;xs:complexType name="wildcard"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        
         &lt;xs:attributeGroup ref="xs:anyAttrGroup"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="any" id="any"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-any"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:wildcard"&gt;
          &lt;xs:attribute name="notQName" type="xs:qnameList"
                        use="optional"/&gt;
          &lt;xs:attributeGroup ref="xs:occurs"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
   simple type for the value of the 'namespace' attr of
   'any' and 'anyAttribute'&lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
   Value is
              ##any      - - any non-conflicting WFXML/attribute at all

              ##other    - - any non-conflicting WFXML/attribute from
                              namespace other than targetNS

              ##local    - - any unqualified non-conflicting WFXML/attribute 

              one or     - - any non-conflicting WFXML/attribute from
              more URI        the listed namespaces
              references
              (space separated)

    ##targetNamespace or ##local may appear in the above list, to
        refer to the targetNamespace of the enclosing
        schema or an absent targetNamespace respectively&lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:simpleType name="namespaceList"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    
    &lt;xs:union memberTypes="xs:specialNamespaceList xs:basicNamespaceList" /&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="basicNamespaceList"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:list&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:union memberTypes="xs:anyURI"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:token"&gt;
              &lt;xs:enumeration value="##targetNamespace"/&gt;
              &lt;xs:enumeration value="##local"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:union&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:list&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="specialNamespaceList"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:token"&gt;
      &lt;xs:enumeration value="##any"/&gt;
      &lt;xs:enumeration value="##other"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="qnameList"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
        A utility type, not for public use
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:list&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:union memberTypes="xs:QName"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:token"&gt;
              &lt;xs:enumeration value="##defined"/&gt;
              &lt;xs:enumeration value="##definedSibling"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:union&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:list&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="qnameListA"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
        A utility type, not for public use
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:list&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:union memberTypes="xs:QName"&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:token"&gt;
              &lt;xs:enumeration value="##defined"/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:union&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:list&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="xpathDefaultNamespace"&gt;
    &lt;xs:union memberTypes="xs:anyURI"&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:token"&gt;
          &lt;xs:enumeration value="##defaultNamespace"/&gt;
          &lt;xs:enumeration value="##targetNamespace"/&gt;
          &lt;xs:enumeration value="##local"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:element name="attribute" type="xs:topLevelAttribute" id="attribute"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-attribute"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:complexType name="attributeGroup" abstract="true"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        
          &lt;xs:group ref="xs:attrDecls"/&gt;
          
        &lt;xs:attributeGroup ref="xs:defRef"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="namedAttributeGroup"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:attributeGroup"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:attrDecls"/&gt;
          
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
        &lt;xs:attribute name="ref" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="attributeGroupRef"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:attributeGroup"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="ref" type="xs:QName" use="required"/&gt;
        &lt;xs:attribute name="name" use="prohibited"/&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="attributeGroup" type="xs:namedAttributeGroup"
              id="attributeGroup"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-attributeGroup"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="include" id="include"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-include"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="redefine" id="redefine"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-redefine"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:openAttrs"&gt;
          &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
            &lt;xs:element ref="xs:annotation"/&gt;
            &lt;xs:group ref="xs:redefinable"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/&gt;
          &lt;xs:attribute name="id" type="xs:ID"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;

  &lt;xs:element name="override" id="override"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-override"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:openAttrs"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
            &lt;xs:group ref="xs:schemaTop" minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/&gt;
          &lt;xs:attribute name="id" type="xs:ID"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="import" id="import"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-import"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:attribute name="namespace" type="xs:anyURI"/&gt;
          &lt;xs:attribute name="schemaLocation" type="xs:anyURI"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="selector" id="selector"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-selector"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:attribute name="xpath" use="required"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:annotation&gt;
                &lt;xs:documentation&gt;A subset of XPath expressions for use
in selectors&lt;/xs:documentation&gt;
                &lt;xs:documentation&gt;A utility type, not for public
use&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:restriction base="xs:token"/&gt;
                
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
          &lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="field" id="field"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-field"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:attribute name="xpath" use="required"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:annotation&gt;
                &lt;xs:documentation&gt;A subset of XPath expressions for use
in fields&lt;/xs:documentation&gt;
                &lt;xs:documentation&gt;A utility type, not for public
use&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:restriction base="xs:token"/&gt;
                
            &lt;/xs:simpleType&gt;
          &lt;/xs:attribute&gt;
          &lt;xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:complexType name="keybase"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:sequence minOccurs="0"&gt;
          &lt;xs:element ref="xs:selector"/&gt;
          &lt;xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" type="xs:NCName"/&gt;
        &lt;xs:attribute name="ref" type="xs:QName"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:group name="identityConstraint"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;The three kinds of identity constraints, all with
                     type of or derived from 'keybase'.
   &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:choice&gt;
      &lt;xs:element ref="xs:unique"/&gt;
      &lt;xs:element ref="xs:key"/&gt;
      &lt;xs:element ref="xs:keyref"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:element name="unique" type="xs:keybase" id="unique"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-unique"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="key" type="xs:keybase" id="key"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-key"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="keyref" id="keyref"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-keyref"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:keybase"&gt;
          &lt;xs:attribute name="refer" type="xs:QName"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="notation" id="notation"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-notation"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:attribute name="name" type="xs:NCName" use="required"/&gt;
          &lt;xs:attribute name="public" type="xs:public"/&gt;
          &lt;xs:attribute name="system" type="xs:anyURI"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:simpleType name="public"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   A utility type, not for public use&lt;/xs:documentation&gt;
      &lt;xs:documentation&gt;
   A public identifier, per ISO 8879&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:token"/&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:element name="appinfo" id="appinfo"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-appinfo"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType mixed="true"&gt;
      &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
        &lt;xs:any processContents="lax"/&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name="source" type="xs:anyURI"/&gt;
      &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="documentation" id="documentation"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-documentation"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType mixed="true"&gt;
      &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
        &lt;xs:any processContents="lax"/&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name="source" type="xs:anyURI"/&gt;
      &lt;xs:attribute ref="xml:lang"/&gt;
      &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="annotation" id="annotation"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:openAttrs"&gt;
          &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
            &lt;xs:element ref="xs:appinfo"/&gt;
            &lt;xs:element ref="xs:documentation"/&gt;
          &lt;/xs:choice&gt;
          &lt;xs:attribute name="id" type="xs:ID"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
   notations for use within  schema documents&lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:notation name="XMLSchemaStructures" public="structures"
               system="http://www.w3.org/2000/08/XMLSchema.xsd"/&gt;
  &lt;xs:notation name="XML" public="REC-xml-19980210"
               system="http://www.w3.org/TR/1998/REC-xml-19980210"/&gt;
  &lt;xs:complexType name="anyType" mixed="true"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   Not the real urType, but as close an approximation as we can
   get in the XML representation&lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:sequence&gt;
      &lt;xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/&gt;
    &lt;/xs:sequence&gt;
    &lt;xs:anyAttribute processContents="lax"/&gt;
  &lt;/xs:complexType&gt;

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      In keeping with the XML Schema WG's standard versioning policy, 
      this schema document will persist at the URI
      http://www.w3.org/2011/07/XMLSchema.xsd.

      At the date of issue it can also be found at the URI
      http://www.w3.org/2009/XMLSchema/XMLSchema.xsd.

      The schema document at that URI may however change in the future, 
      in order to remain compatible with the latest version of XSD 
      and its namespace.  In other words, if XSD or the XML Schema 
      namespace change, the version of this document at 
      http://www.w3.org/2009/XMLSchema/XMLSchema.xsd will change accordingly; 
      the version at http://www.w3.org/2011/07/XMLSchema.xsd will not change.

      Previous dated (and unchanging) versions of this schema document 
      include:

        http://www.w3.org/2009/04/XMLSchema.xsd
          (XSD 1.1 Candidate Recommendation)

        http://www.w3.org/2004/10/XMLSchema.xsd
          (XSD 1.0 Recommendation, Second Edition)

        http://www.w3.org/2001/05/XMLSchema.xsd
          (XSD 1.0 Recommendation, First Edition)


    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;


&lt;/xs:schema&gt;
</pre></div></div></div><div class="div1">
<h2><a name="outcomes" id="outcomes" shape="rect"></a>B Outcome Tabulations (normative)</h2><p>To facilitate consistent reporting of schema errors and <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>
failures, this section tabulates and provides unique names for all the
constraints listed in this document.  Wherever such constraints have numbered
parts, reports <span class="rfc2119">should</span> 
use the name given below plus the part number, separated
by a period ('.').  Thus for example <code>cos-ct-extends.1.2</code> 
<span class="rfc2119">should</span> be
used to report a violation of the clause <a href="#c-cte" shape="rect">1.2</a> of
<a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension) (&#167;3.4.6.2)</a>.</p>
<h3><span class="nav"> <a href="#PSVI_contributions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="validation_failures" id="validation_failures" shape="rect"></a>B.1 Validation Rules</h3><p></p><dl><dt>cvc-accept</dt><dd><a href="#cvc-accept" shape="rect">Element Sequence Accepted (Particle)</a></dd><dt>cvc-assertion</dt><dd><a href="#cvc-assertion" shape="rect">Assertion Satisfied</a></dd><dt>cvc-assertions-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-assertions-valid" shape="rect">Assertions Valid</a></dd><dt>cvc-assess-attr</dt><dd><a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute)</a></dd><dt>cvc-assess-elt</dt><dd><a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element)</a></dd><dt>cvc-attribute</dt><dd><a href="#cvc-attribute" shape="rect">Attribute Locally Valid</a></dd><dt>cvc-au</dt><dd><a href="#cvc-au" shape="rect">Attribute Locally Valid (Use)</a></dd><dt>cvc-complex-content</dt><dd><a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content)</a></dd><dt>cvc-complex-type</dt><dd><a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type)</a></dd><dt>cvc-datatype-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-datatype-valid" shape="rect">Datatype Valid</a></dd><dt>cvc-elt</dt><dd><a href="#cvc-elt" shape="rect">Element Locally Valid (Element)</a></dd><dt>cvc-enumeration-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-enumeration-valid" shape="rect">enumeration valid</a></dd><dt>cvc-explicitTimezone-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-explicitTimezone-valid" shape="rect">explicitOffset Valid</a></dd><dt>cvc-facet-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-facet-valid" shape="rect">Facet Valid</a></dd><dt>cvc-fractionDigits-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-fractionDigits-valid" shape="rect">fractionDigits Valid</a></dd><dt>cvc-id</dt><dd><a href="#cvc-id" shape="rect">Validation Root Valid (ID/IDREF)</a></dd><dt>cvc-identity-constraint</dt><dd><a href="#cvc-identity-constraint" shape="rect">Identity-constraint Satisfied</a></dd><dt>cvc-length-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-length-valid" shape="rect">Length Valid</a></dd><dt>cvc-maxExclusive-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-maxExclusive-valid" shape="rect">maxExclusive Valid</a></dd><dt>cvc-maxInclusive-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-maxInclusive-valid" shape="rect">maxInclusive Valid</a></dd><dt>cvc-maxLength-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-maxLength-valid" shape="rect">maxLength Valid</a></dd><dt>cvc-minExclusive-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-minExclusive-valid" shape="rect">minExclusive Valid</a></dd><dt>cvc-minInclusive-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-minInclusive-valid" shape="rect">minInclusive Valid</a></dd><dt>cvc-minLength-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-minLength-valid" shape="rect">minLength Valid</a></dd><dt>cvc-model-group</dt><dd><a href="#cvc-model-group" shape="rect">Element Sequence Valid</a></dd><dt>cvc-particle</dt><dd><a href="#cvc-particle" shape="rect">Element Sequence Locally Valid (Particle)</a></dd><dt>cvc-pattern-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-pattern-valid" shape="rect">pattern valid</a></dd><dt>cvc-resolve-instance</dt><dd><a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance)</a></dd><dt>cvc-simple-type</dt><dd><a href="#cvc-simple-type" shape="rect">String Valid</a></dd><dt>cvc-totalDigits-valid</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-totalDigits-valid" shape="rect">totalDigits Valid</a></dd><dt>cvc-type</dt><dd><a href="#cvc-type" shape="rect">Element Locally Valid (Type)</a></dd><dt>cvc-wildcard</dt><dd><a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard)</a></dd><dt>cvc-wildcard-name</dt><dd><a href="#cvc-wildcard-name" shape="rect">Wildcard allows Expanded Name</a></dd><dt>cvc-wildcard-namespace</dt><dd><a href="#cvc-wildcard-namespace" shape="rect">Wildcard allows Namespace Name</a></dd><dt>cvc-xpath</dt><dd><a href="#cvc-xpath" shape="rect">XPath Evaluation</a></dd></dl>
<h3><span class="nav"><a href="#validation_failures" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#outcome-src" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="PSVI_contributions" id="PSVI_contributions" shape="rect"></a>B.2 Contributions to the post-schema-validation infoset</h3><dl><dt>ID/IDREF binding information item properties</dt><dd><a href="#iib-binding" shape="rect">[binding]</a>
       (<a href="#sic-id" shape="rect">ID/IDREF Table</a>)
       <br clear="none" /><a href="#iib-id" shape="rect">[id]</a>
       (<a href="#sic-id" shape="rect">ID/IDREF Table</a>)
       <br clear="none" /></dd><dt>Identity-constraint Binding information item properties</dt><dd><a href="#cb-definition" shape="rect">[definition]</a>
       (<a href="#sic-key" shape="rect">Identity-constraint Table</a>)
       <br clear="none" /><a href="#cb-node_table" shape="rect">[node table]</a>
       (<a href="#sic-key" shape="rect">Identity-constraint Table</a>)
       <br clear="none" /></dd><dt>attribute information item properties</dt><dd><a href="#a-attribution" shape="rect">[attribute attribution]</a>
       (<a href="#sic-match-info" shape="rect">Match Information</a>)
       <br clear="none" /><a href="#a-declaration" shape="rect">[attribute declaration]</a>
       (<a href="#sic-attr-decl" shape="rect">Attribute Declaration</a>)
       <br clear="none" /><a href="#a-match_info" shape="rect">[match information]</a>
       (<a href="#sic-match-info" shape="rect">Match Information</a>)
       <br clear="none" /><a href="#a-member_type_definition" shape="rect">[member type definition]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-member_type_definition_anonymous" shape="rect">[member type definition anonymous]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-member_type_definition_name" shape="rect">[member type definition name]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-member_type_definition_namespace" shape="rect">[member type definition namespace]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-member_type_definitions" shape="rect">[member type definitions]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-schema_actual_value" shape="rect">[schema actual value]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-schema_default" shape="rect">[schema default]</a>
       (<a href="#sic-attr-decl" shape="rect">Attribute Declaration</a>)
       <br clear="none" /><a href="#a-schema_error_code" shape="rect">[schema error code]</a>
       (<a href="#sic-attr-error-code" shape="rect">Validation Failure (Attribute)</a>)
       <br clear="none" /><a href="#a-schema_normalized_value" shape="rect">[schema normalized value]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-schema_specified" shape="rect">[schema specified]</a>
       (<a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute)</a>)
       <br clear="none" /><a href="#a-type_definition" shape="rect">[type definition]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-type_definition_anonymous" shape="rect">[type definition anonymous]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-type_definition_name" shape="rect">[type definition name]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-type_definition_namespace" shape="rect">[type definition namespace]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-type_definition_type" shape="rect">[type definition type]</a>
       (<a href="#sic-attrType" shape="rect">Attribute Validated by Type</a>)
       <br clear="none" /><a href="#a-validation_attempted" shape="rect">[validation attempted]</a>
       (<a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute)</a>)
       <br clear="none" /><a href="#a-validation_context" shape="rect">[validation context]</a>
       (<a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute)</a>)
       <br clear="none" /><a href="#a-validity" shape="rect">[validity]</a>
       (<a href="#sic-a-outcome" shape="rect">Assessment Outcome (Attribute)</a>)
       <br clear="none" /></dd><dt>element information item properties</dt><dd><a href="#e-ii_table" shape="rect">[ID/IDREF table]</a>
       (<a href="#sic-id" shape="rect">ID/IDREF Table</a>)
       <br clear="none" /><a href="#e-declared_type" shape="rect">[declared type]</a>
       (<a href="#sic-elt-decl" shape="rect">Element Declaration</a>)
       <br clear="none" /><a href="#e-descendent_validity" shape="rect">[descendent validity]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-attribution" shape="rect">[element attribution]</a>
       (<a href="#sic-match-info" shape="rect">Match Information</a>)
       <br clear="none" /><a href="#e-declaration" shape="rect">[element declaration]</a>
       (<a href="#sic-elt-decl" shape="rect">Element Declaration</a>)
       <br clear="none" /><a href="#e-expected-ed" shape="rect">[expected element declaration]</a>
       (<a href="#sic-elt-decl" shape="rect">Element Declaration</a>)
       <br clear="none" /><a href="#e-assertions" shape="rect">[failed assertions]</a>
       (<a href="#sic-elt-error-code" shape="rect">Validation Failure (Element)</a>)
       <br clear="none" /><a href="#e-idcs" shape="rect">[failed identity constraints]</a>
       (<a href="#sic-elt-error-code" shape="rect">Validation Failure (Element)</a>)
       <br clear="none" /><a href="#e-id_constraint_table" shape="rect">[identity-constraint table]</a>
       (<a href="#sic-key" shape="rect">Identity-constraint Table</a>)
       <br clear="none" /><a href="#e-inherited_attributes" shape="rect">[inherited attributes]</a>
       (<a href="#sic-inheritedAttrs" shape="rect">Inherited Attributes</a>)
       <br clear="none" /><a href="#e-local_elem_validity" shape="rect">[local element validity]</a>
       (<a href="#sic-elt-decl" shape="rect">Element Declaration</a>)
       <br clear="none" /><a href="#e-local_type_validity" shape="rect">[local type validity]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-match_info" shape="rect">[match information]</a>
       (<a href="#sic-match-info" shape="rect">Match Information</a>)
       <br clear="none" /><a href="#e-member_type_definition" shape="rect">[member type definition]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-member_type_definition_anonymous" shape="rect">[member type definition anonymous]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-member_type_definition_name" shape="rect">[member type definition name]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-member_type_definition_namespace" shape="rect">[member type definition namespace]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-member_type_definitions" shape="rect">[member type definitions]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-nil" shape="rect">[nil]</a>
       (<a href="#sic-elt-decl" shape="rect">Element Declaration</a>)
       <br clear="none" /><a href="#e-notation" shape="rect">[notation]</a>
       (<a href="#sic-notation-used" shape="rect">Validated with Notation</a>)
       <br clear="none" /><a href="#e-notation_public" shape="rect">[notation public]</a>
       (<a href="#sic-notation-used" shape="rect">Validated with Notation</a>)
       <br clear="none" /><a href="#e-notation_system" shape="rect">[notation system]</a>
       (<a href="#sic-notation-used" shape="rect">Validated with Notation</a>)
       <br clear="none" /><a href="#e-schema_actual_value" shape="rect">[schema actual value]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-schema_default" shape="rect">[schema default]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-schema_error_code" shape="rect">[schema error code]</a>
       (<a href="#sic-elt-error-code" shape="rect">Validation Failure (Element)</a>)
       <br clear="none" /><a href="#e-schema_normalized_value" shape="rect">[schema normalized value]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-schema_specified" shape="rect">[schema specified]</a>
       (<a href="#sic-eltDefault" shape="rect">Element Default Value</a>)
       <br clear="none" /><a href="#e-subsequence_valid" shape="rect">[subsequence-valid]</a>
       (<a href="#sic-elt-error-code" shape="rect">Validation Failure (Element)</a>)
       <br clear="none" /><a href="#e-type_alternative" shape="rect">[type alternative]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-type_definition" shape="rect">[type definition]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-type_definition_type" shape="rect">[type definition   type]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-type_definition_anonymous" shape="rect">[type definition anonymous]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-type_definition_name" shape="rect">[type definition name]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-type_definition_namespace" shape="rect">[type definition namespace]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-type_fallback" shape="rect">[type fallback]</a>
       (<a href="#sic-eltType" shape="rect">Element Validated by Type</a>)
       <br clear="none" /><a href="#e-validation_attempted" shape="rect">[validation attempted]</a>
       (<a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element)</a>)
       <br clear="none" /><a href="#e-validation_context" shape="rect">[validation context]</a>
       (<a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element)</a>)
       <br clear="none" /><a href="#e-validity" shape="rect">[validity]</a>
       (<a href="#sic-e-outcome" shape="rect">Assessment Outcome (Element)</a>)
       <br clear="none" /></dd><dt>element or attribute information item properties</dt><dd><a href="#e-schema_information" shape="rect">[schema information]</a>
       (<a href="#sic-schema" shape="rect">Schema Information</a>)
       <br clear="none" /></dd><dt>namespace schema information information item properties</dt><dd><a href="#nsi-schema_components" shape="rect">[schema components]</a>
       (<a href="#sic-schema" shape="rect">Schema Information</a>)
       <br clear="none" /><a href="#nsi-schema_documents" shape="rect">[schema documents]</a>
       (<a href="#sic-schema" shape="rect">Schema Information</a>)
       <br clear="none" /><a href="#nsi-schema_namespace" shape="rect">[schema namespace]</a>
       (<a href="#sic-schema" shape="rect">Schema Information</a>)
       <br clear="none" /></dd><dt>schema document information item properties</dt><dd><a href="#sd-document" shape="rect">[document]</a>
       (<a href="#sic-schema" shape="rect">Schema Information</a>)
       <br clear="none" /><a href="#sd-document_location" shape="rect">[document location]</a>
       (<a href="#sic-schema" shape="rect">Schema Information</a>)
       <br clear="none" /></dd></dl>
<h3><span class="nav"><a href="#PSVI_contributions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#outcome-cos" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="outcome-src" id="outcome-src" shape="rect"></a>B.3 Schema Representation Constraints</h3><p></p><dl><dt>src-attribute</dt><dd><a href="#src-attribute" shape="rect">Attribute Declaration Representation OK</a></dd><dt>src-attribute_group</dt><dd><a href="#src-attribute_group" shape="rect">Attribute Group Definition Representation OK</a></dd><dt>src-cip</dt><dd><a href="#src-cip" shape="rect">Conditional Inclusion Constraints</a></dd><dt>src-ct</dt><dd><a href="#src-ct" shape="rect">Complex Type Definition Representation OK</a></dd><dt>src-element</dt><dd><a href="#src-element" shape="rect">Element Declaration Representation OK</a></dd><dt>src-enumeration-value</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#src-enumeration-value" shape="rect">Enumeration value</a></dd><dt>src-expredef</dt><dd><a href="#src-expredef" shape="rect">Individual Component Redefinition</a></dd><dt>src-identity-constraint</dt><dd><a href="#src-identity-constraint" shape="rect">Identity-constraint Definition Representation OK</a></dd><dt>src-import</dt><dd><a href="#src-import" shape="rect">Import Constraints and Semantics</a></dd><dt>src-include</dt><dd><a href="#src-include" shape="rect">Inclusion Constraints and Semantics</a></dd><dt>src-list-itemType-or-simpleType</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#src-list-itemType-or-simpleType" shape="rect">itemType attribute or simpleType child</a></dd><dt>src-override</dt><dd><a href="#src-override" shape="rect">Override Constraints and Semantics</a></dd><dt>src-pattern-value</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#src-pattern-value" shape="rect">Pattern value</a></dd><dt>src-redefine</dt><dd><a href="#src-redefine" shape="rect">Redefinition Constraints and Semantics</a></dd><dt>src-resolve</dt><dd><a href="#src-resolve" shape="rect">QName resolution (Schema Document)</a></dd><dt>src-restriction-base-or-simpleType</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#src-restriction-base-or-simpleType" shape="rect">base attribute or simpleType child</a></dd><dt>src-simple-type</dt><dd><a href="#src-simple-type" shape="rect">Simple Type Definition Representation OK</a></dd><dt>src-ta</dt><dd><a href="#src-ta" shape="rect">Type
	Alternative Representation OK</a></dd><dt>src-union-memberTypes-or-simpleTypes</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#src-union-memberTypes-or-simpleTypes" shape="rect">memberTypes attribute or simpleType children</a></dd><dt>src-wildcard</dt><dd><a href="#src-wildcard" shape="rect">Wildcard Representation OK</a></dd></dl>
<h3><span class="nav"><a href="#outcome-src" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="outcome-cos" id="outcome-cos" shape="rect"></a>B.4 Schema Component Constraints</h3><dl><dt>a-props-correct</dt><dd><a href="#a-props-correct" shape="rect">Attribute Declaration Properties Correct</a></dd><dt>ag-props-correct</dt><dd><a href="#ag-props-correct" shape="rect">Attribute Group Definition Properties Correct</a></dd><dt>an-props-correct</dt><dd><a href="#an-props-correct" shape="rect">Annotation Correct</a></dd><dt>as-props-correct</dt><dd><a href="#as-props-correct" shape="rect">Assertion Properties Correct</a></dd><dt>au-props-correct</dt><dd><a href="#au-props-correct" shape="rect">Attribute Use Correct</a></dd><dt>c-fields-xpaths</dt><dd><a href="#c-fields-xpaths" shape="rect">Fields Value OK</a></dd><dt>c-props-correct</dt><dd><a href="#c-props-correct" shape="rect">Identity-constraint Definition Properties Correct</a></dd><dt>c-selector-xpath</dt><dd><a href="#c-selector-xpath" shape="rect">Selector Value OK</a></dd><dt>cos-all-limited</dt><dd><a href="#cos-all-limited" shape="rect">All Group Limited</a></dd><dt>cos-applicable-facets</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-applicable-facets" shape="rect">Applicable Facets</a></dd><dt>cos-assertions-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-assertions-restriction" shape="rect">Valid restriction of assertions</a></dd><dt>cos-aw-intersect</dt><dd><a href="#cos-aw-intersect" shape="rect">Attribute Wildcard Intersection</a></dd><dt>cos-aw-union</dt><dd><a href="#cos-aw-union" shape="rect">Attribute Wildcard Union</a></dd><dt>cos-choice-range</dt><dd><a href="#cos-choice-range" shape="rect">Effective Total Range (choice)</a></dd><dt>cos-content-act-restrict</dt><dd><a href="#cos-content-act-restrict" shape="rect">Content type restricts (Complex Content)</a></dd><dt>cos-ct-derived-ok</dt><dd><a href="#cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex)</a></dd><dt>cos-ct-extends</dt><dd><a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension)</a></dd><dt>cos-element-consistent</dt><dd><a href="#cos-element-consistent" shape="rect">Element Declarations Consistent</a></dd><dt>cos-equiv-derived-ok-rec</dt><dd><a href="#cos-equiv-derived-ok-rec" shape="rect">Substitution Group OK (Transitive)</a></dd><dt>cos-group-emptiable</dt><dd><a href="#cos-group-emptiable" shape="rect">Particle Emptiable</a></dd><dt>cos-nonambig</dt><dd><a href="#cos-nonambig" shape="rect">Unique Particle Attribution</a></dd><dt>cos-ns-subset</dt><dd><a href="#cos-ns-subset" shape="rect">Wildcard Subset</a></dd><dt>cos-particle-extend</dt><dd><a href="#cos-particle-extend" shape="rect">Particle Valid (Extension)</a></dd><dt>cos-pattern-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cos-pattern-restriction" shape="rect">Valid restriction of pattern</a></dd><dt>cos-seq-range</dt><dd><a href="#cos-seq-range" shape="rect">Effective Total Range (all and sequence)</a></dd><dt>cos-st-derived-ok</dt><dd><a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple)</a></dd><dt>cos-st-restricts</dt><dd><a href="#cos-st-restricts" shape="rect">Derivation Valid (Restriction, Simple)</a></dd><dt>cos-valid-default</dt><dd><a href="#cos-valid-default" shape="rect">Element Default Valid (Immediate)</a></dd><dt>cos-valid-simple-default</dt><dd><a href="#cos-valid-simple-default" shape="rect">Simple Default Valid</a></dd><dt>ct-props-correct</dt><dd><a href="#ct-props-correct" shape="rect">Complex Type Definition Properties Correct</a></dd><dt>derivation-ok-restriction</dt><dd><a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex)</a></dd><dt>e-props-correct</dt><dd><a href="#e-props-correct" shape="rect">Element Declaration Properties Correct</a></dd><dt>enumeration-required-notation</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#enumeration-required-notation" shape="rect">enumeration facet value required for NOTATION</a></dd><dt>enumeration-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#enumeration-valid-restriction" shape="rect">enumeration valid restriction</a></dd><dt>fractionDigits-totalDigits</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#fractionDigits-totalDigits" shape="rect">fractionDigits less than or equal to totalDigits</a></dd><dt>fractionDigits-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#fractionDigits-valid-restriction" shape="rect">fractionDigits valid restriction</a></dd><dt>length-minLength-maxLength</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#length-minLength-maxLength" shape="rect">length and minLength or maxLength</a></dd><dt>length-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#length-valid-restriction" shape="rect">length valid restriction</a></dd><dt>maxExclusive-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#maxExclusive-valid-restriction" shape="rect">maxExclusive valid restriction</a></dd><dt>maxInclusive-maxExclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#maxInclusive-maxExclusive" shape="rect">maxInclusive and maxExclusive</a></dd><dt>maxInclusive-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#maxInclusive-valid-restriction" shape="rect">maxInclusive valid restriction</a></dd><dt>maxLength-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#maxLength-valid-restriction" shape="rect">maxLength valid restriction</a></dd><dt>mg-props-correct</dt><dd><a href="#mg-props-correct" shape="rect">Model Group Correct</a></dd><dt>mgd-props-correct</dt><dd><a href="#mgd-props-correct" shape="rect">Model Group Definition Properties Correct</a></dd><dt>minExclusive-less-than-equal-to-maxExclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minExclusive-less-than-equal-to-maxExclusive" shape="rect">minExclusive &lt;= maxExclusive</a></dd><dt>minExclusive-less-than-maxInclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minExclusive-less-than-maxInclusive" shape="rect">minExclusive &lt; maxInclusive</a></dd><dt>minExclusive-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minExclusive-valid-restriction" shape="rect">minExclusive valid restriction</a></dd><dt>minInclusive-less-than-equal-to-maxInclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minInclusive-less-than-equal-to-maxInclusive" shape="rect">minInclusive &lt;= maxInclusive</a></dd><dt>minInclusive-less-than-maxExclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minInclusive-less-than-maxExclusive" shape="rect">minInclusive &lt; maxExclusive</a></dd><dt>minInclusive-minExclusive</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minInclusive-minExclusive" shape="rect">minInclusive and minExclusive</a></dd><dt>minInclusive-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minInclusive-valid-restriction" shape="rect">minInclusive valid restriction</a></dd><dt>minLength-less-than-equal-to-maxLength</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minLength-less-than-equal-to-maxLength" shape="rect">minLength &lt;= maxLength</a></dd><dt>minLength-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#minLength-valid-restriction" shape="rect">minLength valid restriction</a></dd><dt>n-props-correct</dt><dd><a href="#n-props-correct" shape="rect">Notation Declaration Correct</a></dd><dt>no-xmlns</dt><dd><a href="#no-xmlns" shape="rect">xmlns Not Allowed</a></dd><dt>no-xsi</dt><dd><a href="#no-xsi" shape="rect">xsi: Not Allowed</a></dd><dt>p-props-correct</dt><dd><a href="#p-props-correct" shape="rect">Particle Correct</a></dd><dt>sch-props-correct</dt><dd><a href="#sch-props-correct" shape="rect">Schema Properties Correct</a></dd><dt>st-props-correct</dt><dd><a href="#st-props-correct" shape="rect">Simple Type Definition Properties Correct</a></dd><dt>st-restrict-facets</dt><dd><a href="#st-restrict-facets" shape="rect">Simple Type Restriction (Facets)</a></dd><dt>ta-props-correct</dt><dd><a href="#ta-props-correct" shape="rect">Type Alternative Properties Correct</a></dd><dt>timezone-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#timezone-valid-restriction" shape="rect">timezone valid restriction</a></dd><dt>totalDigits-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#totalDigits-valid-restriction" shape="rect">totalDigits valid restriction</a></dd><dt>w-props-correct</dt><dd><a href="#w-props-correct" shape="rect">Wildcard Properties Correct</a></dd><dt>whiteSpace-valid-restriction</dt><dd><a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#whiteSpace-valid-restriction" shape="rect">whiteSpace valid restriction</a></dd><dt>xpath-valid</dt><dd><a href="#xpath-valid" shape="rect">XPath Valid</a></dd></dl></div><div class="div1">
<h2><a name="var_terminology" id="var_terminology" shape="rect"></a>C Terminology for implementation-defined features (normative)</h2><p>This section defines some terms for use in describing
choices made by implementations in areas where the 
effect of XSD 
features is explicitly <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</p><p>Future versions of this specification are expected to use
the terminology defined here to specify conformance profiles.
Conformance profiles may also be defined by other specifications
without requiring any revision to this specification.</p><div class="div2">
<h3><span class="nav"> <a href="#var_schema_con" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="var_psvi" id="var_psvi" shape="rect"></a>C.1 Subset of the Post-schema-validation Infoset</h3><p>This specification defines a number of ways in which the
information set taken as input is augmented in the course
of schema-validity assessment.  Conforming processors <span class="rfc2119">may</span>
provide access to some or all of this information; in the
interests of simplifying discussion and documentation, this
section defines names for several subsets of the PSVI, with
the intention of simplifying short-hand descriptions of
processors.  These terms <span class="rfc2119">may</span> be used to describe what parts of
the PSVI a particular schema processor provides access to, or
to specify requirements for processors, or for other purposes.
A processor provides access to a particular subset
of the PSVI if and only if it makes accessible some representation
of the information in question, for information items to which
it is applicable.  (The properties labeled "if applicable"
or "where applicable" below are simply the most obvious
cases of properties which do not apply to every information item;
the same qualification implicitly applies to all properties listed
below.)

</p><p>
If other subsets of the PSVI prove important in practice it is
expected that definitions of those subsets <span class="rfc2119">may</span> be provided by
other specifications or in later revisions of this one.
</p><p>
The definition in this section of a term denoting a particular
subset of the PSVI does not constitute a requirement that
conforming processors provide access to that subset.
</p><div class="glist"><div class="gitem"><div class="giLabel"><a name="key-root-validity" id="key-root-validity" shape="rect"></a>root-validity subset</div><div class="giDef"><div class="p"><span class="termdef"><a name="dt-root-validity_subset" id="dt-root-validity_subset" title="" shape="rect">[Definition:]&#160;&#160;</a>The 
<b>root-validity subset</b> of the PSVI consists of the 
following properties of the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>:



</span><ul><li><div class="p"><a href="#e-validity" class="propref" shape="rect">[validity]</a></div></li><li><div class="p"><a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a></div></li><li><div class="p"><a href="#e-schema_error_code" class="propref" shape="rect">[schema error code]</a>, if applicable</div></li></ul>
</div></div></div><div class="gitem"><div class="giLabel">instance-validity subset</div><div class="giDef"><div class="p"><span class="termdef"><a name="dt-instance-validity_subset" id="dt-instance-validity_subset" title="" shape="rect">[Definition:]&#160;&#160;</a>
The <b>instance-validity subset</b> of the PSVI consists of
the <a href="#dt-root-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>root-validity subset<span class="arrow">&#183;</span></a>, plus the following properties on elements,
wherever applicable:
</span>
      <ul><li><div class="p"><a href="#e-validity" class="propref" shape="rect">[validity]</a></div></li><li><div class="p"><a href="#e-validation_attempted" class="propref" shape="rect">[validation attempted]</a></div></li><li><div class="p"><a href="#e-notation_system" class="propref" shape="rect">[notation system]</a></div></li><li><div class="p"><a href="#e-notation_public" class="propref" shape="rect">[notation public]</a></div></li><li><div class="p"><a href="#e-schema_error_code" class="propref" shape="rect">[schema error code]</a></div></li></ul>
and the following properties on attributes, wherever applicable:
<ul><li><div class="p"><a href="#a-validity" class="propref" shape="rect">[validity]</a></div></li><li><div class="p"><a href="#a-validation_attempted" class="propref" shape="rect">[validation attempted]</a></div></li><li><div class="p"><a href="#a-schema_error_code" class="propref" shape="rect">[schema error code]</a></div></li></ul>
</div></div></div><div class="gitem"><div class="giLabel">type-aware subset</div><div class="giDef"><div class="p"><span class="termdef"><a name="dt-type-aware_subset" id="dt-type-aware_subset" title="" shape="rect">[Definition:]&#160;&#160;</a>The 
<b>type-aware subset</b> of the PSVI consists of the
<a href="#dt-instance-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-validity subset<span class="arrow">&#183;</span></a>, plus the following 
items and properties.</span>
It is intended that the type-aware subset of the PSVI include
all the information needed by schema-aware XQuery 1.0 or
XSLT 2.0 processors.
In each case, the information is to be provided in some
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> representation.  For elements:
<ul><li><div class="p"><a href="#e-attribution" class="propref" shape="rect">[element attribution]</a></div></li><li><div class="p"><a href="#e-declaration" class="propref" shape="rect">[element declaration]</a></div></li><li><div class="p"><a href="#e-nil" class="propref" shape="rect">[nil]</a></div></li><li><div class="p"><a href="#e-type_definition" class="propref" shape="rect">[type definition]</a></div></li><li><div class="p"><a href="#e-member_type_definition" class="propref" shape="rect">[member type definition]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> (where applicable)</div></li></ul>
and for attributes:<ul><li><div class="p"><a href="#a-attribution" class="propref" shape="rect">[attribute attribution]</a></div></li><li><div class="p"><a href="#a-declaration" class="propref" shape="rect">[attribute declaration]</a></div></li><li><div class="p"><a href="#a-type_definition" class="propref" shape="rect">[type definition]</a></div></li><li><div class="p"><a href="#a-member_type_definition" class="propref" shape="rect">[member type definition]</a> (where applicable)</div></li><li><div class="p"><a href="#a-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> (where applicable)</div></li><li><div class="p"><a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> (where applicable)</div></li></ul></div><div class="note"><div class="p"><b>Note:</b> In a future draft of this specification, it is expected that
a list of specific component properties to which access 
<span class="rfc2119">should</span> or <span class="rfc2119">must</span> be provided will be included.  No such
list is present in the current draft; input from readers,
users, schema authors, and implementors as to what properties
are most usefully exposed in this subset would be very welcome.</div></div></div></div><div class="gitem"><div class="giLabel">lightweight type-aware subset</div><div class="giDef"><div class="p"><span class="termdef"><a name="dt-lightweight_type-aware_subset" id="dt-lightweight_type-aware_subset" title="" shape="rect">[Definition:]&#160;&#160;</a>The 
<b>lightweight type-aware subset</b> of the PSVI provides
the same information as the 
<a href="#dt-type-aware_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>type-aware subset<span class="arrow">&#183;</span></a>, except that instead of providing
direct access to schema components, it provides only their names and
related information.</span>
For elements:
<ul><li><div class="p"><a href="#e-match_info" class="propref" shape="rect">[match information]</a></div></li><li><div class="p"><a href="#e-type_definition_name" class="propref" shape="rect">[type definition name]</a></div></li><li><div class="p"><a href="#e-type_definition_namespace" class="propref" shape="rect">[type definition namespace]</a></div></li><li><div class="p"><a href="#e-type_definition_type" class="propref" shape="rect">[type definition   type]</a></div></li><li><div class="p"><a href="#e-type_definition_anonymous" class="propref" shape="rect">[type definition anonymous]</a></div></li><li><div class="p"><a href="#e-member_type_definition_name" class="propref" shape="rect">[member type definition name]</a> (where applicable)</div></li><li><div class="p"><a href="#e-member_type_definition_namespace" class="propref" shape="rect">[member type definition namespace]</a> (where applicable)</div></li><li><div class="p"><a href="#e-member_type_definition_anonymous" class="propref" shape="rect">[member type definition anonymous]</a> (where applicable)</div></li></ul>
and for attributes:<ul><li><div class="p"><a href="#a-match_info" class="propref" shape="rect">[match information]</a></div></li><li><div class="p"><a href="#a-type_definition_name" class="propref" shape="rect">[type definition name]</a></div></li><li><div class="p"><a href="#a-type_definition_namespace" class="propref" shape="rect">[type definition namespace]</a></div></li><li><div class="p"><a href="#a-type_definition_type" class="propref" shape="rect">[type definition type]</a></div></li><li><div class="p"><a href="#a-type_definition_anonymous" class="propref" shape="rect">[type definition anonymous]</a></div></li><li><div class="p"><a href="#a-member_type_definition_name" class="propref" shape="rect">[member type definition name]</a> (where applicable)</div></li><li><div class="p"><a href="#a-member_type_definition_namespace" class="propref" shape="rect">[member type definition namespace]</a> (where applicable)</div></li><li><div class="p"><a href="#a-member_type_definition_anonymous" class="propref" shape="rect">[member type definition anonymous]</a> (where applicable)</div></li></ul></div></div></div><div class="gitem"><div class="giLabel">full instance subset</div><div class="giDef"><div class="p">
<span class="termdef"><a name="dt-full_instance_subset" id="dt-full_instance_subset" title="" shape="rect">[Definition:]&#160;&#160;</a>The 
<b>full instance subset</b> of the PSVI includes almost all
properties defined by this specification as applying to
element and attribute information items, but excludes 
schema components. It
consists of
the <a href="#dt-instance-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-validity subset<span class="arrow">&#183;</span></a>, 
plus the following properties for elements:</span>
<ul><li><div class="p"><a href="#e-descendent_validity" class="propref" shape="rect">[descendent validity]</a></div></li><li><div class="p"><a href="#e-local_elem_validity" class="propref" shape="rect">[local element validity]</a></div></li><li><div class="p"><a href="#e-local_type_validity" class="propref" shape="rect">[local type validity]</a></div></li><li><div class="p"><a href="#e-subsequence_valid" class="propref" shape="rect">[subsequence-valid]</a></div></li><li><div class="p"><a href="#e-match_info" class="propref" shape="rect">[match information]</a></div></li><li><div class="p"><a href="#e-type_definition_name" class="propref" shape="rect">[type definition name]</a></div></li><li><div class="p"><a href="#e-type_definition_namespace" class="propref" shape="rect">[type definition namespace]</a></div></li><li><div class="p"><a href="#e-type_definition_type" class="propref" shape="rect">[type definition   type]</a></div></li><li><div class="p"><a href="#e-type_definition_anonymous" class="propref" shape="rect">[type definition anonymous]</a></div></li><li><div class="p"><a href="#e-type_fallback" class="propref" shape="rect">[type fallback]</a></div></li><li><div class="p"><a href="#e-type_alternative" class="propref" shape="rect">[type alternative]</a></div></li><li><div class="p"><a href="#e-member_type_definition_name" class="propref" shape="rect">[member type definition name]</a> (where applicable)</div></li><li><div class="p"><a href="#e-member_type_definition_namespace" class="propref" shape="rect">[member type definition namespace]</a> (where applicable)</div></li><li><div class="p"><a href="#e-member_type_definition_anonymous" class="propref" shape="rect">[member type definition anonymous]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_default" class="propref" shape="rect">[schema default]</a> (where applicable)</div></li><li><div class="p"><a href="#e-schema_information" class="propref" shape="rect">[schema information]</a> some <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>
representation (including at least the
names of resources from which components were drawn)</div></li></ul>
and the following for attributes:
<ul><li><div class="p"><a href="#a-match_info" class="propref" shape="rect">[match information]</a></div></li><li><div class="p"><a href="#a-type_definition_name" class="propref" shape="rect">[type definition name]</a></div></li><li><div class="p"><a href="#a-type_definition_namespace" class="propref" shape="rect">[type definition namespace]</a></div></li><li><div class="p"><a href="#a-type_definition_type" class="propref" shape="rect">[type definition type]</a></div></li><li><div class="p"><a href="#a-type_definition_anonymous" class="propref" shape="rect">[type definition anonymous]</a></div></li><li><div class="p"><a href="#a-member_type_definition_name" class="propref" shape="rect">[member type definition name]</a> (where applicable)</div></li><li><div class="p"><a href="#a-member_type_definition_namespace" class="propref" shape="rect">[member type definition namespace]</a> (where applicable)</div></li><li><div class="p"><a href="#a-member_type_definition_anonymous" class="propref" shape="rect">[member type definition anonymous]</a> (where applicable)</div></li><li><div class="p"><a href="#a-schema_normalized_value" class="propref" shape="rect">[schema normalized value]</a></div></li><li><div class="p"><a href="#a-schema_actual_value" class="propref" shape="rect">[schema actual value]</a> (where applicable)</div></li><li><div class="p"><a href="#a-schema_default" class="propref" shape="rect">[schema default]</a> (where applicable)</div></li><li><div class="p"><a href="#a-schema_specified" class="propref" shape="rect">[schema specified]</a> (where applicable)</div></li></ul>
</div></div></div><div class="gitem"><div class="giLabel">full PSVI with components</div><div class="giDef"><div class="p">
The <b>full PSVI with components</b> consists of
every property and information item defined in this
specification.
</div><div class="p">
In exposing element declarations, attribute declarations,
type definitions, and other components, processors
providing access to the full subset must provide some
representation for all of the defined properties of the
components.  Note that although the properties are often
redundant with other information, it is not required that
the full subset include more than one representation of
redundant information.  
</div><div class="note"><div class="p"><b>Note:</b> 
The PSVI is a description of an information set,
not a specification of a data structure or an application-programming
interface.  For convenience, this specification defines
in some cases more than one term for denoting a particular
piece of information:  for example, 
the <span class="anonRef">[type definition name]</span> 
property of an element and the 
<span class="anonRef">[name]</span>
property of the <span class="anonRef">[type definition]</span> 
property of that element are the same piece of information.
If the <span class="anonRef">[type definition]</span> is 
supplied, then the <span class="anonRef">[type
definition name]</span> is necessarily also available.
</div><div class="p">Similar observations can be made for other properties present in
the full-instance subset but not mentioned here.  Processors
<span class="rfc2119">should</span> allow access to the information without requiring
users or applications to distinguish between the different
names or access paths under which it might be described in this
specification.  
</div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#var_psvi" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#sec-other-idf" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="var_schema_con" id="var_schema_con" shape="rect"></a>C.2 
Terminology of schema construction
</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;C.2.1 <a href="#vsc_locations" shape="rect">Identifying locations where components are sought</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;C.2.2 <a href="#vsc_indirection" shape="rect">Identifying methods of indirection</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;C.2.3 <a href="#vsc_key" shape="rect">Identifying the key for use in indirection</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;C.2.4 <a href="#vsc_stopping" shape="rect">Identifying when to stop searching</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;C.2.5 <a href="#vsc_failure" shape="rect">Identifying how to react to failure</a><br clear="none" />
</div><p>
Conforming processors <span class="rfc2119">may</span> implement any combination of the
following strategies for locating schema components, in any
order.  They <span class="rfc2119">may</span> also implement other strategies.
</p><p>
The terminology offered here is intended to be useful in
discussions of processor behavior, whether documenting
existing behavior or describing required behavior.  
</p><p>
General-purpose processors <span class="rfc2119">should</span> support multiple
methods for locating schema documents, 
and  
provide user
control over which methods are used and how to fall back in
case of failure.
</p><div class="div3">
<h4><a name="vsc_locations" id="vsc_locations" shape="rect"></a>C.2.1 Identifying locations where components are sought</h4><div class="block">
Some terms describe how a processor identifies locations from
which schema components can be sought:
<div class="glist"><div class="gitem"><div class="giLabel">hard-coded schemas</div><div class="giDef"><div class="p">
	  Full knowledge of one or more schemas is built into the
	  processor.  (Note: all processors are required to have some
	  built-in knowledge of of the built-in components. <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>General-purpose<span class="arrow">&#183;</span></a> processors
	  are additionally required to 
	  be able to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a>
	   documents against the
	   XSD schema for schema documents.)
</div></div></div><div class="gitem"><div class="giLabel"><a href="#key-automatic" class="termref" shape="rect"><span class="arrow">&#183;</span>automatically known<span class="arrow">&#183;</span></a> components</div><div class="giDef"><div class="p">
Full knowledge of one or more components is
built into the processor; these components
<span class="rfc2119">may</span> be made available automatically by being included
by that processor in every schema it constructs,
or they <span class="rfc2119">may</span> be included only under certain
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> conditions (e.g. an explicit
import of the relevant namespace, or choice of
a specified invocation option).
</div><div class="note"><div class="p"><b>Note:</b> 
All processors are
required to have some built-in knowledge of 
of the built-in components.
</div></div></div></div><div class="gitem"><div class="giLabel">hard-coded schema locations</div><div class="giDef"><div class="p">
A list of locations at which
schema documents will be sought is built into the processor.
Particular locations can be associated with specific
namespaces or can be used to seek any schema document.
</div></div></div><div class="gitem"><div class="giLabel">named pairs</div><div class="giDef"><div class="p">
At invocation time, the user passes a set or
sequence of (namespace-name, schema document) pairs to the
processor, e.g. as a command-line option.  (Can be used with
early or slow exit strategy.)  The namespace name is used
as a check on the document, not as an instruction; if the 
schema document has a target namespace which differs from 
the namespace name specified, the processor signals an error.
</div></div></div><div class="gitem"><div class="giLabel">schema documents</div><div class="giDef"><div class="p">
At invocation time, the user passes a set or sequence of schema
documents, or identifiers for schema documents (e.g. URIs), to the
processor, e.g. as a command-line option.  Each schema document
is associated with its target namespace, if any.
(Can be used with early or
slow exit strategy.)
</div></div></div><div class="gitem"><div class="giLabel">interactive inquiry</div><div class="giDef"><div class="p">
For each namespace, the processor asks
the user interactively (though mechanisms not specified
here) where to seek the required schema components.
<div class="note"><div class="p"><b>Note:</b> This will perhaps be most useful as a fallback after other methods
have failed.</div></div>
</div></div></div><div class="gitem"><div class="giLabel">namespace name</div><div class="giDef"><div class="p">
For each namespace, the processor attempts
to dereference the namespace name; if a schema document is
returned, it is processed. If some other kind of resource representation is
returned, processors <span class="rfc2119">may</span> interpret its content to locate a schema document. 
<div class="note"><div class="p"><b>Note:</b> For example, if a RDDL document is returned,
a processor <span class="rfc2119">may</span> search the RDDL document for <code>rddl:resource</code>
elements with the well-known property <code>xlink:role</code>
= "<code>http://www.w3.org/2001/XMLSchema</code>"
and then attempt to dereference the location(s) indicated on the
<code>xlink:href</code> attribute of the link.
</div></div>
</div></div></div><div class="gitem"><div class="giLabel">schemaLocation hints in XML instance document</div><div class="giDef"><div class="p">
For each namespace, if the input
document includes one or more schemaLocation hints for that
namespace, the processor attempts to dereference those
locations.
</div></div></div><div class="gitem"><div class="giLabel">schemaLocation hints in schema documents</div><div class="giDef"><div class="p">
For each namespace, if a schema document being processed
includes one or more schemaLocation hints for that
namespace (e.g. on an <code>import</code> element, 
the processor attempts to dereference those
locations.
</div></div></div><div class="gitem"><div class="giLabel">local repository</div><div class="giDef"><div class="p">
For each namespace, a local repository of
schema components is consulted.  In some situations the consultation 
will require a key, in which see the terminology for indirection
given below.
</div></div></div></div>
</div></div><div class="div3">
<h4><a name="vsc_indirection" id="vsc_indirection" shape="rect"></a>C.2.2 Identifying methods of indirection</h4><div class="block">
Some terms describe various methods of indirection through
local catalogs, search paths, or local repositories of schema
documents and/or schema components.  In each of these, a
&#8216;search key&#8217; is assumed which helps to control the
indirection.  Terms for different sorts of search key are
defined below.
<div class="glist"><div class="gitem"><div class="giLabel">path indirection</div><div class="giDef"><div class="p">
The processor has (hard-coded or accepted
as a parameter at invocation time or acquired from the
environment) a series of expressions into which a search key
is substituted.  After substitution, each element of the
series is interpreted as a file-system path and a schema
document is sought at the location indicated by that path.
</div></div></div><div class="gitem"><div class="giLabel">URI indirection</div><div class="giDef"><div class="p">
The processor has (hard-coded or accepted
as a parameter at invocation time or acquired from the
environment) a series of expressions into which a search key
is substituted.  After substitution, each element of the
series is interpreted as a URI and a schema document is
sought at the location indicated by that path.
</div></div></div><div class="gitem"><div class="giLabel">catalog indirection</div><div class="giDef"><div class="p">
The processor consults an OASIS catalog
(whose location can be hard-coded, passed as a parameter at
invocation time or acquired from the environment) using a
search key.  The key can be sought for as a namespace name,
as a public identifier, or as a system identifier.
</div></div></div><div class="gitem"><div class="giLabel">local repository indirection</div><div class="giDef"><div class="p">
A local repository of schema
components is consulted using a search key.
</div></div></div><div class="gitem"><div class="giLabel">recursion</div><div class="giDef"><div class="p">
The location(s) returned by a catalog or other
indirection mechanism are not consulted immediately but
instead used as a key in a renewed indirection.  Only after
the indirection mechanism fails to return a value is an
attempt made to dereference the last location returned.
</div></div></div><div class="gitem"><div class="giLabel">non-recursion</div><div class="giDef"><div class="p">
The location(s) returned by a catalog or
other indirection mechanism are consulted immediately; they
are not used in recursive indirections.
</div></div></div></div>
</div></div><div class="div3">
<h4><a name="vsc_key" id="vsc_key" shape="rect"></a>C.2.3 Identifying the key for use in indirection</h4><div class="block">
Locating schema components by means of any of the &#8216;indirect&#8217;
methods just identified will sometimes involve the specification of a
value of some kind as a search key.  Processors <span class="rfc2119">may</span> vary in
their choice of values to use as the key:
<div class="glist"><div class="gitem"><div class="giLabel">namespace key</div><div class="giDef"><div class="p">
The namespace name is used as a key.
</div></div></div><div class="gitem"><div class="giLabel">location key</div><div class="giDef"><div class="p">
A location (e.g. a schema location hint or the
location specified in a catalog or by the user) is used as a
key.
</div></div></div></div></div></div><div class="div3">
<h4><a name="vsc_stopping" id="vsc_stopping" shape="rect"></a>C.2.4 Identifying when to stop searching</h4><div class="block">
When more than one location is available for a given
namespace, two distinct behaviors can be distinguished; these
are orthogonal to other terms defined here:
<div class="glist"><div class="gitem"><div class="giLabel">early-exit</div><div class="giDef"><div class="p">
When more than one location is available for a
given namespace, the processor attempts each in turn.  When
a location is successfully dereferenced and a schema
document is obtained, the later locations on the list are
ignored.
</div></div></div><div class="gitem"><div class="giLabel">slow-exit</div><div class="giDef"><div class="p">
When more than one location is available for a
given namespace, the processor attempts each in turn.  All
locations are tried, even if a schema document for the
namespace has been obtained.
</div></div></div></div></div></div><div class="div3">
<h4><a name="vsc_failure" id="vsc_failure" shape="rect"></a>C.2.5 Identifying how to react to failure</h4><div class="block">
When a processor seeks schema components at a particular
location, but fails to find components of the namespace
in question at that location, several different
ways of responding to that failure can be distinguished:
<div class="glist"><div class="gitem"><div class="giLabel">error</div><div class="giDef"><div class="p">
The processor signals an error in some manner appropriate
to its construction and environment.  Some processors
and some users will find it useful to distinguish fatal errors (which
cause processing to halt) from recoverable errors.
</div></div></div><div class="gitem"><div class="giLabel">continue</div><div class="giDef"><div class="p">
The processor signals no fatal error and continues its search
for components in the namespace in question by attempting
another location.
</div></div></div></div></div></div></div><div class="div2">
<h3><span class="nav"><a href="#var_schema_con" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="sec-other-idf" id="sec-other-idf" shape="rect"></a>C.3 Other Implementation-defined Features</h3><p>This section defines terms intended to be useful in describing
     other implementation-defined choices.
    </p><div class="glist"><div class="gitem"><div class="giLabel"><a name="xml-1.0-based" id="xml-1.0-based" shape="rect"></a>XML-1.0-based datatypes</div><div class="giDef"><div class="p">The datatypes defined by <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, taking 
	the relevant definitions from
	<a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a> and <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>,
	for datatypes which depend on definitions from those specifications.
       </div></div></div><div class="gitem"><div class="giLabel"><a name="xml-1.1-based" id="xml-1.1-based" shape="rect"></a>XML-1.1-based datatypes</div><div class="giDef"><div class="p">The datatypes defined by <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>, taking 
	the relevant definitions from version 1.1 of 
	<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>,
	for datatypes which depend on definitions from those specifications.
       </div></div></div></div></div></div><div class="div1">
<h2><a name="infoset" id="infoset" shape="rect"></a>D Required Information Set Items and Properties (normative)</h2><p>This specification requires as a precondition for <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>
    an information set as defined in <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a>
    which contains 
     at least the following
     information items and properties:
    </p><div class="glist"><div class="gitem"><div class="giLabel">Attribute Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[local name]</a>, 
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a>,
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized value]</a>,
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[prefix]</a>, 
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[attribute type]</a>,
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[owner element]</a></div></div></div><div class="gitem"><div class="giLabel">Character Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.character" class="xpropref" shape="rect">[character code]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.character" class="xpropref" shape="rect">[parent]</a></div></div></div><div class="gitem"><div class="giLabel">Comment  Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[content]</a>, <a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[parent]</a></div></div></div><div class="gitem"><div class="giLabel">Element Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[local name]</a>, 
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace name]</a>,
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>, 
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>, 
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a>,
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a>,
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[prefix]</a>, 
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[base URI]</a>,
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[parent]</a></div></div></div><div class="gitem"><div class="giLabel">Namespace Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[prefix]</a>, <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace" class="xpropref" shape="rect">[namespace name]</a></div></div></div><div class="gitem"><div class="giLabel">Processing Instruction Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[target]</a>, <a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[content]</a>,
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[base URI]</a>, <a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi" class="xpropref" shape="rect">[parent]</a></div></div></div></div><p>In addition, infosets <span class="rfc2119">should</span> support the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.document" class="xpropref" shape="rect">[unparsed entities]</a>
   property of the Document Information Item.  Failure to do so will mean all
   items of type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ENTITY" shape="rect">ENTITY</a> or
   <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ENTITIES" shape="rect">ENTITIES</a> will fail to
   <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a>. If the
   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.document" class="xpropref" shape="rect">[unparsed entities]</a> property is supported,
   the following is also required:</p><div class="glist"><div class="gitem"><div class="giLabel">Unparsed Entity Information Item</div><div class="giDef"><div class="p"><a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed" class="xpropref" shape="rect">[name]</a>,
      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed" class="xpropref" shape="rect">[system identifier]</a>,
      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed" class="xpropref" shape="rect">[public identifier]</a></div></div></div></div><p>This specification does not require any destructive alterations to the input
information set: all the information set contributions specified herein are additive.</p><p>This appendix is intended to satisfy the requirements for <a href="http://www.w3.org/TR/2001/WD-xml-infoset-20010316/#conformance" shape="rect">Conformance</a> to the <a href="#ref-xmlinfo" shape="rect">[XML Infoset]</a> specification.</p></div><div class="div1">
<h2><a name="impl-def-dep-list" id="impl-def-dep-list" shape="rect"></a>E Checklists of implementation-defined and implementation-dependent features (normative)</h2><div class="div2">
<h3><span class="nav"> <a href="#impl-dep-list" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="impl-def-list" id="impl-def-list" shape="rect"></a>E.1 Checklist of implementation-defined features</h3><p><span class="termdef"><a name="key-impl-defined" id="key-impl-defined" title="" shape="rect">[Definition:]&#160;&#160;</a>An <b>implementation-defined</b> 
  feature or behavior <span class="rfc2119">may</span> vary among processors conforming to this 
  specification; the precise behavior is not specified by
  this specification but <span class="rfc2119">must</span> be specified by the
  implementor for each particular conforming implementation.</span>  
  (In the latter
  respect, <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> features differ
  from <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> features.)
 </p><p>
This appendix provides a summary of XSD
features whose effect is explicitly <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>. 
Any software which claims to conform to this specification
<span class="rfc2119">must</span> describe how these choices have been exercised, in
documentation which accompanies any conformance claim.
</p><p>In describing the choices made for a given processor, 
it is hoped that the terminology defined in <a href="#var_terminology" shape="rect">Terminology for implementation-defined features (normative) (&#167;C)</a>
will be found useful.</p><div class="constraintlist"><div class="clnumber">1 <span class="p">For the datatypes defined by
<a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> which depend on
<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> or <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>, it is
<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a schema processor 
takes the relevant definitions from
<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a> and <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>, or
from
<a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a> and <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>. 
Implementations <span class="rfc2119">may</span> support either
the <a href="#xml-1.0-based" class="termref" shape="rect"><span class="arrow">&#183;</span>XML-1.0-based<span class="arrow">&#183;</span></a>
datatypes, 
or the <a href="#xml-1.1-based" class="termref" shape="rect"><span class="arrow">&#183;</span>XML-1.1-based<span class="arrow">&#183;</span></a>
datatypes, 
or both.
The same applies to the definition of whitespace.
</span></div>
<div class="clnumber">2 <span class="p">It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a schema processor
can read schema documents in the form of XML documents.

</span></div>
<div class="clnumber">3 <span class="p">Whether a  processor 
is able to retrieve schema documents from the Web
is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>. (See <a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a>,
which defines "<a href="#key-fullyConforming" class="termref" shape="rect"><span class="arrow">&#183;</span>Web-aware<span class="arrow">&#183;</span></a>" processors
as  processors 
which can retrieve schema documents from the Web.)</span></div>
<div class="clnumber">4 <span class="p">The way in which a processor is invoked, and the way in
which values are specified for the schema to be used,
the information item to be validated,
and the declaration or definition with which to begin
validation, is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.  (See 
<a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>.)</span></div>
<div class="clnumber">5 <span class="p">The manner in which a processor provides access to the 
information items and properties in the PSVI to any 
downstream or user applications, or to the invoker, 
is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">6 <span class="p">The  
information items and properties in the PSVI to which
the processor provides access, if any, is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
(See <a href="#var_psvi" shape="rect">Subset of the Post-schema-validation Infoset (&#167;C.1)</a> for some subsets of the PSVI for
which this specification provides names and definitions.)</span></div>
<div class="clnumber">7 <span class="p">When the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> includes
<span class="anonRef">[type definition name]</span> and
similar properties, it is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether
unique names are provided for anonymous type definitions.
</span></div>
<div class="clnumber">8 <span class="p">The method used for assembling a set of schema components
for use in validation is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
(See <a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a> for the normative prose and
<a href="#var_schema_con" shape="rect">
Terminology of schema construction
 (&#167;C.2)</a> for some terminology which
can be used in describing implementation choices.)</span></div>
<div class="clnumber">9 <span class="p">It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a schema processor
provides a value for the <span class="anonRef">[type definition name]</span>
and <span class="anonRef">[member type definition name]</span>
properties of attribute and element information-items.  
If it does so, the choice of name is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">10 <span class="p">Everything <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a> is also
      <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> in this specification.</span><div class="note"><div class="p"><b>Note:</b> This includes, but is not limited to, the choice
	of <a href="#xml-1.0-based" class="termref" shape="rect"><span class="arrow">&#183;</span>XML-1.0-based<span class="arrow">&#183;</span></a>
	or <a href="#xml-1.1-based" class="termref" shape="rect"><span class="arrow">&#183;</span>XML-1.1-based<span class="arrow">&#183;</span></a>
	datatypes, or both;
	support for <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> primitive datatypes; 
	and
	support for <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> constraining facets.
	See the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#idef-idep" shape="rect">appendix</a> on
	implementation-defined and implementation-dependent
	features in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
       </div></div></div>
<div class="clnumber">11 <span class="p">It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor detects
       violations of clause <a href="#T.ct.restricts.B.ct" shape="rect">2.4.2</a>
       of <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>
       (a) always by examination of the schema in isolation,
       (b) only when some element information item
       in the input document is valid against its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> 
       <var>T</var> but not against <var>T</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>, or 
       (c) sometimes the one and sometimes the other.
       In case (c), the circumstances
       in which the processor does one or the other are 
       <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
      </span></div>
<div class="clnumber">12<a id="anchor11073e" name="anchor11073e" shape="rect"> </a><span class="p">It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> when a processor detects type errors
       in XPath expressions and whether it treats type errors as
       static or dynamic errors.</span></div>
<div class="clnumber">13 <span class="p">
	 <a name="anchor11076" id="anchor11076" shape="rect"></a>
	 It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> under what conditions a processor 
	 will detect the equivalence of two distinct 
	 <a href="#tt" class="compref" shape="rect">Type Table</a> or <a href="#tac" class="compref" shape="rect">Type Alternative</a> components.
	 All processors <span class="rfc2119">must</span> detect equivalence under certain
	 specified conditions, but the ability to detect equivalence
	 under other conditions is not constrained.
       </span></div>
<div class="clnumber">14 <span class="p">
	 It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> what effect invalid elements within
	 <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> have on the construction of
	 schema components from a schema document, and whether
	 a processor treats schema documents which are invalid
	 only in consequence of containing such invalid elements
	 as being in <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> or not.
       </span></div>
</div></div><div class="div2">
<h3><span class="nav"><a href="#impl-def-list" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="impl-dep-list" id="impl-dep-list" shape="rect"></a>E.2 Checklist of implementation-dependent features</h3><p><span class="termdef"><a name="key-impl-dep" id="key-impl-dep" title="" shape="rect">[Definition:]&#160;&#160;</a>An <b>implementation-dependent</b> 
  feature or behavior <span class="rfc2119">may</span> vary among processors conforming to this 
  specification; the precise behavior is not specified by
  this or any other W3C specification
  and is not required to be specified by the implementor 
  for any particular implementation.</span>  (In the latter
  respect, <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> features differ
  from <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> features.)
 </p><p>This appendix provides a summary of XSD features whose
  effect is explicitly <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>. Choices made by processors
  in these areas are <em>not</em> required to be documented.</p><ol class="enumar"><li><div class="p">
   When a default value of type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
   or <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a> is applied to an
   element or attribute information item, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>
   whether <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> occurs to ensure that the
   <a href="#vc_a-lexical_form" class="propref" shape="rect">{lexical form}</a> maps to the
   <a href="#vc_a-value" class="propref" shape="rect">{value}</a>.
  </div></li><li><div class="p">
   When a default value is supplied for a defaulted attribute and more than
   one prefix is  bound to the namespace of the attribute in the
   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a>, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> which prefix is used for the
   attribute.  
  </div></li><li><div class="p">
   When a default value is supplied for a defaulted attribute and
   <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is performed, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>
   what prefix is used in the new 
   namespace information item.
  </div></li><li><div class="p">
   When a default value is supplied for a defaulted attribute and
   <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is performed, it is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>
   whether the consistency of the information set is preserved by (a) adding
   the new binding to the descendants of the element on which the defaulted
   attribute occurred, or by (b) undeclaring the new binding on the children
   of that element.  When <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a> rather than 
   <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> is in use, namespace bindings cannot be
   undeclared, so the behavior is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> only for those
   implementations which do support <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>.
  </div></li><li><div class="p">
   If more than one <a href="#icd" class="compref" shape="rect">Identity-Constraint Definition</a> fails to be satisfied, it is
   <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> which of them are included in the
   <a href="#e-idcs" class="propref" shape="rect">[failed identity constraints]</a> property of PSVI.
  </div></li><li><div class="p">
   If more than one <a href="#as" class="compref" shape="rect">Assertion</a> fails to be satisfied, it is
   <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> which of them are included in the
   <a href="#e-assertions" class="propref" shape="rect">[failed assertions]</a> property of PSVI.
  </div></li><li><div class="p">
   The order of <a href="#a" class="compref" shape="rect">Annotation</a> components within various components'
   {annotations} property is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
  </div></li><li><div class="p">
   If a name is supplied for anonymous components
   (for example, <span class="anonRef">[type definition name]</span>
   and <span class="anonRef">[member type definition name]</span>
   properties in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>), the choice of name is
   <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
  </div></li><li><div class="p">If a processor detects
       some violations of clause <a href="#T.ct.restricts.B.ct" shape="rect">2.4.2</a>
       of <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>
       by examination of the schema in isolation,
       and others only when some element information item
       in the input document is valid against its <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> 
       <var>T</var> but not against <var>T</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>, 
       then the circumstances
       in which the processor does one or the other are 
       <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
      </div></li></ol></div></div><div class="div1">
<h2><a name="composition-xslts" id="composition-xslts" shape="rect"></a>F Stylesheets for Composing Schema Documents (Normative)</h2><p>The transformations specified in the following sections
  in the form of <a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a> stylesheets are used when
  assembling schemas from multiple schema documents. Implementations do not
  have to perform <a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a> transformation, or use
  the stylesheets given here, as long as the
  same result is produced.</p><div class="div2">
<h3><span class="nav"> <a href="#override-xslt" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="chameleon-xslt" id="chameleon-xslt" shape="rect"></a>F.1 Transformation for Chameleon Inclusion</h3><div class="block">When a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> information item <b>D2</b> without a
     <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is included
     (<a href="#compound-schema" shape="rect">Assembling a schema for a single target namespace from
      multiple schema definition documents
       (<code>&lt;include&gt;</code>) (&#167;4.2.3)</a>), redefined
     (<a href="#modify-schema" shape="rect">Including modified component definitions (<code>&lt;redefine&gt;</code>) (&#167;4.2.4)</a>), or overridden
     (<a href="#override-schema" shape="rect">Overriding component definitions (<code>&lt;override&gt;</code>) (&#167;4.2.5)</a>) by another <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>
     <b>D1</b> with a <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, the following
     transformation, specified here as an 
     <a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a> stylesheet, is applied to <b>D2</b>
     before its contents are mapped to schema compnents.  The
     transformation performs two tasks:<ol class="enumar"><li><div class="p">
	Add a <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> to <b>D2</b>, whose value
	is the same as that of the <code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of
	<b>D1</b>.
       </div></li><li><div class="p">
	Update all QName references in <b>D2</b> that do not have a namespace name
	so that their namespace names become the <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> of the
	<code>targetNamespace</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>.
       </div></li></ol>
    </div><div class="sfsScrap" id="div_xslt-chameleon">
<a id="xslt-chameleon" name="xslt-chameleon" shape="rect"></a>
<div class="sfsHead">Stylesheet for Chameleon Inclusion</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;xsl:transform version="2.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               xmlns:xs="http://www.w3.org/2001/XMLSchema"
               xmlns:f="http://www.w3.org/2008/05/XMLSchema-misc"&gt;

  &lt;xsl:param name="newTargetNamespace" as="xs:anyURI" 
      required="yes"/&gt;
  &lt;xsl:param name="prefixForTargetNamespace" as="xs:NCName" 
      select="f:generateUniquePrefix(., 0)"/&gt;

  &lt;xsl:template match="@*|node()"&gt;
    &lt;xsl:copy&gt;&lt;xsl:apply-templates select="@*|node()"/&gt;&lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:template match="xs:schema"&gt;
    &lt;xsl:copy&gt;
     &lt;xsl:namespace name="{$prefixForTargetNamespace}" 
       select="$newTargetNamespace"/&gt;
     &lt;xsl:apply-templates select="@*"/&gt;
     &lt;xsl:attribute name="targetNamespace" 
       select="$newTargetNamespace"/&gt;
     &lt;xsl:apply-templates/&gt;
   &lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:template match="attribute(*, xs:QName)
      [namespace-uri-from-QName(.)='']"&gt;
    &lt;xsl:attribute name="{name()}" 
      select="concat($prefixForTargetNamespace, 
                     ':', 
                     local-name-from-QName(.))"/&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:template match="@memberTypes"&gt;
    &lt;xsl:variable name="context" select=".."/&gt;
    &lt;xsl:variable name="values" as="xs:string+"&gt;
       &lt;xsl:for-each select="tokenize(., '\s+')"&gt;
          &lt;xsl:variable name="oldValue" 
                        select="resolve-QName(., $context)" 
                        as="xs:QName"/&gt;
          &lt;xsl:sequence 
             select="if (namespace-uri-from-QName($oldValue) eq '') 
                then concat($prefixForTargetNamespace, ':', 
                            local-name-from-QName($oldValue))
                else string(.)"/&gt;
       &lt;/xsl:for-each&gt;
    &lt;/xsl:variable&gt;
    &lt;xsl:attribute name="{name()}" select="string-join($values, ' ')"/&gt; 
  &lt;/xsl:template&gt;


  &lt;xsl:function name="f:generateUniquePrefix" as="xs:NCName"&gt;
    &lt;xsl:param name="xsd"/&gt;
    &lt;xsl:param name="try" as="xs:integer"/&gt;
    &lt;xsl:variable name="disallowed" 
      select="distinct-values($xsd//*/in-scope-prefixes(.))"/&gt;
    &lt;xsl:variable name="candidate" 
      select="xs:NCName(concat('p', $try))"/&gt;
    &lt;xsl:sequence select="if ($candidate = $disallowed) then 
                                f:generateUniquePrefix($xsd, $try+1) 
                             else 
                                $candidate"/&gt;
  &lt;/xsl:function&gt;

&lt;/xsl:transform&gt;</pre></div></div></div><div class="div2">
<h3><span class="nav"><a href="#chameleon-xslt" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="override-xslt" id="override-xslt" shape="rect"></a>F.2 Transformation for <code>xs:override</code></h3><p>When a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> 
     information item <b>D1</b> contains
     <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements, the transformation specified in the following 
     <a href="#bib-xslt2" shape="rect">[XSLT 2.0]</a> stylesheet is performed once for
     each such <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element.  It requires as 
     parameters (a) the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element in <b>D1</b>
     (call it <var>O1</var>) as the <code>overrideElement</code> parameter 
     and (b)
     the <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element of the schema document <b>D2</b>
     identified by the <code>schemaLocation</code> attribute of <var>O1</var>
     as the <code>overriddenSchema</code> parameter.
     The transformation 
     produces another <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> <b>D2&#8242;</b>, which is equivalent 
     to <b>D2</b> except that some elements in <b>D2</b> are replaced 
      
       or modified.
    </p><p>
      The normative description of the transformation is given by the stylesheet
      below; the transformation can also be described (non-normatively) in prose
      as in the following paragraph.
    </p><div class="block">
     
     For each element information item <var>E2</var> in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <b>D2</b>'s
     <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a>, <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>, or
     <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> information item, the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">1<a id="c-override-xslt-match" name="c-override-xslt-match" shape="rect"> </a><b>If </b><var>E2</var>
	 has element type <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>, <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a>,
	<a href="#element-group" class="eltref" shape="rect">&lt;group&gt;</a>, <a href="#element-simpleContent..attributeGroup" class="eltref" shape="rect">&lt;attributeGroup&gt;</a>,
	<a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a>, <a href="#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>, or
	<a href="#element-notation" class="eltref" shape="rect">&lt;notation&gt;</a>, and <var>O1</var> has a child 
	 <var>E1</var> with the same element type 
	and the same value for its <code>name</code>
	attribute, <b>then </b> <b>D2&#8242;</b> has an element identical to <var>E1</var> in <var>E2</var>'s
	place.</div><div class="clnumber">2<a id="c-override-xslt-nomatch" name="c-override-xslt-nomatch" shape="rect"> </a><b>If </b><var>E2</var> has one of the 
	 element types specified in clause <a href="#c-override-xslt-match" shape="rect">1</a>,
	 but <var>O1</var> has no  
	matching child, <b>then </b><b>D2&#8242;</b> has an element identical to <var>E2</var> in the same
	place as where <var>E2</var> is in <b>D2</b>.</div><div class="clnumber">3<a id="c-override-include" name="c-override-include" shape="rect"> </a><b>If </b><var>E2</var> has element type <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a>, <b>then </b><b>D2&#8242;</b> has an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element
	with <code>schemaLocation</code> = <var>E2</var>.<code>schemaLocation</code>
	and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> identical to those of <var>O1</var>.</div><div class="clnumber">4<a id="c-override-override" name="c-override-override" shape="rect"> </a><b>If </b><var>E2</var> has element type <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>, <b>then </b><b>D2&#8242;</b> has an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element
	<var>O2</var>, 
	with <code>schemaLocation</code> = <var>E2</var>.<code>schemaLocation</code>
	and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> which are drawn from among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of
	<var>E2</var> and <var>O1</var>, as specified by
	the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">4.1<a id="c-ov-ov-match" name="c-ov-ov-match" shape="rect"> </a><b>If </b>a child of <var>E2</var> and a child of <var>O1</var> match as described
	   in clause <a href="#c-override-xslt-match" shape="rect">1</a>, <b>then </b><var>O2</var> has 
	   a child identical to the child of <var>O1</var>.</div><div class="clnumber">4.2<a id="c-ov-ov-nomatch" name="c-ov-ov-nomatch" shape="rect"> </a><b>If </b>a child of <var>E2</var> matches no child of <var>O1</var> as described
	   in clause <a href="#c-override-xslt-match" shape="rect">1</a>, <b>then </b>(as described in clause <a href="#c-override-xslt-nomatch" shape="rect">2</a>)
	   <var>O2</var> has a child identical to the child of <var>E2</var>.</div><div class="clnumber">4.3<a id="c-ov-ov-added" name="c-ov-ov-added" shape="rect"> </a><b>If </b>a child of <var>O1</var> matches no child of <var>E2</var> as described
	   in clause <a href="#c-override-xslt-match" shape="rect">1</a>, <b>then </b>
	   <var>O2</var> has a child identical to the child of <var>O1</var>.</div></div>
       <div class="note"><div class="p"><b>Note:</b> Informally, the rule just given has the effect that <var>O2</var>
	 contains (a) all the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>O1</var>, as well as (b) all of
	 the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>E2</var> which are not overridden by some child
	 of <var>O1</var>.  The elements corresponding to <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>E2</var>
	 come first, followed by the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>O1</var> which matched
	 nothing in <var>E2</var>.
	</div></div></div></div></div><p>The base URI of <b>D2&#8242;</b> is the same
    as that of <b>D2</b>.</p><div class="note"><div class="p"><b>Note:</b> Informally, <b>D2&#8242;</b> is like <b>D2</b> except that
      (a) any elements matched by any <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>O1</var> 
      are overridden (replaced) by the corresponding <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of <var>O1</var>,
      (b) any schema documents included by means of 
      <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> elements
      in <b>D2</b> are overridden (transformed) by <var>O1</var> instead of
      being included without change,
      and (c) any schema documents overridden by means of 
      <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements
      in <b>D2</b> are to be overridden (transformed) both as
      specified in the <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> elements
      in <b>D2</b> and as specified in <var>O1</var>; if both apply,
      the information in <var>O1</var> takes precedence.
     </div><div class="p">The result is that the transformation 
      described by <var>O1</var> is applied to all the document in the
      <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> of <var>O1</var>.</div></div><div class="note"><div class="p"><b>Note:</b> Because <b>D2</b> and <b>D2&#8242;</b> have
      the same base URI, relative references in <b>D2&#8242;</b> will
      be unaffected by the transformation.</div></div><div class="sfsScrap" id="div_xslt-override">
<a id="xslt-override" name="xslt-override" shape="rect"></a>
<div class="sfsHead">Stylesheet for xs:override</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;xsl:transform version="2.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:f="http://www.w3.org/2008/05/XMLSchema-misc"
  exclude-result-prefixes="f"&gt;
  
  &lt;xsl:import-schema 
    namespace="http://www.w3.org/2001/XMLSchema" 
    schema-location="./XMLSchema.xsd"/&gt;
   
  &lt;xsl:param name="overrideElement" as="schema-element(xs:override)"/&gt;       
  &lt;xsl:param name="overriddenSchema" as="schema-element(xs:schema)"/&gt;
  
  &lt;xsl:template name="start"&gt;
    &lt;xsl:result-document validation="strict"&gt;
    	&lt;xsl:apply-templates select="$overriddenSchema"/&gt;
    &lt;/xsl:result-document&gt;
  &lt;/xsl:template&gt;  
  
  &lt;xsl:template match="schema-element(xs:schema) 
      | schema-element(xs:redefine)"&gt;
    &lt;xsl:copy&gt;
      &lt;xsl:copy-of select="@*"/&gt;
      &lt;xsl:apply-templates/&gt;
    &lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template match="schema-element(xs:import)" priority="5"&gt;
    &lt;xsl:copy-of select="."/&gt;
  &lt;/xsl:template&gt;



  &lt;!--* replace children of xs:schema, xs:redefine, and xs:override
      * which match children of $overrideElement.  Retain others.
      *--&gt;
  &lt;xsl:template match="schema-element(xs:schema)/* 
      | schema-element(xs:redefine)/*
      | schema-element(xs:override)/*" 
    priority="3"&gt;
    &lt;xsl:variable name="original" select="."/&gt;
    &lt;xsl:variable name="replacement"
      select="$overrideElement/*
                [node-name(.)=node-name($original) 
                 and 
                 f:componentName(.)=f:componentName($original)]"/&gt;
    &lt;xsl:copy-of select="($replacement, $original)[1]"/&gt;
  &lt;/xsl:template&gt;

  &lt;!--* replace xs:include elements with overrides
      *--&gt;
  &lt;xsl:template match="schema-element(xs:include)"
    priority="5"&gt;
    &lt;xsl:element name="xs:override"&gt;
      
      &lt;xsl:copy-of select="@schemaLocation, $overrideElement/*"/&gt;
    &lt;/xsl:element&gt;
  &lt;/xsl:template&gt;

  &lt;!--* change xs:override elements:  children which match 
      * children of $overrideElement are replaced, others are
      * kept, and at the end all children of $overrideElement
      * not already inserted are added.
      *--&gt;
  &lt;xsl:template match="schema-element(xs:override)"
    priority="5"&gt;
    &lt;xsl:element name="xs:override"&gt;
      &lt;xsl:attribute name="schemaLocation"&gt;
	&lt;xsl:value-of select="@schemaLocation"/&gt;
      &lt;/xsl:attribute&gt;
      &lt;xsl:apply-templates/&gt;
      &lt;xsl:apply-templates select="$overrideElement/*" 
	mode="copy-unmatched"&gt;
	&lt;xsl:with-param name="overriddenOverride" select="."/&gt;
      &lt;/xsl:apply-templates&gt;
    &lt;/xsl:element&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:template match="*" mode="copy-unmatched"&gt;
    &lt;xsl:param name="overriddenOverride"&gt;&lt;/xsl:param&gt;
    &lt;xsl:variable name="overriding" select="."/&gt;
    &lt;xsl:variable name="overridden" select="$overriddenOverride/*[
	node-name(.) = node-name($overriding) 
	and 
	f:componentName(.) = f:componentName($overriding)
      ]"/&gt;
    &lt;xsl:choose&gt;
      &lt;xsl:when test="count($overridden) &gt; 0"&gt;
	&lt;!--* do nothing; this element has already been copied *--&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:when test="count($overridden) = 0"&gt;
	&lt;!--* copy this element, it isn't already there *--&gt;
	&lt;xsl:copy-of select="."/&gt;
      &lt;/xsl:when&gt;
    &lt;/xsl:choose&gt;
  &lt;/xsl:template&gt;
  

  &lt;xsl:function name="f:componentName" as="xs:QName"&gt;
    &lt;xsl:param name="component" as="element()"/&gt;
    &lt;xsl:sequence select="
      QName($component/ancestor::xs:schema/@targetNamespace,
            $component/@name)"/&gt;
  &lt;/xsl:function&gt;

&lt;/xsl:transform&gt;</pre></div></div></div></div><div class="div1">
<h2><a name="changes" id="changes" shape="rect"></a>G Changes since version 1.0 (non-normative)</h2><div class="div2">
<h3 class="withToc"><span class="nav"> <a href="#issues" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="done" id="done" shape="rect"></a>G.1 Changes  made since version 1.0</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.1 <a href="#ch_specs" shape="rect">Relationship between XSD and other specifications</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.2 <a href="#ch_versions" shape="rect">XSD versions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.3 <a href="#ch_models" shape="rect">Changes to content models</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.4 <a href="#ch_xpath" shape="rect">Assertions and XPath</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.5 <a href="#ch_complex-derivation" shape="rect">Derivation of complex types</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.6 <a href="#ch_complex" shape="rect">Changes to complex type definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.7 <a href="#ch_id" shape="rect">ID, IDREF, and related types</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.8 <a href="#ch_std" shape="rect">Simple type definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.9 <a href="#ch_elemdecl" shape="rect">Element declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.10 <a href="#ch_attrdecl" shape="rect">Attribute declarations</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.11 <a href="#ch_components" shape="rect">Component structure</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.12 <a href="#ch_sva" shape="rect">The process of validation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.13 <a href="#ch_psvi" shape="rect">post-schema-validation infoset</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.14 <a href="#ch_conformance" shape="rect">Conformance</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.15 <a href="#ch_schemacomp" shape="rect">Schema composition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.16 <a href="#ch_misc_sub" shape="rect">Other substantive changes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.1.17 <a href="#ch_clar" shape="rect">Clarifications and editorial changes</a><br clear="none" />
</div><div class="note"><div class="p"><b>Note:</b> The grouping of changes  
      below is intended to
      make the list easier to scan.  It is an ad hoc grouping for
      convenience to which no great significance should be attached.
      Some changes could have been listed in more than one place; in
      such cases the choice was arbitrary.
     </div></div><div class="div3">
<h4><a name="ch_specs" id="ch_specs" shape="rect"></a>G.1.1 Relationship between XSD and other specifications</h4><div class="block">Changes to the
      relationship between this and other specifications:
     <ol class="enumar"><li><div class="p">Support for XML 1.1 has been added.
	It is now implementation defined whether datatypes dependent
	on definitions in XML (<a href="#ref-xml-1.1" shape="rect">[XML 1.1]</a>, <a href="#ref-xml-1.0" shape="rect">[XML 1.0]</a>) and Namespaces in XML 
	(<a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>, 
	<a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>) use the definitions as
	found in version 1.1 or version 1.0 of those specifications.
       </div></li><li><div class="p">To reduce confusion and avert a widespread misunderstanding,
       the normative references to various W3C specifications now state
       explicitly that while the reference describes the particular edition
       of a specification current at the time this specification is
       published, conforming implementations of this specification 
       are not required to ignore later editions of the other
       specification but instead <span class="rfc2119">may</span> support later editions, thus
       allowing users of this specification to benefit from corrections to other
       specifications on which this one depends.
      </div></li></ol>
    </div></div><div class="div3">
<h4><a name="ch_versions" id="ch_versions" shape="rect"></a>G.1.2 XSD versions</h4><div class="block">Schema language versions:<ol class="enumar"><li><div class="p">A conditional inclusion mechanism is defined, roughly
	  analogous to the XSLT 2.0 <code>use-when</code> attribute or
	  to the C preprocessor <code>#ifdef</code> construct. By
	  means of the <code>vc:minVersion</code> and
	  <code>vc:maxVersion</code> attributes, a simple forward-processing
	  mechanism is supplied, so that conforming XSD 1.1 processors
	  can successfully ignore constructs introduced in 
	  future versions (if any) of XSD, and so that schema authors
	  can define schemas which use newer constructs when available
	  but can fall back on older constructs when the newer
	  constructs are not available.
	 </div></li><li><div class="p">
	  Identifiers for different versions of XSD are now defined
	  in section <a href="#langids" shape="rect">Schema Language Identifiers (&#167;1.3.4)</a>.
	 </div></li></ol></div></div><div class="div3">
<h4><a name="ch_models" id="ch_models" shape="rect"></a>G.1.3 Changes to content models</h4><div class="block">Content models:
     <ol class="enumar"><li><div class="p">The <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a>
	constraint has been relaxed.  While competition between two
	<a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particles<span class="arrow">&#183;</span></a> is still forbidden, as is competition between
	two <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particles<span class="arrow">&#183;</span></a>, competition between an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> and
	a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> is no longer forbidden.  In the course of
	making this substantive change, some editorial changes have
	also been made, in order to make the exposition clearer.
	(Readers familiar with version 1.0 of this specification will
	find that the constraint works in almost exactly the same way
	as it did in 1.0, except that content models in which an input
	item matches either a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a> are
	now allowed.)
       </div></li><li><div class="p">Content models may now use the
	<a href="#element-openContent" class="eltref" shape="rect">&lt;openContent&gt;</a> element to specify content
	models with "open content".  Such content
	models allow elements  
        not explicitly mentioned in
	the content model to appear in the document instance; it is
	as if wildcards were automatically inserted at appropriate
	points within the content model. By specifying what kind of
	wildcard is implicitly inserted, the schema author can
	adjust the degree of openness and determine what elements
	are accepted by the open content; the schema author can also
	specify that the content model should be open everywhere, or
	only at the end.  A schema-document wide default may be
	set, which causes all content models to be open unless
	otherwise specified.</div></li><li><div class="p">Wildcards may now be defined which allow names in any
	namespace but those in a set of proscribed namespaces.
	(In version 1.0 of this specification, only a single
	namespace, the target namespace of a schema document,
	could be proscribed.)  Also, wildcards can now be written
	which match any element in a set of namespaces but
	which exclude a particular set of qualified names from
	matching the wildcard.
	Finally,
	 the keyword <b>##definedSibling</b> can be used
	 to exclude all elements explicitly mentioned in
	 a content model (and all elements substitutable for
	 those elements).
       </div></li><li><div class="p">Wildcards can now be defined which match any element
	(in the specified namespaces) which does <em>not</em>
	match an element declaration in the schema (so-called
	"not-in-schema" wildcards).</div></li><li><div class="p">Several of the constraints imposed by version 1.0 of this
       specification on <b><i>all</i></b>-groups have been relaxed:
       <ol class="enumla"><li><div class="p">Wildcards are now allowed in <b><i>all</i></b> groups.</div></li><li><div class="p">The value of <code>maxOccurs</code> may now be greater than 1 on particles
	  in an <b><i>all</i></b> group.  The elements which match a particular
	  particle need not be adjacent in the input.</div></li><li><div class="p"><b><i>all</i></b> groups can now be extended by adding more members to them.</div></li></ol>
      </div></li><li><div class="p">Complex types whose content models are <code>all</code>-groups
	can now be extended; the result is an <code>all</code>-group
	(usually a larger one).
	
       </div></li><li><div class="p">The discussion of checking content-type restriction 
       included in an appendix in earlier drafts of this specification
       has now been removed, as have some references to published algorithms
       for the problem.  Several of the papers referred to are no longer
       publicly accessible on the Web, and the changes made to the
       <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> have in any case rendered those
       algorithms obsolete.  These changes resolve issue 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6685" shape="rect">6685
       Appendix I Checking content-type restriction References Not Available</a>.
      </div></li><li><div class="p">Group references are now allowed in 
       <code>&lt;xs:all&gt;</code> model groups.
       Such
       references <span class="rfc2119">must</span> have <code>minOccurs=maxOccurs=1</code> and <span class="rfc2119">must</span> refer
       to other <code>&lt;xs:all&gt;</code> groups.
       (This change
       resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7031" shape="rect">
        7031 XSD 1.1 doesn't support conversion of xs:sequence to xs:all
        because xs:all can't contain groups references</a>.)
      </div></li></ol>
    </div></div><div class="div3">
<h4><a name="ch_xpath" id="ch_xpath" shape="rect"></a>G.1.4 Assertions and XPath</h4><div class="block">Assertions and rules for evaluation of XPaths<ol class="enumar"><li><div class="p">Support for check clauses to
	implement some co-occurrence constraints has been added.  Each
	complex type can carry a list of assertions, which are checked
	when the complex type is used to validate an element
	information item.</div></li><li><div class="p">The facility for assertions defined in the 
	working draft of 31 August 2006 has been revised.
	<ol class="enumla"><li><div class="p">The <code>report</code> element described in earlier
	   drafts has been removed.  This involves no loss of functionality:
	   the same effect can be obtained by wrapping the test expression 
	   on an <a href="#element-assert" class="eltref" shape="rect">&lt;assert&gt;</a> element in a negation.</div></li><li><div class="p">The XPath subset defined for assertions has been
	   
	    eliminated.  (A somewhat smaller subset is now defined
	    for conditional type assignment.)</div></li></ol>
       </div></li><li><div class="p">Rules are defined for the evaluation of XPath expressions
	(in assertions, in conditional type assignment, or in
	identity-constraint definitions).  
	<ol class="enumla"><li><div class="p">The static and dynamic contexts for XPath evaluation
	   are explicitly specified.
	  </div></li><li><div class="p">Rules are provided for constructing the <a href="#bib-xdm" shape="rect">[XDM]</a> data model instance against which the
	   XPath expressions 
           are to be evaluated.  Different
	   rules apply in different situations:<ol class="enumlr"><li><div class="p">When assertions on a complex type are evaluated,
	      only the subtree rooted in an element of that type is
	      mapped into the data model instance.  References to
	      ancestor elements or other nodes outside the subtree
	      are not illegal but will not be effective.</div></li><li><div class="p">For conditional type assignment, neither the
	      ancestors nor the children of the element in question
	      are included; the conditions for type assignment are
	      thus effectively restricted to the attributes of the
	      element.</div></li><li><div class="p">For assertions on simple types, only the value
	      is provided; the dynamic context includes no
	      context item.</div></li></ol>
	  </div></li><li><div class="p">Rules for assigning types to the nodes of the
	   data model instance are defined.  Again, the rules
	   differ for the different uses of XPaths:<ol class="enumlr"><li><div class="p">When assertions are evaluated, all of the elements
	      and attributes descended from the element being
	      validated are typed in the normal way; this has the
	      effect that comparisons among attribute values (for
	      example) are performed in a way consistent with the
	      declarations of the attributes.  The element node
	      itself, however, is not typed (since it has not yet
	      been completely validated).
	     </div></li><li><div class="p">For conditional type assignment, the nodes of the
	      data model instance are untyped.
	     </div></li></ol>
	  </div></li></ol>
       </div></li><li><div class="p">The conceptual overview now included in 
	<a href="#Constraint_Summary" shape="rect">Constraint Components (&#167;2.2.4)</a> some 
	discussion of the overlap in functionality
	among identity constraints, conditional type assignment,
	and assertions, and identifies some of the factors
	which may be relevant in choosing among them; this
	change resolves issue 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5023" shape="rect">5023
	Relationship between identity constraints and assertions</a>.
       </div></li><li><div class="p">The rules for the "available collections" and "default collection"
       properties of the <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> 
       <a href="http://www.w3.org/TR/xpath20/#dt-dynamic-context" shape="rect">dynamic context</a>
       have been simplified; these properties are now
       required to be the empty set instead of being
       <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.  This improves interoperability and
       resolves issue 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6540" shape="rect">6540
       Available documents in assertions</a>.</div></li><li><div class="p">The <a href="#bib-xpath2" shape="rect">[XPath 2.0]</a> 
       <a href="http://www.w3.org/TR/xpath20/#dt-static-context" shape="rect">static context</a> used
       for the evaluation of assertions has been clarified; it now 
       <a href="#anchor6541" shape="rect">explicitly includes</a> the functions in the
       <a href="#bib-fno" shape="rect">[Functions and Operators]</a> <code>fn</code> namespace and 
       constructors for all built-in types.  This resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6541" shape="rect">6541
       Assertions and in-scope functions</a>.</div></li></ol>
    </div></div><div class="div3">
<h4><a name="ch_complex-derivation" id="ch_complex-derivation" shape="rect"></a>G.1.5 Derivation of complex types</h4><div class="block">Derivation of complex types:<ol class="enumar"><li><div class="p">The rules for checking validity of complex-type restrictions
	have been simplified by reformulating the constraint in terms
	of local validity:  the set of elements or attributes accepted
	by a restriction as locally valid must be a subset of those accepted by its
	base type.  The rules for attributes have also been changed.</div><div class="p">The complex rules involving matching up particles in the base type
	and particles in the restriction, with their complex case by
	case analysis, have been replaced by a statement of the
	constraint which is shorter and more correct.
       </div></li><li><div class="p">
	It is now possible to specify a target namespace for
	local elements and attributes which differs from the target
	namespace of the schema document itself, when restricting
	a complex type which has local elements or attributes and
	which itself is in another namespace.  This should
	simplify the reuse of types from other namespaces.
       </div></li><li><div class="p">
	The rules for complex type restriction now allow identity
	constraints on local elements.  To make this possible,
	identity constraints may now be given names and referred to
	from elsewhere.  Corresponding changes have been made in the
	description of the <a href="#s" class="compref" shape="rect">Schema</a> component and in the
	rules for <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>QName
	 resolution<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">
	This draft clarifies the rule requiring that any complex
	type derived by extension could, in principle, be derived in
	three steps from <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> (first a restriction step,
	then an extension step, then a restriction step). A
	misleading note about the purpose of this rule has been
	deleted.
       </div></li></ol>
    </div></div><div class="div3">
<h4><a name="ch_complex" id="ch_complex" shape="rect"></a>G.1.6 Changes to complex type definitions</h4><div class="block">Complex type definitions (miscellaneous changes):<ol class="enumar"><li><div class="p">Changes
	  have been made to 
	  <a href="#sec-cdtt" shape="rect">Locally Declared Type (&#167;3.4.4.1)</a>,
	  <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a>, and
	  <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a>
	  
	  to require more consistency in type
	  assignment when elements with the same expanded name may
	  match both a local element declaration and a wildcard
	  in the same content model.  
	 Conceptually, these 
	  changes are related to
	  the constraint expressed in
	  <a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a>.
	 XSD 1.0 allows such content
	  models even if there is a discrepancy between the type
	  assigned to elements by the local element declarations 
	  and by the top-level element declaration which
	  will govern elements which match the wildcard.
	  For compatibility reasons, such content models are still 
	  allowed, but any element instance which matches the wildcard 
	  is required to have a governing type definition compatible with
	  the type assigned by the local element declarations 
	  matched by the element's expanded name.
	</div></li><li><div class="p">
	The elements <a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> and <a href="#element-complexContent" class="eltref" shape="rect">&lt;complexContent&gt;</a>
	are now forbidden 
        to have different values for the <code>mixed</code>
	attribute.
       </div></li><li><div class="p">The constraint 
       <a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a> now
       takes open content into account.  
       This change, together with the explicit exclusion of
       skip wildcards from the constraint, resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5940" shape="rect">5940
       Element Declarations Consistent</a>.</div></li></ol></div></div><div class="div3">
<h4><a name="ch_id" id="ch_id" shape="rect"></a>G.1.7 ID, IDREF, and related types</h4><div class="block">ID, IDREF, and related types:
     <ol class="enumar"><li><div class="p">Certain constraints involving
	<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a> have been
	extended to include lists of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a> and unions including
	<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#ID" shape="rect">ID</a>.  See e.g.
	<a href="#coss-attribute" shape="rect">Constraints on Attribute Declaration Schema Components (&#167;3.2.6)</a>.</div></li><li><div class="p">
	An element may now have multiple attributes of type
	<code>xs:ID</code>.  Elements have always been able to have
	multiple children of type <code>xs:ID</code>, but XSD 1.0 forbad
	multiple attributes of this type for compatibility
	with XML DTDs.  (Schemas intended to be translatable into DTD
	form should still avoid the practice.)  This change should make
	it easier for XML vocabularies to support both existing
	ID attributes and <code>xml:ID</code>.
       </div></li><li><div class="p">
	The validation rules for values of type <code>xs:IDREF</code>,
	<code>xs:ENTITY</code>, or <code>xs:ENTITIES</code>
	are now enforced on default values. 
       </div></li><li><div class="p">Elements and attributes of type <code>xs:ID</code> may now have
	default or fixed values.  XSD 1.0 had forbidden this, for
	compatibility with XML DTDs.
       </div></li></ol>
    </div></div><div class="div3">
<h4><a name="ch_std" id="ch_std" shape="rect"></a>G.1.8 Simple type definitions</h4><div class="block">Changes involving
      simple type definitions and
      related constraints:
     <ol class="enumar"><li><div class="p">A new type definition called
	<code>anyAtomicType</code> has been introduced into the type
	hierarchy between <code>anySimpleType</code> and all the
	<em>atomic</em> built-in type definitions.  See <a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions (&#167;3.16.7)</a>.</div></li><li><div class="p">An error in version 1.0 of this
	 specification relating to the construction of union types from
	 other union types has been corrected.  Unions may now appear
	 as members of other unions, and all restrictions of unions are
	 correctly enforced;
	  the rule <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a> has been
	  modified to ensure that member types are not 
	  <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for facet-restricted unions.
	  As a result, 
	  <code>xsi:type</code> may no longer be used, as in XSD 1.0, 
	  to subvert restrictions of union types.</div></li><li><div class="p">
	The requirement that a facet value be a "valid
	 restriction" of another, in the context of simple
	type restriction, has been clarified.
       </div></li><li><div class="p">
	No union type may be a member of its own transitive membership,
	nor may any type derived from the union.  (XSD 1.0 forbad
	union datatypes to be members of other unions and thus had
	no need to forbid this explicitly.)
       </div></li><li><div class="p">Since not all datatypes have a
	defined canonical representation for all of their values,
	appeals to the canonical forms of values have been
	eliminated.</div></li><li><div class="p">Changes have been made to ensure that
	the descriptions of the <a href="#std" class="compref" shape="rect">Simple Type Definition</a> component and of <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> agree in all
	details with those of <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.</div></li><li><div class="p">Equality and identity of lists have been clarified.</div></li><li><div class="p">The fact that <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> is its own base type 
       <a href="#anchor6204" shape="rect">has been clarified</a> (addresses issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6204" shape="rect">6204
       anyType/ur-Type: inconsistent whether it has a base-type</a>).</div></li></ol>
    </div></div><div class="div3">
<h4><a name="ch_elemdecl" id="ch_elemdecl" shape="rect"></a>G.1.9 Element declarations</h4><div class="block">Changes to element declarations:
     <ol class="enumar"><li><div class="p">
	A new form of co-occurrence constraint has now been defined,
	by allowing the type assigned to element instances to 
	be conditional on properties of the instance (typically
	attribute values).  The addition of conditional type assignment
	has entailed a number of changes:
	<ol class="enumla"><li><div class="p">Introduction of a <a href="#tt" class="compref" shape="rect">Type Table</a> property on element declarations, 
	   to hold a sequence of
	   <a href="#tac" class="compref" shape="rect">Type Alternative</a>s (condition - selected-type pairs) and a default
	   type definition.</div></li><li><div class="p">Constraints on that table:  all types named in the table (including 
	   the default) must be <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for the 
	   declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</div></li><li><div class="p">Changes to the XML syntax and XML mapping rules
	   to allow expression of conditional type
	   bindings: the <a href="#element-alternative" class="eltref" shape="rect">&lt;alternative&gt;</a> element is added, 
	   the content model of <a href="#element-element" class="eltref" shape="rect">&lt;element&gt;</a> is changed.</div></li><li><div class="p">
	   Validation rules for conditional types:  
	   
	   
	   the definition of <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> is adjusted
	   to account for conditional type assignment.
	   
	  </div></li><li><div class="p">
	   Rules for evaluating the conditional typing tests
	   (more specifically, rules for constructing a temporary infoset
	   and then building the XDM instance and evaluating the
	   XPath expressions as defined elsewhere; priority of
	   tests is given by document order / component order).
	  </div></li><li><div class="p">
	   PSVI changes to reflect details of the conditional typing:
	   a {type alternative} property is added, and the discussion of
	   [type fallback] now refers to the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> rather than 
	   to either the
	   declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> or to the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> of the
	   element information item
	  </div></li><li><div class="p">Introduction of some terminology for discussing conditional 
	   types
	   (define <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a>, 
	   <a href="#key-cta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>conditionally selects<span class="arrow">&#183;</span></a>,
	   <a href="#key-val-sub-type-restricts" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable as        a restriction<span class="arrow">&#183;</span></a>).
	  </div></li><li><div class="p">Rules for checking type restriction in the presence of conditional 
	   types.</div></li><li><div class="p"> 
	   Introduction of a special <a href="#key-error" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:error</code><span class="arrow">&#183;</span></a> 
           type for use 
	   in identifying conditionally assigned types which violate
	   restriction rules</div></li><li><div class="p">Miscellaneous supporting editorial changes.</div></li></ol>
       </div></li><li><div class="p">
	Element declarations may now specify multiple substitution-group
	heads.
       </div></li><li><div class="p">
	Abstract elements may now appear in substitution groups.
       </div></li></ol>
    </div></div><div class="div3">
<h4><a name="ch_attrdecl" id="ch_attrdecl" shape="rect"></a>G.1.10 Attribute declarations</h4><div class="block">Attributes:
     <ol class="enumar"><li><div class="p">Attribute declarations can now be marked <a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a>
	(see <a href="#Inherited_attributes" shape="rect">Inherited Attributes (&#167;3.3.5.6)</a>)
	and the values of inherited attributes are accessible in the XDM
	data model instance constructed for  conditional type assignment
	(see <a href="#cTypeAlternative" shape="rect">Type Alternatives (&#167;3.12)</a>). 
       </div><div class="p">
	Among other consequences, this allows conditional type assignment
	 to be sensitive to the inherited value of
	the <code>xml:lang</code> attribute and thus to the language of
	the element's contents.  This change was introduced to resolve issue
	<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5003" shape="rect">5003
	 Applicability of &lt;alternative&gt; element to xml:lang</a>,
	raised by the <a href="http://www.w3.org/International/core/" shape="rect">W3C Internationalization Core Working Group</a>.
       </div></li><li><div class="p">
	The rules for default attribute values now refer to the 
	<a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a>,
	rather than to the <a href="#vc_a" class="propref" shape="rect">[Value Constraint]</a>; this resolves a bug
	in the handling of default values for global attribute
	declarations.
       </div></li><li><div class="p">The text now makes clear that it is pointless (although
	not illegal) for schema documents to supply default or fixed
	values for <code>xsi:type</code> and other attributes in the
	namespace <code>http://www.w3.org/2001/XMLSchema-instance</code>, since they
	will not be applied.
       </div></li><li><div class="p">
	Default attribute groups are now supported.  The
	<a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element can carry a
	<code>defaultAttributes</code> attribute, which identifies a
	named <a href="#agd" class="compref" shape="rect">Attribute Group Definition</a>; each complex type defined in
	the schema document then automatically includes that
	attribute group, unless this is overridden by the
	<code>defaultAttributesApply</code> attribute on the 
	<a href="#element-complexType" class="eltref" shape="rect">&lt;complexType&gt;</a> element. Default attribute groups
	make it easier to specify attributes which should be accepted
	by every complex type in a schema (e.g. <code>xml:id</code>
	and <code>xml:lang</code>).
       </div></li><li><div class="p">All wildcard unions are now expressible; 
	 this change resolves issue
	  <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6163" shape="rect">6163
	   3.10.6.3 Attribute Wildcard Union </a>.</div></li></ol></div></div><div class="div3">
<h4><a name="ch_components" id="ch_components" shape="rect"></a>G.1.11 Component structure</h4><div class="block">Changes in the structure
      of schema components:
     <ol class="enumar"><li><div class="p">Every component now has an
	{annotations} property whose value is a sequence of annotation
	elements and out-of-band attributes.  See e.g. <a href="#Complex_Type_Definition_details" shape="rect">The Complex Type Definition Schema Component (&#167;3.4.1)</a>.</div><div class="p">Annotations are no longer
	allowed to vary in the part of a content model shared
	by a complex type and its extensions.  (This was never
	possible in components specified using schema documents,
	but was possible in "born-binary" components.)</div></li><li><div class="p">A <a href="#ctd-context" class="propref" shape="rect">{context}</a>
	property has been defined for the definitions of complex and
	of simple types; this property simplifies testing for the
	identity of anonymous type definitions.  See e.g. <a href="#Complex_Type_Definition_details" shape="rect">The Complex Type Definition Schema Component (&#167;3.4.1)</a>.  The {context} property
	replaces the {scope} property found in some earlier drafts of
	this document.</div></li><li><div class="p">The  <a href="#s" class="compref" shape="rect">Schema</a> component has an
	additional <a href="#s-identity-constraint_definitions" class="propref" shape="rect">{identity-constraint    definitions}</a> property containing all the identity
	constraints in the corresponding schema.  See <a href="#Schema_details" shape="rect">The Schema Itself (&#167;3.17.1)</a> and <a href="#declare-schema" shape="rect">XML Representations of Schemas (&#167;3.17.2)</a>.</div></li><li><div class="p">The underlying basis for the
	definition of all the different kinds of components has
	changed to make use of a regular and formal tabulation of
	their properties.  This has been achieved by introducing
	<em>property records</em> wherever version 1.0 had complex
	property values.  For example instead of describing the
	{scope} property as having "either <b><i>global</i></b> or a
	complex type definition" for its value, a <a href="#sc_e" class="compref" shape="rect">Scope</a> property record is called for, which in turn has its
	own simple properties and values.  See e.g. <a href="#Element_Declaration_details" shape="rect">The Element Declaration Schema Component (&#167;3.3.1)</a>.</div></li></ol>
    </div></div><div class="div3">
<h4><a name="ch_sva" id="ch_sva" shape="rect"></a>G.1.12 The process of validation</h4><div class="block">The process of validation:
       <ol class="enumar"><li><div class="p">
	  When an <code>xsi:type</code> attribute appears on an element
	  and has a QName as its value, 
	  but the QName does not resolve to 
	  a known type definition,
	  the element is assigned a "fallback"
	  <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> for validation.  The 
	  <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> will be 
	  the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> or the declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>,
	  if available, and 
	  <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> otherwise.
	  The validation process is now explicitly defined 
	  as including the validation of the element and its descendants;
	  processors no longer have the implicit option
	  of skipping the element and its descendants.
	 </div></li><li><div class="p">Element information items which match no particle in a content
	  model are now to be validated using their <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>.
	  Earlier drafts did not specify what happened in such cases.</div></li><li><div class="p">
	  <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>Lax assessment<span class="arrow">&#183;</span></a> is now required
	  when an element information item to be validated has neither
	  a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> nor a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>; also, lax assessment
	  now requires that the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of the element
	  be assessed as well.  In XSD 1.0 and in earlier drafts, lax
	  assessment was optional and did not require the 
	  recursive assessment of
	  <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and 
          <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.
	 </div></li><li><div class="p">
	   <a name="anchor11764d" id="anchor11764d" shape="rect"></a>
	   The text now specifies that 
	   if an element has an <code>xsi:type</code> attribute 
	   which does not <a href="#src-resolve" class="termref" shape="rect"><span class="arrow">&#183;</span>resolve<span class="arrow">&#183;</span></a> to a type definition, 
	   then the <code>xsi:type</code> attribute is invalid.
	 </div></li><li><div class="p">
	  The terminology of assessment has been changed to avoid the
	  suggestion that an element information item can be 
	  <a href="#key-sva" class="termref" shape="rect"><span class="arrow">&#183;</span>strictly assessed<span class="arrow">&#183;</span></a> without being 
	  <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a>.
	 </div></li><li><div class="p">An anomaly in the definition of <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> has been corrected,
	 to ensure that elements matching strict or lax wildcards have
	 the appropriate global element declaration, if it exists, as their 
	 <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>.  (Resolves issue 
	 <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7913" shape="rect">7913
	  Strange result from definition of governing element declaration</a>.)
	</div></li><li><div class="p">The usage of the terms "<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>" and 
	 "<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>" has been clarified, and definitions
	 of various forms of document validity have been added
	 for the convenience of users of this specification;
	 see <a href="#sec-schema-validity-and-docs" shape="rect">Schema-validity and documents (&#167;2.5)</a>.
	 (Resolves issues
	 <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5164" shape="rect">5164
	  validation vs assessment</a> and 
	 <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6015" shape="rect">6015
	  [schema11] valid (and its derivations) vs assessment as used in text</a>.)
	</div></li></ol>
       </div></div><div class="div3">
<h4><a name="ch_psvi" id="ch_psvi" shape="rect"></a>G.1.13 <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a></h4><div class="block">Changes in the
      description of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>:
     <ol class="enumar"><li><div class="p">The presentation of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> has been simplified by removing
       the suggestion that the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> varies from processor to processor.
       Instead, the exposition now makes clearer that the body of information 
       available in principle after schema-validity assessment is consistent 
       across all 
       processors; processors may make different subsets of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
       accessible to downstream applications, but when they do so 
       the variation reflects the implementors' decisions
       about what information to expose, not variation in the information
       in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">Terms have been defined to describe different subsets of the
       <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> which may be exposed by processors.</div></li><li><div class="p">Provision is made for exposing the 
	<a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual values<span class="arrow">&#183;</span></a> of elements and 
	attributes in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>, in the
	<span class="anonRef">{schema actual value}</span> property.
       </div></li><li><div class="p">The <a href="#e-declaration" class="propref" shape="rect">[element declaration]</a> property and various
	other properties in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> are now described as being
	present in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> whenever a <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration
	and/or <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type definition is known for the item,
	instead of only when the item is valid.</div></li><li><div class="p">
	When the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> type definition of an attribute or element 
	information item is a list type whose item type is a union, 
	the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> now includes the 
	<a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> for 
	each item in the list.
       </div></li><li><div class="p">
	When default values are supplied for attributes with
	qualified names, <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is performed to ensure that the
	<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> property of the attribute's host element has an
          appropriate binding for the namespace name.  It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> 
          whether <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>namespace fixup<span class="arrow">&#183;</span></a> is also performed on descendants of that element 
          so as to retain consistency of the infoset. <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>Namespace fixup<span class="arrow">&#183;</span></a> may also be 
          helpful if the defaulted value is of type 
          <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> or 
	  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NOTATION" shape="rect">NOTATION</a>; it is 
	  <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> whether fixup is performed for such values.
	 </div></li><li><div class="p">Annotations given in the XML form of identity-constraint declarations 
       with <code>ref</code> attributes are now retained in the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>
       form of the containing element declaration.  This change resolves
       issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6144" shape="rect">6144
       annotation on IDC with a 'ref' attribute is lost</a>.</div></li></ol></div></div><div class="div3">
<h4><a name="ch_conformance" id="ch_conformance" shape="rect"></a>G.1.14 Conformance</h4><div class="block">Changes to the
      description of conformance:
      <ol class="enumar"><li><div class="p">The set of conformance classes 
	 has been revised and clarified.  Instead of 
	 "minimally conforming",
	 "schema-document aware", and
	 "Web-aware" processors, this specification
	 now defines (in section 
	 <a href="#concepts-conformance" shape="rect">Conformance (&#167;2.4)</a>) conformance classes for 
	 <a href="#key-gpval" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose validators<span class="arrow">&#183;</span></a>,
	 <a href="#key-gp-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose schema-validity assessors<span class="arrow">&#183;</span></a>,
	 <a href="#key-spval" class="termref" shape="rect"><span class="arrow">&#183;</span>special-purpose validators<span class="arrow">&#183;</span></a>, and
	 <a href="#key-othertools" class="termref" shape="rect"><span class="arrow">&#183;</span>other special-purpose tools<span class="arrow">&#183;</span></a>,
	 together with terminology which may be useful in describing
	 particular processors.
	 This change resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7695" shape="rect">7695
	Conformance</a>.      
     </div></li><li><div class="p">A checklist has been included listing ways in which conforming 
	processors may vary from each other, and terminology has been
	provided for some of the more important properties of conforming
	processors, in an attempt to make it easier for implementors to
	describe concisely which options their processors exercise, and
	easier for users to describe what kinds of processor they 
	require.</div></li><li><div class="p">The definition of <span class="rfc2119">must</span> and <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> have been revised to
	specify that conforming processors <span class="rfc2119">must</span> detect and report
	error in the schema or schema documents.  The quality
	and detail of the error messages are not constrained.</div></li><li><div class="p">Implementations are now allowed to support primitive datatypes
	and facets beyond those defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.
       </div></li><li><div class="p">The validity requirements for schema documents are stated more
	fully and correctly.</div></li></ol>
    </div></div><div class="div3">
<h4><a name="ch_schemacomp" id="ch_schemacomp" shape="rect"></a>G.1.15 Schema composition</h4><div class="block">Schema assembly and composition:
       <ol class="enumar"><li><div class="p">The <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a> construct is <a href="#key-deprecated" class="termref" shape="rect"><span class="arrow">&#183;</span>deprecated<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">An <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> construct has been defined;
	in some ways it resembles <a href="#element-redefine" class="eltref" shape="rect">&lt;redefine&gt;</a>,
	but imposes no constraints on the new definitions provided
	for components whose definitions are being overridden.</div></li><li><div class="p">The discussion of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> and <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>
       has been revised to eliminate an ambiguity in earlier versions of
       this spec regarding the meaning of cyclic dependencies formed by
       use of <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> and <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a>:  such
       cyclic dependencies are now clearly allowed and have a well defined
       meaning.
      </div></li><li><div class="p">
	When an <code>xsi:schemaLocation</code> attribute provides
	information about a schema document location for a
	particular namespace, it is no longer an error for it to be
	encountered after the first occurrence of an element or
	attribute information item in that namespace.
	Note, however, that if processing such an <code>xsi:schemaLocation</code>
	attribute causes new components to be added to the schema, then 
	the new components cannot change the assessment outcome of any
	information items already seen before the element bearing 
	the <code>xsi:schemaLocation</code> attribute.
       </div></li><li><div class="p">
	  No <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a> is needed in a schema document
	  in order to refer to components in namespaces
	  <code>http://www.w3.org/2001/XMLSchema</code> or <code>http://www.w3.org/2001/XMLSchema-instance</code>.
	  In XSD 1.0, the examples showed no such imports, but
	  there was no rule making it legal to omit the <a href="#element-import" class="eltref" shape="rect">&lt;import&gt;</a>.
	 </div></li><li><div class="p">The handling of "chameleon" inclusion and redefinition
	  in schema documents has been simplified.  The new target
	  namespace affects any component or property which would have
	  the target namespace if the schema document specified one.
	  This change makes it easier to write assertions in schema
	  documents without a namespace which are intended to be
	  included by schema documents with varying target namespaces.
	 </div></li><li><div class="p">Section <a href="#vsc_failure" shape="rect">Identifying how to react to failure (&#167;C.2.5)</a> has now been added,
	defining the terms <b>error</b> and <b>continue</b>
	for use in specifying what a processor does or should do 
	when it seeks components for a given namespace in a given location 
	but fails to find them there.</div></li><li><div class="p">Schema processors are now explicitly recommended to provide
	a user option to control whether the processor attempts to
	dereference schema locations indicated in <code>schemaLocation</code>
	attributes in the instance document being validated; this resolves
	issue
	<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5476" shape="rect">5476
	 xsi:schemaLocation should be a hint, should be MAY not SHOULD</a>.</div></li><li><div class="p">The discussion of <code>schemaLocation</code> information in
       <a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a> has been revised to try to make clearer
       the motivation for recommending user control over whether
       schema locations specified in the document instance should
       or should not be dereferenced.  The new text describes some
       circumstances in which such schema locations typically should be
       dereferenced and some in which they should not, and attempts to
       set useful expectations for users and for implementors.
       These changes are intended to resolve issue 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6655" shape="rect">6655</a>,
       raised by the W3C Web Accessibility Initiative's 
       
       Protocols and
       Formats Working Group.
      </div></li><li><div class="p">The discussion of schema import in 
       <a href="#composition-importLicenseReferences" shape="rect">Licensing References to Components Across Namespaces (&#167;4.2.6.1)</a> now states more
       clearly that references to components in external
       namespaces are an error if the namespace is not imported;
       this change addresses issue 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5779" shape="rect">5779
       QName resolution and xs:import</a>.
      </div></li></ol></div></div><div class="div3">
<h4><a name="ch_misc_sub" id="ch_misc_sub" shape="rect"></a>G.1.16 Other substantive changes</h4><div class="block">Miscellaneous substantive changes:
     <ol class="enumar"><li><div class="p">The discussion of schema-validity assessment and the invocation
       of conforming processors has been revised; additional invocation
       patterns have been identified, and names have been given to
       the different methods of invoking a processor.</div></li><li><div class="p">When an element cannot be strictly validated because no
       element declaration or type definition is available 
       for it, fallback to lax validation (validating the element
       against the built-in type <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>) is now required;
       in earlier drafts of this document, fallback to lax validation
       was optional.</div></li><li><div class="p">The XML Representation Constraints no longer refer to the
	component level; this makes it possible to test a schema
	document in isolation to determine whether it conforms or
	fails to conform to these rules.</div></li><li><div class="p">The constraints on the XML representation of schemas have been
       reformulated to allow them to be checked on schema documents in
       isolation, rather than requiring knowledge of the rest of the schema
       into which they will be embedded.  The consequence is that
       some errors are caught not in the XML representation constraints
       but by having the XML mapping rules generate faulty components
       so that the error can be detected at the component level.
       These changes resolve issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6235" shape="rect">6235
       Restriction from xs:anySimpleType</a>.</div></li><li><div class="p">The <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element is now declared with open
       content in the schema for schema documents.  This change
       addressess issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5930" shape="rect">5930
       defaultOpenContent in the S4SD</a>.</div></li><li><div class="p">The setting <code>blockDefault="#all"</code> has been removed
       from the schema for schema documents; this change resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6120" shape="rect">6120
       Reconsider blockDefault=#all</a>.</div></li><li><div class="p">Namespace fixup is now explicitly required in some places where
       it is needed but was not mentioned before; these changes resolve
       issue 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6445" shape="rect">6445
       Namespace fixup and default namespace</a> and issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6465" shape="rect">6465
       Namespace fixup and inherited attributes</a>.</div></li></ol>
    </div></div><div class="div3">
<h4><a name="ch_clar" id="ch_clar" shape="rect"></a>G.1.17 Clarifications and editorial changes</h4><div class="block">Clarifications and other
      editorial changes:
     <ol class="enumar"><li><div class="p">Each named constraint is now given in a separate section, to
	simplify reference to them.</div></li><li><div class="p">The XML mapping rules have been reorganized to make them 
	more perspicuous.</div></li><li><div class="p">The keywords defined by <a href="#rfc-2119" shape="rect">[IETF RFC 2119]</a> to
	 designate different levels of requirement have been
	
	marked up to distinguish more
	 consistently between cases where their normative
	 meaning is
	intended (e.g.
	 "<span class="rfc2119">must</span>") and cases where the words are used in
	 its everyday sense without conformance implications (e.g.
	 "must").  See <a href="#intro-terminology" shape="rect">Documentation Conventions and Terminology (&#167;1.5)</a>.</div></li><li><div class="p">A note has been added, warning that
	the <b>replace</b> and <b>collapse</b> values
	for whitespace handling are not a reliable means of
	neutralizing the effects of word-wrapping and pretty-printing
	of natural-language data and should not be used for that
	purpose.</div></li><li><div class="p">Several minor corrections and
	clarifications have been made.  The usage of some technical
	terminology has been clarified, normalized, and aligned where
	appropriate with the usage in
	<a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a>.  Conditionals using
	"if" have been rephrased to use "if and
	 only if" where appropriate.</div></li><li><div class="p">The title of the specification has been changed, and the language
	defined here is referred to as XSD, not using the name
	"XML Schema".  This may help reduce confusion between
	the language defined here and the broader class of XML schema
	languages in general.
       </div></li><li><div class="p">Conformance-related language has been reviewed
	to avoid confusion between the conformance-related usage of
	the verbs <span class="rfc2119">may</span>, <span class="rfc2119">must</span>, and <span class="rfc2119">should</span>, and other usages.</div></li><li><div class="p">Various new terms have been defined, and some existing terms have
	been redefined, to reduce confusion and improve legibility.  In
	some cases, existing terms which were felt insufficiently
	informative have been replaced by new terms which may be more
	useful.
       </div></li><li><div class="p">Following the example of XQuery
	1.0 and XSLT 2.0, the terms "<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>" and
	"<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>" have been defined and the two
	concepts distinguished. The appendix contains lists both of
	<a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> and of <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> features.
       </div></li><li><div class="p">The term "context-determined-declaration" has been
       replaced with the term <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>; this resolves
       issue 
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=4690" shape="rect">4690
       Editorial: 'context-determined declarations' needs more work</a>.</div></li><li><div class="p">The namespace prefixes used to refer to well known namespaces
       have been changed and are now more consistent; this resolves issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=4316" shape="rect">4316
       Make sure namespace prefixes are used appropriately throughout
       structures</a>.</div></li><li><div class="p">Numerous small changes were made in the interests of clarity, 
       completeness, consistency, and precision, and to correct
       typographical errors.  These changes
       resolve a number of issues, including:
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5140" shape="rect">5140
       small editorial changes section 3.3</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5148" shape="rect">5148
       inconsistent target ns description</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5639" shape="rect">5639
       when is value V a valid restriction of value Y?</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5800" shape="rect">5800
       Possibly revise list of required infoset properties</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5916" shape="rect">5916
       Obsolete editorial note</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5917" shape="rect">5917
        Typo in 3.1.1</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5934" shape="rect">5934
       Typo concerning &lt;simpleContent mixed="true"&gt;</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6011" shape="rect">6011
       [schema11] base URI comments</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6156" shape="rect">6156
       Typo in 3.4.2</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6162" shape="rect">6162
       &lt;anyAttribute&gt; allows ##definedSibling</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6165" shape="rect">6165
       Constraints on XML representation of anyAttribute</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6166" shape="rect">6166
       Schema Component Model for Wildcards</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6167" shape="rect">6167
       Attribute Wildcard Intersection</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6170" shape="rect">6170
       Wildcards and defaultAttributes</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6175" shape="rect">6175
       Wildcard overlap</a>;
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6227" shape="rect">6227
       Type Derivation OK (simple)</a>; and
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=6233" shape="rect">6233
       Wrong pointer for [nil] PSVI property</a>.
      </div></li><li><div class="p">
       Discussions of global components now 
       <a href="#anchor5918" shape="rect">take &lt;redefine&gt; into account</a> (addresses
       issue <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5918" shape="rect">5918
       Top level declarations</a>).</div></li><li><div class="p">The usage of "<a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>", 
       "<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>", and related terms has been clarified
       and made more consistent.
      </div></li><li><div class="p"><a name="anchor10236" id="anchor10236" shape="rect"></a>It has been clarified that fields of
      identity constraint definitions can have complex types with simple
      content.
      </div></li></ol>
    </div></div></div><div class="div2">
<h3><span class="nav"><a href="#done" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="issues" id="issues" shape="rect"></a>G.2 Issues not resolved</h3><p>It may be useful
      to mention some points 
      where possible changes to the
      specification have been discussed, but on which no changes have,
      in the end, been made.  In some cases, this resulted from the
      XML Schema Working Group's determination that no change was
      desirable; in other cases, there was no consensus on the
      desirability of change, or no consensus on what change should
      be made.
     </p><ol class="enumar"><li><div class="p">As noted above, some restrictions on <b><i>all</i></b> groups have
       been relaxed; <b><i>all</i></b> groups, however, must still be
       top-level groups; they are not allowed to appear within
       sequences or choice groups.</div></li><li><div class="p">The namespace-related properties of the basic infoset are
       <a href="#term-ns-fixup" class="termref" shape="rect"><span class="arrow">&#183;</span>fixed up<span class="arrow">&#183;</span></a> when 
       attributes with qualified names are assigned default values.</div><div class="p">
       Other kinds of infoset fixup, however, are still not performed.
       Attributes of type <code>ID</code>, <code>IDREF</code>, 
       <code>IDREFS</code>, and <code>NOTATION</code> do not have
       the same effect on the base infoset as they do if declared
       in a DTD.  (An infoset-to-infoset transformation can be
       used to migrate the appropriate information into the base
       infoset.)</div></li><li><div class="p">Some existing implementations (and specifications) assume that
       elements of type <code>xs:ID</code> uniquely identify themselves,
       instead of uniquely identifying their parent.  This version of
       this specification reaffirms the existing rule, which is that
       elements and attributes of type <code>xs:ID</code> uniquely
       identify the parent element of the ID attribute or element.
      </div></li><li><div class="p">The identity of components is still underspecified (although
       a number of points have been clarified, e.g. by the specification
       of the {scope} property), with the 
       result that some schemas can be interpreted either as conformant
       or as non-conformant, depending on the interpretation of 
       the specification's appeals to component identity.</div></li><li><div class="p">The constraint <a href="#cos-element-consistent" shape="rect">Element Declarations Consistent (&#167;3.8.6.3)</a> 
       has been recast, but not at the higher level of abstraction
       originally required and expected.</div></li><li><div class="p">The account of schema composition given here has not
       eliminated all the uncertainties present in XSD 1.0;
       edge cases remain which different conformant implementations
       will treat differently.</div></li><li><div class="p">A systematic tabulation of error conditions and definition of
       a new system of error codes was originally foreseen for XSD
       1.1, but has not been completed for inclusion here. No further work in this area is
	currently anticipated.
      </div></li></ol></div></div><div class="div1">
<h2><a name="normative-glossary" id="normative-glossary" shape="rect"></a>H Glossary (non-normative)</h2><p>The listing below is for the benefit of readers of a printed version of this
document:  it collects together all the definitions which appear in the
document above.</p><dl><dt><a href="#key-L.ed" shape="rect">L(D)</a></dt>
<dd>
For any <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>D</var>, the language 
<b><var>L</var>(<var>D</var>)</b> <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>D</var> 
is the set of all sequences of
length 1 whose sole member is an element information item which
<a href="#key-e-d-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <var>D</var>.</dd>
<dt><a href="#key-L.w" shape="rect">L(W)</a></dt>
<dd>
For any <a href="#w" class="compref" shape="rect">Wildcard</a> <var>W</var>, the language
<b><var>L</var>(<var>W</var>)</b> <a href="#key-accept" class="termref" shape="rect"><span class="arrow">&#183;</span>accepted<span class="arrow">&#183;</span></a> by <var>W</var>
is the set of all sequences of
length 1 whose sole member is an element information item which
<a href="#key-wc-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <var>W</var>.</dd>
<dt><a href="#gloss-NCName" shape="rect">NCName</a></dt>
<dd>An <b>NCName</b> is
a name with no colon, as defined in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>.  When used in connection with the XML
representation of schema components in this specification, this refers
to the simple type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#NCName" shape="rect">NCName</a> as defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a></dd>
<dt><a href="#gloss-QName" shape="rect">QName</a></dt>
<dd>A <b>QName</b> is a
name with an optional namespace qualification, as defined in <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a>.  When used in connection with the XML
representation of schema components or references to them, this refers
to the simple type <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a>
as defined in <a href="#ref-xsp2" shape="rect">[XML Schema: Datatypes]</a></dd>
<dt><a href="#gloss-cos" shape="rect">Schema Component   Constraint</a></dt>
<dd>Constraints on the schema components themselves,
	 i.e. conditions components <span class="rfc2119">must</span> satisfy to be components at
	 all. They are located
  
  in the sixth sub-section of the per-component
	 sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in
	 <a href="#outcome-cos" shape="rect">Schema Component Constraints (&#167;B.4)</a></dd>
<dt><a href="#gloss-sic" shape="rect">Schema Information Set   Contribution</a></dt>
<dd>Augmentations to <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>s expressed by schema
	 components, which follow as a consequence of 
	  <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.
	 They are located
   in the fifth
	 sub-section of the per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in <a href="#PSVI_contributions" shape="rect">Contributions to the post-schema-validation infoset (&#167;B.2)</a></dd>
<dt><a href="#gloss-src" shape="rect">Schema Representation   Constraint</a></dt>
<dd>Constraints on the representation of schema
	 components in XML beyond those which are expressed in
	 <a href="#normative-schemaSchema" shape="rect">Schema for Schema Documents (Structures) (normative) (&#167;A)</a>.
  They are located
   in the
	 third sub-section of the per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and tabulated in <a href="#outcome-src" shape="rect">Schema Representation Constraints (&#167;B.3)</a></dd>
<dt><a href="#key-typeDefinitionHierarchy" shape="rect">Type  Definition Hierarchy</a></dt>
<dd>Except for  <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, every <a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a> is, by construction,
	either a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> or an
	<a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> of some
	other type definition. The exception
	<a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> is a <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of itself.
	With the exception of the loop on <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, the
         graph of these relationships forms
	a tree known as the <b>Type Definition
	Hierarchy</b> with <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> as its
	root</dd>
<dt><a href="#gloss-cvc" shape="rect">Validation   Rules</a></dt>
<dd>Contributions to <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> associated with schema
	 components. They are located
  
  in the fourth sub-section of the
	 per-component sections of <a href="#components" shape="rect">Schema Component Details (&#167;3)</a> and
	 tabulated in <a href="#validation_failures" shape="rect">Validation Rules (&#167;B.1)</a></dd>
<dt><a href="#key-fullyConforming" shape="rect">Web-aware</a></dt>
<dd><b>Web-aware</b> processors are
      network-enabled processors which are not only 
      <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a> but
      which additionally <span class="rfc2119">must</span> be capable of accessing schema
      documents from the World Wide Web as described in <a href="#web-representation" shape="rect">Representation of Schemas on the World Wide Web (&#167;2.8)</a> and <a href="#schema-loc" shape="rect">How schema definitions are located on the Web (&#167;4.3.2)</a>.
     </dd>
<dt><a href="#key-schema" shape="rect">XSD schema</a></dt>
<dd> An <b>XSD schema</b> is a set of <a href="#c" class="termref" shape="rect"><span class="arrow">&#183;</span>schema components<span class="arrow">&#183;</span></a></dd>
<dt><a href="#key-null" shape="rect">absent</a></dt>
<dd>Throughout this
       specification, the term <b>absent</b> is used as a
       distinguished property value denoting absence</dd>
<dt><a href="#key-accept-g" shape="rect">accept</a></dt>
<dd>A model group <var>G</var> is said to <b>accept</b>
	or <b>recognize</b> the members of <var>L</var>(<var>G</var>).</dd>
<dt><a href="#key-accept" shape="rect">accept</a></dt>
<dd>A particle <var>P</var> is said to
	<b>accept</b> or <b>recognize</b> the members of
	<var>L</var>(<var>P</var>).  Similarly, a term <var>T</var>
	 <b>accepts</b> or <b>recognizes</b> the members
       of <var>L</var>(<var>T</var>).</dd>
<dt><a href="#key-vv" shape="rect">actual value</a></dt>
<dd>With reference to any 
	string, interpreted as denoting
	an instance of a given datatype, the term 
	<b>actual value</b> denotes the value to which the
	<a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-lexical-mapping" shape="rect">lexical mapping</a> of that datatype maps the string.
              
      </dd>
<dt><a href="#std-ancestor" shape="rect">ancestor</a></dt>
<dd>The
<b>ancestors</b> of a 
<a href="#td" class="termref" shape="rect"><span class="arrow">&#183;</span>type definition<span class="arrow">&#183;</span></a> are its 
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and the 
<a href="#std-ancestor" class="termref" shape="rect"><span class="arrow">&#183;</span>ancestors<span class="arrow">&#183;</span></a> of its 
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</dd>
<dt><a href="#key-am-set" shape="rect">annotation mapping</a></dt>
<dd>The <b>annotation
mapping</b> of a set of element information items <var>ES</var>
is a sequence of annotations <var>AS</var>, with the following properties:
<div class="constraintlist"><div class="clnumber">1<a id="gl-am-set-exp.ann" name="gl-am-set-exp.ann" shape="rect"> </a><span class="p">
For every <a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element information item among the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of any element information item in <var>ES</var>, there
is a corresponding <a href="#a" class="compref" shape="rect">Annotation</a> component in <var>AS</var>.
</span><div class="note"><div class="p"><b>Note:</b> As noted above,
the <a href="#a-attributes" class="propref" shape="rect">{attributes}</a> property of
each <a href="#a" class="compref" shape="rect">Annotation</a> component includes 
all
the attribute information items on the
<a href="#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> element itself, on the
XML element which represents (and maps to) the
component being annotated, and on any intervening
XML elements, if those attribute information items
have <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a>s 
different from the XSD namespace.</div></div></div>
<div class="clnumber">2<a id="gl-am-set-imp.ann" name="gl-am-set-imp.ann" shape="rect"> </a><!--* no span class='p' possible here *-->
If any element information item <var>E</var> in <var>ES</var> has any attribute information items
<var>A</var> such that
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">2.1 <span class="p"><var>A</var> is in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</span></div>
<div class="clnumber">2.2 <span class="p"><var>A</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace name]</a>
is present and not the XSD namespace.</span></div>
<div class="clnumber">2.3 <span class="p"><var>A</var> is not included in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> property 
of any annotation component described in 
clause <a href="#am-set-exp.ann" shape="rect">1</a>.
</span></div>
</div>
then for each such <var>E</var>, an <a href="#a" class="compref" shape="rect">Annotation</a> component
<var>C</var> will appear in <var>AS</var>, with
<var>C</var>.<a href="#a-application_information" class="propref" shape="rect">{application information}</a>
and
<var>C</var>.<a href="#a-user_information" class="propref" shape="rect">{user information}</a>
each being the empty sequence and
<var>C</var>.<a href="#a-attributes" class="propref" shape="rect">{attributes}</a>
containing all and only those attribute information
items <var>A</var> among <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>.</div>
<div class="clnumber">3 <span class="p">
<var>AS</var> contains no other <a href="#a" class="compref" shape="rect">Annotation</a> components.</span></div>
</div>
</dd>
<dt><a href="#key-am-one" shape="rect">annotation mapping</a></dt>
<dd>The <b>annotation
mapping</b> of a single element information item is the
<a href="#key-am-set" class="termref" shape="rect"><span class="arrow">&#183;</span>annotation mapping<span class="arrow">&#183;</span></a> of the singleton set containing that
element.</dd>
<dt><a href="#key-anyAtomicType" shape="rect">anyAtomicType</a></dt>
<dd>There is a further special datatype
	called <b><b><i>anyAtomicType</i></b></b>, a
	<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of
	<a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a>, which is the <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type definition<span class="arrow">&#183;</span></a>
	of all the primitive 
	datatypes.</dd>
<dt><a href="#key-anySimpleType" shape="rect">anySimpleType</a></dt>
<dd>A
	 special <a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of 
	 <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>, whose name is 
	 <b><b><i>anySimpleType</i></b></b> in the
	 XSD namespace, is the root of the <a href="#key-typeDefinitionHierarchy" class="termref" shape="rect"><span class="arrow">&#183;</span>Type  Definition Hierarchy<span class="arrow">&#183;</span></a> for all simple type
	 definitions. <a href="#key-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> has a lexical space containing 
	 all sequences of characters in the Universal Character 
	 Set (UCS) and a value space containing all 
	 <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-atomic" shape="rect">atomic values</a>
	 and all finite-length lists of 
	 <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-atomic" shape="rect">atomic values</a>.</dd>
<dt><a href="#key-va" shape="rect">assessment</a></dt>
<dd> the word <b>assessment</b>
      is used to refer to the overall process of local validation,
      recursive determination of
       validation outcome, and infoset augmentation, i.e. as a short form for
       "<a href="#key-s-v-a" class="termref" shape="rect"><span class="arrow">&#183;</span>schema-validity assessment<span class="arrow">&#183;</span></a>"</dd>
<dt><a href="#key-assessor" shape="rect">assessor</a></dt>
<dd>A <b>schema-validity
       assessor</b> (or just <b>assessor</b>)
      is a processor which performs full or partial
      <a href="#key-s-v-a" class="termref" shape="rect"><span class="arrow">&#183;</span>schema-validity assessment<span class="arrow">&#183;</span></a> of an XML instance document,
      element information item, or attribute information item,
      with
      reference to a conforming schema, and provides access to the
      entirety of the resulting <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
      The means by which an <a href="#key-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>assessor<span class="arrow">&#183;</span></a> provides
      access to the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>. </dd>
<dt><a href="#key-att-to" shape="rect">attributed to</a></dt>
<dd>
     During <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of an element
     information item against its (complex) <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>,
     associations 
     between element and attribute information items among the
     <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> on the one hand, and the attribute uses,
     attribute wildcard, particles
     and open contentproperty record  on the other, are
     established. The element or attribute information item is
     <b>attributed to</b> the corresponding component.
    </dd>
<dt><a href="#key-automatic" shape="rect">automatically known</a></dt>
<dd>
	A type about which a processor possesses prior knowledge, and 
	which the processor can support without any declaration of the
	type being supplied by the user, is said to be <b>automatically known</b>
	to the processor.	
       </dd>
<dt><a href="#key-baseparticle" shape="rect">base         particle</a></dt>
<dd>Let the <b>base particle</b> be
		      the particle of the <a href="#ctd-content_type" class="propref" shape="rect">{content type}</a> of the 
		      
		      <a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</dd>
<dt><a href="#key-base-infoset-props" shape="rect">base information set properties</a></dt>
<dd>By <b>base information set properties</b>
	  are meant the properties listed in
	  <a href="#infoset" shape="rect">Required Information Set Items and Properties (normative) (&#167;D)</a>.
	  </dd>
<dt><a href="#key-baseTypeDefinition" shape="rect">base type definition</a></dt>
<dd>The type definition used as the basis
	for an <a href="#key-typeExtension" class="termref" shape="rect"><span class="arrow">&#183;</span>extension<span class="arrow">&#183;</span></a> or
	<a href="#key-typeRestriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> is
	known as the <b>base type definition</b> of that
	definition</dd>
<dt><a href="#key-basic-particle" shape="rect">basic particle</a></dt>
<dd>A <b>basic
	  particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a <a href="#key-basic-term" class="termref" shape="rect"><span class="arrow">&#183;</span>basic term<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#key-basic-term" shape="rect">basic term</a></dt>
<dd>A
	 <b>basic term</b> is an <a href="#ed" class="compref" shape="rect">Element Declaration</a> or a
	 <a href="#w" class="compref" shape="rect">Wildcard</a>.</dd>
<dt><a href="#key-compete" shape="rect">compete</a></dt>
<dd>Two
<a href="#p" class="compref" shape="rect">Particles</a> <var>P</var><sub>1</sub> and <var>P</var><sub>2</sub> contained in some <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var>
<b>compete</b> with each other if and only if some sequence <var>S</var>
of element information items has two <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> in <var>P</var> which are
identical except that one path has <var>P</var><sub>1</sub> as its last item and the other
has <var>P</var><sub>2</sub>.</dd>
<dt><a href="#key-competing-paths" shape="rect">competing paths</a></dt>
<dd>Two
(or more) <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>paths<span class="arrow">&#183;</span></a> of a sequence <var>S</var> in a <a href="#p" class="compref" shape="rect">Particle</a> <var>P</var>
are <b>competing paths</b> if and only if
they are identical except for their final items, which 
differ.</dd>
<dt><a href="#key-complete-path" shape="rect">complete path</a></dt>
<dd>For
a model group <var>M</var> and a sequence <var>S</var> in <var>L</var>(<var>M</var>), the path
of <var>S</var> in <var>M</var> is a <b>complete path</b>; prefixes of
complete paths which are themselves not complete paths
are <b>incomplete paths</b>.</dd>
<dt><a href="#key-compName" shape="rect">component name</a></dt>
<dd>Declarations
      and definitions <span class="rfc2119">may</span> and in
       some cases <span class="rfc2119">must</span> have and be identified by
      <b>name</b>s, which are 
       NCNames as defined by <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a></dd>
<dt><a href="#key-cta-select" shape="rect">conditionally selects</a></dt>
<dd> Given a <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T</var> and an element
	information item <var>E</var>, <var>T</var> <b>conditionally selects</b> a
	type <var>S</var> for <var>E</var> in 
	 the following way. The <a href="#tac-test" class="propref" shape="rect">{test}</a>
	 expressions in <var>T</var>'s <a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> are evaluated, in order,
	 until one of the <a href="#tac" class="compref" shape="rect">Type Alternative</a>s <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition for <var>E</var>, or until
	 all have been tried without success.  If any
	 <a href="#tac" class="compref" shape="rect">Type Alternative</a> <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition, none of the following
	 <a href="#tac" class="compref" shape="rect">Type Alternative</a>s are tried. Then the type <var>S</var> <b>conditionally
	  selected</b> for <var>E</var> by <var>T</var> is
	as described in
	
       the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="gl-hack-to-force-template-match-2" name="gl-hack-to-force-template-match-2" shape="rect"> </a><span class="p">
	  If at least one <a href="#tac" class="compref" shape="rect">Type Alternative</a> in <var>T</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a>
	  <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a> a type definition for <var>E</var>, then <var>S</var>
	  is the type definition selected by the first such <a href="#tac" class="compref" shape="rect">Type Alternative</a>.
	 </span></div><div class="clnumber">2 <span class="p">
	  If no <a href="#tac" class="compref" shape="rect">Type Alternative</a> in <var>T</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> <a href="#key-cta-ta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>successfully selects<span class="arrow">&#183;</span></a>
	  a type definition, then <var>S</var> is 
	   <var>T</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a>.
	 </span></div></div>
      </dd>
<dt><a href="#key-constructed" shape="rect">constructed</a></dt>
<dd>
       Datatypes can be <b>constructed</b> from other datatypes by
       <b><i>restricting</i></b> the value space or lexical space of a
       <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> using zero or more
       <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#f" class="compref" shape="rect">Constraining Facet</a>s, by specifying the new datatype as a <b><i>list</i></b>
       of items of some <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>,
       or by defining it as a <b><i>union</i></b> of some specified sequence of
       <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>.</dd>
<dt><a href="#key-contain-xgx" shape="rect">contains</a></dt>
<dd>A model group 
<b>contains</b> the components which it either
<a href="#key-contain-dgp" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>
or <a href="#key-contain-igx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly contains<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#key-contain-xpx" shape="rect">contains</a></dt>
<dd>A particle 
<b>contains</b> the components which it either
<a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>
or <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly contains<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#key-contentModel" shape="rect">content model</a></dt>
<dd>A
	particle can be used in a complex type definition to
	constrain the <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a> of
	the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of an element information item; such a
	particle is called a <b>content model</b></dd>
<dt><a href="#key-dd" shape="rect">context-determined declaration</a></dt>
<dd>
      During <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>, associations between
      element and attribute information items among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> and
      <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> on the one hand, and element and attribute declarations on
      the other, are also established. When an item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
      <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>, then it is associated with the declaration which is the
      <a href="#p-term" class="propref" shape="rect">{term}</a> of the particle. Similarly, when an
      attribute information item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an <a href="#au" class="compref" shape="rect">Attribute Use</a>,
      then the item is associated with the
      <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of that
      <a href="#au" class="compref" shape="rect">Attribute Use</a>. Such declarations are called the
      <b>context-determined declarations</b>.
     </dd>
<dt><a href="#key-declaration" shape="rect">declaration</a></dt>
<dd><b>declaration</b>
      components are associated by (qualified) name to information items
      being <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a></dd>
<dt><a href="#key-vde" shape="rect">declared entity name</a></dt>
<dd>A string is a
  <b>declared entity name</b> if and only if it is equal to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed" class="xpropref" shape="rect">[name]</a> 
  of some unparsed entity information item in the value of the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.document" class="xpropref" shape="rect">[unparsedEntities]</a> 
  property of the document information item at the root of the infoset
  containing the element or attribute information item whose <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a>
  the string is.</dd>
<dt><a href="#key-dft-binding" shape="rect">default binding</a></dt>
<dd>
    When a sequence of  element information items <b>ES</b> 
    is <a href="#loc-locallyValid-seq" class="termref" shape="rect"><span class="arrow">&#183;</span>locally valid<span class="arrow">&#183;</span></a>
    with respect to a 
    <a href="#ct" class="compref" shape="rect">Content Type</a> <b>CT</b>
    or when a set of attribute information items
    <b>AS</b> satisfies clause <a href="#c-aam" shape="rect">2</a> and clause <a href="#c-ra" shape="rect">3</a>
    of <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> with respect to a <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>,
    there is a (partial) functional mapping from
    the element information items <var>E</var> in the sequence <var>ES</var>
    or the attribute information items in
    <var>AS</var>
    to a <b>default binding</b> for the item,
    where the default binding is 
    an <a href="#ed" class="compref" shape="rect">Element Declaration</a>, 
    an <a href="#au" class="compref" shape="rect">Attribute Use</a>,
    or one
    of the keywords <b><i>strict</i></b>, <b><i>lax</i></b>, or <b><i>skip</i></b>,
    as follows:
    <div class="constraintlist"><div class="clnumber">1 <span class="p">When the item has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>, the 
       default binding is that <a href="#ed" class="compref" shape="rect">Element Declaration</a>.</span></div>
<div class="clnumber">2 <span class="p">
      When the item has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and it is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
      <a href="#au" class="compref" shape="rect">Attribute Use</a>, the default binding is 
      that <a href="#au" class="compref" shape="rect">Attribute Use</a>.
     </span></div>
<div class="clnumber">3 <span class="p">
      When the item has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> and it is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to an
      attribute wildcard, the default binding is 
      an <a href="#au" class="compref" shape="rect">Attribute Use</a> whose
      <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> is the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>,
      whose <a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>, and
      whose <a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a> is the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>'s
      <a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a> (the other properties in the
      <a href="#au" class="compref" shape="rect">Attribute Use</a> are not relevant).
     </span></div>
<div class="clnumber">4 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>strict</i></b>
       <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
       or an <a href="#oc" class="compref" shape="rect">Open Content</a>
       with a <b><i>strict</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> and 
       it does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> or
       a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>, then
       the default binding is the keyword <b><i>strict</i></b>.</span></div>
<div class="clnumber">5 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>lax</i></b>
       <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
       or an <a href="#oc" class="compref" shape="rect">Open Content</a>
       with a <b><i>lax</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> and 
       it does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> or
       a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>, then
       the default binding is 
       
       the keyword <b><i>lax</i></b>.</span></div>
<div class="clnumber">6 <span class="p">When the item is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b>
       <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> or attribute wildcard
       or an <a href="#oc" class="compref" shape="rect">Open Content</a>
       with a <b><i>skip</i></b> <a href="#w" class="compref" shape="rect">Wildcard</a> then
       the default binding is the keyword
       
       <b><i>skip</i></b>.</span></div>
</div>
   </dd>
<dt><a href="#key-dflt-att" shape="rect">defaulted attribute</a></dt>
<dd>A
	<b>defaulted attribute</b> 
	belonging to an element information item <var>E</var>
	 <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governed by<span class="arrow">&#183;</span></a> a complex type <var>T</var>
	is any <a href="#au" class="compref" shape="rect">Attribute Use</a> 
	<var>U</var>
	
	for which
	<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
	   <var>U</var> is a member of <var>T</var>.<a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>.
	  </span></div>
<div class="clnumber">2 <span class="p">
	   <var>U</var>.<a href="#au-required" class="propref" shape="rect">{required}</a> = <b><i>false</i></b>.
	  </span></div>
<div class="clnumber">3 <span class="p">
	   <var>U</var>'s <a href="#key-evc" class="termref" shape="rect"><span class="arrow">&#183;</span>effective value constraint<span class="arrow">&#183;</span></a> is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	  </span></div>
<div class="clnumber">4 <span class="p">
	   <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> is not one
	   of the <a href="#ad" class="compref" shape="rect">Attribute Declaration</a>s from <a href="#builtin-ads" shape="rect">Built-in Attribute Declarations (&#167;3.2.7)</a>.
	  </span></div>
<div class="clnumber">5 <span class="p">
	   <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> does not match
	   any of the 
	   attribute information items in <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> 
	   as per clause <a href="#c-ctma" shape="rect">2.1</a> of
	   <a href="#cvc-complex-type" shape="rect">Element Locally Valid (Complex Type) (&#167;3.4.4.2)</a> above.
	  </span></div>
</div>
       </dd>
<dt><a href="#key-definition" shape="rect">definition</a></dt>
<dd><b>definition</b> components define internal
      schema components that can be used in other schema
      components</dd>
<dt><a href="#key-anyType" shape="rect">definition of anyType</a></dt>
<dd>A special complex type
	definition, (referred to in earlier versions of this
	 specification as 'the ur-type definition') whose
	name is <b><i>anyType</i></b> in the XSD namespace, is
	present in each <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. The <b>definition of
	 <b><i>anyType</i></b></b> serves as default
	type definition for element declarations whose XML
	representation does not specify one</dd>
<dt><a href="#key-derived" shape="rect">derived</a></dt>
<dd>
        If a type definition <var>D</var> can reach a type definition <var>B</var> by following
        its base type definition chain, then <var>D</var> is said to be
        <b>derived</b> from <var>B</var>.</dd>
<dt><a href="#key-contain-dgp" shape="rect">directly contains</a></dt>
<dd>A model group 
<b>directly contains</b> the particles in the value of its
<a href="#mg-particles" class="propref" shape="rect">{particles}</a> property.</dd>
<dt><a href="#key-contain-dpt" shape="rect">directly contains</a></dt>
<dd>A particle
<b>directly contains</b> the component which is the value of its
<a href="#p-term" class="propref" shape="rect">{term}</a> property.</dd>
<dt><a href="#key-evc" shape="rect">effective value constraint</a></dt>
<dd>
       The <b>effective value constraint</b> of an attribute use 
       <var>U</var>
       is <var>U</var>.<a href="#au-value_constraint" class="propref" shape="rect">{value constraint}</a>, if present, otherwise 
       <var>U</var>.<a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a>.<a href="#ad-value_constraint" class="propref" shape="rect">{value constraint}</a>, if present, 
       otherwise
       the <b>effective value constraint</b> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#key-ep" shape="rect">element particle</a></dt>
<dd>
An <b>element particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is an <a href="#ed" class="compref" shape="rect">Element Declaration</a>.
</dd>
<dt><a href="#key-equivalenceClass" shape="rect">element substitution  group</a></dt>
<dd>Through the  
	mechanism of <b>element substitution
	groups</b>, XSD provides a more powerful model
 than DTDs do
	supporting substitution of one named element for
	another</dd>
<dt><a href="#key-equiv-ta" shape="rect">equivalent type alternative</a></dt>
<dd>
Any <a href="#tac" class="compref" shape="rect">Type Alternative</a> is <b>equivalent</b> to itself.
Otherwise, any <a href="#tac" class="compref" shape="rect">Type Alternative</a> <var>T1</var> is <b>equivalent</b> 
to a different <a href="#tac" class="compref" shape="rect">Type Alternative</a>
<var>T2</var> if and only if 
<var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> and
<var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> are true for the same
set of input element information items
and 
<var>T1</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> and
<var>T2</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> accept
the same set of input information items as valid.
In the general case, equivalence and non-equivalence
can be difficult to establish.
It is <a href="#key-impl-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> under just what conditions a
processor detects that two type
alternatives are equivalent, but all
processors <span class="rfc2119">must</span> detect <var>T1</var> and <var>T2</var> as
equivalent if 
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
  <var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
  and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
  have the same number of <a href="#nb" class="compref" shape="rect">Namespace Binding</a>s, and for each entry in
  <var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
  there is a corresponding entry in
  <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-namespace_bindings" class="propref" shape="rect">{namespace bindings}</a>
  with the same <a href="#nb-prefix" class="propref" shape="rect">{prefix}</a> and <a href="#nb-namespace" class="propref" shape="rect">{namespace}</a>.
 </span></div>
<div class="clnumber">2 <span class="p">
  <var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a>
  and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-default_namespace" class="propref" shape="rect">{default namespace}</a>
  either are both <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or have the same value. 
 </span></div>
<div class="clnumber">3 <span class="p">
  <var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-base_URI" class="propref" shape="rect">{base URI}</a>
  and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-base_URI" class="propref" shape="rect">{base URI}</a>
  either are both <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or have the same value. 
 </span></div>
<div class="clnumber">4 <span class="p">
  <var>T1</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-expression" class="propref" shape="rect">{expression}</a>
  and <var>T2</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a>.<a href="#x-expression" class="propref" shape="rect">{expression}</a>
  have the same value. 
 </span></div>
<div class="clnumber">5 <span class="p">
  <var>T1</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> and
  <var>T2</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> are the same type definition.
 </span></div>
</div>
A processor <span class="rfc2119">may</span> treat two type alternatives as 
non-equivalent if they do not satisfy the conditions just
given and the processor does not detect that they
are nonetheless equivalent.
</dd>
<dt><a href="#key-equiv-tt" shape="rect">equivalent type table</a></dt>
<dd>
A <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T1</var> is <b>equivalent</b> to a <a href="#tt" class="compref" shape="rect">Type Table</a> <var>T2</var> 
if and only if <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
  <var>T1</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> has the same length as <var>T2</var>.<a href="#tt-alternatives" class="propref" shape="rect">{alternatives}</a> and their
  corresponding entries are <a href="#key-equiv-ta" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.
 </span></div>
<div class="clnumber">2 <span class="p">
  <var>T1</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a> and <var>T2</var>.<a href="#tt-default_type_definition" class="propref" shape="rect">{default type definition}</a> are
  <a href="#key-equiv-ta" class="termref" shape="rect"><span class="arrow">&#183;</span>equivalent<span class="arrow">&#183;</span></a>.
 </span></div>
</div></dd>
<dt><a href="#key-typeExtension" shape="rect">extension</a></dt>
<dd>A complex
	type definition which allows element or attribute content in
	addition to that allowed by another specified type definition
	is said to be an <b>extension</b></dd>
<dt><a href="#key-ct-final" shape="rect">final</a></dt>
<dd>the complex type is said to be
<b>final</b>, because no
further <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivations<span class="arrow">&#183;</span></a> are possible</dd>
<dt><a href="#dt-full_instance_subset" shape="rect">full instance subset</a></dt>
<dd>The 
<b>full instance subset</b> of the PSVI includes almost all
properties defined by this specification as applying to
element and attribute information items, but excludes 
schema components. It
consists of
the <a href="#dt-instance-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-validity subset<span class="arrow">&#183;</span></a>, 
plus the following properties for elements:</dd>
<dt><a href="#key-general-purpose" shape="rect">general-purpose</a></dt>
<dd>A <b>general-purpose</b> processor
      is a <a href="#key-validator" class="termref" shape="rect"><span class="arrow">&#183;</span>validator<span class="arrow">&#183;</span></a> or <a href="#key-assessor" class="termref" shape="rect"><span class="arrow">&#183;</span>assessor<span class="arrow">&#183;</span></a> which accepts schemas represented in the
      form of XML documents as described in <a href="#layer2" shape="rect">Layer 2: Schema Documents, Namespaces and Composition (&#167;4.2)</a>.
      </dd>
<dt><a href="#key-governing" shape="rect">governing</a></dt>
<dd>The declaration associated with an information
      item, if any, and with respect to which its validity is <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessed<span class="arrow">&#183;</span></a> in a given assessment episode
      is said to <b>govern</b> the item, or to be its
      <b>governing</b> element or attribute declaration.
      Similarly the type definition with respect to which the
      type-validity of an item is assessed is its
      <b>governing</b> type definition.</dd>
<dt><a href="#key-governing-ad" shape="rect">governing attribute declaration</a></dt>
<dd>
        In a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, 
        the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a> declaration of an attribute 
        (its <b>governing attribute declaration</b>)
        is the first of
        the following which applies:
        <div class="constraintlist"><div class="clnumber">1<a id="gl-c-ad" name="gl-c-ad" shape="rect"> </a><span class="p">A declaration which was stipulated by the processor (see
           <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2 <span class="p">Its <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined declaration<span class="arrow">&#183;</span></a>;</span></div>
<div class="clnumber">3<a id="gl-c-adbyr" name="gl-c-adbyr" shape="rect"> </a><span class="p">A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by its <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[local
            name]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[namespace
            name]</a>,
           provided the attribute
           is not 
           <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>
           and the processor has not
           stipulated a type definition at the start of <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a>.
          </span></div>
</div>
        
        If none of these applies, the attribute
        has no <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> (or, in equivalent words, the <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> is
        <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>).
       </dd>
<dt><a href="#key-governing-ed" shape="rect">governing element  declaration</a></dt>
<dd> The <b>governing element declaration</b> of
	an element information item <var>E</var>, 
	in a given schema-validity
	<a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is the first of the following
	which applies: 
	<div class="constraintlist"><div class="clnumber">1<a id="gl-elem-stipulated" name="gl-elem-stipulated" shape="rect"> </a><span class="p">A
	   declaration stipulated by the processor (see <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2<a id="gl-elem-cdd" name="gl-elem-cdd" shape="rect"> </a><span class="p"><var>E</var>'s 
	   <a href="#key-dd" class="termref" shape="rect"><span class="arrow">&#183;</span>context-determined
	    declaration<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">3<a id="gl-elem-wc-split" name="gl-elem-wc-split" shape="rect"> </a><span class="p">A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a>
	   to by <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[local name]</a>
	   and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace
	    name]</a>, provided that <var>E</var>
	   is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> either to a <b><i>strict</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>
	   or to a <b><i>lax</i></b> <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>. 
	  </span></div>
<div class="clnumber">4<a id="gl-elem-wc" name="gl-elem-wc" shape="rect"> </a><!--* no span class='p' possible here *-->A declaration <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolved<span class="arrow">&#183;</span></a> to by 
	   <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[local 
	    name]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace 
	    name]</a>, provided  that
	    <b>none</b> of the following is true:
	   <div class="constraintlist"><div class="clnumber">4.1<a id="gl-no-id-if-skipped" name="gl-no-id-if-skipped" shape="rect"> </a><span class="p"><var>E</var> is 
        <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a> </span></div>
<div class="clnumber">4.2 <span class="p">the
	      processor has stipulated a type definition  for
	       <var>E</var> </span></div>
<div class="clnumber">4.3 <span class="p">a <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>

	      
	      <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> exists for 
	      <var>E</var></span></div>
</div> 
	  </div>
</div> 
       
       If none of these
       applies,
	 <var>E</var> has
	no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> (or, in equivalent words, 
	 <var>E</var>'s <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>). </dd>
<dt><a href="#key-governing-type-elem" shape="rect">governing type        definition</a></dt>
<dd> The <b>governing type definition</b> of an
       element information item <var>E</var>, 
	in a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is the first of the following which
       applies: <div class="constraintlist"><div class="clnumber">1<a id="gl-stipulated-plus-xsitype" name="gl-stipulated-plus-xsitype" shape="rect"> </a><span class="p">An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> a type
	   definition stipulated by the processor (see <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2<a id="gl-stipulated" name="gl-stipulated" shape="rect"> </a><span class="p">A type definition stipulated by the processor (see
	   <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">3<a id="gl-governing-plus-xsitype" name="gl-governing-plus-xsitype" shape="rect"> </a><span class="p">An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>.</span></div>
<div class="clnumber">4<a id="gl-gov-no-xsitype" name="gl-gov-no-xsitype" shape="rect"> </a><span class="p">The <a href="#key-selected-type" class="termref" shape="rect"><span class="arrow">&#183;</span>selected type definition<span class="arrow">&#183;</span></a> of <var>E</var>.</span></div>
<div class="clnumber">5 <span class="p">The value <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>
	   if <var>E</var> is <a href="#key-skipped" class="termref" shape="rect"><span class="arrow">&#183;</span>skipped<span class="arrow">&#183;</span></a>. </span></div>
<div class="clnumber">6 <span class="p"> An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> which <a href="#key-overrides" class="termref" shape="rect"><span class="arrow">&#183;</span>overrides<span class="arrow">&#183;</span></a> the <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>. </span></div>
<div class="clnumber">7 <span class="p">The <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">8 <span class="p">An
	  <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a>.</span></div>
</div> 
	If none of these
    applies,
    there is no
       <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> (or, in equivalent words, it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>). </dd>
<dt><a href="#key-governing-type-att" shape="rect">governing type definition</a></dt>
<dd>
        The <b>governing type definition</b> of an
        attribute, in a given schema-validity <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> episode, is 
       the first of the following which applies:
       <div class="constraintlist"><div class="clnumber">1 <span class="p">A type definition stipulated by the processor (see
          <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>).</span></div>
<div class="clnumber">2 <span class="p">The <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> of the
         <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>.</span></div>
</div>
       If neither of these applies, there is no
       <a href="#key-governing-type-att" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type definition<span class="arrow">&#183;</span></a> (or, in equivalent words, it is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>).
      </dd>
<dt><a href="#key-grouping" shape="rect">grouping</a></dt>
<dd>A
<b>grouping</b> of a sequence is a set of sub-sequences, some or
all of which may be empty, such that each member of the original
sequence appears once and only once in one of the sub-sequences and
all members of all sub-sequences are in the original
sequence.</dd>
<dt><a href="#key-impl-defined" shape="rect">implementation-defined</a></dt>
<dd>An <b>implementation-defined</b> 
  feature or behavior <span class="rfc2119">may</span> vary among processors conforming to this 
  specification; the precise behavior is not specified by
  this specification but <span class="rfc2119">must</span> be specified by the
  implementor for each particular conforming implementation.</dd>
<dt><a href="#key-impl-dep" shape="rect">implementation-dependent</a></dt>
<dd>An <b>implementation-dependent</b> 
  feature or behavior <span class="rfc2119">may</span> vary among processors conforming to this 
  specification; the precise behavior is not specified by
  this or any other W3C specification
  and is not required to be specified by the implementor 
  for any particular implementation.</dd>
<dt><a href="#key-impl-cont" shape="rect">implicitly contains</a></dt>
<dd>A list
of particles <b>implicitly contains</b> an element declaration if and only if a
member of the list contains that
element declaration in its <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a></dd>
<dt><a href="#key-contain-igx" shape="rect">indirectly contains</a></dt>
<dd>A model group 
<b>indirectly contains</b> the particles, groups, wildcards, and
element declarations which are <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a> 
by the particles it
<a href="#key-contain-dgp" class="termref" shape="rect"><span class="arrow">&#183;</span>directly contains<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#key-contain-ipx" shape="rect">indirectly contains</a></dt>
<dd>A particle 
<b>indirectly contains</b> the particles, groups, wildcards, and
element declarations which are contained by the value of its
<a href="#p-term" class="propref" shape="rect">{term}</a> property.</dd>
<dt><a href="#key-iv" shape="rect">initial value</a></dt>
<dd>the
<b>initial value</b> of some
attribute information item is the value of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute" class="xpropref" shape="rect">[normalized
value]</a> property of that item.  Similarly, the <b>initial value</b> of an element information item is the string composed of, in order, the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.character" class="xpropref" shape="rect">[character code]</a> of each character information item in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of that
element information item</dd>
<dt><a href="#key-itd" shape="rect">instance-specified type        definition</a></dt>
<dd>An <b>instance-specified type definition</b>
       is a type definition associated with an element information
       item in the following way: <div class="constraintlist"><div class="clnumber">1<a id="gl-xsi-type-att" name="gl-xsi-type-att" shape="rect"> </a><span class="p">Among the element's attribute information items is one
	   named <code>xsi:type</code>.</span></div>
<div class="clnumber">2 <span class="p">The <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> of that attribute information item is a
	  qualified name <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with
	  respect to the built-in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#QName" shape="rect">QName</a> simple type, as
	  defined by <a href="#cvc-simple-type" shape="rect">String Valid (&#167;3.16.4)</a>. </span></div>
<div class="clnumber">3 <span class="p">The 
	   <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> (a <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a>)
	   <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a>
	  to a type definition.
	  It is this type definition which is the
	  <b>instance-specified type definition</b>.</span></div>
</div> </dd>
<dt><a href="#dt-instance-validity_subset" shape="rect">instance-validity subset</a></dt>
<dd>
The <b>instance-validity subset</b> of the PSVI consists of
the <a href="#dt-root-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>root-validity subset<span class="arrow">&#183;</span></a>, plus the following properties on elements,
wherever applicable:
</dd>
<dt><a href="#key-iso" shape="rect">item isomorphic to a component</a></dt>
<dd> by an <b>item isomorphic</b> to a component is meant
an information item whose type is equivalent to the component's, with
one property per property of the component, with the same name, and
value either the same atomic value, or an information item
corresponding in the same way to its component value, recursively, as
necessary</dd>
<dt><a href="#key-lva" shape="rect">laxly assessed</a></dt>
<dd>The schema validity of an element information item <var>E</var> is 
	said to be <b>laxly assessed</b> if and only if
	<b>both</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> has neither a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>
	   nor a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>.</span></div>
<div class="clnumber">2 <span class="p"><var>E</var> is locally
	   <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> with respect to 
	   <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a> as defined in
	   <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>, and the schema-validity of 
	   <var>E</var>'s <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> and <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> 
	   is assessed as described in clause <a href="#c-deepa" shape="rect">2</a> and clause <a href="#c-deepe" shape="rect">3</a> 
	   of <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>.</span></div>
</div>
       </dd>
<dt><a href="#key-ldtype" shape="rect">locally declared type</a></dt>
<dd>
	Every <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> determines a partial functional mapping from
	element or attribute
	information items (and their <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a>) to type
	definitions.  This mapping serves as a <b>locally declared type</b>
 for elements 
	and attributes which are allowed by
	the <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>.</dd>
<dt><a href="#key-ldt-att" shape="rect">locally declared type</a></dt>
<dd>
	For a given <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a> <var>CTD</var> and a given attribute
	information item <var>A</var>, the 
 <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
	<var>A</var> within <var>CTD</var> is
	the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="gl-dummy3" name="gl-dummy3" shape="rect"> </a><b>If </b>
	   <var>CTD</var> is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
	  , <b>then </b>
	   
	   <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	  </div><div class="clnumber">2 <b>If </b>
	   <var>A</var> has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as some
	   attribute declaration <var>D</var> which is the
	   <a href="#au-attribute_declaration" class="propref" shape="rect">{attribute declaration}</a> of some
	   <a href="#au" class="compref" shape="rect">Attribute Use</a> contained by <var>CTD</var>'s
	   <a href="#ctd-attribute_uses" class="propref" shape="rect">{attribute uses}</a>
	  , <b>then </b>
	   the <a href="#ad-type_definition" class="propref" shape="rect">{type definition}</a> of <var>D</var>.
	  </div><div class="clnumber">3 <b>otherwise </b>
	   the 
	   <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of <var>A</var> within 
	   <var>CTD</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
	  </div></div>
       </dd>
<dt><a href="#key-ldt-elem" shape="rect">locally declared type</a></dt>
<dd>
	
	For a given <a href="#ctd" class="compref" shape="rect">Complex Type Definition</a>
	<var>CTD</var> and a given element information item <var>E</var>, the
	
	
	<a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
	<var>E</var> within <var>CTD</var> is 
	the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1<a id="gl-dummy1" name="gl-dummy1" shape="rect"> </a><b>If </b>
	   <var>CTD</var> is <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>
	  , <b>then </b>
	   
	   <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
	  </div><div class="clnumber">2 <b>If </b>
	   <var>E</var>
	   has the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> as
	   some element declaration <var>D</var> which is <a href="#key-contain-xpx" class="termref" shape="rect"><span class="arrow">&#183;</span>contained<span class="arrow">&#183;</span></a> by <var>CTD</var>'s
	   content model, whether <a href="#key-contain-dpt" class="termref" shape="rect"><span class="arrow">&#183;</span>directly<span class="arrow">&#183;</span></a>, <a href="#key-contain-ipx" class="termref" shape="rect"><span class="arrow">&#183;</span>indirectly<span class="arrow">&#183;</span></a>, or <a href="#key-impl-cont" class="termref" shape="rect"><span class="arrow">&#183;</span>implicitly<span class="arrow">&#183;</span></a>
	  , <b>then </b>
	   the
	    declared <a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a> of <var>D</var>.
	   </div><div class="clnumber">3 <b>otherwise </b>
	   
	   the 
	    <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of
	    <var>E</var> within 
	    <var>CTD</var>.<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
	  </div></div>
       </dd>
<dt><a href="#loc-locallyValid-seq" shape="rect">locally valid</a></dt>
<dd>
     A sequence of element information items is <b>locally valid</b> with
     respect to a <a href="#ct" class="compref" shape="rect">Content Type</a> if and only if it satisfies
     <a href="#cvc-complex-content" shape="rect">Element Sequence Locally Valid (Complex Content) (&#167;3.4.4.3)</a> with respect to that <a href="#ct" class="compref" shape="rect">Content Type</a>.
    </dd>
<dt><a href="#key-lvip" shape="rect">locally valid</a></dt>
<dd>A sequence <var>S</var> of
element information items is <b>locally valid</b> against
a particle <var>P</var> if and only if 
<var>S</var> has a <a href="#key-vpath" class="termref" shape="rect"><span class="arrow">&#183;</span>validation-path<span class="arrow">&#183;</span></a> in <var>P</var>.  The set of all such 
sequences is written <var>V</var>(<var>P</var>).</dd>
<dt><a href="#key-e-d-match" shape="rect">match</a></dt>
<dd>
An element information item <var>E</var> <b>matches</b> an <a href="#ed" class="compref" shape="rect">Element Declaration</a> <var>D</var> if and only if
<b>one</b> of the following is true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> and <var>D</var> have the same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>,</span></div>
<div class="clnumber">2 <span class="p">The <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of <var>E</var> <a href="#cvc-resolve-instance" class="termref" shape="rect"><span class="arrow">&#183;</span>resolves<span class="arrow">&#183;</span></a> to an element
declaration <var>D</var><sub>2</sub> which is <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a>
for <var>D</var>.</span></div>
</div>

</dd>
<dt><a href="#key-en-match" shape="rect">match</a></dt>
<dd>An 
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> <var>E</var> <b>matches</b> an
<a href="#gloss-NCName" class="termref" shape="rect"><span class="arrow">&#183;</span>NCName<span class="arrow">&#183;</span></a> <var>N</var> and
a namespace name <var>NS</var> (or, equivalently, <var>N</var> and <var>NS</var> 
<b>match</b> <var>E</var>)
if and only if all of the following
are true:
<ul><li><div class="p">The local name of <var>E</var> is identical to <var>N</var>.</div></li><li><div class="p">Either the namespace name of <var>E</var> is identical to <var>NS</var>,
or else <var>E</var> has no namespace name (<var>E</var> is an unqualified
name) and <var>NS</var> is <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.</div></li></ul>
</dd>
<dt><a href="#key-wc-match" shape="rect">match</a></dt>
<dd>An element information item <var>E</var>
<b>matches</b> a <a href="#w" class="compref" shape="rect">Wildcard</a> <var>W</var> 
(or a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is <var>W</var>)
if and only if  <var>E</var>
is locally <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>valid<span class="arrow">&#183;</span></a> with respect to <var>W</var>, as defined in the validation rule
<a href="#cvc-wildcard" shape="rect">Item Valid (Wildcard) (&#167;3.10.4.1)</a>.
</dd>
<dt><a href="#key-ns-match" shape="rect">match</a></dt>
<dd>Two namespace
names <var>N</var><sub>1</sub> and <var>N</var><sub>2</sub> are said to <b>match</b> 
if and only if they are identical or both are <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a>.
</dd>
<dt><a href="#term-ns-fixup" shape="rect">namespace fixup</a></dt>
<dd>When
default values are supplied for attributes, <b>namespace fixup</b>
may be required, to ensure that the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a> includes 
the namespace bindings needed and maintains the consistency
of the namespace information in the infoset.  To perform
namespace fixup on an element information item <var>E</var> for
a namespace <var>N</var>:
<div class="constraintlist"><div class="clnumber">1 <span class="p">If the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var>

binds a prefix to <var>N</var>, no
namespace fixup is needed; the properties of <var>E</var> 
are not changed.</span></div>
<div class="clnumber">2 <span class="p">Otherwise, first select some prefix <var>P</var> which is not bound by
the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var> (the choice of
prefix 
is <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>).</span></div>
<div class="clnumber">3 <span class="p">Add an entry to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of <var>E</var> binding <var>P</var> to <var>N</var>.</span></div>
<div class="clnumber">4 <span class="p">Add a namespace attribute to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a> of <var>E</var>.</span></div>
<div class="clnumber">5 <!--* no span class='p' possible here *-->Maintain the consistency of the information set by adjusting
the namespace bindings on the descendants of <var>E</var>.  This may
be done in either of two ways:<div class="constraintlist"><div class="clnumber">5.1 <span class="p">Add the binding of <var>P</var> to <var>N</var> to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> of all
descendants of <var>E</var>, except where that binding is overridden 
by another binding for <var>P</var>.</span></div>
<div class="clnumber">5.2 <span class="p">Add to the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[namespace attributes]</a> of each child of <var>E</var> a namespace 
attribute which undeclares the binding for <var>P</var> (i.e. a
namespace attribute for prefix <var>P</var> whose <a href="#key-nv" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized value<span class="arrow">&#183;</span></a> 
is the empty string), unless that child already has a
namespace declaration for prefix <var>P</var>.
Note that this approach is possible
only if <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a> is in use,
rather than <a href="#ref-xml-namespaces-1.0" shape="rect">[Namespaces in XML 1.0]</a>.</span></div>
</div>
<div class="p">The choice between the two methods of maintaining
consistency in the information set is

<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.</div></div>
</div></dd>
<dt><a href="#key-nilled" shape="rect">nilled</a></dt>
<dd>An
       element information item <var>E</var> is <b>nilled</b> 
       with respect to some element declaration <var>D</var> if and only if 
       <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p"><var>E</var> has 
	   <code>xsi:nil</code> = <b><i>true</i></b>. </span></div>
<div class="clnumber">2 <span class="p"><var>D</var>.<a href="#ed-nillable" class="propref" shape="rect">{nillable}</a> = <b><i>true</i></b>. </span></div>
</div>
      </dd>
<dt><a href="#key-nv" shape="rect">normalized value</a></dt>
<dd>The
       <b>normalized value</b> of an element or attribute
       information item is an <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a> which has been normalized
       according to the value of the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a>, and the values of any other <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facets</a>, associated with the simple type definition used
       in its <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validation<span class="arrow">&#183;</span></a>.  The keywords for 
	whitespace normalization have the following meanings:
       <div class="glist"><div class="gitem"><div class="giLabel">preserve</div><div class="giDef"><div class="p">No normalization is done, the 
	   whitespace-normalized value
	   is the <a href="#key-iv" class="termref" shape="rect"><span class="arrow">&#183;</span>initial value<span class="arrow">&#183;</span></a></div></div></div><div class="gitem"><div class="giLabel">replace</div><div class="giDef"><div class="p">All occurrences of <code>#x9</code> (tab),
	   <code>#xA</code> (line feed) and <code>#xD</code> (carriage
	   return) are replaced with <code>#x20</code>
	   (space).</div></div></div><div class="gitem"><div class="giLabel">collapse</div><div class="giDef"><div class="p">Subsequent to the replacements specified above under
	   <b>replace</b>, contiguous sequences of
	   <code>#x20</code>s are collapsed to a single
	   <code>#x20</code>, and initial and/or final
	   <code>#x20</code>s are deleted.</div></div></div></div> 
       Similarly, the
	<b>normalized value</b> of any string with respect to a
	given simple type definition is the string resulting from
	normalization using the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#rf-whiteSpace" shape="rect">whiteSpace facet</a>
	and any other <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-pre-lexical" shape="rect">pre-lexical facets</a>, associated with that simple type definition.
      </dd>
<dt><a href="#key-facets-overlay" shape="rect">overlay</a></dt>
<dd>  
       Given two sets of facets <var>B</var> and <var>S</var>,
       the result of <b>overlaying</b> <var>B</var> with <var>S</var> is the set of facets <var>R</var>
       for which
       
	    
	    

	    
	    

	    
	    <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="gl-fr1" name="gl-fr1" shape="rect"> </a><span class="p">Every facet in <b>S</b> is in <b>R</b>.</span></div>
<div class="clnumber">2<a id="gl-fr2" name="gl-fr2" shape="rect"> </a><span class="p">
		Every facet in <b>B</b> is in <b>R</b>,
		unless
		
		it is  of the same kind as some
		facet in <b>S</b>,
		in which case it is not included in <b>R</b>.
	      </span></div>
<div class="clnumber">3 <span class="p">Every facet in <b>R</b> is required by clause <a href="#fr1" shape="rect">1</a>
		or clause <a href="#fr2" shape="rect">2</a> above.</span></div>
</div>
     </dd>
<dt><a href="#key-overrides" shape="rect">override</a></dt>
<dd>An <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> <var>S</var> is said to
       <b>override</b> another type definition <var>T</var> if and only
       if all of the following are true: <div class="constraintlist"><div class="clnumber">1 <span class="p"><var>S</var> is the
	  <a href="#key-itd" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-specified type        definition<span class="arrow">&#183;</span></a> on some element information item
	  <var>E</var>. A <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> may or may not be known for <var>E</var>.</span></div>
<div class="clnumber">2 <span class="p"><var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var>, subject to the blocking keywords of
	  the <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> of
	  <var>E</var>'s <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>, if any, or <a href="#key-val-sub-type-absolute" class="termref" shape="rect"><span class="arrow">&#183;</span>validly
	    substitutable without limitation<span class="arrow">&#183;</span></a> for
	   <var>T</var> (if no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> is known).</span></div>
</div> <div class="note"><div class="p"><b>Note:</b>  Typically, <var>T</var>
	 would be the <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> for <var>E</var> if it were not
	 overridden.  (This will be the case if <var>T</var> was stipulated by
	 the processor, as described in <a href="#validation_outcome" shape="rect">Assessing Schema-Validity (&#167;5.2)</a>, or <var>E</var> has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> and
	 <var>T</var> is its declared type, or <var>T</var> is the 
  <a href="#key-ldtype" class="termref" shape="rect"><span class="arrow">&#183;</span>locally declared type<span class="arrow">&#183;</span></a> of <var>E</var>.) </div></div> </dd>
<dt><a href="#key-partition" shape="rect">partition</a></dt>
<dd>A
<b>partition</b> of a sequence is a sequence of sub-sequences,
some or all of which <span class="rfc2119">may</span> be empty, such that concatenating all
the sub-sequences yields the original sequence</dd>
<dt><a href="#key-path" shape="rect">path</a></dt>
<dd>When a sequence <var>S</var> of element information
items is checked against a model group <var>M</var>, the sequence of 
<a href="#key-basic-particle" class="termref" shape="rect"><span class="arrow">&#183;</span>basic particles<span class="arrow">&#183;</span></a> 
which the items of <var>S</var> match, in order, is a
<b>path</b> of <var>S</var> in <var>M</var>.  For a given <var>S</var> and 
<var>M</var>, the
path of <var>S</var> in 
<var>M</var> is not necessarily unique.
Detailed rules for the matching, and thus for the construction of
paths, are given in <a href="#group-recognition" shape="rect">Language Recognition by Groups (&#167;3.8.4.1)</a> and <a href="#particle-validation" shape="rect">Principles of Validation against Particles (&#167;3.9.4.1)</a>.
</dd>
<dt><a href="#key-psvi" shape="rect">post-schema-validation       infoset</a></dt>
<dd>We refer to the augmented infoset which
      results from conformant processing as defined in this
      specification as the <b>post-schema-validation
       infoset</b>, or <b>PSVI</b></dd>
<dt><a href="#key-p-inherited" shape="rect">potentially inherited</a></dt>
<dd>An attribute
       information item <var>A</var>, whether explicitly specified in the input
       information set or defaulted as described in
       <a href="#sic-attrDefault" shape="rect">Attribute Default Value (&#167;3.4.5.1)</a>, is <b>potentially inherited</b> by
       an element information item <var>E</var> if and only if
       <b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1 <span class="p">
         <var>A</var> is among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a> of one of <var>E</var>'s ancestors.
        </span></div>
<div class="clnumber">2 <span class="p">
         <var>A</var> and <var>E</var> have the same
         <span class="anonRef">[validation context]</span>.
        </span></div>
<div class="clnumber">3 <!--* no span class='p' possible here *--><b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">3.1 <span class="p">
          <var>A</var> is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> an <a href="#au" class="compref" shape="rect">Attribute Use</a> whose
          <a href="#au-inheritable" class="propref" shape="rect">{inheritable}</a> = <b><i>true</i></b>.
         </span></div>
<div class="clnumber">3.2 <span class="p">
          <var>A</var> is <em>not</em> <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> any <a href="#au" class="compref" shape="rect">Attribute Use</a>
          but <var>A</var> has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a> whose
          <a href="#ad-inheritable" class="propref" shape="rect">{inheritable}</a> = <b><i>true</i></b>.
         </span></div>
</div></div>
</div>
      </dd>
<dt><a href="#key-nonnull" shape="rect">present</a></dt>
<dd>
       A property value
       which is not <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> is <b>present</b>.</dd>
<dt><a href="#t-propRec" shape="rect">property record</a></dt>
<dd>a property
       value may itself be a collection of named values, which we call
       a <b>property record</b></dd>
<dt><a href="#key-resolve" shape="rect">resolve</a></dt>
<dd>
  A <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> in a schema document
  <b>resolves to</b> a component in a schema if and only if in the
  context of that schema the QName and the component together satisfy the rule
  <a href="#src-resolve" shape="rect">QName resolution (Schema Document) (&#167;3.17.6.2)</a>. A <a href="#gloss-QName" class="termref" shape="rect"><span class="arrow">&#183;</span>QName<span class="arrow">&#183;</span></a> in
  an input document, or a pair consisting of a local name and a namespace name, 
  <b>resolves to</b> a component in a schema if and only if in the
  context of that schema the QName (or the name + namespace pair) and the
  component together satisfy the rule <a href="#cvc-resolve-instance" shape="rect">QName resolution (Instance) (&#167;3.17.6.3)</a>.
 </dd>
<dt><a href="#key-typeRestriction" shape="rect">restriction</a></dt>
<dd>A
	  type defined with the same constraints as its <a href="#key-baseTypeDefinition" class="termref" shape="rect"><span class="arrow">&#183;</span>base type definition<span class="arrow">&#183;</span></a>, or with more, is
	 said to be a <b>restriction</b>. </dd>
<dt><a href="#dt-root-validity_subset" shape="rect">root-validity subset</a></dt>
<dd>The 
<b>root-validity subset</b> of the PSVI consists of the 
following properties of the <a href="#key-vr" class="termref" shape="rect"><span class="arrow">&#183;</span>validation root<span class="arrow">&#183;</span></a>:



</dd>
<dt><a href="#c" shape="rect">schema component</a></dt>
<dd><b>Schema
       component</b> is the generic term for the building blocks
      that make up the abstract data model
      of the schema. </dd>
<dt><a href="#key-schemaDoc" shape="rect">schema document</a></dt>
<dd>A document in this
       form (i.e. a <a href="#element-schema" class="eltref" shape="rect">&lt;schema&gt;</a> element information item)
       is a <b>schema document</b></dd>
<dt><a href="#key-s-v-a" shape="rect">schema-validity assessment</a></dt>
<dd>As it is used in this specification, the
      term <b>schema-validity assessment</b> has three aspects: <div class="constraintlist"><div class="clnumber">1<a id="gl-c-lsv" name="gl-c-lsv" shape="rect"> </a><span class="p">Determining local schema-validity, that is
	 whether an element or attribute information item satisfies
	 the constraints embodied in the 
	 relevant components of an
	 XSD schema
	 (specifically the <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
	  element or attribute declaration and/or <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
	  type definition);</span></div>
<div class="clnumber">2 <span class="p">Determining an 
	 overall validation outcome for the item
	 by combining local schema-validity with
	 the results of schema-validity assessments of its
	 descendants, if any; and</span></div>
<div class="clnumber">3 <span class="p">Determining the appropriate
	 augmentations to the infoset (and, if desired, exposing them
	 to downstream applications in some way, to record this
	 outcome).</span></div>
</div></dd>
<dt><a href="#key-selected-type" shape="rect">selected type definition</a></dt>
<dd>The <b>selected type
	 definition</b> <var>S</var> of an element information item <var>E</var> is a
	type definition associated with <var>E</var> in the following way. Let
	<var>D</var> be the <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> of <var>E</var>.  Then: <div class="constraintlist"><div class="clnumber">1<a id="gl-hack-will-it-work-haha-yes" name="gl-hack-will-it-work-haha-yes" shape="rect"> </a><span class="p"> If <var>D</var> has a <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>,  then <var>S</var> is the type <a href="#key-cta-select" class="termref" shape="rect"><span class="arrow">&#183;</span>conditionally selected<span class="arrow">&#183;</span></a> for
	   <var>E</var> by <var>D</var>.<a href="#ed-type_table" class="propref" shape="rect">{type table}</a>. </span></div>
<div class="clnumber">2 <span class="p">If
	   <var>D</var> has no <a href="#ed-type_table" class="propref" shape="rect">{type table}</a>,  then <var>S</var> is <var>D</var>.<a href="#ed-type_definition" class="propref" shape="rect">{type definition}</a>.</span></div>
</div> 
	If <var>E</var> has no <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>, then <var>E</var> has no selected
	type definition.</dd>
<dt><a href="#key-selector-subset" shape="rect">selector subset of XPath</a></dt>
<dd>
	The subset of XPath defined in 
	<a href="#c-selector-xpath" shape="rect">Selector Value OK (&#167;3.11.6.2)</a> is called the
	<b>selector subset</b> of XPath.
       </dd>
<dt><a href="#key-field-subset" shape="rect">selector subset of XPath</a></dt>
<dd>
	The subset of XPath defined in 
	<a href="#c-fields-xpaths" shape="rect">Fields Value OK (&#167;3.11.6.3)</a> is called the
	<b>field subset</b> of XPath.
       </dd>
<dt><a href="#key-skipped" shape="rect">skipped</a></dt>
<dd>
      An element or attribute information item is <b>skipped</b> if it
      is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed<span class="arrow">&#183;</span></a> to a <b><i>skip</i></b> wildcard or if one of its ancestor
      elements is.
     </dd>
<dt><a href="#key-special-purpose" shape="rect">special-purpose</a></dt>
<dd>A
       schema processor which is not a <a href="#key-general-purpose" class="termref" shape="rect"><span class="arrow">&#183;</span>general-purpose<span class="arrow">&#183;</span></a>
       processor is a <b>special-purpose</b>
       processor.</dd>
<dt><a href="#key-sva" shape="rect">strictly assessed</a></dt>
<dd>An element
	information item <var>E</var> is said to be <b>strictly assessed</b>
	if and only if 
	<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="gl-c-xd" name="gl-c-xd" shape="rect"> </a><!--* no span class='p' possible here *-->
	   <b>One</b> of the following is true:<div class="constraintlist"><div class="clnumber">1.1<a id="gl-c-ed" name="gl-c-ed" shape="rect"> </a><b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.1.1<a id="gl-dummy-id-to-force-special-list-processing-for-parent" name="gl-dummy-id-to-force-special-list-processing-for-parent" shape="rect"> </a><span class="p">A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a> element declaration
		 is known for <var>E</var>, namely its <a href="#key-governing" class="termref" shape="rect"><span class="arrow">&#183;</span>governing<span class="arrow">&#183;</span></a>
		  declaration.
		 </span></div>
<div class="clnumber">1.1.2 <span class="p"><var>E</var>'s local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> with
		respect to that declaration has been evaluated as per
		<a href="#cvc-elt" shape="rect">Element Locally Valid (Element) (&#167;3.3.4.3)</a>.</span></div>
<div class="clnumber">1.1.3 <span class="p">If that evaluation involved the evaluation of 
		<a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>, clause <a href="#c-ct" shape="rect">1</a> thereof is satisfied.</span></div>
</div></div>
<div class="clnumber">1.2<a id="gl-c-td" name="gl-c-td" shape="rect"> </a><b>All</b> of the following are true:<div class="constraintlist"><div class="clnumber">1.2.1 <span class="p">
		<var>E</var> does not have a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a>.
	       </span></div>
<div class="clnumber">1.2.2 <span class="p">A <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>non-absent<span class="arrow">&#183;</span></a>
 type definition is known for <var>E</var>, namely its
		  <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>
		 
		</span></div>
<div class="clnumber">1.2.3<a id="gl-another-dummy-id-to-force-special-list-processing-for-parent" name="gl-another-dummy-id-to-force-special-list-processing-for-parent" shape="rect"> </a><span class="p">The  local <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validity<span class="arrow">&#183;</span></a> of <var>E</var> with respect to its
		 <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a> has been evaluated as
		per <a href="#cvc-type" shape="rect">Element Locally Valid (Type) (&#167;3.3.4.4)</a>.</span></div>
</div></div>
</div>
	  </div>
<div class="clnumber">2<a id="gl-c-deepa" name="gl-c-deepa" shape="rect"> </a><!--* no span class='p' possible here *-->
	   For each of the attribute information items among 
	   <var>E</var>.<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>,
	   the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">2.1 <b>If </b>
	      the attribute has a <a href="#key-governing-ad" class="termref" shape="rect"><span class="arrow">&#183;</span>governing attribute declaration<span class="arrow">&#183;</span></a>
	     , <b>then </b>
	      its schema-validity is assessed with respect to that
	      declaration, as defined in <a href="#cvc-assess-attr" shape="rect">Schema-Validity Assessment (Attribute) (&#167;3.2.4.3)</a>.
	     </div><div class="clnumber">2.2 <b>otherwise </b>
	      its schema-validity is not assessed.
	     </div></div>
	  </div>
<div class="clnumber">3<a id="gl-c-deepe" name="gl-c-deepe" shape="rect"> </a><!--* no span class='p' possible here *-->
	   For each of the element information items among its
	   <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>,
	   the appropriate <b>case</b> among the following is true:<div class="constraintlist"><div class="clnumber">3.1 <b>If </b>
	      the child has a <a href="#key-governing-ed" class="termref" shape="rect"><span class="arrow">&#183;</span>governing element  declaration<span class="arrow">&#183;</span></a> or a <a href="#key-governing-type-elem" class="termref" shape="rect"><span class="arrow">&#183;</span>governing type        definition<span class="arrow">&#183;</span></a>
	     , <b>then </b>
	      its schema-validity is assessed with respect to that
	      declaration or type definition, as defined in <a href="#cvc-assess-elt" shape="rect">Schema-Validity Assessment (Element) (&#167;3.3.4.6)</a>.
	     </div><div class="clnumber">3.2 <b>If </b>
	      the child is <a href="#key-att-to" class="termref" shape="rect"><span class="arrow">&#183;</span>attributed to<span class="arrow">&#183;</span></a> a <b><i>skip</i></b>
	      <a href="#w" class="compref" shape="rect">Wildcard</a>
	     , <b>then </b>
	      its schema-validity is not assessed.
	     </div><div class="clnumber">3.3 <b>otherwise </b>
	      its schema-validity is <a href="#key-lva" class="termref" shape="rect"><span class="arrow">&#183;</span>laxly assessed<span class="arrow">&#183;</span></a> with
	      respect to <a href="#key-anyType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyType</code><span class="arrow">&#183;</span></a>.
	     </div></div>
	  </div>
</div>
       </dd>
<dt><a href="#key-validly-sub" shape="rect">substitutable</a></dt>
<dd>One element declaration is <b> substitutable</b>
       for another if together they satisfy constraint <a href="#cos-equiv-derived-ok-rec" shape="rect">Substitution Group OK (Transitive) (&#167;3.3.6.3)</a>.</dd>
<dt><a href="#key-eq" shape="rect">substitution        group</a></dt>
<dd> Every element declaration (call this
       <b>HEAD</b>) in the <a href="#s-element_declarations" class="propref" shape="rect">{element  declarations}</a> of a schema defines a <b>substitution
	group</b>, a subset of those <a href="#s-element_declarations" class="propref" shape="rect">{element declarations}</a>. An element declaration is in
       the <b>substitution group</b> of <b>HEAD</b> if
       and only if it is <a href="#key-validly-sub" class="termref" shape="rect"><span class="arrow">&#183;</span>substitutable<span class="arrow">&#183;</span></a> for
       <b>HEAD</b>. </dd>
<dt><a href="#key-cta-ta-select" shape="rect">successfully selects</a></dt>
<dd>A <a href="#tac" class="compref" shape="rect">Type Alternative</a> <var>A</var>
      <b>successfully selects</b> a <a href="#td" class="compref" shape="rect">Type Definition</a> <var>T</var> for an
      element information item <var>E</var> if and only if <var>A</var>.<a href="#tac-test" class="propref" shape="rect">{test}</a> evaluates to
      <code>true</code> and <var>A</var>.<a href="#tac-type_definition" class="propref" shape="rect">{type definition}</a> = <var>T</var>.</dd>
<dt><a href="#key-symbolSpace" shape="rect">symbol       space</a></dt>
<dd>this specification introduces the term <b>symbol
       space</b> to denote a collection of names, each of which is
      unique with respect to the others</dd>
<dt><a href="#key-targetNS" shape="rect">target namespace</a></dt>
<dd>Several
      kinds of component have a <b>target namespace</b>, which
      is either <a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> or a
      namespace name, also as defined by <a href="#ref-xml-namespaces-1.1" shape="rect">[XML Namespaces 1.1]</a></dd>
<dt><a href="#key-targetset" shape="rect">target set</a></dt>
<dd>The
       <b>target set</b> of an <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element information       
       item <var>E</var> contains <b>all</b> of the following:<div class="constraintlist"><div class="clnumber">1 <span class="p">The schema document identified by the <code>schemaLocation</code>
	  attribute of <var>E</var>.</span></div>
<div class="clnumber">2 <span class="p">The schema document identified by the <code>schemaLocation</code>
	  attribute of any <a href="#element-override" class="eltref" shape="rect">&lt;override&gt;</a> element information item
	  in a schema document contained in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> 
	  of <var>E</var>.</span></div>
<div class="clnumber">3 <span class="p">The schema document identified by the <code>schemaLocation</code>
	  attribute of any <a href="#element-include" class="eltref" shape="rect">&lt;include&gt;</a> element information item
	  in a schema document contained in the <a href="#key-targetset" class="termref" shape="rect"><span class="arrow">&#183;</span>target set<span class="arrow">&#183;</span></a> 
	  of <var>E</var>.</span></div>
</div>
       The <b>target set</b> of <var>E</var> contains no other schema documents.
      </dd>
<dt><a href="#td" shape="rect">type definition</a></dt>
<dd>This specification
       uses the phrase <b>type definition</b> in cases where no
       distinction need be made between simple and complex
       types</dd>
<dt><a href="#dt-type-aware_subset" shape="rect">type-aware subset</a></dt>
<dd>The 
<b>type-aware subset</b> of the PSVI consists of the
<a href="#dt-instance-validity_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>instance-validity subset<span class="arrow">&#183;</span></a>, plus the following 
items and properties.</dd>
<dt><a href="#dt-lightweight_type-aware_subset" shape="rect">type-aware subset</a></dt>
<dd>The 
<b>lightweight type-aware subset</b> of the PSVI provides
the same information as the 
<a href="#dt-type-aware_subset" class="termref" shape="rect"><span class="arrow">&#183;</span>type-aware subset<span class="arrow">&#183;</span></a>, except that instead of providing
direct access to schema components, it provides only their names and
related information.</dd>
<dt><a href="#key-TYPE-value" shape="rect">typed value</a></dt>
<dd>
    When the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of an <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> is
    or is <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a simple type definition <var>T</var>, the value is also
    referred to as a <b><var>T</var> value</b>.
    </dd>
<dt><a href="#key-vn" shape="rect">valid</a></dt>
<dd>
      <b>Validation</b> is the process of determining
      whether an XML document, an element information item, or an
      attribute information item obeys the constraints expressed in a
      schema; in the context of XSD, this amounts to calculating the
      value of the appropriate item's <a href="#e-validity" class="propref" shape="rect">[validity]</a> property. </dd>
<dt><a href="#cd-ct-extension" shape="rect">valid extension</a></dt>
<dd>
	A complex type <b>T</b> is a <b>valid extension</b> of its 
	<a href="#ctd-base_type_definition" class="propref" shape="rect">{base type definition}</a> if and only if 
	<b>T</b>.<a href="#ctd-derivation_method" class="propref" shape="rect">{derivation method}</a>
	 = <b><i>extension</i></b> 
	and
	<var>T</var>
	satisfies the constraint <a href="#cos-ct-extends" shape="rect">Derivation Valid (Extension) (&#167;3.4.6.2)</a></dd>
<dt><a href="#cd-ct-restriction" shape="rect">valid restriction</a></dt>
<dd>A complex
	 type definition with <a href="#ctd-derivation_method" class="propref" shape="rect">{derivation    method}</a> = <b><i>restriction</i></b> is a <b>valid
	  restriction</b> of its <a href="#ctd-base_type_definition" class="propref" shape="rect">{base    type definition}</a> if and only if the constraint <a href="#derivation-ok-restriction" shape="rect">Derivation Valid (Restriction, Complex) (&#167;3.4.6.3)</a> is
	 satisfied</dd>
<dt><a href="#cd-st-restriction" shape="rect">valid restriction</a></dt>
<dd>A
simple type definition <b>T</b> is a 
<b>valid restriction</b> of its <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
if and only if <b>T</b> satisfies constraint 
<a href="#cos-st-restricts" shape="rect">Derivation Valid (Restriction, Simple) (&#167;3.16.6.2)</a></dd>
<dt><a href="#key-vtype" shape="rect">validating type</a></dt>
<dd>
  When a string <var>N</var> is schema-valid with respect to a simple type definition
  <var>T</var> as defined by <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#cvc-datatype-valid" shape="rect">Datatype
  Valid</a> with the corresponding <a href="#key-vv" class="termref" shape="rect"><span class="arrow">&#183;</span>actual value<span class="arrow">&#183;</span></a> <var>V</var>,
  <div class="constraintlist"><div class="clnumber">1 <span class="p">
     The <b>validating type</b> of <var>V</var> is <var>T</var> if <var>T</var> is not a union type,
     otherwise the validating type is the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-basicmember" shape="rect">basic
     member</a> of <var>T</var>'s <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
     membership</a> which actually <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> <var>N</var>.
   </span></div>
<div class="clnumber">2 <span class="p">
     If the <a href="#key-vtype" class="termref" shape="rect"><span class="arrow">&#183;</span>validating type<span class="arrow">&#183;</span></a> of <var>V</var> is a list type <var>L</var> and the
     <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of <var>L</var> is <var>I</var>, then the
     <b>validating type</b> of an (atomic) item value <var>A</var> occurring in <var>V</var> is
     <var>I</var> if <var>I</var> is not a union type, otherwise the validating type is the 
     <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-basicmember" shape="rect">basic member</a> of
     <var>I</var>'s <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html#dt-transitivemembership" shape="rect">transitive
     membership</a> which actually <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validated<span class="arrow">&#183;</span></a> the substring in <var>N</var>
     that corresponds to <var>A</var>.
   </span></div>
</div></dd>
<dt><a href="#key-vr" shape="rect">validation root</a></dt>
<dd>The element or attribute information item at which <a href="#key-va" class="termref" shape="rect"><span class="arrow">&#183;</span>assessment<span class="arrow">&#183;</span></a> begins is called the
<b>validation root</b>.</dd>
<dt><a href="#key-vpath" shape="rect">validation-path</a></dt>
<dd>For any sequence <var>S</var> of element
information items and any particle <var>P</var>, a <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> of <var>S</var> in <var>P</var>
is a <b>validation-path</b> if and only if for each
prefix of the <a href="#key-path" class="termref" shape="rect"><span class="arrow">&#183;</span>path<span class="arrow">&#183;</span></a> which ends with a <a href="#key-wp" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard particle<span class="arrow">&#183;</span></a>, the
corresponding prefix of <var>S</var> has no <a href="#key-competing-paths" class="termref" shape="rect"><span class="arrow">&#183;</span>competing path<span class="arrow">&#183;</span></a> which
ends with an <a href="#key-ep" class="termref" shape="rect"><span class="arrow">&#183;</span>element particle<span class="arrow">&#183;</span></a>.
</dd>
<dt><a href="#key-validator" shape="rect">validator</a></dt>
<dd>A
      <b>validator</b> (or <b>instance validator</b>) is a
      processor which <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validates<span class="arrow">&#183;</span></a> an XML instance document against a
      conforming schema and distinguishes between valid documents
      and others, for one or more of the definitions of validity
      (<a href="#key-root-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>root-validity<span class="arrow">&#183;</span></a>,
      <a href="#key-deep-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>deep validity<span class="arrow">&#183;</span></a>,
      or
      <a href="#key-uniformly-valid-doc" class="termref" shape="rect"><span class="arrow">&#183;</span>uniform validity<span class="arrow">&#183;</span></a>)
      defined below in section
      <a href="#sec-schema-validity-and-docs" shape="rect">Schema-validity and documents (&#167;2.5)</a>.
      Conforming validators <span class="rfc2119">may</span> additionally support other
      definitions of validity defined in terms of the <a href="#key-psvi" class="termref" shape="rect"><span class="arrow">&#183;</span>post-schema-validation infoset<span class="arrow">&#183;</span></a>.
     </dd>
<dt><a href="#key-val-sub-type" shape="rect">validly substitutable</a></dt>
<dd>A type definition <var>S</var> is
       <b>validly substitutable</b> for another type  <var>T</var>,
       subject to a
	set of blocking keywords <var>K</var>  (typically drawn from the set
	{<b><i>substitution</i></b>, <b><i>extension</i></b>,
	<b><i>restriction</i></b>, <b><i>list</i></b>, <b><i>union</i></b>} used in
	the <a href="#ed-disallowed_substitutions" class="propref" shape="rect">{disallowed substitutions}</a> and
	<a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a> of
	element declarations and type definitions), if and
       only if either <ul><li><div class="p"><var>S</var> and <var>T</var> are both complex
	  type definitions and <var>S</var> is  validly derived from <var>T</var>
	  subject to the
	   blocking keywords in the union of <var>K</var> and <var>T</var>.
	  <a href="#ctd-prohibited_substitutions" class="propref" shape="rect">{prohibited substitutions}</a>, 
	   as defined in <a href="#cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex) (&#167;3.4.6.5)</a></div></li></ul> or
       <ul><li><div class="p"><var>S</var> is a complex type definition, <var>T</var> is a
	  simple type definition, and <var>S</var> is validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
	  <var>T</var> subject to the
	   blocking keywords in <var>K</var>, as defined in <a href="#cos-ct-derived-ok" shape="rect">Type Derivation OK (Complex) (&#167;3.4.6.5)</a></div></li></ul> or
       <ul><li><div class="p"><var>S</var> is a simple type definition and <var>S</var> is
	  validly <a href="#key-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <var>T</var> subject to the blocking keywords in
	  <var>K</var>, as defined in <a href="#cos-st-derived-ok" shape="rect">Type Derivation OK (Simple) (&#167;3.16.6.3)</a>.</div></li></ul></dd>
<dt><a href="#key-val-sub-type-absolute" shape="rect">validly substitutable        without limitation</a></dt>
<dd>If the set of keywords controlling whether
       a type <var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for another type <var>T</var> is the
       empty set, then <var>S</var> is said to be <b>validly
	substitutable</b> for <var>T</var> <b>without limitation</b>
       or <b>absolutely</b>.  The phrase <b>validly
	substitutable</b>, without mention of any set of blocking
       keywords, means "validly substitutable without
	limitation".</dd>
<dt><a href="#key-val-sub-type-restricts" shape="rect">validly substitutable as        a restriction</a></dt>
<dd>A type definition <var>S</var> is <b>validly
	substitutable as a restriction</b> for another type  <var>T</var> if
       and only if <var>S</var> is <a href="#key-val-sub-type" class="termref" shape="rect"><span class="arrow">&#183;</span>validly substitutable<span class="arrow">&#183;</span></a> for <var>T</var>, subject to the
       blocking keywords {<b><i>extension</i></b>, <b><i>list</i></b>,
       <b><i>union</i></b>}.</dd>
<dt><a href="#key-wp" shape="rect">wildcard particle</a></dt>
<dd>
A <b>wildcard particle</b> is a <a href="#p" class="compref" shape="rect">Particle</a> whose <a href="#p-term" class="propref" shape="rect">{term}</a> is a <a href="#w" class="compref" shape="rect">Wildcard</a>.
Wildcard particles may be
referred to as "strict", "lax",
or "skip" particles, 
depending on the
<a href="#w-process_contents" class="propref" shape="rect">{process contents}</a> property
of their <a href="#p-term" class="propref" shape="rect">{term}</a>.</dd>
<dt><a href="#key-error" shape="rect">xs:error</a></dt>
<dd>A special simple type
	definition, whose name is <b><i>error</i></b> in the XSD
	namespace, is also present in each <a href="#key-schema" class="termref" shape="rect"><span class="arrow">&#183;</span>XSD schema<span class="arrow">&#183;</span></a>. The
	<b>XSD <code>error</code> type</b>
	has no valid instances. It can be used in any place where
	other types are normally used; in particular, it can be used
	in conditional type assignment to cause elements which satisfy
	certain conditions to be invalid. </dd>
</dl></div><div class="div1">
<h2><a name="nonnormative-schemaDTD" id="nonnormative-schemaDTD" shape="rect"></a>I DTD for Schemas (non-normative)</h2><p>The DTD for schema documents is given below.  Note there is <em>no</em>
implication here that <code>schema</code> <span class="rfc2119">must</span> be the root element of a
document.</p><p>
Independent copies of this material are
available in an undated (mutable) version at
<a href="http://www.w3.org/2009/XMLSchema/XMLSchema.dtd" shape="rect">http://www.w3.org/2009/XMLSchema/XMLSchema.dtd</a>
and in a dated (immutable) version at
<a href="http://www.w3.org/2011/07/XMLSchema.dtd" shape="rect">http://www.w3.org/2011/07/XMLSchema.dtd</a>
&#8212; the mutable version will be updated with future revisions of 
this specification, and the immutable one will not.

</p><p>Although this DTD is non-normative, any XML document which is
     not valid per this DTD, given redefinitions in its internal subset of the
     'p' and 's' parameter entities below appropriate to its namespace
     declaration of the XSD namespace, is almost certainly not
     a valid schema document, with the exception of documents with multiple namespace
     prefixes for the XSD namespace itself.  Accordingly
authoring <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a> using this DTD and DTD-based authoring tools, and
specifying it as the DOCTYPE of documents intended to be <a href="#key-schemaDoc" class="termref" shape="rect"><span class="arrow">&#183;</span>schema documents<span class="arrow">&#183;</span></a> and validating them with a validating XML parser, are
sensible development strategies which users are encouraged to adopt
until XSD-based authoring tools and validators are more widely available.</p><div class="sfsScrap" id="div_dtdfsd">
<a id="dtdfsd" name="dtdfsd" shape="rect"></a>
<div class="sfsHead">DTD for Schema Documents</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;!-- DTD for XML Schema Definition Language Part 1: Structures
     Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"
     Official Location: http://www.w3.org/2001/XMLSchema.dtd --&gt;
&lt;!-- Id: structures.dtd,v 1.1 2003/08/28 13:30:52 ht Exp  --&gt;
&lt;!-- With the exception of cases with multiple namespace
     prefixes for the XSD namespace, any XML document which is
     not valid per this DTD given redefinitions in its internal subset of the
     'p' and 's' parameter entities below appropriate to its namespace
     declaration of the XSD namespace is almost certainly not
     a valid schema document. --&gt;

&lt;!-- See below (at the bottom of this document) for information about
      the revision and namespace-versioning policy governing this DTD. --&gt;
&lt;!-- The simpleType element and its constituent parts
     are defined in XML Schema Definition Language Part 2: Datatypes --&gt;
&lt;!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' &gt;

&lt;!ENTITY % p 'xs:'&gt; &lt;!-- can be overridden in the internal subset of a
                         schema document to establish a different
                         namespace prefix --&gt;
&lt;!ENTITY % s ':xs'&gt; &lt;!-- if %p is defined (e.g. as foo:) then you must
                         also define %s as the suffix for the appropriate
                         namespace declaration (e.g. :foo) --&gt;
&lt;!ENTITY % nds 'xmlns%s;'&gt;

&lt;!-- Define all the element names, with optional prefix --&gt;
&lt;!ENTITY % schema "%p;schema"&gt;
&lt;!ENTITY % defaultOpenContent "%p;defaultOpenContent"&gt;
&lt;!ENTITY % complexType "%p;complexType"&gt;
&lt;!ENTITY % complexContent "%p;complexContent"&gt;
&lt;!ENTITY % openContent "%p;openContent"&gt;
&lt;!ENTITY % simpleContent "%p;simpleContent"&gt;
&lt;!ENTITY % extension "%p;extension"&gt;
&lt;!ENTITY % element "%p;element"&gt;
&lt;!ENTITY % alternative "%p;alternative"&gt;
&lt;!ENTITY % unique "%p;unique"&gt;
&lt;!ENTITY % key "%p;key"&gt;
&lt;!ENTITY % keyref "%p;keyref"&gt;
&lt;!ENTITY % selector "%p;selector"&gt;
&lt;!ENTITY % field "%p;field"&gt;
&lt;!ENTITY % group "%p;group"&gt;
&lt;!ENTITY % all "%p;all"&gt;
&lt;!ENTITY % choice "%p;choice"&gt;
&lt;!ENTITY % sequence "%p;sequence"&gt;
&lt;!ENTITY % any "%p;any"&gt;
&lt;!ENTITY % anyAttribute "%p;anyAttribute"&gt;
&lt;!ENTITY % attribute "%p;attribute"&gt;
&lt;!ENTITY % attributeGroup "%p;attributeGroup"&gt;
&lt;!ENTITY % include "%p;include"&gt;
&lt;!ENTITY % import "%p;import"&gt;
&lt;!ENTITY % redefine "%p;redefine"&gt;
&lt;!ENTITY % override "%p;override"&gt;
&lt;!ENTITY % notation "%p;notation"&gt;
&lt;!ENTITY % assert   "%p;assert"&gt;


&lt;!-- annotation elements --&gt;
&lt;!ENTITY % annotation "%p;annotation"&gt;
&lt;!ENTITY % appinfo "%p;appinfo"&gt;
&lt;!ENTITY % documentation "%p;documentation"&gt;

&lt;!-- Customisation entities for the ATTLIST of each element type.
     Define one of these if your schema takes advantage of the
     anyAttribute='##other' in the
     schema for schema documents --&gt;

&lt;!ENTITY % schemaAttrs ''&gt;
&lt;!ENTITY % defaultOpenContentAttrs ''&gt;
&lt;!ENTITY % complexTypeAttrs ''&gt;
&lt;!ENTITY % complexContentAttrs ''&gt;
&lt;!ENTITY % openContentAttrs ''&gt;
&lt;!ENTITY % simpleContentAttrs ''&gt;
&lt;!ENTITY % extensionAttrs ''&gt;
&lt;!ENTITY % elementAttrs ''&gt;
&lt;!ENTITY % groupAttrs ''&gt;
&lt;!ENTITY % allAttrs ''&gt;
&lt;!ENTITY % choiceAttrs ''&gt;
&lt;!ENTITY % sequenceAttrs ''&gt;
&lt;!ENTITY % anyAttrs ''&gt;
&lt;!ENTITY % anyAttributeAttrs ''&gt;
&lt;!ENTITY % attributeAttrs ''&gt;
&lt;!ENTITY % attributeGroupAttrs ''&gt;
&lt;!ENTITY % uniqueAttrs ''&gt;
&lt;!ENTITY % keyAttrs ''&gt;
&lt;!ENTITY % keyrefAttrs ''&gt;
&lt;!ENTITY % selectorAttrs ''&gt;
&lt;!ENTITY % fieldAttrs ''&gt;
&lt;!ENTITY % assertAttrs ''&gt;

&lt;!ENTITY % includeAttrs ''&gt;
&lt;!ENTITY % importAttrs ''&gt;
&lt;!ENTITY % redefineAttrs ''&gt;
&lt;!ENTITY % overrideAttrs ''&gt;
&lt;!ENTITY % notationAttrs ''&gt;
&lt;!ENTITY % annotationAttrs ''&gt;
&lt;!ENTITY % appinfoAttrs ''&gt;
&lt;!ENTITY % documentationAttrs ''&gt;

&lt;!ENTITY % complexDerivationSet "CDATA"&gt;
      &lt;!-- #all or space-separated list drawn from derivationChoice --&gt;
&lt;!ENTITY % blockSet "CDATA"&gt;
      &lt;!-- #all or space-separated list drawn from
                      derivationChoice + 'substitution' --&gt;

&lt;!ENTITY % composition '%include; | %import; | %override; | %redefine;'&gt;
&lt;!ENTITY % mgs '%all; | %choice; | %sequence;'&gt;
&lt;!ENTITY % cs '%choice; | %sequence;'&gt;
&lt;!ENTITY % formValues '(qualified|unqualified)'&gt;


&lt;!ENTITY % attrDecls    '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'&gt;

&lt;!ENTITY % assertions   '(%assert;)*'&gt;

&lt;!ENTITY % particleAndAttrs '(%openContent;?, (%mgs; | %group;)?,
                              %attrDecls;, %assertions;)'&gt;

&lt;!-- This is used in part2 --&gt;
&lt;!ENTITY % restriction1 '(%openContent;?, (%mgs; | %group;)?)'&gt;

%xs-datatypes;

&lt;!-- the duplication below is to produce an unambiguous content model
     which allows annotation everywhere --&gt;
&lt;!ELEMENT %schema; ((%composition; | %annotation;)*,
                    (%defaultOpenContent;, (%annotation;)*)?,
                    ((%simpleType; | %complexType;
                      | %element; | %attribute;
                      | %attributeGroup; | %group;
                      | %notation; ),
                     (%annotation;)*)* )&gt;
&lt;!ATTLIST %schema;
   targetNamespace      %URIref;               #IMPLIED
   version              CDATA                  #IMPLIED
   %nds;                %URIref;               #FIXED 'http://www.w3.org/2001/XMLSchema'
   xmlns                CDATA                  #IMPLIED
   finalDefault         %complexDerivationSet; ''
   blockDefault         %blockSet;             ''
   id                   ID                     #IMPLIED
   elementFormDefault   %formValues;           'unqualified'
   attributeFormDefault %formValues;           'unqualified'
   defaultAttributes    CDATA                  #IMPLIED
   xpathDefaultNamespace    CDATA       '##local'
   xml:lang             CDATA                  #IMPLIED
   %schemaAttrs;&gt;
&lt;!-- Note the xmlns declaration is NOT in the
     schema for schema documents,
     because at the Infoset level where schemas operate,
     xmlns(:prefix) is NOT an attribute! --&gt;
&lt;!-- The declaration of xmlns is a convenience for schema authors --&gt;
 
&lt;!-- The id attribute here and below is for use in external references
     from non-schemas using simple fragment identifiers.
     It is NOT used for schema-to-schema reference, internal or
     external. --&gt;

&lt;!ELEMENT %defaultOpenContent; ((%annotation;)?, %any;)&gt;
&lt;!ATTLIST %defaultOpenContent;
          appliesToEmpty  (true|false)           'false'
          mode            (interleave|suffix)    'interleave'
          id              ID                     #IMPLIED
          %defaultOpenContentAttrs;&gt;

&lt;!-- a type is a named content type specification which allows attribute
     declarations--&gt;
&lt;!-- --&gt;

&lt;!ELEMENT %complexType; ((%annotation;)?,
                         (%simpleContent;|%complexContent;|
                          %particleAndAttrs;))&gt;

&lt;!ATTLIST %complexType;
          name                    %NCName;                 #IMPLIED
          id                      ID                       #IMPLIED
          abstract                %boolean;                #IMPLIED
          final                   %complexDerivationSet;   #IMPLIED
          block                   %complexDerivationSet;   #IMPLIED
          mixed                   (true|false)             'false'
          defaultAttributesApply  %boolean;                'true'
          %complexTypeAttrs;&gt;

&lt;!-- particleAndAttrs is shorthand for a root type --&gt;
&lt;!-- mixed is disallowed if simpleContent, overridden if complexContent has one too. --&gt;

&lt;!-- If anyAttribute appears in one or more referenced attributeGroups
     and/or explicitly, the intersection of the permissions is used --&gt;

&lt;!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))&gt;
&lt;!ATTLIST %complexContent;
          mixed (true|false) #IMPLIED
          id    ID           #IMPLIED
          %complexContentAttrs;&gt;

&lt;!ELEMENT %openContent; ((%annotation;)?, (%any;)?)&gt;
&lt;!ATTLIST %openContent;
          mode            (none|interleave|suffix)  'interleave'
          id              ID                        #IMPLIED
          %openContentAttrs;&gt;

&lt;!-- restriction should use the branch defined above, not the simple
     one from part2; extension should use the full model  --&gt;

&lt;!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))&gt;
&lt;!ATTLIST %simpleContent;
          id    ID           #IMPLIED
          %simpleContentAttrs;&gt;

&lt;!-- restriction should use the simple branch from part2, not the 
     one defined above; extension should have no particle  --&gt;

&lt;!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))&gt;
&lt;!ATTLIST %extension;
          base  %QName;               #REQUIRED
          id    ID                    #IMPLIED
          
          %extensionAttrs;&gt;

&lt;!-- an element is declared by either:
 a name and a type (either nested or referenced via the type attribute)
 or a ref to an existing element declaration --&gt;

&lt;!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
                     (%alternative;)*,
                     (%unique; | %key; | %keyref;)*)&gt;
&lt;!-- simpleType or complexType only if no type|ref attribute --&gt;
&lt;!-- ref not allowed at top level --&gt;
&lt;!ATTLIST %element;
            name               %NCName;               #IMPLIED
            id                 ID                     #IMPLIED
            ref                %QName;                #IMPLIED
            type               %QName;                #IMPLIED
            minOccurs          %nonNegativeInteger;   #IMPLIED
            maxOccurs          CDATA                  #IMPLIED
            nillable           %boolean;              #IMPLIED
            substitutionGroup  %QName;                #IMPLIED
            abstract           %boolean;              #IMPLIED
            final              %complexDerivationSet; #IMPLIED
            block              %blockSet;             #IMPLIED
            default            CDATA                  #IMPLIED
            fixed              CDATA                  #IMPLIED
            form               %formValues;           #IMPLIED
            targetNamespace    %URIref;               #IMPLIED
            %elementAttrs;&gt;
&lt;!-- type and ref are mutually exclusive.
     name and ref are mutually exclusive, one is required --&gt;
&lt;!-- In the absence of type AND ref, type defaults to type of
     substitutionGroup, if any, else xs:anyType, i.e. unconstrained --&gt;
&lt;!-- default and fixed are mutually exclusive --&gt;

&lt;!ELEMENT %alternative; ((%annotation;)?, 
            (%simpleType; | %complexType;)?) &gt;
&lt;!ATTLIST %alternative; 
            test                     CDATA     #IMPLIED
            type                     %QName;   #IMPLIED
            xpathDefaultNamespace    CDATA     #IMPLIED
            id                       ID        #IMPLIED &gt;


&lt;!ELEMENT %group; ((%annotation;)?,(%mgs;)?)&gt;
&lt;!ATTLIST %group; 
          name        %NCName;               #IMPLIED
          ref         %QName;                #IMPLIED
          minOccurs   %nonNegativeInteger;   #IMPLIED
          maxOccurs   CDATA                  #IMPLIED
          id          ID                     #IMPLIED
          %groupAttrs;&gt;

&lt;!ELEMENT %all; ((%annotation;)?, (%element;| %group;| %any;)*)&gt;
&lt;!ATTLIST %all;
          minOccurs   (0 | 1)                #IMPLIED
          maxOccurs   (0 | 1)                #IMPLIED
          id          ID                     #IMPLIED
          %allAttrs;&gt;

&lt;!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)&gt;
&lt;!ATTLIST %choice;
          minOccurs   %nonNegativeInteger;   #IMPLIED
          maxOccurs   CDATA                  #IMPLIED
          id          ID                     #IMPLIED
          %choiceAttrs;&gt;

&lt;!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)&gt;
&lt;!ATTLIST %sequence;
          minOccurs   %nonNegativeInteger;   #IMPLIED
          maxOccurs   CDATA                  #IMPLIED
          id          ID                     #IMPLIED
          %sequenceAttrs;&gt;

&lt;!-- an anonymous grouping in a model, or
     a top-level named group definition, or a reference to same --&gt;


&lt;!ELEMENT %any; (%annotation;)?&gt;
&lt;!ATTLIST %any;
            namespace       CDATA                  #IMPLIED
            notNamespace    CDATA                  #IMPLIED
            notQName        CDATA                  ''
            processContents (skip|lax|strict)      'strict'
            minOccurs       %nonNegativeInteger;   '1'
            maxOccurs       CDATA                  '1'
            id              ID                     #IMPLIED
            %anyAttrs;&gt;

&lt;!-- namespace is interpreted as follows:
                  ##any      - - any non-conflicting WFXML at all

                  ##other    - - any non-conflicting WFXML from namespace other
                                  than targetNamespace

                  ##local    - - any unqualified non-conflicting WFXML/attribute
                  one or     - - any non-conflicting WFXML from
                  more URI        the listed namespaces
                  references

                  ##targetNamespace ##local may appear in the above list,
                    with the obvious meaning --&gt;

&lt;!-- notNamespace is interpreted as follows:
                  ##local    - - any unqualified non-conflicting WFXML/attribute
                  one or     - - any non-conflicting WFXML from
                  more URI        the listed namespaces
                  references

                  ##targetNamespace ##local may appear in the above list,
                    with the obvious meaning --&gt;

&lt;!ELEMENT %anyAttribute; (%annotation;)?&gt;
&lt;!ATTLIST %anyAttribute;
            namespace       CDATA              #IMPLIED
            notNamespace    CDATA              #IMPLIED
            notQName        CDATA              ''
            processContents (skip|lax|strict)  'strict'
            id              ID                 #IMPLIED
            %anyAttributeAttrs;&gt;
&lt;!-- namespace and notNamespace are interpreted as for 'any' above --&gt;

&lt;!-- simpleType only if no type|ref attribute --&gt;
&lt;!-- ref not allowed at top level, name iff at top level --&gt;
&lt;!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)&gt;
&lt;!ATTLIST %attribute;
          name              %NCName;      #IMPLIED
          id                ID            #IMPLIED
          ref               %QName;       #IMPLIED
          type              %QName;       #IMPLIED
          use               (prohibited|optional|required) #IMPLIED
          default           CDATA         #IMPLIED
          fixed             CDATA         #IMPLIED
          form              %formValues;  #IMPLIED
          targetNamespace   %URIref;      #IMPLIED
          inheritable       %boolean;      #IMPLIED
          %attributeAttrs;&gt;
&lt;!-- type and ref are mutually exclusive.
     name and ref are mutually exclusive, one is required --&gt;
&lt;!-- default for use is optional when nested, none otherwise --&gt;
&lt;!-- default and fixed are mutually exclusive --&gt;
&lt;!-- type attr and simpleType content are mutually exclusive --&gt;

&lt;!-- an attributeGroup is a named collection of attribute decls, or a
     reference thereto --&gt;
&lt;!ELEMENT %attributeGroup; ((%annotation;)?,
                       (%attribute; | %attributeGroup;)*,
                       (%anyAttribute;)?) &gt;
&lt;!ATTLIST %attributeGroup;
                 name       %NCName;       #IMPLIED
                 id         ID             #IMPLIED
                 ref        %QName;        #IMPLIED
                 %attributeGroupAttrs;&gt;

&lt;!-- ref iff no content, no name.  ref iff not top level --&gt;

&lt;!-- better reference mechanisms --&gt;
&lt;!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)&gt;
&lt;!ATTLIST %unique;
          name                     %NCName;       #IMPLIED
          ref                      %QName;        #IMPLIED
          id                       ID             #IMPLIED
          %uniqueAttrs;&gt;

&lt;!ELEMENT %key;    ((%annotation;)?, %selector;, (%field;)+)&gt;
&lt;!ATTLIST %key;
          name                     %NCName;       #IMPLIED
          ref                      %QName;        #IMPLIED
          id                       ID             #IMPLIED
          %keyAttrs;&gt;

&lt;!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)&gt;
&lt;!ATTLIST %keyref;
          name                     %NCName;       #IMPLIED
          ref                      %QName;        #IMPLIED
          refer                    %QName;        #IMPLIED
          id                       ID             #IMPLIED
          %keyrefAttrs;&gt;

&lt;!ELEMENT %selector; ((%annotation;)?)&gt;
&lt;!ATTLIST %selector;
          xpath                    %XPathExpr; #REQUIRED
          xpathDefaultNamespace    CDATA       #IMPLIED
          id                       ID          #IMPLIED
          %selectorAttrs;&gt;
&lt;!ELEMENT %field; ((%annotation;)?)&gt;
&lt;!ATTLIST %field;
          xpath                    %XPathExpr; #REQUIRED
          xpathDefaultNamespace    CDATA       #IMPLIED
          id                       ID          #IMPLIED
          %fieldAttrs;&gt;

&lt;!-- co-constraint assertions --&gt;
&lt;!ELEMENT %assert; ((%annotation;)?)&gt;
&lt;!ATTLIST %assert;
          test                     %XPathExpr; #REQUIRED
          id                       ID          #IMPLIED
          xpathDefaultNamespace    CDATA       #IMPLIED
          %assertAttrs;&gt;


&lt;!-- Schema combination mechanisms --&gt;
&lt;!ELEMENT %include; (%annotation;)?&gt;
&lt;!ATTLIST %include;
          schemaLocation %URIref; #REQUIRED
          id             ID       #IMPLIED
          %includeAttrs;&gt;

&lt;!ELEMENT %import; (%annotation;)?&gt;
&lt;!ATTLIST %import;
          namespace      %URIref; #IMPLIED
          schemaLocation %URIref; #IMPLIED
          id             ID       #IMPLIED
          %importAttrs;&gt;

&lt;!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
                      %attributeGroup; | %group;)*&gt;
&lt;!ATTLIST %redefine;
          schemaLocation %URIref; #REQUIRED
          id             ID       #IMPLIED
          %redefineAttrs;&gt;

&lt;!ELEMENT %override; ((%annotation;)?,
                      ((%simpleType; | %complexType; | %group; | %attributeGroup;) |
                       %element; | %attribute; | %notation;)*)&gt;
&lt;!ATTLIST %override;
          schemaLocation %URIref; #REQUIRED
          id             ID       #IMPLIED
          %overrideAttrs;&gt;

&lt;!ELEMENT %notation; (%annotation;)?&gt;
&lt;!ATTLIST %notation;
	  name        %NCName;    #REQUIRED
	  id          ID          #IMPLIED
	  public      CDATA       #REQUIRED
	  system      %URIref;    #IMPLIED
	  %notationAttrs;&gt;

&lt;!-- Annotation is either application information or documentation --&gt;
&lt;!-- By having these here they are available for datatypes as well
     as all the structures elements --&gt;

&lt;!ELEMENT %annotation; (%appinfo; | %documentation;)*&gt;
&lt;!ATTLIST %annotation; %annotationAttrs;&gt;

&lt;!-- User must define annotation elements in internal subset for this
     to work --&gt;
&lt;!ELEMENT %appinfo; ANY&gt;   &lt;!-- too restrictive --&gt;
&lt;!ATTLIST %appinfo;
          source     %URIref;      #IMPLIED
          id         ID         #IMPLIED
          %appinfoAttrs;&gt;
&lt;!ELEMENT %documentation; ANY&gt;   &lt;!-- too restrictive --&gt;
&lt;!ATTLIST %documentation;
          source     %URIref;   #IMPLIED
          id         ID         #IMPLIED
          xml:lang   CDATA      #IMPLIED
          %documentationAttrs;&gt;

&lt;!NOTATION XMLSchemaStructures PUBLIC
           'structures' 'http://www.w3.org/2001/XMLSchema.xsd' &gt;
&lt;!NOTATION XML PUBLIC
           'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' &gt;

&lt;!-- 
      In keeping with the XML Schema WG's standard versioning policy, 
      this DTD will persist at the URI
      http://www.w3.org/2011/07/XMLSchema.dtd.

      At the date of issue it can also be found at the URI
      http://www.w3.org/2009/XMLSchema/XMLSchema.dtd.

      The schema document at that URI may however change in the future, 
      in order to remain compatible with the latest version of XSD 
      and its namespace.  In other words, if XSD or the XML Schema 
      namespace change, the version of this document at 
      http://www.w3.org/2009/XMLSchema/XMLSchema.dtd will change accordingly; 
      the version at http://www.w3.org/2011/07/XMLSchema.dtd 
      will not change.

      Previous dated (and unchanging) versions of this DTD include:

        http://www.w3.org/2009/04/structures.dtd 
          (XSD 1.1 Candidate Recommendation)

        http://www.w3.org/2004/10/structures.dtd
          (XSD 1.0 Recommendation, Second Edition)

        http://www.w3.org/2001/05/structures.dtd
          (XSD 1.0 Recommendation, First Edition)

--&gt;
</pre></div></div></div><div class="div1">
<h2><a name="non-ambig" id="non-ambig" shape="rect"></a>J Analysis of the Unique Particle Attribution Constraint (non-normative)</h2><p>A specification of the import of <a href="#cos-nonambig" shape="rect">Unique Particle Attribution (&#167;3.8.6.4)</a> which does
not appeal to a processing model is difficult.  What follows is intended as
guidance, without claiming to be complete.</p><div class="block"><span class="termdef"><a name="key-overlap" id="key-overlap" title="" shape="rect">[Definition:]&#160;&#160;</a>Two non-group
particles <b>overlap</b> if </span>
   <ul><li><div class="p">They are both element declaration particles whose declarations have the
same <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.</div></li></ul>
    or
    <ul><li><div class="p">They are both element declaration particles
      
      and one of them has the same
      <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
       as 
       an element declaration in the
other's <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution group<span class="arrow">&#183;</span></a>.</div></li></ul>
    or
    <ul><li><div class="p">
     They are both <b><i>global</i></b> element declaration particles and their
     <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution groups<span class="arrow">&#183;</span></a> contain the same
     element declaration.
    </div></li></ul>
    or
    <ul><li><div class="p">They are both wildcards, and any one of the following is true of the wildcard intersection of their <a href="#w-namespace_constraint" class="propref" shape="rect">{namespace constraint}</a>s as defined
       in <a href="#cos-aw-intersect" shape="rect">Attribute Wildcard Intersection (&#167;3.10.6.4)</a>:
	
	<ol class="enumar"><li><div class="p">It has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>any</i></b>.</div></li><li><div class="p">It has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>not</i></b>.</div></li><li><div class="p">It has <a href="#nc-variety" class="propref" shape="rect">{variety}</a> = <b><i>enumeration</i></b> and <a href="#nc-namespaces" class="propref" shape="rect">{namespaces}</a> &#8800; the empty set.</div></li></ol>
</div></li></ul>
    
    
   </div><div class="block">A content model will violate the unique attribution constraint if it
contains two particles which <a href="#key-overlap" class="termref" shape="rect"><span class="arrow">&#183;</span>overlap<span class="arrow">&#183;</span></a> and which either
    <ul><li><div class="p">are both in the <a href="#mg-particles" class="propref" shape="rect">{particles}</a> of a <b><i>choice</i></b> or
<b><i>all</i></b> group</div></li></ul>
    or
    <ul><li><div class="p">may <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> adjacent information items and the first has
<a href="#p-min_occurs" class="propref" shape="rect">{min occurs}</a> less than <a href="#p-max_occurs" class="propref" shape="rect">{max occurs}</a>.</div></li></ul>
   </div><p>Two particles may <a href="#key-vn" class="termref" shape="rect"><span class="arrow">&#183;</span>validate<span class="arrow">&#183;</span></a> adjacent information items if they are
separated by at most epsilon transitions in the most obvious transcription of a
content model into a finite-state automaton.</p><p>A precise formulation of this constraint can also be offered in terms of
operations on finite-state automaton:  transcribe the content model into an
automaton in the usual way using epsilon transitions for optionality and
unbounded maxOccurs, unfolding other numeric occurrence ranges and treating the heads of <a href="#key-eq" class="termref" shape="rect"><span class="arrow">&#183;</span>substitution groups<span class="arrow">&#183;</span></a> as if
they were choices over all elements in the group, <em>but</em> using not
element QNames as transition labels, but rather pairs of element QNames and
positions in the model.  Determinize this automaton, treating wildcard transitions as
if
they were distinct from all other edge labels for the purposes of the
determinization. Now replace all
QName+position transition labels with the element QNames alone.  If the result has any states
with two or more identical-QName-labeled transitions from it, or two
wildcard transitions whose intentional intersection is non-empty, the model does not
satisfy the Unique Attribution constraint.   </p></div><div class="div1">
<h2><a name="nonnormative-language-ids" id="nonnormative-language-ids" shape="rect"></a>K XSD Language Identifiers (non-normative)</h2><div class="glist"><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema</code></div><div class="giDef"><div class="p">XSD</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0</code></div><div class="giDef"><div class="p">XSD 1.0</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1</code></div><div class="giDef"><div class="p">XSD 1.1</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e</code></div><div class="giDef"><div class="p">XSD 1.0 First Edition</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/2e</code></div><div class="giDef"><div class="p">XSD 1.0 Second Edition</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e</code></div><div class="giDef"><div class="p">XSD 1.1 First Edition</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/19990506</code></div><div class="giDef"><div class="p">XSD 1.0 in 6 May 1999 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/19990924</code></div><div class="giDef"><div class="p">XSD 1.0 in 24 September 1999 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/19991105</code></div><div class="giDef"><div class="p">XSD 1.0 in 5 November 1999 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/19991217</code></div><div class="giDef"><div class="p">XSD 1.0 in 17 December 1999 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20000225</code></div><div class="giDef"><div class="p">XSD 1.0 in 25 February 2000 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20000407</code></div><div class="giDef"><div class="p">XSD 1.0 in 7 April 2000 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20000922</code></div><div class="giDef"><div class="p">XSD 1.0 in 22 September 2000 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20001024</code></div><div class="giDef"><div class="p">XSD 1.0 Candidate Recommendation (CR)</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20010316</code></div><div class="giDef"><div class="p">XSD 1.0 first Proposed Recommendation (PR)</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20010330</code></div><div class="giDef"><div class="p">XSD 1.0 second Proposed Recommendation (PR)</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/1e/20010502</code></div><div class="giDef"><div class="p">XSD 1.0 Recommendation</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/2e/20040318</code></div><div class="giDef"><div class="p">XSD 1.0 Second Edition Proposed Edited Recommendation (PER)</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.0/2e/20041028</code></div><div class="giDef"><div class="p">XSD 1.0 Second Edition Recommendation</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20040716</code></div><div class="giDef"><div class="p">XSD 1.1 in 16 July 2004 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20050224</code></div><div class="giDef"><div class="p">XSD 1.1 in 24 February 2005 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20060116</code></div><div class="giDef"><div class="p">XSD 1.1 in 16 January 2006 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20060217</code></div><div class="giDef"><div class="p">XSD 1.1 in 17 February 2006 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20060330</code></div><div class="giDef"><div class="p">XSD 1.1 in 30 March 2006 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20060831</code></div><div class="giDef"><div class="p">XSD 1.1 in 31 August 2006 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20070830</code></div><div class="giDef"><div class="p">XSD 1.1 in 30 August 2007 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20080620</code></div><div class="giDef"><div class="p">XSD 1.1 in 20 June 2008 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20090130</code></div><div class="giDef"><div class="p">XSD 1.1 in 30 January 2009 working draft</div></div></div><div class="gitem"><div class="giLabel"><code>http://www.w3.org/XML/XMLSchema/v1.1/1e/20090430</code></div><div class="giDef"><div class="p">XSD 1.1 Candidate Recommendation, 30 April 2009</div></div></div></div></div><div class="div1">
<h2><a name="biblio" id="biblio" shape="rect"></a>L References</h2><div class="div2">
<h3><span class="nav"> <a href="#nonnormative-references" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="normative-references" id="normative-references" shape="rect"></a>L.1 Normative</h3><dl><dt class="label"><a name="bib-fno" id="bib-fno" shape="rect"></a>Functions and Operators</dt><dd>
      World Wide Web Consortium.
      <em>XQuery 1.0 and XPath 2.0 Functions and Operators</em>,
      ed. Ashok Malhotra, Jim Melton, and Norman Walsh.
      
      W3C Recommendation
      23 January 2007. See
       <a href="http://www.w3.org/TR/xpath-functions/" shape="rect">http://www.w3.org/TR/xpath-functions/</a>
      <span class="annotation">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </span>
     </dd><dt class="label"><a name="rfc-2119" id="rfc-2119" shape="rect"></a>IETF RFC 2119</dt><dd>
      Bradner, Scott.
      <em>RFC
       2119: Key words for use in RFCs to Indicate Requirement Levels.</em>
       
      IETF (Internet Engineering Task Force), 1997. See <a href="http://www.ietf.org/rfc/rfc2119.txt" shape="rect">http://www.ietf.org/rfc/rfc2119.txt</a>.</dd><dt class="label"><a name="ref-xml-namespaces-1.0" id="ref-xml-namespaces-1.0" shape="rect"></a>Namespaces in XML 1.0</dt><dd>
      
      
      World Wide Web Consortium.
      <em>Namespaces in XML1.0 (Second Edition)</em>, 
      ed. Tim Bray et al. 
      
      W3C Recommendation 16 August 2006.
      See <a href="http://www.w3.org/TR/xml-names/" shape="rect">http://www.w3.org/TR/xml-names/</a>
      <span class="annotation">
	The edition cited is the one current at the date of publication of this
	specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
	any later edition(s); it is implementation-defined which.
       
       For details of the
       dependency of this specification on Namespaces in XML 1.0, see
       <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.4)</a>.  </span></dd><dt class="label"><a name="bib-xdm" id="bib-xdm" shape="rect"></a>XDM</dt><dd>
      World Wide Web Consortium.
      <em>XQuery 1.0 and XPath 2.0 Data Model (XDM)</em>, 
      ed. Mary Fern&#225;ndez et al.
       
       
      W3C Recommendation
       23 January 2007. See 
       <a href="http://www.w3.org/TR/xpath-datamodel/" shape="rect">http://www.w3.org/TR/xpath-datamodel/</a>
      <span class="annotation">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </span>
     </dd><dt class="label"><a name="ref-xml-1.0" id="ref-xml-1.0" shape="rect"></a>XML 1.0</dt><dd>
      
      
      World Wide Web Consortium.
      <em>Extensible Markup Language (XML) 1.0 (Fifth Edition)</em>, 
      ed. Tim Bray et al. 
      W3C Recommendation 26 November 2008.
      
      
      Available at
       <a href="http://www.w3.org/TR/xml/" shape="rect">http://www.w3.org/TR/xml/</a>
      <span class="annotation">
	The edition cited is the one current at the date of publication of this
	specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
	any later edition(s); it is implementation-defined which.
       
       For details of the dependency of this specification on XML 1.1, 
       see <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.4)</a>.</span>
     </dd><dt class="label"><a name="ref-xml-1.1" id="ref-xml-1.1" shape="rect"></a>XML 1.1</dt><dd>
      
      World Wide Web Consortium.
      <em>Extensible Markup Language (XML) 1.1
	(Second Edition)</em>, 
      ed. Tim Bray et al. 
      W3C Recommendation 16 August 2006, 
       edited in place 29 September 2006.  Available at
      <a href="http://www.w3.org/TR/xml11/" shape="rect">http://www.w3.org/TR/xml11/</a> 
      <span class="annotation">
	The edition cited is the one current at the date of publication of this
	specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
	any later edition(s); it is implementation-defined which.
       
       For 
       details of the dependency of this specification on XML
       1.1, see <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.4)</a>.  </span></dd><dt class="label"><a name="ref-xmlinfo" id="ref-xmlinfo" shape="rect"></a>XML Infoset</dt><dd>
      World Wide Web Consortium.
      <em>XML Information Set
	(Second Edition)</em>, 
      ed. John Cowan and Richard Tobin 
      
      W3C Recommendation 4 February 2004.
      
      Available at
       <a href="http://www.w3.org/TR/xml-infoset/" shape="rect">http://www.w3.org/TR/xml-infoset/</a>
      <span class="annotation">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </span>
     </dd><dt class="label"><a name="ref-xml-namespaces-1.1" id="ref-xml-namespaces-1.1" shape="rect"></a>XML Namespaces 1.1</dt><dd>
      
      World Wide Web Consortium.
      <em>Namespaces in XML 1.1
	(Second Edition)</em>,
       ed. Tim Bray et al. 
      W3C Recommendation 16 August 2006.
      Available at: <a href="http://www.w3.org/TR/xml-names11/" shape="rect">http://www.w3.org/TR/xml-names11/</a>
      <span class="annotation">
	The edition cited is the one current at the date of publication of this
	specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
	any later edition(s); it is implementation-defined which.
       
       For details of the dependency of this
       specification on Namespaces in XML 1.1, see <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.4)</a>.  </span></dd><dt class="label"><a name="schema2e-1" id="schema2e-1" shape="rect"></a>XML Schema 2nd Edition</dt><dd>World Wide Web Consortium.
      <em>XML Schema Part 1: Structures</em>, 
      ed. Henry S. Thompson et al. 
        
      W3C Recommendation 28 October 2004.
      See <a href="http://www.w3.org/TR/xmlschema-1/" shape="rect">http://www.w3.org/TR/xmlschema-1/</a>.
      <span class="annotation">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </span>
     </dd><dt class="label"><a name="ref-xsp2" id="ref-xsp2" shape="rect"></a>XML Schema: Datatypes</dt><dd>
      World Wide Web Consortium.
      <em>XML Schema 
	 Version 1.1
       Part 2: Datatypes</em>, 
      ed.
      Dave Peterson,
      Paul V. Biron and 
      Ashok Malhotra, 
      and C. M. Sperberg-McQueen
      
      
      Candidate Recommendation 21 July 2011.
      See <a href="http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html" shape="rect">http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/datatypes.html</a> 
	
      <span class="annotation">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </span>
     </dd><dt class="label"><a name="bib-xpath2" id="bib-xpath2" shape="rect"></a>XPath 2.0</dt><dd>
      World Wide Web Consortium.
      <em>XML Path Language 2.0</em>,
      ed. Anders Berglund et al.
       
      
      23 January 2007.
       See <a href="http://www.w3.org/TR/xpath20/" shape="rect">http://www.w3.org/TR/xpath20/</a>
      <span class="annotation">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </span>
     </dd><dt class="label"><a name="bib-xslt2" id="bib-xslt2" shape="rect"></a>XSLT 2.0</dt><dd>
      World Wide Web Consortium.
      <em>XSL Transformations (XSLT) Version 2.0</em>, 
      ed. Michael Kay.
       23 January 2007.
      See <a href="http://www.w3.org/TR/xslt20/" shape="rect">http://www.w3.org/TR/xslt20/</a>
      <span class="annotation">
       The edition cited is the one current at the date of publication of this
       specification. Implementations <span class="rfc2119">may</span> follow the edition cited and/or
       any later edition(s); it is implementation-defined which.
      </span>
     </dd></dl></div><div class="div2">
<h3><span class="nav"><a href="#normative-references" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="nonnormative-references" id="nonnormative-references" shape="rect"></a>L.2 Non-normative</h3><dl><dt class="label"><a name="ABK-DW" id="ABK-DW" shape="rect"></a>Br&#252;ggemann-Klein / Wood 1998</dt><dd>
      Br&#252;ggemann-Klein, Anne, and 
       Derick Wood.
      <em>One-Unambiguous Regular Languages</em>.
      
      <em>Information and Computation</em>
      140 (1998): 229-253.  
      Also appears as 142 (1998): 182-206.
     </dd><dt class="label"><a name="bib-chamberlin-2006" id="bib-chamberlin-2006" shape="rect"></a>Chamberlin 2006</dt><dd>
     Chamberlin, Don.
     <em>Impact of precisionDecimal on XPath and XQuery</em> 
     Email to the W3C XML Query and W3C XSL Working
     Groups, 16 May 2006. Available online at  <a href="http://www.w3.org/XML/2007/dc.pd.xml" shape="rect">http://www.w3.org/XML/2007/dc.pd.xml</a> and <a href="http://www.w3.org/XML/2007/dc.pd.html" shape="rect">http://www.w3.org/XML/2007/dc.pd.html</a>
    </dd><dt class="label"><a name="ref-dcd" id="ref-dcd" shape="rect"></a>DCD</dt><dd>
     Bray, Tim, Charles Frankston, and Ashok Malhotra, ed.,
     <em>Document Content Description
      for XML (DCD)</em>.
     
      
     Submission to the World Wide Web Consortium 31-July-1998.
      [A submission to W3C from International Business Machines
       Corporation and Microsoft Corporation.]
      See <a href="http://www.w3.org/TR/1998/NOTE-dcd-19980731" shape="rect">http://www.w3.org/TR/1998/NOTE-dcd-19980731</a> 
    </dd><dt class="label"><a name="ref-ddml" id="ref-ddml" shape="rect"></a>DDML</dt><dd>
     Bourret, Ronald, et al., ed.,
     <em>Document Definition Markup Language
     (DDML) Specification, Version 1.0</em>.
     W3C Note, 19-Jan-1999.
     [A submission to W3C from 
      GMD - Forschungszentrum Informationstechnik GmbH.]
     See <a href="http://www.w3.org/TR/1999/NOTE-ddml-19990119" shape="rect">http://www.w3.org/TR/1999/NOTE-ddml-19990119 
     </a></dd><dt class="label"><a name="ref-xs11req" id="ref-xs11req" shape="rect"></a>Requirements for XML Schema 1.1</dt><dd>
     World Wide Web Consortium.
      <em>Requirements for XML
       Schema 1.1</em>, ed. Charles Campbell, Ashok Malhotra, and
      Priscilla Walmsley. W3C, 21 January 2003. See <a href="http://www.w3.org/TR/xmlschema-11-req/" shape="rect">http://www.w3.org/TR/xmlschema-11-req/</a> 
    </dd><dt class="label"><a name="ref-rolp" id="ref-rolp" shape="rect"></a>Rule of Least Power</dt><dd><em>The Rule of Least Power</em>, 
     ed. Tim Berners-Lee
     and Noah Mendelsohn.
     W3C TAG Finding 23 February 2006.
     See <a href="http://www.w3.org/2001/tag/doc/leastPower.html" shape="rect">http://www.w3.org/2001/tag/doc/leastPower.html</a>.
    </dd><dt class="label"><a name="ref-sox" id="ref-sox" shape="rect"></a>SOX</dt><dd> 
     Fuchs, Matthew, Murray Maloney, and Alex Milowski.
     <em>Schema for Object-oriented XML</em>. 
     Submitted to W3C 19980915.
     [A submission to W3C by Veo Systems Inc.]
     
     See
      <a href="http://www.w3.org/TR/1998/NOTE-SOX-19980930/" shape="rect">http://www.w3.org/TR/1998/NOTE-SOX-19980930/</a>
    </dd><dt class="label"><a name="ref-sox-1.1" id="ref-sox-1.1" shape="rect"></a>SOX-2</dt><dd> 
     Davidson, Andrew, et al.
     <em>Schema for Object-oriented XML 2.0</em>. 
     See <a href="http://www.w3.org/TR/NOTE-SOX/" shape="rect">http://www.w3.org/TR/NOTE-SOX/</a></dd><dt class="label"><a name="bib-schemapath" id="bib-schemapath" shape="rect"></a>SchemaPath</dt><dd>
     Marinelli, Paolo, Claudio Sacerdoti Coen, and Fabio Vitali.
     <em>SchemaPath, a
     Minimal Extension to XML Schema for Conditional Constraints</em>.
     
     In <em>Proceedings of the Thirteenth International World
     Wide Web Conference</em>, New York: ACM Press, 2004,
     pp. 164-174.
     
     Available on the Web in the ACM Digital Library; citation at
     <a href="http://portal.acm.org/citation.cfm?doid=988672.988695" shape="rect">
     http://portal.acm.org/citation.cfm?doid=988672.988695</a>.
     
     <em></em>
    </dd><dt class="label"><a name="UAAG-1.0" id="UAAG-1.0" shape="rect"></a>UAAG 1.0</dt><dd>
     World Wide Web Consortium.
     <em>User Agent Accessibility Guidelines 1.0</em>, 
     ed. Ian Jacobs, 
      Jon Gunderson, and
      Eric Hansen.
      W3C Recommendation 17 December 2002.
     See <a href="http://www.w3.org/TR/UAAG10/" shape="rect">http://www.w3.org/TR/UAAG10/</a>.
    </dd><dt class="label"><a name="UAAG-2.0" id="UAAG-2.0" shape="rect"></a>UAAG 2.0</dt><dd>World Wide Web Consortium.
     <em>User Agent Accessibility Guidelines (UAAG) 2.0</em>, 
     ed. James Allan, Jan Richards, and
      Jeanne Spellman.
      W3C Working Draft 11 March 2009.
     See <a href="http://www.w3.org/TR/UAAG20/" shape="rect">http://www.w3.org/TR/UAAG20/</a>.
    </dd><dt class="label"><a name="ref-xdr" id="ref-xdr" shape="rect"></a>XDR</dt><dd> 
     Frankston, Charles, and Henry S. Thompson.
     <em>XML-Data Reduced</em>,
      
     3 July 1998.  
     <span class="annotation">["This note is a refinement of 
       the January 1998 XML-Data submission 
       http://www.w3.org/TR/1998/NOTE-XML-data-0105/."]</span>
     See <a href="http://www.ltg.ed.ac.uk/~ht/XMLData-Reduced.htm" shape="rect">http://www.ltg.ed.ac.uk/~ht/XMLData-Reduced.htm 
     </a> </dd><dt class="label"><a name="ref-xsreq" id="ref-xsreq" shape="rect"></a>XML Schema Requirements</dt><dd> 
      World Wide Web Consortium.
      <em>XML Schema Requirements </em>,
      ed. Ashok Malhotra and Murray Maloney 
      W3C
       Note 15 February 1999.
      See <a href="http://www.w3.org/TR/NOTE-xml-schema-req" shape="rect">http://www.w3.org/TR/NOTE-xml-schema-req</a> 
    </dd><dt class="label"><a name="ref-scds" id="ref-scds" shape="rect"></a>XML Schema: Component Designators</dt><dd>
     World Wide Web Consortium.
     <em>XML Schema: Component Designators</em>, ed. Mary
     Holstege and Asir Vedamuthu.  
     W3C Working Draft 17 November 2008.
     See <a href="http://www.w3.org/TR/xmlschema-ref/" shape="rect">http://www.w3.org/TR/xmlschema-ref/</a>.
    </dd><dt class="label"><a name="bib-expo" id="bib-expo" shape="rect"></a>XML Schema: Primer</dt><dd>
     World Wide Web Consortium.
     <em>XML Schema Part 0: Primer
     Second Edition</em>, 
     ed.
     Priscilla Walmsley and
      and David C. Fallside.W3C Recommendation 28 October 2004.
     See <a href="http://www.w3.org/TR/xmlschema-0/" shape="rect">http://www.w3.org/TR/xmlschema-0/</a></dd><dt class="label"><a name="ref-xml-data" id="ref-xml-data" shape="rect"></a>XML-Data</dt><dd>
     Layman, Andrew, et al.
     <em>XML-Data</em>.
     W3C Note 05 Jan 1998.
     <span class="annotation">[A submission to W3C by
      Microsoft, ArborText, DataChannel, and Inso.]</span>
     See <a href="http://www.w3.org/TR/1998/NOTE-XML-data-0105/" shape="rect">http://www.w3.org/TR/1998/NOTE-XML-data-0105/</a> 
    </dd><dt class="label"><a name="bib-xpath1" id="bib-xpath1" shape="rect"></a>XPath 1.0</dt><dd>
     World Wide Web Consortium.
     <em>XML Path Language</em>, 
     ed. James Clark and Steve DeRose 
     
     W3C Recommendation 16 November 1999.
     See <a href="http://www.w3.org/TR/xpath" shape="rect">http://www.w3.org/TR/xpath</a>
    </dd><dt class="label"><a name="ref-xpointer" id="ref-xpointer" shape="rect"></a>XPointer</dt><dd><a name="anchor5167a3" id="anchor5167a3" shape="rect"></a>
     
      World Wide Web Consortium.
      
      <em>XPointer Framework</em>, 
       ed. Paul Grosso et al.
       W3C Recommendation 25 March 2003. See
       <a href="http://www.w3.org/TR/xptr-framework/" shape="rect">http://www.w3.org/TR/xptr-framework/</a>
      
    </dd></dl></div></div><div class="div1">
<h2><a name="acknowledgments" id="acknowledgments" shape="rect"></a>M Acknowledgements (non-normative)</h2><p>The following contributed material to version 1.0 of this specification:</p><blockquote><p>David Fallside, IBM<br clear="none" />Scott Lawrence, Agranat Systems<br clear="none" />Andrew Layman, Microsoft<br clear="none" />Eve L. Maler, Sun Microsystems<br clear="none" />Asir S. Vedamuthu, webMethods, Inc</p></blockquote><p>The Working Group thanks the members of other W3C Working
Groups and industry experts in other forums who have contributed
directly or indirectly to the creation of this document and its
predecessor.</p><p>The work of C. M. Sperberg-McQueen
as a co-editor of this specification was supported by the World
Wide Web Consortium through January 2009, and beginning in 
February 2009 by Black Mesa Technologies LLC.
</p><p>At the time this Working Draft is published, the members 
in good standing of the XML Schema Working Group are:</p><ul><li>Paul V. Biron, Invited expert</li><li>David Ezell, National Association of Convenience Stores (NACS) (<i>chair</i>) </li><li>Shudi (Sandy) Gao &#39640;&#27530;&#38237;, IBM</li><li>Mary Holstege, Mark Logic</li><li>Michael Kay, Invited expert</li><li>Paolo Marinelli, University of Bologna</li><li>Noah Mendelsohn, IBM</li><li>Dave Peterson, Invited expert</li><li>C. M. Sperberg-McQueen, invited expert</li><li>Henry S. Thompson, University of Edinburgh and W3C (<i>staff contact</i>) </li><li>Scott Tsao, The Boeing Company</li><li>Fabio Vitali, University of Bologna</li><li>Stefano Zacchiroli, University of Bologna</li></ul><p>The XML Schema Working Group has benefited in its work from the
participation and contributions of a number of people who are no
longer members of the Working Group in good standing at the time 
of publication of this Working Draft.  Their names are given below.  
In particular we note
with sadness the accidental death of Mario Jeckle shortly before
publication of the first Working Draft of XML Schema 1.1.
Affiliations given are (among) those current at the time of the
individuals' work with the WG.
</p><ul><li>Paula Angerstein, Vignette Corporation</li><li>Leonid Arbouzov, Sun Microsystems</li><li>Jim Barnette, Defense Information Systems Agency (DISA)</li><li>David Beech, Oracle Corp.</li><li>Gabe Beged-Dov, Rogue Wave Software</li><li>Laila Benhlima, Ecole Mohammadia d'Ingenieurs Rabat (EMI)</li><li>Doris Bernardini, Defense Information Systems Agency (DISA)</li><li>Don Box, DevelopMentor</li><li>Allen Brown, Microsoft</li><li>Lee Buck, TIBCO Extensibility</li><li>Greg Bumgardner, Rogue Wave Software</li><li>Dean Burson, Lotus Development Corporation</li><li>Charles E. Campbell, Invited expert</li><li>Oriol Carbo, University of Edinburgh</li><li>Wayne Carr, Intel</li><li>Peter Chen, Bootstrap Alliance and LSU</li><li>Tyng-Ruey Chuang, Academia Sinica</li><li>Tony Cincotta, NIST</li><li>David Cleary, Progress Software</li><li>Mike Cokus, MITRE</li><li>Dan Connolly, W3C (<i>staff contact</i>) </li><li>Ugo Corda, Xerox</li><li>Roger L. Costello, MITRE</li><li>Joey Coyle, Health Level Seven</li><li>Haavard Danielson, Progress Software</li><li>Josef Dietl, Mozquito Technologies</li><li>Kenneth Dolson, Defense Information Systems Agency (DISA)</li><li>Andrew Eisenberg, Progress Software</li><li>Rob Ellman, Calico Commerce</li><li>Tim Ewald, Developmentor</li><li>Alexander Falk, Altova GmbH</li><li>David Fallside, IBM</li><li>George Feinberg, Object Design</li><li>Dan Fox, Defense Logistics Information Service (DLIS)</li><li>Charles Frankston, Microsoft</li><li>Matthew Fuchs, Commerce One</li><li>Andrew Goodchild, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Xan Gregg, TIBCO Extensibility</li><li>Paul Grosso, Arbortext, Inc</li><li>Martin Gudgin, DevelopMentor</li><li>Ernesto Guerrieri, Inso</li><li>Dave Hollander, Hewlett-Packard Company (<i>co-chair</i>) </li><li>Nelson Hung, Corel</li><li>Jane Hunter, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Michael Hyman, Microsoft</li><li>Renato Iannella, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Mario Jeckle, DaimlerChrysler</li><li>Rick Jelliffe, Academia Sinica</li><li>Marcel Jemio, Data Interchange Standards Association</li><li>Simon Johnston, Rational Software</li><li>Kohsuke Kawaguchi, Sun Microsystems</li><li>Dianne Kennedy, Graphic Communications Association</li><li>Janet Koenig, Sun Microsystems</li><li>Setrag Khoshafian, Technology Deployment International (TDI)</li><li>Melanie Kudela, Uniform Code Council</li><li>Ara Kullukian, Technology Deployment International (TDI)</li><li>Andrew Layman, Microsoft</li><li>Dmitry Lenkov, Hewlett-Packard Company</li><li>Bob Lojek, Mozquito Technologies</li><li>John McCarthy, Lawrence Berkeley National Laboratory</li><li>Matthew MacKenzie, XML Global</li><li>Eve Maler, Sun Microsystems</li><li>Ashok Malhotra, IBM, Microsoft, Oracle</li><li>Murray Maloney, Muzmo Communication, acting for Commerce One</li><li>Lisa Martin, IBM</li><li>Jim Melton, Oracle Corp</li><li>Adrian Michel, Commerce One</li><li>Alex Milowski, Invited expert</li><li>Don Mullen, TIBCO Extensibility</li><li>Ravi Murthy, Oracle</li><li>Murata Makoto, Xerox</li><li>Chris Olds, Wall Data</li><li>Frank Olken, Lawrence Berkeley National Laboratory</li><li>David Orchard, BEA Systems, Inc.</li><li>Paul Pedersen, Mark Logic Corporation</li><li>Shriram Revankar, Xerox</li><li>Mark Reinhold, Sun Microsystems</li><li>Jonathan Robie, Software AG</li><li>Cliff Schmidt, Microsoft</li><li>John C. Schneider, MITRE</li><li>Eric Sedlar, Oracle Corp.</li><li>Lew Shannon, NCR</li><li>Anli Shundi, TIBCO Extensibility</li><li>William Shea, Merrill Lynch</li><li>Jerry L. Smith, Defense Information Systems Agency (DISA)</li><li>John Stanton, Defense Information Systems Agency (DISA)</li><li>Tony Stewart, Rivcom</li><li>Bob Streich, Calico Commerce</li><li>William K. Stumbo, Xerox</li><li>Hoylen Sue, Distributed Systems Technology Centre (DSTC Pty Ltd)</li><li>Ralph Swick, W3C</li><li>John Tebbutt, NIST</li><li>Ross Thompson, Contivo</li><li>Matt Timmermans, Microstar</li><li>Jim Trezzo, Oracle Corp.</li><li>Steph Tryphonas, Microstar</li><li>Mark Tucker, Health Level Seven</li><li>Asir S. Vedamuthu, webMethods, Inc</li><li>Scott Vorthmann, TIBCO Extensibility</li><li>Priscilla Walmsley, XMLSolutions</li><li>Norm Walsh, Sun Microsystems</li><li>Cherry Washington, Defense Information Systems Agency (DISA)</li><li>Aki Yoshida, SAP AG</li><li>Kongyi Zhou, Oracle</li></ul></div></div></body>
</html>