index.html 1.43 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
<?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 2: Datatypes</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 2: Datatypes</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-2-20110721/" shape="rect">http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/</a> 
</dd><dt>Latest version:</dt><dd><a href="http://www.w3.org/TR/xmlschema11-2/" shape="rect">http://www.w3.org/TR/xmlschema11-2/</a></dd><dt>Previous version:</dt><dd>
<a href="http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/" shape="rect">http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/</a>

</dd><dt>Editors (Version 1.1):</dt><dd>David Peterson, invited expert (SGML<em>Works!</em>) <a href="mailto:davep@iit.edu" shape="rect">&lt;davep@iit.edu&gt;</a></dd><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>Ashok Malhotra, Oracle Corporation <a href="mailto:ashokmalhotra@alum.mit.edu" shape="rect">&lt;ashokmalhotra@alum.mit.edu&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>Paul V. Biron, Kaiser Permanente, for Health Level Seven <a href="mailto:paul@sparrow-hawk.org" shape="rect">&lt;paul@sparrow-hawk.org&gt;</a></dd><dd>Ashok Malhotra, Oracle Corporation <a href="mailto:ashokmalhotra@alum.mit.edu" shape="rect">&lt;ashokmalhotra@alum.mit.edu&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-2-20110721/datatypes.xml" shape="rect">XML</a>, <a href="datatypes.diff-1.0.html" shape="rect">XHTML with changes since version 1.0 marked</a>, <a href="datatypes.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>, 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.org/" 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>
<em>XML Schema: Datatypes</em> is part 2 of the specification of
the XML Schema language. It defines facilities for defining datatypes
to be used in XML Schemas as well as other XML specifications. The
datatype language, which is itself represented in XML, provides a superset of the
capabilities found in XML
document type definitions (DTDs) for specifying datatypes on elements
and attributes.
</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 Part 2: Datatypes.  
     It 
      
     is here made available for
     review by W3C members and the
     public.   This version of this document was created on 
     21 July 2011.
   </p><p id="p-changes-since-prev-wd">
    
    Changes since the previous public Working Draft include the following:
</p><ul><li><div class="p">Enumerations, value constraints, and identity constraints
now use both identity and equality in checking to see
whether values match.  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">Some incompatibilities between the regular expression
  grammars of XSD 1.0 and (earlier drafts of) XSD 1.1 have been removed,
  and some corner cases in the handling of character classes 
  involving '<code>-</code>' have been clarified.
  This change resolves issue
  <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11125" shape="rect">11125
  Regex grammar for 1.1 renders some 1.0 regexes invalid</a>.
  </div></li><li><div class="p">The rules against unions with special datatypes as members,
  and against lists with special datatypes as item type, have
  been made clearer and more explicit.  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 normative reference to <a href="#UnicodeDB" shape="rect">[Unicode Database]</a> has
       been changed to specify that processors are required to
       support the version normatively referred to 
       <em>or any later version</em>; this makes it easier for
       processors to support current versions of the Unicode
       database instead of being tied to an out of date 
       version of that resource.  At the same time, version-specific
       information about the Unicode database has been moved
       to a separate document, <a href="#unicode-escapes" shape="rect">[Unicode block names]</a>,
       for more convenient maintenance.
       </div><div class="p">These changes resolve issue
       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8732" shape="rect">8732
       Unicode 5.2</a>.
       </div></li><li><div class="p">
The <code>precisionDecimal</code> datatype has been removed
since there does not seem to be sufficient consensus in
the community for its retention.</div></li><li><div class="p">The description of character classes has been adjusted to make
clear that single-letter classes like C, L, or M are not in fact
defined by Unicode, and to warn that not all users of Unicode use
the same definition of C. </div></li><li><div class="p">Typographic errors in the regular expression describing the
lexical space of <a href="#duration" shape="rect">duration</a> have been corrected; this
resolves issue
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=12657" shape="rect">12657
Regex for durationLexicalRep in 3.3.7.2 Lexical Mapping</a>.
</div></li><li><div class="p">The lexical mapping for times of the form '<code>24:00:00</code>' (with
or without a trailing decimal point and zeroes) has been specified
explicitly.</div></li><li><div class="p">A number of small clarifications and corrections of typographic errors.</div></li></ul><p>For those primarily interested in the changes since version 1.0,
the <a href="#changes" shape="rect">Changes since version 1.0 (&#167;I)</a> appendix, which summarizes both changes
already made and also those in prospect, with links to the relevant
sections of this draft, is the recommended starting point.  
An
accompanying version of this document displays in color all changes to
normative text since version 1.0; another shows changes since the
previous Working Draft.</p><p>The major changes since version 1.0 include:</p><ul><li><div class="p">Support for XML 1.1 has been added.  It is now implementation
defined whether datatypes dependent on definitions in 
<a href="#XML" shape="rect">[XML]</a> and <a href="#XMLNS" shape="rect">[Namespaces in XML]</a> use the definitions
as found in version 1.1 or version 1.0 of those specifications.
</div></li><li><div class="p">In order to align this specification with those being prepared by
the XSL and XML Query Working Groups, a new datatype named
<a href="#anyAtomicType" shape="rect">anyAtomicType</a> which
serves as the base type definition for all primitive atomic
datatypes has been introduced.</div></li><li><div class="p">The conceptual model of the date- and time-related types has been
defined more formally.</div></li><li><div class="p">A more formal treatment of the fundamental facets of the primitive
datatypes has been adopted.</div></li><li><div class="p">More formal definitions of the lexical space of most types have
been provided, with detailed descriptions of the mappings from lexical
representation to value and from value to <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">The validation rule 
<a href="#cvc-datatype-valid" shape="rect">Datatype Valid (&#167;4.1.4)</a> has been recast in more declarative form.
A paraphrase of the constraint in procedural terms, which corrects
some errors in the previous versions of this document, has been added
as a note.</div></li><li><div class="p">The rules governing partial
implementations of infinite datatypes have been clarified.</div></li><li><div class="p">Various changes have been made in order to align the relevant
parts of this specification more closely with other relevant
specifications, including especially the corresponding
sections of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.</div></li></ul><p>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>)
and note explicitly that
you have not made a Bugzilla entry for the comment.
Each Bugzilla entry and email message should contain only one
comment.</p><p>
     
     
       The review period for this Candidate Recommendation document
       extends until 21 August 2011.
     
   </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>
    (possibly with editorial
    changes, and possibly removing features identified as being
    at risk) 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>
    
    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 the XML Schema language version 1.1 are
discussed in the <a href="http://www.w3.org/TR/2003/WD-xmlschema-11-req-20030121/" shape="rect">Requirements 
for XML Schema 1.1</a> document. 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="#purpose" shape="rect">Purpose</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.3 <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.4 <a href="#requirements" shape="rect">Requirements</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.5 <a href="#scope" shape="rect">Scope</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.6 <a href="#terminology" shape="rect">Terminology</a>
<br clear="none" />
&#160;&#160;&#160;&#160;1.7 <a href="#constraints-and-contributions" shape="rect">Constraints and Contributions</a>
<br clear="none" />
2 <a href="#typesystem" shape="rect">Datatype System</a><br clear="none" />
&#160;&#160;&#160;&#160;2.1 <a href="#datatype" shape="rect">Datatype</a>
<br clear="none" />
&#160;&#160;&#160;&#160;2.2 <a href="#value-space" shape="rect">Value space</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#identity" shape="rect">Identity</a> &#183; <a href="#equality" shape="rect">Equality</a> &#183; <a href="#order" shape="rect">Order</a></div>

&#160;&#160;&#160;&#160;2.3 <a href="#lexical-space" shape="rect">The Lexical Space and Lexical Mapping</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#canonical-lexical-representation" shape="rect">Canonical Mapping</a></div>

&#160;&#160;&#160;&#160;2.4 <a href="#datatype-dichotomies" shape="rect">Datatype
Distinctions</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#atomic-vs-list" shape="rect">Atomic vs. List vs. Union Datatypes</a> &#183; <a href="#primitive-vs-derived" shape="rect">Special vs. Primitive vs.
Ordinary
Datatypes</a> &#183; <a href="#derivation" shape="rect">Definition, Derivation, Restriction, and Construction</a> &#183; <a href="#built-in-vs-user-derived" shape="rect">Built-in vs. User-Defined Datatypes</a></div>

3 <a href="#built-in-datatypes" shape="rect">Built-in Datatypes and Their Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;3.1 <a href="#namespaces" shape="rect">Namespace considerations</a>
<br clear="none" />
&#160;&#160;&#160;&#160;3.2 <a href="#special-datatypes" shape="rect">Special Built-in Datatypes</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#anySimpleType" shape="rect">anySimpleType</a> &#183; <a href="#anyAtomicType" shape="rect">anyAtomicType</a></div>

&#160;&#160;&#160;&#160;3.3 <a href="#built-in-primitive-datatypes" shape="rect">Primitive Datatypes</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#string" shape="rect">string</a> &#183; <a href="#boolean" shape="rect">boolean</a> &#183; <a href="#decimal" shape="rect">decimal</a> &#183; <a href="#float" shape="rect">float</a> &#183; <a href="#double" shape="rect">double</a> &#183; <a href="#duration" shape="rect">duration</a> &#183; <a href="#dateTime" shape="rect">dateTime</a> &#183; <a href="#time" shape="rect">time</a> &#183; <a href="#date" shape="rect">date</a> &#183; <a href="#gYearMonth" shape="rect">gYearMonth</a> &#183; <a href="#gYear" shape="rect">gYear</a> &#183; <a href="#gMonthDay" shape="rect">gMonthDay</a> &#183; <a href="#gDay" shape="rect">gDay</a> &#183; <a href="#gMonth" shape="rect">gMonth</a> &#183; <a href="#hexBinary" shape="rect">hexBinary</a> &#183; <a href="#base64Binary" shape="rect">base64Binary</a> &#183; <a href="#anyURI" shape="rect">anyURI</a> &#183; <a href="#QName" shape="rect">QName</a> &#183; <a href="#NOTATION" shape="rect">NOTATION</a></div>

&#160;&#160;&#160;&#160;3.4 <a href="#ordinary-built-ins" shape="rect">Other Built-in Datatypes</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#normalizedString" shape="rect">normalizedString</a> &#183; <a href="#token" shape="rect">token</a> &#183; <a href="#language" shape="rect">language</a> &#183; <a href="#NMTOKEN" shape="rect">NMTOKEN</a> &#183; <a href="#NMTOKENS" shape="rect">NMTOKENS</a> &#183; <a href="#Name" shape="rect">Name</a> &#183; <a href="#NCName" shape="rect">NCName</a> &#183; <a href="#ID" shape="rect">ID</a> &#183; <a href="#IDREF" shape="rect">IDREF</a> &#183; <a href="#IDREFS" shape="rect">IDREFS</a> &#183; <a href="#ENTITY" shape="rect">ENTITY</a> &#183; <a href="#ENTITIES" shape="rect">ENTITIES</a> &#183; <a href="#integer" shape="rect">integer</a> &#183; <a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a> &#183; <a href="#negativeInteger" shape="rect">negativeInteger</a> &#183; <a href="#long" shape="rect">long</a> &#183; <a href="#int" shape="rect">int</a> &#183; <a href="#short" shape="rect">short</a> &#183; <a href="#byte" shape="rect">byte</a> &#183; <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a> &#183; <a href="#unsignedLong" shape="rect">unsignedLong</a> &#183; <a href="#unsignedInt" shape="rect">unsignedInt</a> &#183; <a href="#unsignedShort" shape="rect">unsignedShort</a> &#183; <a href="#unsignedByte" shape="rect">unsignedByte</a> &#183; <a href="#positiveInteger" shape="rect">positiveInteger</a> &#183; <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> &#183; <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> &#183; <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a></div>

4 <a href="#datatype-components" shape="rect">Datatype components</a><br clear="none" />
&#160;&#160;&#160;&#160;4.1 <a href="#rf-defn" shape="rect">Simple Type Definition</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#dc-defn" shape="rect">The Simple Type Definition Schema Component</a> &#183; <a href="#xr-defn" shape="rect">XML Representation of Simple Type Definition Schema Components</a> &#183; <a href="#defn-rep-constr" shape="rect">Constraints on XML Representation of Simple Type Definition</a> &#183; <a href="#defn-validation-rules" shape="rect">Simple Type Definition Validation Rules</a> &#183; <a href="#defn-coss" shape="rect">Constraints on Simple Type Definition Schema Components</a> &#183; <a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions</a></div>

&#160;&#160;&#160;&#160;4.2 <a href="#rf-fund-facets" shape="rect">Fundamental Facets</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#rf-ordered" shape="rect">ordered</a> &#183; <a href="#rf-bounded" shape="rect">bounded</a> &#183; <a href="#rf-cardinality" shape="rect">cardinality</a> &#183; <a href="#rf-numeric" shape="rect">numeric</a></div>

&#160;&#160;&#160;&#160;4.3 <a href="#rf-facets" shape="rect">Constraining Facets</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#rf-length" shape="rect">length</a> &#183; <a href="#rf-minLength" shape="rect">minLength</a> &#183; <a href="#rf-maxLength" shape="rect">maxLength</a> &#183; <a href="#rf-pattern" shape="rect">pattern</a> &#183; <a href="#rf-enumeration" shape="rect">enumeration</a> &#183; <a href="#rf-whiteSpace" shape="rect">whiteSpace</a> &#183; <a href="#rf-maxInclusive" shape="rect">maxInclusive</a> &#183; <a href="#rf-maxExclusive" shape="rect">maxExclusive</a> &#183; <a href="#rf-minExclusive" shape="rect">minExclusive</a> &#183; <a href="#rf-minInclusive" shape="rect">minInclusive</a> &#183; <a href="#rf-totalDigits" shape="rect">totalDigits</a> &#183; <a href="#rf-fractionDigits" shape="rect">fractionDigits</a> &#183; <a href="#rf-assertions" shape="rect">Assertions</a> &#183; <a href="#rf-explicitTimezone" shape="rect">explicitTimezone</a></div>

5 <a href="#conformance" shape="rect">Conformance</a><br clear="none" />
&#160;&#160;&#160;&#160;5.1 <a href="#hostlangs" shape="rect">Host Languages</a>
<br clear="none" />
&#160;&#160;&#160;&#160;5.2 <a href="#independent-impl" shape="rect">Independent implementations</a>
<br clear="none" />
&#160;&#160;&#160;&#160;5.3 <a href="#data-conformance" shape="rect">Conformance of data</a>
<br clear="none" />
&#160;&#160;&#160;&#160;5.4 <a href="#partial-implementation" shape="rect">Partial Implementation of Infinite Datatypes</a>
<br clear="none" />
</div>
<h3><a name="appendices" id="appendices" shape="rect"></a>Appendices</h3>
<div class="toc">A <a href="#schema" shape="rect">Schema for Schema Documents (Datatypes)
 (normative)</a><br clear="none" />
B <a href="#dtd-for-datatypeDefs" shape="rect">DTD for Datatype Definitions (non-normative)</a><br clear="none" />
C <a href="#prim.nxsd" shape="rect">Illustrative XML representations for the built-in simple type definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;C.1 <a href="#sec-prim-nxsd" shape="rect">Illustrative XML representations for the built-in primitive type definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;C.2 <a href="#drvd.nxsd" shape="rect">Illustrative XML representations for the built-in ordinary type definitions</a>
<br clear="none" />
D <a href="#constructedValueSpaces" shape="rect">Built-up Value Spaces</a><br clear="none" />
&#160;&#160;&#160;&#160;D.1 <a href="#sec-numericalValues" shape="rect">Numerical Values</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#sec-exactmaps" shape="rect">Exact Lexical Mappings</a></div>

&#160;&#160;&#160;&#160;D.2 <a href="#d-t-values" shape="rect">Date/time Values</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#theSevenPropertyModel" shape="rect">The Seven-property Model</a> &#183; <a href="#rf-lexicalMappings-datetime" shape="rect">Lexical Mappings</a></div>

E <a href="#ap-funcDefs" shape="rect">Function
Definitions</a><br clear="none" />
&#160;&#160;&#160;&#160;E.1 <a href="#sec-generic-number-functions" shape="rect">Generic Number-related Functions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;E.2 <a href="#sec-duration-functions" shape="rect">Duration-related Definitions</a>
<br clear="none" />
&#160;&#160;&#160;&#160;E.3 <a href="#sec-dt-functions" shape="rect">Date/time-related Definitions</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#sec-normalization" shape="rect">Normalization of property values</a> &#183; <a href="#sec-aux-functions" shape="rect">Auxiliary Functions</a> &#183; <a href="#sec-dt-arith" shape="rect">Adding durations to dateTimes</a> &#183; <a href="#sec-timeontimeline" shape="rect">Time on timeline</a> &#183; <a href="#sec-dt-lexmaps" shape="rect">Lexical mappings</a> &#183; <a href="#sec-dt-canmaps" shape="rect">Canonical Mappings</a></div>

&#160;&#160;&#160;&#160;E.4 <a href="#sec-misc-lexmaps" shape="rect">Lexical and Canonical Mappings for Other Datatypes</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#sec-hexbin-lexmaps" shape="rect">Lexical and canonical mappings for </a></div>

F <a href="#sec-datatypes-and-facets" shape="rect">Datatypes and Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;F.1 <a href="#app-fundamental-facets" shape="rect">Fundamental Facets</a>
<br clear="none" />
G <a href="#regexs" shape="rect">Regular Expressions</a><br clear="none" />
&#160;&#160;&#160;&#160;G.1 <a href="#regex-branch" shape="rect">Regular expressions and branches</a>
<br clear="none" />
&#160;&#160;&#160;&#160;G.2 <a href="#regex-piece" shape="rect">Pieces, atoms, quantifiers</a>
<br clear="none" />
&#160;&#160;&#160;&#160;G.3 <a href="#regex-char-metachar" shape="rect">Characters and metacharacters</a>
<br clear="none" />
&#160;&#160;&#160;&#160;G.4 <a href="#charcter-classes" shape="rect">Character Classes</a>

<div style="margin-left: 4em; margin-top: 0; margin-bottom: 0;">
<a href="#charclassexps" shape="rect">Character class expressions</a> &#183; <a href="#cces" shape="rect">Character Class Escapes</a></div>

H <a href="#idef-idep" shape="rect">Implementation-defined and implementation-dependent features (normative)</a><br clear="none" />
&#160;&#160;&#160;&#160;H.1 <a href="#impl-def" shape="rect">Implementation-defined features</a>
<br clear="none" />
&#160;&#160;&#160;&#160;H.2 <a href="#impl-dep" shape="rect">Implementation-dependent features</a>
<br clear="none" />
I <a href="#changes" shape="rect">Changes since version 1.0</a><br clear="none" />
&#160;&#160;&#160;&#160;I.1 <a href="#sec-chdtfacets" shape="rect">Datatypes and Facets</a>
<br clear="none" />
&#160;&#160;&#160;&#160;I.2 <a href="#sec-chnum" shape="rect">Numerical Datatypes</a>
<br clear="none" />
&#160;&#160;&#160;&#160;I.3 <a href="#sec-chdt" shape="rect">Date/time Datatypes</a>
<br clear="none" />
&#160;&#160;&#160;&#160;I.4 <a href="#sec-chother" shape="rect">Other changes</a>
<br clear="none" />
J <a href="#normative-glossary" shape="rect">Glossary (non-normative)</a><br clear="none" />
K <a href="#biblio" shape="rect">References</a><br clear="none" />
&#160;&#160;&#160;&#160;K.1 <a href="#normative-biblio" shape="rect">Normative</a>
<br clear="none" />
&#160;&#160;&#160;&#160;K.2 <a href="#non-normative-biblio" shape="rect">Non-normative</a>
<br clear="none" />
L <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><div class="div2">
<h3><span class="nav"> <a href="#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 two 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 the XML Schema specification, including the XML transfer syntax
for schemas itself.</div></li></ul><p>These goals are slightly in tension with one another -- the
following summarizes the Working Group's strategic guidelines for
changes between versions 1.0 and 1.1:</p><ol class="enumar"><li><div class="p">Add 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">Allow bug fixes (unless in specific cases we decide that the
fix is too disruptive for a point release)</div></li><li><div class="p">Allow editorial changes</div></li><li><div class="p">Allow design cleanup to change behavior in edge
cases</div></li><li><div class="p">Allow relatively non-disruptive changes to type hierarchy (to
better support current and forthcoming international standards and W3C
recommendations)</div></li><li><div class="p">Allow design cleanup to change component structure (changes
to functionality restricted to edge cases)</div></li><li><div class="p">Do not allow any significant changes in functionality</div></li><li><div class="p">Do not allow any changes to XML transfer syntax except those
required by version control hooks and bug fixes</div></li></ol><p>The overall aim as regards 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 validation 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, and
when they are conformant to version 1.0 (or are made conformant by the
removal of versioning information), should have the same validation
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="#intro-relatedWork" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="purpose" id="purpose" shape="rect"></a>1.2 Purpose</h3><p>
The <a href="#XML" shape="rect">[XML]</a> specification defines limited
facilities for applying datatypes to document content in that documents
may contain or refer to DTDs that assign types to elements and attributes.
However, document authors, including authors of traditional
<em>documents</em> and those transporting <em>data</em> in XML,
often require a higher degree of type checking to ensure robustness in
document understanding and data interchange.
</p><p>
The table below offers two typical examples of XML instances
in which datatypes are implicit: the instance on the left
represents a billing invoice, the instance on the
right a memo or perhaps an email message in XML.
</p><table class="dtdemo" border="1"><thead><tr><th rowspan="1" colspan="1">Data oriented</th><th rowspan="1" colspan="1">Document oriented</th></tr></thead><tbody><tr><td rowspan="1" colspan="1">
<pre xml:space="preserve">&lt;invoice&gt;
  &lt;orderDate&gt;1999-01-21&lt;/orderDate&gt;
  &lt;shipDate&gt;1999-01-25&lt;/shipDate&gt;
  &lt;billingAddress&gt;
   &lt;name&gt;Ashok Malhotra&lt;/name&gt;
   &lt;street&gt;123 Microsoft Ave.&lt;/street&gt;
   &lt;city&gt;Hawthorne&lt;/city&gt;
   &lt;state&gt;NY&lt;/state&gt;
   &lt;zip&gt;10532-0000&lt;/zip&gt;
  &lt;/billingAddress&gt;
  &lt;voice&gt;555-1234&lt;/voice&gt;
  &lt;fax&gt;555-4321&lt;/fax&gt;
&lt;/invoice&gt;</pre>
</td><td rowspan="1" colspan="1">
<pre xml:space="preserve">&lt;memo importance='high'
      date='1999-03-23'&gt;
  &lt;from&gt;Paul V. Biron&lt;/from&gt;
  &lt;to&gt;Ashok Malhotra&lt;/to&gt;
  &lt;subject&gt;Latest draft&lt;/subject&gt;
  &lt;body&gt;
    We need to discuss the latest
    draft &lt;emph&gt;immediately&lt;/emph&gt;.
    Either email me at &lt;email&gt;
    mailto:paul.v.biron@kp.org&lt;/email&gt;
    or call &lt;phone&gt;555-9876&lt;/phone&gt;
  &lt;/body&gt;
&lt;/memo&gt;</pre>
</td></tr></tbody></table><p>
The invoice contains several dates and telephone numbers, the postal
abbreviation for a state (which comes from an enumerated list of
sanctioned values), and a ZIP code (which takes a definable regular
form).&#160; The memo contains many of the same types of information:
a date, telephone number, email address and an "importance" value
(from an enumerated list, such as "low", "medium" or "high").&#160;
Applications which process invoices and memos need to raise exceptions
if something that was supposed to be a date or telephone number does
not conform to the rules for valid dates or telephone numbers.
</p><p>
In both cases, validity constraints exist on the content of the
instances that are not expressible in XML DTDs.&#160; The limited
datatyping facilities in XML have prevented validating XML processors
from supplying the rigorous type checking required in these
situations.&#160; The result has been that individual applications
writers have had to implement type checking in an ad hoc manner.&#160;
This specification addresses the need of both document authors and
applications writers for a robust, extensible datatype system for XML
which could be incorporated into XML processors.&#160; As discussed
below, these datatypes could be used in other XML-related standards as
well.
</p></div><div class="div2">
<h3><span class="nav"><a href="#purpose" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#requirements" 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.3 Dependencies on Other Specifications</h3><p>Other specifications on which this one depends
are listed in <a href="#biblio" shape="rect">References (&#167;K)</a>.</p><p>This specification defines some datatypes which depend on
definitions in <a href="#XML" shape="rect">[XML]</a> and <a href="#XMLNS" shape="rect">[Namespaces in XML]</a>; those
definitions, and therefore the datatypes based on them, vary between
version 1.0 (<a href="#XML1.0" shape="rect">[XML 1.0]</a>,
<a href="#XMLNS1.0" shape="rect">[Namespaces in XML 1.0]</a>) and version 1.1 (<a href="#XML" shape="rect">[XML]</a>,
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>) of those specifications.  In any given use
of this specification, the choice of the 1.0 or the 1.1 definition of
those datatypes is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.
</p><p>
Conforming implementations of this specification 
may 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> 
When this specification is used to check the datatype validity of XML
input, 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 using the 1.0 datatypes if
the input is labeled 1.0, but this 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><p id="loc5321">This specification
makes use of the EBNF notation used in the 
<a href="#XML" shape="rect">[XML]</a> specification.&#160;Note
that some constructs of the EBNF notation used here
resemble the regular-expression syntax defined in this specification
(<a href="#regexs" shape="rect">Regular Expressions (&#167;G)</a>), but that they are not
identical: there are differences.
 For a fuller description of the EBNF notation, see
<a href="http://www.w3.org/TR/xml11/#sec-notation" shape="rect">Section
6.&#160;Notation</a> of the <a href="#XML" shape="rect">[XML]</a> specification.</p></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> <a href="#scope" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="requirements" id="requirements" shape="rect"></a>1.4 Requirements</h3><p>
The <a href="#schema-requirements" shape="rect">[XML Schema Requirements]</a> document spells out
concrete requirements to be fulfilled by this specification,
which state that the XML Schema Language must:
</p><ol class="enumar"><li><div class="p">
provide for primitive data typing, including byte, date,
integer, sequence, SQL and Java primitive datatypes, etc.;
</div></li><li><div class="p">
define a type system that is adequate for import/export
from database systems (e.g., relational, object, OLAP);
</div></li><li><div class="p">
distinguish requirements relating to lexical data representation
vs. 
those governing an underlying information set;
</div></li><li><div class="p">
allow creation of user-defined datatypes, such as
datatypes that are derived from existing datatypes and which
may constrain certain of its properties (e.g., range,
precision, length, format).
</div></li></ol></div><div class="div2">
<h3><span class="nav"><a href="#requirements" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#terminology" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="scope" id="scope" shape="rect"></a>1.5 Scope</h3><p>
This specification
defines datatypes that can be used in an XML Schema.&#160;
These datatypes can be specified for element content that would be
specified as <a href="http://www.w3.org/TR/xml11/#dt-chardata" shape="rect">#PCDATA</a>
and attribute values of <a href="http://www.w3.org/TR/xml11/#sec-attribute-types" shape="rect">various types </a> in a
DTD.&#160; It is the intention of this specification that it be usable
outside of the context of XML Schemas for a wide range of other
XML-related activities such as <a href="#XSL" shape="rect">[XSL]</a> and
<a href="#RDFSchema" shape="rect">[RDF Schema]</a>.
</p></div><div class="div2">
<h3><span class="nav"><a href="#scope" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#constraints-and-contributions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="terminology" id="terminology" shape="rect"></a>1.6 Terminology</h3><p>
The terminology used to describe XML Schema Datatypes is defined in
the body of this specification. The terms defined in the following
list are used in building those definitions and in describing the
actions of a datatype processor:
</p><div class="glist"><div class="gitem"><div class="giLabel">
       <span class="termdef"><a name="dt-compatibility" id="dt-compatibility" title="" shape="rect">[Definition:]&#160;&#160;</a>for compatibility</span>
      </div><div class="giDef"><div class="p">
	A feature of this specification included solely to ensure that
	schemas which use this feature remain compatible with <a href="#XML" shape="rect">[XML]</a>.
       </div></div></div><div class="gitem"><div class="giLabel">
       <span class="termdef"><a name="dt-match" id="dt-match" title="" shape="rect">[Definition:]&#160;&#160;</a><b>match</b></span>
      </div><div class="giDef"><div class="p">
	<em>(Of strings or names:)</em> 
	Two strings or names being compared must be
	identical. Characters with multiple possible representations in
	ISO/IEC 10646 (e.g. characters with both precomposed and
	base+diacritic forms) match only if they have the same representation
	in both strings. No case folding is performed. 
       </div><div class="p"><em>(Of strings and rules
	 in the grammar:)</em> 
	A string matches a grammatical production 
	if and only if it belongs to the language
	generated by that production.
       </div></div></div><div class="gitem"><div class="giLabel">
       <span class="termdef"><a name="dt-may" id="dt-may" title="" shape="rect">[Definition:]&#160;&#160;</a><span class="rfc2119">may</span></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="termdef"><a name="dt-should" id="dt-should" title="" shape="rect">[Definition:]&#160;&#160;</a><span class="rfc2119">should</span></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="termdef"><a name="dt-must" id="dt-must" title="" shape="rect">[Definition:]&#160;&#160;</a><span class="rfc2119">must</span></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="termdef"><a name="dt-mustnot" id="dt-mustnot" title="" shape="rect">[Definition:]&#160;&#160;</a><span class="rfc2119">must not</span></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">
       <span class="termdef"><a name="dt-error" id="dt-error" title="" shape="rect">[Definition:]&#160;&#160;</a><b>error</b></span>
      </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
	from those with errors;
	
	if a schema
	 used in type-validation 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 more than one of the constraints given in 
	 this specification is violated, 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 the violations, and which, are
	 reported.
       </div><div class="note"><div class="p"><b>Note:</b> Failure of an XML element or attribute to be
	 datatype-valid against a particular
	 datatype in a particular schema is not in itself a failure 
	 to conform to this specification and thus,
	 for purposes of this specification, not an error.  
	</div></div></div></div><div class="gitem"><div class="giLabel">
       <span class="termdef"><a name="dt-useroption" id="dt-useroption" title="" shape="rect">[Definition:]&#160;&#160;</a><b>user option</b></span>
      </div><div class="giDef"><div class="p">A choice left under the control of the user of a processor,
	rather than being fixed for all users or uses of the processor.	
	</div><div class="p">Statements in this specification that "Processors
	<span class="rfc2119">may</span> at user option" behave in a certain way mean that
	processors <span class="rfc2119">may</span> provide mechanisms to allow users
	(i.e. invokers of the processor) to enable or disable the
	behavior indicated.  Processors which do not provide such
	user-operable controls <span class="rfc2119">must not</span> behave in the way indicated.
	Processors which do provide such 
	user-operable controls <span class="rfc2119">must</span> make it possible for the user 
	to disable the optional behavior.
	</div><div class="note"><div class="p"><b>Note:</b> The normal expectation is that the default setting for
	  such options will be to disable the 
	  optional
	  behavior in question,
	  enabling it only when the user explicitly requests it.  This
	  is not, however, a requirement of conformance: if the
	  processor's documentation makes clear that the user can
	  disable the optional
	  behavior, then invoking the processor without
	  requesting that it be disabled can be taken as equivalent to
	  a request that it be enabled.
	  It is required,
	  however, that it in fact be possible for the user to disable the
	  optional behavior.
	  </div></div><div class="note"><div class="p"><b>Note:</b> Nothing in this specification constrains the manner
	  in which processors allow users to control user options.
	  Command-line options, menu choices in a graphical user
	  interface, environment variables, alternative call patterns
	  in an application programming interface, and other 
	  mechanisms may all be taken as providing user options.
	  </div></div></div></div></div></div><div class="div2">
<h3><span class="nav"><a href="#terminology" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="constraints-and-contributions" id="constraints-and-contributions" shape="rect"></a>1.7 Constraints and Contributions</h3><p>
This specification provides three different kinds of normative
statements about schema components, their representations in XML and
their contribution to the schema-validation of information items:
</p><div class="glist"><div class="gitem"><div class="giLabel">
<span class="termdef"><a name="dt-cos" id="dt-cos" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>Constraint on Schemas</b>
</span>
</div><div class="giDef"><div class="p">
Constraints on the schema components themselves, i.e. conditions
components <a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> satisfy to be components at all.
Largely to be found in <a href="#datatype-components" shape="rect">Datatype components (&#167;4)</a>.
</div></div></div><div class="gitem"><div class="giLabel">
<span class="termdef"><a name="dt-src" id="dt-src" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>Schema Representation Constraint</b>
</span>
</div><div class="giDef"><div class="p">
Constraints on the representation of schema components in XML.&#160;
Some but not all of these are expressed in <a href="#schema" shape="rect">Schema for Schema Documents (Datatypes)
 (normative) (&#167;A)</a> and
<a href="#dtd-for-datatypeDefs" shape="rect">DTD for Datatype Definitions (non-normative) (&#167;B)</a>.
</div></div></div><div class="gitem"><div class="giLabel">
<span class="termdef"><a name="dt-cvc" id="dt-cvc" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>Validation Rule</b>
</span>
</div><div class="giDef"><div class="p">
Constraints expressed by schema components which information items
<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> satisfy to be schema-valid.&#160; Largely to
be found in <a href="#datatype-components" shape="rect">Datatype components (&#167;4)</a>.
</div></div></div></div></div></div><div class="div1">
<h2><a name="typesystem" id="typesystem" shape="rect"></a>2 Datatype System</h2><p>This section describes the conceptual framework behind the datatype system defined in this
specification.&#160; The framework has been influenced by the
<a href="#ISO11404" shape="rect">[ISO 11404]</a> standard on language-independent datatypes as
well as the datatypes for <a href="#SQL" shape="rect">[SQL]</a> and for programming
languages such as Java.</p><p>The datatypes discussed in this specification are for the most part well known abstract
concepts such as <em>integer</em> and <em>date</em>. It is not
the place of this specification to thoroughly define these abstract concepts; many
other publications provide excellent definitions.  However, this specification will attempt to describe the
abstract concepts well enough that they can be readily recognized and
distinguished from other abstractions with which they may be
confused.</p><div class="note"><div class="p"><b>Note:</b> Only those operations and relations needed for schema processing
are defined in this specification. Applications using these datatypes
are generally expected to implement appropriate additional functions
and/or relations to make the datatype generally useful.&#160; For
example, the description herein of the <a href="#float" shape="rect">float</a> datatype
does not define addition or multiplication, much less all of the
operations defined for that datatype in <a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a> on
which it is based.&#160;
For some datatypes (e.g. 
<a href="#language" shape="rect">language</a> or <a href="#anyURI" shape="rect">anyURI</a>) defined in part by
reference to other specifications which impose constraints not part of
the datatypes as defined here, applications may also wish to check
that values conform to the requirements given in the current version
of the relevant external specification.
</div></div><div class="div2">
<h3><span class="nav"> <a href="#value-space" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="datatype" id="datatype" shape="rect"></a>2.1 Datatype</h3><div class="p"><div class="termdef"><a name="dt-datatype" id="dt-datatype" title="" shape="rect">[Definition:]&#160;&#160;</a>In
this specification, a <b>datatype</b> has
three properties:

<ul><li><div class="p">A <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, which is a set of
values. </div></li><li><div class="p">A <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, which is a set of
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> used to denote the values.</div></li><li><div class="p">A small collection of <em>functions, relations, and
procedures</em> associated with the datatype.&#160; Included are
equality and (for some datatypes)
order relations on the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, and a
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>, which is a mapping from the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> 
into 
the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.</div></li></ul>
</div>
</div><div class="note"><div class="p"><b>Note:</b> This specification only defines the operations and relations needed
for schema processing.&#160; The choice of terminology for
describing/naming the datatypes is selected to guide users and
implementers in how to expand the datatype to be generally
useful&#8212;i.e., how to recognize the "real world"
datatypes and their variants for which the datatypes defined herein
are meant to be used for data interchange.</div></div><p>Along with the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> it is
often useful to have an inverse which provides a standard 
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> for each value.&#160; Such
a <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is not required for
schema processing, but is described herein for the benefit of users of
this specification, and other specifications which might find it
useful to reference these descriptions normatively.
For some datatypes, notably
<a href="#QName" shape="rect">QName</a> and <a href="#NOTATION" shape="rect">NOTATION</a>, the mapping from
lexical representations to values is context-dependent; for these
types, no <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is defined.</p><div class="note"><div class="p"><b>Note:</b> 
Where <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mappings<span class="arrow">&#183;</span></a> are defined in this specification, they are
defined for <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes. When a datatype is derived  using facets which directly
constrain the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, then for each value eliminated from the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, the corresponding lexical representations are dropped
from the lexical space.  The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> for such a datatype is
a subset of the <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> for its <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> type and
provides a <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for each value remaining in the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.
</div><div class="p">
The <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a>
facet, on the other hand, and
any other (<a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>) 
<a href="#dt-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical<span class="arrow">&#183;</span></a> facets,
restrict
the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> directly.  When more than one lexical
representation is provided for a given value, 
such facets
may 
remove the <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> while
permitting a different lexical representation; in this case, the value
remains in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> but has no <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.
This specification provides no recourse in such situations.
Applications are free to deal with it as they see fit.
</div></div><div class="note"><div class="p"><b>Note:</b> This specification sometimes uses the shorter form "type"
where one might strictly speaking expect the longer form
"datatype" (e.g. in the phrases 
"union type", "list type", 
"base type", "item type", etc.
No systematic distinction is intended between
the forms of these phrase with "type" and
those with "datatype";
the two forms are used interchangeably.</div><div class="p">The distinction between "datatype"
and "simple type definition", by contrast,
carries more information:  the datatype is characterized by its
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>, etc., as
just described, independently of the specific facets or
other definitional mechanisms used in the simple type 
definition to describe that particular <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
or <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>.  Different simple type definitions
with different selections of facets can describe the
same datatype.
</div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#datatype" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#lexical-space" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="value-space" id="value-space" shape="rect"></a>2.2 Value space</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.1 <a href="#identity" shape="rect">Identity</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.2 <a href="#equality" shape="rect">Equality</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.2.3 <a href="#order" shape="rect">Order</a><br clear="none" />
</div><p><span class="termdef"><a name="dt-value-space" id="dt-value-space" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>value space</b> <em>of a
datatype</em> is the set of values for that
datatype.</span>&#160; Associated with each value space are
selected operations and relations necessary to permit proper schema
processing.&#160; Each value in the value space of a 
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> or <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>
datatype is
denoted by one or more character strings in its <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>,
according to <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>the lexical
mapping<span class="arrow">&#183;</span></a>; <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a>
datatypes, by contrast, may include "ineffable"
values not mapped to by any lexical representation. 
(If the mapping is restricted during a
derivation in such a way that a value has no denotation, that value is
dropped from the value space.)</p><p>The value spaces of datatypes are abstractions,
and are defined in <a href="#built-in-datatypes" shape="rect">Built-in Datatypes and Their Definitions (&#167;3)</a> 

to the extent needed to clarify them for readers.&#160; For example,
in defining the numerical datatypes, we assume some general numerical
concepts such as number and integer are known.&#160; In many cases we
provide references to other documents providing more complete
definitions.</p><div class="note"><div class="p"><b>Note:</b> <em>The value spaces and the values therein are
abstractions.</em>&#160; This specification does not prescribe any
particular internal representations that must be used when
implementing these datatypes.&#160; In some cases, there are
references to other specifications which do prescribe specific
internal representations; these specific internal representations must
be used to comply with those other specifications, but need not be
used to comply with this specification.</div><div class="p">In addition, other applications are expected to define additional
appropriate operations and/or relations on these value spaces (e.g.,
addition and multiplication on the various numerical datatypes'
value spaces), and are permitted where appropriate to even redefine
the operations and relations defined within this specification,
provided that <em>for schema processing the relations and operations
used are those defined herein</em>.</div></div><div class="block">The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of a datatype can
be defined in one of the following ways:
<ul><li><div class="p">defined elsewhere
axiomatically from fundamental notions (intensional definition) [see
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>]</div></li><li><div class="p">enumerated outright from values
of an already defined datatype (extensional definition) [see
<a href="#dt-enumeration" class="termref" shape="rect"><span class="arrow">&#183;</span>enumeration<span class="arrow">&#183;</span></a>]</div></li><li><div class="p">defined by restricting the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of an already
defined datatype to a particular subset with a given set of properties
[see <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>]</div></li><li><div class="p">defined as a combination of values from one or more already
defined <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>(s) by a specific construction procedure [see
<a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> and <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>]</div></li></ul></div><p>The relations of <em>identity</em>
and
<em>equality</em> 
are required for each
value space.  An 
order relation is specified for some value spaces, but not 
all.
A very few datatypes have other relations or
operations prescribed for the purposes of this specification.</p><div class="div3">
<h4><a name="identity" id="identity" shape="rect"></a>2.2.1 Identity</h4><p>The identity relation is always defined. Every value space
inherently has an identity relation. Two things are
<em>identical</em> if and only
if they are actually the same thing: i.e., if there is no way
whatever to tell them apart.&#160; 
</p><div class="note"><div class="p"><b>Note:</b> This does not preclude implementing datatypes by using more than
one <em>internal</em> representation for a given value, provided
no mechanism inherent in the datatype implementation (i.e., other than
bit-string-preserving "casting" of the datum to a different
datatype) will distinguish between the two representations.</div></div><p>In the identity relation defined herein, values from different
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes' <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> are made artificially
distinct if they might otherwise be considered identical.&#160; For
example, there is a number <em>two</em> in the <a href="#decimal" shape="rect">decimal</a> datatype and a number <em>two</em> in the <a href="#float" shape="rect">float</a> datatype.&#160; In the identity relation defined herein,
these two values are considered distinct.&#160; Other applications
making use of these datatypes may choose to consider values such as
these identical, but for the view of <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes'
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> used herein, they are distinct.</p><p><em>WARNING:</em>&#160; Care must be taken when identifying
values across distinct primitive datatypes.&#160; The
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> '<code>0.1</code>' and '<code>0.10000000009</code>' map
to the same value in <a href="#float" shape="rect">float</a> (neither 0.1 nor 0.10000000009 is in the value space, and
each literal is mapped to the
nearest value, namely 0.100000001490116119384765625), but map to
distinct values in <a href="#decimal" shape="rect">decimal</a>.</p><div class="note"><div class="p"><b>Note:</b> Datatypes <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> by <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a> do not create new
values; they define subsets of some <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatype's
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.  A consequence of this fact is that the <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>
'<code>+2</code>', treated as a <a href="#decimal" shape="rect">decimal</a>,
'<code>+2</code>', treated as an <a href="#integer" shape="rect">integer</a>, and
'<code>+2</code>', treated as a <a href="#byte" shape="rect">byte</a>, all denote the
same value.  They are not only equal but identical.</div></div><p>Given a list <var>A</var> and a list <var>B</var>, <var>A</var> and <var>B</var>
are the same list if they are the same sequence of atomic values.
The necessary and sufficient conditions for this identity are
that <var>A</var> and <var>B</var> have the same length and that the items of <var>A</var>
are pairwise identical to the items of <var>B</var>.
</p><div class="note"><div class="p"><b>Note:</b> It is a consequence of the rule just given for list identity
that there is only one empty list.  An empty list declared as
having <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> <a href="#decimal" shape="rect">decimal</a> and an empty
list declared as having <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> <a href="#string" shape="rect">string</a> 
are not only equal but identical.
</div></div></div><div class="div3">
<h4><a name="equality" id="equality" shape="rect"></a>2.2.2 Equality</h4><p>Each <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatype has prescribed an equality relation for
its value space.&#160; The equality relation for most datatypes is the
identity relation.&#160; In the few cases where it is not, 
equality 
has been carefully defined so that for
most  operations of
interest to the datatype, if
two values are equal and one is substituted for the other as an
argument to any of the operations, the results will always also be
equal.</p><p>On the other hand, equality need not cover the entire value space
of the datatype (though it usually does). In 
particular, NaN
is not equal to itself in the 
 
<a href="#float" shape="rect">float</a> and 
<a href="#double" shape="rect">double</a> datatypes.</p><p>This
equality relation is used in
conjunction with identity when
making <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restrictions<span class="arrow">&#183;</span></a> by <em>enumeration</em>, 
when checking identity constraints (in the context of
<a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>)
and when checking value 
constraints.  It is used in 
conjunction with order when making
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restrictions<span class="arrow">&#183;</span></a> involving order.  The 
equality relation used in the evaluation of XPath expressions
may differ.&#160; When
<a href="http://www.w3.org/TR/xpath20/#id-expression-processing" shape="rect">processing
XPath expressions</a> as part of XML schema-validity
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-va" shape="rect">assessment</a> or
otherwise testing membership in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of a datatype whose derivation involves <a href="#dt-assertions" class="termref" shape="rect"><span class="arrow">&#183;</span>assertions<span class="arrow">&#183;</span></a>,
equality (like all other relations) within those expressions is interpreted
using the rules of XPath (<a href="#XPATH2" shape="rect">[XPath 2.0]</a>).&#160; 

All comparisons for
"sameness" prescribed by this specification
test for either 
equality or identity, 
not for identity alone.</p><div class="note"><div class="p"><b>Note:</b> In the prior version of this specification (1.0), equality was
always identity.&#160; This has been changed to permit the datatypes
defined herein to more closely match the "real world"
datatypes for which  they are intended to be used as transmission
formats.</div><div class="p">For example, the <a href="#float" shape="rect">float</a> datatype has an equality
which is not the identity (&#160;&#8722;0&#160;=&#160;+0&#160;, but
they are not identical&#8212;although they <em>were</em> identical
in the 1.0 version of this specification), and whose domain excludes
one value, NaN, so that&#160; NaN&#160;&#8800;&#160;NaN&#160;.</div><div class="p">For another example, the <a href="#dateTime" shape="rect">dateTime</a> datatype
previously lost any time-zone offset information in the
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> as the value was converted to
<a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a>;
now the time zone offset
is retained and two values representing the same "moment in
time" but with different remembered time zone offsets are now
<em>equal</em> but not <em>identical</em>.</div></div><p>In the equality relation defined herein, values from different
primitive data spaces are made artificially unequal even if they might
otherwise be considered equal.&#160; For example, there is a number
<em>two</em> in the <a href="#decimal" shape="rect">decimal</a> datatype and a number
<em>two</em> in the <a href="#float" shape="rect">float</a> datatype.&#160; In the
equality relation defined herein, these two values are considered
unequal.&#160; Other applications making use of these datatypes may
choose to consider values such as these equal;
nonetheless, in the equality relation defined herein, they are unequal.</p><p>Two lists <var>A</var> and <var>B</var> are equal if and
only if they have the same length and their items are pairwise equal.
A list of length one containing a value <var>V1</var> and an atomic value
<var>V2</var> are equal if and only if <var>V1</var> is equal to <var>V2</var>.
</p><p>For the purposes of this specification, there is one equality
relation for all values of all datatypes (the union of the various
datatype's individual equalities, if one consider relations to be
sets of ordered pairs).&#160; The <em>equality</em> relation is
denoted by '=' and its negation by
'&#8800;', each used as
a binary infix predicate:&#160;
<var>x</var>&#160;=&#160;<var>y</var>&#160; and&#160;
<var>x</var>&#160;&#8800;&#160;<var>y</var>&#160;.&#160; On the other
hand, <em>identity</em> relationships are always described in
words.</p></div><div class="div3">
<h4><a name="order" id="order" shape="rect"></a>2.2.3 Order</h4><p>For some 
datatypes, an order relation is prescribed 
for use in checking
upper and lower bounds of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.&#160; This order may be
a <em>partial</em> order, which means that there may be values in
the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> which are neither equal, less-than, nor
greater-than.&#160; Such value pairs are
<em>incomparable</em>.&#160; In many cases, 
no order
is prescribed; each pair of values is either
equal or <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a>. 
<span class="termdef"><a name="dt-incomparable" id="dt-incomparable" title="" shape="rect">[Definition:]&#160;&#160;</a>Two
values that are neither equal, less-than, nor greater-than are
<b>incomparable</b>. Two values
that are not <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> are
<b>comparable</b>.</span></p><p>The order relation is used
in conjunction with equality when making <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restrictions<span class="arrow">&#183;</span></a>
involving order.&#160; This is the only use of
this
order relation for schema
processing.&#160; Of course, when
<a href="http://www.w3.org/TR/xpath20/#id-expression-processing" shape="rect">processing
XPath expressions</a> as part of XML schema-validity
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-va" shape="rect">assessment</a> or
otherwise testing membership in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of a datatype whose derivation involves <a href="#dt-assertions" class="termref" shape="rect"><span class="arrow">&#183;</span>assertions<span class="arrow">&#183;</span></a>,
order (like all other relations) within those expressions is interpreted
using the rules of XPath (<a href="#XPATH2" shape="rect">[XPath 2.0]</a>).</p><p>In this specification, this less-than order relation is denoted by
'&lt;' (and its inverse by '&gt;'),
the weak order by '&#8804;' (and its inverse by
'&#8805;'), and the resulting <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> relation by
'&lt;&gt;', each used as a binary infix predicate:&#160;
<var>x</var>&#160;&lt;&#160;<var>y</var>&#160;,&#160;
<var>x</var>&#160;&#8804;&#160;<var>y</var>&#160;,&#160;
<var>x</var>&#160;&gt;&#160;<var>y</var>&#160;,&#160;
<var>x</var>&#160;&#8805;&#160;<var>y</var>&#160;, and&#160;
<var>x</var>&#160;&lt;&gt;&#160;<var>y</var>&#160;.</p><div class="note"><div class="p"><b>Note:</b> The weak order "less-than-or-equal" means
"less-than" or "equal" <em>and one
can tell which</em>.&#160; For example, the <a href="#duration" shape="rect">duration</a> P1M (one month) is <em>not</em>
less-than-or-equal P31D (thirty-one days) because P1M is not less than
P31D, nor is P1M equal to P31D.&#160; Instead, P1M is <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> with P31D.)&#160; The formal
definition of order for <a href="#duration" shape="rect">duration</a> (<a href="#duration" shape="rect">duration (&#167;3.3.6)</a>) 
ensures 
that this is true.</div></div><p>For
purposes of this specification, the value spaces of primitive datatypes are
disjoint, even in cases where the
abstractions they represent might be thought of as having 
values in common.&#160; In the order 
relations defined in this specification, values from
different value spaces are 
<a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a>.&#160; For example, the numbers two
and three are values in both the

decimal
datatype and the float datatype.&#160; In the order relation defined
here,
the two in the decimal datatype
is
not less than the three in the float datatype;
the two values are
incomparable.&#160; Other
applications making use of these
datatypes may choose to consider values such as these comparable.</p><div class="note"><div class="p"><b>Note:</b> Comparison of values from different <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes
can sometimes be an error and sometimes not, depending on context.
</div><div class="p">
When made for purposes of checking an enumeration constraint,
such a comparison is not in itself an error, but since
no
two values from different <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> are 
equal, any 
comparison of <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> values will invariably be false.
</div><div class="p">
Specifying an upper or lower bound which is of the wrong primitive
datatype (and therefore <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> with the values of the datatype
it is supposed to restrict) is, by contrast, always an error.
It is a consequence of the rules for
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a> that in conforming simple type definitions, the
values of upper and lower bounds, and enumerated values, <span class="rfc2119">must</span> be
drawn from the value space of the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>, which necessarily means
from the same <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatype.
</div><div class="p">
Comparison of <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> values in the context of an XPath
expression (e.g. in an assertion or in the rules for conditional type
assignment) can raise a dynamic error in the evaluation of the XPath
expression; see <a href="#F_O" shape="rect">[XQuery 1.0 and XPath 2.0 Functions and Operators]</a> for details.</div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#value-space" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#datatype-dichotomies" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="lexical-space" id="lexical-space" shape="rect"></a>2.3 The Lexical Space and Lexical Mapping</h3><p><span class="termdef"><a name="dt-lexical-mapping" id="dt-lexical-mapping" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>lexical mapping</b> for a datatype is a prescribed 
relation
which maps from the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of the datatype
into its <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.</span></p><p><span class="termdef"><a name="dt-lexical-space" id="dt-lexical-space" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>lexical space</b> of a datatype is 
the prescribed set of strings
which
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>the lexical
mapping<span class="arrow">&#183;</span></a> for that datatype
maps to values of that datatype.</span></p><p><span class="termdef"><a name="dt-lexical-representation" id="dt-lexical-representation" title="" shape="rect">[Definition:]&#160;&#160;</a>The members of the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> are
<b>lexical representations</b> of the values to which they are
mapped.</span></p><div class="note"><div class="p"><b>Note:</b> For the <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> datatypes, the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> defined
here map from the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> into, but not onto, the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.
The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> of the <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> datatypes
include "ineffable" values for which the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> defined
in this specification provide no lexical representation.</div><div class="p">For the <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> and <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> atomic datatypes, the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> is a 
(total)
function on the entire <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> <em>onto</em> (not merely
<em>into</em>) the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>:  every member of the
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> maps into the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, and every value is mapped
to by some member of the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>.</div><div class="p">For <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatypes, the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
is not necessarily a function, since the same <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> may map to
different values in different member types.  For <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatypes,
the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> is a function if and only if the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
of the list's <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> is a function.
</div></div><p>
<span class="termdef"><a name="dt-literal" id="dt-literal" title="" shape="rect">[Definition:]&#160;&#160;</a>A sequence of zero or more
characters in the Universal Character Set (UCS) which may or may not
prove upon inspection to be a member of the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of a given
datatype and thus a <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> of a given value in that datatype's
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, is referred to as a <b>literal</b>.</span> The
term is used indifferently both for character sequences which are
members of a particular <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> and for those which are
not.</p><p>If a derivation introduces a
<a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> facet value (a new value for
<a href="#f-w" class="compref" shape="rect">whiteSpace</a> or an implementation-defined
<a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> facet), the corresponding
<a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> transformation of a character string,
if indeed it changed that string, could prevent that string from ever
having the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> of the derived datatype
applied to it.&#160; Character strings that a
<a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> transformation blocks in this way
(i.e., they are not in the range of the <a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a>
facet's transformation) are always dropped from the derived datatype's 
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> One should be aware that in the context of XML
schema-validity
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-va" shape="rect">assessment</a>,
there are <a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> transformations of the
input character string 
(controlled by the
<a href="#f-w" class="compref" shape="rect">whiteSpace</a> facet and any implementation-defined
<a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a>
facets)
which result in the intended <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a>.&#160;
Systems other than
XML schema-validity
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-va" shape="rect">assessment</a>
utilizing this specification may or may not implement these
transformations.&#160; If they do not, then input character strings
that would have been transformed into correct
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a>,
when taken "raw", may not be
correct <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical
representations<span class="arrow">&#183;</span></a>.</div></div><p>Should a derivation be made using a derivation mechanism that
removes <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> from the<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> to the
extent that one or more values cease to have any
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>, then those values are dropped from the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> This could happen by means of a <a href="#f-p" class="compref" shape="rect">pattern</a>
or other <a href="#dt-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical<span class="arrow">&#183;</span></a>
facet, or by a
<a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> facet as described above.</div></div><p>Conversely, should a derivation remove values then their
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> are dropped from the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> unless
there is a facet value whose impact is defined to cause the
otherwise-dropped <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> to be mapped to another
value instead.</p><div class="note"><div class="p"><b>Note:</b> There are currently no facets with such an impact.&#160; There may
be in the future.</div></div><p>For example, '100' and '1.0E2' are two
different <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> from the <a href="#float" shape="rect">float</a>
datatype which
both denote the same value.&#160; The datatype system defined in this
specification provides mechanisms for schema designers to control the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and the corresponding set of acceptable
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> of those values for a datatype.</p><div class="div3">
<h4><a name="canonical-lexical-representation" id="canonical-lexical-representation" shape="rect"></a>2.3.1 Canonical Mapping</h4><p>While the datatypes defined in this specification often have a single <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> for
each value (i.e., each value in the datatype's <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> is
denoted by a single <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>representation<span class="arrow">&#183;</span></a> in its
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>), this is not always the case.&#160; The example in
the previous section shows two <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> from the
<a href="#float" shape="rect">float</a> datatype which denote the same value.</p><p><span class="termdef"><a name="dt-canonical-mapping" id="dt-canonical-mapping" title="" shape="rect">[Definition:]&#160;&#160;</a>The 
<b>canonical mapping</b> is a prescribed subset of the inverse of a
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> which is 
one-to-one and whose domain (where possible) is the entire range of the
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> (the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>).</span>&#160; Thus a 
<a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> selects one
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> for each
value in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.</p><p><span class="termdef"><a name="dt-canonical-representation" id="dt-canonical-representation" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>canonical
representation</b> of a value in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of a datatype is
the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> associated with that value by the
datatype's <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a></span>.</p><p><a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>Canonical
mappings<span class="arrow">&#183;</span></a> are not available for datatypes whose
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> are context dependent (i.e., mappings for which the
value of a <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> depends on the context in which it
occurs, or for which a character string may or may not be a valid
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> similarly depending on its context)</p><div class="note"><div class="p"><b>Note:</b> <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>Canonical
representations<span class="arrow">&#183;</span></a> are provided where feasible for the use of
other applications; they are not required for schema processing
itself.&#160; <em>A conforming schema processor implementation is
not required to implement <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical
mappings<span class="arrow">&#183;</span></a>.</em></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#lexical-space" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="datatype-dichotomies" id="datatype-dichotomies" shape="rect"></a>2.4 Datatype
Distinctions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.4.1 <a href="#atomic-vs-list" shape="rect">Atomic vs. List vs. Union Datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.4.1.1 <a href="#atomic" shape="rect">Atomic Datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.4.1.2 <a href="#list-datatypes" shape="rect">List Datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.4.1.3 <a href="#union-datatypes" shape="rect">Union datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.4.2 <a href="#primitive-vs-derived" shape="rect">Special vs. Primitive vs.
Ordinary
Datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.4.2.1 <a href="#restriction" shape="rect">Facet-based Restriction</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.4.2.2 <a href="#list" shape="rect">Construction by List</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.4.2.3 <a href="#union" shape="rect">Construction by Union</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.4.3 <a href="#derivation" shape="rect">Definition, Derivation, Restriction, and Construction</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;2.4.4 <a href="#built-in-vs-user-derived" shape="rect">Built-in vs. User-Defined Datatypes</a><br clear="none" />
</div><p>It is useful to categorize the datatypes defined in this
specification along various dimensions, defining terms which
can be used to characterize datatypes and the <a href="#std" shape="rect">Simple Type Definition</a>s
which define them.</p><div class="div3">
<h4><a name="atomic-vs-list" id="atomic-vs-list" shape="rect"></a>2.4.1 Atomic vs. List vs. Union Datatypes</h4><p>First, we distinguish <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>,
<a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>, and <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatypes.</p><p><span class="termdef"><a name="dt-atomic-value" id="dt-atomic-value" title="" shape="rect">[Definition:]&#160;&#160;</a>An
<b>atomic value</b> is an elementary value, not
constructed from simpler values by any user-accessible
means defined by this specification.</span></p><ul><li><div class="p"><span class="termdef"><a name="dt-atomic" id="dt-atomic" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Atomic</b> datatypes
are those whose
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> contain only <a href="#dt-atomic-value" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic values<span class="arrow">&#183;</span></a>.&#160; 
<b>Atomic</b> datatypes are  <a href="#anyAtomicType" shape="rect">anyAtomicType</a> and all 
datatypes 
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from it.</span></div></li><li><div class="p"><span class="termdef"><a name="dt-list" id="dt-list" title="" shape="rect">[Definition:]&#160;&#160;</a><b>List</b> datatypes are
those having values each of which consists of a finite-length
(possibly empty) sequence of <a href="#dt-atomic-value" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic values<span class="arrow">&#183;</span></a>.  The values in a list are
drawn from some
<a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatype (or from
a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> of <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatypes), which is
the <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> of the <b>list</b>.  </span></div><div class="note"><div class="p"><b>Note:</b> It is a consequence of constraints normatively specified elsewhere
in this document  (in particular,
the component properties specified in
<a href="#dc-defn" shape="rect">The Simple Type Definition Schema Component (&#167;4.1.1)</a>)
that the <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> of a list <span class="rfc2119">may</span> be any <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>
datatype, or any <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype whose <a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic members<span class="arrow">&#183;</span></a> are all 
<a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatypes
(so a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> of <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatypes is possible, but not a
<a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> of <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>lists<span class="arrow">&#183;</span></a>).  The <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> of a list <span class="rfc2119">must not</span>
itself be a list datatype.</div></div></li><li><div class="p"><span class="termdef"><a name="dt-union" id="dt-union" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Union</b> datatypes
are (a) those whose <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a>,
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a>, and
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> are the union of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a>,
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a>, and
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> of one or more other datatypes, which are the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of the
union, or (b) those derived by
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a> of another union datatype. </span></div><div class="note"><div class="p"><b>Note:</b> It is a consequence of constraints normatively specified
elsewhere in this document  (in particular,
the component properties specified in
<a href="#dc-defn" shape="rect">The Simple Type Definition Schema Component (&#167;4.1.1)</a>)
that any <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> or <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatype <span class="rfc2119">may</span> occur
among the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>.  (In particular,
<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatypes may themselves be members of 
<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>unions<span class="arrow">&#183;</span></a>, as may <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>lists<span class="arrow">&#183;</span></a>.)  The only prohibition is that no <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a>
datatype may be a member of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>.
</div></div></li></ul><p>For example, a single token which <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matches<span class="arrow">&#183;</span></a> <a href="http://www.w3.org/TR/xml11/#NT-Nmtoken" shape="rect">Nmtoken</a> from
<a href="#XML" shape="rect">[XML]</a> is in the value
space of the <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatype <a href="#NMTOKEN" shape="rect">NMTOKEN</a>, while a sequence of such tokens is in the value space of the <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>
datatype <a href="#NMTOKENS" shape="rect">NMTOKENS</a>.
</p><div class="div4">
<h5><a name="atomic" id="atomic" shape="rect"></a>2.4.1.1 Atomic Datatypes</h5><p>An <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatype has a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
consisting of a set of "atomic" or elementary values.</p><div class="note"><div class="p"><b>Note:</b> Atomic values are sometimes regarded, and described, as "not
decomposable", but in fact the values in several datatypes
defined here are described with internal structure, which is appealed
to in checking whether particular values satisfy various constraints
(e.g. upper and lower bounds on a datatype).  Other specifications
which use the datatypes defined here may define operations which
attribute internal structure to values and expose or act upon that
structure.</div></div><p>
The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of an <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatype is a set of <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>
whose internal structure is specific to the datatype in
question.</p><p>There is one <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatype
(<a href="#anyAtomicType" shape="rect">anyAtomicType</a>), and a number of <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>
datatypes which have <a href="#anyAtomicType" shape="rect">anyAtomicType</a> as their
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.&#160; All other <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatypes are <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> either
from one of the <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatypes or from another
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatype.&#160; No <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a> datatype <span class="rfc2119">may</span> have
<a href="#anyAtomicType" shape="rect">anyAtomicType</a> as its <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.</p></div><div class="div4">
<h5><a name="list-datatypes" id="list-datatypes" shape="rect"></a>2.4.1.2 List Datatypes</h5><p><a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>List<span class="arrow">&#183;</span></a> datatypes are always <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> from some other type; they are never
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>.  The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype is
the set of finite-length sequences of


zero or more
<a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>
values
where each <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> value is drawn from the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the lists's <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>
and has a <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> containing no
whitespace. 
The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of a
<a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype is a set of 
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> 
each
of which 
is a space-separated sequence of
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>

of the
<a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>.</p><p><span class="termdef"><a name="dt-itemType" id="dt-itemType" title="" shape="rect">[Definition:]&#160;&#160;</a>
The <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> or <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
datatype that participates in the definition of a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype
is the 
<b>item type</b> 
of that <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype.</span>&#160; If 
the <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> is a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, each of its 
<a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic members<span class="arrow">&#183;</span></a> <span class="rfc2119">must</span> be 
<a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">
&lt;simpleType name='sizes'&gt;
  &lt;list itemType='decimal'/&gt;
&lt;/simpleType&gt;
</pre></div><div class="exampleInner">
<pre xml:space="preserve">
&lt;cerealSizes xsi:type='sizes'&gt; 8 10.5 12 &lt;/cerealSizes&gt;
</pre></div></div><p>A <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype can be 
<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>
from an ordinary 
or
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> 
datatype whose <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> allows
whitespace
(such as <a href="#string" shape="rect">string</a> or <a href="#anyURI" shape="rect">anyURI</a>) or a
<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype any of whose 
<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>'s
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> allows space.
Since <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>
items are separated at whitespace before the
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a>
of the items are mapped to values, no whitespace will ever occur
in the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>
of a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> item, even when the item
type would in principle allow it.&#160; 

For the same reason, when every possible
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> of a given
value in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>
includes whitespace,
that value can never occur as an item in any value of the
<a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">
&lt;simpleType name='listOfString'&gt;
  &lt;list itemType='string'/&gt;
&lt;/simpleType&gt;
</pre></div><div class="exampleInner">
<pre xml:space="preserve">
&lt;someElement xsi:type='listOfString'&gt;
this is not list item 1
this is not list item 2
this is not list item 3
&lt;/someElement&gt;
</pre></div><div class="exampleWrapper">
<div class="p">In the above example, the value of the <em>someElement</em> element
is not a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> of <a href="#dt-length" class="termref" shape="rect"><span class="arrow">&#183;</span>length<span class="arrow">&#183;</span></a> 3;
rather, it is a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> of <a href="#dt-length" class="termref" shape="rect"><span class="arrow">&#183;</span>length<span class="arrow">&#183;</span></a>
18.</div></div></div><div class="block">When a datatype is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> 
by 
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restricting<span class="arrow">&#183;</span></a> a
<a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype, the following
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> apply:
<ul><li><div class="p"><a href="#dt-length" class="termref" shape="rect"><span class="arrow">&#183;</span>length<span class="arrow">&#183;</span></a></div></li><li><div class="p"><a href="#dt-maxLength" class="termref" shape="rect"><span class="arrow">&#183;</span>maxLength<span class="arrow">&#183;</span></a></div></li><li><div class="p"><a href="#dt-minLength" class="termref" shape="rect"><span class="arrow">&#183;</span>minLength<span class="arrow">&#183;</span></a></div></li><li><div class="p"><a href="#dt-enumeration" class="termref" shape="rect"><span class="arrow">&#183;</span>enumeration<span class="arrow">&#183;</span></a></div></li><li><div class="p"><a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a></div></li><li><div class="p"><a href="#dt-whiteSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>whiteSpace<span class="arrow">&#183;</span></a></div></li><li><div class="p"><a href="#dt-assertions" class="termref" shape="rect"><span class="arrow">&#183;</span>assertions<span class="arrow">&#183;</span></a></div></li></ul>
</div><p>For each of <a href="#dt-length" class="termref" shape="rect"><span class="arrow">&#183;</span>length<span class="arrow">&#183;</span></a>, <a href="#dt-maxLength" class="termref" shape="rect"><span class="arrow">&#183;</span>maxLength<span class="arrow">&#183;</span></a>
and <a href="#dt-minLength" class="termref" shape="rect"><span class="arrow">&#183;</span>minLength<span class="arrow">&#183;</span></a>, the 
<em>length</em> is
measured in number 
of list 
items.&#160; The value of <a href="#dt-whiteSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>whiteSpace<span class="arrow">&#183;</span></a>
is fixed to the value <b><i>collapse</i></b>.</p><p>For <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatypes the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>
is composed of space-separated
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>
of the 
<a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>.&#160; 

Any 
<a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> specified when a new datatype is
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype 
applies
to the members of the <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype's
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, not to the members of the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>
of the <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>.&#160; Similarly, 
enumerated
values are compared to the entire <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>, not to
individual list items,
and <a href="#f-a" class="compref" shape="rect">assertions</a> apply to the entire <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> too.
Lists are identical if and only if they have the
same length and their items are pairwise identical; they are
equal if and only if they have the same length and their items
are pairwise equal.  And 
a list of length one whose item is an atomic value <var>V1</var> is
equal or identical 
to an atomic value <var>V2</var> 
if and only if <var>V1</var> is 
equal or identical 
to <var>V2</var>.
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleInner">
<pre xml:space="preserve">&lt;xs:simpleType name='myList'&gt;
	&lt;xs:list itemType='xs:integer'/&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name='myRestrictedList'&gt;
	&lt;xs:restriction base='myList'&gt;
		&lt;xs:pattern value='123 (\d+\s)*456'/&gt;
	&lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;someElement xsi:type='myRestrictedList'&gt;123 456&lt;/someElement&gt;
&lt;someElement xsi:type='myRestrictedList'&gt;123 987 456&lt;/someElement&gt;
&lt;someElement xsi:type='myRestrictedList'&gt;123 987 567 456&lt;/someElement&gt;

</pre></div></div><p>The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> of a 
<a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype maps each value onto the 
space-separated concatenation of the 
<a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical 
representations<span class="arrow">&#183;</span></a> of all the items in the value
(in order), using the <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> of the 
<a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>.</p></div><div class="div4">
<h5><a name="union-datatypes" id="union-datatypes" shape="rect"></a>2.4.1.3 Union datatypes</h5><p>
 
 
 

</p><p>  Union types
may be defined in either of two ways.  When a union type is
<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> by <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, its <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, and
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> are the "ordered unions" of the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a>, <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a>, and <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> of its
<a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a>.</p><p>It will be observed that the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> of a union, so
defined, is not necessarily a function: a given <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> may map to
one value or to several values of different <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes, and
it may be indeterminate which value is to be preferred in a particular
context.  When the datatypes defined here are used in the context of
<a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>, the <code>xsi:type</code> attribute defined by that
specification in section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#xsi_type" shape="rect">xsi:type</a> can be used to indicate
which value a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> which is the content of an element should map
to.  In other contexts, other rules (such as type coercion rules) may
be employed to determine which value is to be used.</p><p>When a union type is defined by
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restricting<span class="arrow">&#183;</span></a> another <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, its <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>,
and <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> are subsets of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a>,
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a>, and <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> of its
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.</p><p><a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>Union<span class="arrow">&#183;</span></a> datatypes are always <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> from other
datatypes; they are never <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>. Currently,
there are no <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>&#160;<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatypes.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">A prototypical example of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> type is the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#p-max_occurs" shape="rect">maxOccurs attribute</a> on the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-element" shape="rect">element element</a>
in XML Schema itself: it is a union of nonNegativeInteger
and an enumeration with the single member, the string "unbounded", as shown below.</div></div><div class="exampleInner">
<pre xml:space="preserve">
  &lt;attributeGroup name="occurs"&gt;
    &lt;attribute name="minOccurs" type="nonNegativeInteger"
    	use="optional" default="1"/&gt;
    &lt;attribute name="maxOccurs"use="optional" default="1"&gt;
      &lt;simpleType&gt;
        &lt;union&gt;
          &lt;simpleType&gt;
            &lt;restriction base='nonNegativeInteger'/&gt;
          &lt;/simpleType&gt;
          &lt;simpleType&gt;
            &lt;restriction base='string'&gt;
              &lt;enumeration value='unbounded'/&gt;
            &lt;/restriction&gt;
          &lt;/simpleType&gt;
        &lt;/union&gt;
      &lt;/simpleType&gt;
    &lt;/attribute&gt;
  &lt;/attributeGroup&gt;
</pre></div></div><p>Any number (zero or more) 

of ordinary
 or
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> 
<a href="#dt-datatype" class="termref" shape="rect"><span class="arrow">&#183;</span>datatypes<span class="arrow">&#183;</span></a>
can participate in a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> type.</p><p><span class="termdef"><a name="dt-memberTypes" id="dt-memberTypes" title="" shape="rect">[Definition:]&#160;&#160;</a>
The datatypes that participate in the
definition of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype are known as the
<b>member types</b> 
of that <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype.</span></p><div class="note"><div class="p"><b>Note:</b> When datatypes are represented using XSD schema components, as
described in <a href="#datatype-components" shape="rect">Datatype components (&#167;4)</a>, the member types of
a union are those simple type definitions given in the <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> property.
</div></div><p><span class="termdef"><a name="dt-transitivemembership" id="dt-transitivemembership" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>transitive membership</b> of
a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> is the set of its own <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a>, and the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a>
of its members, and so on. More formally, if <var>U</var> is a
<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, then (a) its <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> are in the transitive membership
of <var>U</var>, and (b) for any datatypes <var>T1</var> and
<var>T2</var>, if <var>T1</var> is in the transitive membership of
<var>U</var> and <var>T2</var> is one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of
<var>T1</var>, then <var>T2</var> is also in the transitive membership
of <var>U</var>.</span></p><p>The <a href="#dt-transitivemembership" class="termref" shape="rect"><span class="arrow">&#183;</span>transitive membership<span class="arrow">&#183;</span></a>
of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> <span class="rfc2119">must not</span> contain the <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> itself, nor
any datatype <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> or <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> from the <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>.
</p><p><span class="termdef"><a name="dt-basicmember" id="dt-basicmember" title="" shape="rect">[Definition:]&#160;&#160;</a>Those members of the <a href="#dt-transitivemembership" class="termref" shape="rect"><span class="arrow">&#183;</span>transitive membership<span class="arrow">&#183;</span></a>
of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype <var>U</var> which are themselves not <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
datatypes
are the <b>basic members</b> of <var>U</var>.</span></p><p><span class="termdef"><a name="dt-interveningunion" id="dt-interveningunion" title="" shape="rect">[Definition:]&#160;&#160;</a>If a datatype <var>M</var> is in the
<a href="#dt-transitivemembership" class="termref" shape="rect"><span class="arrow">&#183;</span>transitive membership<span class="arrow">&#183;</span></a> of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
datatype <var>U</var>, but not one of <var>U</var>'s <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a>,
then a sequence of one or more <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatypes necessarily exists,
such that the first is one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of <var>U</var>, each
is one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of its predecessor in the sequence, and
<var>M</var> is one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of the last in the sequence.
The <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatypes in this sequence are said to
<b>intervene</b> between <var>M</var> and <var>U</var>. When
<var>U</var> and <var>M</var> are given by the context, the datatypes
in the sequence are referred to as the <b>intervening unions</b>.
When <var>M</var> is one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of <var>U</var>,
the set of <b>intervening unions</b> is the empty set.
</span>
</p><p>
<span class="termdef"><a name="dt-active-member" id="dt-active-member" title="" shape="rect">[Definition:]&#160;&#160;</a>In a valid
instance of any <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, the first of its members in order which
accepts the instance as valid is the <b>active member
type</b>.</span> 
<span class="termdef"><a name="dt-active-basic-member" id="dt-active-basic-member" title="" shape="rect">[Definition:]&#160;&#160;</a>If the <a href="#dt-active-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active member type<span class="arrow">&#183;</span></a> is
itself a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, one of <em>its</em> members will be
<em>its</em> <a href="#dt-active-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active member type<span class="arrow">&#183;</span></a>, and so on, until
finally a <a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic (non-union)
member<span class="arrow">&#183;</span></a> is reached. That <a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic member<span class="arrow">&#183;</span></a> is
the <b>active basic member</b> of the union.</span>
</p><p>The order in which the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> are specified in the
definition (that is, in the case of
datatypes defined in a schema document, the order of the
&lt;simpleType&gt; children of the &lt;union&gt; element, or the order
of the <a href="#QName" shape="rect">QName</a>s in the <code>memberTypes</code>  attribute) is
significant. During validation, an element or attribute's value is
validated against the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> in the order in which they appear
in the definition until a match is found.&#160;  As noted above,
the evaluation order can be overridden with the use of
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#xsi_type" shape="rect">xsi:type</a>.</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">For example, given the definition below, the first instance of the &lt;size&gt; element
validates correctly as an <a href="#integer" shape="rect">integer (&#167;3.4.13)</a>, the second and third as
<a href="#string" shape="rect">string (&#167;3.3.1)</a>.</div></div><div class="exampleInner">
<pre xml:space="preserve">
  &lt;xsd:element name='size'&gt;
    &lt;xsd:simpleType&gt;
      &lt;xsd:union&gt;
        &lt;xsd:simpleType&gt;
          &lt;xsd:restriction base='integer'/&gt;
        &lt;/xsd:simpleType&gt;
        &lt;xsd:simpleType&gt;
          &lt;xsd:restriction base='string'/&gt;
        &lt;/xsd:simpleType&gt;
      &lt;/xsd:union&gt;
    &lt;/xsd:simpleType&gt;
  &lt;/xsd:element&gt;
</pre></div><div class="exampleInner">
<pre xml:space="preserve">
  &lt;size&gt;1&lt;/size&gt;
  &lt;size&gt;large&lt;/size&gt;
  &lt;size xsi:type='xsd:string'&gt;1&lt;/size&gt;
</pre></div></div><p>The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> of 
a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype maps each value onto the 
<a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> of that value obtained 
using the <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> of the first 
<a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member type<span class="arrow">&#183;</span></a> in whose value space it lies.</p><div class="block">
When a datatype is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restricting<span class="arrow">&#183;</span></a> a
<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype, the following
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> apply:
<ul><li><div class="p"><a href="#dt-enumeration" class="termref" shape="rect"><span class="arrow">&#183;</span>enumeration<span class="arrow">&#183;</span></a></div></li><li><div class="p"><a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a></div></li><li><div class="p"><a href="#dt-assertions" class="termref" shape="rect"><span class="arrow">&#183;</span>assertions<span class="arrow">&#183;</span></a></div></li></ul>
</div></div></div><div class="div3">
<h4><a name="primitive-vs-derived" id="primitive-vs-derived" shape="rect"></a>2.4.2 Special vs. Primitive vs.
Ordinary
Datatypes</h4><p>Next, we distinguish <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a>,
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>, and <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> 
(or <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>) datatypes.&#160;
Each
datatype defined by or in accordance
with this specification falls 
into exactly one of these
categories.</p><ul><li><div class="p"><span class="termdef"><a name="dt-special" id="dt-special" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>special</b>
datatypes are <a href="#anySimpleType" shape="rect">anySimpleType</a> and 
<a href="#anyAtomicType" shape="rect">anyAtomicType</a>.</span> They are special by virtue of their
position in the type hierarchy.</div></li><li><div class="p"><span class="termdef"><a name="dt-primitive" id="dt-primitive" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Primitive</b>
datatypes are those 
datatypes that are not
<a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> and are
not defined in terms of other datatypes;
they exist <em>ab initio</em>.</span>
All <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes have 
<a href="#anyAtomicType" shape="rect">anyAtomicType</a> as their
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>, but their <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value<span class="arrow">&#183;</span></a>
and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a>
must be given in prose; they cannot be described as 
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restrictions<span class="arrow">&#183;</span></a> of
<a href="#anyAtomicType" shape="rect">anyAtomicType</a> by the application of particular 
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>.</div><div class="note"><div class="p"><b>Note:</b> As normatively specified elsewhere, 
conforming processors <span class="rfc2119">must</span> support all the
primitive datatypes defined in this specification; it is
<a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether other primitive datatypes are
supported.</div><div class="p">Processors <span class="rfc2119">may</span>, for example,
support the floating-point decimal datatype specified in
<a href="#pd-note" shape="rect">[Precision Decimal]</a>.
</div></div></li><li><div class="p"><span class="termdef"><a name="dt-ordinary" id="dt-ordinary" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Ordinary</b>
datatypes are all datatypes other than the <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> 
and <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes.</span>&#160;

<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>Ordinary<span class="arrow">&#183;</span></a> datatypes
can be understood fully in terms of their <a href="#std" class="compref" shape="rect">Simple Type Definition</a> and 
the properties of the datatypes from which they are <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>.</div></li></ul><p>For example, in this specification, <a href="#float" shape="rect">float</a> is a 
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatype based on 
a well-defined mathematical concept

and
not 
defined in terms of other datatypes, while
<a href="#integer" shape="rect">integer</a> is <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>
from the more general datatype <a href="#decimal" shape="rect">decimal</a>.</p><div class="div4">
<h5><a name="restriction" id="restriction" shape="rect"></a>2.4.2.1 Facet-based Restriction</h5><p><span class="termdef"><a name="dt-fb-restriction" id="dt-fb-restriction" title="" shape="rect">[Definition:]&#160;&#160;</a>A 
datatype is defined by <b>facet-based restriction</b> of another datatype
(its <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>),
when values for zero or more <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> are specified
that serve to constrain its <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and/or its
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> to a subset of those of the
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.</span>
The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of a <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>
<span class="rfc2119">must</span> be a <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> or <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatype.</p></div><div class="div4">
<h5><a name="list" id="list" shape="rect"></a>2.4.2.2 Construction by List</h5><p>A <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype can be <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>
from another datatype (its <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>) by creating
a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> that consists of  
finite-length sequences
of zero or more values of its <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>.
Datatypes so <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>
have <a href="#anySimpleType" shape="rect">anySimpleType</a> as their <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
Note that since the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of any <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> 
datatype are necessarily subsets of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<a href="#anySimpleType" shape="rect">anySimpleType</a>, any datatype <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> as a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> is a 
<a href="#dt-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of its base type.
</p></div><div class="div4">
<h5><a name="union" id="union" shape="rect"></a>2.4.2.3 Construction by Union</h5><p>One datatype can be <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> from one or more 
datatypes
by
unioning
their <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a>
and, consequently, their
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> and
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a>.&#160;
Datatypes so <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>
also have <a href="#anySimpleType" shape="rect">anySimpleType</a> as their <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
Note that since the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of any <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> 
datatype are necessarily subsets of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<a href="#anySimpleType" shape="rect">anySimpleType</a>, any datatype <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> as a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> is a 
<a href="#dt-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of its base type.
</p></div></div><div class="div3">
<h4><a name="derivation" id="derivation" shape="rect"></a>2.4.3 Definition, Derivation, Restriction, and Construction</h4><p>Definition, derivation, restriction, and construction
are conceptually distinct, although in practice
they are frequently performed by the same mechanisms.</p><p>By 'definition' is meant the explicit
identification of the relevant properties of a datatype,
in particular its
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>,
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, and
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>. 
</p><p>The properties of the <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> and the
standard
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes are defined by this 
specification.  A <a href="#std" class="compref" shape="rect">Simple Type Definition</a> is present for each of these 
datatypes in every valid schema; it serves as a representation of the
datatype, but by itself it does not capture all the relevant 
information and does not suffice (without knowledge
of this specification) to <em>define</em> the datatype.</p><div class="note"><div class="p"><b>Note:</b> The properties of any <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>
datatypes are given not here but in the documentation for
the implementation in question.
Alternatively, a primitive datatype
not specified in this document can be specified in a document
of its own not tied to a particular implementation; 
<a href="#pd-note" shape="rect">[Precision Decimal]</a> is an example of such a document.
</div></div><p>For all other datatypes, a <a href="#std" class="compref" shape="rect">Simple Type Definition</a> does suffice.
The properties of an <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatype can be inferred
from the datatype's <a href="#std" class="compref" shape="rect">Simple Type Definition</a> and the properties of
the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>, <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>
if any, and <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> if any.
All <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatypes can be defined in this way.</p><p>By 'derivation' is meant the relation of
a datatype to its <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>, or to the
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of its <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>,
and so on.</p><p><span class="termdef"><a name="dt-basetype" id="dt-basetype" title="" shape="rect">[Definition:]&#160;&#160;</a>Every datatype
other than <a href="#anySimpleType" shape="rect">anySimpleType</a>
is associated with another datatype, its <b>base type</b>. 
<b>Base types</b> can be <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a>, 
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>, or 
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>.
</span>
</p><p><span class="termdef"><a name="dt-immediately-derived" id="dt-immediately-derived" title="" shape="rect">[Definition:]&#160;&#160;</a>A datatype 
<var>T</var> is <b>immediately derived</b> from another datatype 
<var>X</var> if and only if <var>X</var> is the 
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <var>T</var>.</span>
</p><div class="note"><div class="p"><b>Note:</b> The above does not preclude the <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
for <a href="#anySimpleType" shape="rect">anySimpleType</a> from having a value for
its <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.&#160;
(It does, and its value is
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#any-type-itself" shape="rect">anyType</a>.)</div></div><div class="p">
More generally, 
<div class="termdef"><a name="dt-derived" id="dt-derived" title="" shape="rect">[Definition:]&#160;&#160;</a>A datatype <var>R</var> 
is <b>derived</b> from another 
datatype <var>B</var> if and only if one of the following is true:
 <ul><li><div class="p"><var>B</var> is the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> 
of <var>R</var>.
</div></li><li><div class="p">There is some datatype <var>X</var>
such that <var>X</var> is the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> 
of <var>R</var>, and <var>X</var> is derived from
<var>B</var>.</div></li></ul>
</div>
</div><p>A datatype <span class="rfc2119">must not</span> be 
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from itself.  That is, the
base type relation must be acyclic.</p><p>It is a consequence of the above
that every datatype other than <a href="#anySimpleType" shape="rect">anySimpleType</a> is
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
from <a href="#anySimpleType" shape="rect">anySimpleType</a>.</p><p>Since each datatype has exactly one <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>,
and every datatype other
than <a href="#anySimpleType" shape="rect">anySimpleType</a>
is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> directly or
indirectly from <a href="#anySimpleType" shape="rect">anySimpleType</a>, it follows that
the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> relation arranges all
simple types into a tree structure, which is conventionally
referred to as the <em>derivation hierarchy</em>.</p><p>By 'restriction' is meant the definition
of a datatype whose <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> are 
subsets of those of its <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.</p><div class="block">Formally,
<span class="termdef"><a name="dt-restriction" id="dt-restriction" title="" shape="rect">[Definition:]&#160;&#160;</a>A datatype <var>R</var> 
is a <b>restriction</b> of another 
datatype <var>B</var> when</span>
 <ul><li><div class="p">the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <var>R</var> is a subset of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of <var>B</var>, and 
</div></li><li><div class="p">the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <var>R</var> is a subset of the 
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <var>B</var>.
</div></li></ul>
</div><p>
Note that all three forms of datatype <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>construction<span class="arrow">&#183;</span></a> produce 
<a href="#dt-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restrictions<span class="arrow">&#183;</span></a> of the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>:
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a> does so by means of 
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>, 
while <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>construction<span class="arrow">&#183;</span></a> by <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> or <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> does so because those 
<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructions<span class="arrow">&#183;</span></a> take 
<a href="#anySimpleType" shape="rect">anySimpleType</a> as the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>. It follows that all
datatypes are <a href="#dt-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restrictions<span class="arrow">&#183;</span></a> 
of <a href="#anySimpleType" shape="rect">anySimpleType</a>.
This specification provides no means by which a datatype may be
defined so as to have a larger <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> or <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> 
than its <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
</p><p></p><p>By 'construction' is meant the creation of a
datatype by defining it in terms of another.</p><p>
<span class="termdef"><a name="dt-constructed" id="dt-constructed" title="" shape="rect">[Definition:]&#160;&#160;</a>All
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatypes are defined in terms of, or
<b>constructed</b> from, other datatypes, either by 
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restricting<span class="arrow">&#183;</span></a> the 
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> or <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> 
of a <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> using zero or more
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>
or by specifying the new datatype as a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> of items of some
<a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>,
or by defining it as a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> of some specified 
sequence of <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a>.</span>
These three forms of <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>construction<span class="arrow">&#183;</span></a>
are often called "<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>",
"<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>construction<span class="arrow">&#183;</span></a> 
by <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>", and "<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>construction<span class="arrow">&#183;</span></a> by 
<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>", respectively.
Datatypes so constructed may be understood fully (for
purposes of a type system) in terms of (a) the properties
of the datatype(s) from which they are constructed, and
(b) their <a href="#std" class="compref" shape="rect">Simple Type Definition</a>.  This distinguishes
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>
datatypes
from the <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> and 
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes, which can be understood 
only in the light of documentation (namely, their descriptions 
elsewhere in this specification,
or, for <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitives<span class="arrow">&#183;</span></a>, in the appropriate
implementation-specific documentation).
All <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>
datatypes are <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>, and all
<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> datatypes are 
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>.
</p></div><div class="div3">
<h4><a name="built-in-vs-user-derived" id="built-in-vs-user-derived" shape="rect"></a>2.4.4 Built-in vs. User-Defined Datatypes</h4><ul><li><div class="p">
<span class="termdef"><a name="dt-built-in" id="dt-built-in" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Built-in</b>
datatypes are those which are defined in this 
specification; they can 
be  
<a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a>,
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>, or
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatypes
.
</span>
</div></li><li><div class="p">
<span class="termdef"><a name="dt-user-defined" id="dt-user-defined" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>User-defined</b> datatypes are those 
datatypes that are defined by individual schema designers.
</span>
</div></li></ul><p>The <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatypes are intended to be
available automatically whenever this specification is implemented or
used, whether by itself or embedded in a host language.  In the
language defined by <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>, 
the <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatypes are automatically
included in every valid schema.  Other host languages <span class="rfc2119">should</span> specify
that all of the datatypes decribed here as built-ins are automatically
available; they <span class="rfc2119">may</span> specify that additional datatypes are also made
available automatically.</p><div class="note"><div class="p"><b>Note:</b> <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>Implementation-defined<span class="arrow">&#183;</span></a> datatypes, whether <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> or <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>,
may sometimes
be included automatically in any schemas processed
by that implementation; nevertheless, they are not built in
to <em>every</em> schema, and are thus not included
in the term 'built-in', as that term is
used in this specification.
</div></div><p>The mechanism for making <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatypes available for use is not defined in this specification; if
<a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a> datatypes are to be available, some such mechanism
<span class="rfc2119">must</span> be specified by the host language.</p><p><span class="termdef"><a name="dt-unknown-dt" id="dt-unknown-dt" title="" shape="rect">[Definition:]&#160;&#160;</a>A
datatype which is not available for use is said to be
<b>unknown</b>.</span>  </p><div class="note"><div class="p"><b>Note:</b> From the schema author's perspective, a reference to
a datatype which proves to be <a href="#dt-unknown-dt" class="termref" shape="rect"><span class="arrow">&#183;</span>unknown<span class="arrow">&#183;</span></a> might reflect
any of the following causes, or others:
<div class="constraintlist"><div class="clnumber">1<a id="unkown.type" name="unkown.type" shape="rect"> </a><span class="p">An error has been made in giving the name of the datatype.</span></div>
<div class="clnumber">2<a id="unkown.sdoc" name="unkown.sdoc" shape="rect"> </a><span class="p">The datatype is a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a> datatype which has not been made
available using the means defined by the host language (e.g.
because the appropriate schema document has not been
consulted).</span></div>
<div class="clnumber">3<a id="unkown.id-primitive" name="unkown.id-primitive" shape="rect"> </a><span class="p">The datatype is an <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatype not supported by the implementation being
used.</span></div>
<div class="clnumber">4<a id="unkown.id-derived" name="unkown.id-derived" shape="rect"> </a><span class="p">The datatype is an <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>
datatype which is made automatically available by some
implementations, but not by the implementation being
used.</span></div>
<div class="clnumber">5<a id="unkown.contaminated" name="unkown.contaminated" shape="rect"> </a><span class="p">The datatype is a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a> <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatype
whose base type is <a href="#dt-unknown-dt" class="termref" shape="rect"><span class="arrow">&#183;</span>unknown<span class="arrow">&#183;</span></a></span></div>
</div>
From the point of view of the implementation, these cases
are likely to be indistinguishable.
</div></div><div class="note"><div class="p"><b>Note:</b> In the terminology of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>,
the datatypes here called <a href="#dt-unknown-dt" class="termref" shape="rect"><span class="arrow">&#183;</span>unknown<span class="arrow">&#183;</span></a> are referred to as
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-null" shape="rect">absent</a>.
</div></div><p>
Conceptually there is no difference between the <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>
<a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>  
datatypes included in this specification and the <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatypes which will be created by individual schema designers.
The <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> datatypes
are those which are believed to be so common that if they were not
defined in this specification many schema designers would end up
reinventing them.&#160; Furthermore, including these
<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> datatypes in this specification serves to
demonstrate the mechanics and utility of the datatype generation
facilities of this specification.
</p></div></div></div><div class="div1">
<h2><a name="built-in-datatypes" id="built-in-datatypes" shape="rect"></a>3 Built-in Datatypes and Their Definitions</h2><div class="image-plus-caption"><object data="type-hierarchy-201104.svg" width="810" height="1060" standby="Loading Built-in Datatype Hierarchy ..." title="Built-in Datatype Hierarchy" type="image/svg+xml"><img src="type-hierarchy-201104.png" width="810" height="1060" alt="Built-in Datatype Hierarchy diagram" longdesc="type-hierarchy-201104.longdesc.html" usemap="#built-in-datatype-hierarchy-image-map" /></object><p class="image-caption">Diagram showing the derivation relations in the built-in type hierarchy.  
   (A <a href="type-hierarchy-201104.longdesc.html" shape="rect">long description of the diagram</a>
    is available separately.)
  </p></div><map name="built-in-datatype-hierarchy-image-map" id="built-in-datatype-hierarchy-image-map"><area href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-anyType" coords="10, 10, 210, 30" title="anyType" alt="anyType" shape="rect" />
<area href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#Complex_Type_Definitions" coords="40, 40, 240, 60" title="all complex types" alt="all complex types" shape="rect" />
<area href="#anySimpleType" coords="40, 70, 240, 90" title="anySimpleType" alt="anySimpleType" shape="rect" />
<area href="#anyAtomicType" coords="70, 100, 270, 120" title="anyAtomicType" alt="anyAtomicType" shape="rect" />
<area href="#anyURI" coords="100, 130, 300, 150" title="anyURI" alt="anyURI" shape="rect" />
<area href="#base64Binary" coords="100, 160, 300, 180" title="base64Binary" alt="base64Binary" shape="rect" />
<area href="#boolean" coords="100, 190, 300, 210" title="boolean" alt="boolean" shape="rect" />
<area href="#date" coords="100, 220, 300, 240" title="date" alt="date" shape="rect" />
<area href="#dateTime" coords="100, 250, 300, 270" title="dateTime" alt="dateTime" shape="rect" />
<area href="#dateTimeStamp" coords="130, 280, 330, 300" title="dateTimeStamp" alt="dateTimeStamp" shape="rect" />
<area href="#decimal" coords="100, 310, 300, 330" title="decimal" alt="decimal" shape="rect" />
<area href="#integer" coords="350, 340, 550, 360" title="integer" alt="integer" shape="rect" />
<area href="#long" coords="380, 370, 580, 390" title="long" alt="long" shape="rect" />
<area href="#int" coords="410, 400, 610, 420" title="int" alt="int" shape="rect" />
<area href="#short" coords="440, 430, 640, 450" title="short" alt="short" shape="rect" />
<area href="#byte" coords="470, 460, 670, 480" title="byte" alt="byte" shape="rect" />
<area href="#nonNegativeInteger" coords="380, 490, 580, 510" title="nonNegativeInteger" alt="nonNegativeInteger" shape="rect" />
<area href="#positiveInteger" coords="410, 520, 610, 540" title="positiveInteger" alt="positiveInteger" shape="rect" />
<area href="#unsignedLong" coords="410, 550, 610, 570" title="unsignedLong" alt="unsignedLong" shape="rect" />
<area href="#unsignedInt" coords="440, 580, 640, 600" title="unsignedInt" alt="unsignedInt" shape="rect" />
<area href="#unsignedShort" coords="470, 610, 670, 630" title="unsignedShort" alt="unsignedShort" shape="rect" />
<area href="#unsignedByte" coords="500, 640, 700, 660" title="unsignedByte" alt="unsignedByte" shape="rect" />
<area href="#nonPositiveInteger" coords="380, 670, 580, 690" title="nonPositiveInteger" alt="nonPositiveInteger" shape="rect" />
<area href="#negativeInteger" coords="410, 700, 610, 720" title="negativeInteger" alt="negativeInteger" shape="rect" />
<area href="#double" coords="100, 370, 300, 390" title="double" alt="double" shape="rect" />
<area href="#duration" coords="100, 400, 300, 420" title="duration" alt="duration" shape="rect" />
<area href="#dayTimeDuration" coords="130, 430, 330, 450" title="dayTimeDuration" alt="dayTimeDuration" shape="rect" />
<area href="#yearMonthDuration" coords="130, 460, 330, 480" title="yearMonthDuration" alt="yearMonthDuration" shape="rect" />
<area href="#float" coords="100, 490, 300, 510" title="float" alt="float" shape="rect" />
<area href="#gDay" coords="100, 520, 300, 540" title="gDay" alt="gDay" shape="rect" />
<area href="#gMonth" coords="100, 550, 300, 570" title="gMonth" alt="gMonth" shape="rect" />
<area href="#gMonthDay" coords="100, 580, 300, 600" title="gMonthDay" alt="gMonthDay" shape="rect" />
<area href="#gYear" coords="100, 610, 300, 630" title="gYear" alt="gYear" shape="rect" />
<area href="#gYearMonth" coords="100, 640, 300, 660" title="gYearMonth" alt="gYearMonth" shape="rect" />
<area href="#hexBinary" coords="100, 670, 300, 690" title="hexBinary" alt="hexBinary" shape="rect" />
<area href="#NOTATION" coords="100, 700, 300, 720" title="NOTATION" alt="NOTATION" shape="rect" />
<area href="#QName" coords="100, 730, 300, 750" title="QName" alt="QName" shape="rect" />
<area href="#string" coords="100, 760, 300, 780" title="string" alt="string" shape="rect" />
<area href="#normalizedString" coords="350, 790, 550, 810" title="normalizedString" alt="normalizedString" shape="rect" />
<area href="#token" coords="380, 820, 580, 840" title="token" alt="token" shape="rect" />
<area href="#language" coords="410, 850, 610, 870" title="language" alt="language" shape="rect" />
<area href="#Name" coords="410, 880, 610, 900" title="Name" alt="Name" shape="rect" />
<area href="#NCName" coords="440, 910, 640, 930" title="NCName" alt="NCName" shape="rect" />
<area href="#ENTITY" coords="470, 940, 670, 960" title="ENTITY" alt="ENTITY" shape="rect" />
<area href="#ID" coords="470, 970, 670, 990" title="ID" alt="ID" shape="rect" />
<area href="#IDREF" coords="470, 1000, 670, 1020" title="IDREF" alt="IDREF" shape="rect" />
<area href="#NMTOKEN" coords="410, 1030, 610, 1050" title="NMTOKEN" alt="NMTOKEN" shape="rect" />
<area href="#time" coords="100, 820, 300, 840" title="time" alt="time" shape="rect" />
<area href="#ENTITIES" coords="70, 850, 270, 870" title="ENTITIES" alt="ENTITIES" shape="rect" />
<area href="#IDREFS" coords="70, 880, 270, 900" title="IDREFS" alt="IDREFS" shape="rect" />
<area href="#NMTOKENS" coords="70, 910, 270, 930" title="NMTOKENS" alt="NMTOKENS" shape="rect" />
</map><div class="block">Each built-in datatype defined
in this specification  can be uniquely addressed via a
URI Reference constructed as follows:
<ol class="enumar"><li><div class="p">the base URI is the URI of the XML Schema namespace</div></li><li><div class="p">the fragment identifier is the name of the datatype</div></li></ol>
</div><div class="block">For example, to address the <a href="#int" shape="rect">int</a> datatype, the URI is:
<ul><li><div class="p"><code>http://www.w3.org/2001/XMLSchema#int</code></div></li></ul>
</div><div class="block">Additionally, each facet definition element can be uniquely
addressed via a URI constructed as follows:
<ol class="enumar"><li><div class="p">the base URI is the URI of the XML Schema namespace</div></li><li><div class="p">the fragment identifier is the name of the facet</div></li></ol>
</div><div class="block">For example, to address the maxInclusive facet, the URI is:
<ul><li><div class="p"><code>http://www.w3.org/2001/XMLSchema#maxInclusive</code></div></li></ul>
</div><div class="block">Additionally, each facet usage in a built-in 
<a href="#std" class="compref" shape="rect">Simple Type Definition</a>
can be uniquely addressed via a URI constructed as follows:
<ol class="enumar"><li><div class="p">the base URI is the URI of the XML Schema namespace</div></li><li><div class="p">the fragment identifier is the name of the 
<a href="#std" class="compref" shape="rect">Simple Type Definition</a>, followed
by a period ('<code>.</code>') followed by the name of the facet</div></li></ol>
</div><div class="block">For example, to address the usage of the maxInclusive facet in
the definition of int, the URI is:
<ul><li><div class="p"><code>http://www.w3.org/2001/XMLSchema#int.maxInclusive</code></div></li></ul>
</div><div class="div2">
<h3><span class="nav"> <a href="#special-datatypes" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="namespaces" id="namespaces" shape="rect"></a>3.1 Namespace considerations</h3><p>
The <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatypes defined by this specification
are designed to be used with the XML Schema definition language as well as other
XML specifications.
To facilitate usage within the XML Schema definition language, the <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
datatypes in this specification have the namespace name:
</p><ul><li><div class="p">http://www.w3.org/2001/XMLSchema</div></li></ul><p>
To facilitate usage in specifications other than the XML Schema definition language,
such as those that do not want to know anything about aspects of the
XML Schema definition language other than the datatypes, each 
 <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
datatype is also defined in the namespace whose URI is:
</p><ul><li><div class="p">http://www.w3.org/2001/XMLSchema-datatypes</div></li></ul><p>
</p><p>
Each <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a> datatype may also be associated with a
target 
namespace.&#160; If it is constructed
from a schema document, then its namespace is typically the
target namespace of that schema document. (See 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-schema" shape="rect">XML Representation of
Schemas</a> in <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.)
</p></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#namespaces" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#built-in-primitive-datatypes" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="special-datatypes" id="special-datatypes" shape="rect"></a>3.2 Special Built-in Datatypes</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.1 <a href="#anySimpleType" shape="rect">anySimpleType</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.1.1 <a href="#sec-ast-vs" shape="rect">Value space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.1.2 <a href="#sec-ast-lex" shape="rect">Lexical mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.1.3 <a href="#sec-ast-f" shape="rect">Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2 <a href="#anyAtomicType" shape="rect">anyAtomicType</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2.1 <a href="#sec-aat-vs" shape="rect">Value space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2.2 <a href="#sec-aat-lex" shape="rect">Lexical mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.2.2.3 <a href="#sec-aat-f" shape="rect">Facets</a><br clear="none" />
</div><p>The two datatypes at the root of the hierarchy of simple
types are <a href="#anySimpleType" shape="rect">anySimpleType</a> and <a href="#anyAtomicType" shape="rect">anyAtomicType</a>.</p><div class="div3">
<h4><a name="anySimpleType" id="anySimpleType" shape="rect"></a>3.2.1 anySimpleType</h4><p><span class="termdef"><a name="dt-anySimpleType" id="dt-anySimpleType" title="" shape="rect">[Definition:]&#160;&#160;</a>

The definition of <b>anySimpleType</b> is a special
<a href="#dt-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of <b><i>anyType</i></b>.&#160;
The
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>anySimpleType</b>
is the set of all sequences of Unicode
characters, 
and its <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> includes all <a href="#dt-atomic-value" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic values<span class="arrow">&#183;</span></a>
and all finite-length lists of 
zero or more
<a href="#dt-atomic-value" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic values<span class="arrow">&#183;</span></a>.</span></p><p>For further details of <a href="#anySimpleType" shape="rect">anySimpleType</a>
and its representation as a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>, see
<a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions (&#167;4.1.6)</a>.</p><div class="div4">
<h5><a name="sec-ast-vs" id="sec-ast-vs" shape="rect"></a>3.2.1.1 Value space</h5><p>The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#anySimpleType" shape="rect">anySimpleType</a>
is the set of all <a href="#dt-atomic-value" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic values<span class="arrow">&#183;</span></a> and of all finite-length
lists of zero or more
<a href="#dt-atomic-value" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic values<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> It is a consequence of this definition, together with the
definition of the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> in the next section, that some
values of this datatype have no <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> using the
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> defined by this specification. That is, the
"potential" <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and the "effable"
or "nameable" <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> diverge for this datatype.
As far as this specification is concerned, there is no operational
difference between the potential and effable <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> and the
distinction is of mostly formal interest.  Since some host languages
for the type system defined here may allow means of construction
values other than mapping from a <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>, the
difference may have practical importance in some contexts. In those
contexts, the term <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> should unless otherwise qualified be
taken to mean the potential <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.
</div></div></div><div class="div4">
<h5><a name="sec-ast-lex" id="sec-ast-lex" shape="rect"></a>3.2.1.2 Lexical mapping</h5><p>The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#anySimpleType" shape="rect">anySimpleType</a> is the set of
all finite-length sequences of zero or more
<a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">character</a>s (as 
defined in <a href="#XML" shape="rect">[XML]</a>) that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the 
<a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a> production from 
<a href="#XML" shape="rect">[XML]</a>.  This is equivalent to the union of the 
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a> of all 
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> and all possible <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatypes.
</p><p>It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports the 
<a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a> production from 
<a href="#XML" shape="rect">[XML]</a>, or that from 
<a href="#XML1.0" shape="rect">[XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.
</p><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> of <a href="#anySimpleType" shape="rect">anySimpleType</a> is the union
of the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> of
all <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes and all list datatypes.
It will be noted that this mapping is not a function: a given
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> may map to one value or to several values of different
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes, and it may be indeterminate which value is to
be preferred in a particular context.  When the datatypes defined here
are used in the context of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>, the
<code>xsi:type</code> attribute defined by that specification in section
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#xsi_type" shape="rect">xsi:type</a> can be used
to indicate which value a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> which is the content of an element
should map to.  In other contexts, other rules (such as type coercion
rules) may be employed to determine which value is to be used.</p></div><div class="div4">
<h5><a name="sec-ast-f" id="sec-ast-f" shape="rect"></a>3.2.1.3 Facets</h5><p>When a new datatype is defined 
by <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>,
<a href="#anySimpleType" shape="rect">anySimpleType</a> <span class="rfc2119">must not</span> be used
as the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
So no 
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> are
directly applicable to <a href="#anySimpleType" shape="rect">anySimpleType</a>.
</p></div></div><div class="div3">
<h4><a name="anyAtomicType" id="anyAtomicType" shape="rect"></a>3.2.2 anyAtomicType</h4><p><span class="termdef"><a name="dt-anyAtomicType" id="dt-anyAtomicType" title="" shape="rect">[Definition:]&#160;&#160;</a>

<b>anyAtomicType</b>
is a special <a href="#dt-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of <a href="#anySimpleType" shape="rect">anySimpleType</a>.
The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value<span class="arrow">&#183;</span></a>
and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a> 
of <b>anyAtomicType</b> are the unions of the 
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value<span class="arrow">&#183;</span></a>
and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a>
of all the <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes, and
<b>anyAtomicType</b> is their <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
</span>
</p><p>For further details of <a href="#anyAtomicType" shape="rect">anyAtomicType</a>
and its representation as a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>, see
<a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions (&#167;4.1.6)</a>.</p><div class="div4">
<h5><a name="sec-aat-vs" id="sec-aat-vs" shape="rect"></a>3.2.2.1 Value space</h5><p>The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#anyAtomicType" shape="rect">anyAtomicType</a> is the union of the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> of all the
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes defined here
or supplied as <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitives<span class="arrow">&#183;</span></a>.</p></div><div class="div4">
<h5><a name="sec-aat-lex" id="sec-aat-lex" shape="rect"></a>3.2.2.2 Lexical mapping</h5><p>The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#anyAtomicType" shape="rect">anyAtomicType</a> is the set of
all finite-length sequences of zero or more
<a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">character</a>s (as 
defined in <a href="#XML" shape="rect">[XML]</a>) that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the 
<a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a> production from 
<a href="#XML" shape="rect">[XML]</a>.  This is equivalent to the union of the 
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a> of all 
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes.
</p><p>It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports the <a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a> production from 
<a href="#XML" shape="rect">[XML]</a>, or that from 
<a href="#XML1.0" shape="rect">[XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.
</p><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> of <a href="#anyAtomicType" shape="rect">anyAtomicType</a> is the union
of the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> of
all <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes.
It will be noted that this mapping is not a function: a given
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> may map to one value or to several values of different
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes, and it may be indeterminate which value is to
be preferred in a particular context.  When the datatypes defined here
are used in the context of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>, the
<code>xsi:type</code> attribute defined by that specification in section
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#xsi_type" shape="rect">xsi:type</a> can be used
to indicate which value a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> which is the content of an element
should map to.  In other contexts, other rules (such as type coercion
rules) may be employed to determine which value is to be used.</p></div><div class="div4">
<h5><a name="sec-aat-f" id="sec-aat-f" shape="rect"></a>3.2.2.3 Facets</h5><p>When a new datatype is defined 
by <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>,
<a href="#anyAtomicType" shape="rect">anyAtomicType</a> <span class="rfc2119">must not</span> be used
as the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
So no 
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> are
directly applicable to <a href="#anyAtomicType" shape="rect">anyAtomicType</a>.
</p></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#special-datatypes" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#ordinary-built-ins" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="built-in-primitive-datatypes" id="built-in-primitive-datatypes" shape="rect"></a>3.3 Primitive Datatypes</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.1 <a href="#string" shape="rect">string</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.1.1 <a href="#sec-vs-string" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.1.2 <a href="#string-lexical-mapping" shape="rect">Lexical Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.1.3 <a href="#string-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.1.4 <a href="#string-derived-types" shape="rect">Derived
datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2 <a href="#boolean" shape="rect">boolean</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.1 <a href="#sec-vs-boolean" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.2 <a href="#boolean-lexical-mapping" shape="rect">Lexical Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.2.3 <a href="#boolean-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.3 <a href="#decimal" shape="rect">decimal</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.3.1 <a href="#decimal-lexical-representation" shape="rect">Lexical
Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.3.2 <a href="#decimal-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.3.3 <a href="#decimal-derived-types" shape="rect">Datatypes based on decimal</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4 <a href="#float" shape="rect">float</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.1 <a href="#sec-vs-float" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.2 <a href="#sec-lex-float" shape="rect">Lexical Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.4.3 <a href="#float-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5 <a href="#double" shape="rect">double</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.1 <a href="#sec-vs-double" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.2 <a href="#sec-lex-double" shape="rect">Lexical Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.5.3 <a href="#double-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6 <a href="#duration" shape="rect">duration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.1 <a href="#sec-vs-duration" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.2 <a href="#duration-lexical-space" shape="rect">Lexical Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.3 <a href="#duration-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.6.4 <a href="#duration-derived-types" shape="rect">Related Datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.7 <a href="#dateTime" shape="rect">dateTime</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.7.1 <a href="#dateTime-value-space" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.7.2 <a href="#dateTime-lexical-mapping" shape="rect">Lexical Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.7.3 <a href="#dateTime-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.7.4 <a href="#dateTime-derived-types" shape="rect">Related Datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.8 <a href="#time" shape="rect">time</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.8.1 <a href="#time-value-space" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.8.2 <a href="#time-lexical-mapping" shape="rect">Lexical Mappings</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.8.3 <a href="#time-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.9 <a href="#date" shape="rect">date</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.9.1 <a href="#date-value-space" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.9.2 <a href="#date-lexical-mapping" shape="rect">Lexical Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.9.3 <a href="#date-facets" shape="rect">Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.10 <a href="#gYearMonth" shape="rect">gYearMonth</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.10.1 <a href="#gYearMonth-value-space" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.10.2 <a href="#gYearMonth-lexical-repr" shape="rect">Lexical
Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.10.3 <a href="#gYearMonth-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.11 <a href="#gYear" shape="rect">gYear</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.11.1 <a href="#gYear-value-space" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.11.2 <a href="#gYear-lexical-repr" shape="rect">Lexical 
Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.11.3 <a href="#gYear-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.12 <a href="#gMonthDay" shape="rect">gMonthDay</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.12.1 <a href="#gMonthDay-value-space" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.12.2 <a href="#gMonthDay-lexical-repr" shape="rect">Lexical 
Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.12.3 <a href="#gMonthDay-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.13 <a href="#gDay" shape="rect">gDay</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.13.1 <a href="#sec-vs-gDay" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.13.2 <a href="#gDay-lexical-mapping" shape="rect">Lexical Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.13.3 <a href="#gDay-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.14 <a href="#gMonth" shape="rect">gMonth</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.14.1 <a href="#gMonth-value-space" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.14.2 <a href="#gMonth-lexical-repr" shape="rect">Lexical 
Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.14.3 <a href="#gMonth-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.15 <a href="#hexBinary" shape="rect">hexBinary</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.15.1 <a href="#sec-vs-hexbin" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.15.2 <a href="#hexBinary-lexical-representation" shape="rect">Lexical Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.15.3 <a href="#hexBinary-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.16 <a href="#base64Binary" shape="rect">base64Binary</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.16.1 <a href="#sec-vs-b46b" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.16.2 <a href="#sec-lex-b64b" shape="rect">Lexical
Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.16.3 <a href="#base64Binary-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.17 <a href="#anyURI" shape="rect">anyURI</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.17.1 <a href="#anyURI-vs" shape="rect">Value Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.17.2 <a href="#anyURI-lexical-representation" shape="rect">Lexical
Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.17.3 <a href="#anyURI-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.18 <a href="#QName" shape="rect">QName</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.18.1 <a href="#QName-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.19 <a href="#NOTATION" shape="rect">NOTATION</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.3.19.1 <a href="#NOTATION-facets" shape="rect">
Facets</a><br clear="none" />
</div><p>
The <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes defined by this specification
are described below.&#160; For each datatype, the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> 
is described;
the
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>
is
defined 
using
an extended Backus Naur Format grammar 
(and in most cases also a regular expression using the
regular expression language of 
<a href="#regexs" shape="rect">Regular Expressions (&#167;G)</a>);
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> which apply
to the datatype are listed; 
and any datatypes 
<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>
from this datatype are specified.
</p><p>
Conforming processors <span class="rfc2119">must</span> support
the <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes defined
in this specification; it is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether they
support others. <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>Primitive<span class="arrow">&#183;</span></a> datatypes may be added by revisions to this specification.
</p><div class="note"><div class="p"><b>Note:</b> Processors <span class="rfc2119">may</span>, for example, support the
floating-point decimal datatype specified in
<a href="#pd-note" shape="rect">[Precision Decimal]</a>.</div></div><div class="div3">
<h4><a name="string" id="string" shape="rect"></a>3.3.1 string</h4><p><span class="termdef"><a name="dt-string" id="dt-string" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>string</b> datatype
represents character strings in XML.
</span></p><div class="note"><div class="p"><b>Note:</b> Many human languages have writing systems that require
child elements for control of aspects such as bidirectional formatting or
ruby annotation (see <a href="#ruby" shape="rect">[Ruby]</a> and Section 8.2.4
<a href="http://www.w3.org/TR/html401/struct/dirlang.html#h-8.2.4" shape="rect">Overriding the
bidirectional algorithm: the BDO element</a> of <a href="#html4" shape="rect">[HTML 4.01]</a>).&#160;
Thus, <a href="#string" shape="rect">string</a>, as a simple type that can contain only
characters but not child elements, is often not suitable for representing text.
In such situations, a complex type that allows mixed content should be considered.
For more information, see Section 5.5
<a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#textType" shape="rect">Any
Element, Any Attribute</a> of <a href="#schema-primer" shape="rect">[XML Schema Language: Part 0 Primer]</a>.</div></div><div class="div4">
<h5><a name="sec-vs-string" id="sec-vs-string" shape="rect"></a>3.3.1.1 Value Space</h5><p>The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of <a href="#string" shape="rect">string</a> is the set of finite-length sequences of
zero or more
<a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">character</a>s (as defined in
<a href="#XML" shape="rect">[XML]</a>) that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
<a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a> production from <a href="#XML" shape="rect">[XML]</a>.


A <a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">character</a> is an atomic unit of
communication; it is not further specified except to note that every
<a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">character</a> has a corresponding
Universal Character Set (UCS) code point, which is an integer.</p><p>It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports the <a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a> production from 
<a href="#XML" shape="rect">[XML]</a>, or that from 
<a href="#XML1.0" shape="rect">[XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.
</p><p>Equality for <a href="#string" shape="rect">string</a> is
identity.  No order is prescribed.</p><div class="note"><div class="p"><b>Note:</b> As noted in <a href="#ff-o" class="compref" shape="rect">ordered</a>, the fact that this specification does
not specify an 
order relation
for <a href="#dt-string" class="termref" shape="rect"><span class="arrow">&#183;</span>string<span class="arrow">&#183;</span></a>
does not preclude other applications from treating 
strings
as being ordered.</div></div></div><div class="div4">
<h5><a name="string-lexical-mapping" id="string-lexical-mapping" shape="rect"></a>3.3.1.2 Lexical Mapping</h5><div class="block">The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#string" shape="rect">string</a> is the set of 
finite-length sequences of zero or more
<a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">character</a>s (as defined in
<a href="#XML" shape="rect">[XML]</a>) that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
<a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a> production from <a href="#XML" shape="rect">[XML]</a>.



<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-stringRep" id="nt-stringRep" shape="rect"></a><span class="lhs">[1]
    &#160;
    <i>stringRep</i></span>&#160;::= <a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a>*&#160; <div class="bnf_comment">/* <i class="com">(as defined in <a href="#XML" shape="rect">[XML]</a>)</i> */</div></div></div>


</div><p>It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports the <a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a> production from 
<a href="#XML" shape="rect">[XML]</a>, or that from 
<a href="#XML1.0" shape="rect">[XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.
</p><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> 
for <a href="#string" shape="rect">string</a> is <a href="#f-stringLexmap" shape="rect"><i><span class="arrow">&#183;</span>stringLexicalMap<span class="arrow">&#183;</span></i></a>, and
the <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is <a href="#f-stringCanmap" shape="rect"><i><span class="arrow">&#183;</span>stringCanonicalMap<span class="arrow">&#183;</span></i></a>;
each is a subset of the identity function.
</p></div><div class="div4">
<h5><a name="string-facets" id="string-facets" shape="rect"></a>3.3.1.3 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#string" shape="rect">string</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-whiteSpace" name="string.whiteSpace" shape="rect" id="string.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>preserve</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#string" shape="rect">string</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#string" shape="rect">string</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="string-derived-types" id="string-derived-types" shape="rect"></a>3.3.1.4 Derived
datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#string" shape="rect">string</a></p><ul><li><a href="#normalizedString" shape="rect">normalizedString</a></li></ul></div></div><div class="div3">
<h4><a name="boolean" id="boolean" shape="rect"></a>3.3.2 boolean</h4><p><span class="termdef"><a name="dt-boolean" id="dt-boolean" title="" shape="rect">[Definition:]&#160;&#160;</a><b>boolean</b>
represents the 
values of two-valued logic.</span></p><div class="div4">
<h5><a name="sec-vs-boolean" id="sec-vs-boolean" shape="rect"></a>3.3.2.1 Value Space</h5><p><a href="#boolean" shape="rect">boolean</a> has the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
two-valued logic:&#160; {<b><i>true</i></b>, <b><i>false</i></b>}.</p></div><div class="div4">
<h5><a name="boolean-lexical-mapping" id="boolean-lexical-mapping" shape="rect"></a>3.3.2.2 Lexical Mapping</h5><div class="block"><a href="#boolean" shape="rect">boolean</a>'s lexical space is a set of four <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>:

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-booleanRep" id="nt-booleanRep" shape="rect"></a><span class="lhs">[2]
    &#160;
    <i>booleanRep</i></span>&#160;::= '<code>true</code>'&#160;| '<code>false</code>'&#160;|
'<code>1</code>'&#160;| '<code>0</code>'</div></div>


</div><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
for <a href="#boolean" shape="rect">boolean</a> is <a href="#f-booleanLexmap" shape="rect"><i><span class="arrow">&#183;</span>booleanLexicalMap<span class="arrow">&#183;</span></i></a>;
the <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is <a href="#f-booleanCanmap" shape="rect"><i><span class="arrow">&#183;</span>booleanCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p></div><div class="div4">
<h5><a name="boolean-facets" id="boolean-facets" shape="rect"></a>3.3.2.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#boolean" shape="rect">boolean</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="boolean.whiteSpace" shape="rect" id="boolean.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#boolean" shape="rect">boolean</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#boolean" shape="rect">boolean</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="decimal" id="decimal" shape="rect"></a>3.3.3 decimal</h4><p><span class="termdef"><a name="dt-decimal-datatype" id="dt-decimal-datatype" title="" shape="rect">[Definition:]&#160;&#160;</a><b>decimal</b>
represents
a
subset of the real numbers, which
can be represented by
decimal numerals.

The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <b>decimal</b>
is the set of numbers that can be obtained by 
dividing 
an integer by a non-negative
power of ten, i.e., expressible as 
<var>i</var>&#160;/&#160;10<sup><var>n</var></sup>
where <var>i</var> and <var>n</var> are integers
and 
<var>n</var>&#160;&#8805;&#160;0.
Precision is not reflected in this value space;
the number 2.0 is not distinct from the number 2.00.

The order relation on <b>decimal</b>
is the order relation on real numbers, restricted
to this subset.</span></p><div class="note"><div class="p"><b>Note:</b> For a decimal datatype whose values do reflect precision, see
<a href="#pd-note" shape="rect">[Precision Decimal]</a>.</div></div><div class="div4">
<h5><a name="decimal-lexical-representation" id="decimal-lexical-representation" shape="rect"></a>3.3.3.1 Lexical
Mapping</h5><p><b>decimal</b>
has
a lexical representation
consisting of a
non-empty finite-length
sequence of 
decimal
digits (#x30&#8211;#x39) separated
by a period as a decimal indicator.&#160;
An optional leading sign is allowed.&#160;
If the sign is omitted,
"+"
is assumed.&#160; Leading and trailing zeroes are optional.&#160;
If the fractional part is zero, the period and following zero(es) can
be omitted.
For example:&#160;
'<code>-1.23</code>',
'<code>12678967.543233</code>', '<code>+100000.00</code>',
'<code>210</code>'.
</p><div class="block"><div class="defset">
<div class="defset-head">The <a href="#decimal" shape="rect">decimal</a> Lexical Representation</div>
<div class="prod">
<a name="nt-decimalRep" id="nt-decimalRep" shape="rect"></a><span class="lhs">[3]
    &#160;
    <i>decimalLexicalRep</i></span>&#160;::= <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a>&#160;| <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a></div></div>
</div><div class="block">The lexical space of decimal is the set of
lexical representations which match the grammar given above, or
(equivalently) the regular expression
<blockquote><blockquote><p>
<code>(\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)</code></p></blockquote></blockquote>
</div><p>
The mapping from lexical representations to values is the usual
one for decimal numerals; it is given formally in 
<a href="#f-decimalLexmap" shape="rect"><i><span class="arrow">&#183;</span>decimalLexicalMap<span class="arrow">&#183;</span></i></a>.
</p><p>The definition
of the <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> has the
effect of prohibiting certain options from the
<a href="#decimal-lexical-representation" shape="rect">Lexical
Mapping (&#167;3.3.3.1)</a>.&#160;
Specifically, 
for integers, the decimal point and fractional part are prohibited.
For other values, 

the preceding optional
"+"
sign is prohibited.&#160; The decimal point is required.&#160; 
In
all cases, leading and
trailing zeroes are prohibited subject to the following:&#160; there
must be at least one digit to the right and to the left of the decimal
point which may be a
zero.</p><p>
The mapping from values to <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representations<span class="arrow">&#183;</span></a> 
is given formally in 
<a href="#f-decimalCanmap" shape="rect"><i><span class="arrow">&#183;</span>decimalCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p></div><div class="div4">
<h5><a name="decimal-facets" id="decimal-facets" shape="rect"></a>3.3.3.2 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#decimal" shape="rect">decimal</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="decimal.whiteSpace" shape="rect" id="decimal.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#decimal" shape="rect">decimal</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#decimal" shape="rect">decimal</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="decimal-derived-types" id="decimal-derived-types" shape="rect"></a>3.3.3.3 Datatypes based on decimal</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#decimal" shape="rect">decimal</a></p><ul><li><a href="#integer" shape="rect">integer</a></li></ul></div></div><div class="div3">
<h4><a name="float" id="float" shape="rect"></a>3.3.4 float</h4><p><span class="termdef"><a name="dt-float" id="dt-float" title="" shape="rect">[Definition:]&#160;&#160;</a>The
<b>float</b> datatype
is 
patterned after the IEEE 
single-precision 32-bit floating point datatype
<a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>.</span>&#160;
Its 
value space  is a subset of the
rational numbers.&#160; Floating point numbers are often used to 
approximate arbitrary real numbers.</p><div class="div4">
<h5><a name="sec-vs-float" id="sec-vs-float" shape="rect"></a>3.3.4.1 Value Space</h5><p>The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#float" shape="rect">float</a> contains the
non-zero numbers&#160; <var>m</var>&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;,
where <var>m</var> is an integer whose absolute value is less than 2<sup>24</sup>,
and <var>e</var> is an integer between &#8722;149 and 104, inclusive.&#160; In addition to
these values, the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#float" shape="rect">float</a> also contains
the following <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a>:&#160; <b><i>positiveZero</i></b>,
<b><i>negativeZero</i></b>, <b><i>positiveInfinity</i></b>,
<b><i>negativeInfinity</i></b>, and <b><i>notANumber</i></b>.</p><div class="note"><div class="p"><b>Note:</b> As explained below, the
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>
of the <a href="#float" shape="rect">float</a>
value <b><i>notANumber</i></b> is '<code>NaN</code>'.&#160; Accordingly, in English
text we generally use 'NaN' to refer to that value.&#160; Similarly,
we use 'INF' and '&#8722;INF' to refer to the two
values <b><i>positiveInfinity</i></b> and <b><i>negativeInfinity</i></b>,
and '0' and '&#8722;0' to refer to
<b><i>positiveZero</i></b> and <b><i>negativeZero</i></b>.</div></div><div class="block">Equality and order for <a href="#float" shape="rect">float</a> are defined as follows:
<ul><li><div class="p">Equality is identity, except that&#160; 0&#160;=&#160;&#8722;0&#160; (although
they are not identical) and&#160; NaN&#160;&#8800;&#160;NaN&#160; 
(although NaN is of course identical to itself).</div><div class="p">0 and &#8722;0 are thus equivalent
for purposes of enumerations and
identity constraints, as well as for minimum and maximum values.</div></li><li><div class="p">For the basic values, the order relation
on float is the order relation for rational numbers.&#160; INF is greater
than all other non-NaN values; &#8722;INF is less than all other non-NaN
values.&#160; NaN is <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> with any value
in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> including itself.&#160; 0 and &#8722;0
are greater than all the negative numbers and less than all the positive
numbers.</div></li></ul>
</div><div class="note"><div class="p"><b>Note:</b> Any value <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> with the value used for the four
bounding facets (<a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a>, <a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a>,
<a href="#dt-minExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minExclusive<span class="arrow">&#183;</span></a>, and <a href="#dt-maxExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxExclusive<span class="arrow">&#183;</span></a>) will be
excluded from the resulting restricted <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.&#160;
In particular, when NaN is used as a facet value for a bounding facet, since no
<a href="#float" shape="rect">float</a> values are <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>comparable<span class="arrow">&#183;</span></a>
with it, the result is a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> that is empty.&#160;
If any other value is used for a bounding facet,
NaN will be excluded from the resulting restricted <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>;
to add NaN back in requires union with the NaN-only space (which
may be derived using
the
pattern '<code>NaN</code>').</div></div><div class="note"><div class="p"><b>Note:</b> The Schema 1.0 version of this datatype did not differentiate between
0 and &#8722;0 and NaN was equal to itself.&#160; The changes were
made to make the datatype more closely mirror <a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>.</div></div></div><div class="div4">
<h5><a name="sec-lex-float" id="sec-lex-float" shape="rect"></a>3.3.4.2 Lexical Mapping</h5><div class="block">The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#float" shape="rect">float</a> is
the set of all decimal numerals with or without a decimal
point, numerals in scientific (exponential) notation, and
the <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> 
'<code>INF</code>', '<code>+INF</code>',
'<code>-INF</code>', 
and '<code>NaN</code>'

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-floatRep" id="nt-floatRep" shape="rect"></a><span class="lhs">[4]
    &#160;
    <i>floatRep</i></span>&#160;::= <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a>&#160;| <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a>&#160;|
<a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a>&#160;| <a href="#nt-numSpecReps" shape="rect"><i>numericalSpecialRep</i></a></div></div>


The <a href="#nt-floatRep" shape="rect"><i>floatRep</i></a> production is equivalent to this regular 
expression (after whitespace is
removed from the regular expression):


<blockquote class="shrink"><p><code>(\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)([Ee](\+|-)?[0-9]+)?<br clear="none" />
|(\+|-)?INF|NaN</code></p></blockquote>
</div><p>The <a href="#float" shape="rect">float</a> datatype is designed to implement for schema
processing the single-precision floating-point datatype of
<a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>.&#160; That specification does not specify specific
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a>,
but does prescribe requirements on any <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
used.&#160; Any <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
that maps the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> just described onto the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, is a function,
satisfies the requirements of
<a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>, and correctly handles the 
mapping of the literals
'<code>INF</code>', '<code>NaN</code>', etc., to the
<a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a>,
satisfies the conformance requirements of this specification.</p><p>Since IEEE allows some variation in rounding of values, processors
conforming to this specification may exhibit some variation in their
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a>.</p><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> <a href="#f-floatLexmap" shape="rect"><i><span class="arrow">&#183;</span>floatLexicalMap<span class="arrow">&#183;</span></i></a> is 
provided as an example of a simple algorithm that yields a conformant mapping,
and that provides the most accurate rounding possible&#8212;and is thus useful
for insuring inter-implementation reproducibility and inter-implementation
round-tripping.&#160; The simple rounding
algorithm used in <a href="#f-floatLexmap" shape="rect"><i><span class="arrow">&#183;</span>floatLexicalMap<span class="arrow">&#183;</span></i></a> may be more efficiently
implemented using the algorithms of <a href="#clinger1990" shape="rect">[Clinger, WD (1990)]</a>.</p><div class="note"><div class="p"><b>Note:</b> The Schema 1.0 version of this datatype did not permit rounding
algorithms whose results differed from <a href="#clinger1990" shape="rect">[Clinger, WD (1990)]</a>.</div></div><p>The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> <a href="#f-floatCanmap" shape="rect"><i><span class="arrow">&#183;</span>floatCanonicalMap<span class="arrow">&#183;</span></i></a> is 
provided as an example of a mapping that does not produce unnecessarily long
<a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representations<span class="arrow">&#183;</span></a>.&#160;
Other algorithms which do not yield identical results for mapping from float
values to character strings are permitted by <a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>.</p></div><div class="div4">
<h5><a name="float-facets" id="float-facets" shape="rect"></a>3.3.4.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#float" shape="rect">float</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="float.whiteSpace" shape="rect" id="float.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#float" shape="rect">float</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#float" shape="rect">float</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>true</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="double" id="double" shape="rect"></a>3.3.5 double</h4><p>
<span class="termdef"><a name="dt-double" id="dt-double" title="" shape="rect">[Definition:]&#160;&#160;</a>The <b>double</b>
datatype is 
patterned after the
IEEE double-precision 64-bit floating point datatype
<a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>.</span>&#160;
Each floating
point datatype has a value space that is a subset of the
rational numbers.&#160; Floating point numbers are often used to 
approximate arbitrary real numbers.</p><div class="note"><div class="p"><b>Note:</b> The only significant differences between float and double are
the three defining constants 53 (vs 24), &#8722;1074 (vs &#8722;149),
and 971 (vs 104).</div></div><div class="div4">
<h5><a name="sec-vs-double" id="sec-vs-double" shape="rect"></a>3.3.5.1 Value Space</h5><p>The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#double" shape="rect">double</a> contains the
non-zero numbers&#160; <var>m</var>&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;,
where <var>m</var> is an integer whose absolute value is less than 2<sup>53</sup>,
and <var>e</var> is an integer between &#8722;1074 and 971, inclusive.&#160; In addition to
these values, the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#double" shape="rect">double</a> also contains
the following <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a>:&#160; <b><i>positiveZero</i></b>,
<b><i>negativeZero</i></b>, <b><i>positiveInfinity</i></b>,
<b><i>negativeInfinity</i></b>, and <b><i>notANumber</i></b>.</p><div class="note"><div class="p"><b>Note:</b> As explained below, the
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>
of the <a href="#double" shape="rect">double</a>
value <b><i>notANumber</i></b> is '<code>NaN</code>'.&#160; Accordingly, in English
text we generally use 'NaN' to refer to that value.&#160; Similarly,
we use 'INF' and '&#8722;INF' to refer to the two
values <b><i>positiveInfinity</i></b> and <b><i>negativeInfinity</i></b>,
and '0' and '&#8722;0' to refer to
<b><i>positiveZero</i></b> and <b><i>negativeZero</i></b>.</div></div><div class="block">Equality and order for <a href="#double" shape="rect">double</a> are defined as follows:
<ul><li><div class="p">Equality is identity, except that&#160; 0&#160;=&#160;&#8722;0&#160; (although
they are not identical) and&#160; NaN&#160;&#8800;&#160;NaN&#160; 
(although NaN is of course identical to itself).</div><div class="p">0 and &#8722;0 are thus equivalent for purposes of enumerations,
identity constraints, and minimum and maximum values.
</div></li><li><div class="p">For the basic values, the order relation
on double is the order relation for rational numbers.&#160; INF is greater
than all other non-NaN values; &#8722;INF is less than all other non-NaN
values.&#160; NaN is <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> with any value
in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> including itself.&#160; 0 and &#8722;0
are greater than all the negative numbers and less than all the positive
numbers.</div></li></ul>
</div><div class="note"><div class="p"><b>Note:</b> Any value <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> with the value used for the four
bounding facets (<a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a>, <a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a>,
<a href="#dt-minExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minExclusive<span class="arrow">&#183;</span></a>, and <a href="#dt-maxExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxExclusive<span class="arrow">&#183;</span></a>) will be
excluded from the resulting restricted <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.&#160;
In particular, when NaN is used as a facet value for a bounding facet, since no
<a href="#double" shape="rect">double</a> values are <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>comparable<span class="arrow">&#183;</span></a>
with it, the result is a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> that is empty.&#160;
If any other value is used for a bounding facet,
NaN will be excluded from the resulting restricted <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>;
to add NaN back in requires union with the NaN-only space (which
may be derived using
the
pattern '<code>NaN</code>').</div></div><div class="note"><div class="p"><b>Note:</b> The Schema 1.0 version of this datatype did not differentiate between
0 and &#8722;0 and NaN was equal to itself.&#160; The changes were
made to make the datatype more closely mirror <a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>.</div></div></div><div class="div4">
<h5><a name="sec-lex-double" id="sec-lex-double" shape="rect"></a>3.3.5.2 Lexical Mapping</h5><div class="block">The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#double" shape="rect">double</a> is
the set of all decimal numerals with or without a decimal
point, numerals in scientific (exponential) notation, and
the <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> 
'<code>INF</code>', '<code>+INF</code>',
'<code>-INF</code>', and '<code>NaN</code>'

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-doubleRep" id="nt-doubleRep" shape="rect"></a><span class="lhs">[5]
    &#160;
    <i>doubleRep</i></span>&#160;::= <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a>&#160;| <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a>&#160;|
<a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a>&#160;| <a href="#nt-numSpecReps" shape="rect"><i>numericalSpecialRep</i></a></div></div>


The <a href="#nt-doubleRep" shape="rect"><i>doubleRep</i></a> production is equivalent to this regular 
expression
(after whitespace is eliminated from the expression):


<blockquote class="shrink"><p>
<code>(\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)([Ee](\+|-)?[0-9]+)?
|(\+|-)?INF|NaN</code>
</p></blockquote>
</div><p>The <a href="#double" shape="rect">double</a> datatype is designed to implement for schema
processing the double-precision floating-point datatype of
<a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>.&#160; That specification does not specify specific
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a>,
but does prescribe requirements on any <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
used.&#160; Any <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
that maps the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> just described onto the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, is a function,
satisfies the requirements of
<a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>, and correctly handles the 
mapping of the literals
'<code>INF</code>', '<code>NaN</code>', etc., to the
<a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a>,
satisfies the conformance requirements of this specification.</p><p>Since IEEE allows some variation in rounding of values, processors
conforming to this specification may exhibit some variation in their
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a>.</p><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> <a href="#f-doubleLexmap" shape="rect"><i><span class="arrow">&#183;</span>doubleLexicalMap<span class="arrow">&#183;</span></i></a> is 
provided as an example of a simple algorithm that yields a conformant mapping,
and that provides the most accurate rounding possible&#8212;and is thus useful
for insuring inter-implementation reproducibility and inter-implementation
round-tripping.&#160; The simple rounding
algorithm used in <a href="#f-doubleLexmap" shape="rect"><i><span class="arrow">&#183;</span>doubleLexicalMap<span class="arrow">&#183;</span></i></a> may be more efficiently
implemented using the algorithms of <a href="#clinger1990" shape="rect">[Clinger, WD (1990)]</a>.</p><div class="note"><div class="p"><b>Note:</b> The Schema 1.0 version of this datatype did not permit rounding
algorithms whose results differed from <a href="#clinger1990" shape="rect">[Clinger, WD (1990)]</a>.</div></div><p>The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> <a href="#f-doubleCanmap" shape="rect"><i><span class="arrow">&#183;</span>doubleCanonicalMap<span class="arrow">&#183;</span></i></a> is 
provided as an example of a mapping that does not produce unnecessarily long
<a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representations<span class="arrow">&#183;</span></a>.&#160;
Other algorithms which do not yield identical results for mapping from float values
to character strings are permitted by <a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>.</p></div><div class="div4">
<h5><a name="double-facets" id="double-facets" shape="rect"></a>3.3.5.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#double" shape="rect">double</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="double.whiteSpace" shape="rect" id="double.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#double" shape="rect">double</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#double" shape="rect">double</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>true</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="duration" id="duration" shape="rect"></a>3.3.6 duration</h4><p>
<span class="termdef"><a name="dt-duration" id="dt-duration" title="" shape="rect">[Definition:]&#160;&#160;</a><b>duration</b> 
is a datatype that represents
durations of time.</span>&#160; The concept of duration being captured is
drawn from those of <a href="#ISO8601" shape="rect">[ISO 8601]</a>, specifically
<em>durations without fixed endpoints</em>.&#160; For example,
"15 days" (whose most common lexical representation
in <a href="#duration" shape="rect">duration</a> is "'<code>P15D</code>'") is
a <a href="#duration" shape="rect">duration</a> value; "15 days beginning 12 July
1995" and "15 days ending 12 July 1995" are
not <a href="#duration" shape="rect">duration</a> 
values.&#160; <a href="#duration" shape="rect">duration</a> can provide addition and
subtraction operations between <a href="#duration" shape="rect">duration</a> values and
between <a href="#duration" shape="rect">duration</a>/<a href="#dateTime" shape="rect">dateTime</a> value pairs,
and can be the result of subtracting <a href="#dateTime" shape="rect">dateTime</a>
values.&#160; However, only addition to <a href="#dateTime" shape="rect">dateTime</a>
is required for XML Schema processing and is
defined in
the function <a href="#vp-dt-dateTimePlusDuration" shape="rect"><i><span class="arrow">&#183;</span>dateTimePlusDuration<span class="arrow">&#183;</span></i></a>.</p><div class="div4">
<h5><a name="sec-vs-duration" id="sec-vs-duration" shape="rect"></a>3.3.6.1 Value Space</h5><div class="block">
Duration values can be modelled as
two-property tuples.  Each value consists of an integer number of
months and a decimal number of seconds.  The 
<a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> value <span class="rfc2119">must not</span> be negative if the 
<a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> value is positive and <span class="rfc2119">must not</span> be 
positive if the <a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> is negative.


<div class="defset">
<div class="defset-head">Properties of <a href="#duration" shape="rect">duration</a> Values</div>
<div class="deftop">
<b><a name="vp-du-month" id="vp-du-month" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a></b></div>
<div class="defindent"><a href="#integer" shape="rect">integer</a></div>
<div class="deftop">
<b><a name="vp-du-second" id="vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a></b></div>
<div class="defindent">a <a href="#decimal" shape="rect">decimal</a> value;
<span class="rfc2119">must not</span> 
be negative if <a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> is positive, and 
<span class="rfc2119">must not</span>
be positive if <a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> is negative.</div>
</div>


<a href="#duration" shape="rect">duration</a> is partially ordered.&#160; 
Equality of <a href="#duration" shape="rect">duration</a> 
is defined in terms of equality of <a href="#dateTime" shape="rect">dateTime</a>;  order for 
<a href="#duration" shape="rect">duration</a> is defined in terms of the order of 
<a href="#dateTime" shape="rect">dateTime</a>.  Specifically, the equality or order of 
two <a href="#duration" shape="rect">duration</a> values is determined by adding each 
<a href="#duration" shape="rect">duration</a> in the pair to each of the following 
four <a href="#dateTime" shape="rect">dateTime</a> values:

<ul><li><div class="p">1696-09-01T00:00:00Z</div></li><li><div class="p">1697-02-01T00:00:00Z</div></li><li><div class="p">1903-03-01T00:00:00Z</div></li><li><div class="p">1903-07-01T00:00:00Z</div></li></ul>

If all four resulting <a href="#dateTime" shape="rect">dateTime</a> value pairs are ordered
the same way (less than, equal, or greater than), then the original
pair of <a href="#duration" shape="rect">duration</a> values is ordered the same way;
otherwise the original pair is <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a>.</div><div class="note"><div class="p"><b>Note:</b> These four values are chosen so as to maximize 
the possible differences in results that could occur, 
such as the difference when adding P1M and P30D:&#160; 
1697-02-01T00:00:00Z&#160;+&#160;P1M&#160;&lt;&#160;1697-02-01T00:00:00Z&#160;+&#160;P30D&#160;, 
but 
1903-03-01T00:00:00Z&#160;+&#160;P1M&#160;&gt;&#160;1903-03-01T00:00:00Z&#160;+&#160;P30D&#160;, 
so that&#160; P1M&#160;&lt;&gt;&#160;P30D&#160;.&#160; 
If two <a href="#duration" shape="rect">duration</a> values are ordered the same way 
when added to each of these four <a href="#dateTime" shape="rect">dateTime</a> values, 
they will retain the same order when added 
to <em>any</em> other <a href="#dateTime" shape="rect">dateTime</a> 
values.&#160; Therefore, 
two <a href="#duration" shape="rect">duration</a> values are incomparable if and only 
if they can <em>ever</em> result in different orders when added to <em>any</em> 
<a href="#dateTime" shape="rect">dateTime</a> value.</div></div><p>Under the definition just given, 
two <a href="#duration" shape="rect">duration</a> values are equal if and only if they are identical.</p><div class="note"><a name="two_totally_ordered_subtypes" id="two_totally_ordered_subtypes" shape="rect"></a><div class="p"><b>Note:</b> Two totally ordered datatypes (<a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> and
<a href="#dayTimeDuration" shape="rect">dayTimeDuration</a>) are derived from <a href="#duration" shape="rect">duration</a> in
<a href="#ordinary-built-ins" shape="rect">Other Built-in Datatypes (&#167;3.4)</a>.</div></div><div class="note"><div class="p"><b>Note:</b> There are many ways to implement <a href="#duration" shape="rect">duration</a>,
some of which do not base the implementation on the two-component
model.&#160; This specification does not prescribe any particular
implementation, as long as the visible results are isomorphic to those
described herein.</div></div><div class="note"><div class="p"><b>Note:</b> See the conformance notes in <a href="#partial-implementation" shape="rect">Partial Implementation of Infinite Datatypes (&#167;5.4)</a>, which
apply to this datatype.</div></div></div><div class="div4">
<h5><a name="duration-lexical-space" id="duration-lexical-space" shape="rect"></a>3.3.6.2 Lexical Mapping</h5><div class="block">The <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a>
of <a href="#duration" shape="rect">duration</a> are 
more or less based on the pattern:
<blockquote class="shrink"><p><code>P<var>n</var>Y<var>n</var>M<var>n</var>DT<var>n</var>H<var>n</var>M<var>n</var>S</code></p></blockquote>
</div><div class="block">More precisely, the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#duration" shape="rect">duration</a>
is the set of character 
strings that satisfy <a href="#nt-durationRep" shape="rect"><i>durationLexicalRep</i></a> as defined by the following productions:
<div class="defset">
<div class="defset-head"> Lexical Representation Fragments</div>
<div class="prod">
<a name="nt-duYrFrag" id="nt-duYrFrag" shape="rect"></a><span class="lhs">[6]
    &#160;
    <i>duYearFrag</i></span>&#160;::= <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>&#160;'<code>Y</code>'</div><div class="prod">
<a name="nt-duMoFrag" id="nt-duMoFrag" shape="rect"></a><span class="lhs">[7]
    &#160;
    <i>duMonthFrag</i></span>&#160;::= <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>&#160;'<code>M</code>'</div><div class="prod">
<a name="nt-duDaFrag" id="nt-duDaFrag" shape="rect"></a><span class="lhs">[8]
    &#160;
    <i>duDayFrag</i></span>&#160;::= <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>&#160;'<code>D</code>'</div><div class="prod">
<a name="nt-duHrFrag" id="nt-duHrFrag" shape="rect"></a><span class="lhs">[9]
    &#160;
    <i>duHourFrag</i></span>&#160;::= <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>&#160;'<code>H</code>'</div><div class="prod">
<a name="nt-duMiFrag" id="nt-duMiFrag" shape="rect"></a><span class="lhs">[10]
    &#160;
    <i>duMinuteFrag</i></span>&#160;::= <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>&#160;'<code>M</code>'</div><div class="prod">
<a name="nt-duSeFrag" id="nt-duSeFrag" shape="rect"></a><span class="lhs">[11]
    &#160;
    <i>duSecondFrag</i></span>&#160;::= (<a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>&#160;|&#160;<a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a>)&#160;'<code>S</code>'</div><div class="prod">
<a name="nt-duYMFrag" id="nt-duYMFrag" shape="rect"></a><span class="lhs">[12]
    &#160;
    <i>duYearMonthFrag</i></span>&#160;::= (<a href="#nt-duYrFrag" shape="rect"><i>duYearFrag</i></a>&#160;<a href="#nt-duMoFrag" shape="rect"><i>duMonthFrag</i></a>?)&#160;| <a href="#nt-duMoFrag" shape="rect"><i>duMonthFrag</i></a></div><div class="prod">
<a name="nt-duTFrag" id="nt-duTFrag" shape="rect"></a><span class="lhs">[13]
    &#160;
    <i>duTimeFrag</i></span>&#160;::= '<code>T</code>'&#160;((<a href="#nt-duHrFrag" shape="rect"><i>duHourFrag</i></a>&#160;<a href="#nt-duMiFrag" shape="rect"><i>duMinuteFrag</i></a>?&#160;<a href="#nt-duSeFrag" shape="rect"><i>duSecondFrag</i></a>?)&#160;|
(<a href="#nt-duMiFrag" shape="rect"><i>duMinuteFrag</i></a>&#160;<a href="#nt-duSeFrag" shape="rect"><i>duSecondFrag</i></a>?)&#160;|
<a href="#nt-duSeFrag" shape="rect"><i>duSecondFrag</i></a>)</div><div class="prod">
<a name="nt-duDTFrag" id="nt-duDTFrag" shape="rect"></a><span class="lhs">[14]
    &#160;
    <i>duDayTimeFrag</i></span>&#160;::= (<a href="#nt-duDaFrag" shape="rect"><i>duDayFrag</i></a>&#160;<a href="#nt-duTFrag" shape="rect"><i>duTimeFrag</i></a>?)&#160;| <a href="#nt-duTFrag" shape="rect"><i>duTimeFrag</i></a></div></div>


<div class="defset">
<div class="defset-head">Lexical Representation</div>
<div class="prod">
<a name="nt-durationRep" id="nt-durationRep" shape="rect"></a><span class="lhs">[15]
    &#160;
    <i>durationLexicalRep</i></span>&#160;::= '<code>-</code>'?&#160;'<code>P</code>'&#160;((<a href="#nt-duYMFrag" shape="rect"><i>duYearMonthFrag</i></a>&#160;<a href="#nt-duDTFrag" shape="rect"><i>duDayTimeFrag</i></a>?)&#160;|&#160;<a href="#nt-duDTFrag" shape="rect"><i>duDayTimeFrag</i></a>)</div></div>

</div><p>Thus, a <a href="#nt-durationRep" shape="rect"><i>durationLexicalRep</i></a> consists of one or more of a <a href="#nt-duYrFrag" shape="rect"><i>duYearFrag</i></a>, 
<a href="#nt-duMoFrag" shape="rect"><i>duMonthFrag</i></a>, <a href="#nt-duDaFrag" shape="rect"><i>duDayFrag</i></a>, <a href="#nt-duHrFrag" shape="rect"><i>duHourFrag</i></a>, 
<a href="#nt-duMiFrag" shape="rect"><i>duMinuteFrag</i></a>, and/or <a href="#nt-duSeFrag" shape="rect"><i>duSecondFrag</i></a>, in order, with letters 
'<code>P</code>' and '<code>T</code>' (and perhaps a '<code>-</code>')
where appropriate.</p><div class="block">The language accepted by the <a href="#nt-durationRep" shape="rect"><i>durationLexicalRep</i></a> 
production is the set of strings which satisfy all of the following
three regular expressions:
<ul><li><div class="p">The expression 

<blockquote class="shrink"><p>
<code>-?P[0-9]+Y?([0-9]+M)?([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9]+)?S)?)?</code>
</p></blockquote>
matches only strings in which the fields occur in the proper order.</div></li><li><div class="p">The expression '<code>.*[YMDHS].*</code>' matches only
strings in which at least one field occurs.</div></li><li><div class="p">The expression '<code>.*[^T]</code>' matches
only strings in which '<code>T</code>' is not the final character, so that
if '<code>T</code>' appears, something follows it.  The first rule
ensures that what follows '<code>T</code>' will be an hour,
minute, or second field.</div></li></ul>
The intersection of these three regular expressions is equivalent to
the following (after removal of the white space inserted here for
legibility):

</div><div class="block">

<pre xml:space="preserve">
-?P( ( ( [0-9]+Y([0-9]+M)?([0-9]+D)?
       | ([0-9]+M)([0-9]+D)?
       | ([0-9]+D)
       )
       (T ( ([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?
          | ([0-9]+M)([0-9]+(\.[0-9]+)?S)?
          | ([0-9]+(\.[0-9]+)?S)
          )
       )?
    )
  | (T ( ([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?
       | ([0-9]+M)([0-9]+(\.[0-9]+)?S)?
       | ([0-9]+(\.[0-9]+)?S)
       )
    )
  )
</pre>

</div><p>The
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> for <a href="#duration" shape="rect">duration</a> is <a href="#f-durationMap" shape="rect"><i><span class="arrow">&#183;</span>durationMap<span class="arrow">&#183;</span></i></a>.
</p><p><a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>The canonical
mapping<span class="arrow">&#183;</span></a> for <a href="#duration" shape="rect">duration</a>
is <a href="#f-durationCanMap" shape="rect"><i><span class="arrow">&#183;</span>durationCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p></div><div class="div4">
<h5><a name="duration-facets" id="duration-facets" shape="rect"></a>3.3.6.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#duration" shape="rect">duration</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="duration.whiteSpace" shape="rect" id="duration.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#duration" shape="rect">duration</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#duration" shape="rect">duration</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="duration-derived-types" id="duration-derived-types" shape="rect"></a>3.3.6.4 Related Datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatypes are 
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#duration" shape="rect">duration</a></p><ul><li><a href="#yearMonthDuration" shape="rect">yearMonthDuration</a></li><li><a href="#dayTimeDuration" shape="rect">dayTimeDuration</a></li></ul></div></div><div class="div3">
<h4><a name="dateTime" id="dateTime" shape="rect"></a>3.3.7 dateTime</h4><p><a href="#dateTime" shape="rect">dateTime</a> represents
instants of time, optionally marked
with a particular time zone offset.&#160; Values representing
the same instant but having
different time zone offsets are equal but not
identical.</p><div class="div4">
<h5><a name="dateTime-value-space" id="dateTime-value-space" shape="rect"></a>3.3.7.1 Value Space</h5><p><a href="#dateTime" shape="rect">dateTime</a> uses the
<a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>, with no properties 
except <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
permitted 
to be <b><i>absent</i></b>.  The <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> property remains
<a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> In version 1.0 of this specification, the 
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> property was not permitted to have the value
zero. The year before the year 1
in the proleptic Gregorian calendar, traditionally referred to as 
1 BC or as
1 BCE, was represented by a 
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> value of &#8722;1, 2 BCE by &#8722;2, and so
forth. Of course, many, perhaps most,
references to 1 BCE (or 1 BC) actually refer not 
to a year in the proleptic Gregorian calendar but to a year in the
Julian or "old style" calendar; the two correspond
approximately but not exactly to each other.
</div><div class="p">
In this version of this specification,
two changes are made in order to agree with existing usage. 
First, <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> is permitted to have the value zero.
Second, the interpretation of
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> values is changed accordingly: a <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> value of zero represents 1 BCE, &#8722;1
represents 2 BCE, etc. This representation simplifies interval
arithmetic and leap-year calculation for dates before the common 
era (which may be why astronomers
and others interested in such calculations with the proleptic
Gregorian calendar have adopted it), and is consistent with the
current edition of <a href="#ISO8601" shape="rect">[ISO 8601]</a>.
</div><div class="p">
Note that 1 BCE, 5 BCE, and so on (years 0000, -0004, etc. in the
lexical representation defined here) are leap years in the proleptic
Gregorian calendar used for the date/time datatypes defined here.
Version 1.0 of this specification was unclear about the treatment of
leap years before the common era.
If existing
schemas or data specify dates of 29 February for any years before the
common era, then some values giving
a date of 29 February which were valid under a plausible
interpretation of XSD 1.0 will be invalid under this specification,
and some which were invalid will be valid.  With that possible 
exception, schemas and data valid
under the old interpretation remain valid under the new.
</div></div><div class="constraintnote"><a id="con-dateTime-dayValue" name="con-dateTime-dayValue" shape="rect"></a><b>Constraint: Day-of-month Values</b><br clear="none" /><div class="constraint"><div class="p">The <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> value 
<span class="rfc2119">must</span> be
no more than 30 if <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>
is one of 4, 6, 9, or 11; 
no more than 28
if <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> is 2 and
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> is not divisible 4,
or is divisible by 100 but not by 400;
and no more than 29 if <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>
is 2 and <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>
is divisible by 400, or by 4 but not by 100.</div></div></div><div class="note"><div class="p"><b>Note:</b> See the conformance note in 
<a href="#partial-implementation" shape="rect">Partial Implementation of Infinite Datatypes (&#167;5.4)</a>
which applies to the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> and <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a>
values of this datatype.</div></div><p>Equality and order are as prescribed
in <a href="#theSevenPropertyModel" shape="rect">The Seven-property Model (&#167;D.2.1)</a>.&#160;
<a href="#dateTime" shape="rect">dateTime</a> values are ordered
by their <a href="#vp-dt-timeOnTimeline" shape="rect"><i><span class="arrow">&#183;</span>timeOnTimeline<span class="arrow">&#183;</span></i></a> value.</p><div class="note"><div class="p"><b>Note:</b> Since the order of a <a href="#dateTime" shape="rect">dateTime</a>
value having a <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
relative to another value whose
<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> is <b><i>absent</i></b> is determined
by imputing time zone offsets of both +14:00
and &#8722;14:00 to the 
value with no time zone offset, many such
combinations will be
<a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> because the two imputed
time zone offsets yield different orders.</div><div class="p">Although <a href="#dateTime" shape="rect">dateTime</a> and other
types related to dates and times have only a partial order, it
is possible for datatypes derived from <a href="#dateTime" shape="rect">dateTime</a> to have
total orders, if they are restricted (e.g. using the
<a href="#f-p" class="compref" shape="rect">pattern</a> facet) to the subset of values with, or
the subset of values without, time zone offsets.  Similar restrictions
on other date- and time-related types will similarly produce
totally ordered subtypes.  Note, however, that
such restrictions do not affect the value shown, for a given 
<a href="#std" class="compref" shape="rect">Simple Type Definition</a>, in the <a href="#ff-o" class="compref" shape="rect">ordered</a> facet.</div></div><div class="note"><div class="p"><b>Note:</b> Order and equality are essentially the same for
<a href="#dateTime" shape="rect">dateTime</a> in this version of this specification as
they were in version 1.0.&#160; However, since values
now distinguish time zone offsets, equal
values with different <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>s
are not <em>identical</em>, and values with extreme
<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>s may no longer be equal
to any value with a smaller <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>.</div></div></div><div class="div4">
<h5><a name="dateTime-lexical-mapping" id="dateTime-lexical-mapping" shape="rect"></a>3.3.7.2 Lexical Mapping</h5><div class="block">The lexical representations for <a href="#dateTime" shape="rect">dateTime</a> are as follows:

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-dateTimeRep" id="nt-dateTimeRep" shape="rect"></a><span class="lhs">[16]
    &#160;
    <i>dateTimeLexicalRep</i></span>&#160;::= <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>&#160;'<code>-</code>'&#160;<a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>&#160;'<code>-</code>'&#160;<a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>&#160;'<code>T</code>'&#160;((<a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>&#160;'<code>:</code>'&#160;<a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>&#160;'<code>:</code>'&#160;<a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>)&#160;|
<a href="#nt-eodFrag" shape="rect"><i>endOfDayFrag</i></a>) <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>?&#160;&#160; <b>Constraint:</b>&#160; Day-of-month Representations</div></div>


<div class="constraintnote"><a id="con-dateTime-day" name="con-dateTime-day" shape="rect"></a><b>Constraint: Day-of-month Representations</b><br clear="none" /><div class="constraint"><div class="p">Within a <a href="#nt-dateTimeRep" shape="rect"><i>dateTimeLexicalRep</i></a>, a <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a> <span class="rfc2119">must not</span>
begin with the digit '<code>3</code>' or be '<code>29</code>'
unless the value to
which it would map would satisfy the value constraint on
<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> values

("Constraint: Day-of-month Values") given above.</div></div></div>



In such representations:
<ul><li><div class="p"><a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a> is a numeral consisting
of at least four decimal digits, optionally preceded by a minus sign;
leading '<code>0</code>' digits are prohibited except to bring the
digit count up to four.&#160;
It represents the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> value.</div></li><li><div class="p">Subsequent '<code>-</code>', '<code>T</code>', and
'<code>:</code>', separate the various numerals.</div></li><li><div class="p"><a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>, <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>, <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>,
and <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a> are numerals consisting
of exactly two decimal digits.&#160;
They represent 
the <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>,
<a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>, and <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a> values
respectively.</div></li><li><div class="p"><a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>
is a numeral consisting
of exactly two decimal digits, or two decimal digits,
a decimal point, and one or more trailing digits.&#160;
It represents the <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> value.</div></li><li><div class="p">Alternatively, <a href="#nt-eodFrag" shape="rect"><i>endOfDayFrag</i></a> combines the <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>,
<a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>, <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>, and their separators to
represent midnight of the day, which is the first moment of the next
day.</div></li><li><div class="p"><a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>, if present, specifies an
offset between UTC and local time. 
Time zone offsets are a count of minutes (expressed in
<a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a> as a count of hours and minutes) that are added
or subtracted from UTC time to get the "local" time.&#160;
'<code>Z</code>' is an alternative representation of the time zone offset 
'<code>00:00</code>', 
which is, of course, zero minutes from UTC.</div><div class="p">For example, 2002-10-10T12:00:00&#8722;05:00 
(noon on 10 October 2002, Central Daylight
Savings Time as well as Eastern Standard Time
in the U.S.) is equal to 2002-10-10T17:00:00Z,
five hours later than 2002-10-10T12:00:00Z.</div><div class="note"><div class="p"><b>Note:</b> For the most part, this specification adopts the distinction between
'timezone' and 'timezone offset' laid
out in <a href="#ref-timezones" shape="rect">[Timezones]</a>.  
Version 1.0 of this specification did not make this distinction,
but used the term 'timezone' for the time zone
offset information associated with date- and time-related datatypes.
Some traces of the earlier usage remain visible in this and other
specifications.  The names 
<a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>
and <a href="#f-tz" class="compref" shape="rect">explicitTimezone</a>
are such traces ;
others will be found in the names of functions defined in 
<a href="#F_O" shape="rect">[XQuery 1.0 and XPath 2.0 Functions and Operators]</a>, or in references in this specification to
"timezoned" and "non-timezoned"
values.</div></div></li></ul>
</div><div class="block">The <a href="#nt-dateTimeRep" shape="rect"><i>dateTimeLexicalRep</i></a> production
is equivalent to this regular expression
once whitespace is removed.


<pre xml:space="preserve">
-?([1-9][0-9]{3,}|0[0-9]{3})
-(0[1-9]|1[0-2])
-(0[1-9]|[12][0-9]|3[01])
T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))
(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</pre>

Note that neither the <a href="#nt-dateTimeRep" shape="rect"><i>dateTimeLexicalRep</i></a> production
nor this regular
expression alone enforce the constraint
on <a href="#nt-dateTimeRep" shape="rect"><i>dateTimeLexicalRep</i></a> given above.</div><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
for <a href="#dateTime" shape="rect">dateTime</a> is <a href="#vp-dateTimeLexRep" shape="rect"><i><span class="arrow">&#183;</span>dateTimeLexicalMap<span class="arrow">&#183;</span></i></a>.
The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is <a href="#vp-dateTimeCanRep" shape="rect"><i><span class="arrow">&#183;</span>dateTimeCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p></div><div class="div4">
<h5><a name="dateTime-facets" id="dateTime-facets" shape="rect"></a>3.3.7.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#dateTime" shape="rect">dateTime</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="dateTime.whiteSpace" shape="rect" id="dateTime.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#dateTime" shape="rect">dateTime</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-explicitTimezone" name="dateTime.explicitTimezone" shape="rect" id="dateTime.explicitTimezone">explicitTimezone</a><span class="normal"><span class="normal"> = <b><i>optional</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#dateTime" shape="rect">dateTime</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#dateTime" shape="rect">dateTime</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="dateTime-derived-types" id="dateTime-derived-types" shape="rect"></a>3.3.7.4 Related Datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#dateTime" shape="rect">dateTime</a></p><ul><li><a href="#dateTimeStamp" shape="rect">dateTimeStamp</a></li></ul></div></div><div class="div3">
<h4><a name="time" id="time" shape="rect"></a>3.3.8 time</h4><p><a href="#time" shape="rect">time</a>
represents instants of time that recur at the same point in each
calendar day, or that occur in some arbitrary calendar day.</p><div class="div4">
<h5><a name="time-value-space" id="time-value-space" shape="rect"></a>3.3.8.1 Value Space</h5><p><a href="#time" shape="rect">time</a> uses the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>, with
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>,
and <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> required 
to be <b><i>absent</i></b>.&#160; <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> remains
<a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> See the conformance note in 
<a href="#partial-implementation" shape="rect">Partial Implementation of Infinite Datatypes (&#167;5.4)</a>
which applies to the <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> value of this datatype.</div></div><p>Equality and order are as prescribed in
<a href="#theSevenPropertyModel" shape="rect">The Seven-property Model (&#167;D.2.1)</a>.&#160; <a href="#time" shape="rect">time</a> values
(points in time in an "arbitrary" day) are ordered
taking into account their <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>.</p><p>A calendar (or 
"local time") day with a larger positive 
time zone offset begins earlier than the same calendar day with 
a smaller (or negative)
time zone offset.  Since the time zone offsets allowed spread over 28 hours,
it is
possible for the period denoted by a given calendar day with one
time zone offset to be completely disjoint from the period denoted by
the same calendar day with a different offset
&#8212; the earlier day ends before the
later one starts.&#160; 
The moments in time
represented by a single calendar day are spread over a 52-hour
interval, from the beginning of the day in the +14:00 time zone offset to the
end of that day in the &#8722;14:00 time zone offset.</p><div class="note"><div class="p"><b>Note:</b> The relative
order of two <a href="#time" shape="rect">time</a> values, one of which has a <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> of <b><i>absent</i></b> is determined by imputing
time zone offsets of both +14:00 and &#8722;14:00 to the value without an offset. Many such combinations will be <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> because the two imputed time zone offsets yield
different orders.&#160; However, for a given non-timezoned value,
there will always be timezoned values at one or both ends of the
52-hour interval that are <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>comparable<span class="arrow">&#183;</span></a> (because the interval of
<a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparability<span class="arrow">&#183;</span></a> is only
28
hours wide).</div><div class="p">
Some pairs of <a href="#time" shape="rect">time</a> literals

which 
in the 1.0 version of this specification
denoted the same value
now (in this version) denote distinct values instead,
because values now include time zone offset information.
Some such pairs, 
such as '<code>05:00:00-03:00</code>' and '<code>10:00:00+02:00</code>',
now denote equal though distinct values 
(because they identify the same points on the time line); 
others, 
such as '<code>23:00:00-03:00</code>' and '<code>02:00:00Z</code>', 
now denote unequal values (23:00:00&#8722;03:00 &gt; 02:00:00Z
because 23:00:00&#8722;03:00 on any given day is equal to
02:00:00Z on <em>the next day</em>).
</div></div></div><div class="div4">
<h5><a name="time-lexical-mapping" id="time-lexical-mapping" shape="rect"></a>3.3.8.2 Lexical Mappings</h5><div class="block">The lexical representations for <a href="#time" shape="rect">time</a>
are "projections" of 
those of <a href="#dateTime" shape="rect">dateTime</a>, as follows:

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-timeRep" id="nt-timeRep" shape="rect"></a><span class="lhs">[17]
    &#160;
    <i>timeLexicalRep</i></span>&#160;::= ((<a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>&#160;'<code>:</code>'&#160;<a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>&#160;'<code>:</code>'&#160;<a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>)&#160;|
<a href="#nt-eodFrag" shape="rect"><i>endOfDayFrag</i></a>) <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>?</div></div>




The <a href="#nt-timeRep" shape="rect"><i>timeLexicalRep</i></a> production
is equivalent to this
regular expression, once whitespace is
removed:

<blockquote><blockquote><p><code>
(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code></p></blockquote></blockquote>
Note that neither
the <a href="#nt-timeRep" shape="rect"><i>timeLexicalRep</i></a> production
nor this regular
expression alone enforce the constraint
on <a href="#nt-timeRep" shape="rect"><i>timeLexicalRep</i></a> given above.
</div><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
for <a href="#time" shape="rect">time</a> is
<a href="#vp-timeLexRep" shape="rect"><i><span class="arrow">&#183;</span>timeLexicalMap<span class="arrow">&#183;</span></i></a>; the <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is
<a href="#vp-timeCanRep" shape="rect"><i><span class="arrow">&#183;</span>timeCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p><div class="note"><div class="p"><b>Note:</b> The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> maps '<code>00:00:00</code>' and
'<code>24:00:00</code>' to the same value, namely midnight
(<a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>&#160;=&#160;0&#160;,
<a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>&#160;=&#160;0&#160;, 
<a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a>&#160;=&#160;0).</div></div></div><div class="div4">
<h5><a name="time-facets" id="time-facets" shape="rect"></a>3.3.8.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#time" shape="rect">time</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="time.whiteSpace" shape="rect" id="time.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#time" shape="rect">time</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-explicitTimezone" name="time.explicitTimezone" shape="rect" id="time.explicitTimezone">explicitTimezone</a><span class="normal"><span class="normal"> = <b><i>optional</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#time" shape="rect">time</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#time" shape="rect">time</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="date" id="date" shape="rect"></a>3.3.9 date</h4><p><span class="termdef"><a name="dt-date" id="dt-date" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>date</b>
represents top-open intervals of exactly one day in length on the timelines of
<a href="#dateTime" shape="rect">dateTime</a>, beginning on the beginning moment of each 
day, up to but not including the beginning
moment of the next day).&#160; For non-timezoned values, the top-open
intervals disjointly cover the non-timezoned timeline,
one per day.&#160; For timezoned
values, the intervals begin at every minute and therefore overlap.
</span>
</p><div class="div4">
<h5><a name="date-value-space" id="date-value-space" shape="rect"></a>3.3.9.1 Value Space</h5><p><a href="#date" shape="rect">date</a> uses the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>, with
<a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>,
and <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> required 
to be <b><i>absent</i></b>.&#160; <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> remains
<a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>.</p><div class="constraintnote"><a id="con-date-dayValue" name="con-date-dayValue" shape="rect"></a><b>Constraint: Day-of-month Values</b><br clear="none" /><div class="constraint"><div class="p">The <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> value <span class="rfc2119">must</span> be
no more than 30 if <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>
is one of 4, 6, 9, or 11, no more than 28
if <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> is 2 and
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> is not divisble 4,
or is divisible by 100 but not by 400,
and no more than 29 if <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>
is 2 and <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>
is divisible by 400, or by 4 but not by 100.</div></div></div><div class="note"><div class="p"><b>Note:</b> See the conformance note in 
<a href="#partial-implementation" shape="rect">Partial Implementation of Infinite Datatypes (&#167;5.4)</a>
which applies to the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>
value of this datatype.</div></div><p>Equality and order are as prescribed in
<a href="#theSevenPropertyModel" shape="rect">The Seven-property Model (&#167;D.2.1)</a>.</p><div class="note"><div class="p"><b>Note:</b> In version 1.0 of this specification, <a href="#date" shape="rect">date</a> values 
did not retain a time zone offset explicitly, but for 
offsets 
not too far from  
zero 
their time zone offset could be recovered based on
their value's first moment on the timeline.&#160; The
<a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> retains all time zone offsets.</div><div class="p">Some <a href="#date" shape="rect">date</a> 
values with
different time zone offsets that were identical in the 1.0 version
of this specification, such as 2000-01-01+13:00
and 1999-12-31&#8722;11:00, are in this version
of this specification equal (because they begin
at the same moment on the time line) but are
not identical (because they have and retain different
time zone offsets).&#160; This situation will arise for
dates only if one has a far-from-zero time zone offset and
hence in 1.0 its "recoverable time zone offset"
was different from the the time zone offset which is retained
in the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> used in this version
of this specification.</div></div></div><div class="div4">
<h5><a name="date-lexical-mapping" id="date-lexical-mapping" shape="rect"></a>3.3.9.2 Lexical Mapping</h5><div class="block">The lexical representations for <a href="#date" shape="rect">date</a>
are "projections" of 
those of <a href="#dateTime" shape="rect">dateTime</a>, as follows:

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-dateRep" id="nt-dateRep" shape="rect"></a><span class="lhs">[18]
    &#160;
    <i>dateLexicalRep</i></span>&#160;::= <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>&#160;'<code>-</code>'&#160;<a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>&#160;'<code>-</code>'&#160;<a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a> <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>?&#160;&#160; <b>Constraint:</b>&#160; Day-of-month Representations</div></div>


<div class="constraintnote"><a id="con-date-day" name="con-date-day" shape="rect"></a><b>Constraint: Day-of-month Representations</b><br clear="none" /><div class="constraint"><div class="p">Within a
<a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a>,
a <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a> <span class="rfc2119">must not</span>
begin with the digit '<code>3</code>' or be '<code>29</code>'
unless the value to
which it would map would satisfy the value constraint on
<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> values

("Constraint: Day-of-month Values") given above.</div></div></div>

The <a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a> production
is equivalent to this
regular expression:

<blockquote class="shrink"><p>
<code>-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code>
</p></blockquote>

Note that neither
the <a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a> production
nor this regular
expression alone enforce the constraint
on <a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a> given above.</div><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
for <a href="#date" shape="rect">date</a> is <a href="#vp-dateLexRep" shape="rect"><i><span class="arrow">&#183;</span>dateLexicalMap<span class="arrow">&#183;</span></i></a>.
The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is <a href="#vp-dateCanRep" shape="rect"><i><span class="arrow">&#183;</span>dateCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p></div><div class="div4">
<h5><a name="date-facets" id="date-facets" shape="rect"></a>3.3.9.3 Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#date" shape="rect">date</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="date.whiteSpace" shape="rect" id="date.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#date" shape="rect">date</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-explicitTimezone" name="date.explicitTimezone" shape="rect" id="date.explicitTimezone">explicitTimezone</a><span class="normal"><span class="normal"> = <b><i>optional</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#date" shape="rect">date</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#date" shape="rect">date</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="gYearMonth" id="gYearMonth" shape="rect"></a>3.3.10 gYearMonth</h4><p>
<b>gYearMonth</b>  
represents specific whole Gregorian months in specific 
Gregorian years.</p><div class="note"><div class="p"><b>Note:</b> Because month/year combinations in one calendar only rarely correspond
to month/year combinations in other calendars, values of this type
are not, in general, convertible to simple values corresponding to month/year
combinations in other calendars.&#160; This type should therefore be used
with caution in contexts where conversion to other calendars is desired.</div></div><div class="div4">
<h5><a name="gYearMonth-value-space" id="gYearMonth-value-space" shape="rect"></a>3.3.10.1 Value Space</h5><p><a href="#gYearMonth" shape="rect">gYearMonth</a> uses the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>, with
<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>,
<a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>, and <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> required 
to be <b><i>absent</i></b>.&#160; <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> remains
<a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> See the conformance note in 
<a href="#partial-implementation" shape="rect">Partial Implementation of Infinite Datatypes (&#167;5.4)</a>
which applies to the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> value of this datatype.</div></div><p>Equality and order are as prescribed in
<a href="#theSevenPropertyModel" shape="rect">The Seven-property Model (&#167;D.2.1)</a>.</p></div><div class="div4">
<h5><a name="gYearMonth-lexical-repr" id="gYearMonth-lexical-repr" shape="rect"></a>3.3.10.2 Lexical
Mapping</h5><div class="block">The lexical representations for
<a href="#gYearMonth" shape="rect">gYearMonth</a> are "projections" of 
those of <a href="#dateTime" shape="rect">dateTime</a>, as follows:

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-gYearMonthRep" id="nt-gYearMonthRep" shape="rect"></a><span class="lhs">[19]
    &#160;
    <i>gYearMonthLexicalRep</i></span>&#160;::= <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a> '<code>-</code>'&#160;<a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>&#160;<a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>?</div></div>


The <a href="#nt-gYearMonthRep" shape="rect"><i>gYearMonthLexicalRep</i></a> is equivalent to this regular expression:

<blockquote class="shrink"><p>
<code>-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code>
</p></blockquote>
</div><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
for <a href="#gYearMonth" shape="rect">gYearMonth</a> is <a href="#vp-gYearMonthLexRep" shape="rect"><i><span class="arrow">&#183;</span>gYearMonthLexicalMap<span class="arrow">&#183;</span></i></a>.
The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is <a href="#vp-gYearMonthCanRep" shape="rect"><i><span class="arrow">&#183;</span>gYearMonthCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p></div><div class="div4">
<h5><a name="gYearMonth-facets" id="gYearMonth-facets" shape="rect"></a>3.3.10.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#gYearMonth" shape="rect">gYearMonth</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="gYearMonth.whiteSpace" shape="rect" id="gYearMonth.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#gYearMonth" shape="rect">gYearMonth</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-explicitTimezone" name="gYearMonth.explicitTimezone" shape="rect" id="gYearMonth.explicitTimezone">explicitTimezone</a><span class="normal"><span class="normal"> = <b><i>optional</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#gYearMonth" shape="rect">gYearMonth</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#gYearMonth" shape="rect">gYearMonth</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="gYear" id="gYear" shape="rect"></a>3.3.11 gYear</h4><p><b>gYear</b>
represents Gregorian calendar years.</p><div class="note"><div class="p"><b>Note:</b> 
Because years in one calendar only rarely correspond to years
in other calendars, values of this type
are not, in general, convertible to simple values corresponding to years
in other calendars.&#160; This type should therefore be used with caution
in contexts where conversion to other calendars is desired.
</div></div><div class="div4">
<h5><a name="gYear-value-space" id="gYear-value-space" shape="rect"></a>3.3.11.1 Value Space</h5><p><a href="#gYear" shape="rect">gYear</a> uses the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>, with
<a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>,
<a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>, and <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> required 
to be <b><i>absent</i></b>.&#160; <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> remains
<a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> See the conformance note in 
<a href="#partial-implementation" shape="rect">Partial Implementation of Infinite Datatypes (&#167;5.4)</a>
which applies to the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> value of this datatype.</div></div><p>Equality and order are as prescribed in
<a href="#theSevenPropertyModel" shape="rect">The Seven-property Model (&#167;D.2.1)</a>.</p></div><div class="div4">
<h5><a name="gYear-lexical-repr" id="gYear-lexical-repr" shape="rect"></a>3.3.11.2 Lexical 
Mapping</h5><div class="block">The lexical representations for
<a href="#gYear" shape="rect">gYear</a> are "projections" of 
those of <a href="#dateTime" shape="rect">dateTime</a>, as follows:

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-gYearRep" id="nt-gYearRep" shape="rect"></a><span class="lhs">[20]
    &#160;
    <i>gYearLexicalRep</i></span>&#160;::= <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>&#160;<a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>?</div></div>


The <a href="#nt-gYearRep" shape="rect"><i>gYearLexicalRep</i></a> is equivalent to this regular expression:

<blockquote class="shrink"><p>
<code>-?([1-9][0-9]{3,}|0[0-9]{3})(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code>
</p></blockquote>
</div><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
for <a href="#gYear" shape="rect">gYear</a> is <a href="#vp-gYearLexRep" shape="rect"><i><span class="arrow">&#183;</span>gYearLexicalMap<span class="arrow">&#183;</span></i></a>.
The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a>
is <a href="#vp-gYearCanRep" shape="rect"><i><span class="arrow">&#183;</span>gYearCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p></div><div class="div4">
<h5><a name="gYear-facets" id="gYear-facets" shape="rect"></a>3.3.11.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#gYear" shape="rect">gYear</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="gYear.whiteSpace" shape="rect" id="gYear.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#gYear" shape="rect">gYear</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-explicitTimezone" name="gYear.explicitTimezone" shape="rect" id="gYear.explicitTimezone">explicitTimezone</a><span class="normal"><span class="normal"> = <b><i>optional</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#gYear" shape="rect">gYear</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#gYear" shape="rect">gYear</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="gMonthDay" id="gMonthDay" shape="rect"></a>3.3.12 gMonthDay</h4><p><a href="#gMonthDay" shape="rect">gMonthDay</a> represents whole calendar 
days that recur at the same point in each calendar year, or that occur 
in some arbitrary calendar year.&#160; (Obviously,
days beyond 28 cannot occur in all Februaries; 29 is nonetheless
permitted.)</p><p>This datatype can be used, for example, to record
birthdays; an instance of the datatype could be used to say that 
someone's birthday occurs on the 14th of September every year.</p><div class="note"><div class="p"><b>Note:</b> 
Because day/month combinations in one calendar only rarely correspond
to day/month combinations in other calendars, values of this type do not,
in general, have any straightforward or intuitive representation
in terms of most other calendars. This type should therefore be
used with caution in contexts where conversion to other calendars
is desired.
</div></div><div class="div4">
<h5><a name="gMonthDay-value-space" id="gMonthDay-value-space" shape="rect"></a>3.3.12.1 Value Space</h5><p><a href="#gMonthDay" shape="rect">gMonthDay</a> uses the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>, with
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>, and <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> required 
to be <b><i>absent</i></b>.&#160; <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> remains
<a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>.</p><div class="constraintnote"><a id="con-gMonthDay-dayValue" name="con-gMonthDay-dayValue" shape="rect"></a><b>Constraint: Day-of-month Values</b><br clear="none" /><div class="constraint"><div class="p">The <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> value <span class="rfc2119">must</span> be no more than 30 if <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>
is one of 4, 6, 9, or 11, and no more than 29 if <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> is 2.</div></div></div><p>Equality and order are as prescribed in
<a href="#theSevenPropertyModel" shape="rect">The Seven-property Model (&#167;D.2.1)</a>.</p><div class="note"><div class="p"><b>Note:</b> In version 1.0 of this specification, <a href="#gMonthDay" shape="rect">gMonthDay</a> values 
did not retain a time zone offset explicitly, but for time zone offsets not too far from 
<a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a> their time zone offset could be recovered based on
their value's first moment on the timeline.&#160; The
<a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> retains all time zone offsets.</div><div class="p">An example that shows the difference from version 1.0 (see 
<a href="#gMonthDay-lexical-repr" shape="rect">Lexical 
Mapping (&#167;3.3.12.2)</a> for the notations):
<ul><li><div class="p">A day is a calendar (or "local time") day 
offset from <a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a>
by the appropriate interval;
this is now true for all <a href="#vp-dt-day" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>
values, including those with time zone offsets outside the range
+12:00 through -11:59 inclusive:</div><div class="p">--12-12+13:00&#160;&lt; --12-12+11:00&#160;
(just as --12-12+12:00 has always been less than
--12-12+11:00, but in version 1.0&#160;
--12-12+13:00&#160;&gt; --12-12+11:00&#160;, since
--12-12+13:00's "recoverable
time zone offset" was &#8722;11:00)</div></li></ul>
</div></div></div><div class="div4">
<h5><a name="gMonthDay-lexical-repr" id="gMonthDay-lexical-repr" shape="rect"></a>3.3.12.2 Lexical 
Mapping</h5><div class="block">The lexical representations for 
<a href="#gMonthDay" shape="rect">gMonthDay</a> are "projections" 
of those of <a href="#dateTime" shape="rect">dateTime</a>, as follows:

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-gMonthDayRep" id="nt-gMonthDayRep" shape="rect"></a><span class="lhs">[21]
    &#160;
    <i>gMonthDayLexicalRep</i></span>&#160;::= '<code>--</code>'&#160;<a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>&#160;'<code>-</code>'&#160;<a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a> <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>?&#160;&#160; <b>Constraint:</b>&#160; Day-of-month Representations</div></div>


<div class="constraintnote"><a id="con-gMonthDay-day" name="con-gMonthDay-day" shape="rect"></a><b>Constraint: Day-of-month Representations</b><br clear="none" /><div class="constraint"><div class="p">Within a <a href="#nt-gMonthDayRep" shape="rect"><i>gMonthDayLexicalRep</i></a>, a <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a> <span class="rfc2119">must not</span>
begin with the digit '<code>3</code>' or be '<code>29</code>'
unless the value to
which it would map would satisfy the value constraint on
<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> values

("Constraint: Day-of-month Values") given above.</div></div></div>

The <a href="#nt-gMonthDayRep" shape="rect"><i>gMonthDayLexicalRep</i></a> is equivalent to this regular 
expression:




<blockquote class="shrink"><p>
<code>--(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code></p></blockquote>
Note that neither
the <a href="#nt-gMonthDayRep" shape="rect"><i>gMonthDayLexicalRep</i></a> production
nor this regular
expression alone enforce the constraint
on <a href="#nt-gMonthDayRep" shape="rect"><i>gMonthDayLexicalRep</i></a> given above.</div><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>
for <a href="#gMonthDay" shape="rect">gMonthDay</a> is <a href="#vp-gMonthDayLexRep" shape="rect"><i><span class="arrow">&#183;</span>gMonthDayLexicalMap<span class="arrow">&#183;</span></i></a>.
The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is <a href="#vp-gMonthDayCanRep" shape="rect"><i><span class="arrow">&#183;</span>gMonthDayCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p></div><div class="div4">
<h5><a name="gMonthDay-facets" id="gMonthDay-facets" shape="rect"></a>3.3.12.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#gMonthDay" shape="rect">gMonthDay</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="gMonthDay.whiteSpace" shape="rect" id="gMonthDay.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#gMonthDay" shape="rect">gMonthDay</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-explicitTimezone" name="gMonthDay.explicitTimezone" shape="rect" id="gMonthDay.explicitTimezone">explicitTimezone</a><span class="normal"><span class="normal"> = <b><i>optional</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#gMonthDay" shape="rect">gMonthDay</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#gMonthDay" shape="rect">gMonthDay</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="gDay" id="gDay" shape="rect"></a>3.3.13 gDay</h4><p><span class="termdef"><a name="dt-gday" id="dt-gday" title="" shape="rect">[Definition:]&#160;&#160;</a><b>gDay</b> 
 represents 
whole days within an arbitrary month&#8212;days that recur at the same
point in each (Gregorian) month.</span>  This datatype is used to represent a specific day of the month.
To indicate, for example, that an employee gets a paycheck on the 15th of each month.&#160; (Obviously, days
beyond 28 cannot occur in <em>all</em> months; they are nonetheless permitted, up to 31.)</p><div class="note"><div class="p"><b>Note:</b> Because days in one calendar only rarely
correspond to days in other calendars,
<a href="#gDay" shape="rect">gDay</a>
values do not, in general, have any straightforward or
intuitive representation in terms of most 
non-Gregorian 
calendars. 
<a href="#gDay" shape="rect">gDay</a>
 should therefore be used with caution in contexts where conversion to 
other calendars is desired.</div></div><div class="div4">
<h5><a name="sec-vs-gDay" id="sec-vs-gDay" shape="rect"></a>3.3.13.1 Value Space</h5><p><a href="#gDay" shape="rect">gDay</a> uses the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>, with
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>,
<a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>,
and <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> required to be
<b><i>absent</i></b>.&#160; <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> remains
<a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a> and <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>
must be between 1 and 31 inclusive.</p><p>Equality and order are as prescribed in
<a href="#theSevenPropertyModel" shape="rect">The Seven-property Model (&#167;D.2.1)</a>.&#160; Since <a href="#gDay" shape="rect">gDay</a>
values (days) are ordered by their first moments, it is possible
for apparent anomalies to appear in the order when
<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> values
differ by at least 24
hours.&#160; (It is possible for <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
values to differ by up to 28 hours.)</p><div class="block">
Examples that may appear anomalous (see <a href="#gDay-lexical-mapping" shape="rect">Lexical Mapping (&#167;3.3.13.2)</a> for the notations):
<ul><li><div class="p">---15&#160;&lt;&#160;---16&#160;, but&#160; ---15&#8722;13:00&#160;&gt;&#160;---16+13:00</div></li><li><div class="p">---15&#8722;11:00&#160;=&#160;---16+13:00</div></li><li><div class="p">---15&#8722;13:00&#160;&lt;&gt;&#160;---16&#160;,
because&#160; ---15&#8722;13:00&#160;&gt;&#160;---16+14:00&#160;
and ---15&#8722;13:00&#160;&lt;&#160;16&#8722;14:00</div></li></ul>
</div><div class="note"><div class="p"><b>Note:</b> 



Time zone offsets do not cause wrap-around at the end of the month:&#160; 
the last day of a 
given month with a time zone offset of 
&#8722;13:00 may start after the first 
day of the <em>next</em> month 
with offset +13:00, as 
measured on the global timeline,
but nonetheless&#160;
---01+13:00&#160;&lt;&#160;---31&#8722;13:00&#160;.</div></div></div><div class="div4">
<h5><a name="gDay-lexical-mapping" id="gDay-lexical-mapping" shape="rect"></a>3.3.13.2 Lexical Mapping</h5><div class="block">
The lexical representations for <a href="#gDay" shape="rect">gDay</a> are 
"projections" 
of those of <a href="#dateTime" shape="rect">dateTime</a>, as follows:

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-gDayRep" id="nt-gDayRep" shape="rect"></a><span class="lhs">[22]
    &#160;
    <i>gDayLexicalRep</i></span>&#160;::= '<code>---</code>'&#160;<a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>&#160;<a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>?</div></div>


The <a href="#nt-gDayRep" shape="rect"><i>gDayLexicalRep</i></a> is equivalent to this regular expression:

<blockquote class="shrink"><p>
<code>---(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code>
</p></blockquote>
</div><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> 
for <a href="#gDay" shape="rect">gDay</a> is <a href="#vp-gDayLexRep" shape="rect"><i><span class="arrow">&#183;</span>gDayLexicalMap<span class="arrow">&#183;</span></i></a>.
The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is <a href="#vp-gDayCanRep" shape="rect"><i><span class="arrow">&#183;</span>gDayCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p></div><div class="div4">
<h5><a name="gDay-facets" id="gDay-facets" shape="rect"></a>3.3.13.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#gDay" shape="rect">gDay</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="gDay.whiteSpace" shape="rect" id="gDay.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#gDay" shape="rect">gDay</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-explicitTimezone" name="gDay.explicitTimezone" shape="rect" id="gDay.explicitTimezone">explicitTimezone</a><span class="normal"><span class="normal"> = <b><i>optional</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#gDay" shape="rect">gDay</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#gDay" shape="rect">gDay</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="gMonth" id="gMonth" shape="rect"></a>3.3.14 gMonth</h4><p><b>gMonth</b>
represents whole (Gregorian) months
within an arbitrary year&#8212;months that recur at the same point in 
each year.&#160; It might be used, for example, to say what
month annual Thanksgiving celebrations fall in different countries
(--11 in the United States, --10 in Canada, and possibly other months in
other countries).</p><div class="note"><div class="p"><b>Note:</b> 
Because months in one calendar only rarely correspond
to months in other calendars, values of this type do not,
in general, have any straightforward or intuitive representation
in terms of most other calendars. This type should therefore be
used with caution in contexts where conversion to other calendars
is desired.
</div></div><div class="div4">
<h5><a name="gMonth-value-space" id="gMonth-value-space" shape="rect"></a>3.3.14.1 Value Space</h5><p><a href="#gMonth" shape="rect">gMonth</a> uses the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>, with
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>, and <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> required 
to be <b><i>absent</i></b>.&#160; <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> remains
<a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>.</p><p>Equality and order are as prescribed in
<a href="#theSevenPropertyModel" shape="rect">The Seven-property Model (&#167;D.2.1)</a>.</p></div><div class="div4">
<h5><a name="gMonth-lexical-repr" id="gMonth-lexical-repr" shape="rect"></a>3.3.14.2 Lexical 
Mapping</h5><div class="block">The lexical representations for <a href="#gMonth" shape="rect">gMonth</a> are "projections" of 
those of <a href="#dateTime" shape="rect">dateTime</a>, as follows:

<div class="defset">
<div class="defset-head">Lexical Space</div>
<div class="prod">
<a name="nt-gMonthRep" id="nt-gMonthRep" shape="rect"></a><span class="lhs">[23]
    &#160;
    <i>gMonthLexicalRep</i></span>&#160;::= '<code>--</code>'&#160;<a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>&#160;<a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>?</div></div>


The <a href="#nt-gMonthRep" shape="rect"><i>gMonthLexicalRep</i></a> is equivalent to this regular expression:

<blockquote class="shrink"><p>
<code>--(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?</code>
</p></blockquote>
</div><p>
The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> for <a href="#gMonth" shape="rect">gMonth</a> is <a href="#vp-gMonthLexRep" shape="rect"><i><span class="arrow">&#183;</span>gMonthLexicalMap<span class="arrow">&#183;</span></i></a>.
The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is <a href="#vp-gMonthCanRep" shape="rect"><i><span class="arrow">&#183;</span>gMonthCanonicalMap<span class="arrow">&#183;</span></i></a>.
</p></div><div class="div4">
<h5><a name="gMonth-facets" id="gMonth-facets" shape="rect"></a>3.3.14.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#gMonth" shape="rect">gMonth</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="gMonth.whiteSpace" shape="rect" id="gMonth.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#gMonth" shape="rect">gMonth</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-explicitTimezone" name="gMonth.explicitTimezone" shape="rect" id="gMonth.explicitTimezone">explicitTimezone</a><span class="normal"><span class="normal"> = <b><i>optional</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#gMonth" shape="rect">gMonth</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#gMonth" shape="rect">gMonth</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="hexBinary" id="hexBinary" shape="rect"></a>3.3.15 hexBinary</h4><p><span class="termdef"><a name="dt-hexBinary" id="dt-hexBinary" title="" shape="rect">[Definition:]&#160;&#160;</a><b>hexBinary</b>
represents arbitrary hex-encoded binary data.&#160;
</span>
</p><div class="div4">
<h5><a name="sec-vs-hexbin" id="sec-vs-hexbin" shape="rect"></a>3.3.15.1 Value Space</h5><p>The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<a href="#hexBinary" shape="rect">hexBinary</a>
is the set of 
finite-length sequences of zero or more
binary octets.&#160; The
length of a value is the number of octets.</p></div><div class="div4">
<h5><a name="hexBinary-lexical-representation" id="hexBinary-lexical-representation" shape="rect"></a>3.3.15.2 Lexical Mapping</h5><p><a href="#hexBinary" shape="rect">hexBinary</a>'s <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>
consists of strings of hex (hexadecimal) digits, two consecutive digits
representing each octet in the corresponding value (treating the octet
as the binary representation of a number between 0 and 255).&#160; For
example, '<code>0FB7</code>' is a <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> of the
two-octet value 00001111 10110111.</p><div class="block">More formally, the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<a href="#hexBinary" shape="rect">hexBinary</a> is the set of literals matching the <a href="#nt-hexBinary" shape="rect"><i>hexBinary</i></a> production.
<div class="defset">
<div class="defset-head">Lexical space of hexBinary</div>
<div class="prod">
<a name="nt-hexDigit" id="nt-hexDigit" shape="rect"></a><span class="lhs">[24]
    &#160;
    <i>hexDigit</i></span>&#160;::= [<code>0-9a-fA-F</code>]</div><div class="prod">
<a name="nt-hexOctet" id="nt-hexOctet" shape="rect"></a><span class="lhs">[25]
    &#160;
    <i>hexOctet</i></span>&#160;::= <a href="#nt-hexDigit" shape="rect"><i>hexDigit</i></a> <a href="#nt-hexDigit" shape="rect"><i>hexDigit</i></a></div><div class="prod">
<a name="nt-hexBinary" id="nt-hexBinary" shape="rect"></a><span class="lhs">[26]
    &#160;
    <i>hexBinary</i></span>&#160;::= <a href="#nt-hexOctet" shape="rect"><i>hexOctet</i></a>*</div></div>

</div><p>The set recognized by <a href="#nt-hexBinary" shape="rect"><i>hexBinary</i></a> is the same as that recognized by the regular
expression '<code>([0-9a-fA-F]{2})*</code>'.</p><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> of
<a href="#hexBinary" shape="rect">hexBinary</a> is <a href="#f-hexBinaryMap" shape="rect"><i><span class="arrow">&#183;</span>hexBinaryMap<span class="arrow">&#183;</span></i></a>.</p><p>The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> of
<a href="#hexBinary" shape="rect">hexBinary</a> is given formally in <a href="#f-hexBinaryCanonical" shape="rect"><i><span class="arrow">&#183;</span>hexBinaryCanonical<span class="arrow">&#183;</span></i></a>.</p></div><div class="div4">
<h5><a name="hexBinary-facets" id="hexBinary-facets" shape="rect"></a>3.3.15.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#hexBinary" shape="rect">hexBinary</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="hexBinary.whiteSpace" shape="rect" id="hexBinary.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#hexBinary" shape="rect">hexBinary</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#hexBinary" shape="rect">hexBinary</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="base64Binary" id="base64Binary" shape="rect"></a>3.3.16 base64Binary</h4><p><span class="termdef"><a name="dt-base64Binary" id="dt-base64Binary" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>base64Binary</b> represents arbitrary
Base64-encoded  binary
data.&#160;  
For <b>base64Binary</b> data the entire binary stream is encoded
using the Base64 Encoding
defined in <a href="#RFC3548" shape="rect">[RFC 3548]</a>, which is derived from the encoding
described in <a href="#RFC2045" shape="rect">[RFC 2045]</a>.</span></p><div class="div4">
<h5><a name="sec-vs-b46b" id="sec-vs-b46b" shape="rect"></a>3.3.16.1 Value Space</h5><p>The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<a href="#base64Binary" shape="rect">base64Binary</a> is the set of  finite-length sequences of
zero or more
binary octets.&#160; The
length of a value is the number of octets.</p></div><div class="div4">
<h5><a name="sec-lex-b64b" id="sec-lex-b64b" shape="rect"></a>3.3.16.2 Lexical
Mapping</h5><p>The <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> of
<a href="#base64Binary" shape="rect">base64Binary</a>
values are limited to the 65 characters of the Base64 Alphabet defined in 
<a href="#RFC3548" shape="rect">[RFC 3548]</a>,
i.e., <code>a-z</code>, <code>A-Z</code>,
<code>0-9</code>, the plus sign (+), the forward slash (/) and the
equal sign (=), together with 
the space character
(#x20). No other characters are allowed.
</p><p>
For compatibility with older mail gateways, <a href="#RFC2045" shape="rect">[RFC 2045]</a>
suggests that Base64 data should have lines limited to at most 76
characters in length.&#160; This line-length limitation is not
required by <a href="#RFC3548" shape="rect">[RFC 3548]</a>
and is not mandated in the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> of
<a href="#base64Binary" shape="rect">base64Binary</a>
data.&#160; It
<span class="rfc2119">must not</span>
be enforced by XML Schema processors.</p><p>The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<a href="#base64Binary" shape="rect">base64Binary</a>
is the
set of literals which <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
<a href="#base64Binary" shape="rect">base64Binary</a>production.</p><div class="block">
<div class="defset">
<div class="defset-head">Lexical space of base64Binary</div>
<div class="prod">
<a name="nt-Base64Binary" id="nt-Base64Binary" shape="rect"></a><span class="lhs">[27]
    &#160;
    <i>Base64Binary</i></span>&#160;::= (<a href="#nt-B64quad" shape="rect"><i>B64quad</i></a>* <a href="#nt-B64final" shape="rect"><i>B64final</i></a>)?</div><div class="prod">
<a name="nt-B64quad" id="nt-B64quad" shape="rect"></a><span class="lhs">[28]
    &#160;
    <i>B64quad</i></span>&#160;::= (<a href="#nt-B64" shape="rect"><i>B64</i></a> <a href="#nt-B64" shape="rect"><i>B64</i></a> <a href="#nt-B64" shape="rect"><i>B64</i></a> 
<a href="#nt-B64" shape="rect"><i>B64</i></a>)

<div class="bnf_comment">/* <i class="com"><a href="#nt-B64quad" shape="rect"><i>B64quad</i></a> represents three octets of binary data.</i> */</div>
</div><div class="prod">
<a name="nt-B64final" id="nt-B64final" shape="rect"></a><span class="lhs">[29]
    &#160;
    <i>B64final</i></span>&#160;::= <a href="#nt-B64finalquad" shape="rect"><i>B64finalquad</i></a> | <a href="#nt-Padded16" shape="rect"><i>Padded16</i></a> | <a href="#nt-Padded8" shape="rect"><i>Padded8</i></a></div><div class="prod">
<a name="nt-B64finalquad" id="nt-B64finalquad" shape="rect"></a><span class="lhs">[30]
    &#160;
    <i>B64finalquad</i></span>&#160;::= (<a href="#nt-B64" shape="rect"><i>B64</i></a> <a href="#nt-B64" shape="rect"><i>B64</i></a> <a href="#nt-B64" shape="rect"><i>B64</i></a> 
<a href="#nt-B64char" shape="rect"><i>B64char</i></a>)
<div class="bnf_comment">/* <i class="com"><a href="#nt-B64finalquad" shape="rect"><i>B64finalquad</i></a> represents three octets
of binary data without trailing space.</i> */</div>
</div><div class="prod">
<a name="nt-Padded16" id="nt-Padded16" shape="rect"></a><span class="lhs">[31]
    &#160;
    <i>Padded16</i></span>&#160;::= <a href="#nt-B64" shape="rect"><i>B64</i></a> <a href="#nt-B64" shape="rect"><i>B64</i></a> <a href="#nt-B16" shape="rect"><i>B16</i></a> '<code>=</code>'
<div class="bnf_comment">/* <i class="com"><a href="#nt-Padded16" shape="rect"><i>Padded16</i></a> represents a two-octet
at the end of the data.</i> */</div>
</div><div class="prod">
<a name="nt-Padded8" id="nt-Padded8" shape="rect"></a><span class="lhs">[32]
    &#160;
    <i>Padded8</i></span>&#160;::= <a href="#nt-B64" shape="rect"><i>B64</i></a> <a href="#nt-B04" shape="rect"><i>B04</i></a> '<code>=</code>' #x20? '<code>=</code>'
<div class="bnf_comment">/* <i class="com"><a href="#nt-Padded8" shape="rect"><i>Padded8</i></a> represents a single octet at the end of the data.</i> */</div>
</div><div class="prod">
<a name="nt-B64" id="nt-B64" shape="rect"></a><span class="lhs">[33]
    &#160;
    <i>B64</i></span>&#160;::= <a href="#nt-B64char" shape="rect"><i>B64char</i></a> #x20?</div><div class="prod">
<a name="nt-B64char" id="nt-B64char" shape="rect"></a><span class="lhs">[34]
    &#160;
    <i>B64char</i></span>&#160;::= [A-Za-z0-9+/]</div><div class="prod">
<a name="nt-B16" id="nt-B16" shape="rect"></a><span class="lhs">[35]
    &#160;
    <i>B16</i></span>&#160;::= <a href="#nt-B16char" shape="rect"><i>B16char</i></a> #x20?</div><div class="prod">
<a name="nt-B16char" id="nt-B16char" shape="rect"></a><span class="lhs">[36]
    &#160;
    <i>B16char</i></span>&#160;::= [AEIMQUYcgkosw048]
<div class="bnf_comment">/* <i class="com">Base64 characters whose bit-string value ends in '00'</i> */</div></div><div class="prod">
<a name="nt-B04" id="nt-B04" shape="rect"></a><span class="lhs">[37]
    &#160;
    <i>B04</i></span>&#160;::= <a href="#nt-B04char" shape="rect"><i>B04char</i></a> #x20?</div><div class="prod">
<a name="nt-B04char" id="nt-B04char" shape="rect"></a><span class="lhs">[38]
    &#160;
    <i>B04char</i></span>&#160;::= [AQgw]
<div class="bnf_comment">/* <i class="com">Base64 characters whose bit-string value ends in
'0000'</i> */</div></div></div>

</div><div class="block">
The <a href="#nt-Base64Binary" shape="rect"><i>Base64Binary</i></a> production is equivalent 
to the following regular expression.
<blockquote class="shrink"><p>
<code>((([A-Za-z0-9+/] ?){4})*(([A-Za-z0-9+/] ?){3}[A-Za-z0-9+/]|([A-Za-z0-9+/] ?){2}[AEIMQUYcgkosw048] ?=|[A-Za-z0-9+/] ?[AQgw] ?= ?=))?</code>
</p></blockquote>
Note that each '<code>?</code>' except the last is preceded by a
single space character.</div><p>Note that this grammar requires the number of non-whitespace
characters in the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> to be a multiple of four, and
for equals signs to appear only at the end of the
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>;
literals
which do not meet these constraints
are not legal <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> of
<a href="#base64Binary" shape="rect">base64Binary</a>.</p><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> for
<a href="#base64Binary" shape="rect">base64Binary</a> is as given in 
<a href="#RFC2045" shape="rect">[RFC 2045]</a> and <a href="#RFC3548" shape="rect">[RFC 3548]</a>.</p><div class="note"><div class="p"><b>Note:</b> The above definition of the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> is more restrictive than
that given in <a href="#RFC2045" shape="rect">[RFC 2045]</a> as regards whitespace &#8212;
and less restrictive than <a href="#RFC3548" shape="rect">[RFC 3548]</a>.
This is
not an issue in practice.&#160; Any string compatible with
either
RFC can occur in an element or attribute
validated by this type, because the <a href="#dt-whiteSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>whiteSpace<span class="arrow">&#183;</span></a>
facet of this type is fixed to <b><i>collapse</i></b>, which means that all
leading and trailing whitespace will be stripped, and all internal
whitespace collapsed to single space characters, <em>before</em>
the above grammar is enforced. The
possibility of ignoring whitespace in Base64 data is foreseen in
clause 2.3 of <a href="#RFC3548" shape="rect">[RFC 3548]</a>, but for the reasons given there
this specification does not allow implementations to ignore
non-whitespace characters which are not in the Base64
Alphabet.</div></div><p>The canonical <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> 
of a
<a href="#base64Binary" shape="rect">base64Binary</a>
data value is the Base64 encoding of the value which matches the
Canonical-base64Binary production in the following grammar:
</p><div class="block">
<div class="defset">
<div class="defset-head">Canonical representation of base64Binary</div>
<div class="prod">
<a name="nt-Canonical-base64Binary" id="nt-Canonical-base64Binary" shape="rect"></a><span class="lhs">[39]
    &#160;
    <i>Canonical-base64Binary</i></span>&#160;::= <a href="#nt-CanonicalQuad" shape="rect"><i>CanonicalQuad</i></a>* <a href="#nt-CanonicalPadded" shape="rect"><i>CanonicalPadded</i></a>?</div><div class="prod">
<a name="nt-CanonicalQuad" id="nt-CanonicalQuad" shape="rect"></a><span class="lhs">[40]
    &#160;
    <i>CanonicalQuad</i></span>&#160;::= <a href="#nt-B64char" shape="rect"><i>B64char</i></a> <a href="#nt-B64char" shape="rect"><i>B64char</i></a> <a href="#nt-B64char" shape="rect"><i>B64char</i></a> <a href="#nt-B64char" shape="rect"><i>B64char</i></a></div><div class="prod">
<a name="nt-CanonicalPadded" id="nt-CanonicalPadded" shape="rect"></a><span class="lhs">[41]
    &#160;
    <i>CanonicalPadded</i></span>&#160;::= <a href="#nt-B64char" shape="rect"><i>B64char</i></a> <a href="#nt-B64char" shape="rect"><i>B64char</i></a> <a href="#nt-B16char" shape="rect"><i>B16char</i></a> '<code>=</code>'
| <a href="#nt-B64char" shape="rect"><i>B64char</i></a> <a href="#nt-B04char" shape="rect"><i>B04char</i></a> '<code>==</code>'</div></div>
</div><p>That is, the <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>
of a <a href="#base64Binary" shape="rect">base64Binary</a> value is the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>
which maps to that value and contains no whitespace. The
<a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> for <a href="#base64Binary" shape="rect">base64Binary</a> is
thus the encoding algorithm for Base64 data given in <a href="#RFC2045" shape="rect">[RFC 2045]</a>
and <a href="#RFC3548" shape="rect">[RFC 3548]</a>, with the proviso that no
characters except those in the Base64 Alphabet are to be written
out.</p><div class="note"><div class="p"><b>Note:</b> For some values the <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> defined above does
not conform to <a href="#RFC2045" shape="rect">[RFC 2045]</a>, which requires breaking with
linefeeds at appropriate intervals. It
does conform with <a href="#RFC3548" shape="rect">[RFC 3548]</a>.</div></div><p>The length of a
<a href="#base64Binary" shape="rect">base64Binary</a>
value may be calculated from the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> by
removing whitespace and padding characters and performing the
calculation shown in the pseudo-code below:</p><p>
<code>
lex2&#160;&#160;&#160;:=&#160;killwhitespace(lexform)&#160;
&#160;&#160;--&#160;remove&#160;whitespace&#160;characters<br clear="none" />
lex3&#160;&#160;&#160;:=&#160;strip_equals(lex2)&#160;&#160;&#160;&#160;&#160;&#160;
&#160;&#160;--&#160;strip&#160;padding&#160;characters&#160;at&#160;end<br clear="none" />
length&#160;:=&#160;floor&#160;(length(lex3)&#160;*&#160;3&#160;/&#160;4)&#160;&#160;&#160;&#160;&#160;&#160;
&#160;&#160;--&#160;calculate&#160;length
</code>
</p><p>
Note on encoding:&#160; <a href="#RFC2045" shape="rect">[RFC 2045]</a> and
<a href="#RFC3548" shape="rect">[RFC 3548]</a> explicitly 
reference US-ASCII encoding.&#160; However,
decoding of <b>base64Binary</b> data in an XML entity is to be performed on the
Unicode characters obtained after character encoding processing as specified by
<a href="#XML" shape="rect">[XML]</a>.
</p></div><div class="div4">
<h5><a name="base64Binary-facets" id="base64Binary-facets" shape="rect"></a>3.3.16.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#base64Binary" shape="rect">base64Binary</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="base64Binary.whiteSpace" shape="rect" id="base64Binary.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#base64Binary" shape="rect">base64Binary</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#base64Binary" shape="rect">base64Binary</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="anyURI" id="anyURI" shape="rect"></a>3.3.17 anyURI</h4><p><span class="termdef"><a name="dt-anyURI" id="dt-anyURI" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>anyURI</b> represents an
Internationalized Resource Identifier Reference
(IRI).&#160; An <b>anyURI</b> value can be absolute or relative, and may
have an optional fragment identifier (i.e., it may be 
an
IRI Reference).&#160; This type should be used 
when 
the value fulfills the role of 
an IRI,
as defined in <a href="#RFC3987" shape="rect">[RFC 3987]</a> or its successor(s) in the IETF
Standards Track.</span></p><div class="note"><div class="p"><b>Note:</b> IRIs may be used to locate resources
or simply to identify them. In the case where they are used to locate
resources using a URI, applications should use
the mapping from
<a href="#anyURI" shape="rect">anyURI</a>
values to URIs given 
by the  
reference escaping procedure defined in
<a href="#LEIRIs" shape="rect">[LEIRI]</a> and in
Section 
3.1 <a href="http://www.ietf.org/rfc/rfc3987.txt" shape="rect">Mapping
of IRIs to URIs</a> of <a href="#RFC3987" shape="rect">[RFC 3987]</a>
or its successor(s) in the IETF Standards Track.&#160;
This means that a wide range of internationalized resource identifiers
can be specified when an
<a href="#anyURI" shape="rect">anyURI</a>
is called for, and still be understood as URIs per 
<a href="#RFC3986" shape="rect">[RFC 3986]</a>
and its successor(s).</div></div><div class="div4">
<h5><a name="anyURI-vs" id="anyURI-vs" shape="rect"></a>3.3.17.1 Value Space</h5><p>The value space of <a href="#anyURI" shape="rect">anyURI</a> is the set of finite-length
sequences of zero or more 
<a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">character</a>s (as defined in
<a href="#XML" shape="rect">[XML]</a>) that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
<a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a> production from <a href="#XML" shape="rect">[XML]</a>.</p></div><div class="div4">
<h5><a name="anyURI-lexical-representation" id="anyURI-lexical-representation" shape="rect"></a>3.3.17.2 Lexical
Mapping</h5><p>The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<a href="#anyURI" shape="rect">anyURI</a>
is the set of finite-length
sequences of zero or more 
<a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">character</a>s (as defined in
<a href="#XML" shape="rect">[XML]</a>) that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
<a href="http://www.w3.org/TR/xml11/#NT-Char" shape="rect">Char</a> production from <a href="#XML" shape="rect">[XML]</a>.</p><div class="note"><div class="p"><b>Note:</b> For an <a href="#anyURI" shape="rect">anyURI</a> value to be 
usable in practice as an IRI, the result of applying to it 
the algorithm defined in Section 3.1 of <a href="#RFC3987" shape="rect">[RFC 3987]</a>
should 
be a string which is a legal URI according
to <a href="#RFC3986" shape="rect">[RFC 3986]</a>. (This is true at the time this document is published;
if in the future 
<a href="#RFC3987" shape="rect">[RFC 3987]</a> and <a href="#RFC3986" shape="rect">[RFC 3986]</a> are replaced by other specifications
in the IETF Standards Track, the relevant constraints will be those
imposed by those successor specifications.)</div><div class="p">Each URI scheme imposes specialized syntax rules
for URIs in that scheme, including restrictions on the syntax of
allowed fragment identifiers. Because it is impractical for processors
to check that a value is a context-appropriate URI reference, 
neither the syntactic constraints defined by the definitions of individual
schemes nor the generic syntactic constraints defined by
<a href="#RFC3987" shape="rect">[RFC 3987]</a> and <a href="#RFC3986" shape="rect">[RFC 3986]</a> and their
successors are part of this datatype as defined here.
Applications which depend on <a href="#anyURI" shape="rect">anyURI</a> values
being legal according to the rules of 

the relevant specifications 
should make arrangements to check values against the appropriate 
definitions of IRI, URI, and specific schemes.</div></div><div class="note"><div class="p"><b>Note:</b> Spaces are, in principle, allowed in the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<a href="#anyURI" shape="rect">anyURI</a>,
however, their use is highly discouraged
(unless they are encoded by '<code>%20</code>').</div></div><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> for <a href="#anyURI" shape="rect">anyURI</a> is
the identity mapping.</p><div class="note"><div class="p"><b>Note:</b> The definitions of URI in the current
IETF specifications define certain URIs as equivalent to each other.
Those equivalences are not part of this datatype as defined here:
if two "equivalent" URIs or IRIs are different character
sequences, they map to different values in this datatype.</div></div></div><div class="div4">
<h5><a name="anyURI-facets" id="anyURI-facets" shape="rect"></a>3.3.17.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#anyURI" shape="rect">anyURI</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="anyURI.whiteSpace" shape="rect" id="anyURI.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#anyURI" shape="rect">anyURI</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#anyURI" shape="rect">anyURI</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="QName" id="QName" shape="rect"></a>3.3.18 QName</h4><p><span class="termdef"><a name="dt-QName" id="dt-QName" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>QName</b> represents
<a href="http://www.w3.org/TR/xml-names11/#dt-qualname" shape="rect">XML qualified
names</a>.
The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <b>QName</b> is the set of
tuples {<a href="http://www.w3.org/TR/xml-names11/#dt-NSName" shape="rect">namespace name</a>,
<a href="http://www.w3.org/TR/xml-names11/#dt-localname" shape="rect">local part</a>},
where <a href="http://www.w3.org/TR/xml-names11/#dt-NSName" shape="rect">namespace name</a>
is an <a href="#anyURI" shape="rect">anyURI</a>
and <a href="http://www.w3.org/TR/xml-names11/#dt-localname" shape="rect">local part</a> is
an <a href="#NCName" shape="rect">NCName</a>.
The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>QName</b> is the set
of strings that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the <a href="http://www.w3.org/TR/xml-names11/#NT-QName" shape="rect">
QName</a> production of <a href="#XMLNS" shape="rect">[Namespaces in XML]</a>.</span></p><p>It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports the
<a href="http://www.w3.org/TR/xml-names11/#NT-QName" shape="rect">QName</a> production from 
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>, or that from 
<a href="#XMLNS1.0" shape="rect">[Namespaces in XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.
</p><p>
The mapping from lexical space to value space for a particular
<a href="#QName" shape="rect">QName</a>
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> depends on the namespace bindings in scope where the literal occurs.
</p><p>When 
<a href="#QName" shape="rect">QName</a>s
appear in an XML context, the bindings to be used in
the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> are those in the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[in-scope namespaces]</a> property of the
relevant element.



When this datatype is used in a non-XML host language, 
the host language <span class="rfc2119">must</span> specify what namespace bindings
are to be used.</p><p>
The host language, whether XML-based or otherwise, <span class="rfc2119">may</span> specify whether
unqualified names are bound to the default namespace (if any)
or not; the host language may also place this under user control.

If the host language does not specify otherwise,
unqualified names are bound to the default namespace.
</p><div class="note"><div class="p"><b>Note:</b> The default treatment of
unqualified names parallels that specified in
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a> for element names (as opposed to that specified
for attribute names).
</div></div><div class="note"><div class="p"><b>Note:</b> 
The mapping between <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> in the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> and
values in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<a href="#QName" shape="rect">QName</a>
depends on the set of
namespace declarations
in scope for the context 
in which
<a href="#QName" shape="rect">QName</a> 
is used.&#160;
</div><div class="p">Because the lexical representations available for
any value of type <a href="#QName" shape="rect">QName</a> vary with context, no 
<a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> is defined for
<a href="#QName" shape="rect">QName</a>
in this specification.</div></div><div class="div4">
<h5><a name="QName-facets" id="QName-facets" shape="rect"></a>3.3.18.1 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#QName" shape="rect">QName</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="QName.whiteSpace" shape="rect" id="QName.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#QName" shape="rect">QName</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#QName" shape="rect">QName</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="NOTATION" id="NOTATION" shape="rect"></a>3.3.19 NOTATION</h4><p><span class="termdef"><a name="dt-NOTATION" id="dt-NOTATION" title="" shape="rect">[Definition:]&#160;&#160;</a><b>NOTATION</b>
represents the <a href="http://www.w3.org/TR/xml11/#NT-NotationType" class="nt" shape="rect">NOTATION</a>
attribute
type from <a href="#XML" shape="rect">[XML]</a>.
The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of <b>NOTATION</b> is the set of <a href="#QName" shape="rect">QName</a>s
of notations declared in the current schema.
The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>NOTATION</b> is the set
of all names of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-notation" shape="rect">notations</a>
declared in the current schema (in the form of
<a href="#QName" shape="rect">QName</a>s).</span></p><div class="note"><div class="p"><b>Note:</b> Because its <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> depends on the notion of a 
"current schema", as instantiated for example 
by <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>, the <a href="#NOTATION" shape="rect">NOTATION</a> datatype is 
unsuitable for use in other contexts which lack the notion of a
current schema.
</div></div><p>
The lexical mapping rules for <a href="#NOTATION" shape="rect">NOTATION</a> are as given for
<a href="#QName" shape="rect">QName</a> in 
<a href="#QName" shape="rect">QName (&#167;3.3.18)</a>.
</p><div class="constraintnote"><a id="enumeration-required-notation" name="enumeration-required-notation" shape="rect"></a><b>Schema Component Constraint: enumeration facet value required for NOTATION</b><br clear="none" /><div class="constraint"><div class="p">It is  (with one exception) an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> for 
<a href="#NOTATION" shape="rect">NOTATION</a> to be used
directly to validate a literal as described in 
<a href="#cvc-datatype-valid" shape="rect">Datatype Valid (&#167;4.1.4)</a>:
only datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#NOTATION" shape="rect">NOTATION</a> by specifying
a value for <a href="#dt-enumeration" class="termref" shape="rect"><span class="arrow">&#183;</span>enumeration<span class="arrow">&#183;</span></a> can be used to validate literals.</div><div class="p">
The exception is that in the <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> of a new type the
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> used to enumerate the allowed values <span class="rfc2119">may</span> be (and in
the context of [XSD 1.1 Part 1: Structures] will be)
validated directly against <a href="#NOTATION" shape="rect">NOTATION</a>; this amounts to
verifying that the value is a <a href="#QName" shape="rect">QName</a> and that the 
<a href="#QName" shape="rect">QName</a> is the
name of a <b>NOTATION</b> declared in the current schema.
</div></div></div><p>For compatibility (see <a href="#terminology" shape="rect">Terminology (&#167;1.6)</a>)
<a href="#NOTATION" shape="rect">NOTATION</a>

should be used only on attributes
and should only be used in schemas with no
target namespace.</p><div class="block">
<div class="note"><div class="p"><b>Note:</b> Because the lexical representations available for any given value
of <a href="#NOTATION" shape="rect">NOTATION</a> vary with context, this specification defines
no <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for <a href="#NOTATION" shape="rect">NOTATION</a> values.</div></div>
</div><div class="div4">
<h5><a name="NOTATION-facets" id="NOTATION-facets" shape="rect"></a>3.3.19.1 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#NOTATION" shape="rect">NOTATION</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" name="NOTATION.whiteSpace" shape="rect" id="NOTATION.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#NOTATION" shape="rect">NOTATION</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#NOTATION" shape="rect">NOTATION</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div><p>

The use of <a href="#dt-length" class="termref" shape="rect"><span class="arrow">&#183;</span>length<span class="arrow">&#183;</span></a>, <a href="#dt-minLength" class="termref" shape="rect"><span class="arrow">&#183;</span>minLength<span class="arrow">&#183;</span></a> and <a href="#dt-maxLength" class="termref" shape="rect"><span class="arrow">&#183;</span>maxLength<span class="arrow">&#183;</span></a>
on <a href="#NOTATION" shape="rect">NOTATION</a> or
datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#NOTATION" shape="rect">NOTATION</a> is
deprecated.&#160; Future versions of this specification may
remove these facets for this datatype.

</p></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#built-in-primitive-datatypes" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="ordinary-built-ins" id="ordinary-built-ins" shape="rect"></a>3.4 Other Built-in Datatypes</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.1 <a href="#normalizedString" shape="rect">normalizedString</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.1.1 <a href="#normalizedString-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.1.2 <a href="#normalizedString-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2 <a href="#token" shape="rect">token</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.1 <a href="#token-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.2.2 <a href="#token-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.3 <a href="#language" shape="rect">language</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.3.1 <a href="#language-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4 <a href="#NMTOKEN" shape="rect">NMTOKEN</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4.1 <a href="#NMTOKEN-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.4.2 <a href="#NMTOKEN-derived-types" shape="rect">Related datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.5 <a href="#NMTOKENS" shape="rect">NMTOKENS</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.5.1 <a href="#NMTOKENS-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6 <a href="#Name" shape="rect">Name</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.1 <a href="#Name-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.6.2 <a href="#Name-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.7 <a href="#NCName" shape="rect">NCName</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.7.1 <a href="#NCName-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.7.2 <a href="#NCName-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.8 <a href="#ID" shape="rect">ID</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.8.1 <a href="#ID-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.9 <a href="#IDREF" shape="rect">IDREF</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.9.1 <a href="#IDREF-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.9.2 <a href="#IDREF-derived-types" shape="rect">Related datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.10 <a href="#IDREFS" shape="rect">IDREFS</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.10.1 <a href="#IDREFS-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.11 <a href="#ENTITY" shape="rect">ENTITY</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.11.1 <a href="#ENTITY-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.11.2 <a href="#ENTITY-derived-types" shape="rect">Related datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.12 <a href="#ENTITIES" shape="rect">ENTITIES</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.12.1 <a href="#ENTITIES-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.13 <a href="#integer" shape="rect">integer</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.13.1 <a href="#integer-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.13.2 <a href="#integer-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.13.3 <a href="#integer-facets" shape="rect">Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.13.4 <a href="#integer-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.14 <a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.14.1 <a href="#nonPositiveInteger-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.14.2 <a href="#nonPositiveInteger-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.14.3 <a href="#nonPositiveInteger-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.14.4 <a href="#nonPositiveInteger-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.15 <a href="#negativeInteger" shape="rect">negativeInteger</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.15.1 <a href="#negativeInteger-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.15.2 <a href="#negativeInteger-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.15.3 <a href="#negativeInteger-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.16 <a href="#long" shape="rect">long</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.16.1 <a href="#long-lexical-representation" shape="rect">Lexical Representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.16.2 <a href="#long-canonical-repr" shape="rect">Canonical Representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.16.3 <a href="#long-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.16.4 <a href="#long-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.17 <a href="#int" shape="rect">int</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.17.1 <a href="#int-lexical-representation" shape="rect">Lexical Representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.17.2 <a href="#int-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.17.3 <a href="#int-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.17.4 <a href="#int-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.18 <a href="#short" shape="rect">short</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.18.1 <a href="#short-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.18.2 <a href="#short-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.18.3 <a href="#short-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.18.4 <a href="#short-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.19 <a href="#byte" shape="rect">byte</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.19.1 <a href="#byte-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.19.2 <a href="#byte-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.19.3 <a href="#byte-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.20 <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.20.1 <a href="#nonNegativeInteger-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.20.2 <a href="#nonNegativeInteger-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.20.3 <a href="#nonNegativeInteger-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.20.4 <a href="#nonNegativeInteger-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.21 <a href="#unsignedLong" shape="rect">unsignedLong</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.21.1 <a href="#unsignedLong-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.21.2 <a href="#unsignedLong-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.21.3 <a href="#unsignedLong-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.21.4 <a href="#unsignedLong-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.22 <a href="#unsignedInt" shape="rect">unsignedInt</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.22.1 <a href="#unsignedInt-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.22.2 <a href="#unsignedInt-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.22.3 <a href="#unsignedInt-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.22.4 <a href="#unsignedInt-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.23 <a href="#unsignedShort" shape="rect">unsignedShort</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.23.1 <a href="#unsignedShort-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.23.2 <a href="#unsignedShort-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.23.3 <a href="#unsignedShort-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.23.4 <a href="#unsignedShort-derived-types" shape="rect">Derived datatypes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.24 <a href="#unsignedByte" shape="rect">unsignedByte</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.24.1 <a href="#unsignedByte-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.24.2 <a href="#unsignedByte-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.24.3 <a href="#unisngedByte-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.25 <a href="#positiveInteger" shape="rect">positiveInteger</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.25.1 <a href="#positiveInteger-lexical-representation" shape="rect">Lexical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.25.2 <a href="#positiveInteger-canonical-repr" shape="rect">Canonical representation</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.25.3 <a href="#positiveInteger-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.26 <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.26.1 <a href="#yearMonthDuration-lexical-mapping" shape="rect">The  Lexical Mapping</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.26.2 <a href="#YearMonthDuration-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.27 <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.27.1 <a href="#dayTimeDuration-lexical-mapping" shape="rect">The  Lexical Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.27.2 <a href="#dayTimeDuration-facets" shape="rect">
Facets</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.28 <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.28.1 <a href="#dateTimeStamp-lexical-mapping" shape="rect">The  Lexical Space</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3.4.28.2 <a href="#dateTimeStamp-facets" shape="rect">
Facets</a><br clear="none" />
</div><p>
This section gives conceptual definitions for all
<a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>
datatypes defined by this specification. The XML representation used to define
 
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>
datatypes (whether
<a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> or <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>) is
given in <a href="#xr-defn" shape="rect">XML Representation of Simple Type Definition Schema Components (&#167;4.1.2)</a> 
and the complete
definitions of the <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>
datatypes are provided in the appendix <a href="#schema" shape="rect">Schema for Schema Documents (Datatypes)
 (normative) (&#167;A)</a>.

</p><div class="div3">
<h4><a name="normalizedString" id="normalizedString" shape="rect"></a>3.4.1 normalizedString</h4><p>
<span class="termdef"><a name="dt-normalizedString" id="dt-normalizedString" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>normalizedString</b>
represents white space normalized strings.&#160;
The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <b>normalizedString</b> is the
set of strings that do not
contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters.&#160;
The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>normalizedString</b> is the
set of strings that do not
contain the carriage return (#xD),
line feed (#xA)
nor tab (#x9) characters.&#160;
The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>normalizedString</b> is <a href="#string" shape="rect">string</a>.
</span>
</p><div class="div4">
<h5><a name="normalizedString-facets" id="normalizedString-facets" shape="rect"></a>3.4.1.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#normalizedString" shape="rect">normalizedString</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-whiteSpace" name="normalizedString.whiteSpace" shape="rect" id="normalizedString.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>replace</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#normalizedString" shape="rect">normalizedString</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#normalizedString" shape="rect">normalizedString</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="normalizedString-derived-types" id="normalizedString-derived-types" shape="rect"></a>3.4.1.2 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#normalizedString" shape="rect">normalizedString</a></p><ul><li><a href="#token" shape="rect">token</a></li></ul></div></div><div class="div3">
<h4><a name="token" id="token" shape="rect"></a>3.4.2 token</h4><p>
<span class="termdef"><a name="dt-token" id="dt-token" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>token</b>
represents tokenized strings.
The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <b>token</b> is the
set of strings that do not
contain the
carriage return (#xD),
line feed (#xA) nor tab (#x9) characters, that have no
leading or trailing spaces (#x20) and that have no internal sequences
of two or more spaces.
The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>token</b> is the
set of strings that do not contain the
carriage return (#xD),
line feed (#xA) nor tab (#x9) characters, that have no
leading or trailing spaces (#x20) and that have no internal sequences
of two or more spaces.
The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>token</b> is <a href="#normalizedString" shape="rect">normalizedString</a>.
</span>
</p><div class="div4">
<h5><a name="token-facets" id="token-facets" shape="rect"></a>3.4.2.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#token" shape="rect">token</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-whiteSpace" name="token.whiteSpace" shape="rect" id="token.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#token" shape="rect">token</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#token" shape="rect">token</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="token-derived-types" id="token-derived-types" shape="rect"></a>3.4.2.2 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatypes are 
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#token" shape="rect">token</a></p><ul><li><a href="#language" shape="rect">language</a></li><li><a href="#NMTOKEN" shape="rect">NMTOKEN</a></li><li><a href="#Name" shape="rect">Name</a></li></ul></div></div><div class="div3">
<h4><a name="language" id="language" shape="rect"></a>3.4.3 language</h4><div class="block"><span class="termdef"><a name="dt-language" id="dt-language" title="" shape="rect">[Definition:]&#160;&#160;</a><b>language</b>
represents formal 
natural language identifiers, 
as defined 
by <a href="#BCP47" shape="rect">[BCP 47]</a> 
(currently represented by 
<a href="#RFC4646" shape="rect">[RFC 4646]</a> and 
<a href="#RFC4647" shape="rect">[RFC 4647]</a>)
or its successor(s).
</span>
The 
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<a href="#language" shape="rect">language</a>
are 
the set of all strings that conform to the pattern 
<blockquote><blockquote><p><code>[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*</code></p></blockquote></blockquote>
This is the set of strings
accepted by the grammar given in
<a href="#RFC3066" shape="rect">[RFC 3066]</a>,
which is now obsolete; the current specification of language
codes is more restrictive.&#160; The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of
<a href="#language" shape="rect">language</a>
is <a href="#token" shape="rect">token</a>.
</div><div class="note"><div class="p"><b>Note:</b> The regular expression above provides the only normative
  constraint on the lexical and value spaces of this type.  The
  additional constraints imposed on language identifiers by 
  <a href="#BCP47" shape="rect">[BCP 47]</a>
  and its successor(s), and in particular their requirement that language
  codes be registered with IANA or ISO if not given in ISO 639, are 
  not part of this datatype as defined here.</div></div><div class="note"><div class="p"><b>Note:</b> <a href="#BCP47" shape="rect">[BCP 47]</a> specifies 
that language codes "are to be treated as case insensitive; there
exist conventions for capitalization of some of 
the
subtags, but these MUST NOT be taken 
to carry meaning."
Since the <a href="#language" shape="rect">language</a> datatype is
derived from <a href="#string" shape="rect">string</a>, it inherits from 
<a href="#string" shape="rect">string</a> a one-to-one mapping from lexical
representations to values. The literals '<code>MN</code>' and
'<code>mn</code>' (for 
Mongolian)
therefore correspond to distinct values and
have distinct canonical forms.  Users of this specification should be
aware of this fact, the consequence of which is that the
case-insensitive treatment of language values prescribed by 
<a href="#BCP47" shape="rect">[BCP 47]</a> 
does not follow from the definition of
this datatype given here; applications which require
case-insensitivity 
should make appropriate adjustments.</div></div><div class="note"><a name="xml.lang.and.language" id="xml.lang.and.language" shape="rect"></a><div class="p"><b>Note:</b> The empty string is not a member of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of <a href="#language" shape="rect">language</a>.  Some constructs which normally
take language codes as their values, however, also allow the
empty string. The attribute <code>xml:lang</code> defined by 
<a href="#XML" shape="rect">[XML]</a> is one example; there, the empty string
overrides a value which would otherwise be inherited, but
without specifying a new value.</div><div class="p">One way to define the desired set of possible values is
illustrated by the schema document for the XML namespace
at <a href="http://www.w3.org/2001/xml.xsd" shape="rect">http://www.w3.org/2001/xml.xsd</a>, which defines the
attribute <code>xml:lang</code> as having a type which is a union
of <a href="#language" shape="rect">language</a> and an anonymous type whose
only value is the empty string:<pre xml:space="preserve">
 &lt;xs:attribute name="lang"&gt;
   &lt;xs:annotation&gt;
     &lt;xs:documentation&gt;
       See RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt 
       and the IANA registry at 
       http://www.iana.org/assignments/lang-tag-apps.htm for
       further information.

       The union allows for the 'un-declaration' of xml:lang with
       the empty string.
     &lt;/xs:documentation&gt;
   &lt;/xs:annotation&gt;
   &lt;xs:simpleType&gt;
     &lt;xs:union memberTypes="xs:language"&gt;
       &lt;xs:simpleType&gt;    
         &lt;xs:restriction base="xs:string"&gt;
           &lt;xs:enumeration value=""/&gt;
         &lt;/xs:restriction&gt;
       &lt;/xs:simpleType&gt;
     &lt;/xs:union&gt;
   &lt;/xs:simpleType&gt;
 &lt;/xs:attribute&gt;
</pre></div></div><div class="div4">
<h5><a name="language-facets" id="language-facets" shape="rect"></a>3.4.3.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#language" shape="rect">language</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" name="language.pattern" shape="rect" id="language.pattern">pattern</a><span class="normal"><span class="normal"> = <b><i>[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*</i></b></span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#language" shape="rect">language</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#language" shape="rect">language</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="NMTOKEN" id="NMTOKEN" shape="rect"></a>3.4.4 NMTOKEN</h4><p><span class="termdef"><a name="dt-NMTOKEN" id="dt-NMTOKEN" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>NMTOKEN</b> represents
the <a href="http://www.w3.org/TR/xml11/#NT-TokenizedType" shape="rect">NMTOKEN attribute type</a>
from <a href="#XML" shape="rect">[XML]</a>. The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<b>NMTOKEN</b> is the set of tokens that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a>
the <a href="http://www.w3.org/TR/xml11/#NT-Nmtoken" shape="rect">Nmtoken</a> production in
<a href="#XML" shape="rect">[XML]</a>. The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<b>NMTOKEN</b> is the set of strings that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a>
the <a href="http://www.w3.org/TR/xml11/#NT-Nmtoken" shape="rect">Nmtoken</a> production in
<a href="#XML" shape="rect">[XML]</a>.&#160; The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of
<b>NMTOKEN</b> is <a href="#token" shape="rect">token</a>.
</span></p><p>It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports the
<a href="http://www.w3.org/TR/xml11/#NT-Nmtoken" shape="rect">NMTOKEN</a> production from 
<a href="#XML" shape="rect">[XML]</a>, or that from 
<a href="#XML1.0" shape="rect">[XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.</p><p>For compatibility (see <a href="#terminology" shape="rect">Terminology (&#167;1.6)</a>
<a href="#NMTOKEN" shape="rect">NMTOKEN</a>
should be used only on attributes.</p><div class="div4">
<h5><a name="NMTOKEN-facets" id="NMTOKEN-facets" shape="rect"></a>3.4.4.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#NMTOKEN" shape="rect">NMTOKEN</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" name="NMTOKEN.pattern" shape="rect" id="NMTOKEN.pattern">pattern</a><span class="normal"><span class="normal"> = <b><i>\c+</i></b></span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#NMTOKEN" shape="rect">NMTOKEN</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#NMTOKEN" shape="rect">NMTOKEN</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="NMTOKEN-derived-types" id="NMTOKEN-derived-types" shape="rect"></a>3.4.4.2 Related datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>
   from
<a href="#NMTOKEN" shape="rect">NMTOKEN</a></p><ul><li><a href="#NMTOKENS" shape="rect">NMTOKENS</a></li></ul></div></div><div class="div3">
<h4><a name="NMTOKENS" id="NMTOKENS" shape="rect"></a>3.4.5 NMTOKENS</h4><p><span class="termdef"><a name="dt-NMTOKENS" id="dt-NMTOKENS" title="" shape="rect">[Definition:]&#160;&#160;</a><b>NMTOKENS</b>
represents the <a href="http://www.w3.org/TR/xml11/#NT-TokenizedType" shape="rect">NMTOKENS attribute
type</a> from <a href="#XML" shape="rect">[XML]</a>. The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of <b>NMTOKENS</b> is the set of finite, non-zero-length sequences of
<a href="#dt-NMTOKEN" class="termref" shape="rect"><span class="arrow">&#183;</span>NMTOKEN<span class="arrow">&#183;</span></a>s.&#160; The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>
of <b>NMTOKENS</b> is the set of space-separated lists of tokens,
of which each token is in the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<a href="#NMTOKEN" shape="rect">NMTOKEN</a>.&#160; The <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> of
<b>NMTOKENS</b> is <a href="#NMTOKEN" shape="rect">NMTOKEN</a>.
<a href="#NMTOKENS" shape="rect">NMTOKENS</a> is derived
from <a href="#dt-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>anySimpleType</code><span class="arrow">&#183;</span></a> in two steps:  an anonymous list type
is defined, whose <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> is <a href="#NMTOKEN" shape="rect">NMTOKEN</a>; this is
the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <a href="#NMTOKENS" shape="rect">NMTOKENS</a>, which restricts
its value space to lists with at least one item.
</span></p><p>
For compatibility (see <a href="#terminology" shape="rect">Terminology (&#167;1.6)</a>)
<a href="#NMTOKENS" shape="rect">NMTOKENS</a>
should be used only on attributes.
</p><div class="div4">
<h5><a name="NMTOKENS-facets" id="NMTOKENS-facets" shape="rect"></a>3.4.5.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#NMTOKENS" shape="rect">NMTOKENS</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-minLength" name="NMTOKENS.minLength" shape="rect" id="NMTOKENS.minLength">minLength</a><span class="normal"><span class="normal"> = <b><i>1</i></b></span></span></li><li><a href="#rf-whiteSpace" name="NMTOKENS.whiteSpace" shape="rect" id="NMTOKENS.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#NMTOKENS" shape="rect">NMTOKENS</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#NMTOKENS" shape="rect">NMTOKENS</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="Name" id="Name" shape="rect"></a>3.4.6 Name</h4><p>
<span class="termdef"><a name="dt-Name" id="dt-Name" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>Name</b>
represents <a href="http://www.w3.org/TR/xml11/#dt-name" shape="rect">XML Names</a>.
The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <b>Name</b> is
the set of all strings which <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
<a href="http://www.w3.org/TR/xml11/#NT-Name" shape="rect">Name</a> production of
<a href="#XML" shape="rect">[XML]</a>.&#160; The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<b>Name</b> is the set of all strings which <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a>
the <a href="http://www.w3.org/TR/xml11/#NT-Name" shape="rect">Name</a> production of
<a href="#XML" shape="rect">[XML]</a>. The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>Name</b>
is <a href="#token" shape="rect">token</a>.
</span>
</p><p>It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports the <a href="http://www.w3.org/TR/xml11/#NT-Name" shape="rect">Name</a> production from 
<a href="#XML" shape="rect">[XML]</a>, or that from 
<a href="#XML1.0" shape="rect">[XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.
</p><div class="div4">
<h5><a name="Name-facets" id="Name-facets" shape="rect"></a>3.4.6.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#Name" shape="rect">Name</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" name="Name.pattern" shape="rect" id="Name.pattern">pattern</a><span class="normal"><span class="normal"> = <b><i>\i\c*</i></b></span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#Name" shape="rect">Name</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#Name" shape="rect">Name</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="Name-derived-types" id="Name-derived-types" shape="rect"></a>3.4.6.2 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#Name" shape="rect">Name</a></p><ul><li><a href="#NCName" shape="rect">NCName</a></li></ul></div></div><div class="div3">
<h4><a name="NCName" id="NCName" shape="rect"></a>3.4.7 NCName</h4><p>
<span class="termdef"><a name="dt-NCName" id="dt-NCName" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>NCName</b> represents XML
"non-colonized" Names.&#160; The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<b>NCName</b> is the set of all strings which <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a>
the <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production of
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>.&#160; The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of
<b>NCName</b> is the set of all strings which <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a>
the <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production of
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>.&#160; The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of
<b>NCName</b> is <a href="#Name" shape="rect">Name</a>.
</span>
</p><p>It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports the <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production from 
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>, or that from 
<a href="#XMLNS1.0" shape="rect">[Namespaces in XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.
</p><div class="div4">
<h5><a name="NCName-facets" id="NCName-facets" shape="rect"></a>3.4.7.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#NCName" shape="rect">NCName</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" name="NCName.pattern" shape="rect" id="NCName.pattern">pattern</a><span class="normal"><span class="normal"> = <b><i>\i\c* &#8745; [\i-[:]][\c-[:]]*</i></b></span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#NCName" shape="rect">NCName</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#NCName" shape="rect">NCName</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="NCName-derived-types" id="NCName-derived-types" shape="rect"></a>3.4.7.2 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatypes are 
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#NCName" shape="rect">NCName</a></p><ul><li><a href="#ID" shape="rect">ID</a></li><li><a href="#IDREF" shape="rect">IDREF</a></li><li><a href="#ENTITY" shape="rect">ENTITY</a></li></ul></div></div><div class="div3">
<h4><a name="ID" id="ID" shape="rect"></a>3.4.8 ID</h4><p><span class="termdef"><a name="dt-ID" id="dt-ID" title="" shape="rect">[Definition:]&#160;&#160;</a><b>ID</b>
represents the
<a href="http://www.w3.org/TR/xml11/#NT-TokenizedType" shape="rect">ID attribute type</a> from
<a href="#XML" shape="rect">[XML]</a>.&#160; The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<b>ID</b> is the set of all strings that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a>
the <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production in
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>.&#160; The
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>ID</b> is the set of all
strings that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
<a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production in
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>.
The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>ID</b> is <a href="#NCName" shape="rect">NCName</a>.
</span></p><div class="note"><div class="p"><b>Note:</b> It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports 
the <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production from 
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>, or that from 
<a href="#XMLNS1.0" shape="rect">[Namespaces in XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.</div></div><p>For compatibility (see <a href="#terminology" shape="rect">Terminology (&#167;1.6)</a>),
<a href="#ID" shape="rect">ID</a>
should be used only on attributes.</p><div class="note"><div class="p"><b>Note:</b> Uniqueness of items validated as <a href="#ID" shape="rect">ID</a> is not
part of this datatype as defined here.  
When this specification is used in conjunction with
<a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>, uniqueness is enforced at a
different level, not as part of datatype validity;
see <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#cvc-id" shape="rect">Validation Rule: Validation Root Valid (ID/IDREF)</a> 
in <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.</div></div><div class="div4">
<h5><a name="ID-facets" id="ID-facets" shape="rect"></a>3.4.8.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#ID" shape="rect">ID</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>\i\c* &#8745; [\i-[:]][\c-[:]]*</i></b></span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#ID" shape="rect">ID</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#ID" shape="rect">ID</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="IDREF" id="IDREF" shape="rect"></a>3.4.9 IDREF</h4><p>
<span class="termdef"><a name="dt-IDREF" id="dt-IDREF" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>IDREF</b> represents the
<a href="http://www.w3.org/TR/xml11/#NT-TokenizedType" shape="rect">IDREF attribute type</a> from
<a href="#XML" shape="rect">[XML]</a>.&#160; The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<b>IDREF</b> is the set of all strings that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a>
the <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production in
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>.&#160; The
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>IDREF</b> is the set of
strings that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
<a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production in
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>.
The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>IDREF</b> is <a href="#NCName" shape="rect">NCName</a>.
</span>
</p><div class="note"><div class="p"><b>Note:</b> It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports 
the <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production from 
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>, or that from 
<a href="#XMLNS1.0" shape="rect">[Namespaces in XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.
</div></div><p>
For compatibility (see <a href="#terminology" shape="rect">Terminology (&#167;1.6)</a>) this datatype
should be used only on attributes.
</p><div class="note"><div class="p"><b>Note:</b> Existence of referents for items validated as 
<a href="#IDREF" shape="rect">IDREF</a> is not part of this
datatype as defined here.
When this specification is used in conjunction with
<a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>, referential integrity is enforced at a
different level, not as part of datatype validity;
see <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#cvc-id" shape="rect">Validation Rule: Validation
Root Valid (ID/IDREF)</a> in <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.</div></div><div class="div4">
<h5><a name="IDREF-facets" id="IDREF-facets" shape="rect"></a>3.4.9.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#IDREF" shape="rect">IDREF</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>\i\c* &#8745; [\i-[:]][\c-[:]]*</i></b></span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#IDREF" shape="rect">IDREF</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#IDREF" shape="rect">IDREF</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="IDREF-derived-types" id="IDREF-derived-types" shape="rect"></a>3.4.9.2 Related datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>
   from
<a href="#IDREF" shape="rect">IDREF</a></p><ul><li><a href="#IDREFS" shape="rect">IDREFS</a></li></ul></div></div><div class="div3">
<h4><a name="IDREFS" id="IDREFS" shape="rect"></a>3.4.10 IDREFS</h4><p><span class="termdef"><a name="dt-IDREFS" id="dt-IDREFS" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>IDREFS</b> represents the
<a href="http://www.w3.org/TR/xml11/#NT-TokenizedType" shape="rect">IDREFS attribute type</a> from
<a href="#XML" shape="rect">[XML]</a>.&#160; The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<b>IDREFS</b> is the set of finite, non-zero-length sequences of
<a href="#IDREF" shape="rect">IDREF</a>s.
The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>IDREFS</b> is the
set of space-separated lists of tokens, of which each token is in the
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#IDREF" shape="rect">IDREF</a>.&#160;
The <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> of <b>IDREFS</b> 
is <a href="#IDREF" shape="rect">IDREF</a>.
<a href="#IDREFS" shape="rect">IDREFS</a> is derived
from <a href="#dt-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>anySimpleType</code><span class="arrow">&#183;</span></a> in two steps:  an anonymous list type
is defined, whose <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> is <a href="#IDREF" shape="rect">IDREF</a>; this is
the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <a href="#IDREFS" shape="rect">IDREFS</a>, which restricts
its value space to lists with at least one item.
</span></p><p>For compatibility (see <a href="#terminology" shape="rect">Terminology (&#167;1.6)</a>)
<a href="#IDREFS" shape="rect">IDREFS</a>
should be used only on attributes.</p><div class="note"><div class="p"><b>Note:</b> Existence of referents for items validated as 
<a href="#IDREFS" shape="rect">IDREFS</a> is not
part of this datatype as defined here.  
When this specification is used in conjunction with
<a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>, referential integrity is enforced at a
different level, not as part of datatype validity;
see <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#cvc-id" shape="rect">Validation Rule: 
Validation Root Valid (ID/IDREF)</a> in <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.</div></div><div class="div4">
<h5><a name="IDREFS-facets" id="IDREFS-facets" shape="rect"></a>3.4.10.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#IDREFS" shape="rect">IDREFS</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-minLength" name="IDREFS.minLength" shape="rect" id="IDREFS.minLength">minLength</a><span class="normal"><span class="normal"> = <b><i>1</i></b></span></span></li><li><a href="#rf-whiteSpace" name="IDREFS.whiteSpace" shape="rect" id="IDREFS.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#IDREFS" shape="rect">IDREFS</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#IDREFS" shape="rect">IDREFS</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="ENTITY" id="ENTITY" shape="rect"></a>3.4.11 ENTITY</h4><p>
<span class="termdef"><a name="dt-ENTITY" id="dt-ENTITY" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>ENTITY</b> represents the
<a href="http://www.w3.org/TR/xml11/#NT-TokenizedType" shape="rect">ENTITY</a> attribute type from
<a href="#XML" shape="rect">[XML]</a>.&#160; The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<b>ENTITY</b> is the set of all strings that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a>
the <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production in
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a> and have been declared as an
<a href="http://www.w3.org/TR/xml11/#dt-unparsed" shape="rect">unparsed entity</a> in
a <a href="http://www.w3.org/TR/xml11/#dt-doctype" shape="rect">document type definition</a>.
The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>ENTITY</b> is the set
of all strings that <a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>match<span class="arrow">&#183;</span></a> the
<a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production in
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>.
The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>ENTITY</b> is <a href="#NCName" shape="rect">NCName</a>.
</span>
</p><div class="note"><div class="p"><b>Note:</b> It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether an
implementation of this specification supports 
the <a href="http://www.w3.org/TR/xml-names11/#NT-NCName" shape="rect">NCName</a> production from 
<a href="#XMLNS" shape="rect">[Namespaces in XML]</a>, or that from 
<a href="#XMLNS1.0" shape="rect">[Namespaces in XML 1.0]</a>, or both.  See 
<a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.
</div></div><div class="note"><div class="p"><b>Note:</b> The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<a href="#ENTITY" shape="rect">ENTITY</a>
is scoped to a specific instance document.</div></div><p>For compatibility (see <a href="#terminology" shape="rect">Terminology (&#167;1.6)</a>)
<a href="#ENTITY" shape="rect">ENTITY</a>
should be used only on attributes.</p><div class="div4">
<h5><a name="ENTITY-facets" id="ENTITY-facets" shape="rect"></a>3.4.11.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#ENTITY" shape="rect">ENTITY</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>\i\c* &#8745; [\i-[:]][\c-[:]]*</i></b></span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#ENTITY" shape="rect">ENTITY</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-minLength" shape="rect">minLength</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#ENTITY" shape="rect">ENTITY</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="ENTITY-derived-types" id="ENTITY-derived-types" shape="rect"></a>3.4.11.2 Related datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a>
   from
<a href="#ENTITY" shape="rect">ENTITY</a></p><ul><li><a href="#ENTITIES" shape="rect">ENTITIES</a></li></ul></div></div><div class="div3">
<h4><a name="ENTITIES" id="ENTITIES" shape="rect"></a>3.4.12 ENTITIES</h4><p><span class="termdef"><a name="dt-ENTITIES" id="dt-ENTITIES" title="" shape="rect">[Definition:]&#160;&#160;</a><b>ENTITIES</b>
represents the <a href="http://www.w3.org/TR/xml11/#NT-TokenizedType" shape="rect">ENTITIES attribute
type</a> from <a href="#XML" shape="rect">[XML]</a>.&#160; The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of <b>ENTITIES</b> is the set of finite, non-zero-length sequences of

<a href="#dt-ENTITY" class="termref" shape="rect"><span class="arrow">&#183;</span>ENTITY<span class="arrow">&#183;</span></a> values that have been declared as
<a href="http://www.w3.org/TR/xml11/#dt-unparsed" shape="rect">unparsed entities</a>
in a <a href="http://www.w3.org/TR/xml11/#dt-doctype" shape="rect">document type definition</a>.&#160;
The <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>ENTITIES</b> is the
set of space-separated lists of tokens, of which each token is in the
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#ENTITY" shape="rect">ENTITY</a>.&#160;
The <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> of <b>ENTITIES</b> is
<a href="#ENTITY" shape="rect">ENTITY</a>.
<a href="#ENTITIES" shape="rect">ENTITIES</a> is derived
from <a href="#dt-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>anySimpleType</code><span class="arrow">&#183;</span></a> in two steps:  an anonymous list type
is defined, whose <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> is <a href="#ENTITY" shape="rect">ENTITY</a>; this is
the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <a href="#ENTITIES" shape="rect">ENTITIES</a>, which restricts
its value space to lists with at least one item.
</span>
</p><div class="note"><div class="p"><b>Note:</b> The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<a href="#ENTITIES" shape="rect">ENTITIES</a>
is scoped to a specific instance document.</div></div><p>For compatibility (see <a href="#terminology" shape="rect">Terminology (&#167;1.6)</a>)
<a href="#ENTITIES" shape="rect">ENTITIES</a>
should be used only on attributes.</p><div class="div4">
<h5><a name="ENTITIES-facets" id="ENTITIES-facets" shape="rect"></a>3.4.12.1 
Facets</h5><p><span class="normal"><span class="normal">The <a href="#ENTITIES" shape="rect">ENTITIES</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-minLength" name="ENTITIES.minLength" shape="rect" id="ENTITIES.minLength">minLength</a><span class="normal"><span class="normal"> = <b><i>1</i></b></span></span></li><li><a href="#rf-whiteSpace" name="ENTITIES.whiteSpace" shape="rect" id="ENTITIES.whiteSpace">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#ENTITIES" shape="rect">ENTITIES</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-length" shape="rect">length</a></li><li><a href="#rf-maxLength" shape="rect">maxLength</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#ENTITIES" shape="rect">ENTITIES</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>false</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="integer" id="integer" shape="rect"></a>3.4.13 integer</h4><p><span class="termdef"><a name="dt-integer-datatype" id="dt-integer-datatype" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>integer</b> is
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#decimal" shape="rect">decimal</a> by fixing the
value of <a href="#dt-fractionDigits" class="termref" shape="rect"><span class="arrow">&#183;</span>fractionDigits<span class="arrow">&#183;</span></a> to be 0 and
disallowing the trailing decimal point.&#160;
This results in the standard
mathematical concept of the integer numbers.&#160; The
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <b>integer</b> is the infinite
set {...,-2,-1,0,1,2,...}.&#160; The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of
<b>integer</b> is <a href="#decimal" shape="rect">decimal</a>.</span></p><div class="div4">
<h5><a name="integer-lexical-representation" id="integer-lexical-representation" shape="rect"></a>3.4.13.1 Lexical representation</h5><p><a href="#integer" shape="rect">integer</a>
has a lexical representation consisting of a finite-length sequence
of one or more 
decimal digits (#x30-#x39) with an optional leading sign.&#160; If the sign is omitted,
"+" is assumed.&#160; For example: -1, 0, 12678967543233, +100000.
</p></div><div class="div4">
<h5><a name="integer-canonical-repr" id="integer-canonical-repr" shape="rect"></a>3.4.13.2 Canonical representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#integer" shape="rect">integer</a>
is defined by prohibiting certain options from the
<a href="#integer-lexical-representation" shape="rect">Lexical representation (&#167;3.4.13.1)</a>.&#160;
Specifically, the preceding optional "+" sign is prohibited
and leading zeroes are prohibited.</p></div><div class="div4">
<h5><a name="integer-facets" id="integer-facets" shape="rect"></a>3.4.13.3 Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#integer" shape="rect">integer</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" name="integer.fractionDigits" shape="rect" id="integer.fractionDigits">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#integer" shape="rect">integer</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" name="integer.pattern" shape="rect" id="integer.pattern">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#integer" shape="rect">integer</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#integer" shape="rect">integer</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="integer-derived-types" id="integer-derived-types" shape="rect"></a>3.4.13.4 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatypes are 
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#integer" shape="rect">integer</a></p><ul><li><a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a></li><li><a href="#long" shape="rect">long</a></li><li><a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a></li></ul></div></div><div class="div3">
<h4><a name="nonPositiveInteger" id="nonPositiveInteger" shape="rect"></a>3.4.14 nonPositiveInteger</h4><p><span class="termdef"><a name="dt-nonPositiveInteger" id="dt-nonPositiveInteger" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>nonPositiveInteger</b> is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="#integer" shape="rect">integer</a> by setting the value of
<a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> to be 0.&#160; This results in the
standard mathematical concept of the non-positive integers.
The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <b>nonPositiveInteger</b>
is the infinite set {...,-2,-1,0}.&#160; The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>
of <b>nonPositiveInteger</b> is <a href="#integer" shape="rect">integer</a>.</span></p><div class="div4">
<h5><a name="nonPositiveInteger-lexical-representation" id="nonPositiveInteger-lexical-representation" shape="rect"></a>3.4.14.1 Lexical representation</h5><p><a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a>
has a lexical representation consisting of
an optional preceding sign
followed by a non-empty
finite-length sequence of decimal digits (#x30-#x39).&#160;
The sign may be "+" or may be omitted only for
lexical forms denoting zero; in all other lexical forms, the negative
sign ('<code>-</code>') must be present.&#160;
For example: -1, 0, -12678967543233, -100000.</p></div><div class="div4">
<h5><a name="nonPositiveInteger-canonical-repr" id="nonPositiveInteger-canonical-repr" shape="rect"></a>3.4.14.2 Canonical representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a>
is defined by prohibiting certain options from the
<a href="#nonPositiveInteger-lexical-representation" shape="rect">Lexical representation (&#167;3.4.14.1)</a>.&#160;
In the canonical form for zero, the sign must be
omitted.&#160; Leading zeroes are prohibited.</p></div><div class="div4">
<h5><a name="nonPositiveInteger-facets" id="nonPositiveInteger-facets" shape="rect"></a>3.4.14.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-maxInclusive" name="nonPositiveInteger.maxInclusive" shape="rect" id="nonPositiveInteger.maxInclusive">maxInclusive</a><span class="normal"><span class="normal"> = <b><i>0</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="nonPositiveInteger-derived-types" id="nonPositiveInteger-derived-types" shape="rect"></a>3.4.14.4 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a></p><ul><li><a href="#negativeInteger" shape="rect">negativeInteger</a></li></ul></div></div><div class="div3">
<h4><a name="negativeInteger" id="negativeInteger" shape="rect"></a>3.4.15 negativeInteger</h4><p><span class="termdef"><a name="dt-negativeInteger" id="dt-negativeInteger" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>negativeInteger</b> is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a> by setting the value of
<a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> to be -1.&#160; This results in the
standard mathematical concept of the negative integers.&#160; The
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <b>negativeInteger</b>
is the infinite set {...,-2,-1}.&#160; The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>
of <b>negativeInteger</b>  is <a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a>.
</span></p><div class="div4">
<h5><a name="negativeInteger-lexical-representation" id="negativeInteger-lexical-representation" shape="rect"></a>3.4.15.1 Lexical representation</h5><p><a href="#negativeInteger" shape="rect">negativeInteger</a>
has a lexical representation consisting
of a negative sign ('<code>-</code>') followed by a non-empty finite-length sequence of
decimal digits (#x30-#x39),
at least one of which <span class="rfc2119">must</span> be a digit other than '<code>0</code>'.&#160; 
For example: -1, -12678967543233,
-100000.</p></div><div class="div4">
<h5><a name="negativeInteger-canonical-repr" id="negativeInteger-canonical-repr" shape="rect"></a>3.4.15.2 Canonical representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#negativeInteger" shape="rect">negativeInteger</a>
is defined by prohibiting certain options from the
<a href="#negativeInteger-lexical-representation" shape="rect">Lexical representation (&#167;3.4.15.1)</a>.&#160;
Specifically,  leading zeroes are prohibited.</p></div><div class="div4">
<h5><a name="negativeInteger-facets" id="negativeInteger-facets" shape="rect"></a>3.4.15.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#negativeInteger" shape="rect">negativeInteger</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#negativeInteger" shape="rect">negativeInteger</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-maxInclusive" name="negativeInteger.maxInclusive" shape="rect" id="negativeInteger.maxInclusive">maxInclusive</a><span class="normal"><span class="normal"> = <b><i>-1</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#negativeInteger" shape="rect">negativeInteger</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#negativeInteger" shape="rect">negativeInteger</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="long" id="long" shape="rect"></a>3.4.16 long</h4><p><span class="termdef"><a name="dt-long" id="dt-long" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>long</b>
is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#integer" shape="rect">integer</a> by setting the
value of <a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> to be 9223372036854775807
and <a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> to be -9223372036854775808.
The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>long</b> is
<a href="#integer" shape="rect">integer</a>.
</span>
</p><div class="div4">
<h5><a name="long-lexical-representation" id="long-lexical-representation" shape="rect"></a>3.4.16.1 Lexical Representation</h5><p><a href="#long" shape="rect">long</a>
has a lexical representation consisting
of an optional sign followed by a non-empty finite-length
sequence of decimal digits (#x30-#x39).&#160; If
the sign is omitted, "+" is assumed.&#160;
For example: -1, 0,
12678967543233, +100000.</p></div><div class="div4">
<h5><a name="long-canonical-repr" id="long-canonical-repr" shape="rect"></a>3.4.16.2 Canonical Representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#long" shape="rect">long</a>
is defined by prohibiting certain options from the
<a href="#long-lexical-representation" shape="rect">Lexical Representation (&#167;3.4.16.1)</a>.&#160; Specifically, the
the optional "+" sign is prohibited and leading zeroes are prohibited.</p></div><div class="div4">
<h5><a name="long-facets" id="long-facets" shape="rect"></a>3.4.16.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#long" shape="rect">long</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#long" shape="rect">long</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-maxInclusive" name="long.maxInclusive" shape="rect" id="long.maxInclusive">maxInclusive</a><span class="normal"><span class="normal"> = <b><i>9223372036854775807</i></b></span></span></li><li><a href="#rf-minInclusive" name="long.minInclusive" shape="rect" id="long.minInclusive">minInclusive</a><span class="normal"><span class="normal"> = <b><i>-9223372036854775808</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#long" shape="rect">long</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#long" shape="rect">long</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>true</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="long-derived-types" id="long-derived-types" shape="rect"></a>3.4.16.4 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#long" shape="rect">long</a></p><ul><li><a href="#int" shape="rect">int</a></li></ul></div></div><div class="div3">
<h4><a name="int" id="int" shape="rect"></a>3.4.17 int</h4><p><span class="termdef"><a name="dt-int" id="dt-int" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>int</b>
is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#long" shape="rect">long</a> by setting the
value of <a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> to be 2147483647 and
<a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> to be -2147483648.&#160; The
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>int</b> is <a href="#long" shape="rect">long</a>.</span></p><div class="div4">
<h5><a name="int-lexical-representation" id="int-lexical-representation" shape="rect"></a>3.4.17.1 Lexical Representation</h5><p><a href="#int" shape="rect">int</a>
has a lexical representation consisting
of an optional sign followed by a non-empty finite-length
sequence of decimal digits (#x30-#x39).&#160; If the sign is omitted, "+" is assumed.
For example: -1, 0, 126789675, +100000.</p></div><div class="div4">
<h5><a name="int-canonical-repr" id="int-canonical-repr" shape="rect"></a>3.4.17.2 Canonical representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#int" shape="rect">int</a>
is defined by prohibiting certain options from the
<a href="#int-lexical-representation" shape="rect">Lexical Representation (&#167;3.4.17.1)</a>.&#160; Specifically, the
the optional "+" sign is prohibited and leading zeroes are prohibited.
</p></div><div class="div4">
<h5><a name="int-facets" id="int-facets" shape="rect"></a>3.4.17.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#int" shape="rect">int</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#int" shape="rect">int</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-maxInclusive" name="int.maxInclusive" shape="rect" id="int.maxInclusive">maxInclusive</a><span class="normal"><span class="normal"> = <b><i>2147483647</i></b></span></span></li><li><a href="#rf-minInclusive" name="int.minInclusive" shape="rect" id="int.minInclusive">minInclusive</a><span class="normal"><span class="normal"> = <b><i>-2147483648</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#int" shape="rect">int</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#int" shape="rect">int</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>true</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="int-derived-types" id="int-derived-types" shape="rect"></a>3.4.17.4 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#int" shape="rect">int</a></p><ul><li><a href="#short" shape="rect">short</a></li></ul></div></div><div class="div3">
<h4><a name="short" id="short" shape="rect"></a>3.4.18 short</h4><p><span class="termdef"><a name="dt-short" id="dt-short" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>short</b> is
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#int" shape="rect">int</a> by setting the
value of <a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> to be 32767 and
<a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> to be -32768.&#160; The
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>short</b> is
<a href="#int" shape="rect">int</a>.</span></p><div class="div4">
<h5><a name="short-lexical-representation" id="short-lexical-representation" shape="rect"></a>3.4.18.1 Lexical representation</h5><p><a href="#short" shape="rect">short</a>
has a lexical representation consisting
of an optional sign followed by a non-empty finite-length sequence of decimal
digits (#x30-#x39).&#160; If the sign is omitted, "+" is assumed.
For example: -1, 0, 12678, +10000.</p></div><div class="div4">
<h5><a name="short-canonical-repr" id="short-canonical-repr" shape="rect"></a>3.4.18.2 Canonical representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#short" shape="rect">short</a>
is defined by prohibiting certain options from the
<a href="#short-lexical-representation" shape="rect">Lexical representation (&#167;3.4.18.1)</a>.&#160; Specifically, the
the optional "+" sign is prohibited and leading zeroes are prohibited.</p></div><div class="div4">
<h5><a name="short-facets" id="short-facets" shape="rect"></a>3.4.18.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#short" shape="rect">short</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#short" shape="rect">short</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-maxInclusive" name="short.maxInclusive" shape="rect" id="short.maxInclusive">maxInclusive</a><span class="normal"><span class="normal"> = <b><i>32767</i></b></span></span></li><li><a href="#rf-minInclusive" name="short.minInclusive" shape="rect" id="short.minInclusive">minInclusive</a><span class="normal"><span class="normal"> = <b><i>-32768</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#short" shape="rect">short</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#short" shape="rect">short</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>true</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="short-derived-types" id="short-derived-types" shape="rect"></a>3.4.18.4 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#short" shape="rect">short</a></p><ul><li><a href="#byte" shape="rect">byte</a></li></ul></div></div><div class="div3">
<h4><a name="byte" id="byte" shape="rect"></a>3.4.19 byte</h4><p><span class="termdef"><a name="dt-byte" id="dt-byte" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>byte</b>
is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#short" shape="rect">short</a>
by setting the value of <a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> to be 127
and <a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> to be -128.
The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>byte</b> is
<a href="#short" shape="rect">short</a>.</span></p><div class="div4">
<h5><a name="byte-lexical-representation" id="byte-lexical-representation" shape="rect"></a>3.4.19.1 Lexical representation</h5><p><a href="#byte" shape="rect">byte</a>
has a lexical representation consisting
of an optional sign followed by a non-empty finite-length
sequence of decimal digits (#x30-#x39).&#160; If the sign is omitted, "+" is assumed.
For example: -1, 0, 126, +100.</p></div><div class="div4">
<h5><a name="byte-canonical-repr" id="byte-canonical-repr" shape="rect"></a>3.4.19.2 Canonical representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#byte" shape="rect">byte</a>
is defined by prohibiting certain options from the
<a href="#byte-lexical-representation" shape="rect">Lexical representation (&#167;3.4.19.1)</a>.&#160; Specifically, the
the optional "+" sign is prohibited and leading zeroes are prohibited.</p></div><div class="div4">
<h5><a name="byte-facets" id="byte-facets" shape="rect"></a>3.4.19.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#byte" shape="rect">byte</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#byte" shape="rect">byte</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-maxInclusive" name="byte.maxInclusive" shape="rect" id="byte.maxInclusive">maxInclusive</a><span class="normal"><span class="normal"> = <b><i>127</i></b></span></span></li><li><a href="#rf-minInclusive" name="byte.minInclusive" shape="rect" id="byte.minInclusive">minInclusive</a><span class="normal"><span class="normal"> = <b><i>-128</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#byte" shape="rect">byte</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#byte" shape="rect">byte</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>true</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="nonNegativeInteger" id="nonNegativeInteger" shape="rect"></a>3.4.20 nonNegativeInteger</h4><p><span class="termdef"><a name="dt-nonNegativeInteger" id="dt-nonNegativeInteger" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>nonNegativeInteger</b> is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="#integer" shape="rect">integer</a> by setting the value of
<a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> to be 0.&#160; This results in the
standard mathematical concept of the non-negative integers. The
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <b>nonNegativeInteger</b>
is the infinite set {0,1,2,...}.&#160; The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of
<b>nonNegativeInteger</b> is <a href="#integer" shape="rect">integer</a>.</span></p><div class="div4">
<h5><a name="nonNegativeInteger-lexical-representation" id="nonNegativeInteger-lexical-representation" shape="rect"></a>3.4.20.1 Lexical representation</h5><p><a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a>
has a lexical representation consisting of
an optional sign followed by a non-empty finite-length
sequence of decimal digits (#x30-#x39).&#160; If the sign is omitted,
the positive sign ('<code>+</code>') is assumed.
If the sign is present, it must be "+" except for lexical forms
denoting zero, which may be preceded by a positive ('<code>+</code>') or a negative ('<code>-</code>') sign.
For example:
1, 0, 12678967543233, +100000.
</p></div><div class="div4">
<h5><a name="nonNegativeInteger-canonical-repr" id="nonNegativeInteger-canonical-repr" shape="rect"></a>3.4.20.2 Canonical representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a>
is defined by prohibiting certain options from the
<a href="#nonNegativeInteger-lexical-representation" shape="rect">Lexical representation (&#167;3.4.20.1)</a>.&#160; Specifically, the
the optional "+" sign is prohibited and leading zeroes are prohibited.</p></div><div class="div4">
<h5><a name="nonNegativeInteger-facets" id="nonNegativeInteger-facets" shape="rect"></a>3.4.20.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-minInclusive" name="nonNegativeInteger.minInclusive" shape="rect" id="nonNegativeInteger.minInclusive">minInclusive</a><span class="normal"><span class="normal"> = <b><i>0</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="nonNegativeInteger-derived-types" id="nonNegativeInteger-derived-types" shape="rect"></a>3.4.20.4 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatypes are 
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a></p><ul><li><a href="#unsignedLong" shape="rect">unsignedLong</a></li><li><a href="#positiveInteger" shape="rect">positiveInteger</a></li></ul></div></div><div class="div3">
<h4><a name="unsignedLong" id="unsignedLong" shape="rect"></a>3.4.21 unsignedLong</h4><p>
<span class="termdef"><a name="dt-unsignedLong" id="dt-unsignedLong" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>unsignedLong</b> is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a> by setting the value of
<a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> to be 18446744073709551615.&#160;
The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>unsignedLong</b> is
<a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a>.
</span>
</p><div class="div4">
<h5><a name="unsignedLong-lexical-representation" id="unsignedLong-lexical-representation" shape="rect"></a>3.4.21.1 Lexical representation</h5><p><a href="#unsignedLong" shape="rect">unsignedLong</a>
has a lexical representation consisting of
an optional sign followed by a
non-empty
finite-length sequence of decimal digits (#x30-#x39).&#160;
If the sign is omitted, the positive sign
('<code>+</code>') is assumed.&#160; If the sign is present, it must be
'<code>+</code>' except for lexical forms denoting zero, which may
be preceded by a positive ('<code>+</code>') or a negative
('<code>-</code>') sign. For example: 0, 12678967543233,
100000.</p></div><div class="div4">
<h5><a name="unsignedLong-canonical-repr" id="unsignedLong-canonical-repr" shape="rect"></a>3.4.21.2 Canonical representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#unsignedLong" shape="rect">unsignedLong</a>
is defined by prohibiting certain options from the
<a href="#unsignedLong-lexical-representation" shape="rect">Lexical representation (&#167;3.4.21.1)</a>.&#160; Specifically,
leading zeroes are prohibited.</p></div><div class="div4">
<h5><a name="unsignedLong-facets" id="unsignedLong-facets" shape="rect"></a>3.4.21.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#unsignedLong" shape="rect">unsignedLong</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#unsignedLong" shape="rect">unsignedLong</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-maxInclusive" name="unsignedLong.maxInclusive" shape="rect" id="unsignedLong.maxInclusive">maxInclusive</a><span class="normal"><span class="normal"> = <b><i>18446744073709551615</i></b></span></span></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a><span class="normal"><span class="normal"> = <b><i>0</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#unsignedLong" shape="rect">unsignedLong</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#unsignedLong" shape="rect">unsignedLong</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>true</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="unsignedLong-derived-types" id="unsignedLong-derived-types" shape="rect"></a>3.4.21.4 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#unsignedLong" shape="rect">unsignedLong</a></p><ul><li><a href="#unsignedInt" shape="rect">unsignedInt</a></li></ul></div></div><div class="div3">
<h4><a name="unsignedInt" id="unsignedInt" shape="rect"></a>3.4.22 unsignedInt</h4><p><span class="termdef"><a name="dt-unsignedInt" id="dt-unsignedInt" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>unsignedInt</b> is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="#unsignedLong" shape="rect">unsignedLong</a> by setting the value of
<a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> to be 4294967295.&#160; The
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>unsignedInt</b> is
<a href="#unsignedLong" shape="rect">unsignedLong</a>.
</span>
</p><div class="div4">
<h5><a name="unsignedInt-lexical-representation" id="unsignedInt-lexical-representation" shape="rect"></a>3.4.22.1 Lexical representation</h5><p><a href="#unsignedInt" shape="rect">unsignedInt</a>
has a lexical representation consisting
of an optional sign followed by a
non-empty
finite-length sequence of decimal digits (#x30-#x39).&#160;
If the sign is omitted, the positive sign
('<code>+</code>') is assumed.&#160; If the sign is present, it must be
'<code>+</code>' except for lexical forms denoting zero, which may
be preceded by a positive ('<code>+</code>') or a negative
('<code>-</code>') sign.  For example: 0,
1267896754, 100000.</p></div><div class="div4">
<h5><a name="unsignedInt-canonical-repr" id="unsignedInt-canonical-repr" shape="rect"></a>3.4.22.2 Canonical representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#unsignedInt" shape="rect">unsignedInt</a>
is defined by prohibiting certain options from the
<a href="#unsignedInt-lexical-representation" shape="rect">Lexical representation (&#167;3.4.22.1)</a>.&#160; Specifically,
leading zeroes are prohibited.
</p></div><div class="div4">
<h5><a name="unsignedInt-facets" id="unsignedInt-facets" shape="rect"></a>3.4.22.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#unsignedInt" shape="rect">unsignedInt</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#unsignedInt" shape="rect">unsignedInt</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-maxInclusive" name="unsignedInt.maxInclusive" shape="rect" id="unsignedInt.maxInclusive">maxInclusive</a><span class="normal"><span class="normal"> = <b><i>4294967295</i></b></span></span></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a><span class="normal"><span class="normal"> = <b><i>0</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#unsignedInt" shape="rect">unsignedInt</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#unsignedInt" shape="rect">unsignedInt</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>true</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="unsignedInt-derived-types" id="unsignedInt-derived-types" shape="rect"></a>3.4.22.4 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#unsignedInt" shape="rect">unsignedInt</a></p><ul><li><a href="#unsignedShort" shape="rect">unsignedShort</a></li></ul></div></div><div class="div3">
<h4><a name="unsignedShort" id="unsignedShort" shape="rect"></a>3.4.23 unsignedShort</h4><p><span class="termdef"><a name="dt-unsignedShort" id="dt-unsignedShort" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>unsignedShort</b> is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="#unsignedInt" shape="rect">unsignedInt</a> by setting the value of
<a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> to be 65535.&#160; The
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>unsignedShort</b> is
<a href="#unsignedInt" shape="rect">unsignedInt</a>.</span></p><div class="div4">
<h5><a name="unsignedShort-lexical-representation" id="unsignedShort-lexical-representation" shape="rect"></a>3.4.23.1 Lexical representation</h5><p><a href="#unsignedShort" shape="rect">unsignedShort</a>
has a lexical representation consisting of
an optional sign followed by a
non-empty finite-length
sequence of decimal digits (#x30-#x39). If the sign is omitted, the positive sign
('<code>+</code>') is assumed.&#160; If the sign is present, it must be
'<code>+</code>' except for lexical forms denoting zero, which may
be preceded by a positive ('<code>+</code>') or a negative
('<code>-</code>') sign.&#160; For example: 0, 12678, 10000.</p></div><div class="div4">
<h5><a name="unsignedShort-canonical-repr" id="unsignedShort-canonical-repr" shape="rect"></a>3.4.23.2 Canonical representation</h5><p>The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#unsignedShort" shape="rect">unsignedShort</a>
is defined by prohibiting certain options from the
<a href="#unsignedShort-lexical-representation" shape="rect">Lexical representation (&#167;3.4.23.1)</a>.&#160;
Specifically, the leading zeroes are prohibited.</p></div><div class="div4">
<h5><a name="unsignedShort-facets" id="unsignedShort-facets" shape="rect"></a>3.4.23.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#unsignedShort" shape="rect">unsignedShort</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#unsignedShort" shape="rect">unsignedShort</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-maxInclusive" name="unsignedShort.maxInclusive" shape="rect" id="unsignedShort.maxInclusive">maxInclusive</a><span class="normal"><span class="normal"> = <b><i>65535</i></b></span></span></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a><span class="normal"><span class="normal"> = <b><i>0</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#unsignedShort" shape="rect">unsignedShort</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#unsignedShort" shape="rect">unsignedShort</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>true</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div><div class="div4">
<h5><a name="unsignedShort-derived-types" id="unsignedShort-derived-types" shape="rect"></a>3.4.23.4 Derived datatypes</h5><p>
   The following <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
     datatype is
    <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
   from
<a href="#unsignedShort" shape="rect">unsignedShort</a></p><ul><li><a href="#unsignedByte" shape="rect">unsignedByte</a></li></ul></div></div><div class="div3">
<h4><a name="unsignedByte" id="unsignedByte" shape="rect"></a>3.4.24 unsignedByte</h4><p><span class="termdef"><a name="dt-unsignedByte" id="dt-unsignedByte" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>unsignedByte</b> is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="#unsignedShort" shape="rect">unsignedShort</a> by setting the value of
<a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> to be 255.&#160; The
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <b>unsignedByte</b> is
<a href="#unsignedShort" shape="rect">unsignedShort</a>.</span></p><div class="div4">
<h5><a name="unsignedByte-lexical-representation" id="unsignedByte-lexical-representation" shape="rect"></a>3.4.24.1 Lexical representation</h5><p><a href="#unsignedByte" shape="rect">unsignedByte</a>
has a lexical representation consisting of
an optional sign followed by a
non-empty finite-length
sequence of decimal digits (#x30-#x39). If the sign is omitted, the positive sign
('<code>+</code>') is assumed.&#160; If the sign is present, it must be
'<code>+</code>' except for lexical forms denoting zero, which may
be preceded by a positive ('<code>+</code>') or a negative
('<code>-</code>') sign.&#160; For example: 0, 126, 100.</p></div><div class="div4">
<h5><a name="unsignedByte-canonical-repr" id="unsignedByte-canonical-repr" shape="rect"></a>3.4.24.2 Canonical representation</h5><p>
The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#unsignedByte" shape="rect">unsignedByte</a>
is defined by prohibiting certain options from the
<a href="#unsignedByte-lexical-representation" shape="rect">Lexical representation (&#167;3.4.24.1)</a>.&#160; Specifically,
leading zeroes are prohibited.</p></div><div class="div4">
<h5><a name="unisngedByte-facets" id="unisngedByte-facets" shape="rect"></a>3.4.24.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#unsignedByte" shape="rect">unsignedByte</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#unsignedByte" shape="rect">unsignedByte</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-maxInclusive" name="unsignedByte.maxInclusive" shape="rect" id="unsignedByte.maxInclusive">maxInclusive</a><span class="normal"><span class="normal"> = <b><i>255</i></b></span></span></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a><span class="normal"><span class="normal"> = <b><i>0</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#unsignedByte" shape="rect">unsignedByte</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#unsignedByte" shape="rect">unsignedByte</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>true</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>finite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="positiveInteger" id="positiveInteger" shape="rect"></a>3.4.25 positiveInteger</h4><p><span class="termdef"><a name="dt-positiveInteger" id="dt-positiveInteger" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>positiveInteger</b> is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a> by setting the value of
<a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> to be 1.&#160; This results in the standard
mathematical concept of the positive integer numbers.&#160;
The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <b>positiveInteger</b>
is the infinite set {1,2,...}.&#160; The <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of
<b>positiveInteger</b> is <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a>.</span></p><div class="div4">
<h5><a name="positiveInteger-lexical-representation" id="positiveInteger-lexical-representation" shape="rect"></a>3.4.25.1 Lexical representation</h5><p><a href="#positiveInteger" shape="rect">positiveInteger</a>
has a lexical representation consisting
of an optional positive sign ('<code>+</code>') followed by a 
non-empty finite-length
sequence of decimal digits (#x30-#x39),
at least one of which <span class="rfc2119">must</span> be a digit other than '<code>0</code>'.&#160;
For example: 1, 12678967543233, +100000.</p></div><div class="div4">
<h5><a name="positiveInteger-canonical-repr" id="positiveInteger-canonical-repr" shape="rect"></a>3.4.25.2 Canonical representation</h5><p>
The <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> for
<a href="#positiveInteger" shape="rect">positiveInteger</a>
is defined by prohibiting certain options from the
<a href="#positiveInteger-lexical-representation" shape="rect">Lexical representation (&#167;3.4.25.1)</a>.&#160; Specifically, the
optional "+" sign is prohibited and leading zeroes are prohibited.
</p></div><div class="div4">
<h5><a name="positiveInteger-facets" id="positiveInteger-facets" shape="rect"></a>3.4.25.3 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#positiveInteger" shape="rect">positiveInteger</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-fractionDigits" shape="rect">fractionDigits</a><span class="normal"><span class="normal"> = <b><i>0</i></b> (fixed)</span></span></li><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#positiveInteger" shape="rect">positiveInteger</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" shape="rect">pattern</a><span class="normal"><span class="normal"> = <b><i>[\-+]?[0-9]+</i></b></span></span></li><li><a href="#rf-minInclusive" name="positiveInteger.minInclusive" shape="rect" id="positiveInteger.minInclusive">minInclusive</a><span class="normal"><span class="normal"> = <b><i>1</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#positiveInteger" shape="rect">positiveInteger</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-totalDigits" shape="rect">totalDigits</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#positiveInteger" shape="rect">positiveInteger</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>total</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>true</i></b></li></ul></div></div></div></div><div class="div3">
<h4><a name="yearMonthDuration" id="yearMonthDuration" shape="rect"></a>3.4.26 yearMonthDuration</h4><p><span class="termdef"><a name="dt-yearMonthDuration" id="dt-yearMonthDuration" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>yearMonthDuration</b> is a datatype <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="#duration" shape="rect">duration</a> by restricting its <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> to instances of
<a href="#nt-yearMonthDurationRep" shape="rect"><i>yearMonthDurationLexicalRep</i></a>.</span>&#160; The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<b>yearMonthDuration</b> is therefore that of <a href="#duration" shape="rect">duration</a>
restricted to those whose <a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a>
property is 0.&#160; This results in a duration datatype which is totally ordered.</p><div class="note"><div class="p"><b>Note:</b> The always-zero <a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> is formally retained in order that
<a href="#yearMonthDuration" shape="rect">yearMonthDuration</a>'s (abstract) value space truly be a subset of that of
<a href="#duration" shape="rect">duration</a>&#160; An obvious implementation optimization is to ignore the zero and implement
<a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> values simply as <a href="#integer" shape="rect">integer</a> values.</div></div><div class="div4">
<h5><a name="yearMonthDuration-lexical-mapping" id="yearMonthDuration-lexical-mapping" shape="rect"></a>3.4.26.1 The <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> Lexical Mapping</h5><div class="block">The lexical space is reduced from that of <a href="#duration" shape="rect">duration</a> by
disallowing <a href="#nt-duDaFrag" shape="rect"><i>duDayFrag</i></a> and <a href="#nt-duTFrag" shape="rect"><i>duTimeFrag</i></a>
fragments in the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a>. 


<div class="defset">
<div class="defset-head">The <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> Lexical
Representation</div>
<div class="prod">
<a name="nt-yearMonthDurationRep" id="nt-yearMonthDurationRep" shape="rect"></a><span class="lhs">[42]
    &#160;
    <i>yearMonthDurationLexicalRep</i></span>&#160;::= '<code>-</code>'?&#160;'<code>P</code>'&#160;<a href="#nt-duYMFrag" shape="rect"><i>duYearMonthFrag</i></a></div></div>
</div><p>The lexical 
space of <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> consists of
strings which match the regular expression
'<code>-?P((([0-9]+Y)([0-9]+M)?)|([0-9]+M))</code>' or the
expression '<code>-?P[0-9]+(Y([0-9]+M)?|M)</code>', but the
formal definition of <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> uses a
simpler regular expression in its <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a>
facet: '<code>[^DT]*</code>'.  This pattern matches only 
strings of characters which contain no 'D'
and no 'T', thus restricting the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>
of <a href="#duration" shape="rect">duration</a> to strings with no day, hour,
minute, or seconds fields.


</p><p>The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is that of <a href="#duration" shape="rect">duration</a> restricted in its 
range to the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> (which reduces its domain to omit any 
values not in the <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> value space).


</p><div class="note"><div class="p"><b>Note:</b> The <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> value whose <a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> and
  <a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a>
are both zero has no <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> in this datatype since its
<a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a> in <a href="#duration" shape="rect">duration</a> ('<code>PT0S</code>')
 is not in the 
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a>.</div></div></div><div class="div4">
<h5><a name="YearMonthDuration-facets" id="YearMonthDuration-facets" shape="rect"></a>3.4.26.2 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" name="yearMonthDuration.pattern" shape="rect" id="yearMonthDuration.pattern">pattern</a><span class="normal"><span class="normal"> = <b><i>[^DT]*</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div><div class="note"><div class="p"><b>Note:</b> The <a href="#ff-o" class="compref" shape="rect">ordered</a> facet has the value
<b><i>partial</i></b> even though the datatype is
in fact totally ordered, because (as explained in
<a href="#rf-ordered" shape="rect">ordered (&#167;4.2.1)</a>),
the value of that facet is unchanged by derivation.
</div></div></div></div><div class="div3">
<h4><a name="dayTimeDuration" id="dayTimeDuration" shape="rect"></a>3.4.27 dayTimeDuration</h4><p>
<span class="termdef"><a name="dt-dayTimeDuration" id="dt-dayTimeDuration" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>dayTimeDuration</b> is a datatype <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from
<a href="#duration" shape="rect">duration</a> by restricting its <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> to instances of
<a href="#nt-dayTimeDurationRep" shape="rect"><i>dayTimeDurationLexicalRep</i></a>.</span>  The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of 
<b>dayTimeDuration</b>
is therefore that of <a href="#duration" shape="rect">duration</a> restricted to those whose <a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a>
property is 0.&#160; This results in a duration datatype which is totally ordered.</p><div class="div4">
<h5><a name="dayTimeDuration-lexical-mapping" id="dayTimeDuration-lexical-mapping" shape="rect"></a>3.4.27.1 The <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> Lexical Space</h5><p>
The lexical space is reduced from that of <a href="#duration" shape="rect">duration</a> by
disallowing <a href="#nt-duYrFrag" shape="rect"><i>duYearFrag</i></a> and <a href="#nt-duMoFrag" shape="rect"><i>duMonthFrag</i></a>
fragments in the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a>. 

</p><div class="block"><div class="defset">
<div class="defset-head">The <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> Lexical Representation</div>
<div class="prod">
<a name="nt-dayTimeDurationRep" id="nt-dayTimeDurationRep" shape="rect"></a><span class="lhs">[43]
    &#160;
    <i>dayTimeDurationLexicalRep</i></span>&#160;::= '<code>-</code>'?&#160;'<code>P</code>'&#160;<a href="#nt-duDTFrag" shape="rect"><i>duDayTimeFrag</i></a></div></div>
</div><p>The lexical space of 
<a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> consists of
strings in the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#duration" shape="rect">duration</a> which 

match the regular expression '<code>[^YM]*[DT].*</code>';
this pattern eliminates all durations with year or month fields,
leaving only those with day, hour, minutes, and/or seconds
fields.


</p><p>
The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is that of <a href="#duration" shape="rect">duration</a> restricted 
in its 
range to the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> (which reduces its domain to omit any 
values not in 
the <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> value 
space).

</p></div><div class="div4">
<h5><a name="dayTimeDuration-facets" id="dayTimeDuration-facets" shape="rect"></a>3.4.27.2 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">The <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> datatype
         has the following 
	<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with the values shown; these
facets <span class="rfc2119">may</span> be specified
in the derivation of new types, if the
value given is at least as restrictive as the one shown:</p><ul><li><a href="#rf-pattern" name="dayTimeDuration.pattern" shape="rect" id="dayTimeDuration.pattern">pattern</a><span class="normal"><span class="normal"> = <b><i>[^YM]*(T.*)?</i></b></span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div><div class="note"><div class="p"><b>Note:</b> The <a href="#ff-o" class="compref" shape="rect">ordered</a> facet has the value
<b><i>partial</i></b> even though the datatype is
in fact totally ordered, because (as explained in
<a href="#rf-ordered" shape="rect">ordered (&#167;4.2.1)</a>),
the value of that facet is unchanged by derivation.
</div></div></div></div><div class="div3">
<h4><a name="dateTimeStamp" id="dateTimeStamp" shape="rect"></a>3.4.28 dateTimeStamp</h4><p>
<span class="termdef"><a name="dt-dateTimeStamp" id="dt-dateTimeStamp" title="" shape="rect">[Definition:]&#160;&#160;</a> 
The <b>dateTimeStamp</b> datatype is <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from 
<a href="#dateTime" shape="rect">dateTime</a> by giving the value <b><i>required</i></b> to its 
<a href="#f-tz" class="compref" shape="rect">explicitTimezone</a> facet.</span> The result is that all values of 
<a href="#dateTimeStamp" shape="rect">dateTimeStamp</a> are required to have explicit time zone offsets
and the datatype is totally ordered.
</p><div class="div4">
<h5><a name="dateTimeStamp-lexical-mapping" id="dateTimeStamp-lexical-mapping" shape="rect"></a>3.4.28.1 The <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a> Lexical Space</h5><p>As a consequence of requiring an explicit time zone offset, the
lexical space of <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a> is reduced from that
of <a href="#dateTime" shape="rect">dateTime</a> by requiring a <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>
fragment in the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a>.</p><div class="block"><div class="defset">
<div class="defset-head">The <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a> Lexical Representation</div>
<div class="prod">
<a name="nt-dateTimeStampRep" id="nt-dateTimeStampRep" shape="rect"></a><span class="lhs">[44]
    &#160;
    <i>dateTimeStampLexicalRep</i></span>&#160;::= <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>&#160;'<code>-</code>'&#160;<a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>&#160;'<code>-</code>'&#160;<a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>&#160;'<code>T</code>'&#160;((<a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>&#160;'<code>:</code>'&#160;<a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>&#160;'<code>:</code>'&#160;<a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>)&#160;|
<a href="#nt-eodFrag" shape="rect"><i>endOfDayFrag</i></a>) <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>&#160;&#160; <b>Constraint:</b>&#160; Day-of-month Representations</div></div>
</div><div class="note"><div class="p"><b>Note:</b> 
For details of the <a href="#con-dateTime-day" shape="rect">Day-of-month Representations (&#167;3.3.7.2)</a> constraint, see
<a href="#dateTime" shape="rect">dateTime</a>, from which the constraint is inherited.
</div></div><p>In other words, the lexical space of <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a> consists of strings which are in the
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#dateTime" shape="rect">dateTime</a> and which
also match the regular expression
'<code>.*(Z|(\+|-)[0-9][0-9]:[0-9][0-9])</code>'.</p><p>The
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> is that of <a href="#dateTime" shape="rect">dateTime</a> restricted to 
the <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a> lexical space.</p><p>The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> is that of <a href="#dateTime" shape="rect">dateTime</a> restricted 
to the <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a> value 
space.</p></div><div class="div4">
<h5><a name="dateTimeStamp-facets" id="dateTimeStamp-facets" shape="rect"></a>3.4.28.2 
Facets</h5><p><span class="normal"><span class="normal">The 
        <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a> datatype
        and all datatypes derived from it by restriction have the
	following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a></span></span> with <b><i>fixed</i></b> values; these
facets <span class="rfc2119">must not</span> be changed from the values shown:</p><ul><li><a href="#rf-whiteSpace" shape="rect">whiteSpace</a><span class="normal"><span class="normal"> = <b><i>collapse</i></b> (fixed)</span></span></li><li><a href="#rf-explicitTimezone" name="dateTimeStamp.explicitTimezone" shape="rect" id="dateTimeStamp.explicitTimezone">explicitTimezone</a><span class="normal"><span class="normal"> = <b><i>required</i></b> (fixed)</span></span></li></ul><p><span class="normal"><span class="normal">Datatypes derived by
	restriction from <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a> <span class="rfc2119">may</span> also
specify values for the
     following <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>:</span></span></p><ul><li><a href="#rf-pattern" shape="rect">pattern</a></li><li><a href="#rf-enumeration" shape="rect">enumeration</a></li><li><a href="#rf-maxInclusive" shape="rect">maxInclusive</a></li><li><a href="#rf-maxExclusive" shape="rect">maxExclusive</a></li><li><a href="#rf-minInclusive" shape="rect">minInclusive</a></li><li><a href="#rf-minExclusive" shape="rect">minExclusive</a></li><li><a href="#rf-assertions" shape="rect">assertions</a></li></ul><div class="normal"><div class="normal"><p>The 
	 <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a>  
	 datatype
	 has the following values for its 
	 <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>:
       </p><ul><li><a href="#rf-ordered" shape="rect">ordered</a> = <b><i>partial</i></b></li><li><a href="#rf-bounded" shape="rect">bounded</a> = <b><i>false</i></b></li><li><a href="#rf-cardinality" shape="rect">cardinality</a> = <b><i>countably infinite</i></b></li><li><a href="#rf-numeric" shape="rect">numeric</a> = <b><i>false</i></b></li></ul></div></div><div class="note"><div class="p"><b>Note:</b> The <a href="#ff-o" class="compref" shape="rect">ordered</a> facet has the value
<b><i>partial</i></b> even though the datatype is
in fact totally ordered, because (as explained in
<a href="#rf-ordered" shape="rect">ordered (&#167;4.2.1)</a>),
the value of that facet is unchanged by derivation.
</div></div></div></div></div></div><div class="div1">
<h2><a name="datatype-components" id="datatype-components" shape="rect"></a>4 Datatype components</h2><p>The preceding sections of this
specification have described datatypes in a way largely 
independent of their use in the particular context of 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-va" shape="rect">schema-aware processing</a> as 
defined in <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.</p><p>
This section presents the mechanisms necessary to integrate datatypes into 
the context of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>, mostly in terms of
the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#c" shape="rect">schema
component</a>
abstraction introduced there.  The account of datatypes given in this
specification is also intended to be useful in other contexts.
Any specification or other formal system intending to use datatypes as
defined above, particularly if definition of new datatypes via
facet-based restriction is envisaged, will need to provide analogous
mechanisms for some, but not necessarily all, of what follows below.
For example, the <a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a> and
<a href="#std-final" class="propref" shape="rect">{final}</a> properties are required because of
particular aspects of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a> which are not
in principle necessary for the use of datatypes as defined here.</p><p>The following sections provide full details on the properties and
significance of each kind of schema component involved in datatype
definitions. For each property, the kinds of values it is allowed to have is
specified.&#160; Any property not identified as optional is required to
be present; optional properties which are not present have
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-null" shape="rect">absent</a> as their value.
Any property identified as a having a set, subset or <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>
value may have an empty value unless this is explicitly ruled out: this is
not the same as <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-null" shape="rect">absent</a>.
Any property value identified as a superset or a subset of some set may
be equal to that set, unless a proper superset or subset is explicitly
called for.
</p><p>
For more information on the notion of schema components,
see <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#components" shape="rect">Schema Component Details</a>
of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</p><p><span class="termdef"><a name="dt-owner" id="dt-owner" title="" shape="rect">[Definition:]&#160;&#160;</a>A
component may be referred to as the <b>owner</b> of its properties, and of the values of
those properties.</span></p><div class="div2">
<h3 class="withToc"><span class="nav"> <a href="#rf-fund-facets" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="rf-defn" id="rf-defn" shape="rect"></a>4.1 Simple Type Definition</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.1.1 <a href="#dc-defn" shape="rect">The Simple Type Definition Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.1.2 <a href="#xr-defn" shape="rect">XML Representation of Simple Type Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.1.3 <a href="#defn-rep-constr" shape="rect">Constraints on XML Representation of Simple Type Definition</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.1.4 <a href="#defn-validation-rules" shape="rect">Simple Type Definition Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.1.5 <a href="#defn-coss" shape="rect">Constraints on Simple Type Definition Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.1.6 <a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions</a><br clear="none" />
</div><p>
Simple Type Definitions provide for:
</p><ul><li><div class="p">In the case of 
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes, 
identifying a datatype with its definition in this specification.</div></li><li><div class="p">In the case of <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> datatypes, 
defining the datatype in terms of other datatypes.</div></li><li><div class="p">Attaching a <a href="#QName" shape="rect">QName</a> to the datatype.</div></li></ul><div class="div3">
<h4><a name="dc-defn" id="dc-defn" shape="rect"></a>4.1.1 The Simple Type Definition Schema Component</h4><p>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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#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 <code>{</code><b><i>restriction</i></b>,
     <b><i>extension</i></b>, <b><i>list</i></b>,
     <b><i>union</i></b><code>}</code></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
   <b><i>absent</i></b>, otherwise <span class="rfc2119">must</span>
   be <b><i>absent</i></b><div class="ownDesc">
<p>Either an <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#ad" class="compref" shape="rect">Attribute Declaration</a>, an
    <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#ed" class="compref" shape="rect">Element Declaration</a>, a <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#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="#anySimpleType-def" class="termref" shape="rect"><span class="arrow">&#183;</span>anySimpleType<span class="arrow">&#183;</span></a>, which has
      <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-anyType" shape="rect">anyType</a>, a
      <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#ctd" 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="#f" 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="#ff" 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="#anySimpleType-def" class="termref" shape="rect"><span class="arrow">&#183;</span>anySimpleType<span class="arrow">&#183;</span></a>,
      in which it is <b><i>absent</i></b>.</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 <b><i>absent</i></b>.  The exception
is
     <a href="#anyAtomicType-def" class="termref" shape="rect"><span class="arrow">&#183;</span>anyAtomicType<span class="arrow">&#183;</span></a>, whose
<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <b><i>absent</i></b>.<div class="ownDesc">
<p>If
not <b><i>absent</i></b>, <span class="rfc2119">must</span> be a <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> built-in 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 <b><i>absent</i></b>.<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 <b><i>absent</i></b>.</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 type definitions 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>.&#160; Except for
anonymous <a href="#std" class="compref" shape="rect">Simple Type Definition</a>s (those
with no
<a href="#std-name" class="propref" shape="rect">{name}</a>), <a href="#std" class="compref" shape="rect">Simple Type Definition</a>s <span class="rfc2119">must</span> be uniquely identified within a
schema.
Within a valid schema, 
each <a href="#std" class="compref" shape="rect">Simple Type Definition</a> uniquely determines
one datatype.  The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>,
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>, etc., of a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
are the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, etc., of the datatype
uniquely determined (or "defined") 
by that <a href="#std" class="compref" shape="rect">Simple Type Definition</a>.
</p><p>
If <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>
then the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the datatype 

defined will be a subset of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> (which is a subset
of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of 
<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a>). If 
<a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>
then the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the datatype 
defined will be the set of
(possibly empty)
finite-length sequences 
of values from the 
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>. 
If <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
then the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the datatype
defined will be a subset
(possibly an improper subset) of 
the union of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> 
of each 
<a href="#std" class="compref" shape="rect">Simple Type Definition</a> 
in <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>.
</p><p>
If <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>
then the <a href="#std-variety" class="propref" shape="rect">{variety}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
must be <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>,
unless the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
is <a href="#anySimpleType" shape="rect">anySimpleType</a>.
If <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>
then the <a href="#std-variety" class="propref" shape="rect">{variety}</a> of <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>
must be either <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> or <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, and if <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> is <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
then all its <a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic members<span class="arrow">&#183;</span></a>
<span class="rfc2119">must</span> be <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>.
If <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
then
<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> must be a list of <a href="#std" class="compref" shape="rect">Simple Type Definition</a>s.</p><p>The <a href="#std-facets" class="propref" shape="rect">{facets}</a> property
determines the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of the datatype
being defined by imposing constraints which must be satisfied by values and
<a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a>.
</p><p>
The <a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a> property provides some
basic information about the datatype being defined: its cardinality,
whether an ordering is defined for it by this specification,
whether it has upper and lower bounds, and whether it is numeric.
</p><p>
If <a href="#std-final" class="propref" shape="rect">{final}</a> is the empty set then the type can be used
in deriving other types; the explicit values <b><i>restriction</i></b>,
<b><i>list</i></b> and <b><i>union</i></b> prevent further derivations of <a href="#std" class="compref" shape="rect">Simple Type Definition</a>s
by <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>, <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> and
<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> respectively; the explicit value <b><i>extension</i></b> prevents any derivation of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#ctd" class="compref" shape="rect">Complex Type Definitions</a> by extension.
 
</p><p>The <a href="#std-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="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> or <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</p></div><div class="div3">
<h4><a name="xr-defn" id="xr-defn" shape="rect"></a>4.1.2 XML Representation of Simple Type Definition Schema Components</h4><p>
The XML representation for a <a href="#std" class="compref" shape="rect">Simple Type Definition</a> schema component
is a <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><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="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;name = <a href="#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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#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="#QName" shape="rect">QName</a><br clear="none" />&#160;&#160;id = <a href="#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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?, (<a href="#element-simpleType" class="eltref" shape="rect">simpleType</a>?, (<a href="#element-minExclusive" class="eltref" shape="rect">minExclusive</a> | <a href="#element-minInclusive" class="eltref" shape="rect">minInclusive</a> | <a href="#element-maxExclusive" class="eltref" shape="rect">maxExclusive</a> | <a href="#element-maxInclusive" class="eltref" shape="rect">maxInclusive</a> | <a href="#element-totalDigits" class="eltref" shape="rect">totalDigits</a> | <a href="#element-fractionDigits" class="eltref" shape="rect">fractionDigits</a> | <!--*** <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-maxScale" class="eltref" shape="rect">maxScale</a> | <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-minScale" class="eltref" shape="rect">minScale</a> | ***--><a href="#element-length" class="eltref" shape="rect">length</a> | <a href="#element-minLength" class="eltref" shape="rect">minLength</a> | <a href="#element-maxLength" class="eltref" shape="rect">maxLength</a> | <a href="#element-enumeration" class="eltref" shape="rect">enumeration</a> | <a href="#element-whiteSpace" class="eltref" shape="rect">whiteSpace</a> | <a href="#element-pattern" class="eltref" shape="rect">pattern</a> | <a href="#element-assertion" class="eltref" shape="rect">assertion</a> | <a href="#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="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;itemType = <a href="#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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#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="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;memberTypes = List of <a href="#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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#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 class="reprcompmulti"><div class="reprHead"><a href="#dc-defn" shape="rect">Simple Type Definition</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="#std-name" class="propref" shape="rect">{name}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-null" shape="rect">absent</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</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 <code>schema</code> element information 
item, if present,
otherwise <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-null" shape="rect">absent</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#src-resolve" shape="rect">resolved</a> to by the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</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="#anySimpleType-def" class="termref" shape="rect"><span class="arrow">&#183;</span>anySimpleType<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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-null" shape="rect">absent</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-attribute" class="eltref" shape="rect">&lt;attribute&gt;</a>, <b>then </b>the corresponding <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-element" class="eltref" shape="rect">&lt;element&gt;</a>, <b>then </b>the corresponding <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#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>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.4.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.4.2 <b>otherwise </b>(the grandparent element information item is <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#ctd-content_type" class="xpropref" shape="rect">{content type}</a> of the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#ctd" class="compref" shape="rect">Complex Type Definition</a>
corresponding to the great-grandparent <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#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) 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>then </b>the set of <a href="#f" class="compref" shape="rect">Constraining Facet</a> components 
obtained by 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-facets-overlay" shape="rect">overlaying</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="#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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#st-restrict-facets" shape="rect">Schema Component Constraint: Simple Type Restriction (Facets)
</a>.</div><div class="clnumber">2 <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="#f-w" class="compref" shape="rect">whiteSpace</a> facet with 
<a href="#f-w-value" class="propref" shape="rect">{value}</a> = <b><i>collapse</i></b> and <a href="#f-w-fixed" class="propref" shape="rect">{fixed}</a> = <b><i>true</i></b>.</div><div class="clnumber">3 <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="#ff" class="compref" shape="rect">Fundamental Facet</a> components, one
each as specified in <a href="#dc-ordered" shape="rect">The ordered Schema Component (&#167;4.2.1.1)</a>, <a href="#dc-bounded" shape="rect">The bounded Schema Component (&#167;4.2.2.1)</a>,
<a href="#dc-cardinality" shape="rect">The cardinality Schema Component (&#167;4.2.3.1)</a> and <a href="#dc-numeric" shape="rect">The numeric Schema Component (&#167;4.2.4.1)</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-set" shape="rect">annotation mapping</a> of the set of elements containing the
    <a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a>, and  
    the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>, the
    <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a>, or the <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">[child]</a>,
    whichever is present,
    as defined in section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
    of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.

</div><div class="reprdep">
<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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#td" shape="rect">type definition</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#td" shape="rect">type definitions</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>.)
</div><div class="reprdep">If the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>atomic</i></b>, the following additional property
mapping also applies:</div><div class="reprcompmulti"><div class="reprHead"><a href="#xr-defn" shape="rect">Atomic Simple Type Definition</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="#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="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatype.<!--* Force break / clear, to avoid border cutting off property name * -->
<br clear="all" />
</div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
An electronic commerce schema might define a datatype called
'<code>SKU</code>'
(the barcode number that appears on products) from the
<a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatype <a href="#string" shape="rect">string</a> by
supplying a value for the <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> facet.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='SKU'&gt;
    &lt;restriction base='string'&gt;
      &lt;pattern value='\d{3}-[A-Z]{2}'/&gt;
    &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div><div class="exampleWrapper">
<div class="p">
In this case, '<code>SKU</code>' is the name of the new
<a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a> datatype, <a href="#string" shape="rect">string</a> is
its <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> 
and 
<a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> is the facet.

</div></div></div><div class="reprdep">If the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b>, the following
additional property mappings also apply:</div><div class="reprcompmulti"><div class="reprHead"><a href="#xr-defn" shape="rect">List Simple Type Definition</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="#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="#anySimpleType-def" class="termref" shape="rect"><span class="arrow">&#183;</span>anySimpleType<span class="arrow">&#183;</span></a>, <b>then </b>the <a href="#std" class="compref" shape="rect">Simple Type Definition</a> (a) <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#src-resolve" shape="rect">resolved</a> to by the
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</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="#anySimpleType-def" class="termref" shape="rect"><span class="arrow">&#183;</span>anySimpleType<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 class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
A system might want to store lists of floating point values.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='listOfFloat'&gt;
  &lt;list itemType='float'/&gt;
&lt;/simpleType&gt;
</pre></div><div class="exampleWrapper">
<div class="p">
In this case, <em>listOfFloat</em> is the name of the new
<a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a> datatype, <a href="#float" shape="rect">float</a> is its
<a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> and <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> is the
derivation method.
</div></div></div><div class="reprdep">If the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is 
<b><i>union</i></b>, the following
additional property mappings also apply:</div><div class="reprcompmulti"><div class="reprHead"><a href="#xr-defn" shape="rect">Union Simple Type Definition</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="#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="#anySimpleType-def" class="termref" shape="rect"><span class="arrow">&#183;</span>anySimpleType<span class="arrow">&#183;</span></a>, <b>then </b>the sequence of (a) the <a href="#std" class="compref" shape="rect">Simple Type Definition</a>s
(a) <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#src-resolve" shape="rect">resolved</a> to by the items in the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</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) those 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="#anySimpleType-def" class="termref" shape="rect"><span class="arrow">&#183;</span>anySimpleType<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 class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">As an example, taken from a typical display oriented text markup language,
one might want to express font sizes as an integer between 8 and 72, or with
one of the tokens "small", "medium" or "large".&#160; The <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
<a href="#std" class="compref" shape="rect">Simple Type Definition</a>
below would accomplish that.</div></div><div class="exampleInner">
<pre xml:space="preserve">
&lt;xsd:attribute name="size"&gt;
  &lt;xsd:simpleType&gt;
    &lt;xsd:union&gt;
      &lt;xsd:simpleType&gt;
        &lt;xsd:restriction base="xsd:positiveInteger"&gt;
          &lt;xsd:minInclusive value="8"/&gt;
          &lt;xsd:maxInclusive value="72"/&gt;
        &lt;/xsd:restriction&gt;
      &lt;/xsd:simpleType&gt;
      &lt;xsd:simpleType&gt;
        &lt;xsd:restriction base="xsd:NMTOKEN"&gt;
          &lt;xsd:enumeration value="small"/&gt;
          &lt;xsd:enumeration value="medium"/&gt;
          &lt;xsd:enumeration value="large"/&gt;
        &lt;/xsd:restriction&gt;
      &lt;/xsd:simpleType&gt;
    &lt;/xsd:union&gt;
  &lt;/xsd:simpleType&gt;
&lt;/xsd:attribute&gt;
</pre></div><div class="exampleInner">
<pre xml:space="preserve">
&lt;p&gt;
&lt;font size='large'&gt;A header&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size='12'&gt;this is a test&lt;/font&gt;
&lt;/p&gt;
</pre></div></div></div></div><p>
A  datatype can be 
<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> 
from a <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatype or 
an
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatype by one of three means:
by <em><a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a></em>, 
by <em><a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a></em> 
or by 
<em><a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a></em>.</p></div><div class="div3">
<h4><a name="defn-rep-constr" id="defn-rep-constr" shape="rect"></a>4.1.3 Constraints on XML Representation of Simple Type Definition</h4><div class="constraintnote"><a id="src-list-itemType-or-simpleType" name="src-list-itemType-or-simpleType" shape="rect"></a><b>Schema Representation Constraint: itemType attribute or simpleType child</b><br clear="none" /><div class="constraint"><div class="p">
Either the <code>itemType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or the
<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> of the <a href="#element-list" class="eltref" shape="rect">&lt;list&gt;</a> element
must be present, but not both.
</div></div></div><div class="constraintnote"><a id="src-restriction-base-or-simpleType" name="src-restriction-base-or-simpleType" shape="rect"></a><b>Schema Representation Constraint: base attribute or simpleType child</b><br clear="none" /><div class="constraint"><div class="p">
Either the <code>base</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> or the
<code>simpleType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a> of the <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
element must be present, but not both.
</div></div></div><div class="constraintnote"><a id="src-union-memberTypes-or-simpleTypes" name="src-union-memberTypes-or-simpleTypes" shape="rect"></a><b>Schema Representation Constraint: memberTypes attribute or simpleType children</b><br clear="none" /><div class="constraint"><div class="p">
Either the <code>memberTypes</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> of the <a href="#element-union" class="eltref" shape="rect">&lt;union&gt;</a>
element must be non-empty or
there must be at least one <code>simpleType</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[child]</a>.
</div></div></div></div><div class="div3">
<h4><a name="defn-validation-rules" id="defn-validation-rules" shape="rect"></a>4.1.4 Simple Type Definition Validation Rules</h4><div class="constraintnote"><a id="cvc-facet-valid" name="cvc-facet-valid" shape="rect"></a><b>Validation Rule: Facet Valid</b><br clear="none" /><div class="constraint"><div class="p">
A value in a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> is facet-valid with
respect to a <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facet<span class="arrow">&#183;</span></a> component 
if and only if:
</div><div class="constraintlist"><div class="clnumber">1 <span class="p">
the value is facet-valid with respect to the particular
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facet<span class="arrow">&#183;</span></a> as specified below.
</span></div>
</div></div></div><div class="constraintnote"><a id="cvc-datatype-valid" name="cvc-datatype-valid" shape="rect"></a><b>Validation Rule: Datatype Valid</b><br clear="none" /><div class="constraint"><div class="p">
A <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> is datatype-valid with respect to a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
if and only if it is a member of the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of the
corresponding datatype.</div></div></div><div class="note"><div class="p"><b>Note:</b> 
Since every value in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> is denoted by some
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a>, and every <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> in the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> maps to
some value, the requirement that the <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> be in the
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> entails the requirement that the value it
maps to should fulfill all of the constraints imposed by the
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of the datatype.  If
the datatype is a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>, the Datatype Valid constraint also
entails that each whitespace-delimited token in the list
be datatype-valid against the <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> of the list.
If the datatype is a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, the Datatype Valid constraint
entails that the <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> be datatype-valid against at
least one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a>.</div><div class="p">That is, the constraints on <a href="#std" class="compref" shape="rect">Simple Type Definition</a>s and on
datatype <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> defined in this specification have as a
consequence that a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> <var>L</var> is datatype-valid with
respect to a <a href="#std" class="compref" shape="rect">Simple Type Definition</a> <var>T</var> if and only if
either <var>T</var> corresponds to a <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> datatype or
<b>all</b> of the following are true:<div class="constraintlist"><div class="clnumber">1<a id="dv_pattern" name="dv_pattern" shape="rect"> </a><span class="p">If there is a <a href="#f-p" class="compref" shape="rect">pattern</a> in <a href="#std-facets" class="propref" shape="rect">{facets}</a>, then
<var>L</var> is <a href="#cvc-pattern-valid" shape="rect">pattern valid (&#167;4.3.4.4)</a> with respect to the
<a href="#f-p" class="compref" shape="rect">pattern</a>.
If there are other <a href="#dt-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical<span class="arrow">&#183;</span></a> facets
in <a href="#std-facets" class="propref" shape="rect">{facets}</a>, then <var>L</var> is facet-valid with respect
to them.</span></div>
<div class="clnumber">2<a id="dv_lv" name="dv_lv" shape="rect"> </a><!--* no span class='p' possible here *-->The appropriate case among the following is true:
<div class="constraintlist"><div class="clnumber">2.1<a id="dv_atomic" name="dv_atomic" shape="rect"> </a><span class="p">If the <a href="#std-variety" class="propref" shape="rect">{variety}</a> of <var>T</var> is <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>,
then <var>L</var> is in the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of the  
<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> of <var>T</var>, as defined in the
appropriate documentation.  
Let <var>V</var> be the
member of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the 
<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> of <var>T</var> mapped to by <var>L</var>,
as defined in the appropriate documentation.</span><div class="note"><div class="p"><b>Note:</b> For <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitives<span class="arrow">&#183;</span></a>, the 
"appropriate documentation" is the relevant
section of this specification. For <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitives<span class="arrow">&#183;</span></a>,
it is the normative specification of the <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>, which
will typically be included in, or referred to from, the
implementation's documentation.</div></div></div>
<div class="clnumber">2.2<a id="dv_list" name="dv_list" shape="rect"> </a><span class="p">If the <a href="#std-variety" class="propref" shape="rect">{variety}</a> of <var>T</var> is <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>, then
each space-delimited substring of <var>L</var> is Datatype Valid with
respect to the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of <var>T</var>.  Let
<var>V</var> be the sequence consisting of the values identified by
Datatype Valid for each of those substrings, in order.</span></div>
<div class="clnumber">2.3<a id="dv_union" name="dv_union" shape="rect"> </a><span class="p">If the <a href="#std-variety" class="propref" shape="rect">{variety}</a> of <var>T</var> is <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>,
then <var>L</var> is Datatype Valid with respect to at least one
member of the <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>
of <var>T</var>. Let <var>B</var> be the <a href="#dt-active-basic-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active basic member<span class="arrow">&#183;</span></a> of <var>T</var> for <var>L</var>.  Let
<var>V</var> be the value identified by Datatype Valid for
<var>L</var> with respect to <var>B</var>.</span></div>
</div>
</div>
<div class="clnumber">3<a id="dv_vfacets" name="dv_vfacets" shape="rect"> </a><span class="p"><var>V</var>, as determined by the
appropriate sub-clause of clause <a href="#dv_lv" shape="rect">2</a> above,

is <a href="#cvc-facet-valid" shape="rect">Facet Valid (&#167;4.1.4)</a> with respect to each member of the
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <var>T</var> which is a
<a href="#dt-value-based" class="termref" shape="rect"><span class="arrow">&#183;</span>value-based<span class="arrow">&#183;</span></a> (and not a <a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a>
or <a href="#dt-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical<span class="arrow">&#183;</span></a>)

facet.</span></div>
</div>
</div><div class="p">Note that <a href="#f-w" class="compref" shape="rect">whiteSpace</a> facets and
other <a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> facets
do not take part in checking Datatype
Valid.  In cases where this specification is used in conjunction with
schema-validation of XML documents, 
such facets are used to
normalize infoset values <em>before</em> the normalized results
are checked for datatype validity.  In the case of unions the
<a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> facets to use are those 
associated with <var>B</var> in
clause <a href="#dv_union" shape="rect">2.3</a> above.
When more than one <a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> facet 
applies, the <a href="#f-w" class="compref" shape="rect">whiteSpace</a> facet is applied first; the order in 
which <a href="#key-impl-def" 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-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</div></div></div><div class="div3">
<h4><a name="defn-coss" id="defn-coss" shape="rect"></a>4.1.5 Constraints on Simple Type Definition Schema Components</h4><div class="constraintnote"><a id="cos-applicable-facets" name="cos-applicable-facets" shape="rect"></a><b>Schema Component Constraint: Applicable Facets</b><br clear="none" /><div class="constraint"><div class="p">
The <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> which are allowed to be members of <a href="#std-facets" class="propref" shape="rect">{facets}</a>
depend on
the <a href="#std-variety" class="propref" shape="rect">{variety}</a> and <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> of the type, as
follows:
</div><p>
   If <a href="#std-variety" shape="rect">{variety}</a> is <b><i>absent</i></b>,
   then no facets are applicable.  
   
   (This is true for
   <a href="#anySimpleType-def" shape="rect">anySimpleType</a>.)
  </p>
<p>
   If <a href="#std-variety" shape="rect">{variety}</a> is <a href="#dt-list" shape="rect">list</a>,
   then the applicable facets are
   <a href="#dc-assertions" shape="rect">assertions</a>, 
    <a href="#dt-length" shape="rect">length</a>,
     <a href="#dt-minLength" shape="rect">minLength</a>,
     <a href="#dt-maxLength" shape="rect">maxLength</a>,
     <a href="#dt-pattern" shape="rect">pattern</a>,
     <a href="#dt-enumeration" shape="rect">enumeration</a>, and
     <a href="#dt-whiteSpace" shape="rect">whiteSpace</a>.
  </p>
<p>
   If <a href="#std-variety" shape="rect">{variety}</a> is
   <a href="#dt-union" shape="rect">union</a>, then
   the applicable facets are
   <a href="#dt-pattern" shape="rect">pattern</a>,
       <a href="#dt-enumeration" shape="rect">enumeration</a>, and 
       <a href="#dc-assertions" shape="rect">assertions</a>.
    </p>
<p>
   If <a href="#std-variety" shape="rect">{variety}</a> is <a href="#dt-atomic" shape="rect">atomic</a>,
   and <a href="#std-primitive_type_definition" shape="rect">{primitive type definition}</a>
   is <b><i>absent</i></b>
   then no facets are applicable.
   (This is true for
   <a href="#anyAtomicType-def" shape="rect">anyAtomicType</a>.)
  </p><p>
   In all other cases (<a href="#std-variety" shape="rect">{variety}</a> is
   <a href="#dt-atomic" shape="rect">atomic</a> and 
   <a href="#std-primitive_type_definition" shape="rect">{primitive type definition}</a>
   is not <b><i>absent</i></b>), then the applicable facets are
   shown in the table below.
  </p><table border="1" bgcolor="#bedce6">
<tr><th rowspan="1" colspan="1"><a href="#std-primitive_type_definition" shape="rect">{primitive type definition}</a></th><th rowspan="1" colspan="1">applicable <a href="#std-facets" shape="rect">{facets}</a></th></tr>
<tr><td rowspan="1" colspan="1"><a href="#string" shape="rect">string</a></td><td rowspan="1" colspan="1"><a href="#dc-length" shape="rect">length</a>, <a href="#dc-minLength" shape="rect">minLength</a>, <a href="#dc-maxLength" shape="rect">maxLength</a>, <a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#boolean" shape="rect">boolean</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#float" shape="rect">float</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#double" shape="rect">double</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#decimal" shape="rect">decimal</a></td><td rowspan="1" colspan="1"><a href="#dc-totalDigits" shape="rect">totalDigits</a>, <a href="#dc-fractionDigits" shape="rect">fractionDigits</a>, <a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#duration" shape="rect">duration</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#dateTime" shape="rect">dateTime</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a>, <a href="#dc-explicitTimezone" shape="rect">explicitTimezone</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#time" shape="rect">time</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a>, <a href="#dc-explicitTimezone" shape="rect">explicitTimezone</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#date" shape="rect">date</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a>, <a href="#dc-explicitTimezone" shape="rect">explicitTimezone</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#gYearMonth" shape="rect">gYearMonth</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a>, <a href="#dc-explicitTimezone" shape="rect">explicitTimezone</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#gYear" shape="rect">gYear</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a>, <a href="#dc-explicitTimezone" shape="rect">explicitTimezone</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#gMonthDay" shape="rect">gMonthDay</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a>, <a href="#dc-explicitTimezone" shape="rect">explicitTimezone</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#gDay" shape="rect">gDay</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a>, <a href="#dc-explicitTimezone" shape="rect">explicitTimezone</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#gMonth" shape="rect">gMonth</a></td><td rowspan="1" colspan="1"><a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-maxInclusive" shape="rect">maxInclusive</a>, <a href="#dc-maxExclusive" shape="rect">maxExclusive</a>, <a href="#dc-minInclusive" shape="rect">minInclusive</a>, <a href="#dc-minExclusive" shape="rect">minExclusive</a>, <a href="#dc-assertions" shape="rect">assertions</a>, <a href="#dc-explicitTimezone" shape="rect">explicitTimezone</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#hexBinary" shape="rect">hexBinary</a></td><td rowspan="1" colspan="1"><a href="#dc-length" shape="rect">length</a>, <a href="#dc-minLength" shape="rect">minLength</a>, <a href="#dc-maxLength" shape="rect">maxLength</a>, <a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#base64Binary" shape="rect">base64Binary</a></td><td rowspan="1" colspan="1"><a href="#dc-length" shape="rect">length</a>, <a href="#dc-minLength" shape="rect">minLength</a>, <a href="#dc-maxLength" shape="rect">maxLength</a>, <a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#anyURI" shape="rect">anyURI</a></td><td rowspan="1" colspan="1"><a href="#dc-length" shape="rect">length</a>, <a href="#dc-minLength" shape="rect">minLength</a>, <a href="#dc-maxLength" shape="rect">maxLength</a>, <a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#QName" shape="rect">QName</a></td><td rowspan="1" colspan="1"><a href="#dc-length" shape="rect">length</a>, <a href="#dc-minLength" shape="rect">minLength</a>, <a href="#dc-maxLength" shape="rect">maxLength</a>, <a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
<tr><td rowspan="1" colspan="1"><a href="#NOTATION" shape="rect">NOTATION</a></td><td rowspan="1" colspan="1"><a href="#dc-length" shape="rect">length</a>, <a href="#dc-minLength" shape="rect">minLength</a>, <a href="#dc-maxLength" shape="rect">maxLength</a>, <a href="#dc-pattern" shape="rect">pattern</a>, <a href="#dc-enumeration" shape="rect">enumeration</a>, <a href="#dc-whiteSpace" shape="rect">whiteSpace</a>, <a href="#dc-assertions" shape="rect">assertions</a></td></tr>
</table><div class="note"><div class="p"><b>Note:</b> For any <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> primitive types, 
it is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> which constraining facets are
applicable to them.
</div><div class="p">Similarly, for any <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> constraining facets,
it is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> which <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitives<span class="arrow">&#183;</span></a> they
apply to.
</div></div></div></div></div><div class="div3">
<h4><a name="builtin-stds" id="builtin-stds" shape="rect"></a>4.1.6 Built-in Simple Type Definitions</h4><p>The <a href="#std" class="compref" shape="rect">Simple Type Definition</a> of <a href="#anySimpleType" shape="rect">anySimpleType</a> is
present in every schema.&#160; It has the following properties:</p><div class="scInstance"><div class="scHead"><a id="anySimpleType-def" name="anySimpleType-def" shape="rect">Simple type definition of <code>anySimpleType</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>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"><b><i>absent</i></b></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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#any-type-itself" shape="rect">anyType</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>absent</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"><b><i>absent</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"><b><i>absent</i></b></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"><b><i>absent</i></b></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 id="ast_radix_omnium">The 
definition of <a href="#anySimpleType" shape="rect">anySimpleType</a>
is the root of the Simple Type Definition
hierarchy;
as such it 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 the 
definition of <b><i>anyType</i></b>, 
which is
<em>its</em> <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</p><p>The <a href="#std" class="compref" shape="rect">Simple Type Definition</a> of <a href="#anyAtomicType" shape="rect">anyAtomicType</a> is
present in every schema.&#160; It has the following properties:</p><div class="scInstance"><div class="scHead"><a id="anyAtomicType-def" name="anyAtomicType-def" shape="rect">Simple type definition of <code>anyAtomicType</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>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"><b><i>absent</i></b></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="#anySimpleType" shape="rect">anySimpleType</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"><b><i>absent</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"><b><i>absent</i></b></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"><b><i>absent</i></b></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>Simple type definitions for all the built-in primitive datatypes,
namely <a href="#string" shape="rect">string</a>, 
<a href="#boolean" shape="rect">boolean</a>, 
<a href="#float" shape="rect">float</a>, 
<a href="#double" shape="rect">double</a>, 
<a href="#decimal" shape="rect">decimal</a>, 

<a href="#dateTime" shape="rect">dateTime</a>, 
<a href="#duration" shape="rect">duration</a>, 
<a href="#time" shape="rect">time</a>, 
<a href="#date" shape="rect">date</a>, 
<a href="#gMonth" shape="rect">gMonth</a>, 
<a href="#gMonthDay" shape="rect">gMonthDay</a>, 
<a href="#gDay" shape="rect">gDay</a>, 
<a href="#gYear" shape="rect">gYear</a>, 
<a href="#gYearMonth" shape="rect">gYearMonth</a>, 
<a href="#hexBinary" shape="rect">hexBinary</a>, 
<a href="#base64Binary" shape="rect">base64Binary</a>, 
<a href="#anyURI" shape="rect">anyURI</a> 
are present by definition
in every schema.&#160; All have a very similar structure, with only the
<a href="#std-name" class="propref" shape="rect">{name}</a>, the <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> (which is self-referential), 
the <a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a>, 
and in one case the <a href="#std-facets" class="propref" shape="rect">{facets}</a> varying from one to the 
next:</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="#anyAtomicType-def" shape="rect">anyAtomicType Definition</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 <a href="#std" class="compref" shape="rect">Simple Type Definition</a> 
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="#f-w" class="compref" shape="rect">whiteSpace</a> facet with 
<a href="#f-w-value" class="propref" shape="rect">{value}</a> = <b><i>collapse</i></b> and <a href="#f-w-fixed" class="propref" shape="rect">{fixed}</a> = <b><i>true</i></b> in all cases except
<a href="#string" shape="rect">string</a>, which has <a href="#f-w-value" class="propref" shape="rect">{value}</a> =
<b><i>preserve</i></b> and <a href="#f-w-fixed" class="propref" 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">[as appropriate]
</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><b><i>absent</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"><b><i>absent</i></b></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"><b><i>absent</i></b></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="block">
<a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>Implementation-defined<span class="arrow">&#183;</span></a> <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitives<span class="arrow">&#183;</span></a> <span class="rfc2119">must</span> have a <a href="#std" class="compref" shape="rect">Simple Type Definition</a> with
the values shown above, with the following exceptions.
<ol class="enumar"><li><div class="p">The <a href="#std-facets" class="propref" shape="rect">{facets}</a> property
<span class="rfc2119">must</span> contain a <a href="#f-w" class="compref" shape="rect">whiteSpace</a> facet, the value of which is 
<a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.  It <span class="rfc2119">may</span> contain other facets,
whether defined in this specification or <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">The value of <a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a>
is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">The value of <a href="#std-annotations" class="propref" shape="rect">{annotations}</a>
<span class="rfc2119">may</span> be empty, but need not be.</div></li></ol>
</div><div class="note"><div class="p"><b>Note:</b> It is a consequence of the rule just given that each
<a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> will have an <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>
by which it can be referred to.</div></div><div class="note"><div class="p"><b>Note:</b> 
<a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>Implementation-defined<span class="arrow">&#183;</span></a> datatypes will normally have a value
other than '<code>http://www.w3.org/2001/XMLSchema</code>' for the 
<a href="#std-target_namespace" class="propref" shape="rect">{target namespace}</a>
property.  That namespace is controlled by the W3C and
datatypes will be added to it only by W3C or its designees.
</div></div><p>Similarly, <a href="#std" class="compref" shape="rect">Simple Type Definition</a>s for all the built-in <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>
datatypes are present by definition in every schema, with properties
as specified in <a href="#ordinary-built-ins" shape="rect">Other Built-in Datatypes (&#167;3.4)</a> and as represented
in XML in <a href="#drvd.nxsd" shape="rect">Illustrative XML representations for the built-in ordinary type definitions (&#167;C.2)</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="#ordinary-built-ins" shape="rect">Other Built-in Datatypes (&#167;3.4)</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="#ordinary-built-ins" shape="rect">Other Built-in Datatypes (&#167;3.4)</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 <b><i>absent</i></b>]</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="#ordinary-built-ins" shape="rect">Other Built-in Datatypes (&#167;3.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">[as specified in the appropriate
sub-section of <a href="#ordinary-built-ins" shape="rect">Other Built-in Datatypes (&#167;3.4)</a>]</div></div><div class="pvpair"><div class="pvProp"><a href="#std-context" class="propref" shape="rect">{context}</a></div><div class="pvVal"><b><i>absent</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">if <a href="#std-variety" class="propref" shape="rect">{variety}</a> is
<b><i>atomic</i></b>, then <b><i>absent</i></b>, otherwise as specified in the appropriate
sub-section of <a href="#ordinary-built-ins" shape="rect">Other Built-in Datatypes (&#167;3.4)</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"><b><i>absent</i></b></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="#drvd.nxsd" shape="rect">Illustrative XML representations for the built-in ordinary type definitions (&#167;C.2)</a></div></div></div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#rf-defn" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#rf-facets" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="rf-fund-facets" id="rf-fund-facets" shape="rect"></a>4.2 Fundamental Facets</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.1 <a href="#rf-ordered" shape="rect">ordered</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.1.1 <a href="#dc-ordered" shape="rect">The ordered Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.2 <a href="#rf-bounded" shape="rect">bounded</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.2.1 <a href="#dc-bounded" shape="rect">The bounded Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.3 <a href="#rf-cardinality" shape="rect">cardinality</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.3.1 <a href="#dc-cardinality" shape="rect">The cardinality Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.4 <a href="#rf-numeric" shape="rect">numeric</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.2.4.1 <a href="#dc-numeric" shape="rect">The numeric Schema Component</a><br clear="none" />
</div><p>




<a name="ff" id="ff" shape="rect"></a>
<span class="termdef"><a name="dt-fundamental-facet" id="dt-fundamental-facet" title="" shape="rect">[Definition:]&#160;&#160;</a>
Each <b>fundamental facet</b> is a
schema component that provides a limited piece of information about
some aspect of each datatype.</span>&#160; All <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental
facet<span class="arrow">&#183;</span></a> components are defined in this section.&#160;

For example, <a href="#ff-c" class="compref" shape="rect">cardinality</a> is a 
<a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facet<span class="arrow">&#183;</span></a>.&#160; 
Most <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a> 
are given a value
fixed with each primitive datatype's definition, and this value is not changed by
subsequent <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivations<span class="arrow">&#183;</span></a> (even when
it would perhaps be reasonable to expect an application to give a more accurate value based
on the constraining facets used to define the <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a>).&#160; The
<a href="#ff-c" class="compref" shape="rect">cardinality</a>  and <a href="#ff-b" class="compref" shape="rect">bounded</a> facets
are exceptions to this rule; their values may change as a result of certain
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivations<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> Schema components are identified by kind.&#160; "Fundamental" 
is not a kind of component.&#160; Each kind of <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facet<span class="arrow">&#183;</span></a>
("ordered", 
"bounded", etc.) is 
a separate kind of schema component.</div></div><p></p><p>A <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facet<span class="arrow">&#183;</span></a> can occur only
in the <a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a> of a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>, and this is the
only place where <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facet<span class="arrow">&#183;</span></a> components
occur.&#160; &#160; Each kind of <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facet<span class="arrow">&#183;</span></a>
component occurs (once) in each <a href="#std" class="compref" shape="rect">Simple Type Definition</a>'s <a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a> set.</p><div class="note"><div class="p"><b>Note:</b> The value of any <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facet<span class="arrow">&#183;</span></a> component can always
be calculated from other properties of its <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner<span class="arrow">&#183;</span></a>.&#160; 
Fundamental facets are not required for schema processing,
but some applications use them.</div></div><div class="div3">
<h4><a name="rf-ordered" id="rf-ordered" shape="rect"></a>4.2.1 ordered</h4><p>For some datatypes,
this document specifies an order relation for their value spaces (see
<a href="#order" shape="rect">Order (&#167;2.2.3)</a>); the <em>ordered</em> facet reflects
this.  It takes the values <b><i>total</i></b>, <b><i>partial</i></b>,
and <b><i>false</i></b>, with the meanings described below.
For the <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes, 
the value of the <em>ordered</em> facet is
specified in <a href="#app-fundamental-facets" shape="rect">Fundamental Facets (&#167;F.1)</a>.  
For <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatypes, the value is inherited without change
from the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
For a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>, the value is always <b><i>false</i></b>;
for a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, the value is computed as described below.
</p><p>A <b><i>false</i></b> value means no order is prescribed; 
a <b><i>total</i></b> value
assures that the prescribed order is a total
order; a <b><i>partial</i></b> value means 

that the prescribed order is a partial
order, but not (for the primitive type in question) a total order.  

 
</p><div class="note"><div class="p"><b>Note:</b> The value <b><i>false</i></b> in the <em>ordered</em> facet does not
mean no partial or total ordering <em>exists</em> for the value
space, only that none is specified by this document for use in
checking upper and lower bounds.  Mathematically, any set of values
possesses at least one
trivial partial ordering, in which every value
pair that is not equal is incomparable.</div></div><div class="note"><div class="p"><b>Note:</b> When new datatypes are derived from datatypes with partial orders,
the constraints imposed can sometimes result in a value space
for which the ordering is total, or trivial.  The value of the 
<a href="#ff-o" class="compref" shape="rect">ordered</a> facet is not, however, changed to reflect this.
The value <b><i>partial</i></b> should therefore be interpreted with
appropriate caution.</div></div><p>
<span class="termdef"><a name="dt-ordered" id="dt-ordered" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, and hence a datatype, is said to be
<b>ordered</b> if some
members of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> are  
drawn from a <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> 
datatype for which 
the table in <a href="#app-fundamental-facets" shape="rect">Fundamental Facets (&#167;F.1)</a> specifies
the value <b><i>total</i></b> or <b><i>partial</i></b> for 
the <em>ordered</em> facet.</span></p><div class="note"><div class="p"><b>Note:</b> Some of the "real-world" datatypes which are the basis for those defined herein
are ordered in some applications, even though no order is prescribed for schema-processing
purposes.&#160; For example, <a href="#boolean" shape="rect">boolean</a> is sometimes ordered, and <a href="#string" shape="rect">string</a>
and <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatypes <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> from
ordered <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatypes are sometimes given "lexical"
orderings.&#160; They are <em>not</em> ordered for schema-processing purposes.</div></div><div class="div4">
<h5><a name="dc-ordered" id="dc-ordered" shape="rect"></a>4.2.1.1 The ordered Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ff-o" id="ff-o" shape="rect">ordered</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ff-o-value" shape="rect" id="ff-o-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
One of {<span class="enumval">false</span>, <span class="enumval">partial</span>, <span class="enumval">total</span>}.  Required.</div>
</div>
</div></div>
</div>
</div>
<div class="block"><a href="#ff-o-value" class="propref" shape="rect">{value}</a> depends on 
the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> 
<a href="#std-variety" class="propref" shape="rect">{variety}</a>, <a href="#std-facets" class="propref" shape="rect">{facets}</a>, 
and <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>.

The appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1<a id="x04042a" name="x04042a" shape="rect"> </a><b>If </b>the 
<a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a>
<a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>atomic</i></b>, <b>then </b>
 the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">1.1<a id="x040428b" name="x040428b" shape="rect"> </a><b>If </b>the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner<span class="arrow">&#183;</span></a> is <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>, <b>then </b><a href="#ff-o-value" class="propref" shape="rect">{value}</a> is as specified in the
table in <a href="#app-fundamental-facets" shape="rect">Fundamental Facets (&#167;F.1)</a>.</div><div class="clnumber">1.2 <b>otherwise </b><a href="#ff-o-value" class="propref" shape="rect">{value}</a> is the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a>
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>'s <a href="#ff-o" class="compref" shape="rect">ordered</a> <a href="#ff-o-value" class="propref" shape="rect">{value}</a>.</div></div>
</div><div class="clnumber">2 <b>If </b>the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a>
<a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b>, <b>then </b><a href="#ff-o-value" class="propref" shape="rect">{value}</a> is <b><i>false</i></b>.</div><div class="clnumber">3 <b>otherwise </b>the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>union</i></b>;
the appropriate <b>case</b> among the following <span class="rfc2119">must</span> be true:<div class="constraintlist"><div class="clnumber">3.1<a id="x040428" name="x040428" shape="rect"> </a><b>If </b>every 
<a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic member<span class="arrow">&#183;</span></a> of the 
<a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner<span class="arrow">&#183;</span></a>
has 
<a href="#std-variety" class="propref" shape="rect">{variety}</a> atomic and has the same
<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a>, <b>then </b><a href="#ff-o-value" class="propref" shape="rect">{value}</a> is the same as the
<a href="#ff-o" class="compref" shape="rect">ordered</a> component's <a href="#ff-o-value" class="propref" shape="rect">{value}</a> in that 
primitive 
type definition's 
<a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a>.</div><div class="clnumber">3.2 <b>If </b>each member of the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> 
<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> has an <a href="#ff-o" class="compref" shape="rect">ordered</a>
component in its 
<a href="#std-fundamental_facets" class="propref" shape="rect">{fundamental facets}</a> whose <a href="#ff-o-value" class="propref" shape="rect">{value}</a> is <b><i>false</i></b>, <b>then </b><a href="#ff-o-value" class="propref" shape="rect">{value}</a> is
<b><i>false</i></b>.</div><div class="clnumber">3.3 <b>otherwise </b><a href="#ff-o-value" class="propref" shape="rect">{value}</a> is
<b><i>partial</i></b>.</div></div>
</div></div>

</div></div></div><div class="div3">
<h4><a name="rf-bounded" id="rf-bounded" shape="rect"></a>4.2.2 bounded</h4><p>Some ordered datatypes have the property that
there is one value greater than or equal to every other value, and
another that is
less than or equal to every other value.&#160; (In the case of 
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>
datatypes, these two values 
 are
not necessarily in the value space of the derived datatype,
but they must be in the value
space of the primitive datatype from which they have been derived.)
The <em>bounded</em> facet value is <a href="#boolean" shape="rect">boolean</a> and is
generally <b><i>true</i></b> for such <em>bounded</em> datatypes.&#160;
However, it will remain <b><i>false</i></b> when the mechanism for imposing
such a bound is difficult to detect, as, for example, when the
boundedness occurs because of derivation using a <a href="#f-p" class="compref" shape="rect">pattern</a>
component.</p><div class="div4">
<h5><a name="dc-bounded" id="dc-bounded" shape="rect"></a>4.2.2.1 The bounded Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ff-b" id="ff-b" shape="rect">bounded</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ff-b-value" shape="rect" id="ff-b-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p><a href="#ff-b-value" class="propref" shape="rect">{value}</a> depends on 
the 
<a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a>
<a href="#std-variety" class="propref" shape="rect">{variety}</a>,
<a href="#std-facets" class="propref" shape="rect">{facets}</a> and 
<a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>.</p><p>When the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner<span class="arrow">&#183;</span></a>
is <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>, 
<a href="#ff-b-value" class="propref" shape="rect">{value}</a> is as specified in the
table in <a href="#app-fundamental-facets" shape="rect">Fundamental Facets (&#167;F.1)</a>.&#160; Otherwise, when the
<a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a>
<a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>atomic</i></b>,
if one of <a href="#f-mii" class="compref" shape="rect">minInclusive</a> or <a href="#f-mie" class="compref" shape="rect">minExclusive</a>
and one of <a href="#f-mai" class="compref" shape="rect">maxInclusive</a> or <a href="#f-mae" class="compref" shape="rect">maxExclusive</a>
are members of
the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-facets" class="propref" shape="rect">{facets}</a> set, then
<a href="#ff-b-value" class="propref" shape="rect">{value}</a> is <b><i>true</i></b>;
otherwise
<a href="#ff-b-value" class="propref" shape="rect">{value}</a> is <b><i>false</i></b>.</p><p>When the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a>
<a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b>,


<a href="#ff-b-value" class="propref" shape="rect">{value}</a> is <b><i>false</i></b>.</p><p>
When the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>union</i></b>, if
<a href="#ff-b-value" class="propref" shape="rect">{value}</a> is <b><i>true</i></b> for every
member of the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> set and all of the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic members<span class="arrow">&#183;</span></a> have the same 
<a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a>, then <a href="#ff-b-value" class="propref" shape="rect">{value}</a> is <b><i>true</i></b>; otherwise
<a href="#ff-b-value" class="propref" shape="rect">{value}</a> is <b><i>false</i></b>.
</p></div></div><div class="div3">
<h4><a name="rf-cardinality" id="rf-cardinality" shape="rect"></a>4.2.3 cardinality</h4><p>Every value space has a specific number of members.&#160; This number can be characterized as 
<em>finite</em> or <em>infinite</em>.&#160; (Currently there are no datatypes with infinite
value spaces larger than <em>countable</em>.)&#160; The <em>cardinality</em> facet value is
either <b><i>finite</i></b> or <b><i>countably infinite</i></b> and is generally <b><i>finite</i></b> for datatypes with
finite value spaces.&#160; However, it will remain <b><i>countably infinite</i></b> when the mechanism for
causing finiteness is difficult to detect, as, for example, when finiteness occurs because of a
derivation using a <a href="#f-p" class="compref" shape="rect">pattern</a> component.</p><div class="div4">
<h5><a name="dc-cardinality" id="dc-cardinality" shape="rect"></a>4.2.3.1 The cardinality Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ff-c" id="ff-c" shape="rect">cardinality</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ff-c-value" shape="rect" id="ff-c-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
One of {<span class="enumval">finite</span>, <span class="enumval">countably infinite</span>}.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
<a href="#ff-c-value" class="propref" shape="rect">{value}</a> depends on the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-variety" class="propref" shape="rect">{variety}</a>,
<a href="#std-facets" class="propref" shape="rect">{facets}</a>, and <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a>.</p><div class="block">When the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner<span class="arrow">&#183;</span></a> is
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>, <a href="#ff-c-value" class="propref" shape="rect">{value}</a> is as specified in the
table in <a href="#app-fundamental-facets" shape="rect">Fundamental Facets (&#167;F.1)</a>.&#160; Otherwise, when
the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>atomic</i></b>,
<a href="#ff-c-value" class="propref" shape="rect">{value}</a>
is <b><i>countably infinite</i></b> unless <b>any</b> of the following
conditions are true, in which case <a href="#ff-c-value" class="propref" shape="rect">{value}</a> is
<b><i>finite</i></b>:

<ol class="enumar"><li><div class="p">the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>'s
<a href="#ff-c" class="compref" shape="rect">cardinality</a> <a href="#ff-c-value" class="propref" shape="rect">{value}</a> is <b><i>finite</i></b>,</div></li><li><div class="p">at least one of <a href="#f-l" class="compref" shape="rect">length</a>, <a href="#f-mal" class="compref" shape="rect">maxLength</a>,
or <a href="#f-td" class="compref" shape="rect">totalDigits</a> is a member of the
<a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-facets" class="propref" shape="rect">{facets}</a> set,</div></li><li><div class="p"><b>all</b> of the following are true:</div><ol class="enumla"><li><div class="p">one of <a href="#f-mii" class="compref" shape="rect">minInclusive</a> or <a href="#f-mie" class="compref" shape="rect">minExclusive</a>
is a member of the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-facets" class="propref" shape="rect">{facets}</a> set</div></li><li><div class="p">one of <a href="#f-mai" class="compref" shape="rect">maxInclusive</a> or <a href="#f-mae" class="compref" shape="rect">maxExclusive</a>
is a member of the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-facets" class="propref" shape="rect">{facets}</a> set</div></li><li><div class="p"><b>either</b> of the following are true:</div><ol class="enumlr"><li><div class="p"><a href="#f-fd" class="compref" shape="rect">fractionDigits</a> is a member of the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-facets" class="propref" shape="rect">{facets}</a> set</div></li><li><div class="p"><a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is one of <a href="#date" shape="rect">date</a>,
  <a href="#gYearMonth" shape="rect">gYearMonth</a>, <a href="#gYear" shape="rect">gYear</a>, <a href="#gMonthDay" shape="rect">gMonthDay</a>,
  <a href="#gDay" shape="rect">gDay</a> or <a href="#gMonth" shape="rect">gMonth</a></div></li></ol></li></ol></li></ol> 
 </div><p>
When the 
<a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a>
<a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b>,
if <a href="#f-l" class="compref" shape="rect">length</a> or both <a href="#f-mil" class="compref" shape="rect">minLength</a> and <a href="#f-mal" class="compref" shape="rect">maxLength</a>
are members of the
<a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-facets" class="propref" shape="rect">{facets}</a> set
and the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>'s
<a href="#ff-c" class="compref" shape="rect">cardinality</a> <a href="#ff-c-value" class="propref" shape="rect">{value}</a> is <b><i>finite</i></b>
then <a href="#ff-c-value" class="propref" shape="rect">{value}</a> is <b><i>finite</i></b>;
otherwise
<a href="#ff-c-value" class="propref" shape="rect">{value}</a> is <b><i>countably infinite</i></b>.
</p><p>
When the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>union</i></b>,
if <a href="#ff-c" class="compref" shape="rect">cardinality</a>'s <a href="#ff-c-value" class="propref" shape="rect">{value}</a> is <em>finite</em>
for every member of the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> set then
<a href="#ff-c-value" class="propref" shape="rect">{value}</a> is <b><i>finite</i></b>,
otherwise <a href="#ff-c-value" class="propref" shape="rect">{value}</a>
is <b><i>countably infinite</i></b>.
</p></div></div><div class="div3">
<h4><a name="rf-numeric" id="rf-numeric" shape="rect"></a>4.2.4 numeric</h4><p>Some value spaces are made up of things that
are 
conceptually 
<em>numeric</em>, others are
not.&#160;The <em>numeric</em> facet value indicates which are
considered numeric.


  

</p><div class="div4">
<h5><a name="dc-numeric" id="dc-numeric" shape="rect"></a>4.2.4.1 The numeric Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="ff-n" id="ff-n" shape="rect">numeric</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="ff-n-value" shape="rect" id="ff-n-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
<a href="#ff-n-value" class="propref" shape="rect">{value}</a> depends on the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <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>.
</p><p>
When the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner<span class="arrow">&#183;</span></a> is <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>, <a href="#ff-n-value" class="propref" shape="rect">{value}</a> is as specified in the
table in <a href="#app-fundamental-facets" shape="rect">Fundamental Facets (&#167;F.1)</a>.&#160; Otherwise, when the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>atomic</i></b>,
<a href="#ff-n-value" class="propref" shape="rect">{value}</a> is inherited from
the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>'s <a href="#ff-n" class="compref" shape="rect">numeric</a><a href="#ff-n-value" class="propref" shape="rect">{value}</a>.
</p><p>
When the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>list</i></b>,
<a href="#ff-n-value" class="propref" shape="rect">{value}</a> is <b><i>false</i></b>.
</p><p>
When the 
<a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> 
<a href="#std-variety" class="propref" shape="rect">{variety}</a> is <b><i>union</i></b>,
if <a href="#ff-n" class="compref" shape="rect">numeric</a>'s <a href="#ff-n-value" class="propref" shape="rect">{value}</a> is <b><i>true</i></b>
for every member of the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner's<span class="arrow">&#183;</span></a> <a href="#std-member_type_definitions" class="propref" shape="rect">{member type definitions}</a> set then
<a href="#ff-n-value" class="propref" shape="rect">{value}</a> is <b><i>true</i></b>,
otherwise <a href="#ff-n-value" class="propref" shape="rect">{value}</a> is <b><i>false</i></b>.
</p></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#rf-fund-facets" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="rf-facets" id="rf-facets" shape="rect"></a>4.3 Constraining Facets</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.1 <a href="#rf-length" shape="rect">length</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.1.1 <a href="#dc-length" shape="rect">The length Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.1.2 <a href="#xr-length" shape="rect">XML Representation of length Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.1.3 <a href="#length-validation-rules" shape="rect">length Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.1.4 <a href="#length-coss" shape="rect">Constraints on length Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.2 <a href="#rf-minLength" shape="rect">minLength</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.2.1 <a href="#dc-minLength" shape="rect">The minLength Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.2.2 <a href="#xr-minLength" shape="rect">XML Representation of minLength Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.2.3 <a href="#minLength-validation-rules" shape="rect">minLength Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.2.4 <a href="#minLength-coss" shape="rect">Constraints on minLength Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.3 <a href="#rf-maxLength" shape="rect">maxLength</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.3.1 <a href="#dc-maxLength" shape="rect">The maxLength Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.3.2 <a href="#xr-maxLength" shape="rect">XML Representation of maxLength Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.3.3 <a href="#maxLength-validation-rules" shape="rect">maxLength Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.3.4 <a href="#maxLength-coss" shape="rect">Constraints on maxLength Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.4 <a href="#rf-pattern" shape="rect">pattern</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.4.1 <a href="#dc-pattern" shape="rect">The pattern Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.4.2 <a href="#xr-pattern" shape="rect">XML Representation of pattern Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.4.3 <a href="#pattern-rep-constr" shape="rect">Constraints on XML Representation of pattern</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.4.4 <a href="#pattern-validation-rules" shape="rect">pattern Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.4.5 <a href="#pattern-constraints" shape="rect">Constraints on pattern Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.5 <a href="#rf-enumeration" shape="rect">enumeration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.5.1 <a href="#dc-enumeration" shape="rect">The enumeration Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.5.2 <a href="#xr-enumeration" shape="rect">XML Representation of enumeration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.5.3 <a href="#enumeration-rep-constr" shape="rect">Constraints on XML Representation of enumeration</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.5.4 <a href="#enumeration-validation-rules" shape="rect">enumeration Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.5.5 <a href="#enumeration-coss" shape="rect">Constraints on enumeration Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.6 <a href="#rf-whiteSpace" shape="rect">whiteSpace</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.6.1 <a href="#dc-whiteSpace" shape="rect">The whiteSpace Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.6.2 <a href="#xr-whiteSpace" shape="rect">XML Representation of whiteSpace Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.6.3 <a href="#whiteSpace-validation-rules" shape="rect">whiteSpace Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.6.4 <a href="#whiteSpace-coss" shape="rect">Constraints on whiteSpace Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.7 <a href="#rf-maxInclusive" shape="rect">maxInclusive</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.7.1 <a href="#dc-maxInclusive" shape="rect">The maxInclusive Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.7.2 <a href="#xr-maxInclusive" shape="rect">XML Representation of maxInclusive Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.7.3 <a href="#maxInclusive-validation-rules" shape="rect">maxInclusive Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.7.4 <a href="#maxInclusive-coss" shape="rect">Constraints on maxInclusive Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.8 <a href="#rf-maxExclusive" shape="rect">maxExclusive</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.8.1 <a href="#dc-maxExclusive" shape="rect">The maxExclusive Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.8.2 <a href="#xr-maxExclusive" shape="rect">XML Representation of maxExclusive Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.8.3 <a href="#maxExclusive-validation-rules" shape="rect">maxExclusive Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.8.4 <a href="#maxExclusive-coss" shape="rect">Constraints on maxExclusive Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.9 <a href="#rf-minExclusive" shape="rect">minExclusive</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.9.1 <a href="#dc-minExclusive" shape="rect">The minExclusive Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.9.2 <a href="#xr-minExclusive" shape="rect">XML Representation of minExclusive Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.9.3 <a href="#minExclusive-validation-rules" shape="rect">minExclusive Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.9.4 <a href="#minExclusive-coss" shape="rect">Constraints on minExclusive Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.10 <a href="#rf-minInclusive" shape="rect">minInclusive</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.10.1 <a href="#dc-minInclusive" shape="rect">The minInclusive Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.10.2 <a href="#xr-minInclusive" shape="rect">XML Representation of minInclusive Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.10.3 <a href="#minInclusive-validation-rules" shape="rect">minInclusive Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.10.4 <a href="#minInclusive-coss" shape="rect">Constraints on minInclusive Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.11 <a href="#rf-totalDigits" shape="rect">totalDigits</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.11.1 <a href="#dc-totalDigits" shape="rect">The totalDigits Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.11.2 <a href="#xr-totalDigits" shape="rect">XML Representation of totalDigits Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.11.3 <a href="#totalDigits-validation-rules" shape="rect">totalDigits Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.11.4 <a href="#totalDigits-coss" shape="rect">Constraints on totalDigits Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.12 <a href="#rf-fractionDigits" shape="rect">fractionDigits</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.12.1 <a href="#dc-fractionDigits" shape="rect">The fractionDigits Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.12.2 <a href="#xr-fractionDigits" shape="rect">XML Representation of fractionDigits Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.12.3 <a href="#fractionDigits-validation-rules" shape="rect">fractionDigits Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.12.4 <a href="#fractionDigits-coss" shape="rect">Constraints on fractionDigits Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.13 <a href="#rf-assertions" shape="rect">Assertions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.13.1 <a href="#dc-assertions" shape="rect">The assertions Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.13.2 <a href="#xr-assertions" shape="rect">XML Representation of assertions Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.13.3 <a href="#assertions-validation-rules" shape="rect">Assertions Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.13.4 <a href="#assertions-coss" shape="rect">Constraints on assertions Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.14 <a href="#rf-explicitTimezone" shape="rect">explicitTimezone</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.14.1 <a href="#dc-explicitTimezone" shape="rect">The explicitTimezone Schema Component</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.14.2 <a href="#xr-timezone" shape="rect">XML Representation of explicitTimezone Schema Components</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.14.3 <a href="#timezone-vr" shape="rect">explicitTimezone Validation Rules</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;4.3.14.4 <a href="#timezone-coss" shape="rect">Constraints on explicitTimezone Schema Components</a><br clear="none" />
</div><p>


<a name="f" id="f" shape="rect"></a>
<span class="termdef"><a name="dt-constraining-facet" id="dt-constraining-facet" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Constraining facets</b>
are schema components whose values may be set or changed
during <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> (subject to facet-specific controls) 
to control various aspects of the derived datatype.</span>&#160;
All <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facet<span class="arrow">&#183;</span></a> components 
defined by this specification
are
defined in this section.&#160; For example, 
<a href="#f-w" class="compref" shape="rect">whiteSpace</a> is a <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facet<span class="arrow">&#183;</span></a>.&#160;
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>Constraining Facets<span class="arrow">&#183;</span></a> are given a value as part of
the <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a>
when an <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> 
datatype is defined by <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restricting<span class="arrow">&#183;</span></a>
a <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> or <a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatype; a few
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> have default values
that are also provided for <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes.</p><div class="note"><div class="p"><b>Note:</b> Schema components are identified by kind.&#160; "Constraining" 
is not a kind of component.&#160; Each kind of <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facet<span class="arrow">&#183;</span></a>
("whiteSpace", 
"length", etc.) is a separate kind of schema component. </div></div><div class="block">
This specification distinguishes three kinds of constraining facets:<ul><li><div class="p"><span class="termdef"><a name="dt-pre-lexical" id="dt-pre-lexical" title="" shape="rect">[Definition:]&#160;&#160;</a>A constraining facet which
is used to normalize an initial <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> before checking
to see whether the resulting character sequence is a member of a datatype's
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> is a <b>pre-lexical</b> facet.</span></div><div class="p">This specification defines just one <a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> facet:
<a href="#f-w" class="compref" shape="rect">whiteSpace</a>.</div></li><li><div class="p"><span class="termdef"><a name="dt-lexical" id="dt-lexical" title="" shape="rect">[Definition:]&#160;&#160;</a>A constraining facet which
directly restricts the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of a datatype 
is a <b>lexical</b> facet.</span></div><div class="p">This specification defines just one
 <a href="#dt-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical<span class="arrow">&#183;</span></a> facet:
<a href="#f-p" class="compref" shape="rect">pattern</a>.</div><div class="note"><div class="p"><b>Note:</b> As specified normatively elsewhere, <a href="#dt-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical<span class="arrow">&#183;</span></a> facets can have an indirect
effect on the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>:  if every lexical representation of a value
is removed from the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, the value itself is removed
from the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.</div></div></li><li><div class="p"><span class="termdef"><a name="dt-value-based" id="dt-value-based" title="" shape="rect">[Definition:]&#160;&#160;</a>A constraining facet which
directly restricts the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of a datatype 
is a <b>value-based</b> facet.</span></div><div class="p">Most of the constraining facets defined by this specification
 are <a href="#dt-value-based" class="termref" shape="rect"><span class="arrow">&#183;</span>value-based<span class="arrow">&#183;</span></a> facets.</div><div class="note"><div class="p"><b>Note:</b> As specified normatively elsewhere, <a href="#dt-value-based" class="termref" shape="rect"><span class="arrow">&#183;</span>value-based<span class="arrow">&#183;</span></a> facets can have an indirect
effect on the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>:  if a value
is removed from the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, its lexical representations
are removed
from the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>.</div></div></li></ul>
</div><p>
Conforming processors <span class="rfc2119">must</span>
support all the facets defined in this section.
It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a processor supports other
constraining facets.  <span class="termdef"><a name="dt-unknown-f" id="dt-unknown-f" title="" shape="rect">[Definition:]&#160;&#160;</a>An

<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facet<span class="arrow">&#183;</span></a> which is not supported by
the processor in use is <b>unknown</b>.</span>
</p><div class="note"><div class="p"><b>Note:</b> A reference to an <a href="#dt-unknown-f" class="termref" shape="rect"><span class="arrow">&#183;</span>unknown<span class="arrow">&#183;</span></a> facet might be a reference to
an <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facet supported by some other processor,
or might be the result of a typographic error, or might
have some other explanation.
</div></div><p></p><p>The descriptions of individual facets given
below include both constraints on <a href="#std" class="compref" shape="rect">Simple Type Definition</a> components
and rules for checking the datatype validity of a given literal against
a given datatype.  The validation rules typically depend upon having
a full knowledge of the datatype; full knowledge of the datatype,
in turn, depends on having a fully instantiated <a href="#std" class="compref" shape="rect">Simple Type Definition</a>.
A full instantiation of the <a href="#std" class="compref" shape="rect">Simple Type Definition</a>, and the checking
of the component constraints, require knowledge of the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
It follows that if a datatype's <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> is <a href="#dt-unknown-dt" class="termref" shape="rect"><span class="arrow">&#183;</span>unknown<span class="arrow">&#183;</span></a>, the
<a href="#std" class="compref" shape="rect">Simple Type Definition</a> defining the datatype will be incompletely
instantiated, and the datatype itself will be <a href="#dt-unknown-dt" class="termref" shape="rect"><span class="arrow">&#183;</span>unknown<span class="arrow">&#183;</span></a>.
Similarly, any datatype defined using an <a href="#dt-unknown-f" class="termref" shape="rect"><span class="arrow">&#183;</span>unknown<span class="arrow">&#183;</span></a> <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facet<span class="arrow">&#183;</span></a>
will be <a href="#dt-unknown-dt" class="termref" shape="rect"><span class="arrow">&#183;</span>unknown<span class="arrow">&#183;</span></a>.  It is not possible to perform datatype validation
as defined here using <a href="#dt-unknown-dt" class="termref" shape="rect"><span class="arrow">&#183;</span>unknown<span class="arrow">&#183;</span></a> datatypes.</p><div class="note"><div class="p"><b>Note:</b> The preceding paragraph does not forbid implementations from attempting
to make use of such partial information as they have about <a href="#dt-unknown-dt" class="termref" shape="rect"><span class="arrow">&#183;</span>unknown<span class="arrow">&#183;</span></a>
datatypes.  But the exploitation of such partial knowledge is not
datatype validity checking as defined here and is to be distinguished
from it in the implementation's documentation and interface.</div></div><div class="div3">
<h4><a name="rf-length" id="rf-length" shape="rect"></a>4.3.1 length</h4><p>
<span class="termdef"><a name="dt-length" id="dt-length" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>length</b> is the number
of <em>units of length</em>, where <em>units of length</em>
varies depending on the type that is being <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from.
The value of
<b>length</b>&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be a
<a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a>.
</span>
</p><p>
For <a href="#string" shape="rect">string</a> and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#string" shape="rect">string</a>,
<b>length</b> is measured in units of <a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">
character</a>s as defined in <a href="#XML" shape="rect">[XML]</a>.
For <a href="#anyURI" shape="rect">anyURI</a>, <b>length</b> is measured in units of
characters (as for <a href="#string" shape="rect">string</a>).
For <a href="#hexBinary" shape="rect">hexBinary</a> and <a href="#base64Binary" shape="rect">base64Binary</a> and datatypes 
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from them,
<b>length</b> is measured in octets (8 bits) of binary data.
For datatypes <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> by <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>,
<b>length</b> is measured in number of list items.
</p><div class="note"><div class="p"><b>Note:</b> 
For <a href="#string" shape="rect">string</a> and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#string" shape="rect">string</a>,
<b>length</b> will not always coincide with "string length" as perceived
by some users or with the number of storage units in some digital representation.&#160;
Therefore, care should be taken when specifying a value for <b>length</b>
and in attempting to infer storage requirements from a given value for
<b>length</b>.
</div></div><p>
<a href="#dt-length" class="termref" shape="rect"><span class="arrow">&#183;</span>length<span class="arrow">&#183;</span></a> provides for:
</p><ul><li><div class="p">
Constraining a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
to values with a specific number of <em>units of length</em>,
where <em>units of length</em>
varies depending on <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following is the definition of a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatype to represent product codes which must be
exactly 8 characters in length.&#160; By fixing the value of the
<b>length</b> facet we ensure that types derived from productCode can
change or set the values of other facets, such as <b>pattern</b>, but
cannot change the length.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='productCode'&gt;
   &lt;restriction base='string'&gt;
     &lt;length value='8' fixed='true'/&gt;
   &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div></div><div class="div4">
<h5><a name="dc-length" id="dc-length" shape="rect"></a>4.3.1.1 The length Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-l" id="f-l" shape="rect">length</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-l-annotations" shape="rect" id="f-l-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-l-value" shape="rect" id="f-l-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
An xs:nonNegativeInteger value.  Required.</div>
</div>
<div class="propDefn"><a name="f-l-fixed" shape="rect" id="f-l-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
If <a href="#f-l-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then types for which
the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> cannot specify a
value for <a href="#f-l" class="compref" shape="rect">length</a> other than <a href="#f-l-value" class="propref" shape="rect">{value}</a>.
</p><div class="note"><div class="p"><b>Note:</b> The <a href="#f-l-fixed" class="propref" shape="rect">{fixed}</a> property is defined for
parallelism with other facets and for compatiblity with version 1.0
of this specification. But it is a consequence of 
<a href="#length-valid-restriction" shape="rect">length valid restriction (&#167;4.3.1.4)</a> that the value of
the <a href="#f-l" class="compref" shape="rect">length</a> facet cannot be changed, regardless of
whether <a href="#f-l-fixed" class="propref" shape="rect">{fixed}</a> is 
<em>true</em> or <em>false</em>.
</div></div></div><div class="div4">
<h5><a name="xr-length" id="xr-length" shape="rect"></a>4.3.1.2 XML Representation of length Schema Components</h5><p>
The XML representation for a <a href="#f-l" class="compref" shape="rect">length</a> schema
component is a <a href="#element-length" class="eltref" shape="rect">&lt;length&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>length</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-length" name="element-length" shape="rect">&lt;length</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/length&gt;</p><div class="reprcompmulti"><div class="reprHead"><a href="#dc-fractionDigits" shape="rect">length</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="#f-l-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-l-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-l-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-length" class="eltref" shape="rect">&lt;length&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="length-validation-rules" id="length-validation-rules" shape="rect"></a>4.3.1.3 length Validation Rules</h5><div class="constraintnote"><a id="cvc-length-valid" name="cvc-length-valid" shape="rect"></a><b>Validation Rule: Length Valid</b><br clear="none" /><div class="constraint"><div class="p">
A value in a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> is facet-valid with
respect to <a href="#dt-length" class="termref" shape="rect"><span class="arrow">&#183;</span>length<span class="arrow">&#183;</span></a>
if and only if:
</div><div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *-->
if the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> then
<div class="constraintlist"><div class="clnumber">1.1 <span class="p">
if <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#string" shape="rect">string</a> or <a href="#anyURI" shape="rect">anyURI</a>, then the length of the value,
as measured in <a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">
character</a>s 
<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be equal to <a href="#f-l-value" class="propref" shape="rect">{value}</a>;
</span></div>
<div class="clnumber">1.2 <span class="p">
if <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#hexBinary" shape="rect">hexBinary</a> or <a href="#base64Binary" shape="rect">base64Binary</a>, then the length of
the value, as measured in octets of the binary data, 
<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be 
equal to <a href="#f-l-value" class="propref" shape="rect">{value}</a>;
</span></div>
<div class="clnumber">1.3 <span class="p">
if <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#QName" shape="rect">QName</a> or <a href="#NOTATION" shape="rect">NOTATION</a>, then any <a href="#f-l-value" class="propref" shape="rect">{value}</a> is facet-valid.
</span></div>
</div>
</div>
<div class="clnumber">2 <span class="p">
if the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>,
then the length of the value, as measured in list items, 
<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be 
equal to <a href="#f-l-value" class="propref" shape="rect">{value}</a>
</span></div>
</div></div></div><p>

The use of <a href="#dt-length" class="termref" shape="rect"><span class="arrow">&#183;</span>length<span class="arrow">&#183;</span></a>
on <a href="#QName" shape="rect">QName</a>, <a href="#NOTATION" shape="rect">NOTATION</a>, and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from them
is deprecated.&#160; Future versions of this
specification may remove this facet for these datatypes.

</p></div><div class="div4">
<h5><a name="length-coss" id="length-coss" shape="rect"></a>4.3.1.4 Constraints on length Schema Components</h5><div class="constraintnote"><a id="length-minLength-maxLength" name="length-minLength-maxLength" shape="rect"></a><b>Schema Component Constraint: length and minLength or maxLength</b><br clear="none" /><div class="constraint"><div class="p">If <a href="#f-l" class="compref" shape="rect">length</a> is a member of <a href="#std-facets" class="propref" shape="rect">{facets}</a> then
  <div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *-->It is an error for <a href="#f-mil" class="compref" shape="rect">minLength</a> to be a member of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> unless
     <div class="constraintlist"><div class="clnumber">1.1 <span class="p">the <a href="#f-mil-value" class="propref" shape="rect">{value}</a> of <a href="#f-mil" class="compref" shape="rect">minLength</a> &lt;= the <a href="#f-l-value" class="propref" shape="rect">{value}</a> of <a href="#f-l" class="compref" shape="rect">length</a> and</span></div>
<div class="clnumber">1.2 <span class="p">there is some
         type definition from which this one is derived by
         one or more <a href="#dt-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> steps in which <a href="#f-mil" class="compref" shape="rect">minLength</a> has the same
         <a href="#f-mil-value" class="propref" shape="rect">{value}</a> and <a href="#f-l" class="compref" shape="rect">length</a> is not specified.</span></div>
</div>
    </div>
<div class="clnumber">2 <!--* no span class='p' possible here *-->It is an error for <a href="#f-mal" class="compref" shape="rect">maxLength</a> to be a member of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> unless
     <div class="constraintlist"><div class="clnumber">2.1 <span class="p">the <a href="#f-l-value" class="propref" shape="rect">{value}</a> of <a href="#f-l" class="compref" shape="rect">length</a> &lt;= the <a href="#f-mal-value" class="propref" shape="rect">{value}</a> of <a href="#f-mal" class="compref" shape="rect">maxLength</a> and</span></div>
<div class="clnumber">2.2 <span class="p">there is some
         type definition from which this one is derived by
         one or more restriction steps in which <a href="#f-mal" class="compref" shape="rect">maxLength</a> has the same
         <a href="#f-mal-value" class="propref" shape="rect">{value}</a> and <a href="#f-l" class="compref" shape="rect">length</a> is not specified.</span></div>
</div>
    </div>
</div>
 </div></div></div><div class="constraintnote"><a id="length-valid-restriction" name="length-valid-restriction" shape="rect"></a><b>Schema Component Constraint: length valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if <a href="#f-l" class="compref" shape="rect">length</a>
is among the members of <a href="#std-facets" class="propref" shape="rect">{facets}</a> of
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and <a href="#f-l-value" class="propref" shape="rect">{value}</a> is
not equal to the <a href="#f-l-value" class="propref" shape="rect">{value}</a> of the parent
<a href="#f-l" class="compref" shape="rect">length</a>.
</div></div></div></div></div><div class="div3">
<h4><a name="rf-minLength" id="rf-minLength" shape="rect"></a>4.3.2 minLength</h4><p>
<span class="termdef"><a name="dt-minLength" id="dt-minLength" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>minLength</b> is
the minimum number of <em>units of length</em>, where
<em>units of length</em> varies depending on the type that is being
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from.
The value of <b>minLength</b>
&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be a <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a>.
</span>
</p><p>
For <a href="#string" shape="rect">string</a> and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#string" shape="rect">string</a>,
<b>minLength</b> is measured in units of <a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">
character</a>s as defined in <a href="#XML" shape="rect">[XML]</a>.
For <a href="#hexBinary" shape="rect">hexBinary</a> and <a href="#base64Binary" shape="rect">base64Binary</a> and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from them,
<b>minLength</b> is measured in octets (8 bits) of binary data.
For datatypes <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> by <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>,
<b>minLength</b> is measured in number of list items.
</p><div class="note"><div class="p"><b>Note:</b> 
For <a href="#string" shape="rect">string</a> and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#string" shape="rect">string</a>,
<b>minLength</b> will not always coincide with "string length" as perceived
by some users or with the number of storage units in some digital representation.
Therefore, care should be taken when specifying a value for <b>minLength</b>
and in attempting to infer storage requirements from a given value for
<b>minLength</b>.
</div></div><p>
<a href="#dt-minLength" class="termref" shape="rect"><span class="arrow">&#183;</span>minLength<span class="arrow">&#183;</span></a> provides for:
</p><ul><li><div class="p">
Constraining a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
to values with at least a specific number of <em>units of length</em>,
where <em>units of length</em>
varies depending on <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following is the definition of a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatype which requires strings to have at least one character (i.e.,
the empty string is not in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of this datatype).
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='non-empty-string'&gt;
  &lt;restriction base='string'&gt;
    &lt;minLength value='1'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div></div><div class="div4">
<h5><a name="dc-minLength" id="dc-minLength" shape="rect"></a>4.3.2.1 The minLength Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-mil" id="f-mil" shape="rect">minLength</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-mil-annotations" shape="rect" id="f-mil-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-mil-value" shape="rect" id="f-mil-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
An xs:nonNegativeInteger value.  Required.</div>
</div>
<div class="propDefn"><a name="f-mil-fixed" shape="rect" id="f-mil-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
If <a href="#f-mil-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then types for which
the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> cannot specify a
value for <a href="#f-mil" class="compref" shape="rect">minLength</a> other than <a href="#f-mil-value" class="propref" shape="rect">{value}</a>.
</p></div><div class="div4">
<h5><a name="xr-minLength" id="xr-minLength" shape="rect"></a>4.3.2.2 XML Representation of minLength Schema Component</h5><p>
The XML representation for a <a href="#f-mil" class="compref" shape="rect">minLength</a> schema
component is a <a href="#element-minLength" class="eltref" shape="rect">&lt;minLength&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>minLength</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-minLength" name="element-minLength" shape="rect">&lt;minLength</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/minLength&gt;</p><div class="reprcompmulti"><div class="reprHead"><a href="#dc-fractionDigits" shape="rect">minLength</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="#f-mil-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-mil-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-mil-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-minLength" class="eltref" shape="rect">&lt;minLength&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="minLength-validation-rules" id="minLength-validation-rules" shape="rect"></a>4.3.2.3 minLength Validation Rules</h5><div class="constraintnote"><a id="cvc-minLength-valid" name="cvc-minLength-valid" shape="rect"></a><b>Validation Rule: minLength Valid</b><br clear="none" /><div class="constraint"><div class="p">
A value in a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> is facet-valid with
respect to <a href="#dt-minLength" class="termref" shape="rect"><span class="arrow">&#183;</span>minLength<span class="arrow">&#183;</span></a>, determined as follows:
</div><div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *-->
if the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> then
<div class="constraintlist"><div class="clnumber">1.1 <span class="p">
if <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#string" shape="rect">string</a> or
<a href="#anyURI" shape="rect">anyURI</a>, then the
length of the value, as measured in<a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">
character</a>s
<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be greater than or equal to
<a href="#f-mil-value" class="propref" shape="rect">{value}</a>;
</span></div>
<div class="clnumber">1.2 <span class="p">
if <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#hexBinary" shape="rect">hexBinary</a> or <a href="#base64Binary" shape="rect">base64Binary</a>, then the
length of the value, as measured in octets of the binary data,
<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be greater than or equal to
<a href="#f-mil-value" class="propref" shape="rect">{value}</a>;
</span></div>
<div class="clnumber">1.3 <span class="p">

if <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#QName" shape="rect">QName</a> or <a href="#NOTATION" shape="rect">NOTATION</a>, then
any <a href="#f-mil-value" class="propref" shape="rect">{value}</a> is facet-valid.
</span></div>
</div>
</div>
<div class="clnumber">2 <span class="p">
if the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>,
then the length of the value, as measured
in list items, <a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be greater than or equal
to <a href="#f-mil-value" class="propref" shape="rect">{value}</a>
</span></div>
</div></div></div><p>

The use of <a href="#dt-minLength" class="termref" shape="rect"><span class="arrow">&#183;</span>minLength<span class="arrow">&#183;</span></a>
on <a href="#QName" shape="rect">QName</a>, <a href="#NOTATION" shape="rect">NOTATION</a>, and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from them
is deprecated.&#160; Future versions of this
specification may remove this facet for these datatypes.

</p></div><div class="div4">
<h5><a name="minLength-coss" id="minLength-coss" shape="rect"></a>4.3.2.4 Constraints on minLength Schema Components</h5><div class="constraintnote"><a id="minLength-less-than-equal-to-maxLength" name="minLength-less-than-equal-to-maxLength" shape="rect"></a><b>Schema Component Constraint: minLength &lt;= maxLength</b><br clear="none" /><div class="constraint"><div class="p">
If both <a href="#f-mil" class="compref" shape="rect">minLength</a> and <a href="#f-mal" class="compref" shape="rect">maxLength</a>
are members of <a href="#std-facets" class="propref" shape="rect">{facets}</a>, then the
<a href="#f-mil-value" class="propref" shape="rect">{value}</a> of <a href="#f-mil" class="compref" shape="rect">minLength</a>
&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be less than or equal to the
<a href="#f-mal-value" class="propref" shape="rect">{value}</a> of <a href="#f-mal" class="compref" shape="rect">maxLength</a>.
</div></div></div><div class="constraintnote"><a id="minLength-valid-restriction" name="minLength-valid-restriction" shape="rect"></a><b>Schema Component Constraint: minLength valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if <a href="#f-mil" class="compref" shape="rect">minLength</a>
is among the members of <a href="#std-facets" class="propref" shape="rect">{facets}</a> of
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and <a href="#f-mil-value" class="propref" shape="rect">{value}</a> is
less than the <a href="#f-mil-value" class="propref" shape="rect">{value}</a> of the parent
<a href="#f-mil" class="compref" shape="rect">minLength</a>.
</div></div></div></div></div><div class="div3">
<h4><a name="rf-maxLength" id="rf-maxLength" shape="rect"></a>4.3.3 maxLength</h4><p>
<span class="termdef"><a name="dt-maxLength" id="dt-maxLength" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>maxLength</b> is
the maximum number of <em>units of length</em>, where
<em>units of length</em> varies
depending on the type that is being <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from.
The value of <b>maxLength</b>
&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be a <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a>.
</span>
</p><p>
For <a href="#string" shape="rect">string</a> and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#string" shape="rect">string</a>,
<b>maxLength</b> is measured in units of <a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">
character</a>s as defined in <a href="#XML" shape="rect">[XML]</a>.
For <a href="#hexBinary" shape="rect">hexBinary</a> and <a href="#base64Binary" shape="rect">base64Binary</a> and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from them,
<b>maxLength</b> is measured in octets (8 bits) of binary data.
For datatypes <a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> by <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>,
<b>maxLength</b> is measured in number of list items.
</p><div class="note"><div class="p"><b>Note:</b> 
For <a href="#string" shape="rect">string</a> and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#string" shape="rect">string</a>,
<b>maxLength</b> will not always coincide with "string length" as perceived
by some users or with the number of storage units in some digital representation.
Therefore, care should be taken when specifying a value for <b>maxLength</b>
and in attempting to infer storage requirements from a given value for
<b>maxLength</b>.
</div></div><p>
<a href="#dt-maxLength" class="termref" shape="rect"><span class="arrow">&#183;</span>maxLength<span class="arrow">&#183;</span></a> provides for:
</p><ul><li><div class="p">
Constraining a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
to values with at most a specific number of <em>units of length</em>,
where <em>units of length</em>
varies depending on <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following is the definition of a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatype which might be used to accept form input with an upper limit
to the number of characters that are acceptable.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='form-input'&gt;
  &lt;restriction base='string'&gt;
    &lt;maxLength value='50'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div></div><div class="div4">
<h5><a name="dc-maxLength" id="dc-maxLength" shape="rect"></a>4.3.3.1 The maxLength Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-mal" id="f-mal" shape="rect">maxLength</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-mal-annotations" shape="rect" id="f-mal-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-mal-value" shape="rect" id="f-mal-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
An xs:nonNegativeInteger value.  Required.</div>
</div>
<div class="propDefn"><a name="f-mal-fixed" shape="rect" id="f-mal-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
If <a href="#f-mal-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then types for which
the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> cannot specify a
value for <a href="#f-mal" class="compref" shape="rect">maxLength</a> other than <a href="#f-mal-value" class="propref" shape="rect">{value}</a>.
</p></div><div class="div4">
<h5><a name="xr-maxLength" id="xr-maxLength" shape="rect"></a>4.3.3.2 XML Representation of maxLength Schema Components</h5><p>
The XML representation for a <a href="#f-mal" class="compref" shape="rect">maxLength</a> schema
component is a <a href="#element-maxLength" class="eltref" shape="rect">&lt;maxLength&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>maxLength</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-maxLength" name="element-maxLength" shape="rect">&lt;maxLength</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/maxLength&gt;</p><div class="reprcompmulti"><div class="reprHead"><a href="#dc-fractionDigits" shape="rect">maxLength</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="#f-mal-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-mal-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-mal-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-maxLength" class="eltref" shape="rect">&lt;maxLength&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="maxLength-validation-rules" id="maxLength-validation-rules" shape="rect"></a>4.3.3.3 maxLength Validation Rules</h5><div class="constraintnote"><a id="cvc-maxLength-valid" name="cvc-maxLength-valid" shape="rect"></a><b>Validation Rule: maxLength Valid</b><br clear="none" /><div class="constraint"><div class="p">
A value in a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> is facet-valid with
respect to <a href="#dt-maxLength" class="termref" shape="rect"><span class="arrow">&#183;</span>maxLength<span class="arrow">&#183;</span></a>, determined as follows:
</div><div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *-->
if the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> then
<div class="constraintlist"><div class="clnumber">1.1 <span class="p">
if <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#string" shape="rect">string</a> or
<a href="#anyURI" shape="rect">anyURI</a>, then the
length of the value, as measured in <a href="http://www.w3.org/TR/xml11/#dt-character" shape="rect">
character</a>s
<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be less than or equal to
<a href="#f-mal-value" class="propref" shape="rect">{value}</a>;
</span></div>
<div class="clnumber">1.2 <span class="p">
if <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#hexBinary" shape="rect">hexBinary</a> or <a href="#base64Binary" shape="rect">base64Binary</a>, then the
length of the value, as measured in octets of the binary data,
<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be less than or equal to <a href="#f-mal-value" class="propref" shape="rect">{value}</a>;
</span></div>
<div class="clnumber">1.3 <span class="p">

if <a href="#std-primitive_type_definition" class="propref" shape="rect">{primitive type definition}</a> is <a href="#QName" shape="rect">QName</a> or <a href="#NOTATION" shape="rect">NOTATION</a>, then
any <a href="#f-mal-value" class="propref" shape="rect">{value}</a> is facet-valid.
</span></div>
</div>
</div>
<div class="clnumber">2 <span class="p">
if the <a href="#std-variety" class="propref" shape="rect">{variety}</a> is <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>,
then the length of the value, as measured
in list items, <a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be less than or equal to
<a href="#f-mal-value" class="propref" shape="rect">{value}</a>
</span></div>
</div></div></div><p>

The use of <a href="#dt-maxLength" class="termref" shape="rect"><span class="arrow">&#183;</span>maxLength<span class="arrow">&#183;</span></a>
on <a href="#QName" shape="rect">QName</a>, <a href="#NOTATION" shape="rect">NOTATION</a>, and datatypes <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from them
is deprecated.&#160; Future versions of this
specification may remove this facet for these datatypes.

</p></div><div class="div4">
<h5><a name="maxLength-coss" id="maxLength-coss" shape="rect"></a>4.3.3.4 Constraints on maxLength Schema Components</h5><div class="constraintnote"><a id="maxLength-valid-restriction" name="maxLength-valid-restriction" shape="rect"></a><b>Schema Component Constraint: maxLength valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if <a href="#f-mal" class="compref" shape="rect">maxLength</a>
is among the members of <a href="#std-facets" class="propref" shape="rect">{facets}</a> of
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and <a href="#f-mal-value" class="propref" shape="rect">{value}</a> is
greater than the <a href="#f-mal-value" class="propref" shape="rect">{value}</a> of the parent
<a href="#f-mal" class="compref" shape="rect">maxLength</a>.
</div></div></div></div></div><div class="div3">
<h4><a name="rf-pattern" id="rf-pattern" shape="rect"></a>4.3.4 pattern</h4><p><span class="termdef"><a name="dt-pattern" id="dt-pattern" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>pattern</b> is a constraint on the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of a datatype which is achieved by
constraining the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> to <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>
which match
each
member of a set of
<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular
expressions<span class="arrow">&#183;</span></a>.&#160;
The value of <b>pattern</b>
&#160;<span class="rfc2119">must</span>
be a set of 
<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expressions<span class="arrow">&#183;</span></a>.

</span>

</p><div class="note"><div class="p"><b>Note:</b> An XML <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>
containing more than one <a href="#element-pattern" class="eltref" shape="rect">&lt;pattern&gt;</a> element gives
rise to a single <a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expression<span class="arrow">&#183;</span></a> in the set; this 
<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expression<span class="arrow">&#183;</span></a> is an "or" of
the <a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expressions<span class="arrow">&#183;</span></a> that
are the content of the <a href="#element-pattern" class="eltref" shape="rect">&lt;pattern&gt;</a> elements.</div></div><p>
<a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> provides for:
</p><ul><li><div class="p">Constraining a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
to values that are denoted by <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> which match 

each of a set of 
<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expressions<span class="arrow">&#183;</span></a>.
</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following is the definition of a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatype which is a better representation of postal codes in the
United States, by limiting strings to those which are matched by
a specific <a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expression<span class="arrow">&#183;</span></a>.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='better-us-zipcode'&gt;
  &lt;restriction base='string'&gt;
    &lt;pattern value='[0-9]{5}(-[0-9]{4})?'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div></div><div class="div4">
<h5><a name="dc-pattern" id="dc-pattern" shape="rect"></a>4.3.4.1 The pattern Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-p" id="f-p" shape="rect">pattern</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-p-annotations" shape="rect" id="f-p-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-p-value" shape="rect" id="f-p-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>A non-empty set of <a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expressions<span class="arrow">&#183;</span></a>.</p></div>
</div>
</div>
</div></div>
</div>
</div>
</div><div class="div4">
<h5><a name="xr-pattern" id="xr-pattern" shape="rect"></a>4.3.4.2 XML Representation of pattern Schema Components</h5><p>
The XML representation for a <a href="#f-p" class="compref" shape="rect">pattern</a> schema
component is 
one or more <a href="#element-pattern" class="eltref" shape="rect">&lt;pattern&gt;</a>
element information items. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>pattern</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-pattern" name="element-pattern" shape="rect">&lt;pattern</a><br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#string" shape="rect">string</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/pattern&gt;</p><div class="reprdep">

</div><div class="reprcompmulti"><div class="reprHead"><a href="#dc-pattern" shape="rect">pattern</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="#f-p-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">

 <span class="termdef"><a name="l-R" id="l-R" title="" shape="rect">[Definition:]&#160;&#160;</a>Let <b>R</b> be a regular
expression given by
  </span>
 the appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>there is only one <a href="#element-pattern" class="eltref" shape="rect">&lt;pattern&gt;</a> among the 
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>, <b>then </b>the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of its <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a></div><div class="clnumber">2 <b>otherwise </b>the concatenation of the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual values</a> of 
all the <a href="#element-pattern" class="eltref" shape="rect">&lt;pattern&gt;</a> 
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>'s <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>, in order,
separated by '<code>|</code>', so forming a single regular expression with multiple
<a href="#dt-branch" class="termref" shape="rect"><span class="arrow">&#183;</span>branches<span class="arrow">&#183;</span></a>.</div></div>
 The value is then given by
 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> of the
<a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner<span class="arrow">&#183;</span></a> has a <a href="#f-p" class="compref" shape="rect">pattern</a> facet among its <a href="#std-facets" class="propref" shape="rect">{facets}</a>, <b>then </b>the union of that <a href="#f-p" class="compref" shape="rect">pattern</a> facet's <a href="#f-p-value" class="propref" shape="rect">{value}</a> and {<a href="#l-R" class="termref" shape="rect"><span class="arrow">&#183;</span>R<span class="arrow">&#183;</span></a>}</div><div class="clnumber">2 <b>otherwise </b>just {<a href="#l-R" class="termref" shape="rect"><span class="arrow">&#183;</span>R<span class="arrow">&#183;</span></a>}</div></div>
</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#f-p-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">


    The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-set" shape="rect">annotation mapping</a> of the set containing all of the
    <a href="#element-pattern" class="eltref" shape="rect">&lt;pattern&gt;</a> elements among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the
    <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a> element information item,
    as defined in section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
    of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.

</div></div></div><div class="note"><div class="p"><b>Note:</b> The <a href="#f-p-value" class="propref" shape="rect">{value}</a> property 
    will only have more than one member when <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a> involves 
    a <a href="#f-p" class="compref" shape="rect">pattern</a> facet at more than one step in a 
    type derivation.  During validation, lexical forms will be 
    checked against every member of the resulting <a href="#f-p-value" class="propref" shape="rect">{value}</a>, effectively 
    creating a conjunction of patterns.</div><div class="p">
In summary, <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a>
facets specified on the <em>same</em> step in a type
derivation are <b>OR</b>ed together, while <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a>
facets specified on <em>different</em> steps of a type derivation
are <b>AND</b>ed together.
</div><div class="p">
Thus, to impose two <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> constraints simultaneously,
schema authors may either write a single <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> which
expresses the intersection of the two <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a>s they wish to
impose, or define each <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> on a separate type derivation
step.
</div></div></div><div class="div4">
<h5><a name="pattern-rep-constr" id="pattern-rep-constr" shape="rect"></a>4.3.4.3 Constraints on XML Representation of pattern</h5><div class="constraintnote"><a id="src-pattern-value" name="src-pattern-value" shape="rect"></a><b>Schema Representation Constraint: Pattern value</b><br clear="none" /><div class="constraint"><div class="p">The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> must be a 

<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expression<span class="arrow">&#183;</span></a> as
defined in <a href="#regexs" shape="rect">Regular Expressions (&#167;G)</a>.</div></div></div></div><div class="div4">
<h5><a name="pattern-validation-rules" id="pattern-validation-rules" shape="rect"></a>4.3.4.4 pattern Validation Rules</h5><div class="constraintnote"><a id="cvc-pattern-valid" name="cvc-pattern-valid" shape="rect"></a><b>Validation Rule: pattern valid</b><br clear="none" /><div class="constraint"><div class="p">A <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> in a <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> is pattern-valid (or: facet-valid with
respect to <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a>) 
if and only if
for each
<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expression<span class="arrow">&#183;</span></a> in its  <a href="#f-p-value" class="propref" shape="rect">{value}</a>,
the <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> is among the set of character sequences denoted by
the <a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expression<span class="arrow">&#183;</span></a>.
</div></div></div><div class="note"><div class="p"><b>Note:</b> 
As noted in <a href="#datatype" shape="rect">Datatype (&#167;2.1)</a>,
certain uses of the <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> facet may
eliminate from the lexical space the canonical forms of some values
in the value space; this can be inconvenient for applications
which write out the canonical form of a value and rely on
being able to read it in again as a legal lexical form.
This specification provides no recourse in such situations;
applications are free to deal with it as they see fit.
Caution is advised.
</div></div></div><div class="div4">
<h5><a name="pattern-constraints" id="pattern-constraints" shape="rect"></a>4.3.4.5 Constraints on pattern Schema Components</h5><div class="constraintnote"><a id="cos-pattern-restriction" name="cos-pattern-restriction" shape="rect"></a><b>Schema Component Constraint: Valid restriction of pattern</b><br clear="none" /><div class="constraint"><div class="p">It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if there is any member of 
the <a href="#f-p-value" class="propref" shape="rect">{value}</a> of the 
<a href="#f-p" class="compref" shape="rect">pattern</a> facet on the 
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
which is not also a member of the
<a href="#f-p-value" class="propref" shape="rect">{value}</a>.</div><div class="note"><div class="p"><b>Note:</b> For components constructed from XML representations in schema documents, 
the satisfaction of this constraint is a consequence of the XML mapping rules:
any pattern imposed by a simple type definition <var>S</var> will always 
also be imposed by any type derived from <var>S</var> by <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>.
This constraint ensures that components constructed by other means
(so-called "born-binary" components) similarly preserve
<a href="#f-p" class="compref" shape="rect">pattern</a> facets across <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>.
</div></div></div></div></div></div><div class="div3">
<h4><a name="rf-enumeration" id="rf-enumeration" shape="rect"></a>4.3.5 enumeration</h4><p>
<span class="termdef"><a name="dt-enumeration" id="dt-enumeration" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>enumeration</b> constrains the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
to a specified set of values.
</span>
</p><p>
<b>enumeration</b> does not impose an order relation on the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> it creates; the value of the
<a href="#dt-ordered" class="termref" shape="rect"><span class="arrow">&#183;</span>ordered<span class="arrow">&#183;</span></a> property of the <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
datatype remains that of the datatype from which it is
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>.
</p><p>
<a href="#dt-enumeration" class="termref" shape="rect"><span class="arrow">&#183;</span>enumeration<span class="arrow">&#183;</span></a> provides for:
</p><ul><li><div class="p">
Constraining a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
to a specified set of values.
</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following example is a <a href="#std" class="compref" shape="rect">Simple Type Definition</a> 
for a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a> datatype which limits the values
of dates to the three US holidays enumerated. This 

<a href="#std" class="compref" shape="rect">Simple Type Definition</a> 
would appear in a schema authored by an "end-user" and
shows how to define a datatype by enumerating the values in its
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.&#160; The enumerated values must be
type-valid <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> for the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='holidays'&gt;
    &lt;annotation&gt;
        &lt;documentation&gt;some US holidays&lt;/documentation&gt;
    &lt;/annotation&gt;
    &lt;restriction base='gMonthDay'&gt;
      &lt;enumeration value='--01-01'&gt;
        &lt;annotation&gt;
            &lt;documentation&gt;New Year's day&lt;/documentation&gt;
        &lt;/annotation&gt;
      &lt;/enumeration&gt;
      &lt;enumeration value='--07-04'&gt;
        &lt;annotation&gt;
            &lt;documentation&gt;4th of July&lt;/documentation&gt;
        &lt;/annotation&gt;
      &lt;/enumeration&gt;
      &lt;enumeration value='--12-25'&gt;
        &lt;annotation&gt;
            &lt;documentation&gt;Christmas&lt;/documentation&gt;
        &lt;/annotation&gt;
      &lt;/enumeration&gt;
    &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div></div><div class="div4">
<h5><a name="dc-enumeration" id="dc-enumeration" shape="rect"></a>4.3.5.1 The enumeration Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-e" id="f-e" shape="rect">enumeration</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-e-annotations" shape="rect" id="f-e-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-e-value" shape="rect" id="f-e-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>
	A set of values from the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</p></div>
</div>
</div>
</div></div>
</div>
</div>
</div><div class="div4">
<h5><a name="xr-enumeration" id="xr-enumeration" shape="rect"></a>4.3.5.2 XML Representation of enumeration Schema Components</h5><p>
The XML representation for an <a href="#f-e" class="compref" shape="rect">enumeration</a> schema
component is 
one or more <a href="#element-enumeration" class="eltref" shape="rect">&lt;enumeration&gt;</a>
element information items. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>enumeration</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-enumeration" name="element-enumeration" shape="rect">&lt;enumeration</a><br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#dt-anySimpleType" shape="rect">anySimpleType</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/enumeration&gt;</p><div class="reprdep">

</div><div class="reprcompmulti"><div class="reprHead"><a href="#dc-enumeration" shape="rect">enumeration</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="#f-e-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
 The appropriate <b>case</b> among the following:<div class="constraintlist"><div class="clnumber">1 <b>If </b>there is only one <a href="#element-enumeration" class="eltref" shape="rect">&lt;enumeration&gt;</a> 
among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>, <b>then </b>a set with one member, the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of its <code>value</code> 
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a>, 

interpreted as an instance of 
the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</div><div class="clnumber">2 <b>otherwise </b>a set of the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual values</a> of all the <a href="#element-enumeration" class="eltref" shape="rect">&lt;enumeration&gt;</a> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a>'s <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attributes]</a>, interpreted as instances of 
the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</div></div>
<div class="note"><div class="p"><b>Note:</b> The <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> is declared as having
type <a href="#dt-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>anySimpleType</code><span class="arrow">&#183;</span></a>, but the 
<a href="#f-e-value" class="propref" shape="rect">{value}</a> property of the 
<a href="#f-e" class="compref" shape="rect">enumeration</a> facet <span class="rfc2119">must</span> be a member of the
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
So in mapping from the XML representation
to the <a href="#f-e" class="compref" shape="rect">enumeration</a> component, the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> is
identified by using the <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> of the 
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div></div>

</div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#f-e-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
A (possibly empty) sequence of 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components, one for each <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">&lt;annotation&gt;</a> among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of the <a href="#element-enumeration" class="eltref" shape="rect">&lt;enumeration&gt;</a>s among the <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[children]</a> of a <a href="#element-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>, in order.</div></div></div></div><div class="div4">
<h5><a name="enumeration-rep-constr" id="enumeration-rep-constr" shape="rect"></a>4.3.5.3 Constraints on XML Representation of enumeration</h5><div class="constraintnote"><a id="src-enumeration-value" name="src-enumeration-value" shape="rect"></a><b>Schema Representation Constraint: Enumeration value</b><br clear="none" /><div class="constraint"><div class="p">The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-nv" shape="rect">normalized value</a> 

of the <code>value</code> <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element" class="xpropref" shape="rect">[attribute]</a> must be
<a href="#cvc-datatype-valid" shape="rect">Datatype Valid (&#167;4.1.4)</a> with respect to the 
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> of the <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
corresponding to the 
nearest 
<a href="#element-simpleType" class="eltref" shape="rect">&lt;simpleType&gt;</a> ancestor
element.</div></div></div></div><div class="div4">
<h5><a name="enumeration-validation-rules" id="enumeration-validation-rules" shape="rect"></a>4.3.5.4 enumeration Validation Rules</h5><div class="constraintnote"><a id="cvc-enumeration-valid" name="cvc-enumeration-valid" shape="rect"></a><b>Validation Rule: enumeration valid</b><br clear="none" /><div class="constraint"><div class="p">
A value in a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> is facet-valid with
respect to <a href="#dt-enumeration" class="termref" shape="rect"><span class="arrow">&#183;</span>enumeration<span class="arrow">&#183;</span></a> 
if and only if
the value is 
equal or identical
to
one of the values specified in
<a href="#f-e-value" class="propref" shape="rect">{value}</a>.
</div></div></div><div class="note"><div class="p"><b>Note:</b> As specified normatively elsewhere, for purposes of checking
enumerations, no distinction is made between an atomic value <var>V</var>
and a list of length one containing <var>V</var> as its only item.</div><div class="p">In this question, the behavior of this specification is thus
the same as the behavior specified by <a href="#F_O" shape="rect">[XQuery 1.0 and XPath 2.0 Functions and Operators]</a>
and related specifications.</div></div></div><div class="div4">
<h5><a name="enumeration-coss" id="enumeration-coss" shape="rect"></a>4.3.5.5 Constraints on enumeration Schema Components</h5><div class="constraintnote"><a id="enumeration-valid-restriction" name="enumeration-valid-restriction" shape="rect"></a><b>Schema Component Constraint: enumeration valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if any member of <a href="#f-e-value" class="propref" shape="rect">{value}</a> is not in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div></div></div></div></div><div class="div3">
<h4><a name="rf-whiteSpace" id="rf-whiteSpace" shape="rect"></a>4.3.6 whiteSpace</h4><p>
<span class="termdef"><a name="dt-whiteSpace" id="dt-whiteSpace" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>whiteSpace</b> constrains the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
of types <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#string" shape="rect">string</a> such that
the various behaviors
specified in <a href="http://www.w3.org/TR/xml11/#AVNormalize" shape="rect">Attribute Value Normalization</a>
in <a href="#XML" shape="rect">[XML]</a> are realized.&#160; The value of
<b>whiteSpace</b> must be one of {preserve, replace, collapse}.
</span>
</p><div class="glist"><div class="gitem"><div class="giLabel">preserve</div><div class="giDef"><div class="p">
No normalization is done, the value is not changed (this is the
behavior required  by <a href="#XML" shape="rect">[XML]</a> for element content)
</div></div></div><div class="gitem"><div class="giLabel">replace</div><div class="giDef"><div class="p">
All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage return)
are replaced with #x20 (space)
</div></div></div><div class="gitem"><div class="giLabel">collapse</div><div class="giDef"><div class="p">
After the processing implied by <b>replace</b>, contiguous
sequences of #x20's are collapsed to a single #x20, and any #x20
at the start or end of the string is then removed.
</div></div></div></div><div class="note"><div class="p"><b>Note:</b> 
The notation #xA used here (and elsewhere in this specification)
represents the Universal Character Set (UCS) code point
<code>hexadecimal A</code> (line feed), which is denoted by
U+000A.&#160; This notation is to be distinguished from
<code>&amp;#xA;</code>, which is the XML <a href="http://www.w3.org/TR/xml11/#NT-CharRef" shape="rect">character reference</a> to that same UCS
code point.
</div></div><p>
<b>whiteSpace</b> is applicable to all <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> and
<a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatypes.&#160; For all <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>
datatypes other than <a href="#string" shape="rect">string</a> (and types <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a>
by <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a> from it) the value of <b>whiteSpace</b> is
<code>collapse</code> and cannot be changed by a schema author; for
<a href="#string" shape="rect">string</a> the value of <b>whiteSpace</b> is
<code>preserve</code>; for any type <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> by
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a> from
<a href="#string" shape="rect">string</a> the value of <b>whiteSpace</b> can
be any of the three legal values
(as long as the value is at least as restrictive as
the value of the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>; see
<a href="#whiteSpace-coss" shape="rect">Constraints on whiteSpace Schema Components (&#167;4.3.6.4)</a>).&#160; For all datatypes
<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> by <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> the
value of <b>whiteSpace</b> is <code>collapse</code> and cannot
be changed by a schema author.&#160; For all datatypes
<a href="#dt-constructed" class="termref" shape="rect"><span class="arrow">&#183;</span>constructed<span class="arrow">&#183;</span></a> by <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
&#160;<b>whiteSpace</b> does not apply directly; however, the
normalization behavior of <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> types is controlled by
the value of <b>whiteSpace</b> on that one of the
<a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic members<span class="arrow">&#183;</span></a> 
against which the <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
is successfully validated.
</p><div class="note"><div class="p"><b>Note:</b> 
For more information on <b>whiteSpace</b>, see the
discussion on white space normalization in
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#components" shape="rect">Schema Component Details</a>
in <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div><p>
<a href="#dt-whiteSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>whiteSpace<span class="arrow">&#183;</span></a> provides for:
</p><ul><li><div class="p">
Constraining a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> according to
the white space normalization rules.
</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following example is the 
<a href="#std" class="compref" shape="rect">Simple Type Definition</a> for
the <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a>
<a href="#token" shape="rect">token</a>
datatype.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='token'&gt;
    &lt;restriction base='normalizedString'&gt;
      &lt;whiteSpace value='collapse'/&gt;
    &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div></div><div class="note"><div class="p"><b>Note:</b> The values "<code>replace</code>" and 
"<code>collapse</code>" 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 class="div4">
<h5><a name="dc-whiteSpace" id="dc-whiteSpace" shape="rect"></a>4.3.6.1 The whiteSpace Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-w" id="f-w" shape="rect">whiteSpace</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-w-annotations" shape="rect" id="f-w-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-w-value" shape="rect" id="f-w-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
One of {<span class="enumval">preserve</span>, <span class="enumval">replace</span>, <span class="enumval">collapse</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="f-w-fixed" shape="rect" id="f-w-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
If <a href="#f-w-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then types for which
the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> cannot specify a
value for <a href="#f-w" class="compref" shape="rect">whiteSpace</a> other than <a href="#f-w-value" class="propref" shape="rect">{value}</a>.
</p></div><div class="div4">
<h5><a name="xr-whiteSpace" id="xr-whiteSpace" shape="rect"></a>4.3.6.2 XML Representation of whiteSpace Schema Components</h5><p>
The XML representation for a <a href="#f-w" class="compref" shape="rect">whiteSpace</a> schema
component is a <a href="#element-whiteSpace" class="eltref" shape="rect">&lt;whiteSpace&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>whiteSpace</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-whiteSpace" name="element-whiteSpace" shape="rect">&lt;whiteSpace</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = (<var>collapse</var> | <var>preserve</var> | <var>replace</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/whiteSpace&gt;</p><div class="reprcompmulti"><div class="reprHead"><a href="#dc-whiteSpace" shape="rect">whiteSpace</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="#f-w-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-w-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-w-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-whiteSpace" class="eltref" shape="rect">&lt;whiteSpace&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="whiteSpace-validation-rules" id="whiteSpace-validation-rules" shape="rect"></a>4.3.6.3 whiteSpace Validation Rules</h5><div class="note"><div class="p"><b>Note:</b> 
There are no <a href="#dt-cvc" class="termref" shape="rect"><span class="arrow">&#183;</span>Validation Rule<span class="arrow">&#183;</span></a>s associated 
with
<a href="#dt-whiteSpace" class="termref" shape="rect"><span class="arrow">&#183;</span>whiteSpace<span class="arrow">&#183;</span></a>.
For more information, see the
discussion on white space normalization in
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#components" shape="rect">Schema Component Details</a>
in <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>, in particular
the section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#sec-wsnormalization" shape="rect">3.1.4 
White Space Normalization during Validation</a>.
</div></div></div><div class="div4">
<h5><a name="whiteSpace-coss" id="whiteSpace-coss" shape="rect"></a>4.3.6.4 Constraints on whiteSpace Schema Components</h5><div class="constraintnote"><a id="whiteSpace-valid-restriction" name="whiteSpace-valid-restriction" shape="rect"></a><b>Schema Component Constraint: whiteSpace valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if <a href="#f-w" class="compref" shape="rect">whiteSpace</a>
is among the members of <a href="#std-facets" class="propref" shape="rect">{facets}</a> of
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and any of the following conditions is
true:
</div><div class="constraintlist"><div class="clnumber">1 <span class="p">
<a href="#f-w-value" class="propref" shape="rect">{value}</a> is <em>replace</em> or <em>preserve</em>
and the <a href="#f-w-value" class="propref" shape="rect">{value}</a> of the parent
<a href="#f-w" class="compref" shape="rect">whiteSpace</a> is <em>collapse</em>
</span></div>
<div class="clnumber">2 <span class="p">
<a href="#f-w-value" class="propref" shape="rect">{value}</a> is <em>preserve</em>
and the <a href="#f-w-value" class="propref" shape="rect">{value}</a> of the parent
<a href="#f-w" class="compref" shape="rect">whiteSpace</a> is <em>replace</em>
</span></div>
</div></div></div><div class="note"><div class="p"><b>Note:</b> In order of increasing restrictiveness, the 
legal values for the <a href="#f-w" class="compref" shape="rect">whiteSpace</a> facet are
<b><i>preserve</i></b>, <b><i>collapse</i></b>, and
<b><i>replace</i></b>.  The more restrictive keywords
are more restrictive not in the sense
of accepting progressively fewer instance documents but
in the sense that each corresponds to a progressively smaller,
more tightly restricted value space.</div></div></div></div><div class="div3">
<h4><a name="rf-maxInclusive" id="rf-maxInclusive" shape="rect"></a>4.3.7 maxInclusive</h4><p>
<span class="termdef"><a name="dt-maxInclusive" id="dt-maxInclusive" title="" shape="rect">[Definition:]&#160;&#160;</a>
maxInclusive is the inclusive upper bound of the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> for a datatype with the <a href="#dt-ordered" class="termref" shape="rect"><span class="arrow">&#183;</span>ordered<span class="arrow">&#183;</span></a> property.&#160; The value of
<b>maxInclusive</b>&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> 
be equal to some value
in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
</span>
</p><p>
<a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> provides for:
</p><ul><li><div class="p">
Constraining a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> to values with a
specific inclusive upper
bound.
</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following is the definition of a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatype which limits values to integers less than or equal to
100, using <a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a>.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='one-hundred-or-less'&gt;
  &lt;restriction base='integer'&gt;
    &lt;maxInclusive value='100'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div></div><div class="div4">
<h5><a name="dc-maxInclusive" id="dc-maxInclusive" shape="rect"></a>4.3.7.1 The maxInclusive Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-mai" id="f-mai" shape="rect">maxInclusive</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-mai-annotations" shape="rect" id="f-mai-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-mai-value" shape="rect" id="f-mai-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
Required.<div class="ownDesc">
<p>A value from the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</p></div>
</div>
</div>
<div class="propDefn"><a name="f-mai-fixed" shape="rect" id="f-mai-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
If <a href="#f-mai-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then types for which
the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> cannot specify a
value for <a href="#f-mai" class="compref" shape="rect">maxInclusive</a> other than <a href="#f-mai-value" class="propref" shape="rect">{value}</a>.
</p></div><div class="div4">
<h5><a name="xr-maxInclusive" id="xr-maxInclusive" shape="rect"></a>4.3.7.2 XML Representation of maxInclusive Schema Components</h5><p>
The XML representation for a <a href="#f-mai" class="compref" shape="rect">maxInclusive</a> schema
component is a <a href="#element-maxInclusive" class="eltref" shape="rect">&lt;maxInclusive&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>maxInclusive</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-maxInclusive" name="element-maxInclusive" shape="rect">&lt;maxInclusive</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#dt-anySimpleType" shape="rect">anySimpleType</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/maxInclusive&gt;</p><div class="reprdep">
<a href="#f-mai-value" class="propref" shape="rect">{value}</a>&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> 
be equal to some value
in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div><div class="reprcompmulti"><div class="reprHead"><a href="#dt-maxInclusive" shape="rect">maxInclusive</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="#f-mai-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-mai-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-mai-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-maxInclusive" class="eltref" shape="rect">&lt;maxInclusive&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="maxInclusive-validation-rules" id="maxInclusive-validation-rules" shape="rect"></a>4.3.7.3 maxInclusive Validation Rules</h5><div class="constraintnote"><a id="cvc-maxInclusive-valid" name="cvc-maxInclusive-valid" shape="rect"></a><b>Validation Rule: maxInclusive Valid</b><br clear="none" /><div class="constraint"><div class="p">
A value 
in an <a href="#dt-ordered" class="termref" shape="rect"><span class="arrow">&#183;</span>ordered<span class="arrow">&#183;</span></a>&#160;<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
is facet-valid with respect to 
<a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a>
if and only if 
the value is less than or equal to <a href="#f-mie-value" class="propref" shape="rect">{value}</a>, 
according to the
datatype's order relation.
</div></div></div></div><div class="div4">
<h5><a name="maxInclusive-coss" id="maxInclusive-coss" shape="rect"></a>4.3.7.4 Constraints on maxInclusive Schema Components</h5><div class="constraintnote"><a id="minInclusive-less-than-equal-to-maxInclusive" name="minInclusive-less-than-equal-to-maxInclusive" shape="rect"></a><b>Schema Component Constraint: minInclusive &lt;= maxInclusive</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> for the value specified for
<a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> to be greater than the value
specified for <a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> for the same datatype.
</div></div></div><div class="constraintnote"><a id="maxInclusive-valid-restriction" name="maxInclusive-valid-restriction" shape="rect"></a><b>Schema Component Constraint: maxInclusive valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if any of the following conditions
is true:
</div><div class="constraintlist"><div class="clnumber">1 <span class="p">
<a href="#f-mai" class="compref" shape="rect">maxInclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mai-value" class="propref" shape="rect">{value}</a> is
greater than the <a href="#f-mai-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mai" class="compref" shape="rect">maxInclusive</a>.
</span></div>
<div class="clnumber">2 <span class="p">
<a href="#f-mae" class="compref" shape="rect">maxExclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mai-value" class="propref" shape="rect">{value}</a> is
greater than or equal to the <a href="#f-mae-value" class="propref" shape="rect">{value}</a> of
that
<a href="#f-mae" class="compref" shape="rect">maxExclusive</a>.
</span></div>
<div class="clnumber">3 <span class="p">
<a href="#f-mii" class="compref" shape="rect">minInclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mai-value" class="propref" shape="rect">{value}</a> is
less than the <a href="#f-mii-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mii" class="compref" shape="rect">minInclusive</a>.
</span></div>
<div class="clnumber">4 <span class="p">
<a href="#f-mie" class="compref" shape="rect">minExclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mai-value" class="propref" shape="rect">{value}</a> is
less than or equal to the <a href="#f-mie-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mie" class="compref" shape="rect">minExclusive</a>.
</span></div>
</div></div></div></div></div><div class="div3">
<h4><a name="rf-maxExclusive" id="rf-maxExclusive" shape="rect"></a>4.3.8 maxExclusive</h4><p>
<span class="termdef"><a name="dt-maxExclusive" id="dt-maxExclusive" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>maxExclusive</b> is the  exclusive upper bound of the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> for a datatype with the <a href="#dt-ordered" class="termref" shape="rect"><span class="arrow">&#183;</span>ordered<span class="arrow">&#183;</span></a> property.&#160; The value of
<b>maxExclusive</b> &#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> 
be equal to some value
in the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> or
be equal to <a href="#f-mae-value" class="propref" shape="rect">{value}</a> in <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>. </span>
</p><p>
<a href="#dt-maxExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxExclusive<span class="arrow">&#183;</span></a> provides for:
</p><ul><li><div class="p">
Constraining a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> to values with a
specific exclusive upper
bound.
</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following is the definition of a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatype which limits values to integers less than or equal to
100, using <a href="#dt-maxExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxExclusive<span class="arrow">&#183;</span></a>.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='less-than-one-hundred-and-one'&gt;
  &lt;restriction base='integer'&gt;
    &lt;maxExclusive value='101'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div><div class="exampleWrapper">
<div class="p">
Note that the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of this datatype is identical to
the previous one (named 'one-hundred-or-less').
</div></div></div><div class="div4">
<h5><a name="dc-maxExclusive" id="dc-maxExclusive" shape="rect"></a>4.3.8.1 The maxExclusive Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-mae" id="f-mae" shape="rect">maxExclusive</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-mae-annotations" shape="rect" id="f-mae-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-mae-value" shape="rect" id="f-mae-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
Required.<div class="ownDesc">
<p>A value from the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</p></div>
</div>
</div>
<div class="propDefn"><a name="f-mae-fixed" shape="rect" id="f-mae-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
If <a href="#f-mae-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then types for which
the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> cannot specify a
value for <a href="#f-mae" class="compref" shape="rect">maxExclusive</a> other than <a href="#f-mae-value" class="propref" shape="rect">{value}</a>.
</p></div><div class="div4">
<h5><a name="xr-maxExclusive" id="xr-maxExclusive" shape="rect"></a>4.3.8.2 XML Representation of maxExclusive Schema Components</h5><p>
The XML representation for a <a href="#f-mae" class="compref" shape="rect">maxExclusive</a> schema
component is a <a href="#element-maxExclusive" class="eltref" shape="rect">&lt;maxExclusive&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>maxExclusive</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-maxExclusive" name="element-maxExclusive" shape="rect">&lt;maxExclusive</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#dt-anySimpleType" shape="rect">anySimpleType</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/maxExclusive&gt;</p><div class="reprdep">
<a href="#f-mae-value" class="propref" shape="rect">{value}</a>&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> 
be equal to some value
in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div><div class="reprcompmulti"><div class="reprHead"><a href="#dt-maxExclusive" shape="rect">maxExclusive</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="#f-mae-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-mae-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-mae-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-maxExclusive" class="eltref" shape="rect">&lt;maxExclusive&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="maxExclusive-validation-rules" id="maxExclusive-validation-rules" shape="rect"></a>4.3.8.3 maxExclusive Validation Rules</h5><div class="constraintnote"><a id="cvc-maxExclusive-valid" name="cvc-maxExclusive-valid" shape="rect"></a><b>Validation Rule: maxExclusive Valid</b><br clear="none" /><div class="constraint"><div class="p">
A value 
in an <a href="#dt-ordered" class="termref" shape="rect"><span class="arrow">&#183;</span>ordered<span class="arrow">&#183;</span></a> 
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
is facet-valid with respect to 
<a href="#dt-maxExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxExclusive<span class="arrow">&#183;</span></a>
if and only if 
the value is less than <a href="#f-mie-value" class="propref" shape="rect">{value}</a>, according to the
datatype's order relation.
</div></div></div></div><div class="div4">
<h5><a name="maxExclusive-coss" id="maxExclusive-coss" shape="rect"></a>4.3.8.4 Constraints on maxExclusive Schema Components</h5><div class="constraintnote"><a id="maxInclusive-maxExclusive" name="maxInclusive-maxExclusive" shape="rect"></a><b>Schema Component Constraint: maxInclusive and maxExclusive</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> for both
<a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> and <a href="#dt-maxExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxExclusive<span class="arrow">&#183;</span></a>
to be specified in the same derivation step of a 
<a href="#std" class="compref" shape="rect">Simple Type Definition</a>.
</div></div></div><div class="constraintnote"><a id="minExclusive-less-than-equal-to-maxExclusive" name="minExclusive-less-than-equal-to-maxExclusive" shape="rect"></a><b>Schema Component Constraint: minExclusive &lt;= maxExclusive</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> for the value specified for
<a href="#dt-minExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minExclusive<span class="arrow">&#183;</span></a> to be greater than the value
specified for <a href="#dt-maxExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxExclusive<span class="arrow">&#183;</span></a> for the same datatype.
</div></div></div><div class="constraintnote"><a id="maxExclusive-valid-restriction" name="maxExclusive-valid-restriction" shape="rect"></a><b>Schema Component Constraint: maxExclusive valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if any of the following conditions
is true:
</div><div class="constraintlist"><div class="clnumber">1 <span class="p">
<a href="#f-mae" class="compref" shape="rect">maxExclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mae-value" class="propref" shape="rect">{value}</a> is
greater than the <a href="#f-mae-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mae" class="compref" shape="rect">maxExclusive</a>.
</span></div>
<div class="clnumber">2 <span class="p">
<a href="#f-mai" class="compref" shape="rect">maxInclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mae-value" class="propref" shape="rect">{value}</a> is
greater than the <a href="#f-mai-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mai" class="compref" shape="rect">maxInclusive</a>.
</span></div>
<div class="clnumber">3 <span class="p">
<a href="#f-mii" class="compref" shape="rect">minInclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mae-value" class="propref" shape="rect">{value}</a> is
less than or equal to the <a href="#f-mii-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mii" class="compref" shape="rect">minInclusive</a>.
</span></div>
<div class="clnumber">4 <span class="p">
<a href="#f-mie" class="compref" shape="rect">minExclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mae-value" class="propref" shape="rect">{value}</a> is
less than or equal to the <a href="#f-mie-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mie" class="compref" shape="rect">minExclusive</a>.
</span></div>
</div></div></div></div></div><div class="div3">
<h4><a name="rf-minExclusive" id="rf-minExclusive" shape="rect"></a>4.3.9 minExclusive</h4><p>
<span class="termdef"><a name="dt-minExclusive" id="dt-minExclusive" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>minExclusive</b> is the  exclusive lower bound of the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> for a datatype with the <a href="#dt-ordered" class="termref" shape="rect"><span class="arrow">&#183;</span>ordered<span class="arrow">&#183;</span></a> property. The value of
<b>minExclusive</b>&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> 
be equal to some value
in the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> or
be equal to <a href="#f-mie-value" class="propref" shape="rect">{value}</a> in <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>. </span>
</p><p>
<a href="#dt-minExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minExclusive<span class="arrow">&#183;</span></a> provides for:
</p><ul><li><div class="p">
Constraining a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> to values with a
specific exclusive lower bound.
</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following is the definition of a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatype which limits values to integers greater than or equal to
100, using <a href="#dt-minExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minExclusive<span class="arrow">&#183;</span></a>.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='more-than-ninety-nine'&gt;
  &lt;restriction base='integer'&gt;
    &lt;minExclusive value='99'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div><div class="exampleWrapper">
<div class="p">
Note that the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of this datatype is identical to the 
following
one (named 'one-hundred-or-more').
</div></div></div><div class="div4">
<h5><a name="dc-minExclusive" id="dc-minExclusive" shape="rect"></a>4.3.9.1 The minExclusive Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-mie" id="f-mie" shape="rect">minExclusive</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-mie-annotations" shape="rect" id="f-mie-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-mie-value" shape="rect" id="f-mie-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
Required.<div class="ownDesc">
<p>A value from the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</p></div>
</div>
</div>
<div class="propDefn"><a name="f-mie-fixed" shape="rect" id="f-mie-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
If <a href="#f-mie-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then types for which
the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> cannot specify a
value for <a href="#f-mie" class="compref" shape="rect">minExclusive</a> other than <a href="#f-mie-value" class="propref" shape="rect">{value}</a>.
</p></div><div class="div4">
<h5><a name="xr-minExclusive" id="xr-minExclusive" shape="rect"></a>4.3.9.2 XML Representation of minExclusive Schema Components</h5><p>
The XML representation for a <a href="#f-mie" class="compref" shape="rect">minExclusive</a> schema
component is a <a href="#element-minExclusive" class="eltref" shape="rect">&lt;minExclusive&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>minExclusive</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-minExclusive" name="element-minExclusive" shape="rect">&lt;minExclusive</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#dt-anySimpleType" shape="rect">anySimpleType</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/minExclusive&gt;</p><div class="reprdep">
<a href="#f-mie-value" class="propref" shape="rect">{value}</a>&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> 
be equal to some value
in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div><div class="reprcompmulti"><div class="reprHead"><a href="#dt-minExclusive" shape="rect">minExclusive</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="#f-mie-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-mie-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-mie-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-minExclusive" class="eltref" shape="rect">&lt;minExclusive&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="minExclusive-validation-rules" id="minExclusive-validation-rules" shape="rect"></a>4.3.9.3 minExclusive Validation Rules</h5><div class="constraintnote"><a id="cvc-minExclusive-valid" name="cvc-minExclusive-valid" shape="rect"></a><b>Validation Rule: minExclusive Valid</b><br clear="none" /><div class="constraint"><div class="p">
A value in an <a href="#dt-ordered" class="termref" shape="rect"><span class="arrow">&#183;</span>ordered<span class="arrow">&#183;</span></a>&#160;<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
is facet-valid with respect to <a href="#dt-minExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minExclusive<span class="arrow">&#183;</span></a> 
if and only if
the value is greater than 
<a href="#f-mie-value" class="propref" shape="rect">{value}</a>, according to the
datatype's order relation.
</div></div></div></div><div class="div4">
<h5><a name="minExclusive-coss" id="minExclusive-coss" shape="rect"></a>4.3.9.4 Constraints on minExclusive Schema Components</h5><div class="constraintnote"><a id="minInclusive-minExclusive" name="minInclusive-minExclusive" shape="rect"></a><b>Schema Component Constraint: minInclusive and minExclusive</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> for both <a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> and
<a href="#dt-minExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minExclusive<span class="arrow">&#183;</span></a> to be specified in the same derivation step of a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>.
</div></div></div><div class="constraintnote"><a id="minExclusive-less-than-maxInclusive" name="minExclusive-less-than-maxInclusive" shape="rect"></a><b>Schema Component Constraint: minExclusive &lt; maxInclusive</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> for the value specified for
<a href="#dt-minExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minExclusive<span class="arrow">&#183;</span></a> to be greater than or equal to the value
specified for <a href="#dt-maxInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxInclusive<span class="arrow">&#183;</span></a> for the same datatype.
</div></div></div><div class="constraintnote"><a id="minExclusive-valid-restriction" name="minExclusive-valid-restriction" shape="rect"></a><b>Schema Component Constraint: minExclusive valid restriction</b><br clear="none" /><div class="constraint"><div class="p">It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if any of the following conditions is true:</div><div class="constraintlist"><div class="clnumber">1 <span class="p">
<a href="#f-mie" class="compref" shape="rect">minExclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mie-value" class="propref" shape="rect">{value}</a> is
less than the <a href="#f-mie-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mie" class="compref" shape="rect">minExclusive</a>.
</span></div>
<div class="clnumber">2 <span class="p">
<a href="#f-mii" class="compref" shape="rect">minInclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mie-value" class="propref" shape="rect">{value}</a> is
less than the <a href="#f-mii-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mii" class="compref" shape="rect">minInclusive</a>.
</span></div>
<div class="clnumber">3 <span class="p">
<a href="#f-mai" class="compref" shape="rect">maxInclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and <a href="#f-mie-value" class="propref" shape="rect">{value}</a> is
greater than or equal to the
<a href="#f-mai-value" class="propref" shape="rect">{value}</a> of that <a href="#f-mai" class="compref" shape="rect">maxInclusive</a>.
</span></div>
<div class="clnumber">4 <span class="p">
<a href="#f-mae" class="compref" shape="rect">maxExclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mae-value" class="propref" shape="rect">{value}</a> is
greater than or equal to the <a href="#f-mae-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mae" class="compref" shape="rect">maxExclusive</a>.
</span></div>
</div></div></div></div></div><div class="div3">
<h4><a name="rf-minInclusive" id="rf-minInclusive" shape="rect"></a>4.3.10 minInclusive</h4><p>
<span class="termdef"><a name="dt-minInclusive" id="dt-minInclusive" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>minInclusive</b> is the  inclusive lower bound of the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> for a datatype with the <a href="#dt-ordered" class="termref" shape="rect"><span class="arrow">&#183;</span>ordered<span class="arrow">&#183;</span></a> property.&#160; The value of
<b>minInclusive</b> &#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> 
be equal to some value 
in the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
</span>
</p><p>
<a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> provides for:
</p><ul><li><div class="p">
Constraining a <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> to values with a
specific inclusive lower
bound.
</div></li></ul><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following is the definition of a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatype which limits values to integers greater than or equal to
100, using <a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a>.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='one-hundred-or-more'&gt;
  &lt;restriction base='integer'&gt;
    &lt;minInclusive value='100'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div></div><div class="div4">
<h5><a name="dc-minInclusive" id="dc-minInclusive" shape="rect"></a>4.3.10.1 The minInclusive Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-mii" id="f-mii" shape="rect">minInclusive</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-mii-annotations" shape="rect" id="f-mii-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-mii-value" shape="rect" id="f-mii-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
Required.<div class="ownDesc">
<p>A value from the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.</p></div>
</div>
</div>
<div class="propDefn"><a name="f-mii-fixed" shape="rect" id="f-mii-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
If <a href="#f-mii-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then types for which
the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> cannot specify a
value for <a href="#f-mii" class="compref" shape="rect">minInclusive</a> other than <a href="#f-mii-value" class="propref" shape="rect">{value}</a>.
</p></div><div class="div4">
<h5><a name="xr-minInclusive" id="xr-minInclusive" shape="rect"></a>4.3.10.2 XML Representation of minInclusive Schema Components</h5><p>
The XML representation for a <a href="#f-mii" class="compref" shape="rect">minInclusive</a> schema
component is a <a href="#element-minInclusive" class="eltref" shape="rect">&lt;minInclusive&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>minInclusive</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-minInclusive" name="element-minInclusive" shape="rect">&lt;minInclusive</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#dt-anySimpleType" shape="rect">anySimpleType</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/minInclusive&gt;</p><div class="reprdep">
<a href="#f-mii-value" class="propref" shape="rect">{value}</a>&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> 
be equal to some value 
in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</div><div class="reprcompmulti"><div class="reprHead"><a href="#dt-minInclusive" shape="rect">minInclusive</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="#f-mii-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-mii-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-mii-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-minInclusive" class="eltref" shape="rect">&lt;minInclusive&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="minInclusive-validation-rules" id="minInclusive-validation-rules" shape="rect"></a>4.3.10.3 minInclusive Validation Rules</h5><div class="constraintnote"><a id="cvc-minInclusive-valid" name="cvc-minInclusive-valid" shape="rect"></a><b>Validation Rule: minInclusive Valid</b><br clear="none" /><div class="constraint"><div class="p">
A value in an <a href="#dt-ordered" class="termref" shape="rect"><span class="arrow">&#183;</span>ordered<span class="arrow">&#183;</span></a>&#160;<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>
is facet-valid with respect to <a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> 
if and only if
the value is greater than or equal to
<a href="#f-mie-value" class="propref" shape="rect">{value}</a>, according to the
datatype's order relation.</div></div></div></div><div class="div4">
<h5><a name="minInclusive-coss" id="minInclusive-coss" shape="rect"></a>4.3.10.4 Constraints on minInclusive Schema Components</h5><div class="constraintnote"><a id="minInclusive-less-than-maxExclusive" name="minInclusive-less-than-maxExclusive" shape="rect"></a><b>Schema Component Constraint: minInclusive &lt; maxExclusive</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> for the value specified for
<a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> to be greater than or equal to the value
specified for <a href="#dt-maxExclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>maxExclusive<span class="arrow">&#183;</span></a> for the same datatype.
</div></div></div><div class="constraintnote"><a id="minInclusive-valid-restriction" name="minInclusive-valid-restriction" shape="rect"></a><b>Schema Component Constraint: minInclusive valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if any of the following conditions
is true:
</div><div class="constraintlist"><div class="clnumber">1 <span class="p">
<a href="#f-mii" class="compref" shape="rect">minInclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mii-value" class="propref" shape="rect">{value}</a> is
less than the <a href="#f-mii-value" class="propref" shape="rect">{value}</a> of
that
<a href="#f-mii" class="compref" shape="rect">minInclusive</a>.
</span></div>
<div class="clnumber">2 <span class="p">
<a href="#f-mai" class="compref" shape="rect">maxInclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mii-value" class="propref" shape="rect">{value}</a> is
greater the <a href="#f-mai-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mai" class="compref" shape="rect">maxInclusive</a>.
</span></div>
<div class="clnumber">3 <span class="p">
<a href="#f-mie" class="compref" shape="rect">minExclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mii-value" class="propref" shape="rect">{value}</a> is
less than or equal to the <a href="#f-mie-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mie" class="compref" shape="rect">minExclusive</a>.
</span></div>
<div class="clnumber">4 <span class="p">
<a href="#f-mae" class="compref" shape="rect">maxExclusive</a> is among the members of
<a href="#std-facets" class="propref" shape="rect">{facets}</a> of <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
and <a href="#f-mii-value" class="propref" shape="rect">{value}</a> is
greater than or equal to the <a href="#f-mae-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#f-mae" class="compref" shape="rect">maxExclusive</a>.
</span></div>
</div></div></div></div></div><div class="div3">
<h4><a name="rf-totalDigits" id="rf-totalDigits" shape="rect"></a>4.3.11 totalDigits</h4><p>
<span class="termdef"><a name="dt-totalDigits" id="dt-totalDigits" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>totalDigits</b> 
restricts the magnitude and 
arithmetic 
precision 
of values in the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> 
of 
<a href="#decimal" shape="rect">decimal</a> 
and datatypes derived from it.
</span>

</p><p>
For <a href="#decimal" shape="rect">decimal</a>,
if the <a href="#f-td-value" class="propref" shape="rect">{value}</a> of <a href="#f-td" class="compref" shape="rect">totalDigits</a> is
<var>t</var>, the effect is to require that values be equal to
<var>i</var>&#160;/&#160;10<sup><var>n</var></sup>, for some
integers <var>i</var> and <var>n</var>, with 
|&#160;<var>i</var>&#160;| &lt; 10<sup><var>t</var></sup>
and
0&#160;&#8804;&#160;<var>n</var>&#160;&#8804;&#160;<var>t</var>.
This has as a consequence that the values are expressible
using at most <var>t</var> digits in decimal notation.
</p><p>
The <a href="#f-td-value" class="propref" shape="rect">{value}</a> of 
<a href="#f-td" class="compref" shape="rect">totalDigits</a> <span class="rfc2119">must</span> be
a <a href="#positiveInteger" shape="rect">positiveInteger</a>.
</p><p>
The term 'totalDigits' is chosen to reflect the fact that
it restricts the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> to those values that
can be represented lexically using at most 
<em>totalDigits</em> digits in
decimal notation, or at most <em>totalDigits</em> digits
for the coefficient, in scientific notation.&#160;
Note that it does not restrict
the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> directly; a lexical
representation that adds 
non-significant
leading or trailing 
zero digits is still permitted.
It also has no effect on the values 
NaN, INF, and -INF.
</p><div class="div4">
<h5><a name="dc-totalDigits" id="dc-totalDigits" shape="rect"></a>4.3.11.1 The totalDigits Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-td" id="f-td" shape="rect">totalDigits</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-td-annotations" shape="rect" id="f-td-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-td-value" shape="rect" id="f-td-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
An xs:positiveInteger value.  Required.</div>
</div>
<div class="propDefn"><a name="f-td-fixed" shape="rect" id="f-td-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
If <a href="#f-td-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then types for which
the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> 


<span class="rfc2119">must</span> not specify a
value for <a href="#f-td" class="compref" shape="rect">totalDigits</a> other than
<a href="#f-td-value" class="propref" shape="rect">{value}</a>.
</p></div><div class="div4">
<h5><a name="xr-totalDigits" id="xr-totalDigits" shape="rect"></a>4.3.11.2 XML Representation of totalDigits Schema Components</h5><p>
The XML representation for a <a href="#f-td" class="compref" shape="rect">totalDigits</a> schema
component is a <a href="#element-totalDigits" class="eltref" shape="rect">&lt;totalDigits&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>totalDigits</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-totalDigits" name="element-totalDigits" shape="rect">&lt;totalDigits</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#positiveInteger" shape="rect">positiveInteger</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/totalDigits&gt;</p><div class="reprcompmulti"><div class="reprHead"><a href="#dc-totalDigits" shape="rect">totalDigits</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="#f-td-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-td-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-td-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-totalDigits" class="eltref" shape="rect">&lt;totalDigits&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="totalDigits-validation-rules" id="totalDigits-validation-rules" shape="rect"></a>4.3.11.3 totalDigits Validation Rules</h5><div class="constraintnote"><a id="cvc-totalDigits-valid" name="cvc-totalDigits-valid" shape="rect"></a><b>Validation Rule: totalDigits Valid</b><br clear="none" /><div class="constraint"><div class="p">A value <var>v</var>
is facet-valid with respect to a <a href="#f-td" class="compref" shape="rect">totalDigits</a> facet with 
a <a href="#f-td-value" class="propref" shape="rect">{value}</a> of <var>t</var> if and only 
if <var>v</var> is a 
<a href="#decimal" shape="rect">decimal</a> value equal to 
<var>i</var>&#160;/&#160;10<sup><var>n</var></sup>, 
for some
integers <var>i</var> and <var>n</var>, with 
|&#160;<var>i</var>&#160;| &lt; 10<sup><var>t</var></sup>
and
0&#160;&#8804;&#160;<var>n</var>&#160;&#8804;&#160;<var>t</var>.
</div></div></div></div><div class="div4">
<h5><a name="totalDigits-coss" id="totalDigits-coss" shape="rect"></a>4.3.11.4 Constraints on totalDigits Schema Components</h5><div class="constraintnote"><a id="totalDigits-valid-restriction" name="totalDigits-valid-restriction" shape="rect"></a><b>Schema Component Constraint: totalDigits valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if the <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner<span class="arrow">&#183;</span></a>'s
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>
has a <a href="#f-td" class="compref" shape="rect">totalDigits</a> facet 
among its <a href="#std-facets" class="propref" shape="rect">{facets}</a>
and
<a href="#f-td-value" class="propref" shape="rect">{value}</a> is
greater than the <a href="#f-td-value" class="propref" shape="rect">{value}</a> of
that <a href="#f-td" class="compref" shape="rect">totalDigits</a> facet.
</div></div></div></div></div><div class="div3">
<h4><a name="rf-fractionDigits" id="rf-fractionDigits" shape="rect"></a>4.3.12 fractionDigits</h4><p>
<span class="termdef"><a name="dt-fractionDigits" id="dt-fractionDigits" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>fractionDigits</b>
places an upper limit on the 
arithmetic precision 
of <a href="#decimal" shape="rect">decimal</a> values: if the <a href="#f-fd-value" class="propref" shape="rect">{value}</a> of
<b>fractionDigits</b> = <var>f</var>, then the value space is
restricted to values equal to
<var>i</var>&#160;/&#160;10<sup><var>n</var></sup> for some integers
<var>i</var> and
<var>n</var> and 
0 &#8804; <var>n</var> &#8804; <var>f</var>.</span>
The value of
<b>fractionDigits</b>&#160;<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> be a <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a>
</p><p>
The term <b>fractionDigits</b> is chosen to reflect the fact that it 
restricts the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> to those values that can be 
represented lexically 
in decimal notation using at most 
<em>fractionDigits</em> 
to the right of the decimal point. Note that it does not restrict 
the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> directly; a 
lexical representation that adds 
non-significant
leading or trailing zero digits is still permitted.
</p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following is the definition of a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
datatype which could be used to represent the magnitude
of a person's body temperature on the Celsius scale.
This definition would appear in a schema authored by an "end-user"
and shows how to define a datatype by specifying facet values which
constrain the range of the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='celsiusBodyTemp'&gt;
  &lt;restriction base='decimal'&gt;
    &lt;fractionDigits value='1'/&gt;
    &lt;minInclusive value='32'/&gt;
	 &lt;maxInclusive value='41.7'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;
</pre></div></div><div class="div4">
<h5><a name="dc-fractionDigits" id="dc-fractionDigits" shape="rect"></a>4.3.12.1 The fractionDigits Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-fd" id="f-fd" shape="rect">fractionDigits</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-fd-annotations" shape="rect" id="f-fd-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-fd-value" shape="rect" id="f-fd-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
An xs:nonNegativeInteger value.  Required.</div>
</div>
<div class="propDefn"><a name="f-fd-fixed" shape="rect" id="f-fd-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>
If <a href="#f-fd-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then
types for which the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> 
<span class="rfc2119">must</span> not
specify a value for <a href="#f-fd" class="compref" shape="rect">fractionDigits</a> other
than <a href="#f-fd-value" class="propref" shape="rect">{value}</a>.
</p></div><div class="div4">
<h5><a name="xr-fractionDigits" id="xr-fractionDigits" shape="rect"></a>4.3.12.2 XML Representation of fractionDigits Schema Components</h5><p>
The XML representation for a <a href="#f-fd" class="compref" shape="rect">fractionDigits</a> schema
component is a <a href="#element-fractionDigits" class="eltref" shape="rect">&lt;fractionDigits&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>fractionDigits</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-fractionDigits" name="element-fractionDigits" shape="rect">&lt;fractionDigits</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/fractionDigits&gt;</p><div class="reprcompmulti"><div class="reprHead"><a href="#dc-fractionDigits" shape="rect">fractionDigits</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="#f-fd-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-fd-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-fd-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-fractionDigits" class="eltref" shape="rect">&lt;fractionDigits&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="fractionDigits-validation-rules" id="fractionDigits-validation-rules" shape="rect"></a>4.3.12.3 fractionDigits Validation Rules</h5><div class="constraintnote"><a id="cvc-fractionDigits-valid" name="cvc-fractionDigits-valid" shape="rect"></a><b>Validation Rule: fractionDigits Valid</b><br clear="none" /><div class="constraint"><div class="p">
A value 
is facet-valid with
respect to <a href="#dt-fractionDigits" class="termref" shape="rect"><span class="arrow">&#183;</span>fractionDigits<span class="arrow">&#183;</span></a> 
if and only if


that value is equal to
<var>i</var>&#160;/&#160;10<sup><var>n</var></sup> for integer
<var>i</var> and
<var>n</var>, with 
0 &#8804; <var>n</var> &#8804; <a href="#f-fd-value" class="propref" shape="rect">{value}</a>.

</div></div></div></div><div class="div4">
<h5><a name="fractionDigits-coss" id="fractionDigits-coss" shape="rect"></a>4.3.12.4 Constraints on fractionDigits Schema Components</h5><div class="constraintnote"><a id="fractionDigits-totalDigits" name="fractionDigits-totalDigits" shape="rect"></a><b>Schema Component Constraint: fractionDigits less than or equal to totalDigits</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> for 
the <a href="#f-fd-value" class="propref" shape="rect">{value}</a> of 
<a href="#f-fd" class="compref" shape="rect">fractionDigits</a>
to be greater than
that of <a href="#f-td" class="compref" shape="rect">totalDigits</a>.
</div></div></div><div class="constraintnote"><a id="fractionDigits-valid-restriction" name="fractionDigits-valid-restriction" shape="rect"></a><b>Schema Component Constraint: fractionDigits valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
It is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> if <a href="#dt-fractionDigits" class="termref" shape="rect"><span class="arrow">&#183;</span>fractionDigits<span class="arrow">&#183;</span></a> is among the members of <a href="#std-facets" class="propref" shape="rect">{facets}</a> of
<a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> and
<a href="#f-fd-value" class="propref" shape="rect">{value}</a> is greater than the <a href="#f-fd-value" class="propref" shape="rect">{value}</a> of 
that
<a href="#dt-fractionDigits" class="termref" shape="rect"><span class="arrow">&#183;</span>fractionDigits<span class="arrow">&#183;</span></a>.
</div></div></div></div></div><div class="div3">
<h4><a name="rf-assertions" id="rf-assertions" shape="rect"></a>4.3.13 Assertions</h4><p><span class="termdef"><a name="dt-assertions" id="dt-assertions" title="" shape="rect">[Definition:]&#160;&#160;</a>
       <b>Assertions</b> constrain  the
       <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> by requiring the values to satisfy specified XPath
       (<a href="#XPATH2" shape="rect">[XPath 2.0]</a>) expressions. The value of 
       the <a href="#f-a" class="compref" shape="rect">assertions</a> facet
       
       is a sequence of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#as" shape="rect">Assertion</a>
       components as defined in
	<a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.</span></p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<p>The following is the definition of a <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a>
   datatype which allows all integers but 0 by using an assertion to
   disallow the value 0.</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='nonZeroInteger'&gt;
  &lt;restriction base='integer'&gt;
    &lt;assertion test='$value ne 0'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;
</pre></div></div><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<p>The following example defines the datatype "triple",
       whose <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> is the set of integers evenly divisible by 
       three.</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='triple'&gt;
  &lt;restriction base='integer'&gt;
    &lt;assertion test='$value mod 3 eq 0'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div><div class="exampleWrapper">
<p>The same datatype can be defined without the use of assertions,
       but the pattern necessary to represent the set of triples is
       long and error-prone:</p></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='triple'&gt;
  &lt;restriction base='integer'&gt;
    &lt;pattern value=
    "([0369]|[147][0369]*[258]|(([258]|[147][0369]*[147])([0369]|[258][0369]*[147])*([147]|[258][0369]*[258]))*"/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div><div class="exampleWrapper">
<p>The assertion used in the first version of "triple" is
       likely to be clearer for many readers of the schema document.</p></div></div><div class="div4">
<h5><a name="dc-assertions" id="dc-assertions" shape="rect"></a>4.3.13.1 The assertions Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-a" id="f-a" shape="rect">assertions</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-a-annotations" shape="rect" id="f-a-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-a-value" shape="rect" id="f-a-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
<div class="ownDesc">
<p>A sequence of <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#as" shape="rect">Assertion</a> components.</p></div>
</div>
</div>
</div></div>
</div>
</div>
</div><div class="div4">
<h5><a name="xr-assertions" id="xr-assertions" shape="rect"></a>4.3.13.2 XML Representation of assertions Schema Components</h5><p>The XML representation for an <a href="#f-a" class="compref" shape="rect">assertions</a> schema component is
   one or more <a href="#element-assertion" class="eltref" shape="rect">&lt;assertion&gt;</a> element information items. The
   correspondences between the properties of the information item and
   properties of the component are as follows:</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>assertion</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-assertion" name="element-assertion" shape="rect">&lt;assertion</a><br clear="none" />&#160;&#160;id = <a href="#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="#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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/assertion&gt;</p><div class="reprcompmulti"><div class="reprHead"><a href="#dc-assertions" shape="rect">assertions</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="#f-a-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
     A sequence whose members are <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#as" shape="rect">Assertion</a>s drawn from the following sources,
     in order:
	 <div class="constraintlist"><div class="clnumber">1 <span class="p">If the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> of the
	    <a href="#dt-owner" class="termref" shape="rect"><span class="arrow">&#183;</span>owner<span class="arrow">&#183;</span></a> has an <a href="#f-a" class="compref" shape="rect">assertions</a> facet among its
	    <a href="#std-facets" class="propref" shape="rect">{facets}</a>, then the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#as" shape="rect">Assertion</a>s which appear in the 
	    <a href="#f-p-value" class="propref" shape="rect">{value}</a> of that
	    <a href="#f-a" class="compref" shape="rect">assertions</a> facet.</span></div>
<div class="clnumber">2 <span class="p"><a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#as" shape="rect">Assertion</a>s corresponding to the <a href="#element-assertion" class="eltref" shape="rect">&lt;assertion&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-restriction" class="eltref" shape="rect">&lt;restriction&gt;</a>,
	    if any, in document order.  For
	     details of the construction of the <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#as" shape="rect">Assertion</a> components, see
	     <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-assertion" shape="rect">section 3.13.2</a>
	     of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
	   </span></div>
</div>
    </div><div class="mapSep">&#160;</div><div class="mapProp"><a href="#f-a-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">
     The empty sequence.
     <div class="note"><div class="p"><b>Note:</b> 
      Annotations specified within an <a href="#element-assertion" class="eltref" shape="rect">&lt;assertion&gt;</a> element are captured by
      the individual <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#as" shape="rect">Assertion</a> component to which it maps.
     </div></div>
    </div></div></div></div><div class="div4">
<h5><a name="assertions-validation-rules" id="assertions-validation-rules" shape="rect"></a>4.3.13.3 Assertions Validation Rules</h5><p>The following rule refers to
"the nearest built-in" datatype
and to the "XDM representation" of a value
under a datatype.  

<span class="termdef"><a name="dt-optype" id="dt-optype" title="" shape="rect">[Definition:]&#160;&#160;</a>For
any datatype <var>T</var>, the <b>nearest built-in datatype</b> to
<var>T</var> is the first <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatype encountered in following
the chain of links connecting each datatype to its
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.  If <var>T</var> is a <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatype, then the
nearest built-in datatype of <var>T</var> is <var>T</var> itself; otherwise,
it is the nearest built-in datatype of <var>T</var>'s <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.</span>

</p><div class="p">
<div class="termdef"><a name="dt-xdmrep" id="dt-xdmrep" title="" shape="rect">[Definition:]&#160;&#160;</a>For 
any value <var>V</var> 
and any datatype
<var>T</var>, the <b>XDM representation of <var>V</var> under 
<var>T</var></b> is 
defined recursively as follows.  Call the XDM representation
<var>X</var>.  Then<div class="constraintlist"><div class="clnumber">1 <span class="p">If <var>T</var> = <a href="#dt-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> or <a href="#dt-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a> then <var>X</var> is <var>V</var>,
and the <a href="http://www.w3.org/TR/xpath20/#dt-dynamic-type" shape="rect">dynamic
type</a> of <var>X</var> is <code>xs:untypedAtomic</code>.
</span></div>
<div class="clnumber">2 <span class="p">If <var>T</var> . <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>atomic</i></b>,
then 

let <var>T2</var> be the <a href="#dt-optype" class="termref" shape="rect"><span class="arrow">&#183;</span>nearest built-in datatype<span class="arrow">&#183;</span></a> to <var>T</var>.
If <var>V</var> is a member of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <var>T2</var>, then 
<var>X</var> is <var>V</var> and the
<a href="http://www.w3.org/TR/xpath20/#dt-dynamic-type" shape="rect">dynamic type</a>
of <var>X</var> is <var>T2</var>.
Otherwise (i.e. if <var>V</var> is not a member of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <var>T2</var>),
<var>X</var> is the <a href="#dt-xdmrep" class="termref" shape="rect"><span class="arrow">&#183;</span>XDM representation<span class="arrow">&#183;</span></a> of <var>V</var> 
under <var>T2</var> . <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</span></div>
<div class="clnumber">3 <span class="p">If <var>T</var> . <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>,
then <var>X</var> is a sequence of atomic values, each atomic value 
being the <a href="#dt-xdmrep" class="termref" shape="rect"><span class="arrow">&#183;</span>XDM representation<span class="arrow">&#183;</span></a> of the corresponding
item in the list <var>V</var> under <var>T</var> . <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>.
</span></div>
<div class="clnumber">4 <span class="p">If <var>T</var> . <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>union</i></b>,
then <var>X</var> is the <a href="#dt-xdmrep" class="termref" shape="rect"><span class="arrow">&#183;</span>XDM representation<span class="arrow">&#183;</span></a> of <var>V</var>
under the <a href="#dt-active-basic-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active basic member<span class="arrow">&#183;</span></a> of <var>V</var>
when validated against <var>T</var>.
If there is no <a href="#dt-active-basic-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active basic member<span class="arrow">&#183;</span></a>,
then <var>V</var> has no <a href="#dt-xdmrep" class="termref" shape="rect"><span class="arrow">&#183;</span>XDM representation<span class="arrow">&#183;</span></a> under <var>T</var>.</span></div>
</div>
</div>
<div class="note"><div class="p"><b>Note:</b> If the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a> of a
<a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> is a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, or the <a href="#dt-active-basic-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active basic member<span class="arrow">&#183;</span></a> is
a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>, then several steps may be necessary before the <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a>
datatype which serves as the <a href="http://www.w3.org/TR/xpath20/#dt-dynamic-type" shape="rect">dynamic
type</a> of <var>X</var> is found.
</div><div class="p">Because the <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>
of a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> is required to be an <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> or <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype,
and the <a href="#dt-active-basic-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active basic member<span class="arrow">&#183;</span></a> of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> 
which accepts the value <var>V</var> is by definition not a 
<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, the recursive rule given above is guaranteed to
terminate in a sequence of one or more <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> values,
each belonging to an <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatype.</div></div>


</div><div class="constraintnote"><a id="cvc-assertions-valid" name="cvc-assertions-valid" shape="rect"></a><b>Validation Rule: Assertions Valid</b><br clear="none" /><div class="constraint"><div class="p">A value <var>V</var> 
	is facet-valid with respect to an 
	<a href="#f-a" class="compref" shape="rect">assertions</a> facet 
	belonging to a simple type <var>T</var>
	if and only if the {test}
	property of each <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#as" shape="rect">Assertion</a> in its <a href="#f-a-value" class="propref" shape="rect">{value}</a>	evaluates to <code>true</code> under the
	conditions laid out below, without raising any
	<a href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-dynamic-error" shape="rect">dynamic error</a> or
	<a href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-type-error" shape="rect">type error</a>.</div><div class="p">Evaluation of {test} is performed as defined in
	<a href="#XPATH2" shape="rect">[XPath 2.0]</a>, with the following conditions:</div><div class="constraintlist"><div class="clnumber">1 <!--* no span class='p' possible here *-->The XPath expression {test} is evaluated,
	  following the rules given in <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#cvc-xpath" shape="rect">XPath Evaluation</a>
	   of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>,
	    with the
	   following modifications.
	  <div class="constraintlist"><div class="clnumber">1.1 <span class="p">
	     The <a href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-in-scope-variables" shape="rect">in-scope variables</a>
	     in the <a href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-static-context" shape="rect">static context</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 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 class="clnumber">1.2 <span class="p">There is no <a href="http://www.w3.org/TR/xpath20/#dt-context-item" shape="rect">context
	      item</a> for the evaluation of the XPath expression.
            </span><div class="note"><div class="p"><b>Note:</b> In the terminology of <a href="#XPATH2" shape="rect">[XPath 2.0]</a>, the
	      <a href="http://www.w3.org/TR/xpath20/#dt-context-item" shape="rect">context
	       item</a> is "undefined".
	     </div></div><div class="note"><div class="p"><b>Note:</b> 
	      As a consequence the expression '<code>.</code>', 
	      or any implicit or
	      explicit reference to the context item, will raise a
	      dynamic error, which will cause the assertion to be treated as false.
	      If an error is detected statically, then the assertion
	      violates the schema component constraint
	      <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#xpath-valid" shape="rect">XPath Valid</a>
	      and causes an error to be flagged in the schema.
	     </div><div class="p">The variable "<code>$value</code>" can be
	      used to refer to the value being checked.
	     </div></div></div>
<div class="clnumber">1.3 <span class="p">There is likewise no value for the 
	     <a href="http://www.w3.org/TR/xpath20/#dt-context-size" shape="rect">context 
	      size</a>
	     and the 
	     <a href="http://www.w3.org/TR/xpath20/#dt-context-position" shape="rect">context 
	      position</a> in the <a href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-dynamic-context" shape="rect">dynamic context</a>
	     used for evaluation of the assertion.
             
            </span></div>
<div class="clnumber">1.4 <span class="p">
	     The <a href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-variable-values" shape="rect">variable values</a>
	     in the <a href="http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-dynamic-context" shape="rect">dynamic context</a>
	     is a set with a single member. The <code>expanded QName</code>
	     of that member has no 
             namespace URI
             and '<code>value</code>' as the local
	     name. The <code>value</code> of the member is
             the 
             <a href="#dt-xdmrep" class="termref" shape="rect"><span class="arrow">&#183;</span>XDM representation<span class="arrow">&#183;</span></a> of <var>V</var>
             under <var>T</var>.
           </span></div>
<div class="clnumber">1.5 <span class="p">If <var>V</var> has no <a href="#dt-xdmrep" class="termref" shape="rect"><span class="arrow">&#183;</span>XDM representation<span class="arrow">&#183;</span></a> under <var>T</var>,
             then the XPath expression cannot usefully be evaluated,
             and <var>V</var> is not facet-valid against the <a href="#f-a" class="compref" shape="rect">assertions</a>
             facet of <var>T</var>.
           </span></div>
</div>
	 </div>
<div class="clnumber">2 <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/2007/REC-xpath-functions-20070123/#func-boolean" shape="rect">fn:boolean</a> function.</span></div>
</div></div></div></div><div class="div4">
<h5><a name="assertions-coss" id="assertions-coss" shape="rect"></a>4.3.13.4 Constraints on assertions Schema Components</h5><div class="constraintnote"><a id="cos-assertions-restriction" name="cos-assertions-restriction" shape="rect"></a><b>Schema Component Constraint: Valid restriction of assertions</b><br clear="none" /><div class="constraint"><div class="p">The <a href="#f-a-value" class="propref" shape="rect">{value}</a> of the <a href="#f-a" class="compref" shape="rect">assertions</a> facet
   on the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> <span class="rfc2119">must</span> be a prefix of
   the <a href="#f-a-value" class="propref" shape="rect">{value}</a>.</div><div class="note"><div class="p"><b>Note:</b> For components constructed from XML representations in schema documents, 
     the satisfaction of this constraint is a consequence of the XML mapping rules:
     any assertion imposed by a simple type definition <var>S</var> will always 
     also be imposed by any type derived from <var>S</var> by <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>.
     This constraint ensures that components constructed by other means
     (so-called "born-binary" components) similarly preserve
    <a href="#f-a" class="compref" shape="rect">assertions</a> facets across <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>.</div></div></div></div></div></div><div class="div3">
<h4><a name="rf-explicitTimezone" id="rf-explicitTimezone" shape="rect"></a>4.3.14 explicitTimezone</h4><p><span class="termdef"><a name="dt-timezone" id="dt-timezone" title="" shape="rect">[Definition:]&#160;&#160;</a>
<b>explicitTimezone</b> is a  
three-valued facet which can can be used to 
require or prohibit the time zone offset in date/time datatypes.</span></p><div class="exampleOuter">
<div class="exampleHeader">Example</div>
<div class="exampleWrapper">
<div class="p">
The following <a href="#dt-user-defined" class="termref" shape="rect"><span class="arrow">&#183;</span>user-defined<span class="arrow">&#183;</span></a> datatype accepts only 
<a href="#date" shape="rect">date</a> values without a time zone offset,
using the <a href="#f-tz" class="compref" shape="rect">explicitTimezone</a> facet.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='bare-date'&gt;
  &lt;restriction base='date'&gt;
    &lt;explicitTimezone value='prohibited'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div><div class="exampleWrapper">
<div class="p">
The same effect could also be achieved using the 
<a href="#f-p" class="compref" shape="rect">pattern</a> facet, as shown below,
but it is somewhat less clear what is going on in 
this derivation, and it is better practice to use
the more straightforward <a href="#f-tz" class="compref" shape="rect">explicitTimezone</a> 
for this purpose.
</div></div><div class="exampleInner">
<pre xml:space="preserve">&lt;simpleType name='bare-date'&gt;
  &lt;restriction base='date'&gt;
    &lt;pattern value='[^:Z]*'/&gt;
  &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div></div><div class="div4">
<h5><a name="dc-explicitTimezone" id="dc-explicitTimezone" shape="rect"></a>4.3.14.1 The explicitTimezone Schema Component</h5><div class="schemaComp">
<div class="component">
<div class="compHeader">
<span class="schemaComp">Schema&#160;Component: </span><a name="f-tz" id="f-tz" shape="rect">explicitTimezone</a></div>
<div class="compBody">
<div class="propList">
<div class="propDefn"><a name="f-tz-annotations" shape="rect" id="f-tz-annotations"></a><div class="pdName"><span class="propdef">{annotations}</span></div>
<div class="pdDef">
A sequence of  <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#a" class="compref" shape="rect">Annotation</a> components.  </div>
</div>
<div class="propDefn"><a name="f-tz-value" shape="rect" id="f-tz-value"></a><div class="pdName"><span class="propdef">{value}</span></div>
<div class="pdDef">
One of {<span class="enumval">required</span>, <span class="enumval">prohibited</span>, <span class="enumval">optional</span>}.  Required.</div>
</div>
<div class="propDefn"><a name="f-tz-fixed" shape="rect" id="f-tz-fixed"></a><div class="pdName"><span class="propdef">{fixed}</span></div>
<div class="pdDef">
An xs:boolean value.  Required.</div>
</div>
</div></div>
</div>
</div>
<p>If <a href="#f-tz-fixed" class="propref" shape="rect">{fixed}</a> is <em>true</em>, then datatypes for which
the current type is the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> cannot specify a
value for <a href="#f-tz" class="compref" shape="rect">explicitTimezone</a> other than <a href="#f-tz-value" class="propref" shape="rect">{value}</a>.</p><div class="note"><div class="p"><b>Note:</b> It is a consequence of 
<a href="#timezone-valid-restriction" shape="rect">timezone valid restriction (&#167;4.3.14.4)</a> that the value of
the <a href="#f-tz" class="compref" shape="rect">explicitTimezone</a> facet cannot be changed unless that
value is <b><i>optional</i></b>, regardless of
whether <a href="#f-tz-fixed" class="propref" shape="rect">{fixed}</a> is 
<b><i>true</i></b> or <b><i>false</i></b>.&#160; Accordingly,
<a href="#f-tz-fixed" class="propref" shape="rect">{fixed}</a> is relevant only when
<a href="#f-tz-value" class="propref" shape="rect">{value}</a> is <b><i>optional</i></b>.</div></div></div><div class="div4">
<h5><a name="xr-timezone" id="xr-timezone" shape="rect"></a>4.3.14.2 XML Representation of explicitTimezone Schema Components</h5><p>
The XML representation for an <a href="#f-tz" class="compref" shape="rect">explicitTimezone</a> schema
component is an <a href="#element-explicitTimezone" class="eltref" shape="rect">&lt;explicitTimezone&gt;</a> element information item. The
correspondences between the properties of the information item and
properties of the component are as follows:
</p><div class="reprdef"><div class="reprHeader"><span class="reprdef">XML Representation Summary</span>: <code>explicitTimezone</code>&#160;Element Information Item</div><div class="reprBody"><p class="element-syntax-1"><a id="element-explicitTimezone" name="element-explicitTimezone" shape="rect">&lt;explicitTimezone</a><br clear="none" />&#160;&#160;fixed = <a href="#boolean" shape="rect">boolean</a>&#160;:&#160;false<br clear="none" />&#160;&#160;id = <a href="#ID" shape="rect">ID</a><br clear="none" />&#160;&#160;<b>value</b> = <a href="#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="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#element-annotation" class="eltref" shape="rect">annotation</a>?)<br clear="none" />&lt;/explicitTimezone&gt;</p><div class="reprcompmulti"><div class="reprHead"><a href="#dc-explicitTimezone" shape="rect">explicitTimezone</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="#f-tz-value" class="propref" shape="rect">{value}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>value</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="#f-tz-fixed" class="propref" shape="rect">{fixed}</a></div><div class="mapRepr">
The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-vv" shape="rect">actual value</a> of the <code>fixed</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="#f-tz-annotations" class="propref" shape="rect">{annotations}</a></div><div class="mapRepr">

The <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#key-am-one" shape="rect">annotation mapping</a> of the 
<a href="#element-explicitTimezone" class="eltref" shape="rect">&lt;explicitTimezone&gt;</a> 
element, as defined in 
  section <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#declare-annotation" shape="rect">XML Representation of Annotation Schema Components</a>
  of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
</div></div></div></div><div class="div4">
<h5><a name="timezone-vr" id="timezone-vr" shape="rect"></a>4.3.14.3 explicitTimezone Validation Rules</h5><div class="constraintnote"><a id="cvc-explicitTimezone-valid" name="cvc-explicitTimezone-valid" shape="rect"></a><b>Validation Rule: explicitOffset Valid</b><br clear="none" /><div class="constraint"><div class="p">
A <a href="#dateTime" shape="rect">dateTime</a> value <var>V</var>
is facet-valid with respect to <a href="#dt-timezone" class="termref" shape="rect"><span class="arrow">&#183;</span>explicitTimezone<span class="arrow">&#183;</span></a> 
if and only if
<b>one</b> of the following is true<div class="constraintlist"><div class="clnumber">1 <span class="p">The <a href="#f-tz-value" class="propref" shape="rect">{value}</a> of the facet is
<b><i>required</i></b> and <var>V</var> has a (non-<b><i>absent</i></b>)
value for the <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
property.</span></div>
<div class="clnumber">2 <span class="p">The <a href="#f-tz-value" class="propref" shape="rect">{value}</a> of the facet is
<b><i>prohibited</i></b> and the value for the <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
property in <var>V</var> is <b><i>absent</i></b>.</span></div>
<div class="clnumber">3 <span class="p">The <a href="#f-tz-value" class="propref" shape="rect">{value}</a> of the facet is
<b><i>optional</i></b>.</span></div>
</div>
</div></div></div></div><div class="div4">
<h5><a name="timezone-coss" id="timezone-coss" shape="rect"></a>4.3.14.4 Constraints on explicitTimezone Schema Components</h5><div class="constraintnote"><a id="timezone-valid-restriction" name="timezone-valid-restriction" shape="rect"></a><b>Schema Component Constraint: timezone valid restriction</b><br clear="none" /><div class="constraint"><div class="p">
If the <a href="#f-tz" class="compref" shape="rect">explicitTimezone</a> facet
on the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a> 
has a <a href="#f-tz-value" class="propref" shape="rect">{value}</a> other than <b><i>optional</i></b>,
then 
the <a href="#f-tz-value" class="propref" shape="rect">{value}</a> of the facet on the
<a href="#dt-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> <span class="rfc2119">must</span> be equal to the <a href="#f-tz-value" class="propref" shape="rect">{value}</a> on 
the <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>; otherwise
it is an <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a>.</div><div class="note"><div class="p"><b>Note:</b> The effect of this rule is to allow datatypes with
a <a href="#f-tz" class="compref" shape="rect">explicitTimezone</a> value of <b><i>optional</i></b> to be
restricted by specifying a value of <b><i>required</i></b>
or <b><i>prohibited</i></b>, and to forbid any other derivations
using this facet.
</div></div></div></div></div></div></div></div><div class="div1">
<h2><a name="conformance" id="conformance" shape="rect"></a>5 Conformance</h2><p><em>XSD 1.1: Datatypes</em> is intended
to be usable in a variety of contexts.</p><p>In the usual case, it will embedded in a
<b>host language</b> such as <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>,
which refers to this specification normatively to define some part of
the host language. In some cases, <em>XSD 1.1: Datatypes</em> may
be implemented independently of any host language.
</p><div class="block">Certain aspects of the behavior of conforming
processors are described in this specification as 
<a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> or <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
<ul><li><div class="p"><span class="termdef"><a name="key-impl-def" id="key-impl-def" title="" shape="rect">[Definition:]&#160;&#160;</a>Something
which <span class="rfc2119">may</span> vary among conforming implementations, but which <span class="rfc2119">must</span>
be specified by the implementor for each particular implementation,
is <b>implementation-defined</b>.</span></div></li><li><div class="p"><span class="termdef"><a name="key-impl-dep" id="key-impl-dep" title="" shape="rect">[Definition:]&#160;&#160;</a>Something
which <span class="rfc2119">may</span> vary among conforming implementations, is not specified by
this or any W3C specification, and is not required to be specified
by the implementor for any particular implementation,
is <b>implementation-dependent</b>.</span>
</div></li></ul>
Anything described in this specification as <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> or 
<a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a> <span class="rfc2119">may</span> be further constrained by the specifications 
of a host language in which the datatypes and other material
specified here are used.
A list of implementation-defined and implementation-dependent
features can be found in <a href="#idef-idep" shape="rect">Implementation-defined and implementation-dependent features (normative) (&#167;H)</a>
</div><div class="div2">
<h3><span class="nav"> <a href="#independent-impl" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="hostlangs" id="hostlangs" shape="rect"></a>5.1 Host Languages</h3><p>When <em>XSD 1.1: Datatypes</em> is embedded in a host
language, the definition of conformance is specified by the
host language, not by this specification.  That is, when this
specification is implemented in the context of an implementation
of a host language, the question of conformance to this 
specification (separate from the host language) does not arise.</p><p>This specification imposes certain constraints on the
embedding of <em>XSD 1.1: Datatypes</em> by a host
language; these are indicated in the normative text by
the use of the verbs '<span class="rfc2119">must</span>', etc., 
with the phrase "host language" as the subject
of the verb.</p><div class="note"><div class="p"><b>Note:</b> For convenience, the most important of these constraints
are noted here:<ul><li><div class="p">Host languages <span class="rfc2119">should</span> specify  that all of the datatypes decribed
here as built-ins are automatically available.</div></li><li><div class="p">Host languages <span class="rfc2119">may</span> specify that additional datatypes are also
made available automatically.</div></li><li><div class="p">If user-defined datatypes are to be supported in the host language,
then the host language <span class="rfc2119">must</span> specify how user-defined datatypes are
defined and made available for use.</div></li></ul>
</div></div><p>
In addition, host languages <span class="rfc2119">must</span> require conforming 
implementations of
the host language to obey all of the constraints and rules
specified here.</p></div><div class="div2">
<h3><span class="nav"><a href="#hostlangs" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#data-conformance" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="independent-impl" id="independent-impl" shape="rect"></a>5.2 Independent implementations</h3><div class="p"><div class="termdef"><a name="dt-minimally-conforming" id="dt-minimally-conforming" title="" shape="rect">[Definition:]&#160;&#160;</a>Implementations claiming <b>minimal conformance</b> to this specification
independent of any host language <span class="rfc2119">must</span> do 
<b>all</b> of the following:<div class="constraintlist"><div class="clnumber">1<a id="support-all-primitives" name="support-all-primitives" shape="rect"> </a><span class="p">Support all the <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatypes defined in this specification.</span></div>
<div class="clnumber">2<a id="implement-all-cos" name="implement-all-cos" shape="rect"> </a><span class="p">Completely and correctly implement all of 
the <a href="#dt-cos" class="termref" shape="rect"><span class="arrow">&#183;</span>constraints on schemas<span class="arrow">&#183;</span></a>
defined in this specification.</span></div>
<div class="clnumber">3<a id="implement-all-vr" name="implement-all-vr" shape="rect"> </a><span class="p">Completely and correctly implement all of 
the <a href="#dt-cvc" class="termref" shape="rect"><span class="arrow">&#183;</span>Validation Rules<span class="arrow">&#183;</span></a>
defined in this specification, when checking the
datatype validity of literals against datatypes.</span></div>
</div>
</div>
</div><div class="block">Implementations claiming <b>schema-document-aware conformance</b> 
to this specification, independent of any host language <span class="rfc2119">must</span> be
minimally conforming.  In addition, they must do 
<b>all</b> of the following:<div class="constraintlist"><div class="clnumber">1<a id="accept-std" name="accept-std" shape="rect"> </a><span class="p">Accept simple type definitions in the form specified in 
<a href="#datatype-components" shape="rect">Datatype components (&#167;4)</a>.</span></div>
<div class="clnumber">2<a id="implement-all-xrc" name="implement-all-xrc" shape="rect"> </a><span class="p">Completely and correctly implement all of 
rules governing the XML representation of simple type definitions
specified in <a href="#datatype-components" shape="rect">Datatype components (&#167;4)</a>.</span></div>
<div class="clnumber">3<a id="map-xml-component" name="map-xml-component" shape="rect"> </a><span class="p">Map the XML representations of simple type definitions to
simple type definition components as specified in the mapping
rules given in <a href="#datatype-components" shape="rect">Datatype components (&#167;4)</a>.</span></div>
</div>
</div><div class="note"><div class="p"><b>Note:</b> The term <b>schema-document aware</b> is used here for
parallelism with the corresponding term in <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>.
The reference to schema documents may be taken as referring
to the fact that schema-document-aware implementations accept
the XML representation of simple type definitions found in
XSD schema documents.  It does <em>not</em> mean that
the simple type definitions must themselves be free-standing
XML documents, nor that they typically will be.
</div></div></div><div class="div2">
<h3><span class="nav"><a href="#independent-impl" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#partial-implementation" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="data-conformance" id="data-conformance" shape="rect"></a>5.3 Conformance of data</h3><p>Abstract representations of simple type definitions conform to this
specification if and only if they obey all of the <a href="#dt-cos" class="termref" shape="rect"><span class="arrow">&#183;</span>constraints on schemas<span class="arrow">&#183;</span></a> defined in this
specification.</p><p>XML representations of simple type definitions conform to this
specification if they obey all of the applicable rules
defined in this specification.</p><div class="note"><div class="p"><b>Note:</b> Because the conformance of the resulting simple type definition
component depends not only on the XML representation of a given
simple type definition, but on the properties of its 
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>, the conformance of an XML representation of a 
simple type definition does not guarantee that, in the 
context of other schema components, it will map to 
a conforming component.</div></div></div><div class="div2">
<h3><span class="nav"><a href="#data-conformance" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="partial-implementation" id="partial-implementation" shape="rect"></a>5.4 Partial Implementation of Infinite Datatypes</h3><p>Some <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes defined in this specification have
infinite <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a>; no finite implementation can completely
handle all their possible values. For some such datatypes, minimum
implementation limits are specified below. For other infinite types
such as <a href="#string" shape="rect">string</a>, 
<a href="#hexBinary" shape="rect">hexBinary</a>, and
<a href="#base64Binary" shape="rect">base64Binary</a>, no minimum implementation limits are
specified.
</p><p>When this specification is used in the context of other languages
(as it is, for example, by <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>), the
host language may specify other minimum implementation limits.</p><p>
When presented with a literal or value exceeding the capacity of
its partial implementation of a datatype, a minimally conforming
implementation of this specification will sometimes be unable to
determine with certainty whether the value is datatype-valid or
not.  Sometimes it will be unable to represent the value correctly
through its interface to any downsteam application.
</p><p>
When either of these is so, a conforming processor <span class="rfc2119">must</span> indicate
to the user and/or downstream application that it cannot process
the input data with assured correctness (much as it would indicate
if it ran out of memory).  When the datatype validity of a value
or literal is uncertain because it exceeds the capacity of a
partial implementation, the literal or value <span class="rfc2119">must not</span> be treated
as invalid, and the unsupported value <span class="rfc2119">must not</span> be quietly changed
to a supported value.
</p><p>
This specification does not constrain the method used to indicate
that a literal or value in the input data has exceeded the
capacity of the implementation, or the form such indications take.
</p><p><a href="#dt-minimally-conforming" class="termref" shape="rect"><span class="arrow">&#183;</span>Minimally
conforming<span class="arrow">&#183;</span></a> processors
which set an application- or <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> limit 
on the size of the values supported <span class="rfc2119">must</span> clearly document
that limit.</p><div class="block">These are the partial-implementation
<a href="#dt-minimally-conforming" class="termref" shape="rect"><span class="arrow">&#183;</span>minimal conformance<span class="arrow">&#183;</span></a>
requirements:<ul><li><div class="p">All <a href="#dt-minimally-conforming" class="termref" shape="rect"><span class="arrow">&#183;</span>minimally conforming<span class="arrow">&#183;</span></a> processors
<span class="rfc2119">must</span> support <a href="#decimal" shape="rect">decimal</a> values whose absolute value can be expressed as
<var>i</var>&#160;/&#160;10<sup><var>k</var></sup>, where
<var>i</var> and <var>k</var> are nonnegative integers such that
<var>i</var> &lt; 10<sup>16</sup> and
<var>k</var> &#8804; 16 (i.e., those expressible with sixteen total
digits).</div></li><li id="loc6048"><div class="p">All <a href="#dt-minimally-conforming" class="termref" shape="rect"><span class="arrow">&#183;</span>minimally conforming<span class="arrow">&#183;</span></a>
processors <span class="rfc2119">must</span> support nonnegative
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> values
less than 10000 (i.e., those expressible with four
digits) in all datatypes
which use the seven-property model defined in
<a href="#theSevenPropertyModel" shape="rect">The Seven-property Model (&#167;D.2.1)</a>
and have a non-<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> value for
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>
(i.e. <a href="#dateTime" shape="rect">dateTime</a>,
<a href="#dateTimeStamp" shape="rect">dateTimeStamp</a>,
<a href="#date" shape="rect">date</a>,
<a href="#gYearMonth" shape="rect">gYearMonth</a>, and
<a href="#gYear" shape="rect">gYear</a>).
.</div></li><li><div class="p">All <a href="#dt-minimally-conforming" class="termref" shape="rect"><span class="arrow">&#183;</span>minimally conforming<span class="arrow">&#183;</span></a>
processors <span class="rfc2119">must</span> support
<a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> values to
milliseconds (i.e. those expressible with three
fraction digits)
in all datatypes 
which use the seven-property model defined in
<a href="#theSevenPropertyModel" shape="rect">The Seven-property Model (&#167;D.2.1)</a>
and have a non-<a href="#key-null" class="termref" shape="rect"><span class="arrow">&#183;</span>absent<span class="arrow">&#183;</span></a> value for
<a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a>
(i.e. <a href="#dateTime" shape="rect">dateTime</a>,
<a href="#dateTimeStamp" shape="rect">dateTimeStamp</a>, and
<a href="#time" shape="rect">time</a>).
.</div></li><li><div class="p">All <a href="#dt-minimally-conforming" class="termref" shape="rect"><span class="arrow">&#183;</span>minimally conforming<span class="arrow">&#183;</span></a> processors
<span class="rfc2119">must</span> support fractional-second <a href="#duration" shape="rect">duration</a> values to
milliseconds (i.e. those expressible with three fraction digits).
</div></li><li><div class="p">All <a href="#dt-minimally-conforming" class="termref" shape="rect"><span class="arrow">&#183;</span>minimally conforming<span class="arrow">&#183;</span></a>
processors <span class="rfc2119">must</span> support <a href="#duration" shape="rect">duration</a> values with
<a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> values in the range &#8722;119999 to 119999
months (9999 years and 11 months) and <a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a>
values in the range &#8722;31622400 to 31622400 seconds (one
leap-year).</div></li></ul>
</div></div></div></div><div class="back"><div class="div1">
<h2><a name="schema" id="schema" shape="rect"></a>A Schema for Schema Documents (Datatypes)
 (normative)</h2><p>The XML representation of the datatypes-relevant
part of the schema for schema documents is presented here
as a normative
part of the specification.
Independent copies of this material are
available in an undated (mutable) version at
<a href="http://www.w3.org/2009/XMLSchema/datatypes.xsd" shape="rect">http://www.w3.org/2009/XMLSchema/datatypes.xsd</a>
and in a dated (immutable) version at
<a href="http://www.w3.org/2011/07/datatypes.xsd" shape="rect">http://www.w3.org/2011/07/datatypes.xsd</a>
&#8212; the mutable version will be updated with future revisions of 
this specification, and the immutable one will not.


</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 XML Schema language, the <code>targetNamespace</code> 
attribute on the <code>schema</code> element refers to the XML Schema 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.3)</a>.
</p><div class="sfsScrap" id="div_schema-for-datatypes">
<a id="schema-for-datatypes" name="schema-for-datatypes" shape="rect"></a>
<div class="sfsHead">Schema for Schema Documents (Datatypes)</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;!--
        Make sure that processors that do not read the external
        subset will know about the various IDs we declare
  --&gt;
        &lt;!ATTLIST xs:simpleType id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:maxExclusive id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:minExclusive id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:maxInclusive id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:minInclusive id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:totalDigits id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:fractionDigits id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:length id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:minLength id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:maxLength id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:enumeration id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:pattern id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:assertion id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:explicitTimezone id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:appinfo id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:documentation id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:list id ID #IMPLIED&gt;
        &lt;!ATTLIST xs:union 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="datatypes.xsd (cr-20110721)"&gt;
  &lt;xs:annotation&gt;
    &lt;xs:documentation source="../datatypes/datatypes.html"&gt;
      The schema corresponding to this document is normative,
      with respect to the syntactic constraints it expresses in the
      XML Schema language.  The documentation (within 'documentation'
      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:simpleType name="derivationControl"&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="substitution"/&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:group name="simpleDerivation"&gt;
    &lt;xs:choice&gt;
      &lt;xs:element ref="xs:restriction"/&gt;
      &lt;xs:element ref="xs:list"/&gt;
      &lt;xs:element ref="xs:union"/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:group&gt;
  &lt;xs:simpleType name="simpleDerivationSet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
   #all or (possibly empty) subset of {restriction, extension, union, list}
   &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: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="list"/&gt;
              &lt;xs:enumeration value="union"/&gt;
              &lt;xs:enumeration value="restriction"/&gt;
              &lt;xs:enumeration value="extension"/&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="simpleType" abstract="true"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:group ref="xs:simpleDerivation"/&gt;
        &lt;xs:attribute name="final" type="xs:simpleDerivationSet"/&gt;
        &lt;xs:attribute name="name" type="xs:NCName"&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
              Can be restricted to required or forbidden
            &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:complexType name="topLevelSimpleType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:simpleType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:simpleDerivation"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" type="xs:NCName" use="required"&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
              Required at the top level
            &lt;/xs:documentation&gt;
          &lt;/xs:annotation&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:complexType name="localSimpleType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:simpleType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;xs:group ref="xs:simpleDerivation"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="name" use="prohibited"&gt;
          &lt;xs:annotation&gt;
            &lt;xs:documentation&gt;
              Forbidden when nested
            &lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="final" 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="simpleType" type="xs:topLevelSimpleType" id="simpleType"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-simpleType"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="facet" abstract="true"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation&gt;
        An abstract element, representing facets in general.
        The facets defined by this spec are substitutable for
        this element, and implementation-defined facets should
        also name this as a substitution-group head.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:group name="simpleRestrictionModel"&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/&gt;
      &lt;xs:choice minOccurs="0" 
          maxOccurs="unbounded"&gt;
        &lt;xs:element ref="xs:facet"/&gt;
        &lt;xs:any processContents="lax"
            namespace="##other"/&gt;
      &lt;/xs:choice&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:group&gt;
  &lt;xs:element name="restriction" id="restriction"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:annotation&gt;
        &lt;xs:documentation
             source="http://www.w3.org/TR/xmlschema11-2/#element-restriction"&gt;
          base attribute and simpleType child are mutually
          exclusive, but one or other is required
        &lt;/xs:documentation&gt;
      &lt;/xs:annotation&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base="xs:annotated"&gt;
          &lt;xs:group ref="xs:simpleRestrictionModel"/&gt;
          &lt;xs:attribute name="base" type="xs:QName" use="optional"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="list" id="list"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:annotation&gt;
        &lt;xs:documentation
             source="http://www.w3.org/TR/xmlschema11-2/#element-list"&gt;
          itemType attribute and simpleType child are mutually
          exclusive, but one or other is required
        &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:element name="simpleType" type="xs:localSimpleType"
                        minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="itemType" type="xs:QName" use="optional"/&gt;
        &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="union" id="union"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:annotation&gt;
        &lt;xs:documentation
             source="http://www.w3.org/TR/xmlschema11-2/#element-union"&gt;
          memberTypes attribute must be non-empty or there must be
          at least one simpleType child
        &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:element name="simpleType" type="xs:localSimpleType"
                        minOccurs="0" maxOccurs="unbounded"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="memberTypes" use="optional"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:list itemType="xs:QName"/&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="facet"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="xs:annotated"&gt;
        &lt;xs:attribute name="value" use="required"/&gt;
        &lt;xs:attribute name="fixed" type="xs:boolean" default="false"
                      use="optional"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:complexType name="noFixedFacet"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:facet"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="fixed" 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="minExclusive" type="xs:facet"  
    id="minExclusive"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-minExclusive"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="minInclusive" type="xs:facet" 
    id="minInclusive"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-minInclusive"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="maxExclusive" type="xs:facet" 
    id="maxExclusive"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-maxExclusive"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="maxInclusive" type="xs:facet"  
    id="maxInclusive"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-maxInclusive"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:complexType name="numFacet"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:facet"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="value"  
            type="xs:nonNegativeInteger" 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="intFacet"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:facet"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute name="value" type="xs:integer" 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:element name="totalDigits" id="totalDigits"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-totalDigits"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:restriction base="xs:numFacet"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="value" type="xs:positiveInteger" 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:element&gt;
  &lt;xs:element name="fractionDigits" type="xs:numFacet"  
    id="fractionDigits"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-fractionDigits"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;

  &lt;xs:element name="length" type="xs:numFacet" id="length"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-length"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="minLength" type="xs:numFacet"  
    id="minLength"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-minLength"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="maxLength" type="xs:numFacet"  
    id="maxLength"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-maxLength"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="enumeration" type="xs:noFixedFacet"  
    id="enumeration"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-enumeration"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="whiteSpace" id="whiteSpace"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-whiteSpace"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:restriction base="xs:facet"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="value" use="required"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="preserve"/&gt;
                &lt;xs:enumeration value="replace"/&gt;
                &lt;xs:enumeration value="collapse"/&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&gt;
  &lt;xs:element name="pattern" id="pattern"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-pattern"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:restriction base="xs:noFixedFacet"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="value" type="xs:string"  
              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:element&gt;
  &lt;xs:element name="assertion" type="xs:assertion"
              id="assertion" substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-assertion"/&gt;
    &lt;/xs:annotation&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="explicitTimezone" id="explicitTimezone"
    substitutionGroup="xs:facet"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation
           source="http://www.w3.org/TR/xmlschema11-2/#element-explicitTimezone"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:restriction base="xs:facet"&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="value" use="required"&gt;
            &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="optional"/&gt;
                &lt;xs:enumeration value="required"/&gt;
                &lt;xs:enumeration value="prohibited"/&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&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/datatypes.xsd.

      At the date of issue it can also be found at the URI
      http://www.w3.org/2009/XMLSchema/datatypes.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/datatypes.xsd will change accordingly; 
      the version at http://www.w3.org/2011/07/datatypes.xsd will not change.

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

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

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

        http://www.w3.org/2001/05/datatypes.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="dtd-for-datatypeDefs" id="dtd-for-datatypeDefs" shape="rect"></a>B DTD for Datatype Definitions (non-normative)</h2><p>The DTD for the datatypes-specific
aspects of 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><div class="sfsScrap" id="div_dtd-for-datatypes">
<a id="dtd-for-datatypes" name="dtd-for-datatypes" shape="rect"></a>
<div class="sfsHead">DTD for datatype definitions</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;!--
        DTD for XML Schemas: Part 2: Datatypes
        
        Id: datatypes.dtd,v 1.1.2.4 2005/01/31 18:40:42 cmsmcq Exp 
        Note this DTD is NOT normative, or even definitive.
  --&gt;

&lt;!--
        This DTD cannot be used on its own, it is intended
        only for incorporation in XMLSchema.dtd, q.v.
  --&gt;

&lt;!-- Define all the element names, with optional prefix --&gt;
&lt;!ENTITY % simpleType "%p;simpleType"&gt;
&lt;!ENTITY % restriction "%p;restriction"&gt;
&lt;!ENTITY % list "%p;list"&gt;
&lt;!ENTITY % union "%p;union"&gt;
&lt;!ENTITY % maxExclusive "%p;maxExclusive"&gt;
&lt;!ENTITY % minExclusive "%p;minExclusive"&gt;
&lt;!ENTITY % maxInclusive "%p;maxInclusive"&gt;
&lt;!ENTITY % minInclusive "%p;minInclusive"&gt;
&lt;!ENTITY % totalDigits "%p;totalDigits"&gt;
&lt;!ENTITY % fractionDigits "%p;fractionDigits"&gt;

&lt;!ENTITY % length "%p;length"&gt;
&lt;!ENTITY % minLength "%p;minLength"&gt;
&lt;!ENTITY % maxLength "%p;maxLength"&gt;
&lt;!ENTITY % enumeration "%p;enumeration"&gt;
&lt;!ENTITY % whiteSpace "%p;whiteSpace"&gt;
&lt;!ENTITY % pattern "%p;pattern"&gt;

&lt;!ENTITY % assertion "%p;assertion"&gt;

&lt;!ENTITY % explicitTimezone "%p;explicitTimezone"&gt;


&lt;!--
        Customization 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 schemas
  --&gt;

&lt;!ENTITY % simpleTypeAttrs ""&gt;
&lt;!ENTITY % restrictionAttrs ""&gt;
&lt;!ENTITY % listAttrs ""&gt;
&lt;!ENTITY % unionAttrs ""&gt;
&lt;!ENTITY % maxExclusiveAttrs ""&gt;
&lt;!ENTITY % minExclusiveAttrs ""&gt;
&lt;!ENTITY % maxInclusiveAttrs ""&gt;
&lt;!ENTITY % minInclusiveAttrs ""&gt;
&lt;!ENTITY % totalDigitsAttrs ""&gt;
&lt;!ENTITY % fractionDigitsAttrs ""&gt;
&lt;!ENTITY % lengthAttrs ""&gt;
&lt;!ENTITY % minLengthAttrs ""&gt;
&lt;!ENTITY % maxLengthAttrs ""&gt;

&lt;!ENTITY % enumerationAttrs ""&gt;
&lt;!ENTITY % whiteSpaceAttrs ""&gt;
&lt;!ENTITY % patternAttrs ""&gt;
&lt;!ENTITY % assertionAttrs ""&gt;
&lt;!ENTITY % explicitTimezoneAttrs ""&gt;

&lt;!-- Define some entities for informative use as attribute
        types --&gt;
&lt;!ENTITY % URIref "CDATA"&gt;
&lt;!ENTITY % XPathExpr "CDATA"&gt;
&lt;!ENTITY % QName "NMTOKEN"&gt;
&lt;!ENTITY % QNames "NMTOKENS"&gt;
&lt;!ENTITY % NCName "NMTOKEN"&gt;
&lt;!ENTITY % nonNegativeInteger "NMTOKEN"&gt;
&lt;!ENTITY % boolean "(true|false)"&gt;
&lt;!ENTITY % simpleDerivationSet "CDATA"&gt;
&lt;!--
        #all or space-separated list drawn from derivationChoice
  --&gt;

&lt;!--
        Note that the use of 'facet' below is less restrictive
        than is really intended:  There should in fact be no
        more than one of each of minInclusive, minExclusive,
        maxInclusive, maxExclusive, totalDigits, fractionDigits,
        length, maxLength, minLength within datatype,
        and the min- and max- variants of Inclusive and Exclusive
        are mutually exclusive. On the other hand,  pattern and
        enumeration and assertion may repeat.
  --&gt;
&lt;!ENTITY % minBound "(%minInclusive; | %minExclusive;)"&gt;
&lt;!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)"&gt;
&lt;!ENTITY % bounds "%minBound; | %maxBound;"&gt;
&lt;!ENTITY % numeric "%totalDigits; | %fractionDigits;"&gt; 
&lt;!ENTITY % ordered "%bounds; | %numeric;"&gt;
&lt;!ENTITY % unordered
   "%pattern; | %enumeration; | %whiteSpace; | %length; |
   %maxLength; | %minLength; | %assertion;
   | %explicitTimezone;"&gt;
&lt;!ENTITY % implementation-defined-facets ""&gt;
&lt;!ENTITY % facet "%ordered; | %unordered; %implementation-defined-facets;"&gt;
&lt;!ENTITY % facetAttr 
        "value CDATA #REQUIRED
        id ID #IMPLIED"&gt;
&lt;!ENTITY % fixedAttr "fixed %boolean; #IMPLIED"&gt;
&lt;!ENTITY % facetModel "(%annotation;)?"&gt;
&lt;!ELEMENT %simpleType;
        ((%annotation;)?, (%restriction; | %list; | %union;))&gt;
&lt;!ATTLIST %simpleType;
    name      %NCName; #IMPLIED
    final     %simpleDerivationSet; #IMPLIED
    id        ID       #IMPLIED
    %simpleTypeAttrs;&gt;
&lt;!-- name is required at top level --&gt;
&lt;!ELEMENT %restriction; ((%annotation;)?,
                         (%restriction1; |
                          ((%simpleType;)?,(%facet;)*)),
                         (%attrDecls;))&gt;
&lt;!ATTLIST %restriction;
    base      %QName;                  #IMPLIED
    id        ID       #IMPLIED
    %restrictionAttrs;&gt;
&lt;!--
        base and simpleType child are mutually exclusive,
        one is required.

        restriction is shared between simpleType and
        simpleContent and complexContent (in XMLSchema.xsd).
        restriction1 is for the latter cases, when this
        is restricting a complex type, as is attrDecls.
  --&gt;
&lt;!ELEMENT %list; ((%annotation;)?,(%simpleType;)?)&gt;
&lt;!ATTLIST %list;
    itemType      %QName;             #IMPLIED
    id        ID       #IMPLIED
    %listAttrs;&gt;
&lt;!--
        itemType and simpleType child are mutually exclusive,
        one is required
  --&gt;
&lt;!ELEMENT %union; ((%annotation;)?,(%simpleType;)*)&gt;
&lt;!ATTLIST %union;
    id            ID       #IMPLIED
    memberTypes   %QNames;            #IMPLIED
    %unionAttrs;&gt;
&lt;!--
        At least one item in memberTypes or one simpleType
        child is required
  --&gt;

&lt;!ELEMENT %maxExclusive; %facetModel;&gt;
&lt;!ATTLIST %maxExclusive;
        %facetAttr;
        %fixedAttr;
        %maxExclusiveAttrs;&gt;
&lt;!ELEMENT %minExclusive; %facetModel;&gt;
&lt;!ATTLIST %minExclusive;
        %facetAttr;
        %fixedAttr;
        %minExclusiveAttrs;&gt;

&lt;!ELEMENT %maxInclusive; %facetModel;&gt;
&lt;!ATTLIST %maxInclusive;
        %facetAttr;
        %fixedAttr;
        %maxInclusiveAttrs;&gt;
&lt;!ELEMENT %minInclusive; %facetModel;&gt;
&lt;!ATTLIST %minInclusive;
        %facetAttr;
        %fixedAttr;
        %minInclusiveAttrs;&gt;

&lt;!ELEMENT %totalDigits; %facetModel;&gt;
&lt;!ATTLIST %totalDigits;
        %facetAttr;
        %fixedAttr;
        %totalDigitsAttrs;&gt;
&lt;!ELEMENT %fractionDigits; %facetModel;&gt;
&lt;!ATTLIST %fractionDigits;
        %facetAttr;
        %fixedAttr;
        %fractionDigitsAttrs;&gt;

&lt;!ELEMENT %length; %facetModel;&gt;
&lt;!ATTLIST %length;
        %facetAttr;
        %fixedAttr;
        %lengthAttrs;&gt;
&lt;!ELEMENT %minLength; %facetModel;&gt;
&lt;!ATTLIST %minLength;
        %facetAttr;
        %fixedAttr;
        %minLengthAttrs;&gt;
&lt;!ELEMENT %maxLength; %facetModel;&gt;
&lt;!ATTLIST %maxLength;
        %facetAttr;
        %fixedAttr;
        %maxLengthAttrs;&gt;

&lt;!-- This one can be repeated --&gt;
&lt;!ELEMENT %enumeration; %facetModel;&gt;
&lt;!ATTLIST %enumeration;
        %facetAttr;
        %enumerationAttrs;&gt;

&lt;!ELEMENT %whiteSpace; %facetModel;&gt;
&lt;!ATTLIST %whiteSpace;
        %facetAttr;
        %fixedAttr;
        %whiteSpaceAttrs;&gt;

&lt;!-- This one can be repeated --&gt;
&lt;!ELEMENT %pattern; %facetModel;&gt;
&lt;!ATTLIST %pattern;
        %facetAttr;
        %patternAttrs;&gt;

&lt;!ELEMENT %assertion; %facetModel;&gt;
&lt;!ATTLIST %assertion;
        %facetAttr;
        %assertionAttrs;&gt;

&lt;!ELEMENT %explicitTimezone; %facetModel;&gt;
&lt;!ATTLIST %explicitTimezone;
        %facetAttr;
        %explicitTimezoneAttrs;&gt;
</pre></div></div></div><div class="div1">
<h2><a name="prim.nxsd" id="prim.nxsd" shape="rect"></a>C Illustrative XML representations for the built-in simple type definitions</h2><div class="div2">
<h3><span class="nav"> <a href="#drvd.nxsd" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="sec-prim-nxsd" id="sec-prim-nxsd" shape="rect"></a>C.1 Illustrative XML representations for the built-in primitive type definitions</h3><p>The following, although in the form of a
schema document, does not conform to the rules for schema documents
defined in this specification. It contains explicit XML
representations of the primitive datatypes which need not be declared
in a schema document, since they are automatically included in every
schema, and indeed must not be declared in a schema document, since it
is forbidden to try to derive types with <a href="#anyAtomicType" shape="rect">anyAtomicType</a>
as the base type definition. It is included here as a form of
documentation.
</p><div class="sfsScrap" id="div_not-schema-for-primitives">
<a id="not-schema-for-primitives" name="not-schema-for-primitives" shape="rect"></a>
<div class="sfsHead">The (not a) schema document for primitive built-in type definitions</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE xs:schema SYSTEM "../namespace/XMLSchema.dtd" [

&lt;!--
     keep this schema XML1.0 DTD valid
  --&gt;
        &lt;!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'&gt;

        &lt;!ELEMENT hfp:hasFacet EMPTY&gt;
        &lt;!ATTLIST hfp:hasFacet
                name NMTOKEN #REQUIRED&gt;

        &lt;!ELEMENT hfp:hasProperty EMPTY&gt;
        &lt;!ATTLIST hfp:hasProperty
                name NMTOKEN #REQUIRED
                value CDATA #REQUIRED&gt;
]&gt;
&lt;xs:schema
  xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" 
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified" 
  xml:lang="en" 
  targetNamespace="http://www.w3.org/2001/XMLSchema"&gt;

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      This document contains XML elements which look like 
      definitions for the primitive datatypes.  These definitions are for
      information only; the real built-in definitions are magic.
    &lt;/xs:documentation&gt;
    &lt;xs:documentation&gt;
      For each built-in datatype in this schema (both primitive and
      derived) can be uniquely addressed via a URI constructed
      as follows:
        1) the base URI is the URI of the XML Schema namespace
        2) the fragment identifier is the name of the datatype

      For example, to address the int datatype, the URI is:

        http://www.w3.org/2001/XMLSchema#int

      Additionally, each facet definition element can be uniquely
      addressed via a URI constructed as follows:
        1) the base URI is the URI of the XML Schema namespace
        2) the fragment identifier is the name of the facet

      For example, to address the maxInclusive facet, the URI is:

        http://www.w3.org/2001/XMLSchema#maxInclusive

      Additionally, each facet usage in a built-in datatype definition
      can be uniquely addressed via a URI constructed as follows:
        1) the base URI is the URI of the XML Schema namespace
        2) the fragment identifier is the name of the datatype, followed
           by a period (".") followed by the name of the facet

      For example, to address the usage of the maxInclusive facet in
      the definition of int, the URI is:

        http://www.w3.org/2001/XMLSchema#int.maxInclusive

    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:simpleType name="string" id="string"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#string"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace value="preserve" id="string.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="boolean" id="boolean"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="finite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#boolean"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="boolean.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="float" id="float"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="true"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="finite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="true"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#float"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="float.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="double" id="double"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="true"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="finite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="true"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#double"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="double.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="decimal" id="decimal"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="totalDigits"/&gt;
        &lt;hfp:hasFacet name="fractionDigits"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="total"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="true"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#decimal"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="decimal.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:simpleType name="duration" id="duration"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#duration"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="duration.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="dateTime" id="dateTime"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#dateTime"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="dateTime.whiteSpace"/&gt;
      &lt;xs:explicitTimezone value="optional" id="dateTime.explicitTimezone"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="time" id="time"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#time"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="time.whiteSpace"/&gt;
      &lt;xs:explicitTimezone value="optional" id="time.explicitTimezone"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="date" id="date"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#date"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="date.whiteSpace"/&gt;
      &lt;xs:explicitTimezone value="optional" id="date.explicitTimezone"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="gYearMonth" id="gYearMonth"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#gYearMonth"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="gYearMonth.whiteSpace"/&gt;
      &lt;xs:explicitTimezone value="optional" id="gYearMonth.explicitTimezone"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="gYear" id="gYear"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#gYear"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="gYear.whiteSpace"/&gt;
      &lt;xs:explicitTimezone value="optional" id="gYear.explicitTimezone"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="gMonthDay" id="gMonthDay"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#gMonthDay"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="gMonthDay.whiteSpace"/&gt;
      &lt;xs:explicitTimezone value="optional" id="gMonthDay.explicitTimezone"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="gDay" id="gDay"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#gDay"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="gDay.whiteSpace"/&gt;
      &lt;xs:explicitTimezone value="optional" id="gDay.explicitTimezone"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="gMonth" id="gMonth"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="maxInclusive"/&gt;
        &lt;hfp:hasFacet name="maxExclusive"/&gt;
        &lt;hfp:hasFacet name="minInclusive"/&gt;
        &lt;hfp:hasFacet name="minExclusive"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasFacet name="explicitTimezone"/&gt;
        &lt;hfp:hasProperty name="ordered" value="partial"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#gMonth"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="gMonth.whiteSpace"/&gt;
      &lt;xs:explicitTimezone value="optional" id="gMonth.explicitTimezone"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="hexBinary" id="hexBinary"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#hexBinary"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="hexBinary.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="base64Binary" id="base64Binary"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#base64Binary"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="base64Binary.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="anyURI" id="anyURI"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#anyURI"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="anyURI.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="QName" id="QName"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#QName"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="QName.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="NOTATION" id="NOTATION"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#NOTATION"/&gt;
      &lt;xs:documentation&gt;
        NOTATION cannot be used directly in a schema; rather a type
        must be derived from it by specifying at least one enumeration
        facet whose value is the name of a NOTATION declared in the
        schema.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:anyAtomicType"&gt;
      &lt;xs:whiteSpace fixed="true" value="collapse" id="NOTATION.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
&lt;/xs:schema&gt;
</pre></div></div></div><div class="div2">
<h3><span class="nav"><a href="#sec-prim-nxsd" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="drvd.nxsd" id="drvd.nxsd" shape="rect"></a>C.2 Illustrative XML representations for the built-in ordinary type definitions</h3><p>The following, although in the form of a
schema document, contains XML representations of components already
present in all schemas by definition.  It is included here as a form
of documentation.</p><div class="note"><div class="p"><b>Note:</b> These datatypes do not need to be declared in a schema document,
since they are automatically included in every schema.</div></div><div class="issue"><a name="B-1933" id="B-1933" shape="rect"></a><blockquote><b>Issue (B-1933):</b><div class="p">It is an open question whether this and similar XML documents should
be accepted or rejected by software conforming to this specification.
The XML Schema Working Group expects to resolve this question in connection
with its work on issues relating to schema composition.</div><div class="p">In the meantime, some existing schema processors will accept
declarations for them; other existing processors will reject such
declarations as duplicates.</div></blockquote></div><div class="sfsScrap" id="div_schema-for-derived">
<a id="schema-for-derived" name="schema-for-derived" shape="rect"></a>
<div class="sfsHead">Illustrative schema document for derived built-in type definitions</div>
<div class="sfsBody">
<pre xml:space="preserve">&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE xs:schema SYSTEM "../namespace/XMLSchema.dtd" [

&lt;!--
     keep this schema XML1.0 DTD valid
  --&gt;
        &lt;!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'&gt;

        &lt;!ELEMENT hfp:hasFacet EMPTY&gt;
        &lt;!ATTLIST hfp:hasFacet
                name NMTOKEN #REQUIRED&gt;

        &lt;!ELEMENT hfp:hasProperty EMPTY&gt;
        &lt;!ATTLIST hfp:hasProperty
                name NMTOKEN #REQUIRED
                value CDATA #REQUIRED&gt;

]&gt;
&lt;xs:schema
  xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified" 
  xml:lang="en" 
  targetNamespace="http://www.w3.org/2001/XMLSchema"&gt;
 &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      This document contains XML representations for the 
     ordinary non-primitive built-in datatypes
    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;
  &lt;xs:simpleType name="normalizedString" id="normalizedString"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#normalizedString"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:whiteSpace value="replace" id="normalizedString.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="token" id="token"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#token"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:normalizedString"&gt;
      &lt;xs:whiteSpace value="collapse" id="token.whiteSpace"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="language" id="language"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#language"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:token"&gt;
      &lt;xs:pattern value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" id="language.pattern"&gt;
        &lt;xs:annotation&gt;
          &lt;xs:documentation source="http://www.ietf.org/rfc/bcp/bcp47.txt"&gt;
            pattern specifies the content of section 2.12 of XML 1.0e2
            and RFC 3066 (Revised version of RFC 1766).  N.B. RFC 3066 is now
            obsolete; the grammar of RFC4646 is more restrictive.  So strict
            conformance to the rules for language codes requires extra checking
            beyond validation against this type.
          &lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;
      &lt;/xs:pattern&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="IDREFS" id="IDREFS"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#IDREFS"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list itemType="xs:IDREF"/&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:minLength value="1" id="IDREFS.minLength"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="ENTITIES" id="ENTITIES"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#ENTITIES"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list itemType="xs:ENTITY"/&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:minLength value="1" id="ENTITIES.minLength"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="NMTOKEN" id="NMTOKEN"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#NMTOKEN"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:token"&gt;
      &lt;xs:pattern value="\c+" id="NMTOKEN.pattern"&gt;
        &lt;xs:annotation&gt;
          &lt;xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Nmtoken"&gt;
            pattern matches production 7 from the XML spec
          &lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;
      &lt;/xs:pattern&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="NMTOKENS" id="NMTOKENS"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasFacet name="length"/&gt;
        &lt;hfp:hasFacet name="minLength"/&gt;
        &lt;hfp:hasFacet name="maxLength"/&gt;
        &lt;hfp:hasFacet name="enumeration"/&gt;
        &lt;hfp:hasFacet name="whiteSpace"/&gt;
        &lt;hfp:hasFacet name="pattern"/&gt;
        &lt;hfp:hasFacet name="assertions"/&gt;
        &lt;hfp:hasProperty name="ordered" value="false"/&gt;
        &lt;hfp:hasProperty name="bounded" value="false"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="countably infinite"/&gt;
        &lt;hfp:hasProperty name="numeric" value="false"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#NMTOKENS"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:list itemType="xs:NMTOKEN"/&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:minLength value="1" id="NMTOKENS.minLength"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="Name" id="Name"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#Name"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:token"&gt;
      &lt;xs:pattern value="\i\c*" id="Name.pattern"&gt;
        &lt;xs:annotation&gt;
          &lt;xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Name"&gt;
            pattern matches production 5 from the XML spec
          &lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;
      &lt;/xs:pattern&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="NCName" id="NCName"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#NCName"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:Name"&gt;
      &lt;xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern"&gt;
        &lt;xs:annotation&gt;
          &lt;xs:documentation source="http://www.w3.org/TR/REC-xml-names/#NT-NCName"&gt;
            pattern matches production 4 from the Namespaces in XML spec
          &lt;/xs:documentation&gt;
        &lt;/xs:annotation&gt;
      &lt;/xs:pattern&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="ID" id="ID"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#ID"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:NCName"/&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="IDREF" id="IDREF"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#IDREF"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:NCName"/&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="ENTITY" id="ENTITY"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#ENTITY"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:NCName"/&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="integer" id="integer"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#integer"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:decimal"&gt;
      &lt;xs:fractionDigits fixed="true" value="0" id="integer.fractionDigits"/&gt;
      &lt;xs:pattern value="[\-+]?[0-9]+" id="integer.pattern"/&gt;
      
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#nonPositiveInteger"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:integer"&gt;
      &lt;xs:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="negativeInteger" id="negativeInteger"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#negativeInteger"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:nonPositiveInteger"&gt;
      &lt;xs:maxInclusive value="-1" id="negativeInteger.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="long" id="long"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasProperty name="bounded" value="true"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="finite"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#long"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:integer"&gt;
      &lt;xs:minInclusive value="-9223372036854775808" id="long.minInclusive"/&gt;
      &lt;xs:maxInclusive value="9223372036854775807" id="long.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="int" id="int"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#int"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:long"&gt;
      &lt;xs:minInclusive value="-2147483648" id="int.minInclusive"/&gt;
      &lt;xs:maxInclusive value="2147483647" id="int.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="short" id="short"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#short"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:int"&gt;
      &lt;xs:minInclusive value="-32768" id="short.minInclusive"/&gt;
      &lt;xs:maxInclusive value="32767" id="short.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="byte" id="byte"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#byte"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:short"&gt;
      &lt;xs:minInclusive value="-128" id="byte.minInclusive"/&gt;
      &lt;xs:maxInclusive value="127" id="byte.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="nonNegativeInteger" id="nonNegativeInteger"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#nonNegativeInteger"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:integer"&gt;
      &lt;xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="unsignedLong" id="unsignedLong"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:appinfo&gt;
        &lt;hfp:hasProperty name="bounded" value="true"/&gt;
        &lt;hfp:hasProperty name="cardinality" value="finite"/&gt;
      &lt;/xs:appinfo&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#unsignedLong"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:nonNegativeInteger"&gt;
      &lt;xs:maxInclusive value="18446744073709551615" id="unsignedLong.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="unsignedInt" id="unsignedInt"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#unsignedInt"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:unsignedLong"&gt;
      &lt;xs:maxInclusive value="4294967295" id="unsignedInt.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="unsignedShort" id="unsignedShort"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#unsignedShort"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:unsignedInt"&gt;
      &lt;xs:maxInclusive value="65535" id="unsignedShort.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="unsignedByte" id="unsignedByte"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#unsignedByte"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:unsignedShort"&gt;
      &lt;xs:maxInclusive value="255" id="unsignedByte.maxInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="positiveInteger" id="positiveInteger"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#positiveInteger"/&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:nonNegativeInteger"&gt;
      &lt;xs:minInclusive value="1" id="positiveInteger.minInclusive"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:simpleType name="yearMonthDuration"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#yearMonthDuration"&gt;
        This type includes just those durations expressed in years and months.
        Since the pattern given excludes days, hours, minutes, and seconds,
        the values of this type have a seconds property of zero.  They are
        totally ordered.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:duration"&gt;
      &lt;xs:pattern id="yearMonthDuration.pattern" value="[^DT]*"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  &lt;xs:simpleType name="dayTimeDuration"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#dayTimeDuration"&gt;
        This type includes just those durations expressed in days, hours, minutes, and seconds.
        The pattern given excludes years and months, so the values of this type 
        have a months property of zero.  They are totally ordered.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:duration"&gt;
      &lt;xs:pattern id="dayTimeDuration.pattern" value="[^YM]*(T.*)?"/&gt;
     &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
    &lt;xs:simpleType name="dateTimeStamp" id="dateTimeStamp"&gt;
    &lt;xs:annotation&gt;
      &lt;xs:documentation source="http://www.w3.org/TR/xmlschema11-2/#dateTimeStamp"&gt;
        This datatype includes just those dateTime values Whose explicitTimezone
        is present.  They are totally ordered.
      &lt;/xs:documentation&gt;
    &lt;/xs:annotation&gt;
    &lt;xs:restriction base="xs:dateTime"&gt;
      &lt;xs:explicitTimezone fixed="true"
        id="dateTimeStamp.explicitTimezone" value="required"/&gt;
     &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;

&lt;/xs:schema&gt;</pre></div></div></div></div><div class="div1">
<h2><a name="constructedValueSpaces" id="constructedValueSpaces" shape="rect"></a>D Built-up Value Spaces</h2><p>Some datatypes, such as <a href="#integer" shape="rect">integer</a>, describe well-known mathematically abstract 
systems.&#160; Others, such as the date/time datatypes, describe "real-life", 
"applied" systems.&#160; Certain
of the systems described by datatypes, both abstract and
applied, have values in their value spaces most easily described as things
having several <em>properties</em>, which in turn have values which are
in some sense "primitive" or are from the value spaces of
simpler datatypes.</p><p>In
this document, the arguments to functions are assumed to be "call by
value" unless explicitly noted to the contrary, meaning that if the argument is modified
during the processing of the algorithm, that modification is <em>not</em> reflected in the
"outside world".&#160; On the other hand, the arguments to procedures are assumed
to be "call by location", meaning that modifications <em>are</em> so reflected,
since that is the only way the processing of the algorithm can have any effect.</p><p>Properties always have values.&#160; 
<span class="termdef"><a name="dt-optional" id="dt-optional" title="" shape="rect">[Definition:]&#160;&#160;</a>An <b>optional</b>
property is <em>permitted</em> but not <em>required</em> to have 
the distinguished
value <b><i>absent</i></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 value <b><b><i>absent</i></b></b> is used 
as a distinguished value to indicate that a given instance of a property
"has no value" or "is absent".</span>&#160;
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.</p><div class="block">Those
values that are more primitive, and are used (among other things) herein to
construct object value spaces but which we do not explicitly define are
described here:

<ul><li><div class="p">A
<b>number (without precision)</b> is an ordinary
mathematical number; 1, 1.0, and
1.000000000000 are the same
number.&#160; The decimal
numbers and integers
generally used in the algorithms of
appendix <a href="#ap-funcDefs" shape="rect">Function
Definitions (&#167;E)</a> are
such
ordinary numbers, not carrying precision.</div></li><li><div class="p"><span class="termdef"><a name="dt-specialvalue" id="dt-specialvalue" title="" shape="rect">[Definition:]&#160;&#160;</a>A 
<b>special value</b> is 
an object
whose only relevant properties for purposes of this specification are that it
is distinct from, and unequal to, any other values (special or otherwise).</span>&#160;
A few special values in different value spaces (e.g. <b><i>positiveInfinity</i></b>,
<b><i>negativeInfinity</i></b>, and <b><i>notANumber</i></b> in <a href="#float" shape="rect">float</a> and 
<a href="#double" shape="rect">double</a>) share names.&#160; Thus, special values 
can be distinguished from each other in the
general case by considering both the name and the primitive datatype of the value; in
some
cases, of course, the name alone suffices to identify the value uniquely.</div><div class="note"><a name="b3226move.n1" id="b3226move.n1" shape="rect"></a><div class="p"><b>Note:</b> In the case of <a href="#float" shape="rect">float</a>
and <a href="#double" shape="rect">double</a>, the <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a> are members of the
datatype's <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.&#160; 

</div></div></li></ul>
</div><div class="div2">
<h3 class="withToc"><span class="nav"> <a href="#d-t-values" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="sec-numericalValues" id="sec-numericalValues" shape="rect"></a>D.1 Numerical Values</h3><div class="block">The following standard operators are defined here
in case the reader is unsure of their definition:
<ul><li><div class="p"><span class="termdef"><a name="dt-div" id="dt-div" title="" shape="rect">[Definition:]&#160;&#160;</a>If <var>m</var> and <var>n</var> are numbers, then
<var>m</var>&#160;<b>div</b> <var>n</var> is the greatest integer 
less than or equal to
<var>m</var>&#160;/&#160;<var>n</var>&#160;.</span></div></li><li><div class="p"><span class="termdef"><a name="dt-mod" id="dt-mod" title="" shape="rect">[Definition:]&#160;&#160;</a>If <var>m</var> and <var>n</var> are numbers, then
<var>m</var> <b>mod</b> <var>n</var> is&#160;
<var>m</var>&#160;&#8722;&#160;<var>n</var>&#160;&#215;&#160;(&#160;<var>m</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;<var>n</var>)&#160;.</span>
</div></li></ul>
</div><div class="note"><div class="p"><b>Note:</b> <var>n</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;1&#160; is 
a convenient and short way of
expressing "the greatest integer 
less
than or equal to <var>n</var>".</div></div><div class="div3">
<h4><a name="sec-exactmaps" id="sec-exactmaps" shape="rect"></a>D.1.1 Exact Lexical Mappings</h4><div class="defset">
<div class="defset-head">Numerals and Fragments Thereof</div>
<div class="prod">
<a name="nt-digit" id="nt-digit" shape="rect"></a><span class="lhs">[45]
    &#160;
    <i>digit</i></span>&#160;::= [<code>0-9</code>]</div><div class="prod">
<a name="nt-unsNoDecNuml" id="nt-unsNoDecNuml" shape="rect"></a><span class="lhs">[46]
    &#160;
    <i>unsignedNoDecimalPtNumeral</i></span>&#160;::= <a href="#nt-digit" shape="rect"><i>digit</i></a>+</div><div class="prod">
<a name="nt-noDecNuml" id="nt-noDecNuml" shape="rect"></a><span class="lhs">[47]
    &#160;
    <i>noDecimalPtNumeral</i></span>&#160;::= ('<code>+</code>'&#160;|&#160;'<code>-</code>')?&#160;<a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a></div><div class="prod">
<a name="nt-fracFrag" id="nt-fracFrag" shape="rect"></a><span class="lhs">[48]
    &#160;
    <i>fracFrag</i></span>&#160;::= <a href="#nt-digit" shape="rect"><i>digit</i></a>+</div><div class="prod">
<a name="nt-unsDecNuml" id="nt-unsDecNuml" shape="rect"></a><span class="lhs">[49]
    &#160;
    <i>unsignedDecimalPtNumeral</i></span>&#160;::= (<a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>&#160;'<code>.</code>'&#160;<a href="#nt-fracFrag" shape="rect"><i>fracFrag</i></a>?)&#160;|&#160;('<code>.</code>'&#160;<a href="#nt-fracFrag" shape="rect"><i>fracFrag</i></a>)</div><div class="prod">
<a name="nt-unsFullDecNuml" id="nt-unsFullDecNuml" shape="rect"></a><span class="lhs">[50]
    &#160;
    <i>unsignedFullDecimalPtNumeral</i></span>&#160;::= <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>&#160;'<code>.</code>'&#160;<a href="#nt-fracFrag" shape="rect"><i>fracFrag</i></a></div><div class="prod">
<a name="nt-decNuml" id="nt-decNuml" shape="rect"></a><span class="lhs">[51]
    &#160;
    <i>decimalPtNumeral</i></span>&#160;::= ('<code>+</code>'&#160;|&#160;'<code>-</code>')?&#160;<a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a></div><div class="prod">
<a name="nt-unsSciNuml" id="nt-unsSciNuml" shape="rect"></a><span class="lhs">[52]
    &#160;
    <i>unsignedScientificNotationNumeral</i></span>&#160;::= (<a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>&#160;|&#160;<a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a>) ('<code>e</code>'&#160;|&#160;'<code>E</code>') <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a></div><div class="prod">
<a name="nt-sciNuml" id="nt-sciNuml" shape="rect"></a><span class="lhs">[53]
    &#160;
    <i>scientificNotationNumeral</i></span>&#160;::= ('<code>+</code>'&#160;|&#160;'<code>-</code>')?&#160;<a href="#nt-unsSciNuml" shape="rect"><i>unsignedScientificNotationNumeral</i></a></div></div>
<div class="block">
<div class="defset">
<div class="not_aux">
<div class="defset-head">Generic Numeral-to-Number Lexical Mappings</div>
<div class="deftop"><b><a name="summary-f-unsNoDecVal" id="summary-f-unsNoDecVal" href="#f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a></b> (<var>N</var>) &#8594; integer</div>
<div class="defindent">Maps an <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a> to its numerical value.</div>
<div class="deftop"><b><a name="summary-f-noDecVal" id="summary-f-noDecVal" href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a></b> (<var>N</var>) &#8594; integer</div>
<div class="defindent">Maps an <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a> to its numerical value.</div>
<div class="deftop"><b><a name="summary-f-unsDecVal" id="summary-f-unsDecVal" href="#f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a></b> (<var>D</var>) &#8594; decimal number</div>
<div class="defindent">Maps an <a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a> to its numerical value.</div>
<div class="deftop"><b><a name="summary-f-decVal" id="summary-f-decVal" href="#f-decVal" shape="rect"><i><span class="arrow">&#183;</span>decimalPtMap<span class="arrow">&#183;</span></i></a></b> (<var>N</var>) &#8594; decimal number</div>
<div class="defindent">Maps a <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a> to its numerical value.</div>
<div class="deftop"><b><a name="summary-f-sciVal" id="summary-f-sciVal" href="#f-sciVal" shape="rect"><i><span class="arrow">&#183;</span>scientificMap<span class="arrow">&#183;</span></i></a></b> (<var>N</var>) &#8594; decimal number</div>
<div class="defindent">Maps a <a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a> to its numerical value.</div>
</div></div>

<div class="defset">
<div class="not_aux">
<div class="defset-head">Generic Number to Numeral Canonical Mappings</div>
<div class="deftop"><b><a name="summary-f-unsNoDecCanFragMap" id="summary-f-unsNoDecCanFragMap" href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>i</var>) &#8594; <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a></div>
<div class="defindent">Maps a nonnegative integer to a <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-noDecCanMap" id="summary-f-noDecCanMap" href="#f-noDecCanMap" shape="rect"><i><span class="arrow">&#183;</span>noDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>i</var>) &#8594; <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a></div>
<div class="defindent">Maps an integer to a <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-unsDecCanFragMap" id="summary-f-unsDecCanFragMap" href="#f-unsDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>n</var>) &#8594; <a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a></div>
<div class="defindent">Maps a nonnegative decimal number to a <a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-decCanFragMap" id="summary-f-decCanFragMap" href="#f-decCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>decimalPtCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>n</var>) &#8594; <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a></div>
<div class="defindent">Maps a decimal number to a <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-unsSciCanFragMap" id="summary-f-unsSciCanFragMap" href="#f-unsSciCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedScientificCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>n</var>) &#8594; <a href="#nt-unsSciNuml" shape="rect"><i>unsignedScientificNotationNumeral</i></a></div>
<div class="defindent">Maps a nonnegative decimal number to a <a href="#nt-unsSciNuml" shape="rect"><i>unsignedScientificNotationNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-sciCanFragMap" id="summary-f-sciCanFragMap" href="#f-sciCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>scientificCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>n</var>) &#8594; <a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a></div>
<div class="defindent">Maps a decimal number to a <a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
</div></div>

Some numerical datatypes include some or all of three 
non-numerical <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a>:
<b><i>positiveInfinity</i></b>, <b><i>negativeInfinity</i></b>, and <b><i>notANumber</i></b>.&#160; Their lexical spaces
include non-numeral lexical representations for these non-numeric values:

<div class="defset">
<div class="defset-head">Special Non-numerical Lexical Representations Used With Numerical Datatypes</div>
<div class="prod">
<a name="nt-minNumSpecReps" id="nt-minNumSpecReps" shape="rect"></a><span class="lhs">[54]
    &#160;
    <i>minimalNumericalSpecialRep</i></span>&#160;::= '<code>INF</code>'&#160;|&#160;'<code>-INF</code>'&#160;|&#160;'<code>NaN</code>'</div><div class="prod">
<a name="nt-numSpecReps" id="nt-numSpecReps" shape="rect"></a><span class="lhs">[55]
    &#160;
    <i>numericalSpecialRep</i></span>&#160;::= '<code>+INF</code>'&#160;|&#160;<a href="#nt-minNumSpecReps" shape="rect"><i>minimalNumericalSpecialRep</i></a></div></div>


<div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping for Non-numerical <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>Special Values<span class="arrow">&#183;</span></a> Used With Numerical Datatypes</div>
<div class="deftop"><b><a name="summary-f-specRepVal" id="summary-f-specRepVal" href="#f-specRepVal" shape="rect"><i><span class="arrow">&#183;</span>specialRepValue<span class="arrow">&#183;</span></i></a></b> (<var>S</var>) &#8594; a <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special value<span class="arrow">&#183;</span></a></div>
<div class="defindent">Maps the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> of <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a> used with some
numerical datatypes to those <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a>.</div>
</div></div>

<div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping for Non-numerical <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>Special Values<span class="arrow">&#183;</span></a> Used with Numerical Datatypes</div>
<div class="deftop"><b><a name="summary-f-specValCanMap" id="summary-f-specValCanMap" href="#f-specValCanMap" shape="rect"><i><span class="arrow">&#183;</span>specialRepCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>c</var>) &#8594; <a href="#nt-numSpecReps" shape="rect"><i>numericalSpecialRep</i></a></div>
<div class="defindent">Maps the <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a> used with some numerical datatypes to their <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representations<span class="arrow">&#183;</span></a>.</div>
</div></div>
</div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#sec-numericalValues" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="d-t-values" id="d-t-values" shape="rect"></a>D.2 Date/time Values</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D.2.1 <a href="#theSevenPropertyModel" shape="rect">The Seven-property Model</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;D.2.2 <a href="#rf-lexicalMappings-datetime" shape="rect">Lexical Mappings</a><br clear="none" />
</div><p>There are several different primitive but
related datatypes defined in the specification which pertain to
various combinations of dates and times, and parts thereof.&#160; They
all use related value-space models, which are described in detail in
this section.&#160; It is not difficult for a casual reader of the
descriptions of the individual datatypes elsewhere in this
specification to misunderstand some of the details of just what the
datatypes are intended to represent, so more detail is presented here
in this section.</p><p>All of the value spaces for dates and times
described here represent moments or periods of time in Universal
Coordinated Time (UTC).&#160;
<span class="termdef"><a name="dt-utc" id="dt-utc" title="" shape="rect">[Definition:]&#160;&#160;</a><b>Universal
Coordinated Time</b> (<b>UTC</b>)
is an adaptation of TAI which closely approximates UT1 by adding
<a href="#dt-leapsec" class="termref" shape="rect"><span class="arrow">&#183;</span>leap-seconds<span class="arrow">&#183;</span></a> to selected
<a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a> days.</span></p><p><span class="termdef"><a name="dt-leapsec" id="dt-leapsec" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>leap-second</b> is an additional second added
to the last day of December, June, October, or March,
when such an adjustment is deemed necessary by the 
International Earth Rotation and Reference Systems Service
in order to keep <a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a> within 0.9 seconds
of observed astronomical time.&#160; When leap seconds are
introduced, the last minute in the day has more than
sixty seconds.&#160;
In theory leap seconds can also be removed from a
day, but this has not yet occurred.
(See
<a href="#IERS" shape="rect">[International Earth Rotation Service (IERS)]</a>,
<a href="#itu-r-460-6" shape="rect">[ITU-R TF.460-6]</a>.)
Leap seconds are
<em>not</em> supported by the types defined 
here.</span></p><p>Because 
the <a href="#dateTime" shape="rect">dateTime</a> type and
other date- and time-related types defined in this specification do
not support leap seconds, there are portions of the <a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a> timeline which cannot be represented by values of these
types.  Users whose applications require that leap seconds be
represented and that date/time arithmetic take historically
occurring leap seconds into account will wish to make
appropriate adjustments at the application level, or to use 
other types.</p><div class="div3">
<h4><a name="theSevenPropertyModel" id="theSevenPropertyModel" shape="rect"></a>D.2.1 The Seven-property Model</h4><p>There are two distinct ways to model moments in time:&#160; either
by tracking their year, month, day, hour, minute and second (with
fractional seconds as needed), or by tracking
their time (measured generally in seconds or
days) from some starting moment.&#160; Each has
its advantages.&#160; The two are isomorphic.&#160; For
definiteness, we choose to model the first
using five integer and one decimal number properties.&#160; We superimpose
the second by providing one decimal number-valued
function which gives the corresponding count of
seconds from zero (the "time on the time line").</p><div class="block">There is also a seventh <a href="#integer" shape="rect">integer</a> property which
specifies the time zone offset
as the number of minutes of offset from UTC.&#160; Values for the
six primary properties are always stored in
their
"local" values (the values shown in the lexical
representations), rather than converted to 
<a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a>.

<div class="defset">
<div class="defset-head">Properties of
<a name="dt-dt-7PropMod" id="dt-dt-7PropMod" shape="rect">Date/time
Seven-property Models</a></div>
<div class="deftop">
<b><a name="vp-dt-year" id="vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a></b></div>
<div class="defindent">an integer</div>
<div class="deftop">
<b><a name="vp-dt-month" id="vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a></b></div>
<div class="defindent">an integer between 1 and 12 inclusive</div>
<div class="deftop">
<b><a name="vp-dt-day" id="vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a></b></div>
<div class="defindent">an integer between 1 and
31 inclusive, 
possibly
restricted further depending on
<a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> and <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a></div>
<div class="deftop">
<b><a name="vp-dt-hour" id="vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a></b></div>
<div class="defindent">an integer between 0 and 23 inclusive</div>
<div class="deftop">
<b><a name="vp-dt-minute" id="vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a></b></div>
<div class="defindent">an integer between 0 and 59 inclusive</div>
<div class="deftop">
<b><a name="vp-dt-second" id="vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a></b></div>
<div class="defindent">a decimal number greater than or equal
to
0 and less 
than 60.</div>
<div class="deftop">
<b><a name="vp-dt-timezone" id="vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a></b></div>
<div class="defindent">an <a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a> integer between &#8722;840
and 840 inclusive</div>
</div>

</div><p>Non-negative values of the properties map 
to the years, months, days of month, etc. of the Gregorian
calendar in the obvious way.  
Values less than 1582 in the
<a href="#vp-dt-year" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> property represent years in the
"proleptic Gregorian calendar".
A value of zero in the <a href="#vp-dt-year" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> property 
represents the year 1 BCE;
a value of &#8722;1 represents the year 2 BCE, &#8722;2 is 3 BCE,
etc.</p><div class="note"><div class="p"><b>Note:</b> In version 1.0 of this specification, the 
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> property was not permitted to have the value
zero. The year before the year 1 in the
proleptic Gregorian calendar, traditionally referred to as 
1 BC or as
1 BCE, was represented by a 
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> value of &#8722;1, 2 BCE by &#8722;2, and so
forth.
Of course, many, perhaps most,
references to 1 BCE (or 1 BC) actually refer not 
to a year in the proleptic Gregorian calendar but to a year in the
Julian or "old style" calendar; the two correspond
approximately but not exactly to each other.
</div><div class="p">In this version of this specification,
two changes are made in order to agree with existing usage. 
First, <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> is permitted to have the value zero.
Second, the interpretation of
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> values is changed accordingly: 
a <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> value of zero represents 1 BCE, &#8722;1
represents 2 BCE, etc. This representation simplifies interval
arithmetic and leap-year calculation for dates before the common 
era (which may be why astronomers
and others interested in such calculations with the proleptic
Gregorian calendar have adopted it), and is consistent with the
current edition of <a href="#ISO8601" shape="rect">[ISO 8601]</a>.
</div><div class="p">
Note that 1 BCE, 5 BCE, and so on (years 0000, &#8722;0004, etc. in the
lexical representation defined here) are leap years in the proleptic
Gregorian calendar used for the date/time datatypes defined here.
Version 1.0 of this specification was unclear about the treatment of
leap years before the common era.
If existing
schemas or data specify dates of 29 February for any years before the
common era, then some values giving
a date of 29 February which were valid under a plausible
interpretation of XSD 1.0 will be invalid under this specification,
and some which were invalid will be valid.  With that possible 
exception, schemas and data valid
under the old interpretation remain valid under the new.
</div></div><p>The model just described is called herein the
"seven-property" model for date/time 
datatypes.&#160; It is used "as is"
for <a href="#dateTime" shape="rect">dateTime</a>; all other date/time 
datatypes except <a href="#duration" shape="rect">duration</a> use the
same model except that some of the six primary 
properties are <em>required</em> to have the
value <b><i>absent</i></b>, instead of being required 
to have a numerical value.&#160; (An
<em><a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a></em> 
property, like <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>,
is always <em>permitted</em> 
to have the value <b><i>absent</i></b>.)</p><p><a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> values are limited to 14 hours,
which is 840 (=&#160;60&#160;&#215;&#160;14) minutes.</p><div class="note"><div class="p"><b>Note:</b> Leap-seconds are not permitted</div></div><p>Readers
interested in when leap-seconds have been introduced should
consult <a href="#USNavy_leaps" shape="rect">[USNO Historical List]</a>, which includes a list
of times when the difference between TAI and
<a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a> has changed.&#160;

Because 
the simple types defined here do not support leap seconds, they cannot be used 
to represent the final second, in <a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a>, 
of any of the days containing
one.&#160; If it is important, at the application level,
to track the occurrence of leap seconds, then users will need to make
special arrangements for special handling of them and
of time intervals crossing them.
</p><p>While calculating, property values from the
<a href="#dateTime" shape="rect">dateTime</a> 1972-12-31T00:00:00 are used to fill in
for those that are <b><i>absent</i></b>, except
that if <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> is <b><i>absent</i></b>
but <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> is not, the largest permitted
day for that month is used.</p><div class="block">
<div class="defset">
<div class="not_aux">
<div class="defset-head">Time on Timeline for Date/time Seven-property
Model Datatypes</div>
<div class="deftop"><b><a name="summary-vp-dt-timeOnTimeline" id="summary-vp-dt-timeOnTimeline" href="#vp-dt-timeOnTimeline" shape="rect"><i><span class="arrow">&#183;</span>timeOnTimeline<span class="arrow">&#183;</span></i></a></b> (<var>dt</var>) &#8594; decimal number</div>
<div class="defindent">Maps a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value to the decimal number
representing its position on the "time line".</div>
</div></div>
Values from any one date/time datatype using the seven-component
model (all except <a href="#duration" shape="rect">duration</a>)
are ordered the same as their <a href="#vp-dt-timeOnTimeline" shape="rect"><i><span class="arrow">&#183;</span>timeOnTimeline<span class="arrow">&#183;</span></i></a> values,
except that if one value's <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
is <b><i>absent</i></b> and the other's is not, and using maximum and minimum
<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
values for the one whose <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
is actually <b><i>absent</i></b>
changes the resulting (strict)
inequality, the original two values are incomparable.</div></div><div class="div3">
<h4><a name="rf-lexicalMappings-datetime" id="rf-lexicalMappings-datetime" shape="rect"></a>D.2.2 Lexical Mappings</h4><div class="block"><span class="termdef"><a name="dt-dt-frag" id="dt-dt-frag" title="" shape="rect">[Definition:]&#160;&#160;</a>Each
lexical representation is made up 
of certain <b>date/time fragments</b>, each of which 
corresponds to a particular property of the datatype
value.</span>&#160; They are defined by 
the following productions.

<div class="defset">
<div class="defset-head">Date/time Lexical Representation Fragments</div>
<div class="prod">
<a name="nt-yrFrag" id="nt-yrFrag" shape="rect"></a><span class="lhs">[56]
    &#160;
    <i>yearFrag</i></span>&#160;::= '<code>-</code>'?
(([<code>1-9</code>]&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>+))&#160;|
('<code>0</code>'&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>))</div><div class="prod">
<a name="nt-moFrag" id="nt-moFrag" shape="rect"></a><span class="lhs">[57]
    &#160;
    <i>monthFrag</i></span>&#160;::= ('<code>0</code>'&#160;[<code>1-9</code>])&#160;|
('<code>1</code>'&#160;[<code>0-2</code>])</div><div class="prod">
<a name="nt-daFrag" id="nt-daFrag" shape="rect"></a><span class="lhs">[58]
    &#160;
    <i>dayFrag</i></span>&#160;::= ('<code>0</code>'&#160;[<code>1-9</code>])&#160;|&#160;([<code>12</code>]&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>)&#160;|
('<code>3</code>'&#160;[<code>01</code>])</div><div class="prod">
<a name="nt-hrFrag" id="nt-hrFrag" shape="rect"></a><span class="lhs">[59]
    &#160;
    <i>hourFrag</i></span>&#160;::= ([<code>01</code>]&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>)&#160;|
('<code>2</code>'&#160;[<code>0-3</code>])</div><div class="prod">
<a name="nt-miFrag" id="nt-miFrag" shape="rect"></a><span class="lhs">[60]
    &#160;
    <i>minuteFrag</i></span>&#160;::= [<code>0-5</code>]&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a></div><div class="prod">
<a name="nt-seFrag" id="nt-seFrag" shape="rect"></a><span class="lhs">[61]
    &#160;
    <i>secondFrag</i></span>&#160;::= ([<code>0-5</code>]&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>) ('<code>.</code>'&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>+)?</div><div class="prod">
<a name="nt-eodFrag" id="nt-eodFrag" shape="rect"></a><span class="lhs">[62]
    &#160;
    <i>endOfDayFrag</i></span>&#160;::= '<code>24:00:00</code>'&#160;('<code>.</code>'&#160;'<code>0</code>'+)?</div><div class="prod">
<a name="nt-tzFrag" id="nt-tzFrag" shape="rect"></a><span class="lhs">[63]
    &#160;
    <i>timezoneFrag</i></span>&#160;::= '<code>Z</code>' 
|&#160;('<code>+</code>'&#160;|&#160;'<code>-</code>')&#160;(('<code>0</code>'&#160;<a href="#nt-digit" shape="rect"><i>digit</i></a>&#160;|&#160;'<code>1</code>'&#160;[<code>0-3</code>])&#160;'<code>:</code>'&#160;<a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a> | '<code>14:00</code>')</div></div>

</div><div class="block">Each fragment other than <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a> defines a subset of
the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <a href="#decimal" shape="rect">decimal</a>; 
the corresponding
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> is the <a href="#decimal" shape="rect">decimal</a>
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> restricted to that
subset.&#160; These fragment <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> are combined
separately for each date/time datatype (other than <a href="#duration" shape="rect">duration</a>) to make up <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>the complete lexical mapping<span class="arrow">&#183;</span></a> for
that datatype.&#160; The <a href="#f-dt-yrMap" shape="rect"><i><span class="arrow">&#183;</span>yearFragValue<span class="arrow">&#183;</span></i></a> mapping is used to
obtain the value of the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> property, the <a href="#f-dt-moMap" shape="rect"><i><span class="arrow">&#183;</span>monthFragValue<span class="arrow">&#183;</span></i></a> mapping is used to obtain the value of the <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> property, etc.&#160; Each datatype which specifies
some properties to be mandatorily <b><i>absent</i></b> also does not permit
the corresponding lexical fragments in its lexical representations.

<div class="defset">
<div class="not_aux">
<div class="defset-head">Partial Date/time Lexical Mappings</div>
<div class="deftop"><b><a name="summary-f-dt-yrMap" id="summary-f-dt-yrMap" href="#f-dt-yrMap" shape="rect"><i><span class="arrow">&#183;</span>yearFragValue<span class="arrow">&#183;</span></i></a></b> (<var>YR</var>) &#8594; integer</div>
<div class="defindent">Maps a <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
<div class="deftop"><b><a name="summary-f-dt-moMap" id="summary-f-dt-moMap" href="#f-dt-moMap" shape="rect"><i><span class="arrow">&#183;</span>monthFragValue<span class="arrow">&#183;</span></i></a></b> (<var>MO</var>) &#8594; integer</div>
<div class="defindent">Maps a <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
<div class="deftop"><b><a name="summary-f-dt-daMap" id="summary-f-dt-daMap" href="#f-dt-daMap" shape="rect"><i><span class="arrow">&#183;</span>dayFragValue<span class="arrow">&#183;</span></i></a></b> (<var>DA</var>) &#8594; integer</div>
<div class="defindent">Maps a <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
<div class="deftop"><b><a name="summary-f-dt-hrMap" id="summary-f-dt-hrMap" href="#f-dt-hrMap" shape="rect"><i><span class="arrow">&#183;</span>hourFragValue<span class="arrow">&#183;</span></i></a></b> (<var>HR</var>) &#8594; integer</div>
<div class="defindent">Maps a <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
<div class="deftop"><b><a name="summary-f-dt-miMap" id="summary-f-dt-miMap" href="#f-dt-miMap" shape="rect"><i><span class="arrow">&#183;</span>minuteFragValue<span class="arrow">&#183;</span></i></a></b> (<var>MI</var>) &#8594; integer</div>
<div class="defindent">Maps a <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
<div class="deftop"><b><a name="summary-f-dt-seMap" id="summary-f-dt-seMap" href="#f-dt-seMap" shape="rect"><i><span class="arrow">&#183;</span>secondFragValue<span class="arrow">&#183;</span></i></a></b> (<var>SE</var>) &#8594; decimal number</div>
<div class="defindent">Maps a <a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto a decimal number, presumably the <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
<div class="deftop"><b><a name="summary-f-dt-tzMap" id="summary-f-dt-tzMap" href="#f-dt-tzMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneFragValue<span class="arrow">&#183;</span></i></a></b> (<var>TZ</var>) &#8594; integer</div>
<div class="defindent">Maps a <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
</div></div>
</div><div class="note"><div class="p"><b>Note:</b> 
The redundancy between
'<code>Z</code>', '<code>+00:00</code>', and
'<code>-00:00</code>', and the possibility of trailing fractional
'<code>0</code>' digits for <a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>, are the only
redundancies preventing these mappings from being one-to-one. There
is no <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> for <a href="#nt-eodFrag" shape="rect"><i>endOfDayFrag</i></a>; it is handled
specially by the relevant <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a>.&#160; See, e.g., <a href="#vp-dateTimeLexRep" shape="rect"><i><span class="arrow">&#183;</span>dateTimeLexicalMap<span class="arrow">&#183;</span></i></a>.
</div></div><div class="block">The following fragment <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical 
mappings<span class="arrow">&#183;</span></a> for each value-object
property are combined as appropriate to make the
<a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a>
for each date/time datatype (other
than <a href="#duration" shape="rect">duration</a>):

<div class="defset">
<div class="not_aux">
<div class="defset-head">Partial Date/time Canonical Mappings</div>
<div class="deftop"><b><a name="summary-f-yrCanFragMap" id="summary-f-yrCanFragMap" href="#f-yrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>yearCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>y</var>) &#8594; <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a></div>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-moCanFragMap" id="summary-f-moCanFragMap" href="#f-moCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>monthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>m</var>) &#8594; <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a></div>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-daCanFragMap" id="summary-f-daCanFragMap" href="#f-daCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>dayCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>d</var>) &#8594; <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a></div>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-hrCanFragMap" id="summary-f-hrCanFragMap" href="#f-hrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>hourCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>h</var>) &#8594; <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a></div>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-miCanFragMap" id="summary-f-miCanFragMap" href="#f-miCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>minuteCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>m</var>) &#8594; <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a></div>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-seCanFragMap" id="summary-f-seCanFragMap" href="#f-seCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>secondCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>s</var>) &#8594; <a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a></div>
<div class="defindent">Maps a decimal number, presumably the <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
<div class="deftop"><b><a name="summary-f-tzCanFragMap" id="summary-f-tzCanFragMap" href="#f-tzCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>t</var>) &#8594; <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a></div>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div></div>
</div></div></div></div><div class="div1">
<h2><a name="ap-funcDefs" id="ap-funcDefs" shape="rect"></a>E Function
Definitions</h2><p>The more important functions and
procedures defined here are summarized in the
text&#160; When there is a text summary, the name of the function in each is a
"hot-link" to the same name in the other.&#160; All other links
to these functions link to the complete definition in this section.</p><div class="div2">
<h3><span class="nav"> <a href="#sec-duration-functions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="sec-generic-number-functions" id="sec-generic-number-functions" shape="rect"></a>E.1 Generic Number-related Functions</h3><p>The following functions are used with various numeric and date/time datatypes.
</p><div class="defset">
<div class="aux">
<div class="defset-head">Auxiliary Functions for Operating on Numeral Fragments</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-digitVal" id="f-digitVal" shape="rect"><i><span class="arrow">&#183;</span>digitValue<span class="arrow">&#183;</span></i></a></b> (<var>d</var>) &#8594; integer
<div class="defindent">Maps each digit to its numerical value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>d</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-digit" shape="rect"><i>digit</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer less than ten</div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p">0&#160;&#160; when&#160; <var>d</var>&#160;=&#160;'<code>0</code>'&#160;,</div></li><li><div class="p">1&#160;&#160; when&#160; <var>d</var>&#160;=&#160;'<code>1</code>'&#160;,</div></li><li><div class="p">2&#160;&#160; when&#160; <var>d</var>&#160;=&#160;'<code>2</code>'&#160;,</div></li><li><div class="p"><em>etc.</em></div></li></ul>
</div>

<div class="deftop"><b><a name="f-digitSeqVal" id="f-digitSeqVal" shape="rect"><i><span class="arrow">&#183;</span>digitSequenceValue<span class="arrow">&#183;</span></i></a></b> (<var>S</var>) &#8594; integer
<div class="defindent">Maps a sequence of digits to the position-weighted sum of the terms numerical values.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>S</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a finite sequence of
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>, each term matching <a href="#nt-digit" shape="rect"><i>digit</i></a>.</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer</div>

<b>Algorithm:</b>


<div class="defindent">Return the sum of 
<a href="#f-digitVal" shape="rect"><i><span class="arrow">&#183;</span>digitValue<span class="arrow">&#183;</span></i></a>(<var>S</var><sub><var>i</var></sub>)&#160;&#215;&#160;10<sup>length(<var>S</var>)&#8722;<var>i</var></sup>&#160;
where <var>i</var> runs over the domain of <var>S</var>.
</div>

<div class="deftop"><b><a name="f-fracDigitSeqVal" id="f-fracDigitSeqVal" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitSequenceValue<span class="arrow">&#183;</span></i></a></b> (<var>S</var>) &#8594; integer
<div class="defindent">Maps a sequence of digits to the position-weighted sum of the terms numerical values, weighted appropriately for fractional digits.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>S</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a finite sequence of
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>, each term matching <a href="#nt-digit" shape="rect"><i>digit</i></a>.</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer</div>

<b>Algorithm:</b>


<div class="defindent">Return the sum of 
<a href="#f-digitVal" shape="rect"><i><span class="arrow">&#183;</span>digitValue<span class="arrow">&#183;</span></i></a>(<var>S</var><sub><var>i</var></sub>)&#160;&#8722;&#160;10<sup>&#8722;<var>i</var></sup>&#160;
where <var>i</var> runs over the domain of <var>S</var>.
</div>

<div class="deftop"><b><a name="f-fracFragVal" id="f-fracFragVal" shape="rect"><i><span class="arrow">&#183;</span>fractionFragValue<span class="arrow">&#183;</span></i></a></b> (<var>N</var>) &#8594; decimal number
<div class="defindent">Maps a <a href="#nt-fracFrag" shape="rect"><i>fracFrag</i></a> to the appropriate fractional decimal number.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>N</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-fracFrag" shape="rect"><i>fracFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative decimal number</div>

<b>Algorithm:</b>
<div class="defindent"><var>N</var> is necessarily the left-to-right concatenation of a finite sequence <var>S</var> of
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>, each term matching <a href="#nt-digit" shape="rect"><i>digit</i></a>.</div>


<div class="defindent">Return <a href="#f-fracDigitSeqVal" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitSequenceValue<span class="arrow">&#183;</span></i></a>(<var>S</var>).</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Generic Numeral-to-Number Lexical Mappings</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-unsNoDecVal" id="f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a></b> (<var>N</var>) &#8594; integer
<div class="defindent">Maps an <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a> to its numerical value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>N</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer</div>

<b>Algorithm:</b>
<div class="defindent"><var>N</var> is the left-to-right concatenation of a finite sequence <var>S</var> of
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>, each term matching <a href="#nt-digit" shape="rect"><i>digit</i></a>.</div>


<div class="defindent">Return <a href="#f-digitSeqVal" shape="rect"><i><span class="arrow">&#183;</span>digitSequenceValue<span class="arrow">&#183;</span></i></a>(<var>S</var>).</div>

<div class="deftop"><b><a name="f-noDecVal" id="f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a></b> (<var>N</var>) &#8594; integer
<div class="defindent">Maps an <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a> to its numerical value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>N</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">an integer</div>

<b>Algorithm:</b>
<div class="defindent"><var>N</var> necessarily consists of an optional sign('<code>+</code>' or '<code>-</code>') and then
a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> <var>U</var> that matches <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>.</div>


<div class="defindent">Return
<ul><li><div class="p">&#8722;1&#160;&#215;&#160;<a href="#f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a>(<var>U</var>)&#160;&#160; when '<code>-</code>' is present, and</div></li><li><div class="p"><a href="#f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a>(<var>U</var>)&#160;&#160; otherwise.</div></li></ul></div>

<div class="deftop"><b><a name="f-unsDecVal" id="f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a></b> (<var>D</var>) &#8594; decimal number
<div class="defindent">Maps an <a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a> to its numerical value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>D</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative decimal number</div>

<b>Algorithm:</b>
<div class="defindent"><var>D</var> necessarily consists of an optional <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> <var>N</var> matching <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>, 
a decimal point, and then an optional <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> <var>F</var> matching <a href="#nt-fracFrag" shape="rect"><i>fracFrag</i></a>.</div>


<div class="defindent">Return
<ul><li><div class="p"><a href="#f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a>(<var>N</var>)&#160;&#160; when <var>F</var> is not present,</div></li><li><div class="p"><a href="#f-fracFragVal" shape="rect"><i><span class="arrow">&#183;</span>fractionFragValue<span class="arrow">&#183;</span></i></a>(<var>F</var>)&#160;&#160; when <var>N</var> is not present, and</div></li><li><div class="p"><a href="#f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a>(<var>N</var>)&#160;+&#160;<a href="#f-fracFragVal" shape="rect"><i><span class="arrow">&#183;</span>fractionFragValue<span class="arrow">&#183;</span></i></a>(<var>F</var>)&#160;&#160;
otherwise.</div></li></ul></div>

<div class="deftop"><b><a name="f-decVal" id="f-decVal" shape="rect"><i><span class="arrow">&#183;</span>decimalPtMap<span class="arrow">&#183;</span></i></a></b> (<var>N</var>) &#8594; decimal number
<div class="defindent">Maps a <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a> to its numerical value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>N</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a decimal number</div>

<b>Algorithm:</b>
<div class="defindent"><var>N</var> necessarily consists of an optional sign('<code>+</code>' or '<code>-</code>') and then
an instance <var>U</var> of <a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a>.</div>


<div class="defindent">
Return
<ul><li><div class="p">&#8722;<a href="#f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a>(<var>U</var>)&#160;&#160; when '<code>-</code>' is present, and</div></li><li><div class="p"><a href="#f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a>(<var>U</var>)&#160;&#160; otherwise.</div></li></ul></div>

<div class="deftop"><b><a name="f-sciVal" id="f-sciVal" shape="rect"><i><span class="arrow">&#183;</span>scientificMap<span class="arrow">&#183;</span></i></a></b> (<var>N</var>) &#8594; decimal number
<div class="defindent">Maps a <a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a> to its numerical value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>N</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a decimal number</div>

<b>Algorithm:</b>
<div class="defindent"><var>N</var> necessarily consists of an instance <var>C</var> of either <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a> or
<a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a>, either an '<code>e</code>' or an '<code>E</code>', and then an instance
<var>E</var> of <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a>.</div>


<div class="defindent">Return
<ul><li><div class="p">
<a href="#f-decVal" shape="rect"><i><span class="arrow">&#183;</span>decimalPtMap<span class="arrow">&#183;</span></i></a>(<var>C</var>)&#160;&#215;&#160;10&#160;^&#160;<a href="#f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a>(<var>E</var>)&#160;&#160;
when a '<code>.</code>' is present in <var>N</var>, and</div></li><li><div class="p">
<a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>C</var>)&#160;&#215;&#160;10&#160;^&#160;<a href="#f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a>(<var>E</var>)&#160;&#160;
otherwise.</div></li></ul></div>

</div></div><div class="defset">
<div class="aux">
<div class="defset-head">Auxiliary Functions for Producing Numeral Fragments</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-digit" id="f-digit" shape="rect"><i><span class="arrow">&#183;</span>digit<span class="arrow">&#183;</span></i></a></b> (<var>i</var>) &#8594; <a href="#nt-digit" shape="rect"><i>digit</i></a>
<div class="defindent">Maps each integer between 0 and 9 to the corresponding <a href="#nt-digit" shape="rect"><i>digit</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>i</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">between 0 and 9 inclusive</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-digit" shape="rect"><i>digit</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return<ul><li><div class="p">'<code>0</code>'&#160;&#160; when&#160; <var>i</var>&#160;=&#160;0&#160;,</div></li><li><div class="p">'<code>1</code>'&#160;&#160; when&#160; <var>i</var>&#160;=&#160;1&#160;,</div></li><li><div class="p">'<code>2</code>'&#160;&#160; when&#160; <var>i</var>&#160;=&#160;2&#160;,</div></li><li><div class="p">etc.</div></li></ul></div>

<div class="deftop"><b><a name="f-digitRemSeq" id="f-digitRemSeq" shape="rect"><i><span class="arrow">&#183;</span>digitRemainderSeq<span class="arrow">&#183;</span></i></a></b> (<var>i</var>) &#8594; sequence of integers
<div class="defindent">Maps each nonnegative integer to a sequence of integers used by <a href="#f-digitSeq" shape="rect"><i><span class="arrow">&#183;</span>digitSeq<span class="arrow">&#183;</span></i></a> to ultimately create an <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>i</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">sequence of nonnegative integers</div>

<b>Algorithm:</b>


<div class="defindent">Return that sequence <var>s</var> for which
<ul><li><div class="p"><var>s</var><sub>0</sub>&#160;=&#160;<var>i</var>&#160; and</div></li><li><div class="p"><var>s</var><sub><var>j</var>+1</sub>&#160;=&#160;<var>s</var><sub><var>j</var></sub>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;10&#160;.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-digitSeq" id="f-digitSeq" shape="rect"><i><span class="arrow">&#183;</span>digitSeq<span class="arrow">&#183;</span></i></a></b> (<var>i</var>) &#8594; sequence of integers
<div class="defindent">Maps each nonnegative integer to a sequence of integers used by <a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a> to create an <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>i</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">sequence of integers where each term is between 0 and 9 inclusive</div>

<b>Algorithm:</b>


<div class="defindent">Return that sequence <var>s</var> for which&#160;
<var>s</var><sub><var>j</var></sub>&#160;=<a href="#f-digitRemSeq" shape="rect"><i><span class="arrow">&#183;</span>digitRemainderSeq<span class="arrow">&#183;</span></i></a>(<var>i</var>)<sub><var>j</var></sub>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;10&#160;.
</div>

<div class="deftop"><b><a name="f-lastSigDigit" id="f-lastSigDigit" shape="rect"><i><span class="arrow">&#183;</span>lastSignificantDigit<span class="arrow">&#183;</span></i></a></b> (<var>s</var>) &#8594; integer
<div class="defindent">Maps a sequence of nonnegative integers to the index of the first zero term.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>s</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a sequence of nonnegative integers</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer</div>

<b>Algorithm:</b>


<div class="defindent">Return the smallest nonnegative integer <var>j</var> such that
<var>s</var>(<var>i</var>)<sub><var>j</var>+1</sub> is 0.
</div>

<div class="deftop"><b><a name="f-fracDigitRemSeq" id="f-fracDigitRemSeq" shape="rect"><i><span class="arrow">&#183;</span>FractionDigitRemainderSeq<span class="arrow">&#183;</span></i></a></b> (<var>f</var>) &#8594; sequence of decimal numbers
<div class="defindent">Maps each nonnegative decimal number less than 1 to a sequence of decimal numbers used by <a href="#f-fracDigitSeq" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitSeq<span class="arrow">&#183;</span></i></a> to ultimately create an <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>f</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">nonnegative and less than 1</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a sequence of nonnegative decimal numbers</div>

<b>Algorithm:</b>


<div class="defindent">Return that sequence <var>s</var> for which
<ul><li><div class="p"><var>s</var><sub>0</sub>&#160;=&#160;<var>f</var>&#160;&#8722;&#160;10&#160;, and</div></li><li><div class="p"><var>s</var><sub><var>j</var>+1</sub>&#160;=&#160;(<var>s</var><sub><var>j</var></sub>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;1)&#160;&#8722;&#160;10&#160;.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-fracDigitSeq" id="f-fracDigitSeq" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitSeq<span class="arrow">&#183;</span></i></a></b> (<var>f</var>) &#8594; sequence of integers
<div class="defindent">Maps each nonnegative decimal number less than 1 to a sequence of integers used by <a href="#f-fracDigitsMap" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitsCanonicalFragmentMap<span class="arrow">&#183;</span></i></a> to ultimately create an <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>f</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">nonnegative and less than 1</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a sequence of integer;s where each term is between 0 and 9 inclusive</div>

<b>Algorithm:</b>


<div class="defindent">Return that sequence <var>s</var> for which&#160;
<var>s</var><sub><var>j</var></sub>&#160;=&#160;<a href="#f-fracDigitRemSeq" shape="rect"><i><span class="arrow">&#183;</span>FractionDigitRemainderSeq<span class="arrow">&#183;</span></i></a>(<var>f</var>)<sub><var>j</var></sub>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;1&#160;.
</div>

<div class="deftop"><b><a name="f-fracDigitsMap" id="f-fracDigitsMap" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitsCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>f</var>) &#8594; <a href="#nt-fracFrag" shape="rect"><i>fracFrag</i></a>
<div class="defindent">Maps each nonnegative decimal number less than 1 to a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> used by <a href="#f-unsDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a> to create an <a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>f</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">nonnegative and less than 1</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-fracFrag" shape="rect"><i>fracFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return&#160;
<a href="#f-digit" shape="rect"><i><span class="arrow">&#183;</span>digit<span class="arrow">&#183;</span></i></a>(<a href="#f-fracDigitSeq" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitSeq<span class="arrow">&#183;</span></i></a>(<var>f</var>)<sub>0</sub>)&#160;&amp; .&#160;.&#160;. &amp;
<a href="#f-digit" shape="rect"><i><span class="arrow">&#183;</span>digit<span class="arrow">&#183;</span></i></a>(<a href="#f-fracDigitSeq" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitSeq<span class="arrow">&#183;</span></i></a>(<var>f</var>)<sub><a href="#f-lastSigDigit" shape="rect"><i><span class="arrow">&#183;</span>lastSignificantDigit<span class="arrow">&#183;</span></i></a>(<a href="#f-fracDigitRemSeq" shape="rect"><i><span class="arrow">&#183;</span>FractionDigitRemainderSeq<span class="arrow">&#183;</span></i></a>(<var>f</var>))</sub>)&#160;.</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Generic Number to Numeral Canonical Mappings</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-unsNoDecCanFragMap" id="f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>i</var>) &#8594; <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>
<div class="defindent">Maps a nonnegative integer to a <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>i</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<a href="#f-digit" shape="rect"><i><span class="arrow">&#183;</span>digit<span class="arrow">&#183;</span></i></a>(<a href="#f-digitSeq" shape="rect"><i><span class="arrow">&#183;</span>digitSeq<span class="arrow">&#183;</span></i></a>(<var>i</var>)<sub><a href="#f-lastSigDigit" shape="rect"><i><span class="arrow">&#183;</span>lastSignificantDigit<span class="arrow">&#183;</span></i></a>(<a href="#f-digitRemSeq" shape="rect"><i><span class="arrow">&#183;</span>digitRemainderSeq<span class="arrow">&#183;</span></i></a>(<var>i</var>))</sub>)&#160;&amp;
.&#160;.&#160;.&#160;&amp;
<a href="#f-digit" shape="rect"><i><span class="arrow">&#183;</span>digit<span class="arrow">&#183;</span></i></a>(<a href="#f-digitSeq" shape="rect"><i><span class="arrow">&#183;</span>digitSeq<span class="arrow">&#183;</span></i></a>(<var>i</var>)<sub>0</sub>)&#160;.&#160;&#160; (Note
that the concatenation is in reverse order.)</div>

<div class="deftop"><b><a name="f-noDecCanMap" id="f-noDecCanMap" shape="rect"><i><span class="arrow">&#183;</span>noDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>i</var>) &#8594; <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a>
<div class="defindent">Maps an integer to a <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>i</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p">'<code>-</code>'&#160;&amp;&#160;<a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(&#8722;<var>i</var>)&#160;&#160;
when <var>i</var> is negative,</div></li><li><div class="p"><a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>i</var>)&#160;&#160; otherwise.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-unsDecCanFragMap" id="f-unsDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>n</var>) &#8594; <a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a>
<div class="defindent">Maps a nonnegative decimal number to a <a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>n</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative decimal number</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-unsDecNuml" shape="rect"><i>unsignedDecimalPtNumeral</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return&#160; <a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>n</var><a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>1)&#160;&amp;
'<code>.</code>'&#160;&amp; <a href="#f-fracDigitsMap" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitsCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>n</var><a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>1)&#160;.</div>

<div class="deftop"><b><a name="f-decCanFragMap" id="f-decCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>decimalPtCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>n</var>) &#8594; <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a>
<div class="defindent">Maps a decimal number to a <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>n</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a decimal number</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p">'<code>-</code>'&#160;&amp;&#160;<a href="#f-unsDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(&#8722;<var>i</var>)&#160;&#160;
when <var>i</var> is negative,</div></li><li><div class="p"><a href="#f-unsDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>i</var>)&#160;&#160; otherwise.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-unsSciCanFragMap" id="f-unsSciCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedScientificCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>n</var>) &#8594; <a href="#nt-unsSciNuml" shape="rect"><i>unsignedScientificNotationNumeral</i></a>
<div class="defindent">Maps a nonnegative decimal number to a <a href="#nt-unsSciNuml" shape="rect"><i>unsignedScientificNotationNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>n</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative decimal number</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-unsSciNuml" shape="rect"><i>unsignedScientificNotationNumeral</i></a></div>

<b>Algorithm:</b>


<div class="defindent">
Return&#160; <a href="#f-unsDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>n</var>&#160;/&#160;10<sup>log(<var>n</var>)&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;1</sup>)&#160;&amp;
'<code>E</code>'&#160;&amp;
<a href="#f-noDecCanMap" shape="rect"><i><span class="arrow">&#183;</span>noDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(log(<var>n</var>)&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;1)
</div>

<div class="deftop"><b><a name="f-sciCanFragMap" id="f-sciCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>scientificCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>n</var>) &#8594; <a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a>
<div class="defindent">Maps a decimal number to a <a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a>, its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>n</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a decimal number</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p">'<code>-</code>'&#160;&amp;&#160;<a href="#f-unsSciCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedScientificCanonicalMap<span class="arrow">&#183;</span></i></a>(&#8722;<var>n</var>)&#160;&#160;
when <var>n</var> is negative,</div></li><li><div class="p"><a href="#f-unsSciCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedScientificCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>i</var>)&#160;&#160; otherwise.</div></li></ul>
</div>

</div></div><p>For example:
</p><ul><li><div class="p">123.4567&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;1&#160;=&#160;0.4567&#160; and&#160; 123.4567&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;1&#160;=&#160;123&#160;.</div></li><li><div class="p"><a href="#f-digitRemSeq" shape="rect"><i><span class="arrow">&#183;</span>digitRemainderSeq<span class="arrow">&#183;</span></i></a>(123)&#160; is&#160; 123&#160;,&#160;12&#160;,&#160;1&#160;,&#160;0&#160;,&#160;0&#160;,&#160;.&#160;.&#160;.&#160;.</div></li><li><div class="p"><a href="#f-digitSeq" shape="rect"><i><span class="arrow">&#183;</span>digitSeq<span class="arrow">&#183;</span></i></a>(123)&#160; is&#160; 3&#160;,&#160;2&#160;,&#160;1&#160;,&#160;0&#160;,&#160;0&#160;,&#160;.&#160;.&#160;.&#160;.</div></li><li><div class="p"><a href="#f-lastSigDigit" shape="rect"><i><span class="arrow">&#183;</span>lastSignificantDigit<span class="arrow">&#183;</span></i></a>(<a href="#f-digitRemSeq" shape="rect"><i><span class="arrow">&#183;</span>digitRemainderSeq<span class="arrow">&#183;</span></i></a>(123))&#160;=&#160;2&#160;&#160; (Sequences count from 0.)</div></li><li><div class="p"><a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(123)&#160;=&#160;'<code>123</code>'</div></li><li><div class="p"><a href="#f-fracDigitRemSeq" shape="rect"><i><span class="arrow">&#183;</span>FractionDigitRemainderSeq<span class="arrow">&#183;</span></i></a>(0.4567)&#160; is&#160; 4.567&#160;,&#160;5.67&#160;,&#160;6.7&#160;,&#160;7&#160;,&#160;0&#160;,&#160;0&#160;,&#160;.&#160;.&#160;.&#160;.</div></li><li><div class="p"><a href="#f-fracDigitSeq" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitSeq<span class="arrow">&#183;</span></i></a>(0.4567)&#160; is&#160; 4&#160;,&#160;5&#160;,&#160;6&#160;,&#160;7&#160;,&#160;0&#160;,&#160;0&#160;,&#160;.&#160;.&#160;.&#160;.</div></li><li><div class="p"><a href="#f-lastSigDigit" shape="rect"><i><span class="arrow">&#183;</span>lastSignificantDigit<span class="arrow">&#183;</span></i></a>(<a href="#f-fracDigitRemSeq" shape="rect"><i><span class="arrow">&#183;</span>FractionDigitRemainderSeq<span class="arrow">&#183;</span></i></a>(0.4567))&#160;=&#160;3</div></li><li><div class="p"><a href="#f-fracDigitsMap" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitsCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(0.4567)&#160;=&#160;'<code>4567</code>'</div></li><li><div class="p"><a href="#f-unsDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(123.4567)&#160;=&#160;'<code>123.4567</code>'</div></li></ul><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping for Non-numerical <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>Special Values<span class="arrow">&#183;</span></a> Used With Numerical Datatypes</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-specRepVal" id="f-specRepVal" shape="rect"><i><span class="arrow">&#183;</span>specialRepValue<span class="arrow">&#183;</span></i></a></b> (<var>S</var>) &#8594; a <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special value<span class="arrow">&#183;</span></a>
<div class="defindent">Maps the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representations<span class="arrow">&#183;</span></a> of <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a> used with some
numerical datatypes to those <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>S</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-numSpecReps" shape="rect"><i>numericalSpecialRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">one of <b><i>positiveInfinity</i></b>,
<b><i>negativeInfinity</i></b>, or <b><i>notANumber</i></b>.</div>

<b>Algorithm:</b>


<div class="defindent">

Return
<ul><li><div class="p"><b><i>positiveInfinity</i></b>&#160;&#160; when <var>S</var> is
'<code>INF</code>' or '<code>+INF</code>',</div></li><li><div class="p"><b><i>negativeInfinity</i></b>&#160;&#160; when <var>S</var> is
'<code>-INF</code>', and</div></li><li><div class="p"><b><i>notANumber</i></b>&#160;&#160; when <var>S</var> is
'<code>NaN</code>'
</div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping for Non-numerical <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>Special Values<span class="arrow">&#183;</span></a> Used with Numerical Datatypes</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-specValCanMap" id="f-specValCanMap" shape="rect"><i><span class="arrow">&#183;</span>specialRepCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>c</var>) &#8594; <a href="#nt-numSpecReps" shape="rect"><i>numericalSpecialRep</i></a>
<div class="defindent">Maps the <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special values<span class="arrow">&#183;</span></a> used with some numerical datatypes to their <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representations<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>c</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">one of <b><i>positiveInfinity</i></b>,
<b><i>negativeInfinity</i></b>, and <b><i>notANumber</i></b></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-numSpecReps" shape="rect"><i>numericalSpecialRep</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p">'<code>INF</code>'&#160;&#160; when <var>c</var> is <b><i>positiveInfinity</i></b></div></li><li><div class="p">'<code>-INF</code>'&#160;&#160; when <var>c</var> is <b><i>negativeInfinity</i></b></div></li><li><div class="p">'<code>NaN</code>'&#160;&#160; when <var>c</var> is <b><i>notANumber</i></b></div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-decimalLexmap" id="f-decimalLexmap" shape="rect"><i><span class="arrow">&#183;</span>decimalLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#decimal" shape="rect">decimal</a>
<div class="defindent">Maps a <a href="#nt-decimalRep" shape="rect"><i>decimalLexicalRep</i></a> onto a <a href="#decimal" shape="rect">decimal</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-decimalRep" shape="rect"><i>decimalLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#decimal" shape="rect">decimal</a> value</div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>d</var> be a <a href="#decimal" shape="rect">decimal</a> value.</td></tr></tbody></table></div>

<div class="defindent">
<ol class="enumar"><li><div class="p">Set <var>d</var> to 
<ul><li><div class="p"><a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>LEX</var>)&#160;&#160; when
<var>LEX</var> is an instance of <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a>, and</div></li><li><div class="p"><a href="#f-decVal" shape="rect"><i><span class="arrow">&#183;</span>decimalPtMap<span class="arrow">&#183;</span></i></a>(<var>LEX</var>)&#160;&#160; when
<var>LEX</var> is an instance of <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a>,</div></li></ul>
</div></li><li><div class="p">Return <var>d</var>.</div></li></ol>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-decimalCanmap" id="f-decimalCanmap" shape="rect"><i><span class="arrow">&#183;</span>decimalCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>d</var>) &#8594; <a href="#nt-decimalRep" shape="rect"><i>decimalLexicalRep</i></a>
<div class="defindent">Maps a <a href="#decimal" shape="rect">decimal</a> to its <a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>,
a <a href="#nt-decimalRep" shape="rect"><i>decimalLexicalRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>d</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#decimal" shape="rect">decimal</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching <a href="#nt-decimalRep" shape="rect"><i>decimalLexicalRep</i></a></div>

<b>Algorithm:</b>


<div class="defindent">
<ol class="enumar"><li><div class="p">If <var>d</var> is an integer, then return 
<a href="#f-noDecCanMap" shape="rect"><i><span class="arrow">&#183;</span>noDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>d</var>).</div></li><li><div class="p">Otherwise, return
<a href="#f-decCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>decimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>d</var>).</div></li></ol>


</div>

</div></div><div class="defset">
<div class="aux">
<div class="defset-head">Auxiliary Functions
for Binary Floating-point Lexical/Canonical Mappings</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-floatPtRound" id="f-floatPtRound" shape="rect"><i><span class="arrow">&#183;</span>floatingPointRound<span class="arrow">&#183;</span></i></a></b> (<var>nV</var>,&#160;<var>cWidth</var>,&#160;<var>eMin</var>,&#160;<var>eMax</var>) &#8594; decimal number or <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special value<span class="arrow">&#183;</span></a>
<div class="defindent">Rounds a non-zero decimal number to the nearest floating-point value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>nV</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an initially non-zero decimal number <em>(may be
set to zero during calculations)</em></td></tr>
<tr><td rowspan="1" colspan="1"><var>cWidth</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a positive integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>eMin</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>eMax</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer greater than <var>eMin</var></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a decimal number or <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special value<span class="arrow">&#183;</span></a> <em>(<b><i>INF</i></b> or &#8722;<b><i>INF</i></b>)</em></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>s</var> be an integer intially 1,</div></li><li><div class="p"><var>c</var> be a nonnegative integer, and</div></li><li><div class="p"><var>e</var> be an integer.</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">





<ol class="enumar"><li><div class="p">Set <var>s</var> to &#8722;1&#160;&#160; when&#160; <var>nV</var>&#160;&lt;&#160;0&#160;.</div></li><li><div class="p">So select <var>e</var> that 

2<sup><var>cWidth</var></sup>&#160;&#215;&#160;2<sup>(<var>e</var>&#8722;1)</sup> 
&#8804; |<var>nV</var>| 
&lt; 
2<sup><var>cWidth</var></sup>&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;.</div></li><li><div class="p">So select <var>c</var> that&#160;
(<var>c</var>&#160;&#8722;&#160;1)&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;&#8804;&#160;|<var>nV</var>&#160;|&#160;&lt;<var>c</var>&#160;&#215;&#160;2<sup><var>e</var></sup>&#160; &#160;.</div></li><li><div class="p"><ul><li><div class="p">when&#160; <var>eMax</var>&#160;&lt;&#160;<var>e</var>&#160; <em>(overflow)</em>
return:<ul><li><div class="p"><b><i>positiveInfinity</i></b>&#160;&#160; when <var>s</var> is positive, and</div></li><li><div class="p"><b><i>negativeInfinity</i></b>&#160;&#160; otherwise.</div></li></ul>
  </div></li><li><div class="p">otherwise:<ol class="enumla"><li><div class="p">When <var>e</var>&#160;&lt;&#160;<var>eMin</var>&#160; <em>(underflow):</em><ul><li><div class="p">Set&#160; <var>e</var>&#160;=&#160;<var>eMin</var></div></li><li><div class="p">So select <var>c</var> that&#160;
(<var>c</var>&#160;&#8722;&#160;1)&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;&#8804;&#160;|<var>nV</var>&#160;|&#160;&lt;<var>c</var>&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;.
</div></li></ul></div></li><li><div class="p">Set <var>nV</var> to<ul><li><div class="p"><var>c</var>&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;&#160;
when&#160;
|<var>nV</var>&#160;|&#160;&gt;&#160;<var>c</var>&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;&#8722;&#160;2<sup>(<var>e</var>&#8722;1)</sup>&#160;;</div></li><li><div class="p">(<var>c</var>&#160;&#8722;&#160;1)&#160;&#215;&#160;2<sup>e</sup>&#160;&#160;
when&#160;
|<var>nV</var>&#160;|&#160;&lt;&#160;<var>c</var>&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;&#8722;&#160;2<sup>(<var>e</var>&#8722;1)</sup>&#160;;</div></li><li><div class="p"><var>c</var>&#160;&#215;&#160;2<sup><var>e</var></sup> or
(<var>c</var>&#160;&#8722;&#160;1)&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;&#160;
according to whether <var>c</var> is even
or&#160; <var>c</var>&#160;&#8722;&#160;1&#160; is even, otherwise (i.e.,&#160;
|<var>nV</var>&#160;|&#160;=&#160;<var>c</var>&#160;&#215;&#160;2<sup><var>e</var></sup>&#160;&#8722;&#160;2<sup>(<var>e</var>&#8722;1)</sup>&#160;,
the midpoint between the two values).</div></li></ul></div></li><li><div class="p">Return&#160; 
<ul><li><div class="p"><var>s</var>&#160;&#215;&#160;<var>nV</var>&#160;&#160;
when <var>nV</var>&#160;&lt;&#160;2<sup><var>cWidth</var></sup>&#160;&#215;&#160;2<sup><var>eMax</var></sup>,</div></li><li><div class="p"><b><i>positiveInfinity</i></b>&#160;&#160; when <var>s</var> is positive, and</div></li><li><div class="p"><b><i>negativeInfinity</i></b>&#160;&#160; otherwise.</div></li></ul>
</div></li></ol></div></li></ul></div></li></ol>
<div class="note"><div class="p"><b>Note:</b> Implementers will find the algorithms of <a href="#clinger1990" shape="rect">[Clinger, WD (1990)]</a>
more efficient in memory than the simple abstract algorithm employed above.</div></div>
</div>

<div class="deftop"><b><a name="f-round" id="f-round" shape="rect"><i><span class="arrow">&#183;</span>round<span class="arrow">&#183;</span></i></a></b> (<var>n</var>,&#160;<var>k</var>) &#8594; decimal number
<div class="defindent">Maps a decimal number to that value rounded by some power of 10.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>n</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a decimal number</td></tr>
<tr><td rowspan="1" colspan="1"><var>k</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a decimal number</div>

<b>Algorithm:</b>


<div class="defindent">Return&#160;
((<var>n</var>&#160;/&#160;10<sup>k</sup>&#160;+&#160;0.5)&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>1)&#160;&#215;&#160;10<sup>k</sup>&#160;.</div>

<div class="deftop"><b><a name="f-floatApprox" id="f-floatApprox" shape="rect"><i><span class="arrow">&#183;</span>floatApprox<span class="arrow">&#183;</span></i></a></b> (<var>c</var>,&#160;<var>e</var>,&#160;<var>j</var>) &#8594; decimal number
<div class="defindent">Maps a decimal number
(&#160;<var>c</var>&#160;&#215;&#160;10<sup>e</sup>&#160;) to 
successive approximations.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>c</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>e</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>j</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a decimal number</div>

<b>Algorithm:</b>


<div class="defindent">Return&#160;
<a href="#f-round" shape="rect"><i><span class="arrow">&#183;</span>round<span class="arrow">&#183;</span></i></a>(<var>c</var>,&#160;<var>j</var>&#160;)&#160;&#215;&#160;10<sup><var>e</var></sup></div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-floatLexmap" id="f-floatLexmap" shape="rect"><i><span class="arrow">&#183;</span>floatLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#float" shape="rect">float</a>
<div class="defindent">Maps a <a href="#nt-floatRep" shape="rect"><i>floatRep</i></a> onto a <a href="#float" shape="rect">float</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-floatRep" shape="rect"><i>floatRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#float" shape="rect">float</a> value</div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<var>nV</var> be a decimal number or <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special value<span class="arrow">&#183;</span></a> (INF or &#8722;INF).
</td></tr></tbody></table></div>

<div class="defindent">
<ul><li><div class="p">Return <a href="#f-specRepVal" shape="rect"><i><span class="arrow">&#183;</span>specialRepValue<span class="arrow">&#183;</span></i></a>(<var>LEX</var>)&#160;&#160; when <var>LEX</var>
is an instance of <a href="#nt-numSpecReps" shape="rect"><i>numericalSpecialRep</i></a>;</div></li><li><div class="p">otherwise (<var>LEX</var> is a numeral):<ol class="enumar"><li><div class="p">Set <var>nV</var> to<ul><li><div class="p"><a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>LEX</var>)&#160;&#160; when
<var>LEX</var> is an instance of <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a>,</div></li><li><div class="p"><a href="#f-decVal" shape="rect"><i><span class="arrow">&#183;</span>decimalPtMap<span class="arrow">&#183;</span></i></a>(<var>LEX</var>)&#160;&#160; when
<var>LEX</var> is an instance of <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a>, and</div></li><li><div class="p"><a href="#f-sciVal" shape="rect"><i><span class="arrow">&#183;</span>scientificMap<span class="arrow">&#183;</span></i></a>(<var>LEX</var>)&#160;&#160; otherwise
(<var>LEX</var> is an instance of <a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a>).</div></li></ul></div></li><li><div class="p">Set <var>nV</var> to
<a href="#f-floatPtRound" shape="rect"><i><span class="arrow">&#183;</span>floatingPointRound<span class="arrow">&#183;</span></i></a>(<var>nV</var>,&#160;24,&#160;&#8722;149,&#160;104)&#160;&#160;
when <var>nV</var> is not zero.&#160; <em>(<a href="#f-floatPtRound" shape="rect"><i><span class="arrow">&#183;</span>floatingPointRound<span class="arrow">&#183;</span></i></a>
may nonetheless return zero, or INF or &#8722;INF.)</em></div></li><li><div class="p">Return:<ul><li><div class="p">When <var>nV</var> is zero:<ul><li><div class="p"><b><i>negativeZero</i></b>&#160;&#160; when
the first character of <var>LEX</var> is '<code>-</code>', and</div></li><li><div class="p"><b><i>positiveZero</i></b>&#160;&#160; otherwise.</div></li></ul></div></li><li><div class="p"><var>nV</var>&#160;&#160;
otherwise.</div></li></ul></div></li></ol></div></li></ul>
<div class="note"><div class="p"><b>Note:</b> This specification permits the substitution of any other rounding algorithm
which conforms to the requirements of <a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>.</div></div>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-doubleLexmap" id="f-doubleLexmap" shape="rect"><i><span class="arrow">&#183;</span>doubleLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#double" shape="rect">double</a>
<div class="defindent">Maps a <a href="#nt-doubleRep" shape="rect"><i>doubleRep</i></a> onto a <a href="#double" shape="rect">double</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-doubleRep" shape="rect"><i>doubleRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#double" shape="rect">double</a> value</div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<var>nV</var> be a decimal number or <a href="#dt-specialvalue" class="termref" shape="rect"><span class="arrow">&#183;</span>special value<span class="arrow">&#183;</span></a> (INF or &#8722;INF).
</td></tr></tbody></table></div>

<div class="defindent">
<ul><li><div class="p">Return <a href="#f-specRepVal" shape="rect"><i><span class="arrow">&#183;</span>specialRepValue<span class="arrow">&#183;</span></i></a>(<var>LEX</var>)&#160;&#160; when <var>LEX</var>
is an instance of <a href="#nt-numSpecReps" shape="rect"><i>numericalSpecialRep</i></a>;</div></li><li><div class="p">otherwise (<var>LEX</var> is a numeral):<ol class="enumar"><li><div class="p">Set <var>nV</var> to<ul><li><div class="p"><a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>LEX</var>)&#160;&#160; when
<var>LEX</var> is an instance of <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a>,</div></li><li><div class="p"><a href="#f-decVal" shape="rect"><i><span class="arrow">&#183;</span>decimalPtMap<span class="arrow">&#183;</span></i></a>(<var>LEX</var>)&#160;&#160; when
<var>LEX</var> is an instance of <a href="#nt-decNuml" shape="rect"><i>decimalPtNumeral</i></a>, and</div></li><li><div class="p"><a href="#f-sciVal" shape="rect"><i><span class="arrow">&#183;</span>scientificMap<span class="arrow">&#183;</span></i></a>(<var>LEX</var>)&#160;&#160; otherwise
(<var>LEX</var> is an instance of <a href="#nt-sciNuml" shape="rect"><i>scientificNotationNumeral</i></a>).</div></li></ul></div></li><li><div class="p">Set <var>nV</var> to
<a href="#f-floatPtRound" shape="rect"><i><span class="arrow">&#183;</span>floatingPointRound<span class="arrow">&#183;</span></i></a>(<var>nV</var>,&#160;53,&#160;&#8722;1074,&#160;971)&#160;&#160;
when <var>nV</var> is not zero.&#160; <em>(<a href="#f-floatPtRound" shape="rect"><i><span class="arrow">&#183;</span>floatingPointRound<span class="arrow">&#183;</span></i></a>
may nonetheless return zero, or INF or &#8722;INF.)</em></div></li><li><div class="p">Return:<ul><li><div class="p">When <var>nV</var> is zero:<ul><li><div class="p"><b><i>negativeZero</i></b>&#160;&#160; when
the first character of <var>LEX</var> is '<code>-</code>', and</div></li><li><div class="p"><b><i>positiveZero</i></b>&#160;&#160; otherwise.</div></li></ul></div></li><li><div class="p"><var>nV</var>&#160;&#160;
otherwise.</div></li></ul></div></li></ol></div></li></ul>
<div class="note"><div class="p"><b>Note:</b> This specification permits the substitution of any other rounding algorithm
which conforms to the requirements of <a href="#ieee754-2008" shape="rect">[IEEE 754-2008]</a>.</div></div>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-floatCanmap" id="f-floatCanmap" shape="rect"><i><span class="arrow">&#183;</span>floatCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>f</var>) &#8594; <a href="#nt-floatRep" shape="rect"><i>floatRep</i></a>
<div class="defindent">Maps a <a href="#float" shape="rect">float</a> to its
<a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>, a <a href="#nt-floatRep" shape="rect"><i>floatRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>f</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#float" shape="rect">float</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching <a href="#nt-floatRep" shape="rect"><i>floatRep</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>l</var> be a nonnegative integer</div></li><li><div class="p"><var>s</var> be an integer intially 1,</div></li><li><div class="p"><var>c</var> be a positive integer, and</div></li><li><div class="p"><var>e</var> be an integer.</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">
<ul><li><div class="p">Return <a href="#f-specValCanMap" shape="rect"><i><span class="arrow">&#183;</span>specialRepCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>f</var>&#160;)&#160;&#160;
when <var>f</var> is one of <b><i>positiveInfinity</i></b>,
<b><i>negativeInfinity</i></b>, or <b><i>notANumber</i></b>;</div></li><li><div class="p">return '<code>0.0E0</code>'&#160;&#160; when <var>f</var>
is <b><i>positiveZero</i></b>;</div></li><li><div class="p">return '<code>-0.0E0</code>'&#160;&#160; when <var>f</var>
is <b><i>negativeZero</i></b>;</div></li><li><div class="p">otherwise (<var>f</var> is numeric and non-zero):<ol class="enumar"><li><div class="p">Set <var>s</var> to &#8722;1&#160;&#160; when&#160;
<var>f</var>&#160;&lt;&#160;0&#160;.</div></li><li><div class="p">Let <var>c</var> be the smallest integer for which there exists
an integer <var>e</var> for which&#160;
|<var>f</var>&#160;|&#160;=&#160;<var>c</var>&#160;&#215;&#160;10<sup><var>e</var></sup>&#160;.</div></li><li><div class="p">Let <var>e</var> be log<sub>10</sub>(|<var>f</var>&#160;|&#160;/&#160;<var>c</var>)&#160;&#160;
(so that&#160;
|<var>f</var>&#160;|&#160;=&#160;<var>c</var>&#160;&#215;&#160;10<sup><var>e</var></sup>&#160;).</div></li><li><div class="p">Let <var>l</var> be the largest nonnegative integer for which&#160;
<var>c</var>&#160;&#215;&#160;10<sup><var>e</var></sup>&#160;=
<a href="#f-floatPtRound" shape="rect"><i><span class="arrow">&#183;</span>floatingPointRound<span class="arrow">&#183;</span></i></a>(<a href="#f-floatApprox" shape="rect"><i><span class="arrow">&#183;</span>floatApprox<span class="arrow">&#183;</span></i></a>(<var>c</var>,&#160;<var>e</var>,&#160;<var>l</var>&#160;),&#160;24,&#160;&#8722;149,&#160;104)</div></li><li><div class="p">Return 
<a href="#f-sciCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>scientificCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>s</var>&#160;&#215; <a href="#f-floatApprox" shape="rect"><i><span class="arrow">&#183;</span>floatApprox<span class="arrow">&#183;</span></i></a>(<var>c</var>,&#160;<var>e</var>,&#160;<var>l</var>&#160;))&#160;.</div></li></ol></div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-doubleCanmap" id="f-doubleCanmap" shape="rect"><i><span class="arrow">&#183;</span>doubleCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>f</var>) &#8594; <a href="#nt-doubleRep" shape="rect"><i>doubleRep</i></a>
<div class="defindent">Maps a <a href="#double" shape="rect">double</a> to its
<a href="#dt-canonical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical representation<span class="arrow">&#183;</span></a>, a <a href="#nt-doubleRep" shape="rect"><i>doubleRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>f</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#double" shape="rect">double</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching <a href="#nt-doubleRep" shape="rect"><i>doubleRep</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>l</var> be a nonnegative integer</div></li><li><div class="p"><var>s</var> be an integer intially 1,</div></li><li><div class="p"><var>c</var> be a positive integer, and</div></li><li><div class="p"><var>e</var> be an integer.</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">
<ul><li><div class="p">Return <a href="#f-specValCanMap" shape="rect"><i><span class="arrow">&#183;</span>specialRepCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>f</var>&#160;)&#160;&#160;
when <var>f</var> is one of <b><i>positiveInfinity</i></b>,
<b><i>negativeInfinity</i></b>, or <b><i>notANumber</i></b>;</div></li><li><div class="p">return '<code>0.0E0</code>'&#160;&#160; when <var>f</var>
is <b><i>positiveZero</i></b>;</div></li><li><div class="p">return '<code>-0.0E0</code>'&#160;&#160; when <var>f</var>
is <b><i>negativeZero</i></b>;</div></li><li><div class="p">otherwise (<var>f</var> is numeric and non-zero):<ol class="enumar"><li><div class="p">Set <var>s</var> to &#8722;1&#160;&#160; when&#160;
<var>f</var>&#160;&lt;&#160;0&#160;.</div></li><li><div class="p">Let <var>c</var> be the smallest integer for which there exists
an integer <var>e</var> for which&#160;
|<var>f</var>&#160;|&#160;=&#160;<var>c</var>&#160;&#215;&#160;10<sup><var>e</var></sup>&#160;.</div></li><li><div class="p">Let <var>e</var> be log<sub>10</sub>(|<var>f</var>&#160;|&#160;/&#160;<var>c</var>)&#160;&#160;
(so that&#160;
|<var>f</var>&#160;|&#160;=&#160;<var>c</var>&#160;&#215;&#160;10<sup><var>e</var></sup>&#160;).</div></li><li><div class="p">Let <var>l</var> be the largest nonnegative integer for which&#160;
<var>c</var>&#160;&#215;&#160;10<sup><var>e</var></sup>&#160;=
<a href="#f-floatPtRound" shape="rect"><i><span class="arrow">&#183;</span>floatingPointRound<span class="arrow">&#183;</span></i></a>(<a href="#f-floatApprox" shape="rect"><i><span class="arrow">&#183;</span>floatApprox<span class="arrow">&#183;</span></i></a>(<var>c</var>,&#160;<var>e</var>,&#160;<var>l</var>&#160;),&#160;53,&#160;&#8722;1074,&#160;971)</div></li><li><div class="p">Return 
<a href="#f-sciCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>scientificCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>s</var>&#160;&#215; <a href="#f-floatApprox" shape="rect"><i><span class="arrow">&#183;</span>floatApprox<span class="arrow">&#183;</span></i></a>(<var>c</var>,&#160;<var>e</var>,&#160;<var>l</var>&#160;))&#160;.</div></li></ol></div></li></ul>
</div>

</div></div></div><div class="div2">
<h3><span class="nav"><a href="#sec-generic-number-functions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#sec-dt-functions" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="sec-duration-functions" id="sec-duration-functions" shape="rect"></a>E.2 Duration-related Definitions</h3><div class="block">The following functions are primarily
used with the <a href="#duration" shape="rect">duration</a> datatype and its
derivatives.

<div class="defset">
<div class="aux">
<div class="defset-head">Auxiliary <a href="#duration" shape="rect">duration</a>-related
Functions Operating on Representation Fragments</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-duYrMap" id="f-duYrMap" shape="rect"><i><span class="arrow">&#183;</span>duYearFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>Y</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-duYrFrag" shape="rect"><i>duYearFrag</i></a> to an integer, intended as part of the value of the <a href="#vp-du-month" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> property of a <a href="#duration" shape="rect">duration</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>Y</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-duYrFrag" shape="rect"><i>duYearFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer</div>

<b>Algorithm:</b>
<div class="defindent"><var>Y</var> is necessarily the letter '<code>Y</code>' followed by a numeral <var>N</var>:</div>


<div class="defindent">Return <a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>N</var>).</div>

<div class="deftop"><b><a name="f-duMoMap" id="f-duMoMap" shape="rect"><i><span class="arrow">&#183;</span>duMonthFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>M</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-duMoFrag" shape="rect"><i>duMonthFrag</i></a> to an integer, intended as part of the value of the <a href="#vp-du-month" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> property of a <a href="#duration" shape="rect">duration</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>M</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-duYrFrag" shape="rect"><i>duYearFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer</div>

<b>Algorithm:</b>
<div class="defindent"><var>M</var> is necessarily the letter '<code>M</code>' followed by a numeral <var>N</var>:</div>


<div class="defindent">Return <a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>N</var>).</div>

<div class="deftop"><b><a name="f-duDaMap" id="f-duDaMap" shape="rect"><i><span class="arrow">&#183;</span>duDayFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>D</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-duDaFrag" shape="rect"><i>duDayFrag</i></a> to an integer, intended as part of the value of the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> property of a <a href="#duration" shape="rect">duration</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>D</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-duDaFrag" shape="rect"><i>duDayFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer</div>

<b>Algorithm:</b>
<div class="defindent"><var>D</var> is necessarily the letter '<code>D</code>' followed by a numeral <var>N</var>:</div>


<div class="defindent">Return <a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>N</var>).</div>

<div class="deftop"><b><a name="f-duHrMap" id="f-duHrMap" shape="rect"><i><span class="arrow">&#183;</span>duHourFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>H</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-duHrFrag" shape="rect"><i>duHourFrag</i></a> to an integer, intended as part of the value of the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> property of a <a href="#duration" shape="rect">duration</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>H</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-duHrFrag" shape="rect"><i>duHourFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer</div>

<b>Algorithm:</b>
<div class="defindent"><var>D</var> is necessarily the letter '<code>D</code>' followed by a numeral <var>N</var>:</div>


<div class="defindent">Return <a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>N</var>).</div>

<div class="deftop"><b><a name="f-duMiMap" id="f-duMiMap" shape="rect"><i><span class="arrow">&#183;</span>duMinuteFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>M</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-duMiFrag" shape="rect"><i>duMinuteFrag</i></a> to an integer, intended as part of the value of the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> property of a <a href="#duration" shape="rect">duration</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>M</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-duMiFrag" shape="rect"><i>duMinuteFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer</div>

<b>Algorithm:</b>
<div class="defindent"><var>M</var> is necessarily the letter '<code>M</code>' followed by a numeral <var>N</var>:</div>


<div class="defindent">Return <a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>N</var>).</div>

<div class="deftop"><b><a name="f-duSeMap" id="f-duSeMap" shape="rect"><i><span class="arrow">&#183;</span>duSecondFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>S</var>) &#8594; decimal number
<div class="defindent">Maps a <a href="#nt-duSeFrag" shape="rect"><i>duSecondFrag</i></a> to a decimal number, intended as part of the value of the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> property of a <a href="#duration" shape="rect">duration</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>S</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-duSeFrag" shape="rect"><i>duSecondFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative decimal number</div>

<b>Algorithm:</b>
<div class="defindent"><var>S</var> is necessarily '<code>S</code>' followed by a numeral <var>N</var>:</div>


<div class="defindent">Return
<ul><li><div class="p"><a href="#f-decVal" shape="rect"><i><span class="arrow">&#183;</span>decimalPtMap<span class="arrow">&#183;</span></i></a>(<var>N</var>)&#160;&#160; when '<code>.</code>' occurs
in <var>N</var>, and</div></li><li><div class="p"><a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>N</var>)&#160;&#160; otherwise.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-duYMMap" id="f-duYMMap" shape="rect"><i><span class="arrow">&#183;</span>duYearMonthFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>YM</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-duYMFrag" shape="rect"><i>duYearMonthFrag</i></a> into an integer, intended as part of the <a href="#vp-du-month" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> property of a <a href="#duration" shape="rect">duration</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>YM</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-duYMFrag" shape="rect"><i>duYearMonthFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative integer</div>

<b>Algorithm:</b>
<div class="defindent"><var>YM</var> necessarily consists of an 
instance <var>Y</var> of <a href="#nt-duYrFrag" shape="rect"><i>duYearFrag</i></a> and/or an instance <var>M</var> of
<a href="#nt-duMoFrag" shape="rect"><i>duMonthFrag</i></a>:</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>y</var> be <a href="#f-duYrMap" shape="rect"><i><span class="arrow">&#183;</span>duYearFragmentMap<span class="arrow">&#183;</span></i></a>(<var>Y</var>) (or 0 if <var>Y</var> is not present) and</div></li><li><div class="p"><var>m</var> be <a href="#f-duMoMap" shape="rect"><i><span class="arrow">&#183;</span>duMonthFragmentMap<span class="arrow">&#183;</span></i></a>(<var>M</var>) (or 0 if <var>M</var> is not present).</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">Return&#160; 12&#160;&#215;&#160;<var>y</var>&#160;+ <var>m</var>&#160;.</div>

<div class="deftop"><b><a name="f-duTMap" id="f-duTMap" shape="rect"><i><span class="arrow">&#183;</span>duTimeFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>T</var>) &#8594; decimal number
<div class="defindent">Maps a <a href="#nt-duTFrag" shape="rect"><i>duTimeFrag</i></a> into a decimal number, intended as part of the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> property of a <a href="#duration" shape="rect">duration</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>T</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-duTFrag" shape="rect"><i>duTimeFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative decimal number</div>

<b>Algorithm:</b>
<div class="defindent"><var>T</var> necessarily consists of an instance 
<var>H</var> of <a href="#nt-duHrFrag" shape="rect"><i>duHourFrag</i></a>, and/or an instance <var>M</var> of
<a href="#nt-duMiFrag" shape="rect"><i>duMinuteFrag</i></a>, and/or an instance <var>S</var> of
<a href="#nt-duSeFrag" shape="rect"><i>duSecondFrag</i></a>.</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"> 
<ul><li><div class="p"><var>h</var> be <a href="#f-duDaMap" shape="rect"><i><span class="arrow">&#183;</span>duDayFragmentMap<span class="arrow">&#183;</span></i></a>(<var>H</var>) 
(or 0 if <var>H</var> is not present),</div></li><li><div class="p"><var>m</var> be <a href="#f-duMiMap" shape="rect"><i><span class="arrow">&#183;</span>duMinuteFragmentMap<span class="arrow">&#183;</span></i></a>(<var>M</var>) 
(or 0 if <var>M</var> is not present), and</div></li><li><div class="p"><var>s</var> be <a href="#f-duSeMap" shape="rect"><i><span class="arrow">&#183;</span>duSecondFragmentMap<span class="arrow">&#183;</span></i></a>(<var>S</var>) 
(or 0 if <var>S</var> is not present).</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">Return&#160; 
3600&#160;&#215;&#160;<var>h</var>&#160;+&#160;60&#160;&#215;&#160;<var>m</var>&#160;+&#160;s&#160;.</div>

<div class="deftop"><b><a name="f-duDTMap" id="f-duDTMap" shape="rect"><i><span class="arrow">&#183;</span>duDayTimeFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>DT</var>) &#8594; decimal number
<div class="defindent">Maps a <a href="#nt-duDTFrag" shape="rect"><i>duDayTimeFrag</i></a> into a decimal number, which is the potential value of the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> property of a <a href="#duration" shape="rect">duration</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>DT</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-duDTFrag" shape="rect"><i>duDayTimeFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a nonnegative decimal number</div>

<b>Algorithm:</b>
<div class="defindent"><var>DT</var> necesarily consists of an instance 
<var>D</var> of <a href="#nt-duDaFrag" shape="rect"><i>duDayFrag</i></a> and/or an instance <var>T</var> of
<a href="#nt-duTFrag" shape="rect"><i>duTimeFrag</i></a>.</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"> 
<ul><li><div class="p"><var>d</var> be <a href="#f-duDaMap" shape="rect"><i><span class="arrow">&#183;</span>duDayFragmentMap<span class="arrow">&#183;</span></i></a>(<var>D</var>) 
(or 0 if <var>D</var> is not present) and</div></li><li><div class="p"><var>t</var> be <a href="#f-duTMap" shape="rect"><i><span class="arrow">&#183;</span>duTimeFragmentMap<span class="arrow">&#183;</span></i></a>(<var>T</var>) 
(or 0 if <var>T</var> is not present).</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">Return&#160; 86400&#160;&#215;&#160;<var>d</var>&#160;+&#160;<var>t</var>&#160;.</div>

</div></div>

<div class="defset">
<div class="not_aux">
<div class="defset-head">The <a href="#duration" shape="rect">duration</a> Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-durationMap" id="f-durationMap" shape="rect"><i><span class="arrow">&#183;</span>durationMap<span class="arrow">&#183;</span></i></a></b> (<var>DUR</var>) &#8594; <a href="#duration" shape="rect">duration</a>
<div class="defindent">Separates the <a href="#nt-durationRep" shape="rect"><i>durationLexicalRep</i></a> into the month part and the seconds part, 
then maps them into the <a href="#vp-du-month" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> and <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> of the 
<a href="#duration" shape="rect">duration</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>DUR</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-durationRep" shape="rect"><i>durationLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete <a href="#duration" shape="rect">duration</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>DUR</var> consists of possibly a 
leading '<code>-</code>', followed by 
'<code>P</code>' and then an instance <var>Y</var> of <a href="#nt-duYMFrag" shape="rect"><i>duYearMonthFrag</i></a> 
and/or an instance <var>D</var> of 
<a href="#nt-duDTFrag" shape="rect"><i>duDayTimeFrag</i></a>:</div>


<div class="defindent">Return a <a href="#duration" shape="rect">duration</a> whose
<ul><li><div class="p"><a href="#vp-du-month" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> value is
<ul><li><div class="p">0&#160;&#160; if <var>Y</var> is not present,</div></li><li><div class="p">&#8722;<a href="#f-duYMMap" shape="rect"><i><span class="arrow">&#183;</span>duYearMonthFragmentMap<span class="arrow">&#183;</span></i></a>(<var>Y</var>)&#160;&#160; if 
both '<code>-</code>' and <var>Y</var> are present, and</div></li><li><div class="p"><a href="#f-duYMMap" shape="rect"><i><span class="arrow">&#183;</span>duYearMonthFragmentMap<span class="arrow">&#183;</span></i></a>(<var>Y</var>)&#160;&#160; otherwise.</div></li></ul></div></li></ul> 
and whose
<ul><li><div class="p"><a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> value is
<ul><li><div class="p">0&#160;&#160; if <var>D</var> is not present,</div></li><li><div class="p">&#8722;<a href="#f-duDTMap" shape="rect"><i><span class="arrow">&#183;</span>duDayTimeFragmentMap<span class="arrow">&#183;</span></i></a>(<var>D</var>)&#160;&#160; if 
both '<code>-</code>' and <var>D</var> are present, and</div></li><li><div class="p"><a href="#f-duDTMap" shape="rect"><i><span class="arrow">&#183;</span>duDayTimeFragmentMap<span class="arrow">&#183;</span></i></a>(<var>D</var>)&#160;&#160; otherwise.</div></li></ul></div></li></ul> 
</div>

</div></div>

<div class="defset">
<div class="not_aux">
<div class="defset-head">The <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-yearMonthDurationMap" id="f-yearMonthDurationMap" shape="rect"><i><span class="arrow">&#183;</span>yearMonthDurationMap<span class="arrow">&#183;</span></i></a></b> (<var>YM</var>) &#8594; <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a>
<div class="defindent">Maps the lexical representation into the <a href="#vp-du-month" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> of a
<a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> value.&#160; (A
<a href="#yearMonthDuration" shape="rect">yearMonthDuration</a>'s <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> is always
zero.)&#160; <a href="#f-yearMonthDurationMap" shape="rect"><i><span class="arrow">&#183;</span>yearMonthDurationMap<span class="arrow">&#183;</span></i></a> is a restriction of <a href="#f-durationMap" shape="rect"><i><span class="arrow">&#183;</span>durationMap<span class="arrow">&#183;</span></i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>YM</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-yearMonthDurationRep" shape="rect"><i>yearMonthDurationLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>YM</var> necessarily consists of
an optional leading '<code>-</code>', followed by
'<code>P</code>' and then an instance <var>Y</var> of
<a href="#nt-duYMFrag" shape="rect"><i>duYearMonthFrag</i></a>:</div>


<div class="defindent">Return a <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> whose
<ul><li><div class="p"><a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> value is
 <ul><li><div class="p">&#8722;<a href="#f-duYMMap" shape="rect"><i><span class="arrow">&#183;</span>duYearMonthFragmentMap<span class="arrow">&#183;</span></i></a>(<var>Y</var>)&#160;&#160; if '<code>-</code>' is
present in <var>YM</var> and</div></li><li><div class="p"><a href="#f-duYMMap" shape="rect"><i><span class="arrow">&#183;</span>duYearMonthFragmentMap<span class="arrow">&#183;</span></i></a>(<var>Y</var>)&#160;&#160; otherwise, and</div></li></ul>
</div></li><li><div class="p"><a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> value is (necessarily) 0.</div></li></ul>
</div>

</div></div>

<div class="defset">
<div class="not_aux">
<div class="defset-head">The <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-dayTimeDurationMap" id="f-dayTimeDurationMap" shape="rect"><i><span class="arrow">&#183;</span>dayTimeDurationMap<span class="arrow">&#183;</span></i></a></b> (<var>DT</var>) &#8594; <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a>
<div class="defindent">Maps the lexical representation into the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> of a
<a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> value.&#160; (A
<a href="#dayTimeDuration" shape="rect">dayTimeDuration</a>'s <a href="#vp-du-month" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> is always
zero.)&#160; <a href="#f-dayTimeDurationMap" shape="rect"><i><span class="arrow">&#183;</span>dayTimeDurationMap<span class="arrow">&#183;</span></i></a> is a restriction of <a href="#f-durationMap" shape="rect"><i><span class="arrow">&#183;</span>durationMap<span class="arrow">&#183;</span></i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>DT</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>DT</var> necessarily
consists of possibly a leading '<code>-</code>', followed by
'<code>P</code>' and then an instance <var>D</var> of
<a href="#nt-duDTFrag" shape="rect"><i>duDayTimeFrag</i></a>:</div>


<div class="defindent">Return a <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> whose
<ul><li><div class="p"><a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> value is (necessarily) 0, and</div></li><li><div class="p"><a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> value is
 <ul><li><div class="p">&#8722;<a href="#f-duDTMap" shape="rect"><i><span class="arrow">&#183;</span>duDayTimeFragmentMap<span class="arrow">&#183;</span></i></a>(<var>D</var>)&#160;&#160; if '<code>-</code>' is
present in <var>DT</var> and</div></li><li><div class="p"><a href="#f-duDTMap" shape="rect"><i><span class="arrow">&#183;</span>duDayTimeFragmentMap<span class="arrow">&#183;</span></i></a>(<var>D</var>)&#160;&#160; otherwise.</div></li></ul></div></li></ul>
</div>

</div></div>

<div class="defset">
<div class="aux">
<div class="defset-head">Auxiliary <a href="#duration" shape="rect">duration</a>-related Functions
Producing Representation Fragments</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-duYMCan" id="f-duYMCan" shape="rect"><i><span class="arrow">&#183;</span>duYearMonthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>ym</var>) &#8594; <a href="#nt-duYMFrag" shape="rect"><i>duYearMonthFrag</i></a>
<div class="defindent">Maps a nonnegative integer, presumably the absolute value of the <a href="#vp-du-month" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> of a <a href="#duration" shape="rect">duration</a> value, to a <a href="#nt-duYMFrag" shape="rect"><i>duYearMonthFrag</i></a>, a fragment of a <a href="#duration" shape="rect">duration</a> <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>ym</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching <a href="#nt-duYMFrag" shape="rect"><i>duYearMonthFrag</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>y</var> be&#160; <var>ym</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;12&#160;, and</div></li><li><div class="p"><var>m</var> be&#160; <var>ym</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;12&#160;,</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">Return
<ul><li><div class="p"><a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>y</var>)&#160;&amp; '<code>Y</code>'&#160;&amp; <a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>m</var>)&#160;&amp; '<code>M</code>'&#160;&#160;
when neither <var>y</var> nor <var>m</var> is zero,</div></li><li><div class="p"><a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>y</var>)&#160;&amp; '<code>Y</code>'&#160;&#160;
when <var>y</var> is not zero but <var>m</var> is, and</div></li><li><div class="p">&#160;<a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>m</var>)&#160;&amp; '<code>M</code>'&#160;&#160;
when <var>y</var> is zero.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-duDCan" id="f-duDCan" shape="rect"><i><span class="arrow">&#183;</span>duDayCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>d</var>) &#8594; <a href="#nt-duDaFrag" shape="rect"><i>duDayFrag</i></a>
<div class="defindent">Maps a nonnegative integer, presumably the day normalized value from the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> of a <a href="#duration" shape="rect">duration</a> value, to a <a href="#nt-duDaFrag" shape="rect"><i>duDayFrag</i></a>, a fragment of a <a href="#duration" shape="rect">duration</a> <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>d</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching <a href="#nt-duDaFrag" shape="rect"><i>duDayFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p"><a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>d</var>)&#160;&amp; '<code>D</code>'&#160;&#160;
when <var>d</var> is not zero, and</div></li><li><div class="p">the empty string ('')&#160;&#160; when <var>d</var> is zero.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-duHCan" id="f-duHCan" shape="rect"><i><span class="arrow">&#183;</span>duHourCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>h</var>) &#8594; <a href="#nt-duHrFrag" shape="rect"><i>duHourFrag</i></a>
<div class="defindent">Maps a nonnegative integer, presumably the hour normalized value from the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> of a <a href="#duration" shape="rect">duration</a> value, to a <a href="#nt-duHrFrag" shape="rect"><i>duHourFrag</i></a>, a fragment of a <a href="#duration" shape="rect">duration</a> <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>h</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching <a href="#nt-duHrFrag" shape="rect"><i>duHourFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p"><a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>h</var>)&#160;&amp; '<code>H</code>'&#160;&#160;
when <var>h</var> is not zero, and</div></li><li><div class="p">the empty string ('')&#160;&#160; when <var>h</var> is zero.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-duMCan" id="f-duMCan" shape="rect"><i><span class="arrow">&#183;</span>duMinuteCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>m</var>) &#8594; <a href="#nt-duMiFrag" shape="rect"><i>duMinuteFrag</i></a>
<div class="defindent">Maps a nonnegative integer, presumably the minute normalized value from the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> of a <a href="#duration" shape="rect">duration</a> value, to a <a href="#nt-duMiFrag" shape="rect"><i>duMinuteFrag</i></a>, a fragment of a <a href="#duration" shape="rect">duration</a> <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>m</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching <a href="#nt-duMiFrag" shape="rect"><i>duMinuteFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p"><a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>m</var>)&#160;&amp; '<code>M</code>'&#160;&#160; 
when <var>m</var> is not zero, and</div></li><li><div class="p">the empty string ('')&#160;&#160; when <var>m</var> is zero.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-duSCan" id="f-duSCan" shape="rect"><i><span class="arrow">&#183;</span>duSecondCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>s</var>) &#8594; <a href="#nt-duSeFrag" shape="rect"><i>duSecondFrag</i></a>
<div class="defindent">Maps a nonnegative decimal number, presumably the second normalized value from the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> of a <a href="#duration" shape="rect">duration</a> value, to a <a href="#nt-duSeFrag" shape="rect"><i>duSecondFrag</i></a>, a fragment of a <a href="#duration" shape="rect">duration</a> <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>s</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative decimal number</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-duSeFrag" shape="rect"><i>duSecondFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p"><a href="#f-unsNoDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>s</var>)&#160;&amp; '<code>S</code>'&#160; 
when <var>s</var> is a non-zero integer,</div></li><li><div class="p"><a href="#f-unsDecCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>s</var>)&#160;&amp; '<code>S</code>'&#160; 
when <var>s</var> is not an integer, and</div></li><li><div class="p">the empty string ('') when <var>s</var> is zero.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-duTCan" id="f-duTCan" shape="rect"><i><span class="arrow">&#183;</span>duTimeCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>h</var>,&#160;<var>m</var>,&#160;<var>s</var>) &#8594; <a href="#nt-duTFrag" shape="rect"><i>duTimeFrag</i></a>
<div class="defindent">Maps three nonnegative numbers, presumably the hour, minute, and second normalized values from a <a href="#duration" shape="rect">duration</a>'s <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a>, to a <a href="#nt-duTFrag" shape="rect"><i>duTimeFrag</i></a>, a fragment of a <a href="#duration" shape="rect">duration</a> <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>h</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>m</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>s</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative decimal number</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching <a href="#nt-duTFrag" shape="rect"><i>duTimeFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p">'<code>T</code>'&#160;&amp;
<a href="#f-duHCan" shape="rect"><i><span class="arrow">&#183;</span>duHourCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>h</var>)&#160;&amp;
<a href="#f-duMCan" shape="rect"><i><span class="arrow">&#183;</span>duMinuteCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>m</var>)&#160;&amp;
<a href="#f-duSCan" shape="rect"><i><span class="arrow">&#183;</span>duSecondCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>s</var>)&#160;&#160; 
when <var>h</var>, <var>m</var>, and <var>s</var> are not all zero, and</div></li><li><div class="p">the empty string ('') when all arguments are zero.</div></li></ul>
</div>

<div class="deftop"><b><a name="f-duDTCan" id="f-duDTCan" shape="rect"><i><span class="arrow">&#183;</span>duDayTimeCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>ss</var>) &#8594; <a href="#nt-duDTFrag" shape="rect"><i>duDayTimeFrag</i></a>
<div class="defindent">Maps a nonnegative decimal number, presumably the absolute value of the <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> of a <a href="#duration" shape="rect">duration</a> value, to a <a href="#nt-duDTFrag" shape="rect"><i>duDayTimeFrag</i></a>, a fragment of a <a href="#duration" shape="rect">duration</a> <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>ss</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative decimal number</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-duDTFrag" shape="rect"><i>duDayTimeFrag</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>d</var> is&#160; 
<var>ss</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;86400&#160;,</div></li><li><div class="p"><var>h</var> is&#160; 
(<var>ss</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;86400)&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;3600&#160;,</div></li><li><div class="p"><var>m</var> is&#160; 
(<var>ss</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;3600)&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;60&#160;, and</div></li><li><div class="p"><var>s</var> is&#160; 
<var>ss</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;60&#160;,</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">Return
<ul><li><div class="p"><a href="#f-duDCan" shape="rect"><i><span class="arrow">&#183;</span>duDayCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>d</var>)&#160;&amp; 
<a href="#f-duTCan" shape="rect"><i><span class="arrow">&#183;</span>duTimeCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>h</var>,&#160;<var>m</var>,&#160;<var>s</var>)&#160;&#160; 
when <var>ss</var> is not zero and</div></li><li><div class="p">'<code>T0S</code>'&#160;&#160; when <var>ss</var> is zero.</div></li></ul>
</div>

</div></div>

<div class="defset">
<div class="not_aux">
<div class="defset-head">The <a href="#duration" shape="rect">duration</a> Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-durationCanMap" id="f-durationCanMap" shape="rect"><i><span class="arrow">&#183;</span>durationCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>v</var>) &#8594; <a href="#nt-durationRep" shape="rect"><i>durationLexicalRep</i></a>
<div class="defindent">Maps a <a href="#duration" shape="rect">duration</a>'s property values  to <a href="#nt-durationRep" shape="rect"><i>durationLexicalRep</i></a> fragments and combines the fragments into a complete <a href="#nt-durationRep" shape="rect"><i>durationLexicalRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>v</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#duration" shape="rect">duration</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-durationRep" shape="rect"><i>durationLexicalRep</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>m</var> be <var>v</var>'s <a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a>,</div></li><li><div class="p"><var>s</var> be <var>v</var>'s <a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a>, and</div></li><li><div class="p"><var>sgn</var> be '<code>-</code>' if <var>m</var> or 
<var>s</var> is negative and
the empty string ('') otherwise.</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">Return
<ul><li><div class="p"><var>sgn</var>&#160;&amp; '<code>P</code>'&#160;&amp; 
<a href="#f-duYMCan" shape="rect"><i><span class="arrow">&#183;</span>duYearMonthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(|&#160;<var>m</var>&#160;|)&#160;&amp; 
<a href="#f-duDTCan" shape="rect"><i><span class="arrow">&#183;</span>duDayTimeCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(|&#160;<var>s</var>&#160;|)&#160;&#160;&#160; 
when neither <var>m</var> nor <var>s</var> is zero,</div></li><li><div class="p"><var>sgn</var>&#160;&amp; '<code>P</code>'&#160;&amp; 
<a href="#f-duYMCan" shape="rect"><i><span class="arrow">&#183;</span>duYearMonthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(|&#160;<var>m</var>&#160;|)&#160;&#160;&#160; 
when <var>m</var> is not zero but <var>s</var> is, and</div></li><li><div class="p"><var>sgn</var>&#160;&amp; '<code>P</code>'&#160;&amp; 
<a href="#f-duDTCan" shape="rect"><i><span class="arrow">&#183;</span>duDayTimeCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(|&#160;<var>s</var>&#160;|)&#160;&#160;&#160; 
when <var>m</var> is zero.</div></li></ul>
</div>

</div></div>

<div class="defset">
<div class="not_aux">
<div class="defset-head">The <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-yearMonthDurationCanMap" id="f-yearMonthDurationCanMap" shape="rect"><i><span class="arrow">&#183;</span>yearMonthDurationCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>ym</var>) &#8594; <a href="#nt-yearMonthDurationRep" shape="rect"><i>yearMonthDurationLexicalRep</i></a>
<div class="defindent">Maps a <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a>'s <a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> value  to
a <a href="#nt-yearMonthDurationRep" shape="rect"><i>yearMonthDurationLexicalRep</i></a>.&#160; (The <a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> value is necessarily zero and is ignored.)&#160; <a href="#f-yearMonthDurationCanMap" shape="rect"><i><span class="arrow">&#183;</span>yearMonthDurationCanonicalMap<span class="arrow">&#183;</span></i></a> is a restriction of <a href="#f-durationCanMap" shape="rect"><i><span class="arrow">&#183;</span>durationCanonicalMap<span class="arrow">&#183;</span></i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>ym</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-yearMonthDurationRep" shape="rect"><i>yearMonthDurationLexicalRep</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>m</var> be <var>ym</var>'s <a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> and</div></li><li><div class="p"><var>sgn</var> be '<code>-</code>' if <var>m</var> is negative and
the empty string ('') otherwise.</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">
Return&#160; <var>sgn</var>&#160;&amp; '<code>P</code>'&#160;&amp; 
<a href="#f-duYMCan" shape="rect"><i><span class="arrow">&#183;</span>duYearMonthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(|&#160;<var>m</var>&#160;|)&#160;.
</div>

</div></div>

<div class="defset">
<div class="not_aux">
<div class="defset-head">The <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-dayTimeDurationCanMap" id="f-dayTimeDurationCanMap" shape="rect"><i><span class="arrow">&#183;</span>dayTimeDurationCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>dt</var>) &#8594; <a href="#nt-dayTimeDurationRep" shape="rect"><i>dayTimeDurationLexicalRep</i></a>
<div class="defindent">Maps a <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a>'s <a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> value  to
a <a href="#nt-dayTimeDurationRep" shape="rect"><i>dayTimeDurationLexicalRep</i></a>.&#160; (The <a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> value is necessarily zero and is ignored.)&#160; <a href="#f-dayTimeDurationCanMap" shape="rect"><i><span class="arrow">&#183;</span>dayTimeDurationCanonicalMap<span class="arrow">&#183;</span></i></a> is a restriction of <a href="#f-durationCanMap" shape="rect"><i><span class="arrow">&#183;</span>durationCanonicalMap<span class="arrow">&#183;</span></i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>dt</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-dayTimeDurationRep" shape="rect"><i>dayTimeDurationLexicalRep</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>s</var> be <var>dt</var>'s <a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> and</div></li><li><div class="p"><var>sgn</var> be '<code>-</code>' if <var>s</var> is negative and
the empty string ('') otherwise.</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">Return&#160;<var>sgn</var>&#160;&amp; '<code>P</code>'&#160;&amp; 
<a href="#f-duYMCan" shape="rect"><i><span class="arrow">&#183;</span>duYearMonthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(|&#160;<var>s</var>&#160;|)&#160;.
</div>

</div></div>
</div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#sec-duration-functions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#sec-misc-lexmaps" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="sec-dt-functions" id="sec-dt-functions" shape="rect"></a>E.3 Date/time-related Definitions</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;E.3.1 <a href="#sec-normalization" shape="rect">Normalization of property values</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;E.3.2 <a href="#sec-aux-functions" shape="rect">Auxiliary Functions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;E.3.3 <a href="#sec-dt-arith" shape="rect">Adding durations to dateTimes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;E.3.4 <a href="#sec-timeontimeline" shape="rect">Time on timeline</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;E.3.5 <a href="#sec-dt-lexmaps" shape="rect">Lexical mappings</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;E.3.6 <a href="#sec-dt-canmaps" shape="rect">Canonical Mappings</a><br clear="none" />
</div><div class="div3">
<h4><a name="sec-normalization" id="sec-normalization" shape="rect"></a>E.3.1 Normalization of property values</h4><div class="block">When adding and subtracting numbers from date/time properties, the
immediate results may not conform to the limits specified.&#160;
Accordingly, the following procedures are used to
"normalize" potential property values to
corresponding values that do conform to the appropriate limits.&#160;
Normalization is required when dealing with time zone offset changes (as when
converting to 
<a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a> 
from 
"local" 
values) and when
adding <a href="#duration" shape="rect">duration</a> values to or subtracting them from
<a href="#dateTime" shape="rect">dateTime</a> values.



<div class="defset">
<div class="aux">
<div class="defset-head">Date/time Datatype Normalizing Procedures</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-dt-normMo" id="f-dt-normMo" shape="rect"><i><span class="arrow">&#183;</span>normalizeMonth<span class="arrow">&#183;</span></i></a></b> (<var>yr</var>,&#160;<var>mo</var>) 
<div class="defindent">If month (<var>mo</var>) is out of range, 
adjust month and year (<var>yr</var>) accordingly;
otherwise, make no change.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>yr</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>mo</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>

</tbody></table></div>


<b>Algorithm:</b>


<div class="defindent">
<ol class="enumar"><li><div class="p">
Add&#160; (<var>mo</var>&#160;&#8722;&#160;1)&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;12&#160; to <var>yr</var>.
</div></li><li><div class="p">
Set <var>mo</var> to&#160;
(<var>mo</var>&#160;&#8722;&#160;1)&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;12&#160;+&#160;1&#160;.
</div></li></ol>
</div>

<div class="deftop"><b><a name="f-dt-normDa" id="f-dt-normDa" shape="rect"><i><span class="arrow">&#183;</span>normalizeDay<span class="arrow">&#183;</span></i></a></b> (<var>yr</var>,&#160;<var>mo</var>,&#160;<var>da</var>) 
<div class="defindent">If
month (<var>mo</var>) is out of range, or day (<var>da</var>) is
out of range for the appropriate month, then adjust values accordingly,
otherwise make no change.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>yr</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>mo</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>da</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>

</tbody></table></div>


<b>Algorithm:</b>


<div class="defindent">
<ol class="enumar"><li><div class="p"><a href="#f-dt-normMo" shape="rect"><i><span class="arrow">&#183;</span>normalizeMonth<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>)</div></li><li><div class="p">Repeat until <var>da</var> is positive and not greater than 
<a href="#f-daysInMonth" shape="rect"><i><span class="arrow">&#183;</span>daysInMonth<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>):
 <ol class="enumla"><li><div class="p">If <var>da</var> exceeds
 <a href="#f-daysInMonth" shape="rect"><i><span class="arrow">&#183;</span>daysInMonth<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>)
 then:
  <ol class="enumlr"><li><div class="p">Subtract that limit from <var>da</var>.</div></li><li><div class="p">Add 1 to <var>mo</var>.</div></li><li><div class="p"><a href="#f-dt-normMo" shape="rect"><i><span class="arrow">&#183;</span>normalizeMonth<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>)</div></li></ol>
 </div></li><li><div class="p">If <var>da</var> is not positive then:
  <ol class="enumlr"><li><div class="p">Subtract 1 from <var>mo</var>.</div></li><li><div class="p"><a href="#f-dt-normMo" shape="rect"><i><span class="arrow">&#183;</span>normalizeMonth<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>)</div></li><li><div class="p">Add the new upper limit from the table to <var>da</var>.</div></li></ol>
 </div></li></ol>
</div></li></ol>
</div>

<div class="deftop"><b><a name="f-dt-normMi" id="f-dt-normMi" shape="rect"><i><span class="arrow">&#183;</span>normalizeMinute<span class="arrow">&#183;</span></i></a></b> (<var>yr</var>,&#160;<var>mo</var>,&#160;<var>da</var>,&#160;<var>hr</var>,&#160;<var>mi</var>) 
<div class="defindent">Normalizes minute, hour, month, and year values to values that obey the appropriate constraints.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>yr</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>mo</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>da</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>hr</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>mi</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>

</tbody></table></div>


<b>Algorithm:</b>


<div class="defindent">
<ol class="enumar"><li><div class="p">Add &#160; <var>mi</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;60&#160; to <var>hr</var>.</div></li><li><div class="p">Set <var>mi</var> to&#160; <var>mi</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;60&#160;.</div></li><li><div class="p">Add&#160; <var>hr</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;24&#160; to <var>da</var>.</div></li><li><div class="p">Set <var>hr</var> to&#160; <var>hr</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;24&#160;.</div></li><li><div class="p"><a href="#f-dt-normDa" shape="rect"><i><span class="arrow">&#183;</span>normalizeDay<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>,&#160;<var>da</var>).</div></li></ol>
</div>

<div class="deftop"><b><a name="f-dt-normSe" id="f-dt-normSe" shape="rect"><i><span class="arrow">&#183;</span>normalizeSecond<span class="arrow">&#183;</span></i></a></b> (<var>yr</var>,&#160;<var>mo</var>,&#160;<var>da</var>,&#160;<var>hr</var>,&#160;<var>mi</var>,&#160;<var>se</var>) 
<div class="defindent">Normalizes second, minute, hour, month, and year values to values that obey the appropriate
constraints.&#160; (This algorithm ignores leap seconds.)
</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>yr</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>mo</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>da</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>hr</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>mi</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>se</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a decimal number</td></tr>

</tbody></table></div>


<b>Algorithm:</b>


<div class="defindent">
<ol class="enumar"><li><div class="p">Add&#160; <var>se</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;60&#160; to <var>mi</var>.</div></li><li><div class="p">Set <var>se</var> to
<var>se</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;60&#160;.</div></li><li><div class="p"><a href="#f-dt-normMi" shape="rect"><i><span class="arrow">&#183;</span>normalizeMinute<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>,&#160;<var>da</var>,&#160;<var>hr</var>,&#160;<var>mi</var>).</div></li></ol>
</div>

</div></div>
</div></div><div class="div3">
<h4><a name="sec-aux-functions" id="sec-aux-functions" shape="rect"></a>E.3.2 Auxiliary Functions</h4><div class="block">
<div class="defset">
<div class="not_aux">
<div class="defset-head">Date/time Auxiliary Functions</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-daysInMonth" id="f-daysInMonth" shape="rect"><i><span class="arrow">&#183;</span>daysInMonth<span class="arrow">&#183;</span></i></a></b> (<var>y</var>,&#160;<var>m</var>) &#8594; integer
<div class="defindent">Returns the number of the last day of the month
for any combination of year and month.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>y</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an <a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a> integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>m</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer between 1 and 12</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">between 28 and 31 inclusive</div>

<b>Algorithm:</b>


<div class="defindent">
Return:
<ul><li><div class="p">28&#160;&#160; when <var>m</var> is 2 and
<var>y</var> is not evenly divisible by 4,
or is evenly divisible by 100 but not by 400, 
or is <b><i>absent</i></b>,</div></li><li><div class="p">29&#160;&#160; when <var>m</var> is 2 and 
<var>y</var> is evenly divisible by 400, 
or is evenly divisible by 4 but not by 100,</div></li><li><div class="p">30&#160;&#160; when <var>m</var> is 4, 6, 9, or 11,</div></li><li><div class="p">31&#160;&#160; otherwise (<var>m</var> is 1, 3, 5, 7, 8, 10, or 12)</div></li></ul>
</div>

<div class="deftop"><b><a name="p-setDTFromRaw" id="p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a></b> (<var>Yr</var>,&#160;<var>Mo</var>,&#160;<var>Da</var>,&#160;<var>Hr</var>,&#160;<var>Mi</var>,&#160;<var>Se</var>,&#160;<var>Tz</var>) &#8594; an instance of the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>
<div class="defindent">Returns an instance of the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> with
property values as specified in the arguments.  If an argument is 
omitted, the corresponding property is set to <b><i>absent</i></b>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>Yr</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an <a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>
integer</td></tr>
<tr><td rowspan="1" colspan="1"><var>Mo</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an <a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>
integer between 1 and 12 inclusive</td></tr>
<tr><td rowspan="1" colspan="1"><var>Da</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an <a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>
integer between 1 and 31 inclusive</td></tr>
<tr><td rowspan="1" colspan="1"><var>Hr</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an <a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>
integer between 0 and 24 inclusive</td></tr>
<tr><td rowspan="1" colspan="1"><var>Mi</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an <a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>
integer between 0 and 59 inclusive</td></tr>
<tr><td rowspan="1" colspan="1"><var>Se</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an <a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>
decimal number greater than or equal to 0 and less than 
60</td></tr>
<tr><td rowspan="1" colspan="1"><var>Tz</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an <a href="#dt-optional" class="termref" shape="rect"><span class="arrow">&#183;</span>optional<span class="arrow">&#183;</span></a>
integer
between &#8722;840 and 840 inclusive.</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent"> </div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>dt</var> be an instance of the <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a></div></li><li><div class="p"><var>yr</var>
be <var>Yr</var> when <var>Yr</var> is not <b><i>absent</i></b>, otherwise 1</div></li><li><div class="p"><var>mo</var> 
be <var>Mo</var>when <var>Mo</var> is
not <b><i>absent</i></b>, otherwise 1</div></li><li><div class="p"><var>da</var> 
be <var>Da</var>when <var>Da</var> is
not <b><i>absent</i></b>, otherwise 1</div></li><li><div class="p"><var>hr</var> 
be <var>Hr</var>when <var>Hr</var> is
not <b><i>absent</i></b>, otherwise 0</div></li><li><div class="p"><var>mi</var> 
be <var>Mi</var>when <var>Mi</var> is
not <b><i>absent</i></b>, otherwise 0</div></li><li><div class="p"><var>se</var> 
be <var>Se</var>when <var>Se</var> is
not <b><i>absent</i></b>, otherwise 0</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">

<ol class="enumar"><li><div class="p"><a href="#f-dt-normSe" shape="rect"><i><span class="arrow">&#183;</span>normalizeSecond<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>,&#160;<var>da</var>,&#160;<var>hr</var>,&#160;<var>mi</var>,&#160;<var>se</var>)</div></li><li><div class="p">Set the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> property of <var>dt</var> to <b><i>absent</i></b>
when <var>Yr</var> is <b><i>absent</i></b>, otherwise <var>yr</var>.</div></li><li><div class="p">Set the <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> property of <var>dt</var> to <b><i>absent</i></b>
when <var>Mo</var> is <b><i>absent</i></b>, otherwise <var>mo</var>.</div></li><li><div class="p">Set the <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> property of <var>dt</var> to <b><i>absent</i></b>
when <var>Da</var> is <b><i>absent</i></b>, otherwise <var>da</var>.</div></li><li><div class="p">Set the <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a> property of <var>dt</var> to <b><i>absent</i></b>
when <var>Hr</var> is <b><i>absent</i></b>, otherwise <var>hr</var>.</div></li><li><div class="p">Set the <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a> property of <var>dt</var> to <b><i>absent</i></b>
when <var>Mi</var> is <b><i>absent</i></b>, otherwise <var>mi</var>.</div></li><li><div class="p">Set the <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> property of <var>dt</var> to <b><i>absent</i></b>
when <var>Se</var> is <b><i>absent</i></b>, otherwise <var>se</var>.</div></li><li><div class="p">Set the <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> property of <var>dt</var> to <var>Tz</var></div></li><li><div class="p">Return <var>dt</var>.</div></li></ol>
</div>

</div></div>
</div></div><div class="div3">
<h4><a name="sec-dt-arith" id="sec-dt-arith" shape="rect"></a>E.3.3 Adding durations to dateTimes</h4><p id="new_g1">
Given a <a href="#dateTime" shape="rect">dateTime</a> <var>S</var> and a <a href="#duration" shape="rect">duration</a> 
<var>D</var>, function 
<a href="#vp-dt-dateTimePlusDuration" shape="rect"><i><span class="arrow">&#183;</span>dateTimePlusDuration<span class="arrow">&#183;</span></i></a>
specifies how to compute a <a href="#dateTime" shape="rect">dateTime</a> <var>E</var>, where
<var>E</var> is the end of the time period with start <var>S</var> and
duration <var>D</var> i.e. <var>E</var> = <var>S</var> +
<var>D</var>.&#160; Such computations are used, for example, to
determine whether a <a href="#dateTime" shape="rect">dateTime</a> is within a specific time 
period.&#160; This 
algorithm 
can also be applied,
when applications need the operation,
to the addition of <a href="#duration" shape="rect">duration</a>s to the datatypes 
<a href="#date" shape="rect">date</a>, <a href="#gYearMonth" shape="rect">gYearMonth</a>, <a href="#gYear" shape="rect">gYear</a>, 
<a href="#gDay" shape="rect">gDay</a> and <a href="#gMonth" shape="rect">gMonth</a>, 
each of which can be viewed as 
denoting a set of 
<a href="#dateTime" shape="rect">dateTime</a>s. In such cases, the addition is made to the 
first or starting <a href="#dateTime" shape="rect">dateTime</a> in the set.&#160;
Note that the extension of this
algorithm to types other than <a href="#dateTime" shape="rect">dateTime</a> is not
needed for schema-validity assessment.
</p><p id="new_g5">
Essentially, this calculation adds the
<a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> and
<a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> properties of the 
<a href="#duration" shape="rect">duration</a> value separately to the
<a href="#dateTime" shape="rect">dateTime</a> value. The 
<a href="#vp-du-month" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> 
value
is added to the starting <a href="#dateTime" shape="rect">dateTime</a>
value first. If the 
day is out of range for the new
month value, it is <em>pinned</em>
to be within range. Thus April 31 turns into April 30. Then the
<a href="#vp-du-second" class="vprop" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> value
is added. This latter addition can
cause the year, 
month, day, hour, and minute to change.
</p><p id="new_g6">
Leap seconds are 
ignored 
by the computation. All calculations
use 60 seconds per minute.
</p><p id="new_g7">
Thus the addition of either PT1M or PT60S to any dateTime will always
produce the same result. This is a special definition of addition which
is designed to match common practice, and&#8212;most importantly&#8212;be stable
over time.
</p><p id="new_g8">
A definition that attempted to take leap-seconds into account would
need to be constantly updated, and could not predict the results of
future implementation's additions. The decision to introduce a leap
second in <a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a> is the responsibility of the 
<a href="#IERS" shape="rect">[International Earth Rotation Service (IERS)]</a>. They make periodic
announcements as to when leap seconds are to be added, but this is not
known more than a year in advance. For more information on leap
seconds, see <a href="#USNavy" shape="rect">[U.S. Naval Observatory Time Service Department]</a>.
</p><div class="defset">
<div class="not_aux">
<div class="defset-head">Adding <a href="#duration" shape="rect">duration</a> to  <a href="#dateTime" shape="rect">dateTime</a></div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-dt-dateTimePlusDuration" id="vp-dt-dateTimePlusDuration" shape="rect"><i><span class="arrow">&#183;</span>dateTimePlusDuration<span class="arrow">&#183;</span></i></a></b> (<var>du</var>,&#160;<var>dt</var>) &#8594; <a href="#dateTime" shape="rect">dateTime</a>
<div class="defindent">Adds a <a href="#duration" shape="rect">duration</a> to a <a href="#dateTime" shape="rect">dateTime</a> value, producing another <a href="#dateTime" shape="rect">dateTime</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>du</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#duration" shape="rect">duration</a>
value</td></tr>
<tr><td rowspan="1" colspan="1"><var>dt</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#dateTime" shape="rect">dateTime</a>
value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a <a href="#dateTime" shape="rect">dateTime</a>
value</div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>yr</var> be <var>dt</var>'s <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>,</div></li><li><div class="p"><var>mo</var> be <var>dt</var>'s <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>,</div></li><li><div class="p"><var>da</var> be <var>dt</var>'s <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>,</div></li><li><div class="p"><var>hr</var> be <var>dt</var>'s <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>,</div></li><li><div class="p"><var>mi</var> be <var>dt</var>'s <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>, and</div></li><li><div class="p"><var>se</var> be <var>dt</var>'s <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a>.</div></li><li><div class="p"><var>tz</var> be <var>dt</var>'s <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>.</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">
<ol class="enumar"><li><div class="p">Add <var>du</var>'s <a href="#vp-du-month" shape="rect"><i><span class="arrow">&#183;</span>months<span class="arrow">&#183;</span></i></a> to  <var>mo</var>.</div></li><li><div class="p"><a href="#f-dt-normMo" shape="rect"><i><span class="arrow">&#183;</span>normalizeMonth<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>). (I.e., carry any
over- or underflow, adjust month.)</div></li><li><div class="p">Set <var>da</var>
to&#160; min(<var>da</var>,&#160;<a href="#f-daysInMonth" shape="rect"><i><span class="arrow">&#183;</span>daysInMonth<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>)).
(I.e., <em>pin</em> the value if necessary.)</div></li><li><div class="p">Add <var>du</var>'s <a href="#vp-du-second" shape="rect"><i><span class="arrow">&#183;</span>seconds<span class="arrow">&#183;</span></i></a> to  <var>se</var>.</div></li><li><div class="p"><a href="#f-dt-normSe" shape="rect"><i><span class="arrow">&#183;</span>normalizeSecond<span class="arrow">&#183;</span></i></a>(<var>yr</var>,&#160;<var>mo</var>,&#160;<var>da</var>,&#160;<var>hr</var>,&#160;<var>mi</var>,&#160;<var>se</var>).
(I.e., carry over- or underflow of seconds up to minutes, hours, etc.)
</div></li><li><div class="p">Return <a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<var>yr</var>, <var>mo</var>, <var>da</var>, 
<var>hr</var>, <var>mi</var>, <var>se</var>,
<var>tz</var>)
</div></li></ol>
</div>

</div></div><p>This algorithm may be applied to date/time types
other than <a href="#dateTime" shape="rect">dateTime</a>, by</p><ol class="enumar"><li><div class="p">For each <b><i>absent</i></b> property, supply the minimum legal value for that
property (1 for years, months, days, 0 for hours, minutes, seconds).</div></li><li><div class="p">Call the function.</div></li><li><div class="p">For each property <b><i>absent</i></b> in the initial value,
set the corresponding property in the result value to <b><i>absent</i></b>.</div></li></ol><p id="new_g11"><em>Examples:</em></p><table id="new_g12" border="1" cellspacing="0" cellpadding="4"><tbody><tr><th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">dateTime</th><th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">duration</th><th align="center" style="background-color: #FFFF99" rowspan="1" colspan="1">result</th></tr><tr><td align="center" rowspan="1" colspan="1">2000-01-12T12:13:14Z</td><td align="center" rowspan="1" colspan="1">P1Y3M5DT7H10M3.3S</td><td align="center" rowspan="1" colspan="1">2001-04-17T19:23:17.3Z</td></tr><tr><td align="center" rowspan="1" colspan="1">2000-01</td><td align="center" rowspan="1" colspan="1">-P3M</td><td align="center" rowspan="1" colspan="1">1999-10</td></tr><tr><td align="center" rowspan="1" colspan="1">2000-01-12</td><td align="center" rowspan="1" colspan="1">PT33H</td><td align="center" rowspan="1" colspan="1">2000-01-13</td></tr></tbody></table><div class="block">
Note that the addition defined by 
<a href="#vp-dt-dateTimePlusDuration" shape="rect"><i><span class="arrow">&#183;</span>dateTimePlusDuration<span class="arrow">&#183;</span></i></a> differs from addition on
integers or real numbers in not being commutative.
The order of addition of durations to instants <em>is</em> significant.
For example, there are cases where:
<blockquote><blockquote><p>((dateTime + duration1) + duration2) != ((dateTime +
duration2) + duration1)</p></blockquote></blockquote>
</div><p id="new_g16"><em>Example:</em></p><ul><li><div class="p">
(2000-03-30 + P1D) + P1M = 2000-03-31 + P1M = 2000-<b>04-30</b></div></li><li><div class="p">
(2000-03-30 + P1M) + P1D = 2000-04-30 + P1D = 2000-<b>05-01</b></div></li></ul></div><div class="div3">
<h4><a name="sec-timeontimeline" id="sec-timeontimeline" shape="rect"></a>E.3.4 Time on timeline</h4><div class="defset">
<div class="not_aux">
<div class="defset-head">Time on Timeline for Date/time Seven-property
Model Datatypes</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-dt-timeOnTimeline" id="vp-dt-timeOnTimeline" shape="rect"><i><span class="arrow">&#183;</span>timeOnTimeline<span class="arrow">&#183;</span></i></a></b> (<var>dt</var>) &#8594; decimal number
<div class="defindent">Maps a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value to the decimal number
representing its position on the "time line".</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>dt</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>
value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a decimal number</div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<ul><li><div class="p"><var>yr</var> be
1971
when <var>dt</var>'s <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> is <b><i>absent</i></b>,
and&#160; <var>dt</var>'s
<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>&#160;&#8722;&#160;1&#160; otherwise,</div></li><li><div class="p"><var>mo</var> be 12 or
<var>dt</var>'s <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>&#160;, similarly,</div></li><li><div class="p"><var>da</var> be&#160;
<a href="#f-daysInMonth" shape="rect"><i><span class="arrow">&#183;</span>daysInMonth<span class="arrow">&#183;</span></i></a>(<var>yr</var>+1,&#160;<var>mo</var>)&#160;&#8722;&#160;1&#160;
or&#160; (<var>dt</var>'s
<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>)&#160;&#8722;&#160;1&#160;, similarly,</div></li><li><div class="p"><var>hr</var> be 0 or
<var>dt</var>'s <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>&#160;, 
similarly,</div></li><li><div class="p"><var>mi</var> be 0 or
<var>dt</var>'s <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>&#160;,
similarly,
and</div></li><li><div class="p"><var>se</var> be 0 or
<var>dt</var>'s <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a>&#160;,
similarly.</div></li></ul>
</td></tr></tbody></table></div>

<div class="defindent">
<ol class="enumar"><li><div class="p">Subtract <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> from <var>mi</var>&#160;&#160;
when <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> is not <b><i>absent</i></b>.</div></li><li><div class="p">(<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>)
<ol class="enumla"><li><div class="p">Set <var>ToTl</var> to&#160;
31536000&#160;&#215;&#160;<var>yr</var>&#160;.</div></li></ol></div></li><li><div class="p">(Leap-year Days, <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>, and <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>)
<ol class="enumla"><li><div class="p">Add&#160; 86400&#160;&#215;
(<var>yr</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;400&#160;&#8722;
<var>yr</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;100&#160;+
<var>yr</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;4)&#160; to
<var>ToTl</var>.</div></li><li><div class="p">Add &#160; 86400&#160;&#215; Sum<sub><var>m</var>&#160;&lt;&#160;<var>mo</var></sub>&#160;<a href="#f-daysInMonth" shape="rect"><i><span class="arrow">&#183;</span>daysInMonth<span class="arrow">&#183;</span></i></a>(<var>yr</var>&#160;+&#160;1,&#160;<var>m</var>) to
<var>ToTl</var></div></li><li><div class="p">Add &#160; 86400&#160;&#215;&#160;<var>da</var>&#160; to
<var>ToTl</var>.</div></li></ol></div></li><li><div class="p">(<a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>, <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>,
and <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a>)     
<ol class="enumla"><li><div class="p">Add&#160; 3600&#160;&#215;&#160;<var>hr</var>&#160;+
60&#160;&#215;&#160;<var>mi</var>&#160;+ <var>se</var>&#160;
to <var>ToTl</var>.</div></li></ol></div></li><li><div class="p">Return <var>ToTl</var>.</div></li></ol>
</div>

</div></div></div><div class="div3">
<h4><a name="sec-dt-lexmaps" id="sec-dt-lexmaps" shape="rect"></a>E.3.5 Lexical mappings</h4><div class="defset">
<div class="not_aux">
<div class="defset-head">Partial Date/time Lexical Mappings</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-dt-yrMap" id="f-dt-yrMap" shape="rect"><i><span class="arrow">&#183;</span>yearFragValue<span class="arrow">&#183;</span></i></a></b> (<var>YR</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>YR</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">an integer</div>

<b>Algorithm:</b>


<div class="defindent">Return <a href="#f-noDecVal" shape="rect"><i><span class="arrow">&#183;</span>noDecimalMap<span class="arrow">&#183;</span></i></a>(<var>YR</var>)</div>

<div class="deftop"><b><a name="f-dt-moMap" id="f-dt-moMap" shape="rect"><i><span class="arrow">&#183;</span>monthFragValue<span class="arrow">&#183;</span></i></a></b> (<var>MO</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>MO</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">an integer</div>

<b>Algorithm:</b>


<div class="defindent">Return <a href="#f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a>(<var>MO</var>)</div>

<div class="deftop"><b><a name="f-dt-daMap" id="f-dt-daMap" shape="rect"><i><span class="arrow">&#183;</span>dayFragValue<span class="arrow">&#183;</span></i></a></b> (<var>DA</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>DA</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">an integer</div>

<b>Algorithm:</b>


<div class="defindent">Return <a href="#f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a>(<var>DA</var>)</div>

<div class="deftop"><b><a name="f-dt-hrMap" id="f-dt-hrMap" shape="rect"><i><span class="arrow">&#183;</span>hourFragValue<span class="arrow">&#183;</span></i></a></b> (<var>HR</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>HR</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">an integer</div>

<b>Algorithm:</b>


<div class="defindent">Return <a href="#f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a>(<var>HR</var>)</div>

<div class="deftop"><b><a name="f-dt-miMap" id="f-dt-miMap" shape="rect"><i><span class="arrow">&#183;</span>minuteFragValue<span class="arrow">&#183;</span></i></a></b> (<var>MI</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>MI</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">an integer</div>

<b>Algorithm:</b>


<div class="defindent">Return <a href="#f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a>(<var>MI</var>)</div>

<div class="deftop"><b><a name="f-dt-seMap" id="f-dt-seMap" shape="rect"><i><span class="arrow">&#183;</span>secondFragValue<span class="arrow">&#183;</span></i></a></b> (<var>SE</var>) &#8594; decimal number
<div class="defindent">Maps a <a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto a decimal number, presumably the <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>SE</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a decimal number</div>

<b>Algorithm:</b>


<div class="defindent">Return
 <ul><li><div class="p"><a href="#f-unsNoDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedNoDecimalMap<span class="arrow">&#183;</span></i></a>(<var>SE</var>)&#160;&#160; when no decimal point occurs in <var>SE</var>, and</div></li><li><div class="p"><a href="#f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a>(<var>SE</var>)&#160;&#160; otherwise.</div></li></ul></div>

<div class="deftop"><b><a name="f-dt-tzMap" id="f-dt-tzMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneFragValue<span class="arrow">&#183;</span></i></a></b> (<var>TZ</var>) &#8594; integer
<div class="defindent">Maps a <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>,
onto an integer, presumably the <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>TZ</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">an integer</div>

<b>Algorithm:</b>
<div class="defindent"><var>TZ</var> necessarily consists of either just '<code>Z</code>', or
 a sign ('<code>+</code>' or '<code>-</code>') followed by an instance <var>H</var> of
 <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>, a colon, and an instance <var>M</var> of <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>
</div>


<div class="defindent">Return
 <ul><li><div class="p">0&#160;&#160; when <var>TZ</var> is '<code>Z</code>',</div></li><li><div class="p">&#8722;(<a href="#f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a>(<var>H</var>)&#160;&#215;&#160;60&#160;+ <a href="#f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a>(<var>M</var>))&#160;&#160;
 when the sign is '<code>-</code>', and</div></li><li><div class="p"><a href="#f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a>(<var>H</var>)&#160;&#215;&#160;60&#160;+ <a href="#f-unsDecVal" shape="rect"><i><span class="arrow">&#183;</span>unsignedDecimalPtMap<span class="arrow">&#183;</span></i></a>(<var>M</var>)&#160;&#160;
 otherwise.</div></li></ul></div>

</div></div><div class="note"><div class="p"><b>Note:</b> There is no <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> for
<a href="#nt-eodFrag" shape="rect"><i>endOfDayFrag</i></a>; it is handled specially by the relevant
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a>.&#160; See, e.g.,
<a href="#vp-dateTimeLexRep" shape="rect"><i><span class="arrow">&#183;</span>dateTimeLexicalMap<span class="arrow">&#183;</span></i></a>.</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-dateTimeLexRep" id="vp-dateTimeLexRep" shape="rect"><i><span class="arrow">&#183;</span>dateTimeLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#dateTime" shape="rect">dateTime</a>
<div class="defindent">Maps a <a href="#nt-dateTimeRep" shape="rect"><i>dateTimeLexicalRep</i></a> to
a <a href="#dateTime" shape="rect">dateTime</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-dateTimeRep" shape="rect"><i>dateTimeLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete <a href="#dateTime" shape="rect">dateTime</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>LEX</var> necessarily includes
substrings
that are instances of <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>, 
<a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>, and
<a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>
(below referred to as
<var>Y</var>, <var>MO</var>, and <var>D</var> respectively);
it
also contains either instances of
<a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>, <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>,
and <a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>(<var>Y</var>,
<var>MI</var>, and <var>S</var>),
or
else an instance of <a href="#nt-eodFrag" shape="rect"><i>endOfDayFrag</i></a>; finally,
it may optionally contain an instance
of<a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>
(<var>T</var>).</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>tz</var>
be <a href="#f-dt-tzMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneFragValue<span class="arrow">&#183;</span></i></a>(<var>T</var>) when <var>T</var>
is present, otherwise <b><i>absent</i></b>.</td></tr></tbody></table></div>

<div class="defindent">

Return
<ul><li><div class="p"><a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<a href="#f-dt-yrMap" shape="rect"><i><span class="arrow">&#183;</span>yearFragValue<span class="arrow">&#183;</span></i></a>(<var>Y</var>),
<a href="#f-dt-moMap" shape="rect"><i><span class="arrow">&#183;</span>monthFragValue<span class="arrow">&#183;</span></i></a>(<var>MO</var>),
<a href="#f-dt-daMap" shape="rect"><i><span class="arrow">&#183;</span>dayFragValue<span class="arrow">&#183;</span></i></a>(<var>D</var>), 24, 0, 0,
<var>tz</var>) when <a href="#nt-eodFrag" shape="rect"><i>endOfDayFrag</i></a>
is present, and</div></li><li><div class="p">
<a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<a href="#f-dt-yrMap" shape="rect"><i><span class="arrow">&#183;</span>yearFragValue<span class="arrow">&#183;</span></i></a>(<var>Y</var>),
<a href="#f-dt-moMap" shape="rect"><i><span class="arrow">&#183;</span>monthFragValue<span class="arrow">&#183;</span></i></a>(<var>MO</var>),
<a href="#f-dt-daMap" shape="rect"><i><span class="arrow">&#183;</span>dayFragValue<span class="arrow">&#183;</span></i></a>(<var>D</var>),
<a href="#f-dt-hrMap" shape="rect"><i><span class="arrow">&#183;</span>hourFragValue<span class="arrow">&#183;</span></i></a>(<var>H</var>),
<a href="#f-dt-miMap" shape="rect"><i><span class="arrow">&#183;</span>minuteFragValue<span class="arrow">&#183;</span></i></a>(<var>MI</var>),
<a href="#f-dt-seMap" shape="rect"><i><span class="arrow">&#183;</span>secondFragValue<span class="arrow">&#183;</span></i></a>(<var>S</var>),
<var>tz</var>) otherwise</div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-timeLexRep" id="vp-timeLexRep" shape="rect"><i><span class="arrow">&#183;</span>timeLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#time" shape="rect">time</a>
<div class="defindent">Maps a <a href="#nt-timeRep" shape="rect"><i>timeLexicalRep</i></a> to
a <a href="#time" shape="rect">time</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches
<a href="#nt-timeRep" shape="rect"><i>timeLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete
<a href="#time" shape="rect">time</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>LEX</var> necessarily includes
either
substrings that are instances of <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>, 
<a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>,
and 
<a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>, (below referred to as
<var>H</var>, <var>M</var>, and <var>S</var> respectively), or
else an instance of 
<a href="#nt-eodFrag" shape="rect"><i>endOfDayFrag</i></a>; finally, it may optionally contain
an instance of <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>
(<var>T</var>).</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>tz</var>
be <a href="#f-dt-tzMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneFragValue<span class="arrow">&#183;</span></i></a>(<var>T</var>) when <var>T</var>
is present, otherwise <b><i>absent</i></b></td></tr></tbody></table></div>

<div class="defindent">

Return
<ul><li><div class="p"><a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<b><i>absent</i></b>,
<b><i>absent</i></b>, <b><i>absent</i></b>, 0, 0, 0,
<var>tz</var>) when <a href="#nt-eodFrag" shape="rect"><i>endOfDayFrag</i></a>
is present, and</div></li><li><div class="p">
<a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<b><i>absent</i></b>,
<b><i>absent</i></b>, <b><i>absent</i></b>,
<a href="#f-dt-hrMap" shape="rect"><i><span class="arrow">&#183;</span>hourFragValue<span class="arrow">&#183;</span></i></a>(<var>H</var>),
<a href="#f-dt-miMap" shape="rect"><i><span class="arrow">&#183;</span>minuteFragValue<span class="arrow">&#183;</span></i></a>(<var>MI</var>),
<a href="#f-dt-seMap" shape="rect"><i><span class="arrow">&#183;</span>secondFragValue<span class="arrow">&#183;</span></i></a>(<var>S</var>),
<var>tz</var>) otherwise.</div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-dateLexRep" id="vp-dateLexRep" shape="rect"><i><span class="arrow">&#183;</span>dateLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#date" shape="rect">date</a>
<div class="defindent">Maps a <a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a> to a
<a href="#date" shape="rect">date</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches
<a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete <a href="#date" shape="rect">date</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>LEX</var> necessarily includes
an instance <var>Y</var> of <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>, 
an instance <var>M</var> of <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>,
and an instance <var>D</var> of <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>,
hyphen-separated and optionally followed by an instance
<var>T</var> of <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>.</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>tz</var>
be <a href="#f-dt-tzMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneFragValue<span class="arrow">&#183;</span></i></a>(<var>T</var>) when <var>T</var>
is present, otherwise <b><i>absent</i></b></td></tr></tbody></table></div>

<div class="defindent">

Return
<a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<a href="#f-dt-yrMap" shape="rect"><i><span class="arrow">&#183;</span>yearFragValue<span class="arrow">&#183;</span></i></a>(<var>Y</var>),
<a href="#f-dt-moMap" shape="rect"><i><span class="arrow">&#183;</span>monthFragValue<span class="arrow">&#183;</span></i></a>(<var>M</var>),
<a href="#f-dt-daMap" shape="rect"><i><span class="arrow">&#183;</span>dayFragValue<span class="arrow">&#183;</span></i></a>(<var>D</var>),
<b><i>absent</i></b>, <b><i>absent</i></b>, <b><i>absent</i></b>,
<var>tz</var>.)
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-gYearMonthLexRep" id="vp-gYearMonthLexRep" shape="rect"><i><span class="arrow">&#183;</span>gYearMonthLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#gYearMonth" shape="rect">gYearMonth</a>
<div class="defindent">Maps a <a href="#nt-gYearMonthRep" shape="rect"><i>gYearMonthLexicalRep</i></a> to a
<a href="#gYearMonth" shape="rect">gYearMonth</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches
<a href="#nt-gYearMonthRep" shape="rect"><i>gYearMonthLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete <a href="#gYearMonth" shape="rect">gYearMonth</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>LEX</var> necessarily includes
an instance <var>Y</var> of <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a> 
and an instance <var>M</var> of <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>,
hyphen-separated and optionally followed by an instance
<var>T</var> of <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>.</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>tz</var>
be <a href="#f-dt-tzMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneFragValue<span class="arrow">&#183;</span></i></a>(<var>T</var>) when <var>T</var>
is present, otherwise <b><i>absent</i></b>.</td></tr></tbody></table></div>

<div class="defindent">

Return
<a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<a href="#f-dt-yrMap" shape="rect"><i><span class="arrow">&#183;</span>yearFragValue<span class="arrow">&#183;</span></i></a>(<var>Y</var>),
<a href="#f-dt-moMap" shape="rect"><i><span class="arrow">&#183;</span>monthFragValue<span class="arrow">&#183;</span></i></a>(<var>M</var>),
<b><i>absent</i></b>, <b><i>absent</i></b>, <b><i>absent</i></b>, 
<b><i>absent</i></b>, <var>tz</var>).
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-gYearLexRep" id="vp-gYearLexRep" shape="rect"><i><span class="arrow">&#183;</span>gYearLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#gYear" shape="rect">gYear</a>
<div class="defindent">Maps a <a href="#nt-gYearRep" shape="rect"><i>gYearLexicalRep</i></a> to
a <a href="#gYear" shape="rect">gYear</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-gYearRep" shape="rect"><i>gYearLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete <a href="#gYear" shape="rect">gYear</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>LEX</var> necessarily includes
an instance <var>Y</var> of
<a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>, 
optionally followed by an instance <var>T</var>
of <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>.</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>tz</var>
be <a href="#f-dt-tzMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneFragValue<span class="arrow">&#183;</span></i></a>(<var>T</var>) when <var>T</var>
is present, otherwise <b><i>absent</i></b>.</td></tr></tbody></table></div>

<div class="defindent">

Return
<a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<a href="#f-dt-yrMap" shape="rect"><i><span class="arrow">&#183;</span>yearFragValue<span class="arrow">&#183;</span></i></a>(<var>Y</var>),
<b><i>absent</i></b>, <b><i>absent</i></b>, <b><i>absent</i></b>, <b><i>absent</i></b>, 
<b><i>absent</i></b>, <var>tz</var>).
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-gMonthDayLexRep" id="vp-gMonthDayLexRep" shape="rect"><i><span class="arrow">&#183;</span>gMonthDayLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#gMonthDay" shape="rect">gMonthDay</a>
<div class="defindent">Maps a <a href="#nt-gMonthDayRep" shape="rect"><i>gMonthDayLexicalRep</i></a> to a
<a href="#gMonthDay" shape="rect">gMonthDay</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches
<a href="#nt-gMonthDayRep" shape="rect"><i>gMonthDayLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete <a href="#gMonthDay" shape="rect">gMonthDay</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>LEX</var> necessarily includes
an instance <var>M</var> of <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a> 
and an instance <var>D</var> of <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>,
hyphen-separated and optionally followed by an instance
<var>T</var> of <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>.</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>tz</var>
be <a href="#f-dt-tzMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneFragValue<span class="arrow">&#183;</span></i></a>(<var>T</var>) when <var>T</var>
is present, otherwise <b><i>absent</i></b>.</td></tr></tbody></table></div>

<div class="defindent">

Return
<a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<b><i>absent</i></b>,
<a href="#f-dt-moMap" shape="rect"><i><span class="arrow">&#183;</span>monthFragValue<span class="arrow">&#183;</span></i></a>(<var>M</var>),
<a href="#f-dt-daMap" shape="rect"><i><span class="arrow">&#183;</span>dayFragValue<span class="arrow">&#183;</span></i></a>(<var>D</var>),
<b><i>absent</i></b>, <b><i>absent</i></b>, <b><i>absent</i></b>,
<var>tz</var>.
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-gDayLexRep" id="vp-gDayLexRep" shape="rect"><i><span class="arrow">&#183;</span>gDayLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#gDay" shape="rect">gDay</a>
<div class="defindent">Maps a <a href="#nt-gDayRep" shape="rect"><i>gDayLexicalRep</i></a> to
a <a href="#gDay" shape="rect">gDay</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-gDayRep" shape="rect"><i>gDayLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete <a href="#gDay" shape="rect">gDay</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>LEX</var> necessarily includes
an instance <var>D</var> of <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>, 
optionally followed by an instance <var>T</var>
of <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>.</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>tz</var>
be <a href="#f-dt-tzMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneFragValue<span class="arrow">&#183;</span></i></a>(<var>T</var>) when <var>T</var>
is present, otherwise <b><i>absent</i></b>.</td></tr></tbody></table></div>

<div class="defindent">
<ol class="enumar"><li><div class="p">Return
<a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<var>gD</var>,
<b><i>absent</i></b>, <b><i>absent</i></b>,
<a href="#f-dt-daMap" shape="rect"><i><span class="arrow">&#183;</span>dayFragValue<span class="arrow">&#183;</span></i></a>(<var>D</var>), <b><i>absent</i></b>,
<b><i>absent</i></b>, <b><i>absent</i></b>,
<var>tz</var>).</div></li></ol>
Return
<a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<b><i>absent</i></b>, <b><i>absent</i></b>,
<a href="#f-dt-daMap" shape="rect"><i><span class="arrow">&#183;</span>dayFragValue<span class="arrow">&#183;</span></i></a>(<var>D</var>), <b><i>absent</i></b>,
<b><i>absent</i></b>, <b><i>absent</i></b>, <var>tz</var>).
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-gMonthLexRep" id="vp-gMonthLexRep" shape="rect"><i><span class="arrow">&#183;</span>gMonthLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#gMonth" shape="rect">gMonth</a>
<div class="defindent">Maps a <a href="#nt-gMonthRep" shape="rect"><i>gMonthLexicalRep</i></a> to
a <a href="#gMonth" shape="rect">gMonth</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">matches <a href="#nt-gMonthRep" shape="rect"><i>gMonthLexicalRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a complete <a href="#gMonth" shape="rect">gMonth</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>LEX</var> necessarily includes
an instance <var>M</var> of <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>, 
optionally followed by an instance <var>T</var>
of <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>.</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>tz</var>
be <a href="#f-dt-tzMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneFragValue<span class="arrow">&#183;</span></i></a>(<var>T</var>) when <var>T</var>
is present, otherwise <b><i>absent</i></b>.</td></tr></tbody></table></div>

<div class="defindent">

Return
<a href="#p-setDTFromRaw" shape="rect"><i><span class="arrow">&#183;</span>newDateTime<span class="arrow">&#183;</span></i></a>(<b><i>absent</i></b>,
<a href="#f-dt-moMap" shape="rect"><i><span class="arrow">&#183;</span>monthFragValue<span class="arrow">&#183;</span></i></a>(<var>M</var>),
<b><i>absent</i></b>, <b><i>absent</i></b>,
<b><i>absent</i></b>, <b><i>absent</i></b>, <var>tz</var>)
</div>

</div></div></div><div class="div3">
<h4><a name="sec-dt-canmaps" id="sec-dt-canmaps" shape="rect"></a>E.3.6 Canonical Mappings</h4><div class="defset">
<div class="aux">
<div class="defset-head">Auxiliary Functions for Date/time Canonical Mappings</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-unsTwoDigCanFragMap" id="f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>i</var>) &#8594; <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a>
<div class="defindent">Maps a nonnegative integer less than 100 onto an unsigned always-two-digit numeral.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>i</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative integer less than 100</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-unsNoDecNuml" shape="rect"><i>unsignedNoDecimalPtNumeral</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return <a href="#f-digit" shape="rect"><i><span class="arrow">&#183;</span>digit<span class="arrow">&#183;</span></i></a>(<var>i</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;10)&#160;&amp;
<a href="#f-digit" shape="rect"><i><span class="arrow">&#183;</span>digit<span class="arrow">&#183;</span></i></a>(<var>i</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;10)</div>

<div class="deftop"><b><a name="f-fourDigCanFragMap" id="f-fourDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>fourDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>i</var>) &#8594; <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a>
<div class="defindent">Maps an integer between -10000 and 10000 onto an always-four-digit numeral.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>i</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer whose absolute value is less than 10000</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-noDecNuml" shape="rect"><i>noDecimalPtNumeral</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return<ul><li><div class="p">'<code>-</code>'&#160;&amp;&#160;<a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(&#8722;<var>i</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;100)&#160;&amp;
<a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(&#8722;<var>i</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;100)&#160;&#160; when
<var>i</var> is negative,</div></li><li><div class="p"><a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>i</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;100)&#160;&amp;
<a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>i</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;100)&#160;&#160; otherwise.</div></li></ul></div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Partial Date/time Canonical Mappings</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-yrCanFragMap" id="f-yrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>yearCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>y</var>) &#8594; <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>y</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer </td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-yrFrag" shape="rect"><i>yearFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p"><a href="#f-noDecCanMap" shape="rect"><i><span class="arrow">&#183;</span>noDecimalPtCanonicalMap<span class="arrow">&#183;</span></i></a>(<var>y</var>)&#160;&#160; when&#160; |<var>y</var>|&#160;&gt;&#160;9999&#160;.</div></li><li><div class="p"><a href="#f-fourDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>fourDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>y</var>)&#160;&#160; otherwise.</div></li></ul></div>

<div class="deftop"><b><a name="f-moCanFragMap" id="f-moCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>monthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>m</var>) &#8594; <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>m</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer between 1 and 12 inclusive</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-moFrag" shape="rect"><i>monthFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return <a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>m</var>)</div>

<div class="deftop"><b><a name="f-daCanFragMap" id="f-daCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>dayCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>d</var>) &#8594; <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>d</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer between 1 and 31 inclusive&#160;
(may be limited further depending on associated <a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a> and <a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>)</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-daFrag" shape="rect"><i>dayFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return <a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>d</var>)</div>

<div class="deftop"><b><a name="f-hrCanFragMap" id="f-hrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>hourCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>h</var>) &#8594; <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>h</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer between 0 and 23 inclusive.</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-hrFrag" shape="rect"><i>hourFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return <a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>h</var>)</div>

<div class="deftop"><b><a name="f-miCanFragMap" id="f-miCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>minuteCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>m</var>) &#8594; <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>m</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer between 0 and 59 inclusive.</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-miFrag" shape="rect"><i>minuteFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return <a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>m</var>)</div>

<div class="deftop"><b><a name="f-seCanFragMap" id="f-seCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>secondCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>s</var>) &#8594; <a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>
<div class="defindent">Maps a decimal number, presumably the <a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>s</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a nonnegative decimal number less than 70</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-seFrag" shape="rect"><i>secondFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p"><a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>s</var>)&#160;&#160; 
when <var>s</var> is an integer, and</div></li><li><div class="p"><a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>s</var><a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>1)&#160;&amp;
'<code>.</code>'&#160;&amp; <a href="#f-fracDigitsMap" shape="rect"><i><span class="arrow">&#183;</span>fractionDigitsCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>s</var><a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>1)&#160;&#160; 
otherwise.</div></li></ul></div>

<div class="deftop"><b><a name="f-tzCanFragMap" id="f-tzCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneCanonicalFragmentMap<span class="arrow">&#183;</span></i></a></b> (<var>t</var>) &#8594; <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>
<div class="defindent">Maps an integer, presumably the <a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> property of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a> value,
onto a <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a>, part of a <a href="#dt-dt-7PropMod" shape="rect">date/timeSevenPropertyModel</a>'s <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>t</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">an integer between &#8722;840 and 840 inclusive</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-tzFrag" shape="rect"><i>timezoneFrag</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return<ul><li><div class="p">'<code>Z</code>'&#160;&#160; when <var>t</var> is zero,</div></li><li><div class="p">'<code>-</code>'&#160;&amp;&#160;<a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(&#8722;<var>t</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;60)&#160;&amp;
'<code>:</code>'&#160;&amp;
<a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(&#8722;<var>t</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;60)&#160;&#160; when
<var>t</var> is negative, and</div></li><li><div class="p">'<code>+</code>'&#160;&amp;&#160;<a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>t</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;60)&#160;&amp;
'<code>:</code>'&#160;&amp;
<a href="#f-unsTwoDigCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>unsTwoDigitCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>t</var>&#160;<a href="#dt-mod" class="termref" shape="rect"><span class="arrow">&#183;</span>mod<span class="arrow">&#183;</span></a>&#160;60)&#160;&#160; otherwise.</div></li></ul></div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-dateTimeCanRep" id="vp-dateTimeCanRep" shape="rect"><i><span class="arrow">&#183;</span>dateTimeCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>dt</var>) &#8594; <a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a>
<div class="defindent">Maps a <a href="#dateTime" shape="rect">dateTime</a> value to a <a href="#nt-dateTimeRep" shape="rect"><i>dateTimeLexicalRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>dt</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#dateTime" shape="rect">dateTime</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<var>DT</var> be&#160;
<a href="#f-yrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>yearCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>dt</var>'s&#160;<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>-</code>'&#160;&amp;
<a href="#f-moCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>monthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>dt</var>'s&#160;<a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>-</code>'&#160;&amp;
<a href="#f-daCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>dayCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>dt</var>'s&#160;<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>T</code>'&#160;&amp;
<a href="#f-hrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>hourCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>dt</var>'s&#160;<a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>:</code>'&#160;&amp;
<a href="#f-miCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>minuteCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>dt</var>'s&#160;<a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>:</code>'&#160;&amp;
<a href="#f-seCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>secondCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>dt</var>'s&#160;<a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a>)&#160;.
</td></tr></tbody></table></div>

<div class="defindent">Return
<ul><li><div class="p"><var>DT</var>&#160;&#160; when
<var>dt</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
is <b><i>absent</i></b>, and</div></li><li><div class="p"><var>DT</var>&#160;&amp;
<a href="#f-tzCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>dt</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>)&#160;&#160; otherwise.</div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-timeCanRep" id="vp-timeCanRep" shape="rect"><i><span class="arrow">&#183;</span>timeCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>ti</var>) &#8594; <a href="#nt-timeRep" shape="rect"><i>timeLexicalRep</i></a>
<div class="defindent">Maps a <a href="#time" shape="rect">time</a> value to a <a href="#nt-timeRep" shape="rect"><i>timeLexicalRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>ti</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#time" shape="rect">time</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-timeRep" shape="rect"><i>timeLexicalRep</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<var>T</var> be&#160;
<a href="#f-hrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>hourCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>ti</var>'s&#160;<a href="#vp-dt-hour" shape="rect"><i><span class="arrow">&#183;</span>hour<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>:</code>'&#160;&amp;
<a href="#f-miCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>minuteCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>ti</var>'s&#160;<a href="#vp-dt-minute" shape="rect"><i><span class="arrow">&#183;</span>minute<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>:</code>'&#160;&amp;
<a href="#f-seCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>secondCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>ti</var>'s&#160;<a href="#vp-dt-second" shape="rect"><i><span class="arrow">&#183;</span>second<span class="arrow">&#183;</span></i></a>)&#160;.
</td></tr></tbody></table></div>

<div class="defindent">Return
<ul><li><div class="p"><var>T</var>&#160;&#160; when
<var>ti</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
is <b><i>absent</i></b>, and</div></li><li><div class="p"><var>T</var>&#160;&amp;
<a href="#f-tzCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>ti</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>)&#160;&#160; otherwise.</div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-dateCanRep" id="vp-dateCanRep" shape="rect"><i><span class="arrow">&#183;</span>dateCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>da</var>) &#8594; <a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a>
<div class="defindent">Maps a <a href="#date" shape="rect">date</a> value to a <a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>da</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#date" shape="rect">date</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-dateRep" shape="rect"><i>dateLexicalRep</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<var>D</var> be&#160;
<a href="#f-yrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>yearCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>da</var>'s&#160;<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>-</code>'&#160;&amp;
<a href="#f-moCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>monthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>da</var>'s&#160;<a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>-</code>'&#160;&amp;
<a href="#f-daCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>dayCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>da</var>'s&#160;<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>)&#160;.
</td></tr></tbody></table></div>

<div class="defindent">Return
<ul><li><div class="p"><var>D</var>&#160;&#160; when
<var>da</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
is <b><i>absent</i></b>, and</div></li><li><div class="p"><var>D</var>&#160;&amp;
<a href="#f-tzCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>da</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>)&#160;&#160;
otherwise.</div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-gYearMonthCanRep" id="vp-gYearMonthCanRep" shape="rect"><i><span class="arrow">&#183;</span>gYearMonthCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>ym</var>) &#8594; <a href="#nt-gYearMonthRep" shape="rect"><i>gYearMonthLexicalRep</i></a>
<div class="defindent">Maps a <a href="#gYearMonth" shape="rect">gYearMonth</a> value to a <a href="#nt-gYearMonthRep" shape="rect"><i>gYearMonthLexicalRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>ym</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#gYearMonth" shape="rect">gYearMonth</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-gYearMonthRep" shape="rect"><i>gYearMonthLexicalRep</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<var>YM</var> be&#160;
<a href="#f-yrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>yearCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>ym</var>'s&#160;<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>-</code>'&#160;&amp;
<a href="#f-moCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>monthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>ym</var>'s&#160;<a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>)&#160;.
</td></tr></tbody></table></div>

<div class="defindent">Return
<ul><li><div class="p"><var>YM</var>&#160;&#160; when <var>ym</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
is <b><i>absent</i></b>, and</div></li><li><div class="p"><var>YM</var>&#160;&amp;
<a href="#f-tzCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>ym</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>)&#160;&#160;
otherwise.</div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-gYearCanRep" id="vp-gYearCanRep" shape="rect"><i><span class="arrow">&#183;</span>gYearCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>gY</var>) &#8594; <a href="#nt-gYearRep" shape="rect"><i>gYearLexicalRep</i></a>
<div class="defindent">Maps a <a href="#gYear" shape="rect">gYear</a> value to a <a href="#nt-gYearRep" shape="rect"><i>gYearLexicalRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>gY</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#gYear" shape="rect">gYear</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-gYearRep" shape="rect"><i>gYearLexicalRep</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p"><a href="#f-yrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>yearCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>gY</var>'s&#160;<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>)&#160;&#160;
when <var>gY</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
is <b><i>absent</i></b>, and</div></li><li><div class="p"><a href="#f-yrCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>yearCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>gY</var>'s&#160;<a href="#vp-dt-year" shape="rect"><i><span class="arrow">&#183;</span>year<span class="arrow">&#183;</span></i></a>)&#160;&amp;
<a href="#f-tzCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>gY</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>)&#160;&#160;
otherwise.</div></li></ul></div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-gMonthDayCanRep" id="vp-gMonthDayCanRep" shape="rect"><i><span class="arrow">&#183;</span>gMonthDayCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>md</var>) &#8594; <a href="#nt-gMonthDayRep" shape="rect"><i>gMonthDayLexicalRep</i></a>
<div class="defindent">Maps a <a href="#gMonthDay" shape="rect">gMonthDay</a> value to a <a href="#nt-gMonthDayRep" shape="rect"><i>gMonthDayLexicalRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>md</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#gMonthDay" shape="rect">gMonthDay</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-gMonthDayRep" shape="rect"><i>gMonthDayLexicalRep</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1">
<var>MD</var> be&#160; '<code>--</code>'&#160;&amp;
<a href="#f-moCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>monthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>md</var>'s&#160;<a href="#vp-dt-month" shape="rect"><i><span class="arrow">&#183;</span>month<span class="arrow">&#183;</span></i></a>)&#160;&amp;
'<code>-</code>'&#160;&amp;
<a href="#f-daCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>dayCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>md</var>'s&#160;<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>)&#160;.
</td></tr></tbody></table></div>

<div class="defindent">Return
<ul><li><div class="p"><var>MD</var>&#160;&#160; when <var>md</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
is <b><i>absent</i></b>, and</div></li><li><div class="p"><var>MD</var>&#160;&amp;
<a href="#f-tzCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>md</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>)&#160;&#160;
otherwise.</div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-gDayCanRep" id="vp-gDayCanRep" shape="rect"><i><span class="arrow">&#183;</span>gDayCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>gD</var>) &#8594; <a href="#nt-gDayRep" shape="rect"><i>gDayLexicalRep</i></a>
<div class="defindent">Maps a <a href="#gDay" shape="rect">gDay</a> value to a <a href="#nt-gDayRep" shape="rect"><i>gDayLexicalRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>gD</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#gDay" shape="rect">gDay</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-gDayRep" shape="rect"><i>gDayLexicalRep</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p">'<code>---</code>'&#160;&amp;
<a href="#f-daCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>dayCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>gD</var>'s&#160;<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>)&#160;&#160;
when
<var>gD</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>
is <b><i>absent</i></b>, and</div></li><li><div class="p">'<code>---</code>'&#160;&amp;
<a href="#f-daCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>dayCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>gD</var>'s&#160;<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>)&#160;&amp;
<a href="#f-tzCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>gD</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>)&#160;&#160;
otherwise.</div></li></ul></div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="vp-gMonthCanRep" id="vp-gMonthCanRep" shape="rect"><i><span class="arrow">&#183;</span>gMonthCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>gM</var>) &#8594; <a href="#nt-gMonthRep" shape="rect"><i>gMonthLexicalRep</i></a>
<div class="defindent">Maps a <a href="#gMonth" shape="rect">gMonth</a> value to a <a href="#nt-gMonthRep" shape="rect"><i>gMonthLexicalRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>gM</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a complete <a href="#gMonth" shape="rect">gMonth</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-gMonthRep" shape="rect"><i>gMonthLexicalRep</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p">'<code>--</code>'&#160;&amp;
<a href="#f-moCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>monthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>gM</var>'s&#160;<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>)&#160;&#160;
when
<var>gM</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a> 
is <b><i>absent</i></b>, and</div></li><li><div class="p">'<code>--</code>'&#160;&amp;
<a href="#f-moCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>monthCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>gM</var>'s&#160;<a href="#vp-dt-day" shape="rect"><i><span class="arrow">&#183;</span>day<span class="arrow">&#183;</span></i></a>)&#160;&amp;
<a href="#f-tzCanFragMap" shape="rect"><i><span class="arrow">&#183;</span>timezoneCanonicalFragmentMap<span class="arrow">&#183;</span></i></a>(<var>gM</var>'s&#160;<a href="#vp-dt-timezone" shape="rect"><i><span class="arrow">&#183;</span>timezoneOffset<span class="arrow">&#183;</span></i></a>)&#160;&#160;
otherwise.</div></li></ul></div>

</div></div></div></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#sec-dt-functions" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="sec-misc-lexmaps" id="sec-misc-lexmaps" shape="rect"></a>E.4 Lexical and Canonical Mappings for Other Datatypes</h3><p>The following functions are used with various datatypes neither numeric
nor date/time related.</p><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-stringLexmap" id="f-stringLexmap" shape="rect"><i><span class="arrow">&#183;</span>stringLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#string" shape="rect">string</a>
<div class="defindent">Maps a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching the
<a href="#nt-stringRep" shape="rect"><i>stringRep</i></a> production to
a <a href="#string" shape="rect">string</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching
<a href="#nt-stringRep" shape="rect"><i>stringRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">A <a href="#string" shape="rect">string</a> value</div>

<b>Algorithm:</b>


<div class="defindent">Return <var>LEX</var>.&#160; (The function is the identity
function on the domain.)</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-booleanLexmap" id="f-booleanLexmap" shape="rect"><i><span class="arrow">&#183;</span>booleanLexicalMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#boolean" shape="rect">boolean</a>
<div class="defindent">Maps a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching the
<a href="#nt-booleanRep" shape="rect"><i>booleanRep</i></a> production to
a <a href="#boolean" shape="rect">boolean</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching
<a href="#nt-booleanRep" shape="rect"><i>booleanRep</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">A <a href="#boolean" shape="rect">boolean</a> value</div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p"><b><i>true</i></b>&#160;&#160; when <var>LEX</var> is '<code>true</code>'
or '<code>1</code>'&#160;, and</div></li><li><div class="p"><b><i>false</i></b>&#160;&#160; otherwise (<var>LEX</var> is '<code>false</code>'
or '<code>0</code>').</div></li></ul>
</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-stringCanmap" id="f-stringCanmap" shape="rect"><i><span class="arrow">&#183;</span>stringCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>s</var>) &#8594; <a href="#nt-stringRep" shape="rect"><i>stringRep</i></a>
<div class="defindent">Maps a <a href="#string" shape="rect">string</a> value  to
a <a href="#nt-stringRep" shape="rect"><i>stringRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>s</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#string" shape="rect">string</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-stringRep" shape="rect"><i>stringRep</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return <var>s</var>.&#160; (The function is the identity
function on the domain.)</div>

</div></div><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-booleanCanmap" id="f-booleanCanmap" shape="rect"><i><span class="arrow">&#183;</span>booleanCanonicalMap<span class="arrow">&#183;</span></i></a></b> (<var>b</var>) &#8594; <a href="#nt-booleanRep" shape="rect"><i>booleanRep</i></a>
<div class="defindent">Maps a <a href="#boolean" shape="rect">boolean</a> value  to
a <a href="#nt-booleanRep" shape="rect"><i>booleanRep</i></a>.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>b</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#boolean" shape="rect">boolean</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-booleanRep" shape="rect"><i>booleanRep</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p">'<code>true</code>'&#160;&#160; when <var>b</var> is <b><i>true</i></b>, and</div></li><li><div class="p">'<code>false</code>'&#160;&#160; otherwise (<var>b</var> is <b><i>false</i></b>).</div></li></ul>
</div>

</div></div><div class="div3">
<h4><a name="sec-hexbin-lexmaps" id="sec-hexbin-lexmaps" shape="rect"></a>E.4.1 Lexical and canonical mappings for <a href="#hexBinary" shape="rect">hexBinary</a></h4><p>The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> for <a href="#hexBinary" shape="rect">hexBinary</a>
maps each pair of hexadecimal digits to an octet, in the conventional way:</p><div class="defset">
<div class="not_aux">
<div class="defset-head">Lexical Mapping for hexBinary</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-hexBinaryMap" id="f-hexBinaryMap" shape="rect"><i><span class="arrow">&#183;</span>hexBinaryMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; <a href="#hexBinary" shape="rect">hexBinary</a>
<div class="defindent">Maps a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching the
<a href="#nt-hexBinary" shape="rect"><i>hexBinary</i></a> production to
a sequence of octets in the form of a <a href="#hexBinary" shape="rect">hexBinary</a> value.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching
<a href="#nt-hexBinary" shape="rect"><i>hexBinary</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">A sequence of binary octets in the form of a <a href="#hexBinary" shape="rect">hexBinary</a> value</div>

<b>Algorithm:</b>
<div class="defindent"><var>LEX</var> necessarily includes a sequence of zero or more
substrings matching the <a href="#nt-hexOctet" shape="rect"><i>hexOctet</i></a> production.</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>o</var> be the sequence of octets formed by applying
<a href="#f-hexOctetMap" shape="rect"><i><span class="arrow">&#183;</span>hexOctetMap<span class="arrow">&#183;</span></i></a> to each <a href="#nt-hexOctet" shape="rect"><i>hexOctet</i></a> in 
<var>LEX</var>, in order, and concatenating the results.</td></tr></tbody></table></div>

<div class="defindent">Return <var>o</var>.
</div>

</div></div><p>The auxiliary functions 
<a href="#f-hexOctetMap" shape="rect"><i><span class="arrow">&#183;</span>hexOctetMap<span class="arrow">&#183;</span></i></a> and 
<a href="#f-hexDigitMap" shape="rect"><i><span class="arrow">&#183;</span>hexDigitMap<span class="arrow">&#183;</span></i></a> are used by 
<a href="#f-hexBinaryMap" shape="rect"><i><span class="arrow">&#183;</span>hexBinaryMap<span class="arrow">&#183;</span></i></a>.</p><div class="defset">
<div class="aux">
<div class="defset-head">Mappings for hexadecimal digits</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-hexOctetMap" id="f-hexOctetMap" shape="rect"><i><span class="arrow">&#183;</span>hexOctetMap<span class="arrow">&#183;</span></i></a></b> (<var>LEX</var>) &#8594; octet
<div class="defindent">Maps a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching the
<a href="#nt-hexOctet" shape="rect"><i>hexOctet</i></a> production to
a single octet.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>LEX</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> matching
<a href="#nt-hexOctet" shape="rect"><i>hexOctet</i></a></td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">A single binary octet</div>

<b>Algorithm:</b>
<div class="defindent"><var>LEX</var> necessarily includes exactly two hexadecimal digits.</div>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>d0</var> be the first hexadecimal digit in <var>LEX</var>.
Let <var>d1</var> be the second hexadecimal digit in <var>LEX</var>.</td></tr></tbody></table></div>

<div class="defindent">Return the octet whose four high-order bits are <a href="#f-hexDigitMap" shape="rect"><i><span class="arrow">&#183;</span>hexDigitMap<span class="arrow">&#183;</span></i></a>(<var>d0</var>) and whose four low-order bits
are <a href="#f-hexDigitMap" shape="rect"><i><span class="arrow">&#183;</span>hexDigitMap<span class="arrow">&#183;</span></i></a>(<var>d1</var>).
</div>

<div class="deftop"><b><a name="f-hexDigitMap" id="f-hexDigitMap" shape="rect"><i><span class="arrow">&#183;</span>hexDigitMap<span class="arrow">&#183;</span></i></a></b> (<var>d</var>) &#8594; a bit-sequence of length four
<div class="defindent">Maps a hexadecimal digit (a character matching
the <a href="#nt-hexDigit" shape="rect"><i>hexDigit</i></a> production) to
a sequence of four binary digits.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>d</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a hexadecimal digit</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">a sequence of four binary digits</div>

<b>Algorithm:</b>


<div class="defindent">Return
<ul><li><div class="p">0000 when <var>d</var> = '<code>0</code>',</div></li><li><div class="p">0001 when <var>d</var> = '<code>1</code>',</div></li><li><div class="p">0010 when <var>d</var> = '<code>2</code>',</div></li><li><div class="p">0011 when <var>d</var> = '<code>3</code>',</div></li><li><div class="p">...</div></li><li><div class="p">1110 when <var>d</var> = '<code>E</code>' or '<code>e</code>',</div></li><li><div class="p">1111 when <var>d</var> = '<code>F</code>' or '<code>f</code>'.</div></li></ul>
</div>

</div></div><p>The <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a> for <a href="#hexBinary" shape="rect">hexBinary</a> uses only the
uppercase forms of A-F.</p><div class="defset">
<div class="not_aux">
<div class="defset-head">Canonical Mapping for hexBinary</div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-hexBinaryCanonical" id="f-hexBinaryCanonical" shape="rect"><i><span class="arrow">&#183;</span>hexBinaryCanonical<span class="arrow">&#183;</span></i></a></b> (<var>o</var>) &#8594; <a href="#nt-hexBinary" shape="rect"><i>hexBinary</i></a>
<div class="defindent">Maps a <a href="#hexBinary" shape="rect">hexBinary</a> value to a literal
matching the <a href="#nt-hexBinary" shape="rect"><i>hexBinary</i></a> production.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>o</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a <a href="#hexBinary" shape="rect">hexBinary</a> value</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-hexBinary" shape="rect"><i>hexBinary</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>h</var> be the sequence of literals formed by applying
<a href="#f-hexOctetCanonical" shape="rect"><i><span class="arrow">&#183;</span>hexOctetCanonical<span class="arrow">&#183;</span></i></a> to each octet in 
<var>o</var>, in order, and concatenating the results.</td></tr></tbody></table></div>

<div class="defindent">Return <var>h</var>.
</div>

</div></div><div class="defset">
<div class="aux">
<div class="defset-head">Auxiliary procedures for canonical mapping of <a href="#hexBinary" shape="rect">hexBinary</a></div>
<div class="deftop" style="margin-top: 0em;"><b><a name="f-hexOctetCanonical" id="f-hexOctetCanonical" shape="rect"><i><span class="arrow">&#183;</span>hexOctetCanonical<span class="arrow">&#183;</span></i></a></b> (<var>o</var>) &#8594; <a href="#nt-hexOctet" shape="rect"><i>hexOctet</i></a>
<div class="defindent">Maps a binary octet to a literal
matching the <a href="#nt-hexOctet" shape="rect"><i>hexOctet</i></a> production.</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>o</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a binary octet</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-hexOctet" shape="rect"><i>hexOctet</i></a></div>

<b>Algorithm:</b>

<div class="defindent"><table><tbody><tr><td valign="top" rowspan="1" colspan="1">Let </td><td rowspan="1" colspan="1"><var>lo</var> be the four low-order bits of <var>o</var>,
and <var>hi</var> be the four high-order bits.</td></tr></tbody></table></div>

<div class="defindent">Return <a href="#f-hexDigitCanonical" shape="rect"><i><span class="arrow">&#183;</span>hexDigitCanonical<span class="arrow">&#183;</span></i></a>(<var>hi</var>) &amp;
<a href="#f-hexDigitCanonical" shape="rect"><i><span class="arrow">&#183;</span>hexDigitCanonical<span class="arrow">&#183;</span></i></a>(<var>lo</var>).
</div>

<div class="deftop"><b><a name="f-hexDigitCanonical" id="f-hexDigitCanonical" shape="rect"><i><span class="arrow">&#183;</span>hexDigitCanonical<span class="arrow">&#183;</span></i></a></b> (<var>b</var>) &#8594; <a href="#nt-hexDigit" shape="rect"><i>hexDigit</i></a>
<div class="defindent">Maps a four-bit sequence to a hexadecimal
digit (a literal
matching the <a href="#nt-hexDigit" shape="rect"><i>hexDigit</i></a> production).</div>
</div>
<b>Arguments:</b><div class="defindent"><table><tbody>
<tr><td rowspan="1" colspan="1"><var>b</var></td><td rowspan="1" colspan="1">:&#160;</td><td rowspan="1" colspan="1">a sequence of four binary digits</td></tr>

</tbody></table></div>

<b>Result:</b><div class="defindent">matches <a href="#nt-hexDigit" shape="rect"><i>hexDigit</i></a></div>

<b>Algorithm:</b>


<div class="defindent">Return 
<ul><li><div class="p">'<code>0</code>' when <var>d</var> = 0000,</div></li><li><div class="p">'<code>1</code>' when <var>d</var> = 0001,</div></li><li><div class="p">'<code>2</code>' when <var>d</var> = 0010,</div></li><li><div class="p">'<code>3</code>' when <var>d</var> = 0011,</div></li><li><div class="p">...</div></li><li><div class="p">'<code>E</code>' when <var>d</var> = 1110,</div></li><li><div class="p">'<code>F</code>' when <var>d</var> = 1111.</div></li></ul>
</div>

</div></div></div></div></div><div class="div1">
<h2><a name="sec-datatypes-and-facets" id="sec-datatypes-and-facets" shape="rect"></a>F Datatypes and Facets</h2><div class="div2">
<h3><span class="nav"> </span><a name="app-fundamental-facets" id="app-fundamental-facets" shape="rect"></a>F.1 Fundamental Facets</h3><p>
The following table shows the values of the fundamental facets
for each <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatype.
</p>
<table border="1" bgcolor="#bedce6">
<tbody>
<tr><th rowspan="1" colspan="1">&#160;</th><th rowspan="1" colspan="1">Datatype</th><th rowspan="1" colspan="1">ordered</th><th rowspan="1" colspan="1">bounded</th><th rowspan="1" colspan="1">cardinality</th><th rowspan="1" colspan="1">numeric</th></tr>
<tr><td rowspan="19" colspan="1"><a href="#dt-primitive" shape="rect">primitive</a></td><td rowspan="1" colspan="1"><a href="#string" shape="rect">string</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#boolean" shape="rect">boolean</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#float" shape="rect">float</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">true</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#double" shape="rect">double</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">true</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#decimal" shape="rect">decimal</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#duration" shape="rect">duration</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#dateTime" shape="rect">dateTime</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#time" shape="rect">time</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#date" shape="rect">date</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#gYearMonth" shape="rect">gYearMonth</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#gYear" shape="rect">gYear</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#gMonthDay" shape="rect">gMonthDay</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#gDay" shape="rect">gDay</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#gMonth" shape="rect">gMonth</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#hexBinary" shape="rect">hexBinary</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#base64Binary" shape="rect">base64Binary</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#anyURI" shape="rect">anyURI</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#QName" shape="rect">QName</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#NOTATION" shape="rect">NOTATION</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td colspan="7" rowspan="1"></td></tr>
<tr><td rowspan="28" colspan="1"><a href="#dt-constructed" shape="rect">non-primitive</a></td><td rowspan="1" colspan="1"><a href="#normalizedString" shape="rect">normalizedString</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#token" shape="rect">token</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#language" shape="rect">language</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#IDREFS" shape="rect">IDREFS</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#ENTITIES" shape="rect">ENTITIES</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#NMTOKEN" shape="rect">NMTOKEN</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#NMTOKENS" shape="rect">NMTOKENS</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#Name" shape="rect">Name</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#NCName" shape="rect">NCName</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#ID" shape="rect">ID</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#IDREF" shape="rect">IDREF</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#ENTITY" shape="rect">ENTITY</a></td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#integer" shape="rect">integer</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#nonPositiveInteger" shape="rect">nonPositiveInteger</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#negativeInteger" shape="rect">negativeInteger</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#long" shape="rect">long</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">true</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#int" shape="rect">int</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">true</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#short" shape="rect">short</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">true</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#byte" shape="rect">byte</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">true</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#nonNegativeInteger" shape="rect">nonNegativeInteger</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#unsignedLong" shape="rect">unsignedLong</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">true</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#unsignedInt" shape="rect">unsignedInt</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">true</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#unsignedShort" shape="rect">unsignedShort</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">true</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#unsignedByte" shape="rect">unsignedByte</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">true</td><td rowspan="1" colspan="1">finite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#positiveInteger" shape="rect">positiveInteger</a></td><td rowspan="1" colspan="1">total</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">true</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#yearMonthDuration" shape="rect">yearMonthDuration</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#dayTimeDuration" shape="rect">dayTimeDuration</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>
<tr><td rowspan="1" colspan="1"><a href="#dateTimeStamp" shape="rect">dateTimeStamp</a></td><td rowspan="1" colspan="1">partial</td><td rowspan="1" colspan="1">false</td><td rowspan="1" colspan="1">countably infinite</td><td rowspan="1" colspan="1">false</td></tr>

</tbody>
</table>
</div></div><div class="div1">
<h2><a name="regexs" id="regexs" shape="rect"></a>G Regular Expressions</h2><p>A <a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expression<span class="arrow">&#183;</span></a>&#160;<var>R</var> is a sequence of
characters that denote a
set
of strings
<em>L</em>(<var>R</var>).&#160;
When used to constrain a <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, a
regular
expression <var>R</var> asserts that only strings in
<em>L</em>(<var>R</var>)
are valid <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> for values of that type.</p><div class="note"><div class="p"><b>Note:</b> 
Unlike some popular regular expression languages (including those
    defined by Perl and standard Unix utilities), the regular
    expression language defined here implicitly anchors all regular
    expressions at the head and tail, as the most common use of
    regular expressions in <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> is to match entire <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a>.
For example, a datatype <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from <a href="#string" shape="rect">string</a> such
that all values must begin with the character
'<code>A</code>'
(#x41) and end with the character
'<code>Z</code>'
(#x5a) would be defined as follows:
</div><pre xml:space="preserve">&lt;simpleType name='myString'&gt;
 &lt;restriction base='string'&gt;
  &lt;pattern value='A.*Z'/&gt;
 &lt;/restriction&gt;
&lt;/simpleType&gt;</pre><div class="p">In regular expression languages that are not implicitly anchored at the head and tail,
it is customary to write the equivalent regular expression as:
<blockquote><blockquote><p><code>^A.*Z$</code></p></blockquote></blockquote>
where
'<code>^</code>'
anchors the pattern at the head and
'<code>$</code>'
anchors at the tail.</div><div class="p">In those rare cases where an unanchored match is desired, including
'<code>.*</code>'
at the beginning and ending of the regular expression will
achieve the desired results.&#160; For example, a datatype <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from string
such that all values must contain at least 3 consecutive
'<code>A</code>'
(#x41)
characters somewhere within the value could be defined as follows:</div><pre xml:space="preserve">&lt;simpleType name='myString'&gt;
 &lt;restriction base='string'&gt;
  &lt;pattern value='.*AAA.*'/&gt;
 &lt;/restriction&gt;
&lt;/simpleType&gt;</pre></div><div class="div2">
<h3><span class="nav"> <a href="#regex-piece" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="regex-branch" id="regex-branch" shape="rect"></a>G.1 Regular expressions and branches</h3><p><span class="termdef"><a name="dt-regex" id="dt-regex" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>regular expression</b> is composed from zero or more
<a href="#dt-branch" class="termref" shape="rect"><span class="arrow">&#183;</span>branches<span class="arrow">&#183;</span></a>,
separated by
'<code>|</code>'
characters.</span>






</p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Regular Expression</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="regex" id="regex" shape="rect"></a><a name="nt-regExp" id="nt-regExp" shape="rect"></a>[64]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>regExp</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>
			<a href="#nt-branch" shape="rect"><i>branch</i></a>
			( '|' <a href="#nt-branch" shape="rect"><i>branch</i></a> )*
		</code></td></tr></tbody></table></td></tr></tbody></table><p></p><table border="1"><col width="50%" span="1" /><col width="50%" span="1" /><thead><tr><th rowspan="1" colspan="1">For all
<a href="#dt-branch" class="termref" shape="rect"><span class="arrow">&#183;</span>branches<span class="arrow">&#183;</span></a>
<var>S</var>, and for all
<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular
expressions<span class="arrow">&#183;</span></a> <var>T</var>, valid
<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular
expressions<span class="arrow">&#183;</span></a> <var>R</var> are:</th><th rowspan="1" colspan="1">Denoting the set of strings
<em>L</em>(<var>R</var>)
containing:</th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1">(empty string)</td><td align="center" rowspan="1" colspan="1">just the empty string</td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var></td><td align="center" rowspan="1" colspan="1">all strings in
<em>L</em>(<var>S</var>)</td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var>&#160;<code>|</code><var>T</var></td><td align="center" rowspan="1" colspan="1">all strings in
<em>L</em>(<var>S</var>)
and all strings in
<em>L</em>(<var>T</var>)</td></tr></tbody></table><p><span class="termdef"><a name="dt-branch" id="dt-branch" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>branch</b> consists of zero or more
<a href="#dt-piece" class="termref" shape="rect"><span class="arrow">&#183;</span>pieces<span class="arrow">&#183;</span></a>,
concatenated together.</span></p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Branch</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="branch" id="branch" shape="rect"></a><a name="nt-branch" id="nt-branch" shape="rect"></a>[65]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>branch</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#nt-piece" shape="rect"><i>piece</i></a>*</code></td></tr></tbody></table></td></tr></tbody></table><p></p><table border="1"><col width="50%" span="1" /><col width="50%" span="1" /><thead><tr><th rowspan="1" colspan="1">
For all
<a href="#dt-piece" class="termref" shape="rect"><span class="arrow">&#183;</span>pieces<span class="arrow">&#183;</span></a>
<var>S</var>, and for all
<a href="#dt-branch" class="termref" shape="rect"><span class="arrow">&#183;</span>branches<span class="arrow">&#183;</span></a>
<var>T</var>, valid
<a href="#dt-branch" class="termref" shape="rect"><span class="arrow">&#183;</span>branches<span class="arrow">&#183;</span></a>
<var>R</var> are:
</th><th rowspan="1" colspan="1">Denoting the set of strings
<em>L</em>(<var>R</var>)
containing:</th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1"><var>S</var></td><td align="center" rowspan="1" colspan="1">all strings in
<em>L</em>(<var>S</var>)</td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var><var>T</var></td><td align="center" rowspan="1" colspan="1">all strings
<var>s</var><var>t</var>
with <var>s</var> in
<em>L</em>(<var>S</var>)
and
<var>t</var>
in
<em>L</em>(<var>T</var>)</td></tr></tbody></table></div><div class="div2">
<h3><span class="nav"><a href="#regex-branch" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#regex-char-metachar" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="regex-piece" id="regex-piece" shape="rect"></a>G.2 Pieces, atoms, quantifiers</h3><p><span class="termdef"><a name="dt-piece" id="dt-piece" title="" shape="rect">[Definition:]&#160;&#160;</a>
A <b>piece</b> is an
<a href="#dt-atom" class="termref" shape="rect"><span class="arrow">&#183;</span>atom<span class="arrow">&#183;</span></a>, possibly followed by a
<a href="#dt-quantifier" class="termref" shape="rect"><span class="arrow">&#183;</span>quantifier<span class="arrow">&#183;</span></a>.
</span></p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Piece</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="piece" id="piece" shape="rect"></a><a name="nt-piece" id="nt-piece" shape="rect"></a>[66]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>piece</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#nt-atom" shape="rect"><i>atom</i></a>&#160;<a href="#nt-quantifier" shape="rect"><i>quantifier</i></a>?</code></td></tr></tbody></table></td></tr></tbody></table><p></p><table border="1"><col width="50%" span="1" /><col width="50%" span="1" /><thead><tr><th rowspan="1" colspan="1">For all 
<a href="#dt-atom" class="termref" shape="rect"><span class="arrow">&#183;</span>atoms<span class="arrow">&#183;</span></a>
<var>S</var> and non-negative
integers
<var>n</var>,
<var>m</var>
such that
<var>n</var>
&#8804; <var>m</var>, valid
<a href="#dt-piece" class="termref" shape="rect"><span class="arrow">&#183;</span>pieces<span class="arrow">&#183;</span></a>
<var>R</var> are:</th><th rowspan="1" colspan="1">Denoting the set of strings
<em>L</em>(<var>R</var>)
containing:</th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1"><var>S</var></td><td align="center" rowspan="1" colspan="1">all strings in
<em>L</em>(<var>S</var>)</td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var>&#160;<code>?</code></td><td align="center" rowspan="1" colspan="1">the empty string, and all strings in
<em>L</em>(<var>S</var>)</td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var>&#160;<code>*</code></td><td align="center" rowspan="1" colspan="1">all strings in
<em>L</em>(<var>S</var>&#160;<code>?</code>)
and all strings
<var>s</var><var>t</var>
with <var>s</var> in
<em>L</em>(<var>S</var>&#160;<code>*</code>)
and
<var>t</var>
in
<em>L</em>(<var>S</var>)&#160;&#160;
<em>(all concatenations of zero or more strings from
<em>L</em>(<var>S</var>)&#160;)</em></td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var>&#160;<code>+</code></td><td align="center" rowspan="1" colspan="1">all strings
<var>s</var><var>t</var>
with <var>s</var> in
<em>L</em>(<var>S</var>)
and
<var>t</var>
in
 <em>L</em>(<var>S</var>&#160;<code>*</code>)&#160;&#160;
<em>(all concatenations of one or more strings from
<em>L</em>(<var>S</var>)&#160;)</em></td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var>&#160;<code>{</code><var>n</var><code>,</code><var>m</var><code>}</code></td><td align="center" rowspan="1" colspan="1">all strings
<var>s</var><var>t</var>
with <var>s</var> in
<em>L</em>(<var>S</var>)
and
<var>t</var>
in
<em>L</em>(<var>S</var>&#160;<code>{</code><var>n</var>&#8722;1<code>,</code><var>m</var>&#8722;1<code>}</code>)
<em>(all
concatenations
of at least
<var>n</var>,
and at most
<var>m</var>,
strings from
<em>L</em>(<var>S</var>)&#160;)</em></td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var>&#160;<code>{</code><var>n</var><code>}</code></td><td align="center" rowspan="1" colspan="1">all
strings in
<em>L</em>(<var>S</var><code>{</code><var>n</var><code>,</code><var>n</var><code>}</code>)&#160;
<em>(all
concatenations
of exactly
<var>n</var>
strings from
<em>L</em>(<var>S</var>)&#160;)</em></td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var>&#160;<code>{</code><var>n</var><code>,}</code></td><td align="center" rowspan="1" colspan="1">all
strings in
<em>L</em>(<var>S</var><code>{</code><var>n</var><code>}</code>&#160;<var>S</var>&#160;<code>*</code>)&#160;
<em>(all
concatenations
of at least
<var>n</var>
strings from
<em>L</em>(<var>S</var>)&#160;)</em></td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var><code>&#160;{0,</code><var>m</var><code>}</code></td><td align="center" rowspan="1" colspan="1">all strings
<var>s</var><var>t</var>
with <var>s</var> in
<em>L</em>(<var>S</var>&#160;<code>?</code>)
and
<var>t</var>
in
<em>L</em>(<var>S</var>&#160;<code>{</code>0<code>,</code><var>m</var>&#8722;1<code>}</code>).&#160;
<em>(all
concatenations
of at most
<var>m</var>
strings from
<em>L</em>(<var>S</var>)&#160;)</em></td></tr><tr><td align="center" rowspan="1" colspan="1"><var>S</var>&#160;<code>{0,0}</code></td><td align="center" rowspan="1" colspan="1">only the empty string</td></tr></tbody></table><div class="note"><div class="p"><b>Note:</b> The regular expression language in the Perl Programming Language
<a href="#Perl" shape="rect">[Perl]</a> does not include a quantifier of the form&#160;
<var>S</var>&#160;<code>{,</code><var>m</var><code>}</code>&#160;,
since it is logically equivalent to
<var>S</var>&#160;<code>{0,</code><var>m</var><code>}</code>&#160;.&#160;
We have, therefore, left this logical possibility out of the regular
expression language defined by this specification.</div></div><p><span class="termdef"><a name="dt-quantifier" id="dt-quantifier" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>quantifier</b> is one of
'<code>?</code>',
'<code>*</code>', or '<code>+</code>', or a string of the form&#160;
<code>{</code><var>n</var><code>,</code><var>m</var><code>}</code>&#160;
or&#160; <code>{</code><var>n</var><code>,}</code>&#160;, 
which have the meanings
defined in the table above.
</span>
</p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Quantifier</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="quant" id="quant" shape="rect"></a><a name="nt-quantifier" id="nt-quantifier" shape="rect"></a>[67]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>quantifier</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>[?*+] | ( '{' <a href="#nt-quantity" shape="rect"><i>quantity</i></a> '}' )</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="quantity" id="quantity" shape="rect"></a><a name="nt-quantity" id="nt-quantity" shape="rect"></a>[68]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>quantity</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#nt-quantRange" shape="rect"><i>quantRange</i></a> |
			<a href="#nt-quantMin" shape="rect"><i>quantMin</i></a> | <a href="#nt-QuantExact" shape="rect"><i>QuantExact</i></a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="quantRange" id="quantRange" shape="rect"></a><a name="nt-quantRange" id="nt-quantRange" shape="rect"></a>[69]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>quantRange</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#nt-QuantExact" shape="rect"><i>QuantExact</i></a> ',' <a href="#nt-QuantExact" shape="rect"><i>QuantExact</i></a></code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="quantMin" id="quantMin" shape="rect"></a><a name="nt-quantMin" id="nt-quantMin" shape="rect"></a>[70]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>quantMin</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#nt-QuantExact" shape="rect"><i>QuantExact</i></a> ','</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="quantExact" id="quantExact" shape="rect"></a><a name="nt-QuantExact" id="nt-QuantExact" shape="rect"></a>[71]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>QuantExact</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>[0-9]+</code></td></tr></tbody></table></td></tr></tbody></table><p>
<span class="termdef"><a name="dt-atom" id="dt-atom" title="" shape="rect">[Definition:]&#160;&#160;</a>
An <b>atom</b> is either a
<a href="#dt-normalc" class="termref" shape="rect"><span class="arrow">&#183;</span>normal character<span class="arrow">&#183;</span></a>, a <a href="#dt-charclass" class="termref" shape="rect"><span class="arrow">&#183;</span>character class<span class="arrow">&#183;</span></a>, or
a parenthesized <a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expression<span class="arrow">&#183;</span></a>.</span>
</p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Atom</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="atom" id="atom" shape="rect"></a><a name="nt-atom" id="nt-atom" shape="rect"></a>[72]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>atom</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#nt-NormalChar" shape="rect"><i>NormalChar</i></a> |
			<a href="#nt-charClass" shape="rect"><i>charClass</i></a> | ( '('
			<a href="#nt-regExp" shape="rect"><i>regExp</i></a> ')' )</code></td></tr></tbody></table></td></tr></tbody></table><p></p><table border="1"><col width="50%" span="1" /><col width="50%" span="1" /><thead><tr><th rowspan="1" colspan="1">
For all
<a href="#dt-normalc" class="termref" shape="rect"><span class="arrow">&#183;</span>normal
characters<span class="arrow">&#183;</span></a>
<var>c</var>,
<a href="#dt-charclass" class="termref" shape="rect"><span class="arrow">&#183;</span>character
classes<span class="arrow">&#183;</span></a> <var>C</var>, and
<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular
expressions<span class="arrow">&#183;</span></a> <var>S</var>, valid
<a href="#dt-atom" class="termref" shape="rect"><span class="arrow">&#183;</span>atoms<span class="arrow">&#183;</span></a>
<var>R</var> are:
</th><th rowspan="1" colspan="1">Denoting the set of strings
<em>L</em>(<var>R</var>)
containing:</th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1"><var>c</var></td><td align="center" rowspan="1" colspan="1">the single string consisting only of 
<var>c</var></td></tr><tr><td align="center" rowspan="1" colspan="1"><var>C</var></td><td align="center" rowspan="1" colspan="1">all strings in
<em>L</em>(<var>C</var>)</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>(</code>&#160;<var>S</var>&#160;<code>)</code></td><td align="center" rowspan="1" colspan="1"><em>L</em>(<var>S</var>)</td></tr></tbody></table></div><div class="div2">
<h3><span class="nav"><a href="#regex-piece" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#charcter-classes" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="regex-char-metachar" id="regex-char-metachar" shape="rect"></a>G.3 Characters and metacharacters</h3><p><span class="termdef"><a name="dt-metac" id="dt-metac" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>metacharacter</b> is either
'<code>.</code>',
'<code>\</code>', '<code>?</code>', '<code>*</code>',
'<code>+</code>', '<code>{</code>', '<code>}</code>',
'<code>(</code>', '<code>)</code>',
'<code>|</code>',
'<code>[</code>',
or '<code>]</code>'.&#160;
These characters have special meanings in
<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular
expressions<span class="arrow">&#183;</span></a>, but can be escaped to form
<a href="#dt-atom" class="termref" shape="rect"><span class="arrow">&#183;</span>atoms<span class="arrow">&#183;</span></a>
that denote the sets of strings containing only themselves, i.e., an escaped
<b>metacharacter</b>
behaves like a <a href="#dt-normalc" class="termref" shape="rect"><span class="arrow">&#183;</span>normal character<span class="arrow">&#183;</span></a>.</span></p><p><span class="termdef"><a name="dt-normalc" id="dt-normalc" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>normal character</b> is any XML character that is not a
<a href="#dt-metac" class="termref" shape="rect"><span class="arrow">&#183;</span>metacharacter<span class="arrow">&#183;</span></a>.&#160;
In
<a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular
expressions<span class="arrow">&#183;</span></a>, a <b>normal
character</b> is an
<a href="#dt-atom" class="termref" shape="rect"><span class="arrow">&#183;</span>atom<span class="arrow">&#183;</span></a>
that denotes the singleton set of strings containing only itself.</span></p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Normal Character</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="char" id="char" shape="rect"></a><a name="nt-NormalChar" id="nt-NormalChar" shape="rect"></a>[73]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>NormalChar</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>[^.\?*+{}()|#x5B#x5D]</code></td><td rowspan="1" colspan="1"><i>/* &#160;N.B.:&#160; #x5B = '<code>[</code>',
#x5D = '<code>]</code>'&#160; */</i></td></tr></tbody></table></td></tr></tbody></table></div><div class="div2">
<h3 class="withToc"><span class="nav"><a href="#regex-char-metachar" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="charcter-classes" id="charcter-classes" shape="rect"></a>G.4 Character Classes</h3><div class="localToc">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.4.1 <a href="#charclassexps" shape="rect">Character class expressions</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.4.2 <a href="#cces" shape="rect">Character Class Escapes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.4.2.1 <a href="#cces-sce" shape="rect">Single-character escapes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.4.2.2 <a href="#cces-catesc" shape="rect">Category escapes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.4.2.3 <a href="#cces-blockesc" shape="rect">Block escapes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.4.2.4 <a href="#sec-unrecognized-catesc" shape="rect">Unrecognized category escapes</a><br clear="none" />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;G.4.2.5 <a href="#cces-mce" shape="rect">Multi-character escapes</a><br clear="none" />
</div><p><span class="termdef"><a name="dt-charclass" id="dt-charclass" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>character class</b> is an <a href="#dt-atom" class="termref" shape="rect"><span class="arrow">&#183;</span>atom<span class="arrow">&#183;</span></a>
<var>R</var> that identifies a
set
of characters
<em>C</em>(<var>R</var>).&#160;
The set of strings
<em>L</em>(<var>R</var>).&#160;
denoted by a character class <var>R</var> contains one single-character
string "<var>c</var>" for each character <var>c</var> in
<em>C</em>(<var>R</var>).</span>
<a name="anchor11125c" id="anchor11125c" shape="rect"></a>
</p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Character Class</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="charClass" id="charClass" shape="rect"></a><a name="nt-charClass" id="nt-charClass" shape="rect"></a>[74]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>charClass</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>
		  <a href="#nt-SingleCharEsc" shape="rect"><i>SingleCharEsc</i></a> |
			<a href="#nt-charClassEsc" shape="rect"><i>charClassEsc</i></a> |
			<a href="#nt-charClassExpr" shape="rect"><i>charClassExpr</i></a> |
			<a href="#nt-WildcardEsc" shape="rect"><i>WildcardEsc</i></a>
		</code></td></tr></tbody></table></td></tr></tbody></table><p>A character class is either 
a <a href="#dt-cces1" class="termref" shape="rect"><span class="arrow">&#183;</span>single-character escape<span class="arrow">&#183;</span></a> or
a <a href="#dt-cces" class="termref" shape="rect"><span class="arrow">&#183;</span>character class escape<span class="arrow">&#183;</span></a> or a
<a href="#dt-charexpr" class="termref" shape="rect"><span class="arrow">&#183;</span>character class expression<span class="arrow">&#183;</span></a> or
a <a href="#dt-wcchar" class="termref" shape="rect"><span class="arrow">&#183;</span>wildcard character<span class="arrow">&#183;</span></a>.</p><div class="note"><div class="p"><b>Note:</b> The rules for which characters must be escaped and which
can represent themselves are different when inside a
<a href="#dt-charexpr" class="termref" shape="rect"><span class="arrow">&#183;</span>character class expression<span class="arrow">&#183;</span></a>; some
<a href="#dt-normalc" class="termref" shape="rect"><span class="arrow">&#183;</span>normal characters<span class="arrow">&#183;</span></a>
must be escaped and some
<a href="#dt-metac" class="termref" shape="rect"><span class="arrow">&#183;</span>metacharacters<span class="arrow">&#183;</span></a> need
not be.</div></div><div class="div3">
<h4><a name="charclassexps" id="charclassexps" shape="rect"></a>G.4.1 Character class expressions</h4><p><span class="termdef"><a name="dt-charexpr" id="dt-charexpr" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>character class expression</b>
(<a href="#nt-charClassExpr" shape="rect"><i>charClassExpr</i></a>)
is a <a href="#dt-chargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>character group<span class="arrow">&#183;</span></a> surrounded by
'<code>[</code>'
and
'<code>]</code>'
characters.&#160; For all character groups
<var>G</var>,&#160;
<code>[</code>&#160;<var>G</var>&#160;<code>]</code>&#160;
is a valid <b>character class
expression</b>, identifying the set of characters
<em>C</em>(<code>[</code><var>G</var><code>]</code>) 
= <em>C</em>(<var>G</var>).</span></p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Character Class Expression</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="charClassExpr" id="charClassExpr" shape="rect"></a><a name="nt-charClassExpr" id="nt-charClassExpr" shape="rect"></a>[75]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>charClassExpr</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'[' <a href="#nt-charGroup" shape="rect"><i>charGroup</i></a> ']'</code></td></tr></tbody></table></td></tr></tbody></table><p>
<span class="termdef"><a name="dt-chargroup" id="dt-chargroup" title="" shape="rect">[Definition:]&#160;&#160;</a>
A
<b>character group</b> (<a href="#nt-charGroup" shape="rect"><i>charGroup</i></a>) starts 
with either a 
<a href="#dt-poschargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>positive character group<span class="arrow">&#183;</span></a> or
a <a href="#dt-negchargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>negative character group<span class="arrow">&#183;</span></a>,
and is optionally followed by a subtraction operator '<code>-</code>'
and a further <a href="#dt-charexpr" class="termref" shape="rect"><span class="arrow">&#183;</span>character class expression<span class="arrow">&#183;</span></a>.</span>&#160;
<span class="termdef"><a name="dt-ccsub" id="dt-ccsub" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<a href="#dt-chargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>character group<span class="arrow">&#183;</span></a> that contains a subtraction operator
is referred to as a <b>character class subtraction</b>.</span>
</p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Character Group</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="chargroup" id="chargroup" shape="rect"></a><a name="nt-charGroup" id="nt-charGroup" shape="rect"></a>[76]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>charGroup</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>(
			<a href="#nt-posCharGroup" shape="rect"><i>posCharGroup</i></a> |
			<a href="#nt-negCharGroup" shape="rect"><i>negCharGroup</i></a>
      )
			
                     
                        ( '-' <a href="#nt-charClassExpr" shape="rect"><i>charClassExpr</i></a> )?
                     
		</code></td></tr></tbody></table></td></tr></tbody></table><p>If the first character in a 
<a href="#nt-charGroup" shape="rect"><i>charGroup</i></a> is '<code>^</code>', this is 
taken as indicating that the <a href="#nt-charGroup" shape="rect"><i>charGroup</i></a>
starts with a <a href="#nt-negCharGroup" shape="rect"><i>negCharGroup</i></a>.&#160;
A <a href="#nt-posCharGroup" shape="rect"><i>posCharGroup</i></a> 
can itself start with '<code>^</code>' but only when it 
appears within a <a href="#nt-negCharGroup" shape="rect"><i>negCharGroup</i></a>, that is, when the 
'<code>^</code>' is preceded by another '<code>^</code>'.</p><div class="note"><div class="p"><b>Note:</b> For example, the string
'<code>[^X]</code>'
is ambiguous according the grammar rules, denoting either
a character class consisting of a negative character group
with
'<code>X</code>'
as a member, or 
a positive character class with
'<code>X</code>'
and
'<code>^</code>'
as members.&#160; The
normative prose rule just given requires that the
first interpretation be taken.</div><div class="p">The string
	      
	      '<code>[^]</code>'
		is unambiguous:  the grammar recognizes it as 
		a character class expression
		  containing
		a positive
		character group containing just
		the character
		'<code>^</code>'.&#160;
		But the grammatical derivation of the string violates
		the rule just given, so the string
		'<code>[^]</code>'
		<span class="rfc2119">must not</span> be accepted as a regular expression.</div></div><p>A '<code>-</code>' character
is recognized as a subtraction operator 
(and hence, as terminating the <a href="#nt-posCharGroup" shape="rect"><i>posCharGroup</i></a> or 
<a href="#nt-negCharGroup" shape="rect"><i>negCharGroup</i></a>) if it is immediately followed by a '<code>[</code>' 
character.</p><p> For any <a href="#dt-poschargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>positive character group<span class="arrow">&#183;</span></a>
or <a href="#dt-negchargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>negative character group<span class="arrow">&#183;</span></a> <var>G</var>, and any
<a href="#dt-charexpr" class="termref" shape="rect"><span class="arrow">&#183;</span>character class expression<span class="arrow">&#183;</span></a>
<var>C</var>,&#160;
<var>G</var>&#160;<code>-</code>&#160;<var>C</var>&#160; is a valid
<a href="#dt-chargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>character group<span class="arrow">&#183;</span></a>, identifying the set of all characters in
<em>C</em>(<var>G</var>)
that are not in
<em>C</em>(<var>C</var>).</p><p><span class="termdef"><a name="dt-poschargroup" id="dt-poschargroup" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>positive character group</b> consists of one or more

<a href="#dt-cgpart" class="termref" shape="rect"><span class="arrow">&#183;</span>character group parts<span class="arrow">&#183;</span></a>, concatenated
together.  The
set of characters identified by a <b>positive character group</b> 
is
the union of all of the sets identified
by its constituent <a href="#dt-cgpart" class="termref" shape="rect"><span class="arrow">&#183;</span>character group 
parts<span class="arrow">&#183;</span></a>.</span></p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Positive Character Group</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="poschargroup" id="poschargroup" shape="rect"></a><a name="nt-posCharGroup" id="nt-posCharGroup" shape="rect"></a>[77]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>posCharGroup</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>
			(
			
			
			<a href="#nt-charGroupPart" shape="rect"><i>charGroupPart</i></a>
			
			)+
		</code></td></tr></tbody></table></td></tr></tbody></table><p></p><table border="1"><col width="50%" span="1" /><col width="50%" span="1" /><thead><tr><th rowspan="1" colspan="1">
For all 

<a href="#dt-charrange" class="termref" shape="rect"><span class="arrow">&#183;</span>character
ranges<span class="arrow">&#183;</span></a>
<var>R</var>, all

<a href="#dt-cces" class="termref" shape="rect"><span class="arrow">&#183;</span>character class
escapes<span class="arrow">&#183;</span></a> 
<var>E</var>,
and all
 
<a href="#dt-poschargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>positive character groups<span class="arrow">&#183;</span></a> 
<var>P</var>, valid
 
<a href="#dt-poschargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>positive
charater groups<span class="arrow">&#183;</span></a> 
<var>G</var> are:
</th><th rowspan="1" colspan="1">
Identifying the set of characters
<em>C</em>(<var>G</var>)
containing:
</th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1"><var>R</var></td><td align="center" rowspan="1" colspan="1">all characters in
<em>C</em>(<var>R</var>)</td></tr><tr><td align="center" rowspan="1" colspan="1"><var>E</var></td><td align="center" rowspan="1" colspan="1">all characters in
<em>C</em>(<var>E</var>)</td></tr><tr><td align="center" rowspan="1" colspan="1"><var>R</var><var>P</var></td><td align="center" rowspan="1" colspan="1">all characters in
<em>C</em>(<var>R</var>)
and all characters in
<em>C</em>(<var>P</var>)</td></tr><tr><td align="center" rowspan="1" colspan="1"><var>E</var><var>P</var></td><td align="center" rowspan="1" colspan="1">all characters in
<em>C</em>(<var>E</var>)
and all characters in
<em>C</em>(<var>P</var>)</td></tr></tbody></table><p><span class="termdef"><a name="dt-negchargroup" id="dt-negchargroup" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>negative character group</b> 
(<a href="#nt-negCharGroup" shape="rect"><i>negCharGroup</i></a>)
consists of a 
'<code>^</code>'
character
followed by a <a href="#dt-poschargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>positive character group<span class="arrow">&#183;</span></a>.
The set of characters identified by
a negative character group
<em>C</em>(<code>^</code><var>P</var>)
is
the set of all  
characters that are <em>not</em> in
<em>C</em>(<var>P</var>).</span></p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Negative Character Group</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="negchargroup" id="negchargroup" shape="rect"></a><a name="nt-negCharGroup" id="nt-negCharGroup" shape="rect"></a>[78]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>negCharGroup</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'^' <a href="#nt-posCharGroup" shape="rect"><i>posCharGroup</i></a></code></td></tr></tbody></table></td></tr></tbody></table><p><span class="termdef"><a name="dt-cgpart" id="dt-cgpart" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>character group part</b> (<a href="#nt-charGroupPart" shape="rect"><i>charGroupPart</i></a>) is 
any
of: 
a single unescaped character
(<a href="#nt-SingleCharNoEsc" shape="rect"><i>SingleCharNoEsc</i></a>),
a single escaped character
(<a href="#nt-SingleCharEsc" shape="rect"><i>SingleCharEsc</i></a>), 
a character class escape
(<a href="#nt-charClassEsc" shape="rect"><i>charClassEsc</i></a>),
or a character range
(<a href="#nt-charRange" shape="rect"><i>charRange</i></a>).</span>
<a name="anchor11125a" id="anchor11125a" shape="rect"></a>
</p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Character Group Part</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="charGroupPart" id="charGroupPart" shape="rect"></a><a name="nt-charGroupPart" id="nt-charGroupPart" shape="rect"></a>[79]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>charGroupPart</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#nt-singleChar" shape="rect"><i>singleChar</i></a> 
      | <a href="#nt-charRange" shape="rect"><i>charRange</i></a>
       |
      <a href="#nt-charClassEsc" shape="rect"><i>charClassEsc</i></a>
      
    </code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="singleChar" id="singleChar" shape="rect"></a><a name="nt-singleChar" id="nt-singleChar" shape="rect"></a>[80]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>singleChar</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#nt-SingleCharEsc" shape="rect"><i>SingleCharEsc</i></a> | <a href="#nt-SingleCharNoEsc" shape="rect"><i>SingleCharNoEsc</i></a></code></td></tr></tbody></table></td></tr></tbody></table><div class="block">If a <a href="#nt-charGroupPart" shape="rect"><i>charGroupPart</i></a> starts with a
<a href="#nt-singleChar" shape="rect"><i>singleChar</i></a> and this is immediately followed by a hyphen,
then
the following rules apply.
	    <ol class="enumar"><li><div class="p">If the hyphen is immediately followed by '<code>[</code>',
then the hyphen is not part of the <a href="#nt-charGroupPart" shape="rect"><i>charGroupPart</i></a>:
instead, it is recognized as a character-class subtraction operator.</div></li><li><div class="p">
		  If the hyphen is immediately followed by '<code>]</code>',
then the hyphen is recognized as a <a href="#nt-singleChar" shape="rect"><i>singleChar</i></a> and
is part of the <a href="#nt-charGroupPart" shape="rect"><i>charGroupPart</i></a>.
		</div></li><li><div class="p">
		  If the hyphen is immediately followed by '<code>-[</code>',
then the hyphen is recognized as a <a href="#nt-singleChar" shape="rect"><i>singleChar</i></a> and
is part of the <a href="#nt-charGroupPart" shape="rect"><i>charGroupPart</i></a>.
		</div></li><li><div class="p">
		  Otherwise, the hyphen <span class="rfc2119">must</span> be immediately followed by some 
<a href="#nt-singleChar" shape="rect"><i>singleChar</i></a> other than a hyphen.  In this case
the hyphen is not part of the <a href="#nt-charGroupPart" shape="rect"><i>charGroupPart</i></a>;
instead it is recognized, together with the immediately
preceding and following instances of <a href="#nt-singleChar" shape="rect"><i>singleChar</i></a>,
as a <a href="#nt-charRange" shape="rect"><i>charRange</i></a>.</div></li><li><div class="p">
		  If the hyphen is followed by any other character sequence, 
then the string in which it occurs 
is not recognized as a regular expression.
		</div></li></ol>

It is an error if either of the two
<a href="#nt-singleChar" shape="rect"><i>singleChar</i></a>s in a 
<a href="#nt-charRange" shape="rect"><i>charRange</i></a> is a 
<a href="#nt-SingleCharNoEsc" shape="rect"><i>SingleCharNoEsc</i></a> comprising an unescaped hyphen.
</div><div class="note"><div class="p"><b>Note:</b> The rule just given resolves what would otherwise 
be the ambiguous interpretion of some strings, e.g.
'<code>[a-k-z]</code>';
it also constrains regular expressions in ways
not expressed in the grammar.  For example, the
rule (not the grammar) excludes the string
'<code>[--z]</code>'
from the
regular expression language defined here.</div></div><p><span class="termdef"><a name="dt-charrange" id="dt-charrange" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>character range</b>&#160;<var>R</var> identifies a set of
characters
<em>C</em>(<var>R</var>)
 
with UCS code points in a specified range.
</span>
</p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Character Range</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="charrange" id="charrange" shape="rect"></a><a name="nt-charRange" id="nt-charRange" shape="rect"></a>[81]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>charRange</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>
		
		<a href="#nt-singleChar" shape="rect"><i>singleChar</i></a> '-' <a href="#nt-singleChar" shape="rect"><i>singleChar</i></a>
		
		</code></td></tr></tbody></table></td></tr></tbody></table><p>
A <a href="#dt-charrange" class="termref" shape="rect"><span class="arrow">&#183;</span>character range<span class="arrow">&#183;</span></a>  in the form&#160;
<var>s</var><code>-</code><var>e</var>&#160; identifies
the set
of
 characters
with UCS code points greater than or equal to the code point
of <var>s</var>, but not greater than the code point of
<var>e</var>.</p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Single Unescaped Character</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="SingleCharNoEsc" id="SingleCharNoEsc" shape="rect"></a><a name="nt-SingleCharNoEsc" id="nt-SingleCharNoEsc" shape="rect"></a>[82]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>SingleCharNoEsc</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>[^\#x5B#x5D] </code></td><td rowspan="1" colspan="1"><i>/* &#160;N.B.:&#160;
#x5B = '<code>[</code>',
#x5D = '<code>]</code>'&#160; */</i></td></tr></tbody></table></td></tr></tbody></table><p>A single unescaped character
(<a href="#nt-SingleCharNoEsc" shape="rect"><i>SingleCharNoEsc</i></a>) is any character
except '<code>[</code>' or '<code>]</code>'.
There are special rules, described earlier, that
constrain
the use of the characters '<code>-</code>' and
'<code>^</code>' in order to disambiguate the syntax.</p><p>A single unescaped character
identifies the singleton set of characters containing
that character alone.</p><p>A single escaped character
(<a href="#nt-SingleCharEsc" shape="rect"><i>SingleCharEsc</i></a>), when used within a
character group, identifies the singleton set of characters
containing the character denoted by the
escape (see <a href="#cces" shape="rect">Character Class Escapes (&#167;G.4.2)</a>).</p></div><div class="div3">
<h4><a name="cces" id="cces" shape="rect"></a>G.4.2 Character Class Escapes</h4><p><span class="termdef"><a name="dt-cces" id="dt-cces" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>character class escape</b> is a short sequence of characters
that identifies a predefined
character class.&#160; The valid character class escapes are 
 the
<a href="#dt-ccesN" class="termref" shape="rect"><span class="arrow">&#183;</span>multi-character escapes<span class="arrow">&#183;</span></a>, and the
<a href="#dt-ccescat" class="termref" shape="rect"><span class="arrow">&#183;</span>category escapes<span class="arrow">&#183;</span></a> (including the
<a href="#dt-ccesblock" class="termref" shape="rect"><span class="arrow">&#183;</span>block escapes<span class="arrow">&#183;</span></a>).</span>
</p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Character Class Escape</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="charclassesc" id="charclassesc" shape="rect"></a><a name="nt-charClassEsc" id="nt-charClassEsc" shape="rect"></a>[83]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>charClassEsc</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>
			(
			<a href="#nt-MultiCharEsc" shape="rect"><i>MultiCharEsc</i></a> |
			<a href="#nt-catEsc" shape="rect"><i>catEsc</i></a> |
			<a href="#nt-complEsc" shape="rect"><i>complEsc</i></a>
			)
		</code></td></tr></tbody></table></td></tr></tbody></table><div class="div4">
<h5><a name="cces-sce" id="cces-sce" shape="rect"></a>G.4.2.1 Single-character escapes</h5><p>Closely related to the
character-class escapes are the single-character escapes.
<span class="termdef"><a name="dt-cces1" id="dt-cces1" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>single-character escape</b> identifies a set containing
only one
character&#8212;usually
because that character is difficult or
impossible to write directly into a <a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expression<span class="arrow">&#183;</span></a>.</span></p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Single Character Escape</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="singlecharesc" id="singlecharesc" shape="rect"></a><a name="nt-SingleCharEsc" id="nt-SingleCharEsc" shape="rect"></a>[84]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>SingleCharEsc</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'\' [nrt\|.?*+(){}#x2D#x5B#x5D#x5E]</code></td><td rowspan="1" colspan="1"><i>/* N.B.:&#160;
 #x2D = '<code>-</code>', #x5B = '<code>[</code>', #x5D =
 '<code>]</code>', #x5E = '<code>^</code>' */</i></td></tr></tbody></table></td></tr></tbody></table><p></p><table border="1"><col width="50%" span="1" /><col width="50%" span="1" /><thead><tr><th rowspan="1" colspan="1">The valid
<a href="#dt-cces1" class="termref" shape="rect"><span class="arrow">&#183;</span>single
character escapes<span class="arrow">&#183;</span></a> <var>R</var> are:</th><th rowspan="1" colspan="1">Identifying the set of characters

containing:</th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1"><code>\n</code></td><td align="center" rowspan="1" colspan="1">the newline character (#xA)</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\r</code></td><td align="center" rowspan="1" colspan="1">the return character (#xD)</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\t</code></td><td align="center" rowspan="1" colspan="1">the tab character (#x9)</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\\</code></td><td align="center" rowspan="1" colspan="1"><code>\</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\|</code></td><td align="center" rowspan="1" colspan="1"><code>|</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\.</code></td><td align="center" rowspan="1" colspan="1"><code>.</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\-</code></td><td align="center" rowspan="1" colspan="1"><code>-</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\^</code></td><td align="center" rowspan="1" colspan="1"><code>^</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\?</code></td><td align="center" rowspan="1" colspan="1"><code>?</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\*</code></td><td align="center" rowspan="1" colspan="1"><code>*</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\+</code></td><td align="center" rowspan="1" colspan="1"><code>+</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\{</code></td><td align="center" rowspan="1" colspan="1"><code>{</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\}</code></td><td align="center" rowspan="1" colspan="1"><code>}</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\(</code></td><td align="center" rowspan="1" colspan="1"><code>(</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\)</code></td><td align="center" rowspan="1" colspan="1"><code>)</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\[</code></td><td align="center" rowspan="1" colspan="1"><code>[</code></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\]</code></td><td align="center" rowspan="1" colspan="1"><code>]</code></td></tr></tbody></table></div><div class="div4">
<h5><a name="cces-catesc" id="cces-catesc" shape="rect"></a>G.4.2.2 Category escapes</h5><p><span class="termdef"><a name="dt-ccescat" id="dt-ccescat" title="" shape="rect">[Definition:]&#160;&#160;</a>
<a href="#UnicodeDB" shape="rect">[Unicode Database]</a> specifies a number of possible values for
the "General Category" property and provides mappings
from code points to specific character properties.&#160;

The set containing all characters that have property 
<var>X</var>
can be identified with a <b>category escape</b>&#160;<code>\p{</code><var>X</var><code>}</code> (using a lower-case
'p').&#160;
The complement of this set is specified with the
<b>category
escape</b>&#160;
<code>\P{</code><var>X</var><code>}</code>
(using an upper-case 'P').&#160;

For all <var>X</var>, if <var>X</var> is a recognized
character-property code, then 
<code>[\P{<var>X</var>}]</code>
= <code>[^\p{<var>X</var>}]</code>.

</span></p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Category Escape</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="catesc" id="catesc" shape="rect"></a><a name="nt-catEsc" id="nt-catEsc" shape="rect"></a>[85]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>catEsc</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'\p{' <a href="#nt-charProp" shape="rect"><i>charProp</i></a> '}'</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="complesc" id="complesc" shape="rect"></a><a name="nt-complEsc" id="nt-complEsc" shape="rect"></a>[86]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>complEsc</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'\P{' <a href="#nt-charProp" shape="rect"><i>charProp</i></a> '}'</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="charprop" id="charprop" shape="rect"></a><a name="nt-charProp" id="nt-charProp" shape="rect"></a>[87]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>charProp</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code><a href="#nt-IsCategory" shape="rect"><i>IsCategory</i></a> | <a href="#nt-IsBlock" shape="rect"><i>IsBlock</i></a></code></td></tr></tbody></table></td></tr></tbody></table><p>
<a href="#UnicodeDB" shape="rect">[Unicode Database]</a> is subject to future revision.&#160; For
example, the mapping from code points to character properties might be
updated.  All <a href="#dt-minimally-conforming" class="termref" shape="rect"><span class="arrow">&#183;</span>minimally conforming<span class="arrow">&#183;</span></a> processors
<a href="#dt-must" class="termref" shape="rect"><span class="arrow">&#183;</span>must<span class="arrow">&#183;</span></a> support the character properties defined in
the version of <a href="#UnicodeDB" shape="rect">[Unicode Database]</a> cited in the
normative references (<a href="#normative-biblio" shape="rect">Normative (&#167;K.1)</a>)or in
some later version of the Unicode database.&#160; Implementors are encouraged to support the
character properties defined in any later versions.  When the
implementation supports multiple versions of the Unicode database, and
they differ in salient respects (e.g. different properties are
assigned to the same character in different versions of the database),
then it is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> which set of property definitions is used
for any given assessment episode.
</p><div class="note"><div class="p"><b>Note:</b> In order to benefit from continuing work on the Unicode database,
a conforming implementation might by default use the latest supported
version of the character properties.  In order to maximize consistency
with other implementations of this specification, however, an 
implementation might choose to provide 
<a href="#dt-useroption" class="termref" shape="rect"><span class="arrow">&#183;</span>user options<span class="arrow">&#183;</span></a> to specify the
use of the version of the database cited in the normative references.
The <code>PropertyAliases.txt</code>
and <code>PropertyValueAliases.txt</code> files of
the Unicode database may be helpful to implementors in this connection.
</div></div><p>
For convenience, the following table lists 
the values of the "General Category" property in the
 version
of <a href="#UnicodeDB" shape="rect">[Unicode Database]</a>
cited in the normative references
(<a href="#normative-biblio" shape="rect">Normative (&#167;K.1)</a>).&#160;
The properties with single-character names are not defined in
<a href="#UnicodeDB" shape="rect">[Unicode Database]</a>.&#160; The value of a single-character
property is the union of the values of all the two-character properties
whose first character is the character in question.&#160; For example,
for <code>N</code>, the union of <code>Nd</code>, <code>Nl</code> and
<code>No</code>.</p><div class="note"><div class="p"><b>Note:</b> As of this publication the Java regex
library does <em>not</em> include <code>Cn</code> in its definition of
<code>C</code>, so that definition cannot be used without modification
in conformant implementations.</div></div><table border="1" align="center"><tbody><tr><th rowspan="1" colspan="1">Category</th><th rowspan="1" colspan="1">Property</th><th rowspan="1" colspan="1">Meaning</th></tr><tr><td rowspan="6" colspan="1">Letters</td><td align="center" rowspan="1" colspan="1">L</td><td rowspan="1" colspan="1">All Letters</td></tr><tr><td align="center" rowspan="1" colspan="1">Lu</td><td rowspan="1" colspan="1">uppercase</td></tr><tr><td align="center" rowspan="1" colspan="1">Ll</td><td rowspan="1" colspan="1">lowercase</td></tr><tr><td align="center" rowspan="1" colspan="1">Lt</td><td rowspan="1" colspan="1">titlecase</td></tr><tr><td align="center" rowspan="1" colspan="1">Lm</td><td rowspan="1" colspan="1">modifier</td></tr><tr><td align="center" rowspan="1" colspan="1">Lo</td><td rowspan="1" colspan="1">other</td></tr><tr><td colspan="3" rowspan="1">&#160;</td></tr><tr><td rowspan="4" colspan="1">Marks</td><td align="center" rowspan="1" colspan="1">M</td><td rowspan="1" colspan="1">All Marks</td></tr><tr><td align="center" rowspan="1" colspan="1">Mn</td><td rowspan="1" colspan="1">nonspacing</td></tr><tr><td align="center" rowspan="1" colspan="1">Mc</td><td rowspan="1" colspan="1">spacing combining</td></tr><tr><td align="center" rowspan="1" colspan="1">Me</td><td rowspan="1" colspan="1">enclosing</td></tr><tr><td colspan="3" rowspan="1">&#160;</td></tr><tr><td rowspan="4" colspan="1">Numbers</td><td align="center" rowspan="1" colspan="1">N</td><td rowspan="1" colspan="1">All Numbers</td></tr><tr><td align="center" rowspan="1" colspan="1">Nd</td><td rowspan="1" colspan="1">decimal digit</td></tr><tr><td align="center" rowspan="1" colspan="1">Nl</td><td rowspan="1" colspan="1">letter</td></tr><tr><td align="center" rowspan="1" colspan="1">No</td><td rowspan="1" colspan="1">other</td></tr><tr><td colspan="3" rowspan="1">&#160;</td></tr><tr><td rowspan="8" colspan="1">Punctuation</td><td align="center" rowspan="1" colspan="1">P</td><td rowspan="1" colspan="1">All Punctuation</td></tr><tr><td align="center" rowspan="1" colspan="1">Pc</td><td rowspan="1" colspan="1">connector</td></tr><tr><td align="center" rowspan="1" colspan="1">Pd</td><td rowspan="1" colspan="1">dash</td></tr><tr><td align="center" rowspan="1" colspan="1">Ps</td><td rowspan="1" colspan="1">open</td></tr><tr><td align="center" rowspan="1" colspan="1">Pe</td><td rowspan="1" colspan="1">close</td></tr><tr><td align="center" rowspan="1" colspan="1">Pi</td><td rowspan="1" colspan="1">initial quote
			(may behave like Ps or Pe depending on usage)</td></tr><tr><td align="center" rowspan="1" colspan="1">Pf</td><td rowspan="1" colspan="1">final quote
			(may behave like Ps or Pe depending on usage)</td></tr><tr><td align="center" rowspan="1" colspan="1">Po</td><td rowspan="1" colspan="1">other</td></tr><tr><td colspan="3" rowspan="1">&#160;</td></tr><tr><td rowspan="4" colspan="1">Separators</td><td align="center" rowspan="1" colspan="1">Z</td><td rowspan="1" colspan="1">All Separators</td></tr><tr><td align="center" rowspan="1" colspan="1">Zs</td><td rowspan="1" colspan="1">space</td></tr><tr><td align="center" rowspan="1" colspan="1">Zl</td><td rowspan="1" colspan="1">line</td></tr><tr><td align="center" rowspan="1" colspan="1">Zp</td><td rowspan="1" colspan="1">paragraph</td></tr><tr><td colspan="3" rowspan="1">&#160;</td></tr><tr><td rowspan="5" colspan="1">Symbols</td><td align="center" rowspan="1" colspan="1">S</td><td rowspan="1" colspan="1">All Symbols</td></tr><tr><td align="center" rowspan="1" colspan="1">Sm</td><td rowspan="1" colspan="1">math</td></tr><tr><td align="center" rowspan="1" colspan="1">Sc</td><td rowspan="1" colspan="1">currency</td></tr><tr><td align="center" rowspan="1" colspan="1">Sk</td><td rowspan="1" colspan="1">modifier</td></tr><tr><td align="center" rowspan="1" colspan="1">So</td><td rowspan="1" colspan="1">other</td></tr><tr><td colspan="3" rowspan="1">&#160;</td></tr><tr><td rowspan="5" colspan="1">Other</td><td align="center" rowspan="1" colspan="1">C</td><td rowspan="1" colspan="1">All Others</td></tr><tr><td align="center" rowspan="1" colspan="1">Cc</td><td rowspan="1" colspan="1">control</td></tr><tr><td align="center" rowspan="1" colspan="1">Cf</td><td rowspan="1" colspan="1">format</td></tr><tr><td align="center" rowspan="1" colspan="1">Co</td><td rowspan="1" colspan="1">private use</td></tr><tr><td align="center" rowspan="1" colspan="1">Cn</td><td rowspan="1" colspan="1">not assigned</td></tr></tbody></table><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Categories</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="cats" id="cats" shape="rect"></a><a name="nt-IsCategory" id="nt-IsCategory" shape="rect"></a>[88]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>IsCategory</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>
			<a href="#nt-Letters" shape="rect"><i>Letters</i></a> |
			<a href="#nt-Marks" shape="rect"><i>Marks</i></a> |
			<a href="#nt-Numbers" shape="rect"><i>Numbers</i></a> |
			<a href="#nt-Punctuation" shape="rect"><i>Punctuation</i></a> |
			<a href="#nt-Separators" shape="rect"><i>Separators</i></a> |
			<a href="#nt-Symbols" shape="rect"><i>Symbols</i></a> |
			<a href="#nt-Others" shape="rect"><i>Others</i></a>
		</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="lets" id="lets" shape="rect"></a><a name="nt-Letters" id="nt-Letters" shape="rect"></a>[89]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Letters</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'L' [ultmo]?</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="marks" id="marks" shape="rect"></a><a name="nt-Marks" id="nt-Marks" shape="rect"></a>[90]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Marks</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'M' [nce]?</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="nums" id="nums" shape="rect"></a><a name="nt-Numbers" id="nt-Numbers" shape="rect"></a>[91]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Numbers</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'N' [dlo]?</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="punc" id="punc" shape="rect"></a><a name="nt-Punctuation" id="nt-Punctuation" shape="rect"></a>[92]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Punctuation</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'P' [cdseifo]?</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="seps" id="seps" shape="rect"></a><a name="nt-Separators" id="nt-Separators" shape="rect"></a>[93]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Separators</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'Z' [slp]?</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="syms" id="syms" shape="rect"></a><a name="nt-Symbols" id="nt-Symbols" shape="rect"></a>[94]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Symbols</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'S' [mcko]?</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="others" id="others" shape="rect"></a><a name="nt-Others" id="nt-Others" shape="rect"></a>[95]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>Others</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'C' [cfon]?</code></td></tr></tbody></table></td></tr></tbody></table><div class="note"><div class="p"><b>Note:</b> The properties mentioned above exclude the Cs property.&#160; The Cs property identifies
"surrogate" characters, which do not occur at the
level of the "character abstraction" that XML
instance documents operate on.</div></div></div><div class="div4">
<h5><a name="cces-blockesc" id="cces-blockesc" shape="rect"></a>G.4.2.3 Block escapes</h5><p>
<a href="#UnicodeDB" shape="rect">[Unicode Database]</a> groups the code points of the Universal
Character Set (UCS) into a number of blocks such as Basic Latin (i.e.,
ASCII), Latin-1 Supplement, Hangul Jamo, CJK Compatibility, etc.&#160;
The block-escape construct allows regular expressions to refer to sets
of characters by the name of the block in which they appear, using a
<a href="#dt-normalized-block-name" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized block name<span class="arrow">&#183;</span></a>.
</p><p>
<span class="termdef"><a name="dt-normalized-block-name" id="dt-normalized-block-name" title="" shape="rect">[Definition:]&#160;&#160;</a>
For any Unicode block, the <b>normalized block name</b> of that
block is the string of characters formed by stripping out white space
and underbar characters from the block name as given in <a href="#UnicodeDB" shape="rect">[Unicode Database]</a>, while retaining hyphens and preserving case
distinctions.</span>
</p><p>
<span class="termdef"><a name="dt-ccesblock" id="dt-ccesblock" title="" shape="rect">[Definition:]&#160;&#160;</a>
A <b>block escape</b> expression denotes the set of characters
in a given Unicode block. For any Unicode block <var>B</var>, with <a href="#dt-normalized-block-name" class="termref" shape="rect"><span class="arrow">&#183;</span>normalized block name<span class="arrow">&#183;</span></a> <var>X</var>, the set containing all
characters defined in block <var>B</var> can be identified with the <b>block
escape</b> <code>\p{Is<var>X</var>}</code> (using lower-case
'p').  The complement of this set is denoted by the
<b>block escape</b> <code>\P{Is<var>X</var>}</code> (using upper-case
'P').  For all <var>X</var>, if <var>X</var> is a normalized block name
recognized by the processor, then
<code>[\P{Is</code><var>X</var><code>}]</code> =
<code>[^\p{Is</code><var>X</var><code>}]</code>.
</span>
</p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Block Escape</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="blockesc" id="blockesc" shape="rect"></a><a name="nt-IsBlock" id="nt-IsBlock" shape="rect"></a>[96]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>IsBlock</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'Is' [a-zA-Z0-9#x2D]+</code></td><td rowspan="1" colspan="1"><i>/* &#160;N.B.:&#160;
#x2D = '<code>-</code>' */</i></td></tr></tbody></table></td></tr></tbody></table><p id="eg-isbasiclatin">
For example, the <a href="#dt-ccesblock" class="termref" shape="rect"><span class="arrow">&#183;</span>block escape<span class="arrow">&#183;</span></a> for identifying the
ASCII characters is '<code>\p{IsBasicLatin}</code>'.</p><div class="note"><div class="p"><b>Note:</b> Current versions of the Unicode database recommend that whenever
  block names are being matched hyphens, underbars, and white space
  should be dropped and letters folded to a single case, so both the
  string '<code>BasicLatin</code>' and the string '<code>-- basic
  LATIN --</code>' will match the block name "Basic Latin".
  </div><div class="p">The handling of block names in block escapes differs from this
  behavior in two ways.  First, the normalized block names defined in
  this specification do not suppress hyphens in the Unicode block
  names and do not level case distinctions. The normalized form of the
  block name '<code>Latin-1 Supplement</code>', for example, is thus
  '<code>Latin-1Supplement</code>', not
  '<code>latin1supplement</code>' or
  '<code>LATIN1SUPPLEMENT</code>'.  Second, XSD processors are not
  required to perform any normalization at all upon the block name as
  given in the <a href="#dt-ccesblock" class="termref" shape="rect"><span class="arrow">&#183;</span>block escape<span class="arrow">&#183;</span></a>, so
  '<code>\p{Latin-1Supplement}</code>' will be recognized
  as a reference to the Latin-1 Supplement block, but
  '<code>\p{Is Latin-1 supplement}</code>' will not.
  </div></div><p>
<a href="#UnicodeDB" shape="rect">[Unicode Database]</a> has been revised since XSD 1.0 was
published, and is subject to future revision. In particular, the
grouping of code points into blocks has changed, and may change
again. All <a href="#dt-minimally-conforming" class="termref" shape="rect"><span class="arrow">&#183;</span>minimally conforming<span class="arrow">&#183;</span></a> processors <span class="rfc2119">must</span>
support the blocks defined in the version of <a href="#UnicodeDB" shape="rect">[Unicode Database]</a>
cited in the normative references (<a href="#normative-biblio" shape="rect">Normative (&#167;K.1)</a>) or in some
later version of the Unicode database.  
Implementors

are encouraged to support the blocks defined in earlier and/or later
versions of the Unicode Standard. When the implementation supports
multiple versions of the Unicode database, and they differ in salient
respects (e.g. different characters are assigned to a given block in
different versions of the database), then it is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> which
set of block definitions is used for any given assessment episode.
</p><div class="block">In particular, the version of <a href="#UnicodeDB" shape="rect">[Unicode Database]</a> referenced in XSD 1.0 (namely, Unicode 3.1)
contained a number of
blocks which have been renamed in later versions of the
database Since the
older block names may appear in regular expressions within
XSD 1.0 schemas, implementors are encouraged to support the superseded
block names in XSD 1.1 processors for compatibility, either by default
or <a href="#dt-useroption" class="termref" shape="rect"><span class="arrow">&#183;</span>at user option<span class="arrow">&#183;</span></a>.  At the time this
document was prepared, block names from Unicode 3.1 known to have been
superseded in this way included:
<ul><li><div class="p">#x0370 - #x03FF: Greek</div></li><li><div class="p">#x20D0 - #x20FF: CombiningMarksforSymbols</div></li><li><div class="p">#xE000 - #xF8FF: PrivateUse</div></li><li><div class="p">#xF0000 - #xFFFFD: PrivateUse</div></li><li><div class="p">#x100000 - #x10FFFD: PrivateUse</div></li></ul>
</div><p>
A tabulation of normalized block names for Unicode 2.0.0 and
later is given in <a href="#unicode-escapes" shape="rect">[Unicode block names]</a>. 
</p><p>For the treatment of regular expressions
containing unrecognized Unicode block names, see 
<a href="#sec-unrecognized-catesc" shape="rect">Unrecognized category escapes (&#167;G.4.2.4)</a>.</p></div><div class="div4">
<h5><a name="sec-unrecognized-catesc" id="sec-unrecognized-catesc" shape="rect"></a>G.4.2.4 Unrecognized category escapes</h5><p>A string of the form "<code>\p{<var>S</var>}</code>" 
  
  constitutes a <a href="#nt-catEsc" shape="rect"><i>catEsc</i></a> (category escape), and similarly
  a string of the form "<code>\P{<var>S</var>}</code>" constitutes
  a <a href="#nt-complEsc" shape="rect"><i>complEsc</i></a> (category-complement escape) only if the
  string <var>S</var> matches either <a href="#nt-IsCategory" shape="rect"><i>IsCategory</i></a> or <a href="#nt-IsBlock" shape="rect"><i>IsBlock</i></a>.</p><div class="note"><div class="p"><b>Note:</b> If an unknown string of characters is used in a
  category escape instead of a known character category code
  or a string matching the <a href="#nt-IsBlock" shape="rect"><i>IsBlock</i></a> production,
  the resulting string will (normally) not match the 
  <a href="#nt-regExp" shape="rect"><i>regExp</i></a> production and thus not be a regular
  expression as defined in this specification.  If the 
  non-<a href="#nt-regExp" shape="rect"><i>regExp</i></a> string occurs where a regular
  expression is required, the schema document will be in
  <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a>.</div></div><p>Any string of hyphens, digits, and Basic Latin characters
  beginning with '<code>Is</code>' will match the non-terminal <a href="#nt-IsBlock" shape="rect"><i>IsBlock</i></a> and thus be allowed in a regular expression.
  Most of these strings, however, will not denote any Unicode block.
  Processors <span class="rfc2119">should</span> issue a warning if they encounter a regular
  expression using a block name they do not recognize.  Processors
  <span class="rfc2119">may</span> <a href="#dt-useroption" class="termref" shape="rect"><span class="arrow">&#183;</span>at user option<span class="arrow">&#183;</span></a> treat unrecognized block names as <a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>errors<span class="arrow">&#183;</span></a> in
  the schema.
  </p><div class="note"><div class="p"><b>Note:</b> Treating unrecognized block names as errors increases the
    likelihood that errors in spelling the block name will be detected
    and can be helpful in checking the correctness of schema
    documents.  However, it also decreases the portability of schema
    documents among processors supporting different versions of
    <a href="#UnicodeDB" shape="rect">[Unicode Database]</a>; it is for this reason that 
    processors are allowed to treat unrecognized block names as
    errors only when the user has explicitly requested this
    behavior.
    </div></div><p>If a string "<code>Is<var>X</var></code>" matches the
  non-terminal <a href="#nt-IsBlock" shape="rect"><i>IsBlock</i></a> but <var>X</var> is not a recognized
  block name, then the expressions
  "<code>\p{Is<var>X</var>}</code>" and
  "<code>\P{Is<var>X</var>}</code>" each denote the set of all
  characters.
  Processors <span class="rfc2119">may</span> <a href="#dt-useroption" class="termref" shape="rect"><span class="arrow">&#183;</span>at user option<span class="arrow">&#183;</span></a> treat both 
  "<code>\p{Is<var>X</var>}</code>" and
  "<code>\P{Is<var>X</var>}</code>" as
  denoting the empty set, instead of the set of all characters.
  </p><div class="note"><div class="p"><b>Note:</b> The meaning defined for a block escape with an unrecognized
    block name makes it synonymous with the regular expression
    '<code>.|[\n\r]</code>'.  A processor which does not recognize
    the block name will thus not enforce the constraint that the
    characters matched are in, or are not in, the block in question.
    Any string which satisfies the regular expression as written will
    be accepted, but not all strings accepted will actually satisfy
    the expression as written: some strings which do not satisfy the
    expression as written will also be accepted. So some invalid input
    will be wrongly identified as invalid.</div><div class="p">If (at <a href="#dt-useroption" class="termref" shape="rect"><span class="arrow">&#183;</span>user option<span class="arrow">&#183;</span></a>) the expressions are treated as denoting the
    empty set, then the converse is true: any string which fails to
    satisfy the expression as written will be rejected, but not all
    strings rejected by the processor will actually have failed to satisfy
    the expression as written.  So some valid input will be wrongly
    identified as invalid.</div><div class="p">Which behavior is preferable in concrete circumstances depends on
    the relative cost of failure to accept valid input (false negatives)
    and failure to reject invalid input (false positives).  It is for
    this reason that processors are allowed to provide <a href="#dt-useroption" class="termref" shape="rect"><span class="arrow">&#183;</span>user options<span class="arrow">&#183;</span></a> to
    control the behavior.  The principle of being liberal in accepting
    input (often called Postel's Law) suggests that the default
    behavior should be to accept strings not known to be invalid, 
    rather than the converse; it is for this reason that block escapes
    with unknown block names should be treated as matching any character
    unless the user explicitly requests the alternative behavior.
    </div></div></div><div class="div4">
<h5><a name="cces-mce" id="cces-mce" shape="rect"></a>G.4.2.5 Multi-character escapes</h5><p><span class="termdef"><a name="dt-ccesN" id="dt-ccesN" title="" shape="rect">[Definition:]&#160;&#160;</a>A
<b>multi-character escape</b> provides a simple way to identify
any of
a commonly used set of characters:</span>&#160;
<span class="termdef"><a name="dt-wcchar" id="dt-wcchar" title="" shape="rect">[Definition:]&#160;&#160;</a>
The <b>wildcard character</b> is a metacharacter which matches
almost any single character:</span></p><table class="scrap" cellpadding="5" border="1" width="100%"><tbody><tr align="left"><td rowspan="1" colspan="1"><strong><font color="red">Multi-Character Escape</font></strong></td></tr><tr><td rowspan="1" colspan="1"><table border="0"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="multicharesc" id="multicharesc" shape="rect"></a><a name="nt-MultiCharEsc" id="nt-MultiCharEsc" shape="rect"></a>[97]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>MultiCharEsc</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'\' [sSiIcCdDwW]</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="wildcardesc" id="wildcardesc" shape="rect"></a><a name="nt-WildcardEsc" id="nt-WildcardEsc" shape="rect"></a>[98]&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>WildcardEsc</code></td><td rowspan="1" colspan="1">&#160;&#160;&#160;::=&#160;&#160;&#160;</td><td rowspan="1" colspan="1"><code>'.'</code></td></tr></tbody></table></td></tr></tbody></table><p></p><table border="1" align="center" cellpadding="5"><col width="33%" span="1" /><col width="33%" span="1" /><col width="33%" span="1" /><thead><tr><th rowspan="1" colspan="1">Character sequence</th><th rowspan="1" colspan="1">Equivalent <a href="#dt-charclass" class="termref" shape="rect"><span class="arrow">&#183;</span>character class<span class="arrow">&#183;</span></a></th></tr></thead><tbody><tr><td align="center" rowspan="1" colspan="1"><code>.</code></td><td align="center" rowspan="1" colspan="1">[^\n\r]</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\s</code></td><td align="center" rowspan="1" colspan="1">[#x20\t\n\r]</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\S</code></td><td align="center" rowspan="1" colspan="1">[^\s]</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\i</code></td><td align="center" rowspan="1" colspan="1">
		the set of initial name characters, those
		<a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matched<span class="arrow">&#183;</span></a> by
		<a href="http://www.w3.org/TR/xml11/#NT-NameStartChar" shape="rect">NameStartChar</a> in <a href="#XML" shape="rect">[XML]</a> 
		
		
                </td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\I</code></td><td align="center" rowspan="1" colspan="1">[^\i]</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\c</code></td><td align="center" rowspan="1" colspan="1">

		the set of name characters, those
		<a href="#dt-match" class="termref" shape="rect"><span class="arrow">&#183;</span>matched<span class="arrow">&#183;</span></a> by
		<a href="http://www.w3.org/TR/xml11/#NT-NameChar" shape="rect">NameChar</a></td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\C</code></td><td align="center" rowspan="1" colspan="1">[^\c]</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\d</code></td><td align="center" rowspan="1" colspan="1">\p{Nd}</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\D</code></td><td align="center" rowspan="1" colspan="1">[^\d]</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\w</code></td><td align="center" rowspan="1" colspan="1">
			[#x0000-#x10FFFF]-[\p{P}\p{Z}\p{C}]
			(<em>all characters except the set of "punctuation",
				"separator" and "other" characters</em>)
		</td></tr><tr><td align="center" rowspan="1" colspan="1"><code>\W</code></td><td align="center" rowspan="1" colspan="1">[^\w]</td></tr></tbody></table><div class="note"><div class="p"><b>Note:</b> 
The <a href="#dt-regex" class="termref" shape="rect"><span class="arrow">&#183;</span>regular expression<span class="arrow">&#183;</span></a> language defined here does not
attempt to provide a general solution to "regular expressions" over
UCS character sequences.&#160; In particular, it does not easily provide
for matching sequences of base characters and combining marks.
The language is targeted at support of "Level 1" features as defined in
<a href="#unicodeRegEx" shape="rect">[Unicode Regular Expression Guidelines]</a>.&#160; It is hoped that future versions of this
specification will provide support for "Level 2" features.
</div></div></div></div></div></div><div class="div1">
<h2><a name="idef-idep" id="idef-idep" shape="rect"></a>H Implementation-defined and implementation-dependent features (normative)</h2><div class="div2">
<h3><span class="nav"> <a href="#impl-dep" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="impl-def" id="impl-def" shape="rect"></a>H.1 Implementation-defined features</h3><p>The following features in this specification are <a href="#key-impl-def" 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 (or to the
specification of any host language which embeds 
<em>XSD 1.1:  Datatypes</em>) <span class="rfc2119">must</span> describe how these choices 
have been exercised, in documentation which accompanies any conformance claim.
</p><ol class="enumar"><li><div class="p">For the datatypes which depend on
<a href="#XML" shape="rect">[XML]</a> or <a href="#XMLNS" shape="rect">[Namespaces in XML]</a>, it is
<a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether a conforming processor takes the relevant
definitions from
<a href="#XML" shape="rect">[XML]</a> and <a href="#XMLNS" shape="rect">[Namespaces in XML]</a>, or
from
<a href="#XML1.0" shape="rect">[XML 1.0]</a> and <a href="#XMLNS1.0" shape="rect">[Namespaces in XML 1.0]</a>. 
Implementations <span class="rfc2119">may</span> support either
the form of these datatypes based on version 1.0 of those
specifications, or the form based on version 1.1, or both.
</div></li><li><div class="p">For the datatypes with infinite <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a>, it 
is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether conforming processors
set a limit on the size of the values supported.
If such limits are set, they <span class="rfc2119">must</span> be documented,
and the limits <span class="rfc2119">must</span> be equal to, or exceed, the
minimal limits specified in 
<a href="#partial-implementation" shape="rect">Partial Implementation of Infinite Datatypes (&#167;5.4)</a>.
.</div></li><li><div class="p">It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes other than
those defined in this specification are supported.</div><div class="p">For each <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> datatype, a <a href="#std" class="compref" shape="rect">Simple Type Definition</a>
<span class="rfc2119">must</span> be
specified which conforms to the rules given in 
<a href="#builtin-stds" shape="rect">Built-in Simple Type Definitions (&#167;4.1.6)</a>.
</div><div class="p">
In addition, the following information
<span class="rfc2119">must</span> be provided:<ol class="enumla"><li><div class="p">The nature of the datatype's <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>,
and <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">The nature of the equality relation; in particular, how to determine
whether two values which are not identical are equal.</div><div class="note"><div class="p"><b>Note:</b> There is no requirement that equality be distinct from identity,
but it <span class="rfc2119">may</span> be.</div></div></li><li><div class="p">The values of the <a href="#dt-fundamental-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>fundamental facets<span class="arrow">&#183;</span></a>.</div></li><li><div class="p">Which of the <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> defined in this specification
are applicable to the datatype (and <span class="rfc2119">may</span> thus be used in 
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a> from it), and what they mean when 
applied to it.</div></li><li><div class="p">If <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> are supported, which of those
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> are applicable to the datatype, and what they
mean when applied to it.</div></li><li><div class="p">What URI reference (more precisely, what <a href="#anyURI" shape="rect">anyURI</a> value)
is to be used to refer to the datatype, analogous to those provided
for the datatypes defined here in section
<a href="#built-in-datatypes" shape="rect">Built-in Datatypes and Their Definitions (&#167;3)</a>.</div><div class="note"><div class="p"><b>Note:</b> It is convenient if the URI for a datatype and the 
<a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a> of its simple type definition are related by a 
simple mapping, like the URIs given for the <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatypes
in <a href="#built-in-datatypes" shape="rect">Built-in Datatypes and Their Definitions (&#167;3)</a>.  However, this is not
a requirement.</div></div></li><li><div class="p">For each <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facet<span class="arrow">&#183;</span></a> given a value for the new <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>,
what URI reference (more precisely, what <a href="#anyURI" shape="rect">anyURI</a> value)
is to be used to refer to the usage of that facet on the datatype, 
analogous to those provided, for the <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatypes, in section
<a href="#built-in-datatypes" shape="rect">Built-in Datatypes and Their Definitions (&#167;3)</a>.</div><div class="note"><div class="p"><b>Note:</b> As specified normatively elsewhere, the set of facets given values
will at the very least include the <a href="#f-w" class="compref" shape="rect">whiteSpace</a> facet.</div></div></li></ol>
</div><div class="p">The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of the <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatype <span class="rfc2119">must</span> be disjoint
from those of the other <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes.</div><div class="p">The <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> defined for an <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> primitive
<span class="rfc2119">must</span> be a total function from the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> onto the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.  That is, (1) each <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> in the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>
<span class="rfc2119">must</span> map to exactly one value, and (2) each value <span class="rfc2119">must</span> be
the image of at least one member of the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, and
<span class="rfc2119">may</span> be the image of more than one.</div><div class="p">For consistency with the <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> defined here,
implementors who define new <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes <span class="rfc2119">should</span> allow
the <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> and <a href="#dt-enumeration" class="termref" shape="rect"><span class="arrow">&#183;</span>enumeration<span class="arrow">&#183;</span></a>
facets to apply.
</div><div class="p">The implementor <span class="rfc2119">should</span> specify a <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a>
for the datatype if practicable.</div></li><li><div class="p">It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> other than
those defined in this specification are supported.</div><div class="p">For each <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facet, the following information
<span class="rfc2119">must</span> be provided:<ol class="enumla"><li><div class="p">What properties the facet has, viewed as a schema component.</div><div class="note"><div class="p"><b>Note:</b> For most <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facets, the structural pattern used
for most <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> defined in this specification is
expected to be satisfactory, but other structures <span class="rfc2119">may</span> be specified.</div></div></li><li><div class="p">Whether the facet is a <a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a>, <a href="#dt-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical<span class="arrow">&#183;</span></a>, or
<a href="#dt-value-based" class="termref" shape="rect"><span class="arrow">&#183;</span>value-based<span class="arrow">&#183;</span></a> facet.</div></li><li><div class="p">Whether restriction of the facet takes the form of replacing
a less restrictive facet value with a more restrictive value
(as in the <a href="#dt-minInclusive" class="termref" shape="rect"><span class="arrow">&#183;</span>minInclusive<span class="arrow">&#183;</span></a> and most other
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> defined in this specification) or 
of adding new values to a set of facet values (as
for the <a href="#dt-pattern" class="termref" shape="rect"><span class="arrow">&#183;</span>pattern<span class="arrow">&#183;</span></a> facet).  In the former case,
the information provided <span class="rfc2119">must</span> also specify how to determine
which of two given values is more restrictive (and thus can
be used to restrict the other).</div><div class="p">When an <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facet is used in <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>, the
new value <span class="rfc2119">must</span> be at least as restrictive as the existing
value, if any.</div><div class="note"><div class="p"><b>Note:</b> The effect of the preceding paragraph is to ensure that
a type derived by <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a> using an <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> 
facet does not allow, or appear to allow, values not present
in the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.</div></div></li><li><div class="p">What <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes the new
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facet<span class="arrow">&#183;</span></a> applies to, and what it 
means when applied to them.</div><div class="p">For a <a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> facet, how to compute the result
of applying the facet value to any given <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a>.</div><div class="p">For a <a href="#dt-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical<span class="arrow">&#183;</span></a> facet, how to tell whether any given
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> is facet-valid with respect to it.</div><div class="p">For a <a href="#dt-value-based" class="termref" shape="rect"><span class="arrow">&#183;</span>value-based<span class="arrow">&#183;</span></a> facet, how to tell whether any
given value in the relevant <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes
is facet-valid with respect to it.</div><div class="note"><div class="p"><b>Note:</b> The host language <span class="rfc2119">may</span> choose to specify that <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> 
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> are applicable to <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>
datatypes; this information is necessary to make the 
<a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facet usable in such host languages.
 </div></div></li><li><div class="p">What URI reference (more precisely, what <a href="#anyURI" shape="rect">anyURI</a> value)
is to be used to refer to the facet, analogous to those provided
for the datatypes defined here in section
<a href="#built-in-datatypes" shape="rect">Built-in Datatypes and Their Definitions (&#167;3)</a>.</div></li><li><div class="p">What element is to be used in XSD schema documents to apply the facet
in the course of <a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a>.  A schema document <span class="rfc2119">must</span> be
provided with an element declaration for each <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> facet;
the element declarations <span class="rfc2119">should</span> specify <code>xs:facet</code> as
their substitution-group head.</div><div class="note"><div class="p"><b>Note:</b> The elements' <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> are used by the condition-inclusion
mechanism of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a> to allow schema authors to test whether
a particular facet is supported and adjust the schema document's
contents accordingly.</div></div></li></ol>
</div><div class="p"><a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>Implementation-defined<span class="arrow">&#183;</span></a> <a href="#dt-pre-lexical" class="termref" shape="rect"><span class="arrow">&#183;</span>pre-lexical<span class="arrow">&#183;</span></a> facets <span class="rfc2119">must not</span>, when 
applied to <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> which have been whitespace-normalized
by the <a href="#f-w" class="compref" shape="rect">whiteSpace</a> facet, produce <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> which are
no longer whitespace-normalized.
</div></li></ol><div class="note"><div class="p"><b>Note:</b> It follows from the above that each <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>
datatype and each <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> constraining facet has an <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded name</a>.
These <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/#dt-expname" shape="rect">expanded names</a> are used by the condition-inclusion mechanism
of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a> to allow schema authors to test whether a
particular datatype or facet is supported and adjust the schema document's
contents accordingly.
</div></div></div><div class="div2">
<h3><span class="nav"><a href="#impl-def" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="impl-dep" id="impl-dep" shape="rect"></a>H.2 Implementation-dependent features</h3><p>The following features in this specification are <a href="#key-impl-dep" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-dependent<span class="arrow">&#183;</span></a>.
Software which claims to conform to this specification (or to the
specification of any host language which embeds 
<em>XSD 1.1:  Datatypes</em>) <span class="rfc2119">may</span> describe how these choices 
have been exercised, in documentation which accompanies any conformance claim.
</p><ol class="enumar"><li><div class="p">When multiple errors are encountered in type definitions or elsewhere,
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 the errors are reported (as long
as at least one error is reported), and which,
what form the report of errors takes, and how much detail is included.</div></li></ol></div></div><div class="div1">
<h2><a name="changes" id="changes" shape="rect"></a>I Changes since version 1.0</h2><div class="div2">
<h3><span class="nav"> <a href="#sec-chnum" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="sec-chdtfacets" id="sec-chdtfacets" shape="rect"></a>I.1 Datatypes and Facets</h3><p>In order to align this specification with
those being prepared by the XSL and XML Query Working Groups, a new
datatype named <a href="#anyAtomicType" shape="rect">anyAtomicType</a> has been introduced; it
serves as the base type definition for all <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>
<a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatypes.</p><p>The treatment of datatypes has been made more
precise and explicit; most of these changes affect the section on 
<a href="#typesystem" shape="rect">Datatype System (&#167;2)</a>.  Definitions have been revised thoroughly and
technical terms are used more consistently.</p><p>The (numeric) equality of values is now distinguished from
the identity of the values themselves; this allows <a href="#float" shape="rect">float</a> and <a href="#double" shape="rect">double</a> to treat positive and negative
zero as distinct values, but nevertheless
to treat them as equal for purposes of bounds checking.  This allows a
better alignment with the expectations of users working with IEEE
floating-point binary numbers.</p><p>The <a href="#ff-b-value" class="propref" shape="rect">{value}</a> of the <a href="#ff-b" class="compref" shape="rect">bounded</a> component for <b><i>list</i></b> datatypes is now always
<b><i>false</i></b>, reflecting the fact that no ordering is prescribed for <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a>
datatypes, and so
they cannot be bounded using the facets defined by this
specification.</p><p>Units of length have been specified for all datatypes that are permitted
the length constraining facet.</p><p>The use of the namespace
<code>http://www.w3.org/2001/XMLSchema-datatypes</code> has been
deprecated.  The definition of a namespace separate from the main
namespace defined by this specification proved not to be necessary or
helpful in facilitating the use, by other specifications, of the
datatypes defined here, and its use raises a number of difficult
unsolved practical questions.
</p><p>
An <a href="#f-a" class="compref" shape="rect">assertions</a> facet has been added, to allow schema
authors to associated assertions with simple type definitions,
analogous to those allowed by <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a> for complex type definitions.
</p><p>The discussion of whitespace handling in 
      <a href="#rf-whiteSpace" shape="rect">whiteSpace (&#167;4.3.6)</a> makes clearer that when
      the value is <b>collapse</b>, <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> consisting
      solely of whitespace characters are reduced to the
      empty string; the earlier formulation has been misunderstood
      by some implementors.</p><p>
Conforming implementations <span class="rfc2119">may</span> now support <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes
and facets in addition to those defined here.
</p></div><div class="div2">
<h3><span class="nav"><a href="#sec-chdtfacets" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#sec-chdt" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="sec-chnum" id="sec-chnum" shape="rect"></a>I.2 Numerical Datatypes</h3><p>As noted above, positive and negative zero,
<a href="#float" shape="rect">float</a> and <a href="#double" shape="rect">double</a> are now treated as
distinct but arithmetically equal values.</p><p>The description of the lexical spaces of 
<a href="#unsignedLong" shape="rect">unsignedLong</a>,
<a href="#unsignedInt" shape="rect">unsignedInt</a>,
<a href="#unsignedShort" shape="rect">unsignedShort</a>, and
<a href="#unsignedByte" shape="rect">unsignedByte</a> has been revised to agree with the
schema for schemas by allowing for the possibility of a
leading sign.</p><p>The <a href="#float" shape="rect">float</a> and
<a href="#double" shape="rect">double</a> datatypes now follow IEEE 754 implementation
practice more closely; in particular, negative and positive zero are
now distinct values, although arithmetically equal. Conversely, NaN is identical but not arithmetically equal
to itself.</p><p>
The character sequence '<code>+INF</code>' has been added to the
lexical spaces of <a href="#float" shape="rect">float</a> and <a href="#double" shape="rect">double</a>.
</p></div><div class="div2">
<h3><span class="nav"><a href="#sec-chnum" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> <a href="#sec-chother" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="sec-chdt" id="sec-chdt" shape="rect"></a>I.3 Date/time Datatypes</h3><p>The treatment of <a href="#dateTime" shape="rect">dateTime</a> and related 
datatypes has been changed to provide a more explicit account of
the value space in terms of seven numeric properties.  The most
important substantive change is that values now explicitly retain
information about the time zone offset indicated in the lexical form; this
allows better alignment with the treatment of such values in 
<a href="#F_O" shape="rect">[XQuery 1.0 and XPath 2.0 Functions and Operators]</a>.</p><p>At the suggestion of the 
<a href="http://www.w3.org/2007/OWL/wiki/OWL_Working_Group" shape="rect">W3C OWL Working Group</a>, a <a href="#f-tz" class="compref" shape="rect">explicitTimezone</a> facet
has been added to allow date/time datatypes to be restricted by
requiring or forbidding an explicit time zone offset from UTC,
instead of making it optional.  The <a href="#dateTimeStamp" shape="rect">dateTimeStamp</a>
datatype has been defined using this facet.</p><p>The
treatment of the date/time datatype includes a carefully revised
definition of order that ensures that for repeating datatypes (<a href="#time" shape="rect">time</a>, <a href="#gDay" shape="rect">gDay</a>, etc.), timezoned values will be
compared as though they are on the same "calendar
day" ("local" property values) so that in
any given timezone, the days start at the local midnight and end just
before local midnight.&#160; Days do not run from 00:00:00Z to
24:00:00Z in timezones other than Z.
</p><p>The lexical representation
'<code>0000</code>' for years is recognized and maps to the year 1
BCE; '<code>-0001</code>' maps to 2 BCE, etc.  This is a change from
version 1.0 of this specification, in order to align with established
practice (the so-called "astronomical year
numbering") and <a href="#ISO8601" shape="rect">[ISO 8601]</a>.</p><p>
Algorithms for arithmetic involving <a href="#dateTime" shape="rect">dateTime</a> and
<a href="#duration" shape="rect">duration</a> values have been provided, and corrections
made to the <a href="#vp-dt-timeOnTimeline" shape="rect"><i><span class="arrow">&#183;</span>timeOnTimeline<span class="arrow">&#183;</span></i></a> function.
</p><p>The treatment of leap seconds is no longer <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a>:
the date/time types described here do not include leap-second values.

</p><p>
At the suggestion of the 
<a href="http://www.w3.org/International/core/" shape="rect">W3C 
Internationalization Core Working Group</a>, most references to 
"time zone" have been replaced with references to 
"time zone offset"; this
resolves issue 
<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=4642" shape="rect">4642
Terminology: zone offset versus time zone</a>.
</p><p>
A number of syntactic and semantic errors in some of the regular
expressions given to describe the lexical spaces of the <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>
datatypes (most notably the date/time datatypes) have been corrected.
</p></div><div class="div2">
<h3><span class="nav"><a href="#sec-chdt" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="sec-chother" id="sec-chother" shape="rect"></a>I.4 Other changes</h3><p>Support has been added for <a href="#XML" shape="rect">[XML]</a> 
version 1.1 and <a href="#XMLNS" shape="rect">[Namespaces in XML]</a> version 1.1.  The 
datatypes which depend on <a href="#XML" shape="rect">[XML]</a> and <a href="#XMLNS" shape="rect">[Namespaces in XML]</a>
may now be used with the definitions provided by the 1.1 versions 
of those specifications, as well as with the definitions in the
1.0 versions.  It is <a href="#key-impl-def" class="termref" shape="rect"><span class="arrow">&#183;</span>implementation-defined<span class="arrow">&#183;</span></a> whether software conforming
to this specification supports the definitions given in version 1.0,
or in version 1.1, of <a href="#XML" shape="rect">[XML]</a> and <a href="#XMLNS" shape="rect">[Namespaces in XML]</a>.</p><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.
      </p><p>
The reference 

to the Unicode Database <a href="#UnicodeDB" shape="rect">[Unicode Database]</a>
has been updated from version 4.1.0 to version 5.1.0,
at the suggestion of the 
<a href="http://www.w3.org/International/core/" shape="rect">W3C 
Internationalization Core Working Group</a>
</p><p>

References to various other specifications have also been updated.
</p><p>The account of the value space of <a href="#duration" shape="rect">duration</a> has been changed to specify that values consist only
of two numbers (the number of months and the number of seconds) rather
than six (years, months, days, hours, minutes, seconds).  This allows
clearly equivalent durations like P2Y and P24M to have the same
value.</p><p>Two new totally ordered restrictions of <a href="#duration" shape="rect">duration</a>
have been defined: <a href="#yearMonthDuration" shape="rect">yearMonthDuration</a>, defined in
<a href="#yearMonthDuration" shape="rect">yearMonthDuration (&#167;3.4.26)</a>, and <a href="#dayTimeDuration" shape="rect">dayTimeDuration</a>, defined in <a href="#dayTimeDuration" shape="rect">dayTimeDuration (&#167;3.4.27)</a>.
This allows better alignment with the treatment of durations in
<a href="#F_O" shape="rect">[XQuery 1.0 and XPath 2.0 Functions and Operators]</a>.</p><p>The XML representations of the <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> and
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> built-in datatypes have been moved out of the schema document
for schema documents in <a href="#schema" shape="rect">Schema for Schema Documents (Datatypes)
 (normative) (&#167;A)</a> and into a 
different appendix (<a href="#prim.nxsd" shape="rect">Illustrative XML representations for the built-in simple type definitions (&#167;C)</a>).</p><p>Numerous minor corrections have been made in response to comments
on earlier working drafts.</p><p>The treatment of topics handled both in this specification and in
<a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a> has been revised to align
the two specifications more closely.</p><p>Several references to other specifications have been updated to
refer to current versions of those specifications, including
<a href="#XML" shape="rect">[XML]</a>, <a href="#XMLNS" shape="rect">[Namespaces in XML]</a>,
<a href="#RFC3986" shape="rect">[RFC 3986]</a>, 
<a href="#RFC3987" shape="rect">[RFC 3987]</a>, and
<a href="#RFC3548" shape="rect">[RFC 3548]</a>.
</p><p>Requirements for the datatype-validity of values of type <a href="#language" shape="rect">language</a> have been clarified.</p><p>Explicit definitions have been provided for the lexical and
<a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mappings<span class="arrow">&#183;</span></a> of most of the primitive datatypes.
</p><p>Schema Component Constraint
      <a href="#enumeration-required-notation" shape="rect">enumeration facet value required for NOTATION (&#167;3.3.19)</a>,
      which restricts the use of <a href="#NOTATION" shape="rect">NOTATION</a> 
      to validate <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> without first enumerating a
      set of values, has been clarified.
     </p><p>Some errors in the definition of regular-expression metacharacters
have been corrected.</p><p>The descriptions of the <a href="#f-p" class="compref" shape="rect">pattern</a>
and <a href="#f-e" class="compref" shape="rect">enumeration</a> facets have been revised to make clearer how
values from different derivation steps are combined.</p><p>A warning against using the whitespace facet for tokenizing
natural-language data has been added on the request of the W3C
Internationalization Working Group.</p><p>In order to correct an error in 
version 1 of this specification and of <a href="#structural-schemas" shape="rect">[XSD 1.1 Part 1: Structures]</a>,
<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>unions<span class="arrow">&#183;</span></a> are no longer forbidden to be members of other <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>unions<span class="arrow">&#183;</span></a>.
Descriptions of <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> types have also 
been changed to reflect the fact that <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>unions<span class="arrow">&#183;</span></a> can be derived by
restricting other <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>unions<span class="arrow">&#183;</span></a>. The concepts of <a href="#dt-transitivemembership" class="termref" shape="rect"><span class="arrow">&#183;</span>transitive membership<span class="arrow">&#183;</span></a> 
(the members of all members, recursively) and
<a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic member<span class="arrow">&#183;</span></a> (those datatypes in the transitive
membership which are not <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>unions<span class="arrow">&#183;</span></a>) have been introduced and are used.
</p><p>
The requirements of conformance have been clarified in various
ways.
A distinction is now made between
<a href="#key-impl-def" 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> features, and a list of
such features is provided in <a href="#idef-idep" shape="rect">Implementation-defined and implementation-dependent features (normative) (&#167;H)</a>.
Requirements imposed on host languages which
use or incorporate the datatypes defined by this specification are
defined.</p><p>The definitions of <span class="rfc2119">must</span>, <span class="rfc2119">must not</span>, and
<a href="#dt-error" class="termref" shape="rect"><span class="arrow">&#183;</span>error<span class="arrow">&#183;</span></a> have been changed to specify that processors <span class="rfc2119">must</span> detect and
report errors in schemas and schema documents (although the quality
and level of detail in the error report is not constrained).</p><p>
The lexical mapping of the <a href="#QName" shape="rect">QName</a> datatype,
in particular its dependence on the namespace bindings in
scope at the place where the <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> appears, 
has been clarified.
</p><p>
The characterization of <a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> has been revised to say
more clearly when they are functions and when they are not, and when
(in the <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> datatypes) there are values in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> not
mapped to by any members of the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>.
</p><p>The nature of equality and identity of lists
has been clarified.</p><p>
Enumerations, identity constraints, and value constraints now 

treat both identical values
and equal values as being the same for purposes of validation.
This affects primitive datatypes in which identity and equality
are not the same.  Positive and negative zero, for example,
are not treated as different for purposes of keys, keyrefs,
or uniqueness constraints, and an enumeration which includes
either zero will accept either zero.
</p><p>
The mutual relations of lists and unions have been clarified, in
particular the restrictions on what kinds of datatypes <span class="rfc2119">may</span> appear as
the <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> of a list or among the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of a union.
</p><p>
Unions with no member types (and thus with empty
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>) are now explicitly allowed.
</p><p>
Cycles in the definitions of <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>unions<span class="arrow">&#183;</span></a> and in the
derivation of simple types are now explicitly forbidden.
</p><p>
A number of minor errors and obscurities have been fixed.
</p></div></div><div class="div1">
<h2><a name="normative-glossary" id="normative-glossary" shape="rect"></a>J 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="#dt-cos" shape="rect">Constraint on Schemas</a></dt>
<dd>
<b>Constraint on Schemas</b>
</dd>
<dt><a href="#dt-src" shape="rect">Schema Representation Constraint</a></dt>
<dd>
<b>Schema Representation Constraint</b>
</dd>
<dt><a href="#dt-utc" shape="rect">UTC</a></dt>
<dd><b>Universal
Coordinated Time</b> (<b>UTC</b>)
is an adaptation of TAI which closely approximates UT1 by adding
<a href="#dt-leapsec" class="termref" shape="rect"><span class="arrow">&#183;</span>leap-seconds<span class="arrow">&#183;</span></a> to selected
<a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a> days.</dd>
<dt><a href="#dt-cvc" shape="rect">Validation Rule</a></dt>
<dd>
<b>Validation Rule</b>
</dd>
<dt><a href="#dt-xdmrep" shape="rect">XDM representation</a></dt>
<dd>For 
any value <var>V</var> 
and any datatype
<var>T</var>, the <b>XDM representation of <var>V</var> under 
<var>T</var></b> is 
defined recursively as follows.  Call the XDM representation
<var>X</var>.  Then<div class="constraintlist"><div class="clnumber">1 <span class="p">If <var>T</var> = <a href="#dt-anySimpleType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anySimpleType</code><span class="arrow">&#183;</span></a> or <a href="#dt-anyAtomicType" class="termref" shape="rect"><span class="arrow">&#183;</span><code>xs:anyAtomicType</code><span class="arrow">&#183;</span></a> then <var>X</var> is <var>V</var>,
and the <a href="http://www.w3.org/TR/xpath20/#dt-dynamic-type" shape="rect">dynamic
type</a> of <var>X</var> is <code>xs:untypedAtomic</code>.
</span></div>
<div class="clnumber">2 <span class="p">If <var>T</var> . <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>atomic</i></b>,
then 

let <var>T2</var> be the <a href="#dt-optype" class="termref" shape="rect"><span class="arrow">&#183;</span>nearest built-in datatype<span class="arrow">&#183;</span></a> to <var>T</var>.
If <var>V</var> is a member of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <var>T2</var>, then 
<var>X</var> is <var>V</var> and the
<a href="http://www.w3.org/TR/xpath20/#dt-dynamic-type" shape="rect">dynamic type</a>
of <var>X</var> is <var>T2</var>.
Otherwise (i.e. if <var>V</var> is not a member of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of <var>T2</var>),
<var>X</var> is the <a href="#dt-xdmrep" class="termref" shape="rect"><span class="arrow">&#183;</span>XDM representation<span class="arrow">&#183;</span></a> of <var>V</var> 
under <var>T2</var> . <a href="#std-base_type_definition" class="propref" shape="rect">{base type definition}</a>.
</span></div>
<div class="clnumber">3 <span class="p">If <var>T</var> . <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>list</i></b>,
then <var>X</var> is a sequence of atomic values, each atomic value 
being the <a href="#dt-xdmrep" class="termref" shape="rect"><span class="arrow">&#183;</span>XDM representation<span class="arrow">&#183;</span></a> of the corresponding
item in the list <var>V</var> under <var>T</var> . <a href="#std-item_type_definition" class="propref" shape="rect">{item type definition}</a>.
</span></div>
<div class="clnumber">4 <span class="p">If <var>T</var> . <a href="#std-variety" class="propref" shape="rect">{variety}</a> = <b><i>union</i></b>,
then <var>X</var> is the <a href="#dt-xdmrep" class="termref" shape="rect"><span class="arrow">&#183;</span>XDM representation<span class="arrow">&#183;</span></a> of <var>V</var>
under the <a href="#dt-active-basic-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active basic member<span class="arrow">&#183;</span></a> of <var>V</var>
when validated against <var>T</var>.
If there is no <a href="#dt-active-basic-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active basic member<span class="arrow">&#183;</span></a>,
then <var>V</var> has no <a href="#dt-xdmrep" class="termref" shape="rect"><span class="arrow">&#183;</span>XDM representation<span class="arrow">&#183;</span></a> under <var>T</var>.</span></div>
</div>
</dd>
<dt><a href="#key-null" shape="rect">absent</a></dt>
<dd>Throughout this
specification, the value <b><b><i>absent</i></b></b> is used 
as a distinguished value to indicate that a given instance of a property
"has no value" or "is absent".</dd>
<dt><a href="#dt-active-basic-member" shape="rect">active basic member</a></dt>
<dd>If the <a href="#dt-active-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active member type<span class="arrow">&#183;</span></a> is
itself a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, one of <em>its</em> members will be
<em>its</em> <a href="#dt-active-member" class="termref" shape="rect"><span class="arrow">&#183;</span>active member type<span class="arrow">&#183;</span></a>, and so on, until
finally a <a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic (non-union)
member<span class="arrow">&#183;</span></a> is reached. That <a href="#dt-basicmember" class="termref" shape="rect"><span class="arrow">&#183;</span>basic member<span class="arrow">&#183;</span></a> is
the <b>active basic member</b> of the union.</dd>
<dt><a href="#dt-active-member" shape="rect">active member type</a></dt>
<dd>In a valid
instance of any <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, the first of its members in order which
accepts the instance as valid is the <b>active member
type</b>.</dd>
<dt><a href="#std-ancestor" shape="rect">ancestor</a></dt>
<dd>The
<b>ancestors</b> of a 
<a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html#td" shape="rect">type definition</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="#dt-anyAtomicType" shape="rect">anyAtomicType</a></dt>
<dd>

<b>anyAtomicType</b>
is a special <a href="#dt-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of <a href="#anySimpleType" shape="rect">anySimpleType</a>.
The <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value<span class="arrow">&#183;</span></a>
and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a> 
of <b>anyAtomicType</b> are the unions of the 
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value<span class="arrow">&#183;</span></a>
and <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a>
of all the <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes, and
<b>anyAtomicType</b> is their <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.
</dd>
<dt><a href="#dt-anySimpleType" shape="rect">anySimpleType</a></dt>
<dd>

The definition of <b>anySimpleType</b> is a special
<a href="#dt-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restriction<span class="arrow">&#183;</span></a> of <b><i>anyType</i></b>.&#160;
The
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of <b>anySimpleType</b>
is the set of all sequences of Unicode
characters, 
and its <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> includes all <a href="#dt-atomic-value" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic values<span class="arrow">&#183;</span></a>
and all finite-length lists of 
zero or more
<a href="#dt-atomic-value" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic values<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#dt-atomic" shape="rect">atomic</a></dt>
<dd><b>Atomic</b> datatypes
are those whose
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a> contain only <a href="#dt-atomic-value" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic values<span class="arrow">&#183;</span></a>.&#160; 
<b>Atomic</b> datatypes are  <a href="#anyAtomicType" shape="rect">anyAtomicType</a> and all 
datatypes 
<a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derived<span class="arrow">&#183;</span></a> from it.</dd>
<dt><a href="#dt-atomic-value" shape="rect">atomic value</a></dt>
<dd>An
<b>atomic value</b> is an elementary value, not
constructed from simpler values by any user-accessible
means defined by this specification.</dd>
<dt><a href="#dt-basetype" shape="rect">base type</a></dt>
<dd>Every datatype
other than <a href="#anySimpleType" shape="rect">anySimpleType</a>
is associated with another datatype, its <b>base type</b>. 
<b>Base types</b> can be <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a>, 
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>, or 
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a>.
</dd>
<dt><a href="#dt-basicmember" shape="rect">basic member</a></dt>
<dd>Those members of the <a href="#dt-transitivemembership" class="termref" shape="rect"><span class="arrow">&#183;</span>transitive membership<span class="arrow">&#183;</span></a>
of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype <var>U</var> which are themselves not <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
datatypes
are the <b>basic members</b> of <var>U</var>.</dd>
<dt><a href="#dt-built-in" shape="rect">built-in</a></dt>
<dd><b>Built-in</b>
datatypes are those which are defined in this 
specification; they can 
be  
<a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a>,
<a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a>, or
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatypes
.
</dd>
<dt><a href="#dt-canonical-mapping" shape="rect">canonical mapping</a></dt>
<dd>The 
<b>canonical mapping</b> is a prescribed subset of the inverse of a
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> which is 
one-to-one and whose domain (where possible) is the entire range of the
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a> (the
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>).</dd>
<dt><a href="#dt-canonical-representation" shape="rect">canonical representation</a></dt>
<dd>The <b>canonical
representation</b> of a value in the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of a datatype is
the <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> associated with that value by the
datatype's <a href="#dt-canonical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>canonical mapping<span class="arrow">&#183;</span></a></dd>
<dt><a href="#dt-ccsub" shape="rect">character class subtraction</a></dt>
<dd>A
<a href="#dt-chargroup" class="termref" shape="rect"><span class="arrow">&#183;</span>character group<span class="arrow">&#183;</span></a> that contains a subtraction operator
is referred to as a <b>character class subtraction</b>.</dd>
<dt><a href="#dt-cgpart" shape="rect">character group part</a></dt>
<dd>A
<b>character group part</b> (<a href="#nt-charGroupPart" shape="rect"><i>charGroupPart</i></a>) is 
any
of: 
a single unescaped character
(<a href="#nt-SingleCharNoEsc" shape="rect"><i>SingleCharNoEsc</i></a>),
a single escaped character
(<a href="#nt-SingleCharEsc" shape="rect"><i>SingleCharEsc</i></a>), 
a character class escape
(<a href="#nt-charClassEsc" shape="rect"><i>charClassEsc</i></a>),
or a character range
(<a href="#nt-charRange" shape="rect"><i>charRange</i></a>).</dd>
<dt><a href="#dt-constraining-facet" shape="rect">constraining facet</a></dt>
<dd><b>Constraining facets</b>
are schema components whose values may be set or changed
during <a href="#dt-derived" class="termref" shape="rect"><span class="arrow">&#183;</span>derivation<span class="arrow">&#183;</span></a> (subject to facet-specific controls) 
to control various aspects of the derived datatype.</dd>
<dt><a href="#dt-constructed" shape="rect">constructed</a></dt>
<dd>All
<a href="#dt-ordinary" class="termref" shape="rect"><span class="arrow">&#183;</span>ordinary<span class="arrow">&#183;</span></a> datatypes are defined in terms of, or
<b>constructed</b> from, other datatypes, either by 
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>restricting<span class="arrow">&#183;</span></a> the 
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> or <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> 
of a <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> using zero or more
<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a>
or by specifying the new datatype as a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> of items of some
<a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a>,
or by defining it as a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> of some specified 
sequence of <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#dt-datatype" shape="rect">datatype</a></dt>
<dd>In
this specification, a <b>datatype</b> has
three properties:

<ul><li><div class="p">A <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, which is a set of
values. </div></li><li><div class="p">A <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a>, which is a set of
<a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literals<span class="arrow">&#183;</span></a> used to denote the values.</div></li><li><div class="p">A small collection of <em>functions, relations, and
procedures</em> associated with the datatype.&#160; Included are
equality and (for some datatypes)
order relations on the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, and a
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mapping<span class="arrow">&#183;</span></a>, which is a mapping from the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> 
into 
the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.</div></li></ul>
</dd>
<dt><a href="#dt-immediately-derived" shape="rect">derived</a></dt>
<dd>A datatype 
<var>T</var> is <b>immediately derived</b> from another datatype 
<var>X</var> if and only if <var>X</var> is the 
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> of <var>T</var>.</dd>
<dt><a href="#dt-derived" shape="rect">derived</a></dt>
<dd>A datatype <var>R</var> 
is <b>derived</b> from another 
datatype <var>B</var> if and only if one of the following is true:
 <ul><li><div class="p"><var>B</var> is the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> 
of <var>R</var>.
</div></li><li><div class="p">There is some datatype <var>X</var>
such that <var>X</var> is the <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a> 
of <var>R</var>, and <var>X</var> is derived from
<var>B</var>.</div></li></ul>
</dd>
<dt><a href="#dt-div" shape="rect">div</a></dt>
<dd>If <var>m</var> and <var>n</var> are numbers, then
<var>m</var>&#160;<b>div</b> <var>n</var> is the greatest integer 
less than or equal to
<var>m</var>&#160;/&#160;<var>n</var>&#160;.</dd>
<dt><a href="#dt-error" shape="rect">error</a></dt>
<dd><b>error</b></dd>
<dt><a href="#dt-fb-restriction" shape="rect">facet-based restriction</a></dt>
<dd>A 
datatype is defined by <b>facet-based restriction</b> of another datatype
(its <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>),
when values for zero or more <a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facets<span class="arrow">&#183;</span></a> are specified
that serve to constrain its <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> and/or its
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> to a subset of those of the
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#dt-compatibility" shape="rect">for compatibility</a></dt>
<dd>for compatibility</dd>
<dt><a href="#dt-fundamental-facet" shape="rect">fundamental facet</a></dt>
<dd>
Each <b>fundamental facet</b> is a
schema component that provides a limited piece of information about
some aspect of each datatype.</dd>
<dt><a href="#key-impl-def" shape="rect">implementation-defined</a></dt>
<dd>Something
which <span class="rfc2119">may</span> vary among conforming implementations, but which <span class="rfc2119">must</span>
be specified by the implementor for each particular implementation,
is <b>implementation-defined</b>.</dd>
<dt><a href="#key-impl-dep" shape="rect">implementation-dependent</a></dt>
<dd>Something
which <span class="rfc2119">may</span> vary among conforming implementations, is not specified by
this or any W3C specification, and is not required to be specified
by the implementor for any particular implementation,
is <b>implementation-dependent</b>.</dd>
<dt><a href="#dt-incomparable" shape="rect">incomparable</a></dt>
<dd>Two
values that are neither equal, less-than, nor greater-than are
<b>incomparable</b>. Two values
that are not <a href="#dt-incomparable" class="termref" shape="rect"><span class="arrow">&#183;</span>incomparable<span class="arrow">&#183;</span></a> are
<b>comparable</b>.</dd>
<dt><a href="#dt-interveningunion" shape="rect">intervening union</a></dt>
<dd>If a datatype <var>M</var> is in the
<a href="#dt-transitivemembership" class="termref" shape="rect"><span class="arrow">&#183;</span>transitive membership<span class="arrow">&#183;</span></a> of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
datatype <var>U</var>, but not one of <var>U</var>'s <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a>,
then a sequence of one or more <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatypes necessarily exists,
such that the first is one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of <var>U</var>, each
is one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of its predecessor in the sequence, and
<var>M</var> is one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of the last in the sequence.
The <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatypes in this sequence are said to
<b>intervene</b> between <var>M</var> and <var>U</var>. When
<var>U</var> and <var>M</var> are given by the context, the datatypes
in the sequence are referred to as the <b>intervening unions</b>.
When <var>M</var> is one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of <var>U</var>,
the set of <b>intervening unions</b> is the empty set.
</dd>
<dt><a href="#dt-itemType" shape="rect">item type</a></dt>
<dd>
The <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> or <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>
datatype that participates in the definition of a <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype
is the 
<b>item type</b> 
of that <a href="#dt-list" class="termref" shape="rect"><span class="arrow">&#183;</span>list<span class="arrow">&#183;</span></a> datatype.</dd>
<dt><a href="#dt-leapsec" shape="rect">leap-second</a></dt>
<dd>A
<b>leap-second</b> is an additional second added
to the last day of December, June, October, or March,
when such an adjustment is deemed necessary by the 
International Earth Rotation and Reference Systems Service
in order to keep <a href="#dt-utc" class="termref" shape="rect"><span class="arrow">&#183;</span>UTC<span class="arrow">&#183;</span></a> within 0.9 seconds
of observed astronomical time.&#160; When leap seconds are
introduced, the last minute in the day has more than
sixty seconds.&#160;
In theory leap seconds can also be removed from a
day, but this has not yet occurred.
(See
<a href="#IERS" shape="rect">[International Earth Rotation Service (IERS)]</a>,
<a href="#itu-r-460-6" shape="rect">[ITU-R TF.460-6]</a>.)
Leap seconds are
<em>not</em> supported by the types defined 
here.</dd>
<dt><a href="#dt-lexical" shape="rect">lexical</a></dt>
<dd>A constraining facet which
directly restricts the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of a datatype 
is a <b>lexical</b> facet.</dd>
<dt><a href="#dt-lexical-mapping" shape="rect">lexical mapping</a></dt>
<dd>The
<b>lexical mapping</b> for a datatype is a prescribed 
relation
which maps from the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of the datatype
into its <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#dt-lexical-representation" shape="rect">lexical representation</a></dt>
<dd>The members of the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> are
<b>lexical representations</b> of the values to which they are
mapped.</dd>
<dt><a href="#dt-lexical-space" shape="rect">lexical space</a></dt>
<dd>The
<b>lexical space</b> of a datatype is 
the prescribed set of strings
which
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>the lexical
mapping<span class="arrow">&#183;</span></a> for that datatype
maps to values of that datatype.</dd>
<dt><a href="#dt-list" shape="rect">list</a></dt>
<dd><b>List</b> datatypes are
those having values each of which consists of a finite-length
(possibly empty) sequence of <a href="#dt-atomic-value" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic values<span class="arrow">&#183;</span></a>.  The values in a list are
drawn from some
<a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatype (or from
a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> of <a href="#dt-atomic" class="termref" shape="rect"><span class="arrow">&#183;</span>atomic<span class="arrow">&#183;</span></a> datatypes), which is
the <a href="#dt-itemType" class="termref" shape="rect"><span class="arrow">&#183;</span>item type<span class="arrow">&#183;</span></a> of the <b>list</b>.  </dd>
<dt><a href="#dt-literal" shape="rect">literal</a></dt>
<dd>A sequence of zero or more
characters in the Universal Character Set (UCS) which may or may not
prove upon inspection to be a member of the <a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> of a given
datatype and thus a <a href="#dt-lexical-representation" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical representation<span class="arrow">&#183;</span></a> of a given value in that datatype's
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, is referred to as a <b>literal</b>.</dd>
<dt><a href="#dt-match" shape="rect">match</a></dt>
<dd><b>match</b></dd>
<dt><a href="#dt-may" shape="rect">may</a></dt>
<dd><span class="rfc2119">may</span></dd>
<dt><a href="#dt-memberTypes" shape="rect">member types</a></dt>
<dd>
The datatypes that participate in the
definition of a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype are known as the
<b>member types</b> 
of that <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> datatype.</dd>
<dt><a href="#dt-minimally-conforming" shape="rect">minimally conforming</a></dt>
<dd>Implementations claiming <b>minimal conformance</b> to this specification
independent of any host language <span class="rfc2119">must</span> do 
<b>all</b> of the following:<div class="constraintlist"><div class="clnumber">1<a id="gl-support-all-primitives" name="gl-support-all-primitives" shape="rect"> </a><span class="p">Support all the <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatypes defined in this specification.</span></div>
<div class="clnumber">2<a id="gl-implement-all-cos" name="gl-implement-all-cos" shape="rect"> </a><span class="p">Completely and correctly implement all of 
the <a href="#dt-cos" class="termref" shape="rect"><span class="arrow">&#183;</span>constraints on schemas<span class="arrow">&#183;</span></a>
defined in this specification.</span></div>
<div class="clnumber">3<a id="gl-implement-all-vr" name="gl-implement-all-vr" shape="rect"> </a><span class="p">Completely and correctly implement all of 
the <a href="#dt-cvc" class="termref" shape="rect"><span class="arrow">&#183;</span>Validation Rules<span class="arrow">&#183;</span></a>
defined in this specification, when checking the
datatype validity of literals against datatypes.</span></div>
</div>
</dd>
<dt><a href="#dt-mod" shape="rect">mod</a></dt>
<dd>If <var>m</var> and <var>n</var> are numbers, then
<var>m</var> <b>mod</b> <var>n</var> is&#160;
<var>m</var>&#160;&#8722;&#160;<var>n</var>&#160;&#215;&#160;(&#160;<var>m</var>&#160;<a href="#dt-div" class="termref" shape="rect"><span class="arrow">&#183;</span>div<span class="arrow">&#183;</span></a>&#160;<var>n</var>)&#160;.</dd>
<dt><a href="#dt-must" shape="rect">must</a></dt>
<dd><span class="rfc2119">must</span></dd>
<dt><a href="#dt-mustnot" shape="rect">must not</a></dt>
<dd><span class="rfc2119">must not</span></dd>
<dt><a href="#dt-optype" shape="rect">nearest built-in datatype</a></dt>
<dd>For
any datatype <var>T</var>, the <b>nearest built-in datatype</b> to
<var>T</var> is the first <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatype encountered in following
the chain of links connecting each datatype to its
<a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.  If <var>T</var> is a <a href="#dt-built-in" class="termref" shape="rect"><span class="arrow">&#183;</span>built-in<span class="arrow">&#183;</span></a> datatype, then the
nearest built-in datatype of <var>T</var> is <var>T</var> itself; otherwise,
it is the nearest built-in datatype of <var>T</var>'s <a href="#dt-basetype" class="termref" shape="rect"><span class="arrow">&#183;</span>base type<span class="arrow">&#183;</span></a>.</dd>
<dt><a href="#dt-normalized-block-name" shape="rect">normalized block name</a></dt>
<dd>
For any Unicode block, the <b>normalized block name</b> of that
block is the string of characters formed by stripping out white space
and underbar characters from the block name as given in <a href="#UnicodeDB" shape="rect">[Unicode Database]</a>, while retaining hyphens and preserving case
distinctions.</dd>
<dt><a href="#dt-optional" shape="rect">optional</a></dt>
<dd>An <b>optional</b>
property is <em>permitted</em> but not <em>required</em> to have 
the distinguished
value <b><i>absent</i></b>.</dd>
<dt><a href="#dt-ordered" shape="rect">ordered</a></dt>
<dd>A
<a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a>, and hence a datatype, is said to be
<b>ordered</b> if some
members of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> are  
drawn from a <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> 
datatype for which 
the table in <a href="#app-fundamental-facets" shape="rect">Fundamental Facets (&#167;F.1)</a> specifies
the value <b><i>total</i></b> or <b><i>partial</i></b> for 
the <em>ordered</em> facet.</dd>
<dt><a href="#dt-ordinary" shape="rect">ordinary</a></dt>
<dd><b>Ordinary</b>
datatypes are all datatypes other than the <a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> 
and <a href="#dt-primitive" class="termref" shape="rect"><span class="arrow">&#183;</span>primitive<span class="arrow">&#183;</span></a> datatypes.</dd>
<dt><a href="#dt-owner" shape="rect">owner</a></dt>
<dd>A
component may be referred to as the <b>owner</b> of its properties, and of the values of
those properties.</dd>
<dt><a href="#dt-pre-lexical" shape="rect">pre-lexical</a></dt>
<dd>A constraining facet which
is used to normalize an initial <a href="#dt-literal" class="termref" shape="rect"><span class="arrow">&#183;</span>literal<span class="arrow">&#183;</span></a> before checking
to see whether the resulting character sequence is a member of a datatype's
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical space<span class="arrow">&#183;</span></a> is a <b>pre-lexical</b> facet.</dd>
<dt><a href="#dt-primitive" shape="rect">primitive</a></dt>
<dd><b>Primitive</b>
datatypes are those 
datatypes that are not
<a href="#dt-special" class="termref" shape="rect"><span class="arrow">&#183;</span>special<span class="arrow">&#183;</span></a> and are
not defined in terms of other datatypes;
they exist <em>ab initio</em>.</dd>
<dt><a href="#dt-regex" shape="rect">regular expression</a></dt>
<dd>A
<b>regular expression</b> is composed from zero or more
<a href="#dt-branch" class="termref" shape="rect"><span class="arrow">&#183;</span>branches<span class="arrow">&#183;</span></a>,
separated by
'<code>|</code>'
characters.</dd>
<dt><a href="#dt-restriction" shape="rect">restriction</a></dt>
<dd>A datatype <var>R</var> 
is a <b>restriction</b> of another 
datatype <var>B</var> when</dd>
<dt><a href="#dt-should" shape="rect">should</a></dt>
<dd><span class="rfc2119">should</span></dd>
<dt><a href="#dt-special" shape="rect">special</a></dt>
<dd>The <b>special</b>
datatypes are <a href="#anySimpleType" shape="rect">anySimpleType</a> and 
<a href="#anyAtomicType" shape="rect">anyAtomicType</a>.</dd>
<dt><a href="#dt-specialvalue" shape="rect">special value</a></dt>
<dd>A 
<b>special value</b> is 
an object
whose only relevant properties for purposes of this specification are that it
is distinct from, and unequal to, any other values (special or otherwise).</dd>
<dt><a href="#dt-transitivemembership" shape="rect">transitive membership</a></dt>
<dd>The <b>transitive membership</b> of
a <a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a> is the set of its own <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a>, and the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a>
of its members, and so on. More formally, if <var>U</var> is a
<a href="#dt-union" class="termref" shape="rect"><span class="arrow">&#183;</span>union<span class="arrow">&#183;</span></a>, then (a) its <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> are in the transitive membership
of <var>U</var>, and (b) for any datatypes <var>T1</var> and
<var>T2</var>, if <var>T1</var> is in the transitive membership of
<var>U</var> and <var>T2</var> is one of the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of
<var>T1</var>, then <var>T2</var> is also in the transitive membership
of <var>U</var>.</dd>
<dt><a href="#dt-union" shape="rect">union</a></dt>
<dd><b>Union</b> datatypes
are (a) those whose <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a>,
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a>, and
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> are the union of the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value spaces<span class="arrow">&#183;</span></a>,
<a href="#dt-lexical-space" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical spaces<span class="arrow">&#183;</span></a>, and
<a href="#dt-lexical-mapping" class="termref" shape="rect"><span class="arrow">&#183;</span>lexical mappings<span class="arrow">&#183;</span></a> of one or more other datatypes, which are the <a href="#dt-memberTypes" class="termref" shape="rect"><span class="arrow">&#183;</span>member types<span class="arrow">&#183;</span></a> of the
union, or (b) those derived by
<a href="#dt-fb-restriction" class="termref" shape="rect"><span class="arrow">&#183;</span>facet-based restriction<span class="arrow">&#183;</span></a> of another union datatype. </dd>
<dt><a href="#dt-unknown-dt" shape="rect">unknown</a></dt>
<dd>A
datatype which is not available for use is said to be
<b>unknown</b>.</dd>
<dt><a href="#dt-unknown-f" shape="rect">unknown</a></dt>
<dd>An

<a href="#dt-constraining-facet" class="termref" shape="rect"><span class="arrow">&#183;</span>constraining facet<span class="arrow">&#183;</span></a> which is not supported by
the processor in use is <b>unknown</b>.</dd>
<dt><a href="#dt-useroption" shape="rect">user option</a></dt>
<dd><b>user option</b></dd>
<dt><a href="#dt-user-defined" shape="rect">user-defined</a></dt>
<dd>
<b>User-defined</b> datatypes are those 
datatypes that are defined by individual schema designers.
</dd>
<dt><a href="#dt-value-space" shape="rect">value space</a></dt>
<dd>The <b>value space</b> <em>of a
datatype</em> is the set of values for that
datatype.</dd>
<dt><a href="#dt-value-based" shape="rect">value-based</a></dt>
<dd>A constraining facet which
directly restricts the <a href="#dt-value-space" class="termref" shape="rect"><span class="arrow">&#183;</span>value space<span class="arrow">&#183;</span></a> of a datatype 
is a <b>value-based</b> facet.</dd>
<dt><a href="#dt-wcchar" shape="rect">wildcard character</a></dt>
<dd>
The <b>wildcard character</b> is a metacharacter which matches
almost any single character:</dd>
</dl></div><div class="div1">
<h2><a name="biblio" id="biblio" shape="rect"></a>K References</h2><div class="div2">
<h3><span class="nav"> <a href="#non-normative-biblio" class="nav" shape="rect"><img alt="next sub-section" src="next.jpg" /></a></span><a name="normative-biblio" id="normative-biblio" shape="rect"></a>K.1 Normative</h3><dl><dt class="label"><a name="ieee754-2008" id="ieee754-2008" shape="rect"></a>IEEE 754-2008</dt><dd>
IEEE.  <em>IEEE Standard for Floating-Point Arithmetic</em>. 29
August 2008. 
<!--* <a href="http://ieeexplore.ieee.org/ISOL/standardstoc.jsp?punumber=4610933" shape="rect">http://ieeexplore.ieee.org/ISOL/standardstoc.jsp?punumber=4610933</a></dd> *-->
<a href="http://ieeexplore.ieee.org/servlet/opac?punumber=4610933" shape="rect">http://ieeexplore.ieee.org/servlet/opac?punumber=4610933</a></dd>
<dt class="label"><a name="XMLNS" id="XMLNS" shape="rect"></a>Namespaces in XML</dt><dd>
World Wide Web Consortium.&#160; <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.3)</a>.
</span></dd><dt class="label"><a name="XMLNS1.0" id="XMLNS1.0" shape="rect"></a>Namespaces in XML 1.0</dt><dd>
      
World Wide Web Consortium.&#160; <em>Namespaces in XML
1.0 (Second Edition)</em>,
ed. Tim Bray et al.
W3C Recommendation 16 August 2006.
Available at:
<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.3)</a>.
</span></dd><dt class="label"><a name="RFC3548" id="RFC3548" shape="rect"></a>RFC 3548</dt><dd>
S. Josefsson, ed. 
<em>RFC 3548: The Base16, Base32, and Base64 Data Encodings</em>.
July 2003.&#160; Available at:
<a href="http://www.ietf.org/rfc/rfc3548.txt" shape="rect">
http://www.ietf.org/rfc/rfc3548.txt</a>

</dd><dt class="label"><a name="UnicodeDB" id="UnicodeDB" shape="rect"></a>Unicode Database</dt><dd>


The Unicode Consortium. <em>Unicode Character Database</em>.
Revision 3.1.0, ed. Mark Davis and Ken Whistler.
2001-02-28.
Available at: 
<a href="http://www.unicode.org/Public/3.1-Update/UnicodeCharacterDatabase-3.1.0.html" shape="rect">
http://www.unicode.org/Public/3.1-Update/UnicodeCharacterDatabase-3.1.0.html</a>.
For later versions, see
<a href="http://www.unicode.org/versions/" shape="rect">http://www.unicode.org/versions/</a>.
The edition cited is the one current at the date of publication of XSD 1.0. 
Implementations <span class="rfc2119">may</span> follow the edition cited and/or
any later edition(s); it is implementation-defined which.

</dd><dt class="label"><a name="XDM" id="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.
Available at:
<a href="http://www.w3.org/TR/xpath-datamodel/" shape="rect">http://www.w3.org/TR/xpath-datamodel/</a>.

</dd><dt class="label"><a name="XML" id="XML" shape="rect"></a>XML</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.3)</a>.
</span></dd><dt class="label"><a name="XML1.0" id="XML1.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, see <a href="#intro-relatedWork" shape="rect">Dependencies on Other Specifications (&#167;1.3)</a>.
</span>
</dd><dt class="label"><a name="XPATH2" id="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.
W3C Recommendation 23 January 2007.
Available at:
<a href="http://www.w3.org/TR/xpath20/" shape="rect">http://www.w3.org/TR/xpath20/</a>.

</dd><dt class="label"><a name="F_O" id="F_O" shape="rect"></a>XQuery 1.0 and XPath 2.0 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
Available at:
<a href="http://www.w3.org/TR/xpath-functions/" shape="rect">http://www.w3.org/TR/xpath-functions/</a>.

</dd><dt class="label"><a name="structural-schemas" id="structural-schemas" shape="rect"></a>XSD 1.1 Part 1: Structures</dt><dd>
World Wide Web Consortium.
<em>W3C XML Schema Definition Language (XSD) 1.1 Part 1:
Structures</em>, ed. Shudi (Sandy) Gao &#39640;&#27530;&#38237;,
C. M. Sperberg-McQueen,
and Henry S. Thompson.
Candidate Recommendation 21 July 2011.
Available at: <a href="http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.html" shape="rect">http://www.w3.org/TR/2011/CR-xmlschema11-1-20110721/structures.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></dl></div><div class="div2">
<h3><span class="nav"><a href="#normative-biblio" class="nav" shape="rect"><img alt="previous sub-section" src="previous.jpg" /></a> </span><a name="non-normative-biblio" id="non-normative-biblio" shape="rect"></a>K.2 Non-normative</h3><dl><dt class="label"><a name="BCP47" id="BCP47" shape="rect"></a>BCP 47</dt><dd>
Internet Engineering Task Force (IETF).  
Best Current Practices 47.
2006. Available at: 
<a href="http://tools.ietf.org/rfc/bcp/bcp47" shape="rect">http://tools.ietf.org/rfc/bcp/bcp47</a>.
Concatenation of
<em>RFC 4646:  Tags for Identifying Languages</em>, 
ed. A. Phillips and M. Davis, September 2006,
<a href="http://www.ietf.org/rfc/bcp/bcp47.txt" shape="rect">http://www.ietf.org/rfc/bcp/bcp47.txt</a>,
and

<em>RFC 4647:  Matching of Language Tags</em>, 
ed. A Phillips and M. Davis, September 2006,
<a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt" shape="rect">http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>.
</dd><dt class="label"><a name="clinger1990" id="clinger1990" shape="rect"></a>Clinger, WD (1990)</dt><dd>
William D Clinger. 
<em>How to Read Floating Point Numbers Accurately.</em>
In <em>Proceedings of Conference on Programming Language Design and
Implementation</em>, pages 92-101.
Available at: <a href="ftp://ftp.ccs.neu.edu/pub/people/will/howtoread.ps" shape="rect">
ftp://ftp.ccs.neu.edu/pub/people/will/howtoread.ps</a>


</dd><dt class="label"><a name="html4" id="html4" shape="rect"></a>HTML 4.01</dt><dd>
World Wide Web Consortium.&#160; <em>HTML 4.01
Specification</em>, ed. Dave Raggett,
Arnaud Le Hors, 
and
Ian Jacobs.
W3C Recommendation 24 December 1999.
Available at:
<a href="http://www.w3.org/TR/html401/" shape="rect">http://www.w3.org/TR/html401/</a>
</dd><dt class="label"><a name="ISO11404" id="ISO11404" shape="rect"></a>ISO 11404</dt><dd>
ISO (International Organization for Standardization).
<em>Language-independent Datatypes.</em>  
ISO/IEC 11404:2007.
See



<a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=39479" shape="rect">http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=39479</a>


</dd><dt class="label"><a name="ISO8601" id="ISO8601" shape="rect"></a>ISO 8601</dt><dd>
ISO (International Organization for Standardization).
<em>Representations of dates and times, 1988-06-15.</em>
</dd><dt class="label"><a name="ISO8601-2000" id="ISO8601-2000" shape="rect"></a>ISO 8601:2000 Second Edition</dt><dd>
ISO (International Organization for Standardization).
<em>Representations of dates and times, second edition, 2000-12-15.</em>
</dd><dt class="label"><a name="itu-r-460-6" id="itu-r-460-6" shape="rect"></a>ITU-R TF.460-6</dt><dd>
International 
Telecommunication Union (ITU).
<em>Recommendation ITU-R TF.460-6: Standard-frequency
and time-signal emissions</em>.  
[Geneva: ITU, February 2002.]</dd><dt class="label"><a name="IERS" id="IERS" shape="rect"></a>International Earth Rotation Service (IERS)</dt><dd>
International  Earth Rotation Service (IERS).
See <a href="http://maia.usno.navy.mil" shape="rect">http://maia.usno.navy.mil</a>
</dd><dt class="label"><a name="LEIRIs" id="LEIRIs" shape="rect"></a>LEIRI</dt><dd>
<em>Legacy extended IRIs for XML resource identification</em>,
ed. Henry S. Thompson, Richard Tobin, and Norman Walsh.
W3C Working Group Note 3 November 2008. 
See <a href="http://www.w3.org/TR/leiri/" shape="rect">http://www.w3.org/TR/leiri/</a></dd><dt class="label"><a name="Perl" id="Perl" shape="rect"></a>Perl</dt><dd>
The Perl Programming Language.&#160; See <a href="http://www.perl.com/pub/language/info/software.html" shape="rect">
http://www.perl.com/pub/language/info/software.html</a>
</dd><dt class="label"><a name="pd-note" id="pd-note" shape="rect"></a>Precision Decimal</dt><dd>
World Wide Web Consortium. 
<em>An XSD datatype for IEEE floating-point decimal</em>,
ed. David Peterson and C. M. Sperberg-McQueen.
W3C Working Group Note 9 June 2011.
Available at
<a href="http://www.w3.org/TR/xsd-precisionDecimal/" shape="rect">http://www.w3.org/TR/xsd-precisionDecimal/</a>
</dd><dt class="label"><a name="RDFSchema" id="RDFSchema" shape="rect"></a>RDF Schema</dt><dd>
World Wide Web Consortium. 
<em>RDF Vocabulary Description Language 1.0: RDF Schema</em>,
ed. Dan Brickley and R. V. Guha.
W3C Recommendation 10 February 2004.
Available at:
<a href="http://www.w3.org/TR/rdf-schema/" shape="rect">http://www.w3.org/TR/rdf-schema/</a>
</dd><dt class="label"><a name="RFC2045" id="RFC2045" shape="rect"></a>RFC 2045</dt><dd>
N. Freed and N. Borenstein. 
<em>RFC 2045: Multipurpose Internet Mail Extensions
(MIME) Part One: Format of Internet Message Bodies</em>. 1996.&#160; Available at:
<a href="http://www.ietf.org/rfc/rfc2045.txt" shape="rect">
http://www.ietf.org/rfc/rfc2045.txt</a>

</dd><dt class="label"><a name="RFC3066" id="RFC3066" shape="rect"></a>RFC 3066</dt><dd>
H. Alvestrand, ed. <em>RFC 3066: Tags for the Identification of Languages</em>
1995. Available at: <a href="http://www.ietf.org/rfc/rfc3066.txt" shape="rect">
http://www.ietf.org/rfc/rfc3066.txt</a>
</dd><dt class="label"><a name="RFC3986" id="RFC3986" shape="rect"></a>RFC 3986</dt><dd>
T. Berners-Lee,
R. Fielding, and L. Masinter,
<em>RFC 3986: Uniform Resource Identifier (URI): Generic 
Syntax</em>. January 2005.&#160; Available at:
<a href="http://www.ietf.org/rfc/rfc3986.txt" shape="rect">
http://www.ietf.org/rfc/rfc3986.txt</a>

</dd><dt class="label"><a name="RFC3987" id="RFC3987" shape="rect"></a>RFC 3987</dt><dd>
M. Duerst and M. Suignard. 
<em>RFC 3987: Internationalized Resource Identifiers (IRIs)
</em>. January 2005.&#160; Available at:
<a href="http://www.ietf.org/rfc/rfc3987.txt" shape="rect">
http://www.ietf.org/rfc/rfc3987.txt</a>

</dd><dt class="label"><a name="RFC4646" id="RFC4646" shape="rect"></a>RFC 4646</dt><dd>
A. Phillips and M. Davis, ed. 
<em>RFC 4646: Tags for Identifying Languages</em>
2006. Available at: <a href="http://www.ietf.org/rfc/rfc4646.txt" shape="rect">
http://www.ietf.org/rfc/rfc4646.txt</a>
</dd><dt class="label"><a name="RFC4647" id="RFC4647" shape="rect"></a>RFC 4647</dt><dd>
A. Phillips and M. Davis, ed. 
<em>RFC 4647: Matching of Language Tags</em>
2006. Available at: <a href="http://www.ietf.org/rfc/rfc4647.txt" shape="rect">
http://www.ietf.org/rfc/rfc4647.txt</a>
</dd><dt class="label"><a name="ruby" id="ruby" shape="rect"></a>Ruby</dt><dd>
World Wide Web Consortium. 
<em>Ruby Annotation</em>,
ed. Marcin Sawicki et al.
 W3C Recommendation 31 May 2001 
(Markup errors corrected 25 June 2008).
Available at:

<a href="http://www.w3.org/TR/ruby/" shape="rect">http://www.w3.org/TR/ruby/</a>
</dd><dt class="label"><a name="SQL" id="SQL" shape="rect"></a>SQL</dt><dd>
ISO (International Organization for Standardization).&#160; <em>ISO/IEC
9075-2:1999, Information technology --- Database languages ---
SQL --- Part 2: Foundation (SQL/Foundation)</em>.
[Geneva]: International Organization for Standardization, 1999.
See <a href="http://www.iso.org/iso/home.htm" shape="rect">
http://www.iso.org/iso/home.htm</a>

</dd><dt class="label"><a name="ref-timezones" id="ref-timezones" shape="rect"></a>Timezones</dt><dd>

World Wide Web Consortium.
<em>Working with Time Zones</em>,
ed. Addison Phillips et al.
W3C Working Group Note 13 October 2005.
Available at <a href="http://www.w3.org/TR/timezone/" shape="rect">http://www.w3.org/TR/timezone/</a> 
</dd><dt class="label"><a name="USNavy" id="USNavy" shape="rect"></a>U.S. Naval Observatory Time Service Department</dt><dd>
<em>Information about Leap Seconds</em>
Available at:

<a href="http://tycho.usno.navy.mil/leapsec.html" shape="rect">http://tycho.usno.navy.mil/leapsec.html</a>

</dd><dt class="label"><a name="USNavy_leaps" id="USNavy_leaps" shape="rect"></a>USNO Historical List</dt><dd>
U.S. Naval Observatory Time Service Department,
<em>Historical list of leap seconds</em>
Available at:
<a href="ftp://maia.usno.navy.mil/ser7/tai-utc.dat" shape="rect">ftp://maia.usno.navy.mil/ser7/tai-utc.dat</a>
</dd><dt class="label"><a name="unicodeRegEx" id="unicodeRegEx" shape="rect"></a>Unicode Regular Expression Guidelines</dt><dd>
Mark Davis.&#160; <em>Unicode Regular Expression Guidelines</em>, 1988.
Available at: <a href="http://www.unicode.org/unicode/reports/tr18/" shape="rect">
http://www.unicode.org/unicode/reports/tr18/</a>
</dd><dt class="label"><a name="unicode-escapes" id="unicode-escapes" shape="rect"></a>Unicode block names</dt><dd>
World Wide Web Consortium.
<em>Unicode block names for use in XSD regular expressions</em>, 
ed. C. M. Sperberg-McQueen.
W3C Working Group Note to-be-published-rsn.
Available at: 
<a href="http://www.w3.org/TR/xsd-unicode-blocknames/" shape="rect">http://www.w3.org/TR/xsd-unicode-blocknames/</a>
</dd><dt class="label"><a name="schema-primer" id="schema-primer" shape="rect"></a>XML Schema Language: Part 0 Primer</dt><dd>
World Wide Web Consortium. 
XML Schema Language: Part 0 Primer 
Second Edition,
ed. David C. Fallside and Priscilla Walmsley. 
W3C Recommendation 28 October 2004.
Available at:
<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="schema-requirements" id="schema-requirements" shape="rect"></a>XML Schema Requirements</dt><dd>
<em>XML Schema Requirements </em>, 
ed.
Ashok Malhotra and Murray Maloney.
W3C
Note 15 February 1999. 
Available at:
<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="XSL" id="XSL" shape="rect"></a>XSL</dt><dd>
World Wide Web Consortium.&#160;
<em>Extensible Stylesheet Language (XSL)</em>,
ed. Anders Berglund.
W3C Recommendation 05 December 2006.
Available at:&#160; 
<a href="http://www.w3.org/TR/xsl11/" shape="rect">http://www.w3.org/TR/xsl11/</a>
</dd></dl></div></div><div class="div1">
<h2><a name="acknowledgments" id="acknowledgments" shape="rect"></a>L Acknowledgements (non-normative)</h2><p>Along with the
editors thereof, the following 
contributed material to the first 
version 
of this specification:</p><blockquote><p>Asir S. Vedamuthu, webMethods, Inc<br clear="none" />Mark Davis, IBM</p></blockquote><p>Co-editor Ashok Malhotra's work on this specification from March 1999 until
February 2001 was supported by IBM, and from then
until May 2004 by Microsoft.&#160; Since July 2004 his work
on this specification has been supported by Oracle Corporation.</p><p>The work of Dave Peterson
as a co-editor of this specification was supported by IDEAlliance
(formerly GCA) through March 2004, and beginning in 
April 2004 by SGML<em>Works!</em>.</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>The XML Schema Working Group acknowledges with 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>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>Murata Makoto, Xerox</li><li>Ravi Murthy, Oracle</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>