index.html 204 KB
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
<?xml version="1.0" encoding="utf-8"?>
<!--{xml-fix} XSLT Processor: SAXON 9.3.0.5 from Saxonica SAXON EE 9.3.0.5--><!--This document was created at 20111214 1313-->
<!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 name="generator" content=
"HTML Tidy for Windows (vers 14 February 2006), see www.w3.org" />
<title>XSLT and XQuery Serialization 3.0</title>

<style type="text/css">
/*<![CDATA[*/
code           { font-family: monospace; }

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

div.issue
p.title        { 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; }

li p           { margin-top: 0.3em;
                 margin-bottom: 0.3em; }

sup small      { font-style: italic;
                 color: #8F8F8F;
               }
    
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.issue { border-bottom-color: black;
            border-bottom-style: solid;
            border-bottom-width: 1pt;
            margin-bottom: 20pt;
}

th.issue-toc-head { border-bottom-color: black;
                    border-bottom-style: solid;
                    border-bottom-width: 1pt;
}

      
dd.indent { margin-left: 2em; }
p.element-syntax { border: solid thin; background-color: #ffccff }
div.proto { border: solid thin; background-color: #ffccff }
div.example { border: solid thin; background-color: blue; padding: 1em }
span.verb { font: small-caps 100% sans-serif }
span.error { font-size: small }

table.small                             { font-size: x-small; }
a.judgment:visited, a.judgment:link     { font-family: sans-serif;
                                          color: black; 
                                          text-decoration: none }
a.processing:visited, a.processing:link { color: black; 
                                                text-decoration: none }
a.env:visited, a.env:link               { color: black; 
                                          text-decoration: none }
/*]]>*/
</style>
<link rel="stylesheet" type="text/css" href=
"http://www.w3.org/StyleSheets/TR/W3C-WD.css" />
</head>
<body>
<div class="head">
<p><a href="http://www.w3.org/"><img src=
"http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width=
"72" /></a></p>
<h1><a name="title" id="title"></a>XSLT and XQuery Serialization
3.0</h1>
<h2><a name="w3c-doctype" id="w3c-doctype"></a>W3C Working Draft 13
December 2011</h2>
<dl>
<dt>This version:</dt>
<dd><a href=
"http://www.w3.org/TR/2011/WD-xslt-xquery-serialization-30-20111213/">
http://www.w3.org/TR/2011/WD-xslt-xquery-serialization-30-20111213/</a></dd>
<dt>Latest version:</dt>
<dd><a href=
"http://www.w3.org/TR/xslt-xquery-serialization-30/">http://www.w3.org/TR/xslt-xquery-serialization-30/</a></dd>
<dt>Previous versions:</dt>
<dd><a href=
"http://www.w3.org/TR/2011/WD-xslt-xquery-serialization-30-20110614/">
http://www.w3.org/TR/2011/WD-xslt-xquery-serialization-30-20110614/
,</a> <a href=
"http://www.w3.org/TR/2010/WD-xslt-xquery-serialization-30-20101214/">
http://www.w3.org/TR/2010/WD-xslt-xquery-serialization-30-20101214/
,</a> <a href=
"http://www.w3.org/TR/2009/WD-xslt-xquery-serialization-11-20091215/">
http://www.w3.org/TR/2009/WD-xslt-xquery-serialization-11-20091215/</a></dd>
<dt>Editor:</dt>
<dd>Henry Zongaro, IBM Canada Lab - Toronto Site <a href=
"http://www.ibm.com/software/ca/en/canadalabs/toronto_lab.html">&lt;http://www.ibm.com/software/ca/en/canadalabs/toronto_lab.html&gt;</a></dd>
</dl>
<p>See also <a href=
"http://www.w3.org/2003/03/Translations/byTechnology?technology=xslt-xquery-serialization-30">
<strong>translations</strong></a>.</p>
<p>This document is also available in these non-normative formats:
<a href=
"http://www.w3.org/TR/2011/WD-xslt-xquery-serialization-30-20111213/xslt-xquery-serialization-30.xml">
XML</a> and&#160;<a href=
"http://www.w3.org/TR/2011/WD-xslt-xquery-serialization-30-20111213/xslt-xquery-serialization-30-diff.html">Change
markings relative to previous Working Draft</a>.</p>
<p class="copyright"><a href=
"http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>&#160;©&#160;2011&#160;<a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup>
(<a href="http://www.csail.mit.edu/"><acronym title=
"Massachusetts Institute of Technology">MIT</acronym></a>, <a href=
"http://www.ercim.eu/"><acronym title=
"European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved.
W3C <a href=
"http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a href=
"http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
and <a href=
"http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> rules apply.</p>
</div>
<hr />
<div>
<h2><a name="abstract" id="abstract"></a>Abstract</h2>
<p>This document defines serialization of an instance of the data
model as defined in <a href="#xpath-datamodel-30">[XQuery and XPath
Data Model (XDM) 3.0]</a> into a sequence of octets. Serialization
is designed to be a component that can be used by other
specifications such as <a href="#xslt-30">[XSL Transformations
(XSLT) Version 3.0]</a> or <a href="#xquery-30">[XQuery 3.0: An XML
Query Language]</a>.</p>
</div>
<div>
<h2><a name="status" id="status"></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/">W3C technical reports index</a> at
http://www.w3.org/TR/.</em></p>
<p>This is one document in a set of seven documents that are being
progressed to Recommendation together (XQuery 3.0, XQueryX 3.0,
XSLT 3.0, Data Model 3.0, Functions and Operators 3.0,
Serialization 3.0, XPath 3.0).</p>
<p>This is a <a href=
"http://www.w3.org/2005/10/Process-20051014/tr.html#last-call">Last
Call Working Draft</a> as described in the <a href=
"http://www.w3.org/2005/10/Process-20051014/tr.html">Process
Document</a>. It was jointly developed by the W3C <a href=
"http://www.w3.org/Style/XSL/">XSL Working Group</a> and the W3C
<a href="http://www.w3.org/XML/Query/">XML Query Working Group</a>,
each of which is part of the <a href=
"http://www.w3.org/XML/Activity">XML Activity</a>. Comments on this
document will be formally accepted at least through 10 February
2012. The Working Groups expect to advance this specification to
<a href=
"http://www.w3.org/2005/10/Process-20051014/tr.html#RecsW3C">Recommendation</a>
Status.</p>
<p>This Last Call Working Draft makes a number of substantive
technical changes (as well as many editorial changes), including
new features, adopted since the previous Working Draft was
published. Please note that this Working Draft of XSLT and XQuery
Serialization 3.0 represents the second version of <a href=
"http://www.w3.org/TR/2010/REC-xslt-xquery-serialization-20101214/">
a previous W3C Recommendation</a>.</p>
<p>Reviewers should note that this document does not currently
contain any specification of serialization into HTML5 or the
corresponding XHTML; those document sections are still under
construction and will be added to a revised Last Call WD as soon as
they are available.</p>
<p>This specification is designed to be referenced normatively from
other specifications defining a host language for it; it is not
intended to be implemented outside a host language. The
implementability of this specification has been tested in the
context of its normative inclusion in host languages defined by the
<a href="http://www.w3.org/TR/xquery-30/">XQuery 3.0</a> and XSLT
3.0 (expected in 2012) specifications; see the <a href=
"http://dev.w3.org/2011/xquery-30-test-suite/results/XQTSReport.html">
XQuery 3.0 implementation report</a> (and, in the future, the WGs
expect that there will also be a member-only XSLT 3.0
implementation report) for details.</p>
<p>This document incorporates changes made against the previous
publication of the Working Draft. Changes to this document since
the previous publication of the Working Draft are detailed in
<a href="#revision-log"><b>F Change Log</b></a>.</p>
<p>Please report errors in this document using W3C's <a href=
"http://www.w3.org/Bugs/Public/">public Bugzilla system</a>
(instructions can be found at <a href=
"http://www.w3.org/XML/2005/04/qt-bugzilla">http://www.w3.org/XML/2005/04/qt-bugzilla</a>).
If access to that system is not feasible, you may send your
comments to the W3C XSLT/XPath/XQuery public comments mailing list,
<a href=
"mailto:public-qt-comments@w3.org">public-qt-comments@w3.org</a>.
It will be very helpful if you include the string “[SER30]” in the
subject line of your report, whether made in Bugzilla or in email.
Please use multiple Bugzilla entries (or, if necessary, multiple
email messages) if you have more than one comment to make. Archives
of the comments and responses are available at <a href=
"http://lists.w3.org/Archives/Public/public-qt-comments/">http://lists.w3.org/Archives/Public/public-qt-comments/</a>.</p>
<p>Publication as a Working Draft 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>
<p>This document was produced by groups operating under the
<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
February 2004 W3C Patent Policy</a>. W3C maintains a <a href=
"http://www.w3.org/2004/01/pp-impl/18797/status#disclosures">public
list of any patent disclosures</a> made in connection with the
deliverables of the XML Query Working Group and also maintains a
<a href=
"http://www.w3.org/2004/01/pp-impl/19552/status#disclosures">public
list of any patent disclosures</a> made in connection with the
deliverables of the XSL Working Group; those pages also include
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">
Essential Claim(s)</a> must disclose the information in accordance
with <a href=
"http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
section 6 of the W3C Patent Policy</a>.</p>
</div>
<div class="toc">
<h2><a name="contents" id="contents"></a>Table of Contents</h2>
<p class="toc">1 <a href="#intro">Introduction</a><br />
&#160;&#160;&#160;&#160;1.1 <a href=
"#terminology">Terminology</a><br />
2 <a href="#serdm">Sequence Normalization</a><br />
3 <a href="#serparam">Serialization Parameters</a><br />
&#160;&#160;&#160;&#160;3.1 <a href=
"#serparams-in-xdm-instance">Setting Serialization Parameters by
Means of a Data Model Instance</a><br />
4 <a href="#serphases">Phases of Serialization</a><br />
5 <a href="#xml-output">XML Output Method</a><br />
&#160;&#160;&#160;&#160;5.1 <a href="#XML_PARAMS">The Influence of
Serialization Parameters upon the XML Output Method</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.1 <a href=
"#XML_VERSION">XML Output Method: the version Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.2 <a href=
"#XML_ENCODING">XML Output Method: the encoding Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.3 <a href=
"#xml-indent">XML Output Method: the indent and
suppress-indentation Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.4 <a href=
"#XML_CDATA-SECTION-ELEMENTS">XML Output Method: the
cdata-section-elements Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.5 <a href=
"#XML_OMIT-XML-DECLARATION">XML Output Method: the
omit-xml-declaration and standalone Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.6 <a href=
"#XML_DOCTYPE">XML Output Method: the doctype-system and
doctype-public Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.7 <a href=
"#xml-undeclare-NS">XML Output Method: the undeclare-prefixes
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.8 <a href=
"#XML_NORMALIZATION-FORM">XML Output Method: the normalization-form
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.9 <a href=
"#XML_MEDIA-TYPE">XML Output Method: the media-type
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.10 <a href=
"#XML_USE-CHARACTER-MAPS">XML Output Method: the use-character-maps
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.11 <a href=
"#XML_BYTE-ORDER-MARK">XML Output Method: the byte-order-mark
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.12 <a href=
"#XML_ESCAPE-URI-ATTRIBUTES">XML Output Method: the
escape-uri-attributes Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.1.13 <a href=
"#XML_INCLUDE-CONTENT-TYPE">XML Output Method: the
include-content-type Parameter</a><br />
6 <a href="#xhtml-output">XHTML Output Method</a><br />
&#160;&#160;&#160;&#160;6.1 <a href="#XHTML_PARAMS">The Influence
of Serialization Parameters upon the XHTML Output Method</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.1 <a href=
"#XHTML_VERSION">XHTML Output Method: the version
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.2 <a href=
"#XHTML_ENCODING">XHTML Output Method: the encoding
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.3 <a href=
"#XHTML_INDENT">XHTML Output Method: the indent and
suppress-indentation Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.4 <a href=
"#XHTML_CDATA-SECTION-ELEMENTS">XHTML Output Method: the
cdata-section-elements Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.5 <a href=
"#XHTML_OMIT-XML-DECLARATION">XHTML Output Method: the
omit-xml-declaration and standalone Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.6 <a href=
"#XHTML_DOCTYPE">XHTML Output Method: the doctype-system and
doctype-public Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.7 <a href=
"#XHTML_UNDECLARE-PREFIXES">XHTML Output Method: the
undeclare-prefixes Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.8 <a href=
"#XHTML_NORMALIZATION-FORM">XHTML Output Method: the
normalization-form Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.9 <a href=
"#XHTML_MEDIA-TYPE">XHTML Output Method: the media-type
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.10 <a href=
"#XHTML_USE-CHARACTER-MAPS">XHTML Output Method: the
use-character-maps Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.11 <a href=
"#XHTML_BYTE-ORDER-MARK">XHTML Output Method: the byte-order-mark
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.12 <a href=
"#XHTML_ESCAPE-URI-ATTRIBUTES">XHTML Output Method: the
escape-uri-attributes Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;6.1.13 <a href=
"#XHTML_INCLUDE-CONTENT-TYPE">XHTML Output Method: the
include-content-type Parameter</a><br />
7 <a href="#html-output">HTML Output Method</a><br />
&#160;&#160;&#160;&#160;7.1 <a href="#HTML_MARKUP">Markup for
Elements</a><br />
&#160;&#160;&#160;&#160;7.2 <a href="#HTML_ATTRIBS">Writing
Attributes</a><br />
&#160;&#160;&#160;&#160;7.3 <a href="#HTML_CHARDATA">Writing
Character Data</a><br />
&#160;&#160;&#160;&#160;7.4 <a href="#HTML_PARAMS">The Influence of
Serialization Parameters upon the HTML Output Method</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.1 <a href=
"#HTML_VERSION">HTML Output Method: the version Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.2 <a href=
"#HTML_ENCODING">HTML Output Method: the encoding
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.3 <a href=
"#HTML_INDENT">HTML Output Method: the indent and
suppress-indentation Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.4 <a href=
"#HTML_CDATA-SECTION-ELEMENTS">HTML Output Method: the
cdata-section-elements Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.5 <a href=
"#HTML_OMIT-XML-DECLARATION">HTML Output Method: the
omit-xml-declaration and standalone Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.6 <a href=
"#HTML_DOCTYPE">HTML Output Method: the doctype-system and
doctype-public Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.7 <a href=
"#HTML_UNDECLARE-PREFIXES">HTML Output Method: the
undeclare-prefixes Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.8 <a href=
"#HTML_NORMALIZATION-FORM">HTML Output Method: the
normalization-form Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.9 <a href=
"#HTML_MEDIA-TYPE">HTML Output Method: the media-type
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.10 <a href=
"#HTML_USE-CHARACTER-MAPS">HTML Output Method: the
use-character-maps Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.11 <a href=
"#HTML_BYTE-ORDER-MARK">HTML Output Method: the byte-order-mark
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.12 <a href=
"#HTML_ESCAPE-URI-ATTRIBUTES">HTML Output Method: the
escape-uri-attributes Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;7.4.13 <a href=
"#HTML_INCLUDE-CONTENT-TYPE">HTML Output Method: the
include-content-type Parameter</a><br />
8 <a href="#text-output">Text Output Method</a><br />
&#160;&#160;&#160;&#160;8.1 <a href="#TEXT_PARAMS">The Influence of
Serialization Parameters upon the Text Output Method</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.1 <a href=
"#TEXT_VERSION">Text Output Method: the version Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.2 <a href=
"#TEXT_ENCODING">Text Output Method: the encoding
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.3 <a href=
"#TEXT_INDENT">Text Output Method: the indent and
suppress-indentation Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.4 <a href=
"#TEXT_CDATA-SECTION-ELEMENTS">Text Output Method: the
cdata-section-elements Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.5 <a href=
"#TEXT_OMIT-XML-DECLARATION">Text Output Method: the
omit-xml-declaration and standalone Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.6 <a href=
"#TEXT_DOCTYPE">Text Output Method: the doctype-system and
doctype-public Parameters</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.7 <a href=
"#TEXT_UNDECLARE-PREFIXES">Text Output Method: the
undeclare-prefixes Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.8 <a href=
"#TEXT_NORMALIZATION-FORM">Text Output Method: the
normalization-form Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.9 <a href=
"#TEXT_MEDIA-TYPE">Text Output Method: the media-type
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.10 <a href=
"#TEXT_USE-CHARACTER-MAPS">Text Output Method: the
use-character-maps Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.11 <a href=
"#TEXT_BYTE-ORDER-MARK">Text Output Method: the byte-order-mark
Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.12 <a href=
"#TEXT_ESCAPE-URI-ATTRIBUTES">Text Output Method: the
escape-uri-attributes Parameter</a><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;8.1.13 <a href=
"#TEXT_INCLUDE-CONTENT-TYPE">Text Output Method: the
include-content-type Parameter</a><br />
9 <a href="#character-maps">Character Maps</a><br />
10 <a href="#conformance">Conformance</a><br /></p>
<h3><a name="appendices" id="appendices"></a>Appendices</h3>
<p class="toc">A <a href="#references">References</a><br />
&#160;&#160;&#160;&#160;A.1 <a href=
"#normative-references">Normative References</a><br />
&#160;&#160;&#160;&#160;A.2 <a href=
"#informative-references">Informative References</a><br />
B <a href="#serparams-schema">Schema for Serialization
Parameters</a><br />
C <a href="#id-errors">Summary of Error Conditions</a><br />
D <a href="#list-of-uri-attributes">List of URI
Attributes</a><br />
E <a href="#implementation-defined-features">Checklist of
Implementation-Defined Features</a> (Non-Normative)<br />
F <a href="#revision-log">Change Log</a> (Non-Normative)<br />
&#160;&#160;&#160;&#160;F.1 <a href="#changes-for-this-WD">Changes
applied for the current Public Working Draft</a><br />
&#160;&#160;&#160;&#160;F.2 <a href="#changes-for-3rd-WD">Changes
applied for the third Public Working Draft</a><br />
&#160;&#160;&#160;&#160;F.3 <a href="#changes-for-2nd-WD">Changes
applied for the second Public Working Draft</a><br />
&#160;&#160;&#160;&#160;F.4 <a href="#changes-for-1st-WD">Changes
applied for the first Public Working Draft</a><br /></p>
</div>
<hr />
<div class="body">
<div class="div1">
<h2><a name="intro" id="intro"></a>1 Introduction</h2>
<p>This document defines serialization of the W3C XQuery and XPath
Data Model <span>3.0</span> (XDM), which is the data model of at
least <a href="#xpath-30">[XML Path Language (XPath) 3.0]</a>,
<a href="#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a>,
and <a href="#xquery-30">[XQuery 3.0: An XML Query Language]</a>,
and any other specifications that reference it.</p>
<p>In this document, examples and material labeled as "Note" are
provided for explanatory purposes and are not normative.</p>
<p>Serialization is the process of converting an instance of the
<a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM)
3.0]</a> into a sequence of octets. Serialization is well-defined
for most data model instances.</p>
<div class="div2">
<h3><a name="terminology" id="terminology"></a>1.1 Terminology</h3>
<p>In this specification, where they appear in upper case, the
words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", "MAY",
"REQUIRED", and "RECOMMENDED" are to be interpreted as described in
<a href="#RFC2119">[RFC2119]</a>.</p>
<p>[<a name="serializer" id="serializer" title=
"serializer">Definition</a>: As is indicated in <a href=
"#conformance"><b>10 Conformance</b></a>, conformance criteria for
serialization are determined by other specifications that refer to
this specification. A <b>serializer</b> is software that implements
some or all of the requirements of this specification in accordance
with such conformance criteria.] A serializer is not
<strong>REQUIRED</strong> to directly provide a programming
interface that permits a user to set serialization parameters or to
provide an input sequence for serialization. <span>In this
document, material labeled as "Note" and examples are provided for
explanatory purposes and are not normative.</span></p>
<p>Certain aspects of serialization are described in this
specification as <a title="implementation-defined" href=
"#impdef">implementation-defined</a> or <a title=
"implementation-dependent" href=
"#impdep">implementation-dependent</a>.</p>
<p>[<a name="impdef" id="impdef" title=
"implementation-defined">Definition</a>:
<b>Implementation-defined</b> indicates an aspect that
<strong>MAY</strong> differ between <a title="serializer" href=
"#serializer">serializers</a>, but whose actual behavior
<strong>MUST</strong> be specified either by another specification
that sets conformance criteria for serialization (see <a href=
"#conformance"><b>10 Conformance</b></a>) or in documentation that
accompanies the <a title="serializer" href=
"#serializer">serializer</a>.]</p>
<p>[<a name="impdep" id="impdep" title=
"implementation-dependent">Definition</a>:
<b>Implementation-dependent</b> indicates an aspect that
<strong>MAY</strong> differ between <a title="serializer" href=
"#serializer">serializers</a>, and whose actual behavior is not
<strong>REQUIRED</strong> to be specified either by another
specification that sets conformance criteria for serialization (see
<a href="#conformance"><b>10 Conformance</b></a>) or in
documentation that accompanies the <a title="serializer" href=
"#serializer">serializer</a>.]</p>
<p>[<a name="serial-err" id="serial-err" title=
"serialization error">Definition</a>: In some instances, the
sequence that is input to serialization cannot be successfully
converted into a sequence of octets given the set of serialization
parameter (<a href="#serparam"><b>3 Serialization
Parameters</b></a>) values specified. A <b>serialization error</b>
is said to occur in such an instance.] In some cases, a <a title=
"serializer" href="#serializer">serializer</a> is
<strong>REQUIRED</strong> to signal such an error. What it means to
signal a serialization error is determined by the relevant
conformance criteria (<a href="#conformance"><b>10
Conformance</b></a>) to which the <a title="serializer" href=
"#serializer">serializer</a> conforms. In other cases, there is an
<a title="implementation-defined" href=
"#impdef">implementation-defined</a> choice between signaling a
serialization error and performing a recovery action. Such a
recovery action will allow a <a title="serializer" href=
"#serializer">serializer</a> to produce a sequence of octets that
might not fully reflect the usual requirements of the parameter
settings that are in effect.</p>
<p>[<a name="caseless-compare" id="caseless-compare" title=
"without regard to case">Definition</a>: Where this specification
indicates that two strings are to be compared <b>without regard to
case</b>, the serializer <strong>MUST</strong> translate any
characters in the range #x41 (LATIN CAPITAL LETTER A) to #x5A
(LATIN CAPITAL LETTER Z), inclusive, to the corresponding
lower-case letters in the range #x61 (LATIN SMALL LETTER A) to #x7A
(LATIN SMALL LETTER Z) only for the purposes of making the
comparison. The comparison succeeds if the two strings are the same
length and the code point of each character in the first string is
equal to the code point of the character in the corresponding
position in the second string.]</p>
<p>Many terms used in this document are defined in the XPath
specification <a href="#xpath-30">[XML Path Language (XPath)
3.0]</a> or the Data Model specification <a href=
"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.
Particular attention is drawn to the following:</p>
<ul>
<li>
<p>[<a name="dt-atomization" id="dt-atomization" title=
"atomize">Definition</a>: The term <b>atomization</b> is defined in
<a href="http://www.w3.org/TR/xpath-30/#id-atomization">Section
2.4.2 Atomization</a> <sup><small>XP30</small></sup>. It is a
process that takes as input a sequence of <a title="node" href=
"#dt-node">nodes</a> and <a href=
"http://www.w3.org/TR/xpath-30/#dt-atomic-value">atomic
values</a><sup><small>XP30</small></sup>, and returns a sequence of
<a href="http://www.w3.org/TR/xpath-30/#dt-atomic-value">atomic
values</a><sup><small>XP30</small></sup>, in which the <a title=
"node" href="#dt-node">nodes</a> are replaced by their <a href=
"http://www.w3.org/TR/xpath-30/#dt-typed-value">typed
values</a><sup><small>XP30</small></sup> as defined in <a href=
"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM)
3.0]</a>.]</p>
</li>
<li>
<p>[<a name="dt-node" id="dt-node" title="node">Definition</a>: The
term <b>Node</b> is defined as part of <a href=
"http://www.w3.org/TR/xpath-datamodel-30/#Node">Section 6 Nodes</a>
<sup><small>DM30</small></sup>. There are seven kinds of <a title=
"node" href="#dt-node">nodes</a> in the data model: document,
element, attribute, text, namespace, processing instruction, and
comment.]</p>
</li>
<li>
<p>[<a name="dt-sequence" id="dt-sequence" title=
"sequence">Definition</a>: The term <b>sequence</b> is defined in
<a href="http://www.w3.org/TR/xpath-30/#id-basics">Section 2
Basics</a> <sup><small>XP30</small></sup>. A <a title="sequence"
href="#dt-sequence">sequence</a> is an ordered collection of zero
or more items.]</p>
</li>
<li>
<p>[<a name="dt-function-item" id="dt-function-item" title=
"function item">Definition</a>: The term <b>function item</b> is
defined in <a href=
"http://www.w3.org/TR/xpath-datamodel-30/#function-items">Section
2.8.1 Functions</a> <sup><small>DM30</small></sup>.]</p>
</li>
<li>
<p>[<a name="dt-string-value" id="dt-string-value" title=
"string value">Definition</a>: The term <b>string value</b> is
defined in <a href=
"http://www.w3.org/TR/xpath-datamodel-30/#dm-string-value">Section
5.13 string-value Accessor</a> <sup><small>DM30</small></sup>.
Every <a title="node" href="#dt-node">node</a> has a <a title=
"string value" href="#dt-string-value">string value</a>. For
example, the <a title="string value" href="#dt-string-value">string
value</a> of an element is the concatenation of the <a title=
"string value" href="#dt-string-value">string values</a> of all its
descendant text <a title="node" href="#dt-node">nodes</a>.]</p>
</li>
<li>
<p>[<a name="dt-expanded-qname" id="dt-expanded-qname" title=
"expanded QName">Definition</a>: The term <b>expanded QName</b> is
defined in <a href=
"http://www.w3.org/TR/xpath-30/#id-basics">Section 2 Basics</a>
<sup><small>XP30</small></sup>. An <a title="expanded QName" href=
"#dt-expanded-qname">expanded QName</a> consists of an optional
namespace URI and a local name. An <a title="expanded QName" href=
"#dt-expanded-qname">expanded QName</a> also retains its original
namespace prefix (if any), to facilitate casting the expanded QName
into a string.]</p>
</li>
<li>
<p>[<a name="null-namespace-URI" id="null-namespace-URI" title=
"null namespace URI">Definition</a>: An element or attribute that
is in no namespace, or an <a title="expanded QName" href=
"#dt-expanded-qname">expanded-QName</a> whose namespace part is an
empty sequence, is referred to as having a <b>null namespace
URI</b>].</p>
</li>
<li>
<p>[<a name="non-null-namespace-URI" id="non-null-namespace-URI"
title="non-null namespace URI">Definition</a>: An element or
attribute that does not have a <a title="null namespace URI" href=
"#null-namespace-URI">null namespace URI</a>, is referred to as
having a <b>non-null namespace URI</b>].</p>
</li>
</ul>
</div>
</div>
<div class="div1">
<h2><a name="serdm" id="serdm"></a>2 Sequence Normalization</h2>
<p>An instance of the data model that is input to the serialization
process is a sequence. Prior to serializing a sequence using any of
the output methods whose behavior is specified by this document
(<a href="#serparam"><b>3 Serialization Parameters</b></a>), the
<a title="serializer" href="#serializer">serializer</a>
<strong>MUST</strong> first compute a normalized sequence for
serialization; it is the normalized sequence that is actually
serialized. [<a name="sequence-normalization" id=
"sequence-normalization" title=
"sequence normalization">Definition</a>: The purpose of <b>sequence
normalization</b> is to create a sequence that can be serialized as
a well-formed XML document or external general parsed entity, that
also reflects the content of the input sequence to the extent
possible.] [<a name="result-tree" id="result-tree" title=
"result tree">Definition</a>: The result of the <a title=
"sequence normalization" href="#sequence-normalization">sequence
normalization</a> process is a <b>result tree</b>.]</p>
<p>The normalized sequence for serialization is constructed by
applying all of the following rules in order, with the initial
sequence being input to the first step, and the sequence that
results from any step being used as input to the subsequent step.
For any <a title="implementation-defined" href=
"#impdef">implementation-defined</a> output method, it is <a title=
"implementation-defined" href="#impdef">implementation-defined</a>
whether this sequence normalization process takes place.</p>
<p>Where the process of converting the input sequence to a
normalized sequence indicates that a value <strong>MUST</strong> be
cast to <code>xs:string</code>, that operation is defined in
<a href=
"http://www.w3.org/TR/xpath-functions-30/#casting-to-string">Section
18.1.1 Casting to xs:string and xs:untypedAtomic</a>
<sup><small>FO30</small></sup> of <a href=
"#xpath-functions-30">[XQuery and XPath Functions and Operators
3.0]</a>. <span>Where a step in the sequence normalization process
indicates that a node should be copied, the copy is performed in
the same way as an XSLT <code>xsl:copy-of</code> instruction that
has a <code>validation</code> attribute whose value is
<code>preserve</code> and has a <code>select</code> attribute whose
effective value is the node, as described in <a href=
"http://www.w3.org/TR/xslt-30/#copy-of">Section 11.9.2 Deep
Copy</a><sup><small>XT30</small></sup> of <a href="#xslt-30">[XSL
Transformations (XSLT) Version 3.0]</a>, or equivalently in the
same way as an XQuery content expression as described in Step 1e of
<a href="http://www.w3.org/TR/xquery-30/#id-content">Section
3.9.1.3 Content</a> <sup><small>XQ30</small></sup> of <a href=
"#xquery-30">[XQuery 3.0: An XML Query Language]</a>, where the
construction mode is <code>preserve</code>.</span> The steps in
computing the normalized sequence are:</p>
<ol class="enumar">
<li>
<p>If the sequence that is input to serialization is empty, create
a sequence <em>S<sub>1</sub></em> that consists of a zero-length
string. Otherwise, copy each item in the sequence that is input to
serialization to create the new sequence
<em>S<sub>1</sub></em>.</p>
</li>
<li>
<p>For each item in <em>S<sub>1</sub></em>, if the item is atomic,
obtain the lexical representation of the item by casting it to an
<code>xs:string</code> and copy the string representation to the
new sequence; otherwise, copy the item, which will be a <a title=
"node" href="#dt-node">node</a>, to the new sequence. The new
sequence is <em>S<sub>2</sub></em>.</p>
</li>
<li>
<p>For each subsequence of adjacent strings in
<em>S<sub>2</sub></em>, copy a single string to the new sequence
equal to the values of the strings in the subsequence concatenated
in order, each separated by a single space. Copy all other items to
the new sequence. The new sequence is <em>S<sub>3</sub></em>.</p>
</li>
<li>
<p>For each item in <em>S<sub>3</sub></em>, if the item is a
string, create a text <a title="node" href="#dt-node">node</a> in
the new sequence whose <a title="string value" href=
"#dt-string-value">string value</a> is equal to the string;
otherwise, copy the item to the new sequence. The new sequence is
<em>S<sub>4</sub></em>.</p>
</li>
<li>
<p>For each item in <em>S<sub>4</sub></em>, if the item is a
document <a title="node" href="#dt-node">node</a>, copy its
children to the new sequence; otherwise, copy the item to the new
sequence. The new sequence is <em>S<sub>5</sub></em>.</p>
</li>
<li>
<p>For each subsequence of adjacent text nodes in
<em>S<sub>5</sub></em>, copy a single text node to the new sequence
equal to the values of the text nodes in the subsequence
concatenated in order. Any text nodes with values of zero length
are dropped. Copy all other items to the new sequence. The new
sequence is <em>S<sub>6</sub></em>.</p>
</li>
<li>
<p>It is a <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSENR0001"
title="err:SENR0001">err:SENR0001</a>] if an item in
<em>S<sub>6</sub></em> is an attribute <a title="node" href=
"#dt-node">node</a>, a namespace <a title="node" href=
"#dt-node">node</a> <span>or a <a title="function item" href=
"#dt-function-item">function item</a>.</span> Otherwise, construct
a new sequence, <em>S<sub>7</sub></em>, that consists of a single
document <a title="node" href="#dt-node">node</a> and copy all the
items in the sequence, which are all <a title="node" href=
"#dt-node">nodes</a>, as children of that document <a title="node"
href="#dt-node">node</a>.</p>
</li>
</ol>
<p><em>S<sub>7</sub></em> is the normalized sequence.</p>
<p>The <a title="result tree" href="#result-tree">result tree</a>
rooted at the document <a title="node" href="#dt-node">node</a>
that is created by the final step of this sequence normalization
process is the instance of the data model to which the rules of the
appropriate output method are applied. If the sequence
normalization process results in a <a title="serialization error"
href="#serial-err">serialization error</a>, the <a title=
"serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal the error.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>The sequence normalization process for a sequence
<code>$seq</code> is equivalent to constructing a document
<a title="node" href="#dt-node">node</a> using the XSLT
instruction:</p>
<div class="exampleInner">
<pre>
&lt;xsl:document&gt;
  &lt;xsl:copy-of select="$seq" validation="preserve"/&gt;
&lt;/xsl:document&gt;
</pre></div>
<p>or the XQuery expression:</p>
<div class="exampleInner">
<pre>
declare construction preserve;

document {
  for $s in $seq return
    if ($s instance of document-node())
    then $s/child::node()
    else $s
}
</pre></div>
<p>This process results in a <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSENR0001"
title="err:SENR0001">err:SENR0001</a>] if sequences contain
parentless attribute and/or namespace <a title="node" href=
"#dt-node">nodes</a>.</p>
</div>
</div>
<div class="div1">
<h2><a name="serparam" id="serparam"></a>3 Serialization
Parameters</h2>
<p>There are a number of parameters that influence how
serialization is performed. <a title="host language" href=
"#host-language">Host languages</a> <strong>MAY</strong> allow
users to specify any or all of these parameters, but they are not
<strong>REQUIRED</strong> to be able to do so. However, the
<a title="host language" href="#host-language">host language</a>
specification <strong>MUST</strong> specify how the value of all
applicable parameters is to be determined.</p>
<p>It is a <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSEPM0016"
title="err:SEPM0016">err:SEPM0016</a>] if a parameter value is
invalid for the given parameter. It is the responsibility of the
<a title="host language" href="#host-language">host language</a> to
specify how invalid values should be handled at the level of that
language.</p>
<p>The following serialization parameters are defined:</p>
<table border="1" summary="Serialization parameters">
<col width="180" span="1" />
<col span="1" />
<thead>
<tr>
<th align="left" colspan="1">Serialization parameter name</th>
<th align="left" colspan="1">Permitted values for parameter</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>byte-order-mark</code></td>
<td>One of the enumerated values <code>yes</code> or
<code>no</code>. This parameter indicates whether the serialized
sequence of octets is to be preceded by a Byte Order Mark. (See
Section 5.1 of <a href="#UNICODE-ENCODING">[Unicode Encoding]</a>.)
The actual octet order used is <a title="implementation-dependent"
href="#impdep">implementation-dependent</a>. If the encoding
defines no Byte Order Mark, or if the Byte Order Mark is prohibited
for the specific Unicode encoding or implementation environment,
then this parameter is ignored.</td>
</tr>
<tr>
<td><code>cdata-section-elements</code></td>
<td>A list of expanded QNames, possibly empty.</td>
</tr>
<tr>
<td><code>doctype-public</code></td>
<td><span>A string of <a href=
"http://www.w3.org/TR/REC-xml/#NT-PubidChar">PubidChar</a><sup><small>XML</small></sup>
characters.</span> <span>This parameter may be absent.</span></td>
</tr>
<tr>
<td><code>doctype-system</code></td>
<td><span>A string of Unicode characters</span> <span>that does not
include both an apostrophe (#x27) and a quotation mark (#x22)
character.</span> <span>This parameter may be absent.</span></td>
</tr>
<tr>
<td><code>encoding</code></td>
<td>A string of Unicode characters in the range #x21 to #x7E (that
is, printable ASCII characters); the value <strong>SHOULD</strong>
be a charset registered with the Internet Assigned Numbers
Authority <a href="#IANA">[IANA]</a>, <a href=
"#RFC2278">[RFC2278]</a> or begin with the characters
<code>x-</code> or <code>X-</code>.</td>
</tr>
<tr>
<td><code>escape-uri-attributes</code></td>
<td>One of the enumerated values <code>yes</code> or
<code>no</code>.</td>
</tr>
<tr>
<td><code>include-content-type</code></td>
<td>One of the enumerated values <code>yes</code> or
<code>no</code>.</td>
</tr>
<tr>
<td><code>indent</code></td>
<td>One of the enumerated values <code>yes</code> or
<code>no</code>.</td>
</tr>
<tr>
<td><code>media-type</code></td>
<td>A string of Unicode characters specifying the media type (MIME
content type) <a href="#RFC2046">[RFC2046]</a>; the charset
parameter of the media type <strong>MUST NOT</strong> be specified
explicitly in the value of the <code>media-type</code> parameter.
If the destination of the serialized output is annotated with a
media type, this parameter <strong>MAY</strong> be used to provide
such an annotation. For example, it <strong>MAY</strong> be used to
set the media type in an HTTP header.</td>
</tr>
<tr>
<td><code>method</code></td>
<td>An expanded QName with a <a title="null namespace URI" href=
"#null-namespace-URI">null namespace URI</a>, and the local part of
the name equal to one of <code>xml</code>, <code>xhtml</code>,
<code>html</code> or <code>text</code>, or having a <a title=
"non-null namespace URI" href="#non-null-namespace-URI">non-null
namespace URI</a>. If the namespace URI is non-null, the parameter
specifies an <a title="implementation-defined" href=
"#impdef">implementation-defined</a> output method.</td>
</tr>
<tr>
<td><code>normalization-form</code></td>
<td>One of the enumerated values <code>NFC</code>,
<code>NFD</code>, <code>NFKC</code>, <code>NFKD</code>,
<code>fully-normalized</code>, <code>none</code> or an <a title=
"implementation-defined" href="#impdef">implementation-defined</a>
value.</td>
</tr>
<tr>
<td><code>omit-xml-declaration</code></td>
<td>One of the enumerated values <code>yes</code> or
<code>no</code>.</td>
</tr>
<tr>
<td><code>standalone</code></td>
<td>One of the enumerated values <code>yes</code>, <code>no</code>
or <code>omit</code>.</td>
</tr>
<tr>
<td><code>suppress-indentation</code></td>
<td><span>A list of expanded QNames, possibly empty.</span></td>
</tr>
<tr>
<td><code>undeclare-prefixes</code></td>
<td>One of the enumerated values <code>yes</code> or
<code>no</code>.</td>
</tr>
<tr>
<td><code>use-character-maps</code></td>
<td>A list of pairs, possibly empty, with each pair consisting of a
single Unicode character and a string of Unicode characters.</td>
</tr>
<tr>
<td><code>version</code></td>
<td>A string of Unicode characters.</td>
</tr>
</tbody>
</table>
<p>The value of the <code>method</code> parameter is an <a title=
"expanded QName" href="#dt-expanded-qname">expanded QName</a>. If
the value has a <a title="null namespace URI" href=
"#null-namespace-URI">null namespace URI</a>, then the local name
identifies a method specified in this document and
<strong>MUST</strong> be one of <code>xml</code>,
<code>html</code>, <code>xhtml</code>, or <code>text</code>; in
this case, the output method specified <strong>MUST</strong> be
used for serializing. If the namespace URI is non-null, then it
identifies an <a title="implementation-defined" href=
"#impdef">implementation-defined</a> output method; the behavior in
this case is not specified by this document.</p>
<p>In those cases where they have no important effect on the
content of the serialized result, details of the output methods
defined by this specification are left unspecified and are regarded
as <a title="implementation-dependent" href=
"#impdep">implementation-dependent</a>. Whether a <a title=
"serializer" href="#serializer">serializer</a> uses apostrophes or
quotation marks to delimit attribute values in the XML output
method is an example of such a detail.</p>
<p>The detailed semantics of each parameter will be described
separately for each output method <span>for which it is
applicable</span>. <span>If the semantics of a parameter are not
described for an output method, then it is not applicable to that
output method.</span></p>
<p>Implementations <strong>MAY</strong> define additional
serialization parameters, and <strong>MAY</strong> allow users to
do so. For this purpose, the name of a serialization parameter is
considered to be a QName; the parameters listed above are QNames in
no namespace, while any additional serialization parameters must
have names that are namespace-qualified. If the serialization
method is one of the four methods <code>xml</code>,
<code>html</code>, <code>xhtml</code>, or <code>text</code>, then
the additional serialization parameters <strong>MAY</strong> affect
the output of the serializer to the extent (but only to the extent)
that this specification leaves the output <a title=
"implementation-defined" href="#impdef">implementation-defined</a>
or <a title="implementation-dependent" href=
"#impdep">implementation-dependent</a>. For example, such
parameters might control whether namespace declarations on an
element are written before or after the attributes of the element,
or they might define the number of space or tab characters to be
inserted when the <code>indent</code> parameter is set to
<code>yes</code>; but they could not instruct the serializer to
suppress the error that occurs when the HTML output method
encounters characters <span>that are not permitted</span> (see
error [<a href="#ERRSERE0014" title=
"err:SERE0014">err:SERE0014</a>]).</p>
<div class="div2">
<h3><a name="serparams-in-xdm-instance" id=
"serparams-in-xdm-instance"></a>3.1 Setting Serialization
Parameters by Means of a Data Model Instance</h3>
<p>A host language <strong>MAY</strong> provide, by reference to
this section, a mechanism by which the settings of serialization
parameters are supplied in the form of an instance of the data
model as specified in <a href="#xpath-datamodel-30">[XQuery and
XPath Data Model (XDM) 3.0]</a>. The instance of the data model
used to determine the settings of serialization parameters
<strong>MUST</strong> be processed as if by the procedure described
below.</p>
<p>With the exception of the <code>use-character-maps</code>
parameter, the setting of each serialization parameter is equal to
the result of evaluating the XQuery expression</p>
<div class="exampleInner">
<pre>
(validate lax { document { . } })
   /output:serialization-parameters
   /output:*[local-name() eq $param-name]/data(@value)
</pre></div>
<p>with the supplied instance of the data model as the context
item, the <code>param-name</code> variable having as its value a
value of type <code>xs:string</code> equal to the local part of the
name of the particular serialization parameter, and the other
components of the dynamic context and static context as specified
in the subsequent tables. If in any case evaluating this expression
would yield an error, <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSEPM0017"
title="err:SEPM0017">err:SEPM0017</a>] results.</p>
<p>If the result of evaluating this expression for a particular
serialization parameter is the empty sequence:</p>
<ol class="enumar">
<li>
<p>if the parameter is either <code>cdata-section-elements</code>
or <code>supress-indentation</code> and the result of evaluating
the expression</p>
<div class="exampleInner">
<pre>
(validate lax { document { . } })
   /output:serialization-parameters
   /output:*[local-name() eq $param-name]
</pre></div>
<p>with the same settings of the static context and dynamic context
is not an empty sequence, the setting of the parameter is the empty
list;</p>
</li>
<li>
<p>otherwise, the setting of the parameter is unspecified.</p>
</li>
</ol>
<p>The components of the static context used in evaluating the
XQuery expressions are as defined in the following table.</p>
<table border="1" summary=
"Settings of static context components used in extracting serialization parameter settings from an XDM instance">
<thead>
<tr>
<th colspan="1">Static Context Component</th>
<th colspan="1">Setting</th>
</tr>
</thead>
<tbody>
<tr>
<td>XPath compatibility mode</td>
<td>false</td>
</tr>
<tr>
<td>Statically known namespaces</td>
<td>The pair
(output,http://www.w3.org/2010/xslt-xquery-serialization)</td>
</tr>
<tr>
<td>Default element/type namespace</td>
<td>"none"</td>
</tr>
<tr>
<td>Default function namespace</td>
<td>http://www.w3.org/2005/xpath-functions</td>
</tr>
<tr>
<td>In-scope schema types, In-scope element declarations,
Substitution groups, In-scope attribute declarations</td>
<td>As defined by the schema for serialization parameters (<a href=
"#serparams-schema"><b>B Schema for Serialization
Parameters</b></a>) and any additional implementation-defined
in-scope schema components</td>
</tr>
<tr>
<td>In-scope variables</td>
<td>{param-name}</td>
</tr>
<tr>
<td>Context item static type</td>
<td><code>node()</code></td>
</tr>
<tr>
<td>Function signatures</td>
<td>{<code>fn:data($arg as item()*) as
xs:anyAtomicType*</code>}</td>
</tr>
<tr>
<td>Statically known collations</td>
<td>{ (http://www.w3.org/2005/xpath-functions/collation/codepoint,
The Unicode codepoint collation ) }</td>
</tr>
<tr>
<td>Default collation</td>
<td>The Unicode codepoint collation</td>
</tr>
<tr>
<td>Construction mode</td>
<td>strip</td>
</tr>
<tr>
<td>Ordering mode</td>
<td>ordered</td>
</tr>
<tr>
<td>Default order for empty sequences</td>
<td>least</td>
</tr>
<tr>
<td>Boundary space policy</td>
<td>strip</td>
</tr>
<tr>
<td>Copy-namespaces mode</td>
<td>(preserve,inherit)</td>
</tr>
<tr>
<td>Base URI</td>
<td>Absent</td>
</tr>
<tr>
<td>Statically known documents</td>
<td>None</td>
</tr>
<tr>
<td>Statically known collections</td>
<td>None</td>
</tr>
<tr>
<td>Statically known default collection type</td>
<td><code>node()*</code></td>
</tr>
<tr>
<td>Statically known decimal formats</td>
<td>None</td>
</tr>
</tbody>
</table>
<p>The remaining components of the dynamic context used in
evaluating the XQuery expressions in the preceding table are as
defined in the following table.</p>
<table border="1" summary=
"Settings of dynamic context components used in extracting serialization parameter settings from an XDM instance">
<thead>
<tr>
<th colspan="1">Dynamic Context Component</th>
<th colspan="1">Setting</th>
</tr>
</thead>
<tbody>
<tr>
<td>Context position</td>
<td>1</td>
</tr>
<tr>
<td>Context size</td>
<td>1</td>
</tr>
<tr>
<td>Variable values</td>
<td>The <code>param-name</code> variable has a value of type
<code>xs:string</code> equal the local part of the name of the
serialization parameter under consideration</td>
</tr>
<tr>
<td>Function implementations</td>
<td>The implementation of fn:data</td>
</tr>
<tr>
<td>Current dateTime</td>
<td>Absent</td>
</tr>
<tr>
<td>Implicit timezone</td>
<td>Absent</td>
</tr>
<tr>
<td>Available documents</td>
<td>None</td>
</tr>
<tr>
<td>Available collections</td>
<td>None</td>
</tr>
<tr>
<td>Default collection</td>
<td>None</td>
</tr>
</tbody>
</table>
<p>In the case of the <code>use-character-maps</code> parameter,
the expression</p>
<div class="exampleInner">
<pre>
(validate lax { document { . } })
  /output:serialization-parameters/output:use-character-maps
  /output:character-map[@character eq $char]/string(@map-string)
</pre></div>
<p>is evaluated for each Unicode character that is permitted in an
XML document. The dynamic context and static context used to
evaluate the expression are as defined above, except that in-scope
variables is the set {<code>char</code>} and the value of the
variable "<code>char</code>" is a value of type
<code>xs:string</code> of length one whose value is the Unicode
character under consideration. If the result of evaluating the
expression is not an empty sequence, the pair consisting of the
Unicode character and the result of evaluating the expression is
part of the list of pairs in the value of the
<code>use-character-maps</code> parameter. It is a <a title=
"serialization error" href="#serial-err">serialization error</a>
[<a href="#ERRSEPM0018" title="err:SEPM0018">err:SEPM0018</a>] if
the result of evaluating this expression for any character is a
sequence of length greater than one.</p>
<p>Using the same settings of the components of the dynamic context
and static context, <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSEPM0019"
title="err:SEPM0019">err:SEPM0019</a>] results if the result of
evaluating the following expression is not true — that is, if the
data model instance specifies more than one setting for any
particular serialization parameter.</p>
<div class="exampleInner">
<pre>
(document { . })/output:serialization-parameters
   /(count(distinct-values(*/node-name(.))) eq (count(*)))
</pre></div>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>A serializer or implementation of a host language does not need
to be accompanied by an XQuery processor nor by a general-purpose
schema validator in order to meet the requirements of this section.
It merely needs to be capable of extracting values from an XDM
instance that conforms to the schema for serialization parameters,
while checking that the constraints implied by the schema and
additional constraints implied by the XQuery validate expression or
explicitly stated in this section are satisfied.</p>
</div>
<p>The host language <strong>MAY</strong> provide additional
mechanisms for overriding the values of any serialization
parameters specified through the mechanism defined in this section,
as well as additional mechanisms for specifying the values of any
serialization parameters whose values remain unspecified after
applying the mechanism defined in this section.</p>
<p>If the instance of the data model contains elements or
attributes in the instance of the data model that are in a
namespace other than
<code>http://www.w3.org/2010/xslt-xquery-serialization</code>, the
implementation <strong>MAY</strong> interpret them to specify the
values of <a title="implementation-defined" href=
"#impdef">implementation-defined</a> serialization parameters in an
<a title="implementation-defined" href=
"#impdef">implementation-defined</a> manner.</p>
<div class="exampleOuter">
<p>The following XML document, if converted to a data model
instance and processed using the mechanism described in this
section, would specify the settings of the <code>method</code>,
<code>version</code> and <code>indent</code> serialization
parameters with the values <code>xml</code>, <code>1.0</code> and
<code>yes</code>, respectively.</p>
<div class="exampleInner">
<pre>
&lt;output:serialization-parameters
       xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization"&gt;
  &lt;output:method value="xml"/&gt;
  &lt;output:version value="1.0"/&gt;
  &lt;output:indent value="yes"/&gt;
&lt;/output:serialization-parameters&gt;
</pre></div>
<p>The following document would specify the setting of the
<code>cdata-section-elements</code> serialization parameter with
value the pair of expanded QNames
(<code>http://example.org/book/chapter</code>,<code>heading</code>)
and
(<code>http://example.org/book</code>,<code>footnote</code>)</p>
<div class="exampleInner">
<pre>
&lt;output:serialization-parameters
       xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization"
       xmlns:book="http://example.org/book"
       xmlns="http://example.org/book/chapter"&gt;
  &lt;output:cdata-section-elements value="heading book:footnote"/&gt;
&lt;/output:serialization-parameters&gt;
</pre></div>
<p>The following document would specify the value of the
<code>method</code> serialization parameter with the value
<code>html</code>.</p>
<p>Notice that in this example, the default namespace declaration
in scope has no effect on the interpretation of the setting of the
<code>method</code> parameter.</p>
<div class="exampleInner">
<pre>
&lt;output:serialization-parameters
       xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization"
       xmlns="http://example.org/ext"&gt;
  &lt;output:method value="html"/&gt;
&lt;/output:serialization-parameters&gt;
</pre></div>
<p>The following document would specify the value of the
<code>method</code> serialization parameter with value equal to the
expanded QName (<code>http://example.org/ext</code>,
<code>jsp</code>), and the <code>use-character-maps</code>
parameter with value equal to the list of pairs, <code>(«, &lt;%),
(», %&gt;)</code></p>
<div class="exampleInner">
<pre>
&lt;output:serialization-parameters
       xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization"
       xmlns:ext="http://example.org/ext"&gt;
  &lt;output:method value="ext:jsp"/&gt;
  &lt;output:use-character-maps&gt;
    &lt;output:character-map character="&amp;#xAB;" map-string="&amp;lt;%"/&gt;
    &lt;output:character-map character="&amp;#xBB;" map-string="%&amp;gt;"/&gt;
  &lt;/output:use-character-maps&gt;
&lt;/output:serialization-parameters&gt;
</pre></div>
</div>
</div>
</div>
<div class="div1">
<h2><a name="serphases" id="serphases"></a>4 Phases of
Serialization</h2>
<p>Serialization comprises five phases of processing (preceded
optionally by the sequence normalization process described in
<a href="#serdm"><b>2 Sequence Normalization</b></a>).</p>
<p>For an <a title="implementation-defined" href=
"#impdef">implementation-defined</a> output method, any of these
phases <strong>MAY</strong> be skipped or <strong>MAY</strong> be
performed in a different order than is specified here. For the
output methods defined in this specification, these phases are
carried out sequentially as follows:</p>
<ol class="enumar">
<li>
<p>A <code>meta</code> element is added to the normalized sequence
along with discarding an existing <code>meta</code> element, as
controlled by the <code>include-content-type</code> parameter for
the XHTML and HTML output methods.</p>
</li>
<li>
<p><em>Markup generation</em> produces the character representation
of those parts of the serialized result that describe the structure
of the normalized sequence. In the cases of the XML, HTML and XHTML
output methods, this phase produces the character representations
of the following:</p>
<ul>
<li>
<p>the document type declaration;</p>
</li>
<li>
<p>start tags and end tags (except for attribute values, whose
representation is produced by the character expansion phase);</p>
</li>
<li>
<p>processing instructions; and</p>
</li>
<li>
<p>comments.</p>
</li>
</ul>
<p>In the cases of the XML and XHTML output methods, this phase
also produces the following:</p>
<ul>
<li>
<p>the XML or text declaration; and</p>
</li>
<li>
<p>empty element tags (except for the attribute values);</p>
</li>
</ul>
<p>In the case of the text output method, <span>this phase replaces
the single document node produced by <a title=
"sequence normalization" href="#sequence-normalization">sequence
normalization</a> with a new document node that has exactly one
child, which is a text node. The string value of the new text node
is the string value of the document node that was produced by
sequence normalization.</span></p>
</li>
<li>
<p><em>Character expansion</em> is concerned with the
representation of characters appearing in text and attribute
<a title="node" href="#dt-node">nodes</a> in the normalized
sequence. For each text and attribute <a title="node" href=
"#dt-node">node</a>, the following rules are applied in
sequence.</p>
<ol class="enumla">
<li>
<p>If the node is an attribute that is a <a title=
"URI attribute values" href="#uri-attribute-values">URI attribute
value</a> and the <code>escape-uri-attributes</code> parameter is
set to require escaping of URI attributes, apply <a title=
"URI Escaping" href="#uri-escaping">URI escaping</a> as defined
below, and skip rules b-e. Otherwise, continue with rule b.</p>
<p>[<a name="uri-escaping" id="uri-escaping" title=
"URI Escaping">Definition</a>: <b>URI escaping</b> consists of the
following three steps applied in sequence to the content of
<a title="URI attribute values" href="#uri-attribute-values">URI
attribute values</a>:]</p>
<ol class="enumlr">
<li>
<p>normalize to NFC using the method defined in <a href=
"http://www.w3.org/TR/xpath-functions-30/#func-normalize-unicode">Section
5.4.6 fn:normalize-unicode</a> <sup><small>FO30</small></sup></p>
</li>
<li>
<p>percent-encode any special characters in the URI using the
method defined in <a href=
"http://www.w3.org/TR/xpath-functions-30/#func-escape-html-uri">Section
6.4 fn:escape-html-uri</a> <sup><small>FO30</small></sup></p>
</li>
<li>
<p>escape according to <span>the rules of the XML or HTML output
method, whichever is applicable, any characters that require</span>
escaping, and any characters that cannot be represented in the
selected encoding. For example, replace <code>&lt;</code> with
<code>&amp;lt;</code>. (See also section <a href=
"#HTML_CHARDATA"><b>7.3 Writing Character Data</b></a>)</p>
</li>
</ol>
<p>[<a name="uri-attribute-values" id="uri-attribute-values" title=
"URI attribute values">Definition</a>: The values of attributes
listed in <a href="#list-of-uri-attributes"><b>D List of URI
Attributes</b></a> are <b>URI attribute values</b>. Attributes are
not considered to be URI attributes simply because they are
namespace declaration attributes or have the type annotation
<code>xs:anyURI</code>.]</p>
</li>
<li>
<p>If the node is a text node whose parent element is selected by
the rules of the <code>cdata-section-elements</code> parameter for
the applicable output method, create CDATA sections as described
below, and skip rules c-e. Otherwise, continue with rule c.</p>
<p>Apply the following two processes in sequence to create CDATA
sections</p>
<ol class="enumlr">
<li>
<p><a title="Unicode Normalization" href=
"#unicode-normalization">Unicode Normalization</a> if requested by
the <code>normalization-form</code> parameter.</p>
</li>
<li>
<p>apply changes as detailed in the description of the
<code>cdata-section-elements</code> parameter for the applicable
output method.</p>
</li>
</ol>
</li>
<li>
<p>Apply character mapping as determined by the
<code>use-character-maps</code> parameter for the applicable output
method. For characters that were substituted by this process, skip
rules d and e. For the remaining characters that were not modified
by character mapping, continue with rule d.</p>
</li>
<li>
<p>Apply <a title="Unicode Normalization" href=
"#unicode-normalization">Unicode Normalization</a> if requested by
the <code>normalization-form</code> parameter.</p>
<p>[<a name="unicode-normalization" id="unicode-normalization"
title="Unicode Normalization">Definition</a>: <b>Unicode
Normalization</b> is the process of removing alternate
representations of equivalent sequences from textual data, to
convert the data into a form that can be binary-compared for
equivalence, as specified in <a href=
"#UNICODE-NORMALIZATION-FORM">[UAX #15: Unicode Normalization
Forms]</a>. For specific recommendations for character
normalization on the World Wide Web, see <a href=
"#charmod-norm">[Character Model for the World Wide Web 1.0:
Normalization]</a>.]</p>
<p>The meanings associated with the possible values of the
<code>normalization-form</code> parameter are defined in section
<a href="#XML_NORMALIZATION-FORM"><b>5.1.8 XML Output Method: the
normalization-form Parameter</b></a>.</p>
<p>Continue with step e.</p>
</li>
<li>
<p>Escape according to <span>the rules of the XML or HTML output
method, whichever is applicable,</span> any characters (such as
<code>&lt;</code> and <code>&amp;</code>) where XML or HTML
requires escaping, and any characters that cannot be represented in
the selected encoding. For example, replace <code>&lt;</code> with
<code>&amp;lt;</code>. (See also section <a href=
"#HTML_CHARDATA"><b>7.3 Writing Character Data</b></a>). For
characters such as <code>&gt;</code> where XML defines a built-in
entity but does not require its use in all circumstances, it is
implementation-dependent whether the character is escaped.</p>
</li>
</ol>
</li>
<li>
<p><em>Indentation</em>, as controlled by the <code>indent</code>
parameter <span>and the <code>suppress-indentation</code>
parameter</span>, <strong>MAY</strong> add or remove whitespace
according to the rules defined by the applicable output method.</p>
</li>
<li>
<p><em>Encoding</em>, as controlled by the <code>encoding</code>
parameter, converts the character stream produced by the previous
phases into an octet stream.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>Serialization is only defined in terms of encoding the result as
a stream of octets. However, a <a title="serializer" href=
"#serializer">serializer</a> may provide an option that allows the
encoding phase to be skipped, so that the result of serialization
is a stream of Unicode characters. The effect of any such option is
<a title="implementation-defined" href=
"#impdef">implementation-defined</a>, and a <a title="serializer"
href="#serializer">serializer</a> is not required to support such
an option.</p>
</div>
</li>
</ol>
</div>
<div class="div1">
<h2><a name="xml-output" id="xml-output"></a>5 XML Output
Method</h2>
<p>The XML output method serializes the normalized sequence as an
XML entity that <strong>MUST</strong> satisfy the rules for either
a well-formed XML document entity or a well-formed XML external
general parsed entity, or both. A <a title="serialization error"
href="#serial-err">serialization error</a> [<a href="#ERRSERE0003"
title="err:SERE0003">err:SERE0003</a>] results if the <a title=
"serializer" href="#serializer">serializer</a> is unable to satisfy
those rules, except for content modified by the character expansion
phase of serialization, as described in <a href="#serphases"><b>4
Phases of Serialization</b></a>. The effects of the character
expansion phase could result in the serialized output being not
well-formed, but will not result in a <a title=
"serialization error" href="#serial-err">serialization error</a>.
If a <a title="serialization error" href=
"#serial-err">serialization error</a> results, the <a title=
"serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal the error.</p>
<p>If the document <a title="node" href="#dt-node">node</a> of the
normalized sequence has a single element <a title="node" href=
"#dt-node">node</a> child and no text <a title="node" href=
"#dt-node">node</a> children, then the serialized output is a
well-formed XML document entity, and the serialized output
<strong>MUST</strong> conform to the appropriate version of the XML
Namespaces Recommendation <a href="#xml-names">[XML Names]</a> or
<a href="#xml-names11">[XML Names 1.1]</a>. If the normalized
sequence does not take this form, then the serialized output is a
well-formed XML external general parsed entity, which, when
referenced within a trivial XML document wrapper like this:</p>
<div class="exampleInner">
<pre>
&lt;?xml version="<em>version</em>"?&gt;
&lt;!DOCTYPE doc [
&lt;!ENTITY e SYSTEM "<em>entity-URI</em>"&gt;
]&gt;
&lt;doc&gt;&amp;e;&lt;/doc&gt;
</pre></div>
<p>where <code>entity-URI</code> is a URI for the entity, and the
value of the <code>version</code> pseudo-attribute is the value of
the <code>version</code> parameter, produces a document which
<strong>MUST</strong> itself be a well-formed XML document
conforming to the corresponding version of the XML Namespaces
Recommendation <a href="#xml-names">[XML Names]</a> or <a href=
"#xml-names11">[XML Names 1.1]</a>.</p>
<p>[<a name="reconstructed-tree" id="reconstructed-tree" title=
"reconstructed tree">Definition</a>: A <b>reconstructed tree</b>
may be constructed by parsing the XML document and converting it
into an instance of the data model as specified in <a href=
"#xpath-datamodel-30">[XQuery and XPath Data Model (XDM) 3.0]</a>.]
The result of serialization <strong>MUST</strong> be such that the
<a title="reconstructed tree" href=
"#reconstructed-tree">reconstructed tree</a> is the same as the
<a title="result tree" href="#result-tree">result tree</a> except
for the following permitted differences:</p>
<ul>
<li>
<p>If the document was produced by adding a document wrapper, as
described above, then it will contain an extra <code>doc</code>
element as the document element.</p>
</li>
<li>
<p>The order of attribute and namespace <a title="node" href=
"#dt-node">nodes</a> in the two trees <strong>MAY</strong> be
different.</p>
</li>
<li>
<p>The following properties of corresponding <a title="node" href=
"#dt-node">nodes</a> in the two trees <strong>MAY</strong> be
different:</p>
<ul>
<li>
<p>the base-uri property of document <a title="node" href=
"#dt-node">nodes</a> and element <a title="node" href=
"#dt-node">nodes</a>;</p>
</li>
<li>
<p>the document-uri and unparsed-entities properties of document
<a title="node" href="#dt-node">nodes</a>;</p>
</li>
<li>
<p>the type-name and typed-value properties of element and
attribute <a title="node" href="#dt-node">nodes</a>;</p>
</li>
<li>
<p>the nilled property of element <a title="node" href=
"#dt-node">nodes</a>;</p>
</li>
<li>
<p>the content property of text <a title="node" href=
"#dt-node">nodes</a>, due to the effect of the <code>indent</code>
and <code>use-character-maps</code> parameters.</p>
</li>
</ul>
</li>
<li>
<p>The <a title="reconstructed tree" href=
"#reconstructed-tree">reconstructed tree</a> <strong>MAY</strong>
contain additional attributes and text <a title="node" href=
"#dt-node">nodes</a> resulting from the expansion of default and
fixed values in its DTD or schema; also, in the presence of a DTD,
non-CDATA attributes may lose whitespace characters as a result of
attribute value normalization.</p>
</li>
<li>
<p>The type annotations of the <a title="node" href=
"#dt-node">nodes</a> in the two trees <strong>MAY</strong> be
different. Type annotations in a <a title="result tree" href=
"#result-tree">result tree</a> are discarded when the tree is
serialized. Any new type annotations obtained by parsing the
document will depend on whether the serialized XML document is
assessed against a schema, and this <strong>MAY</strong> result in
type annotations that are different from those in the original
<a title="result tree" href="#result-tree">result tree</a>.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>In order to influence the type annotations in the instance of
the data model that would result from processing a serialized XML
document, the author of the XSLT stylesheet, XQuery expression or
other process might wish to create the instance of the data model
that is input to the serialization process so that it makes use of
mechanisms provided by <a href="#xmlschema-1">[XML Schema]</a>,
such as <code>xsi:type</code> and <code>xsi:schemaLocation</code>
attributes. The serialization process will not automatically create
such attributes in the serialized document if those attributes were
not part of the <a title="result tree" href="#result-tree">result
tree</a> that is to be serialized.</p>
<p>Similarly, it is possible that an element <a title="node" href=
"#dt-node">node</a> in the instance of the data model that is to be
serialized has the <code>nilled</code> property with the value
<code>true</code>, but no <code>xsi:nil</code> attribute. The
serialization process will not create such an attribute in the
serialized document simply to reflect the value of the property.
The value of the <code>nilled</code> property has no direct effect
on the serialized result.</p>
</div>
</li>
<li>
<p>Additional namespace <a title="node" href="#dt-node">nodes</a>
<strong>MAY</strong> be present in the <a title=
"reconstructed tree" href="#reconstructed-tree">reconstructed
tree</a> if the serialization process did not undeclare one or more
namespaces, as described in <a href="#xml-undeclare-NS"><b>5.1.7
XML Output Method: the undeclare-prefixes Parameter</b></a>, and
the starting instance of the data model contained an element
<a title="node" href="#dt-node">node</a> with a namespace <a title=
"node" href="#dt-node">node</a> that declared some prefix, but a
child element of that <a title="node" href="#dt-node">node</a> did
not have any namespace <a title="node" href="#dt-node">node</a>
that declared the same prefix.</p>
<p>The <a title="result tree" href="#result-tree">result tree</a>
<strong>MAY</strong> contain namespace <a title="node" href=
"#dt-node">nodes</a> that are not present in the <a title=
"reconstructed tree" href="#reconstructed-tree">reconstructed
tree</a>, as the process of creating an instance of the data model
<strong>MAY</strong> ignore namespace declarations in some
circumstances. See <a href=
"http://www.w3.org/TR/xpath-datamodel-30/#const-infoset-element">Section
6.2.3 Construction from an Infoset</a>
<sup><small>DM30</small></sup> and <a href=
"http://www.w3.org/TR/xpath-datamodel-30/#const-psvi-element">Section
6.2.4 Construction from a PSVI</a> <sup><small>DM30</small></sup>
of <a href="#xpath-datamodel-30">[XQuery and XPath Data Model (XDM)
3.0]</a> for additional information.</p>
</li>
<li>
<p>If the <code>indent</code> parameter has the value
<code>yes</code>,</p>
<ul>
<li>
<p>additional text <a title="node" href="#dt-node">nodes</a>
consisting of whitespace characters <strong>MAY</strong> be present
in the <a title="reconstructed tree" href=
"#reconstructed-tree">reconstructed tree</a>; and</p>
</li>
<li>
<p>text <a title="node" href="#dt-node">nodes</a> in the <a title=
"result tree" href="#result-tree">result tree</a> that contained
only whitespace characters <strong>MAY</strong> correspond to text
<a title="node" href="#dt-node">nodes</a> in the <a title=
"reconstructed tree" href="#reconstructed-tree">reconstructed
tree</a> that contain additional whitespace characters that were
not present in the <a title="result tree" href=
"#result-tree">result tree</a></p>
</li>
</ul>
<p>See <a href="#xml-indent"><b>5.1.3 XML Output Method: the indent
and suppress-indentation Parameters</b></a> for more information on
the <code>indent</code> parameter.</p>
</li>
<li>
<p>Additional <a title="node" href="#dt-node">nodes</a>
<strong>MAY</strong> be present in the <a title=
"reconstructed tree" href="#reconstructed-tree">reconstructed
tree</a> due to the effect of character mapping in the character
expansion phase, and the values of attribute <a title="node" href=
"#dt-node">nodes</a> and text <a title="node" href=
"#dt-node">nodes</a> in the <a title="reconstructed tree" href=
"#reconstructed-tree">reconstructed tree</a> <strong>MAY</strong>
be different from those in the <a title="result tree" href=
"#result-tree">result tree</a>, due to the effects of URI
expansion, character mapping and <a title="Unicode Normalization"
href="#unicode-normalization">Unicode Normalization</a> in the
character expansion phase of serialization.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>The <code>use-character-maps</code> parameter can cause
arbitrary characters to be inserted into the serialized XML
document in an unescaped form, including characters that would be
considered to be part of XML markup. Such characters could result
in arbitrary new element <a title="node" href="#dt-node">nodes</a>,
attribute <a title="node" href="#dt-node">nodes</a>, and so on, in
the <a title="reconstructed tree" href=
"#reconstructed-tree">reconstructed tree</a> that results from
processing the serialized XML document.</p>
</div>
</li>
</ul>
<p>A consequence of this rule is that certain characters
<strong>MUST</strong> be output as character references, to ensure
that they survive the round trip through serialization and parsing.
Specifically, CR, NEL and LINE SEPARATOR characters in text
<a title="node" href="#dt-node">nodes</a> <strong>MUST</strong> be
output respectively as "<code>&amp;#xD;</code>",
"<code>&amp;#x85;</code>", and "<code>&amp;#x2028;</code>", or
their equivalents; while CR, NL, TAB, NEL and LINE SEPARATOR
characters in attribute <a title="node" href="#dt-node">nodes</a>
<strong>MUST</strong> be output respectively as
"<code>&amp;#xD;</code>", "<code>&amp;#xA;</code>",
"<code>&amp;#x9;</code>", "<code>&amp;#x85;</code>", and
"<code>&amp;#x2028;</code>", or their equivalents. In addition, the
non-whitespace control characters #x1 through #x1F and #x7F through
#x9F in text <a title="node" href="#dt-node">nodes</a> and
attribute <a title="node" href="#dt-node">nodes</a>
<strong>MUST</strong> be output as character references.</p>
<p>For example, an attribute with the value "x" followed by "y"
separated by a newline will result in the output
<code>"x&amp;#xA;y"</code> (or with any equivalent character
reference). The XML output cannot be "x" followed by a literal
newline followed by a "y" because after parsing, the attribute
value would be <code>"x y"</code> as a consequence of the XML
attribute normalization rules.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>XML 1.0 did not permit an XML processor to normalize NEL or LINE
SEPARATOR characters to a LINE FEED character. However, if a
document entity that specifies version 1.1 invokes an external
general parsed entity with no text declaration or a text
declaration that specifies version 1.0, the external parsed entity
is processed according to the rules of XML 1.1. For this reason,
NEL and LINE SEPARATOR characters in text and attribute <a title=
"node" href="#dt-node">nodes</a> must always be escaped using
character references, regardless of the value of the
<code>version</code> parameter.</p>
<p>XML 1.0 permitted control characters in the range #x7F through
#x9F to appear as literal characters in an XML document, but XML
1.1 requires such characters, other than NEL, to be escaped as
character references. An external general parsed entity with no
text declaration or a text declaration that specifies a version
pseudo-attribute with value <code>1.0</code> that is invoked by an
XML 1.1 document entity must follow the rules of XML 1.1.
Therefore, the non-whitespace control characters in the ranges #x1
through #x1F and #x7F through #x9F must always be escaped,
regardless of the value of the <code>version</code> parameter.</p>
</div>
<p>It is a <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSEPM0004"
title="err:SEPM0004">err:SEPM0004</a>] to specify the
doctype-system parameter, or to specify the standalone parameter
with a value other than <code>omit</code>, if the instance of the
data model contains text <a title="node" href="#dt-node">nodes</a>
or multiple element <a title="node" href="#dt-node">nodes</a> as
children of the root <a title="node" href="#dt-node">node</a>. The
<a title="serializer" href="#serializer">serializer</a>
<strong>MUST</strong> either signal the error, or recover by
ignoring the request to output a document type declaration or
<code>standalone</code> parameter.</p>
<div class="div2">
<h3><a name="XML_PARAMS" id="XML_PARAMS"></a>5.1 The Influence of
Serialization Parameters upon the XML Output Method</h3>
<div class="div3">
<h4><a name="XML_VERSION" id="XML_VERSION"></a>5.1.1 XML Output
Method: the <code>version</code> Parameter</h4>
<p>The <code>version</code> parameter specifies the version of XML
and the version of Namespaces in XML to be used for outputting the
instance of the data model. The version output in the XML
declaration (if an XML declaration is not omitted)
<strong>MUST</strong> correspond to the version of XML that the
<a title="serializer" href="#serializer">serializer</a> used for
outputting the instance of the data model. <span>The value of the
<code>version</code> parameter <strong>MUST</strong> match the
<a href="http://www.w3.org/TR/REC-xml/#NT-VersionNum">VersionNum
VersionNum VersionNum VersionNum</a><sup><small>XML</small></sup>
production of the XML Recommendation <a href="#xml">[XML10]</a> or
<a href="#xml11">[XML11]</a>.</span> A serialization error
[<a href="#ERRSESU0013" title="err:SESU0013">err:SESU0013</a>]
results if the value of the <code>version</code> parameter
specifies a version of XML that is not supported by the <a title=
"serializer" href="#serializer">serializer</a>; the <a title=
"serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal the error.</p>
<p>This document provides the normative definition of serialization
for the XML output method if the <code>version</code> parameter has
either the value <code>1.0</code> or <code>1.1</code>. For any
other value of <code>version</code> parameter, the behavior is
<a title="implementation-defined" href=
"#impdef">implementation-defined</a>. In that case the <a title=
"implementation-defined" href="#impdef">implementation-defined</a>
behavior <strong>MAY</strong> supersede all other requirements of
this recommendation.</p>
<p>If the serialized result would contain an <a href=
"http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName NCName
NCName NCName NCName NCName NCName NCName NCName
NCName</a><sup><small>Names</small></sup> that contains a character
that is not permitted by the version of Namespaces in XML specified
by the <code>version</code> parameter, a <a title=
"serialization error" href="#serial-err">serialization error</a>
[<a href="#ERRSERE0005" title="err:SERE0005">err:SERE0005</a>]
results. The <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST</strong> signal the
error.</p>
<p>If the serialized result would contain a character that is not
permitted by the version of XML specified by the
<code>version</code> parameter, a <a title="serialization error"
href="#serial-err">serialization error</a> [<a href="#ERRSERE0006"
title="err:SERE0006">err:SERE0006</a>] results. The <a title=
"serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal the error.</p>
<div class="exampleOuter">
<p>For example, if the <code>version</code> parameter has the value
<code>1.0</code>, and the instance of the data model contains a
non-whitespace control character in the range #x1 to #x1F, a
<a title="serialization error" href="#serial-err">serialization
error</a> [<a href="#ERRSERE0006" title=
"err:SERE0006">err:SERE0006</a>] results. If the
<code>version</code> parameter has the value <code>1.1</code> and a
comment <a title="node" href="#dt-node">node</a> in the instance of
the data model contains a non-whitespace control character in the
range #x1 to #x1F or a control character other than NEL in the
range #x7F to #x9F, a <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSERE0006"
title="err:SERE0006">err:SERE0006</a>] results.</p>
</div>
</div>
<div class="div3">
<h4><a name="XML_ENCODING" id="XML_ENCODING"></a>5.1.2 XML Output
Method: the <code>encoding</code> Parameter</h4>
<p>The <code>encoding</code> parameter specifies the encoding to be
used for outputting the instance of the data model. <a title=
"serializer" href="#serializer">Serializers</a> are
<strong>REQUIRED</strong> to support values of <code>UTF-8</code>
and <code>UTF-16</code>. A <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSESU0007"
title="err:SESU0007">err:SESU0007</a>] occurs if an output encoding
other than <code>UTF-8</code> or <code>UTF-16</code> is requested
and the <a title="serializer" href="#serializer">serializer</a>
does not support that encoding. The <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST</strong> signal the
error, or recover by using <code>UTF-8</code> or
<code>UTF-16</code> instead. The <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST NOT</strong> use an
encoding whose name does not match the <a href=
"http://www.w3.org/TR/REC-xml/#NT-EncName">EncName EncName EncName
EncName EncName EncName</a><sup><small>XML</small></sup> production
of the XML Recommendation <a href="#xml">[XML10]</a>.</p>
<p>When outputting a newline character in the instance of the data
model, the <a title="serializer" href="#serializer">serializer</a>
is free to represent it using any character sequence that will be
normalized to a newline character by an XML parser, unless a
specific mapping for the newline character is provided in a
character map (see <a href="#character-maps"><b>9 Character
Maps</b></a>).</p>
<p>When outputting any other character that is defined in the
selected encoding, the character <strong>MUST</strong> be output
using the correct representation of that character in the selected
encoding.</p>
<p>It is possible that the instance of the data model will contain
a character that cannot be represented in the encoding that the
<a title="serializer" href="#serializer">serializer</a> is using
for output. In this case, if the character occurs in a context
where XML recognizes character references (that is, in the value of
an attribute <a title="node" href="#dt-node">node</a> or text
<a title="node" href="#dt-node">node</a>), then the character
<strong>MUST</strong> be output as a character reference. A
<a title="serialization error" href="#serial-err">serialization
error</a> [<a href="#ERRSERE0008" title=
"err:SERE0008">err:SERE0008</a>] occurs if such a character appears
in a context where character references are not allowed (for
example, if the character occurs in the name of an element). The
<a title="serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal the error.</p>
<div class="exampleOuter">
<p>For example, if a text <a title="node" href="#dt-node">node</a>
contains the character LATIN SMALL LETTER E WITH ACUTE (#xE9), and
the value of the <code>encoding</code> parameter is
<code>US-ASCII</code>, the character <strong>MUST</strong> be
serialized as a character reference. If a comment <a title="node"
href="#dt-node">node</a> contains the same character, a <a title=
"serialization error" href="#serial-err">serialization error</a>
[<a href="#ERRSERE0008" title="err:SERE0008">err:SERE0008</a>]
results.</p>
</div>
</div>
<div class="div3">
<h4><a name="xml-indent" id="xml-indent"></a>5.1.3 XML Output
Method: the <code>indent</code> <span>and
<code>suppress-indentation</code></span> Parameters</h4>
<p>The <code>indent</code> and <code>suppress-indentation</code>
parameters control whether the serializer <strong>MAY</strong>
adjust the whitespace in the serialized result so that a person
will find it easier to read. If the <code>indent</code> parameter
has the value <code>yes</code>, the serializer <strong>MAY</strong>
output whitespace characters in addition to the whitespace
characters in the instance of the data model. It
<strong>MAY</strong> also elide from the output whitespace
characters that occurred in the instance of the data model or
replace such whitespace characters with other whitespace
characters.</p>
<p>[<a name="content" id="content" title="content">Definition</a>:
The term <b>content</b> has the same meaning as the term <a href=
"http://www.w3.org/TR/REC-xml/#dt-content">Content</a><sup><small>XML</small></sup>
defined in <a href=
"http://www.w3.org/TR/REC-xml/#sec-starttags">Section 3.1
Start-Tags, End-Tags, and Empty-Element
Tags</a><sup><small>XML</small></sup> of <a href=
"#xml">[XML10]</a>.] [<a name="immediate-content" id=
"immediate-content" title="immediate content">Definition</a>: The
<b>immediate content</b> of an element is the part of the <a title=
"content" href="#content">content</a> of the element that is not
also in the <a title="content" href="#content">content</a> of a
child element of that element.]</p>
<p>If the <code>indent</code> parameter has the value
<code>no</code>, the serializer <strong>MUST NOT</strong> output
any additional, elide or replace whitespace characters. If the
<code>indent</code> parameter has the value <code>yes</code>, the
serializer <strong>MUST</strong> use an algorithm for dealing with
whitespace characters that satisfies all of the following
constraints. <span>If more than one constraint applies, the
serializer must apply the most restrictive constraint. That is, if
any applicable constraint indicates that whitespace <strong>MUST
NOT</strong> be added, elided or replaced, that constraint
prevails; if an applicable constraint indicates that whitespace
<strong>SHOULD NOT</strong> be added, elided or replaced, while all
other applicable constraints indicate that whitespace
<strong>MAY</strong> be added, elided or replaced, whitespace
<strong>SHOULD NOT</strong> be added, elided or
replaced.</span></p>
<ul>
<li>
<p>Whitespace characters <span><strong>MAY</strong></span> be added
adjacent to a text <a title="node" href="#dt-node">node</a>
<span>only if the text node contains only whitespace characters.
Whitespace characters in such a text node <strong>MAY</strong> also
be elided or replaced. For example, a tab <strong>MAY</strong> be
inserted as a replacement for existing spaces</span>.</p>
</li>
<li>
<p>Whitespace characters <strong>MAY</strong> be added, elided or
replaced in the <a title="immediate content" href=
"#immediate-content">immediate content</a> of an element whose type
annotation is <code>xs:untyped</code> or <code>xs:anyType</code>
and that has element node children, in the <a title=
"immediate content" href="#immediate-content">immediate content</a>
of an element whose content model is element only, or outside the
<a title="content" href="#content">content</a> of any element.</p>
</li>
<li>
<p>Whitespace characters <strong>MUST NOT</strong> be added,
<span>elided or replaced</span> in the <a title="immediate content"
href="#immediate-content">immediate content</a> of an element whose
content model is <span>known to be simple or empty</span>.</p>
</li>
<li>
<p>Whitespace characters <strong>SHOULD NOT</strong> be added,
<span>elided or replaced</span> in places where the characters
would constitute significant whitespace, for example, in the
<a title="immediate content" href="#immediate-content">immediate
content</a> of an element <span>that is annotated with a type other
than <code>xs:untyped</code> or <code>xs:anyType</code>, and</span>
whose content model is known to be mixed.</p>
</li>
<li>
<p>Whitespace characters <strong>MUST NOT</strong> be added,
<span>elided or replaced</span> in the <span><a title="content"
href="#content">content</a></span> of an element whose expanded
QName is a member of the list of expanded QNames in the value of
the <code>suppress-indentation</code> parameter.</p>
</li>
<li>
<p>Whitespace characters <strong>MUST NOT</strong> be <span>added,
elided or replaced</span> in a part of the result document that is
controlled by an <code>xml:space</code> attribute with value
<code>preserve</code>. (See <a href="#xml">[XML10]</a> for more
information about the <code>xml:space</code> attribute.)</p>
</li>
</ul>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>The effect of these rules is to ensure that whitespace is only
added in places where (a) XSLT's
<code>&lt;xsl:strip-space&gt;</code> declaration could cause it to
be removed, and (b) it does not affect the <a title="string value"
href="#dt-string-value">string value</a> of any element <a title=
"node" href="#dt-node">node</a> with simple content. It is usually
not safe to indent document types that include elements with mixed
content.</p>
</div>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>The whitespace added may possibly be based on whitespace
stripped from either the source document or the stylesheet (in the
case of XSLT), or guided by other means that might depend on the
<a title="host language" href="#host-language">host language</a>,
in the case of an instance of the data model created using some
other process.</p>
</div>
</div>
<div class="div3">
<h4><a name="XML_CDATA-SECTION-ELEMENTS" id=
"XML_CDATA-SECTION-ELEMENTS"></a>5.1.4 XML Output Method: the
<code>cdata-section-elements</code> Parameter</h4>
<p>The <code>cdata-section-elements</code> parameter contains a
list of expanded QNames. If the expanded QName of the parent of a
text <a title="node" href="#dt-node">node</a> is a member of the
list, then the text <a title="node" href="#dt-node">node</a>
<strong>MUST</strong> be output as a CDATA section, except in those
circumstances described below.</p>
<p>If the text <a title="node" href="#dt-node">node</a> contains
the sequence of characters <code>]]&gt;</code>, then the currently
open CDATA section <strong>MUST</strong> be closed following the
<code>]]</code> and a new CDATA section opened before the
<code>&gt;</code>.</p>
<p>If the text <a title="node" href="#dt-node">node</a> contains
characters that are not representable in the character encoding
being used to output the instance of the data model, then the
currently open CDATA section <strong>MUST</strong> be closed before
such characters, the characters <strong>MUST</strong> be output
using character references or entity references, and a new CDATA
section <strong>MUST</strong> be opened for any further characters
in the text <a title="node" href="#dt-node">node</a>.</p>
<p>CDATA sections <strong>MUST NOT</strong> be used except where
they have been explicitly requested by the user, either by using
the <code>cdata-section-elements</code> parameter, or by using some
other <a title="implementation-defined" href=
"#impdef">implementation-defined</a> mechanism.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>This is phrased to permit an implementor to provide an option
that attempts to preserve CDATA sections present in the source
document.</p>
</div>
</div>
<div class="div3">
<h4><a name="XML_OMIT-XML-DECLARATION" id=
"XML_OMIT-XML-DECLARATION"></a>5.1.5 XML Output Method: the
<code>omit-xml-declaration</code> and <code>standalone</code>
Parameters</h4>
<p>The XML output method <strong>MUST</strong> output an XML
declaration if the <code>omit-xml-declaration</code> parameter has
the value <code>no</code>. The XML declaration
<strong>MUST</strong> include both version information and an
encoding declaration. If the <code>standalone</code> parameter has
the value <code>yes</code> or the value <code>no</code>, the XML
declaration <strong>MUST</strong> include a standalone document
declaration with the same value as the value of the
<code>standalone</code> parameter. If the <code>standalone</code>
parameter has the value <code>omit</code>, the XML declaration
<strong>MUST NOT</strong> include a standalone document
declaration; this ensures that it is both an XML declaration
(allowed at the beginning of a document entity) and a text
declaration (allowed at the beginning of an external general parsed
entity).</p>
<p>A <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSEPM0009"
title="err:SEPM0009">err:SEPM0009</a>] results if the
<code>omit-xml-declaration</code> parameter has the value
<code>yes</code>, and</p>
<ul>
<li>
<p>the <code>standalone</code> parameter has a value other than
<code>omit</code>; or</p>
</li>
<li>
<p>the <code>version</code> parameter has a value other than
<code>1.0</code> and the <code>doctype-system</code> parameter is
specified.</p>
</li>
</ul>
<p>The <a title="serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal the error.</p>
<p>Otherwise, if the <code>omit-xml-declaration</code> parameter
has the value <code>yes</code>, the XML output method <strong>MUST
NOT</strong> output an XML declaration.</p>
</div>
<div class="div3">
<h4><a name="XML_DOCTYPE" id="XML_DOCTYPE"></a>5.1.6 XML Output
Method: the <code>doctype-system</code> and
<code>doctype-public</code> Parameters</h4>
<p>If the <code>doctype-system</code> parameter is specified, the
XML output method <strong>MUST</strong> output a document type
declaration immediately before the first element. The name
following <code>&lt;!DOCTYPE</code> <strong>MUST</strong> be the
name of the first element, if any. If the
<code>doctype-public</code> parameter is also specified, then the
XML output method <strong>MUST</strong> output <code>PUBLIC</code>
followed by the public identifier and then the system identifier;
otherwise, it <strong>MUST</strong> output <code>SYSTEM</code>
followed by the system identifier. The internal subset
<strong>MUST</strong> be empty. The <code>doctype-public</code>
parameter <strong>MUST</strong> be ignored unless the
<code>doctype-system</code> parameter is specified.</p>
</div>
<div class="div3">
<h4><a name="xml-undeclare-NS" id="xml-undeclare-NS"></a>5.1.7 XML
Output Method: the <code>undeclare-prefixes</code> Parameter</h4>
<p>The Data Model allows an element <a title="node" href=
"#dt-node">node</a> that binds a non-empty prefix to have a child
element <a title="node" href="#dt-node">node</a> that does not bind
that same prefix. In <em>Namespaces in XML 1.1</em> (<a href=
"#xml-names11">[XML Names 1.1]</a>), this can be represented
accurately by undeclaring prefixes. For the undeclaring prefix of
the child element node, if the <code>undeclare-prefixes</code>
parameter has the value <code>yes</code>, the output method is XML
or XHTML, and the <code>version</code> parameter value is greater
than <code>1.0</code>, the <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST</strong> undeclare its
namespace. If the <code>undeclare-prefixes</code> parameter has the
value <code>no</code> and the output method is XML or XHTML, then
the undeclaration of prefixes <strong>MUST NOT</strong> occur.</p>
<div class="exampleOuter">
<p>Consider an element <code>x:foo</code> with four in-scope
namespaces that associate prefixes with URIs as follows:</p>
<ul>
<li>
<p><code>x</code> is associated with
<code>http://example.org/x</code></p>
</li>
<li>
<p><code>y</code> is associated with
<code>http://example.org/y</code></p>
</li>
<li>
<p><code>z</code> is associated with
<code>http://example.org/z</code></p>
</li>
<li>
<p><code>xml</code> is associated with
<code>http://www.w3.org/XML/1998/namespace</code></p>
</li>
</ul>
<p>Suppose that it has a child element <code>x:bar</code> with
three in-scope namespaces:</p>
<ul>
<li>
<p><code>x</code> is associated with
<code>http://example.org/x</code></p>
</li>
<li>
<p><code>y</code> is associated with
<code>http://example.org/y</code></p>
</li>
<li>
<p><code>xml</code> is associated with
<code>http://www.w3.org/XML/1998/namespace</code></p>
</li>
</ul>
<p>If namespace undeclaration is in effect, it will be serialized
this way:</p>
<div class="exampleInner">
<pre>
&lt;x:foo xmlns:x="http://example.org/x"
       xmlns:y="http://example.org/y"
       xmlns:z="http://example.org/z"&gt;
       
       &lt;x:bar xmlns:z=""&gt;...&lt;/x:bar&gt;
       
&lt;/x:foo&gt;
</pre></div>
</div>
<p>In <em>Namespaces in XML</em> 1.0 (<a href="#xml-names">[XML
Names]</a>), prefix undeclaration is not possible. If the output
method is XML or XHTML, the value of the
<code>undeclare-prefixes</code> parameter is <code>yes</code>, and
the value of the <code>version</code> parameter is
<code>1.0</code>, a <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSEPM0010"
title="err:SEPM0010">err:SEPM0010</a>] results; the <a title=
"serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal the error.</p>
</div>
<div class="div3">
<h4><a name="XML_NORMALIZATION-FORM" id=
"XML_NORMALIZATION-FORM"></a>5.1.8 XML Output Method: the
<code>normalization-form</code> Parameter</h4>
<p>The <code>normalization-form</code> parameter is applicable to
the XML output method. The values <code>NFC</code> and
<code>none</code> <strong>MUST</strong> be supported by the
<a title="serializer" href="#serializer">serializer</a>. A
<a title="serialization error" href="#serial-err">serialization
error</a> [<a href="#ERRSESU0011" title=
"err:SESU0011">err:SESU0011</a>] results if the value of the
<code>normalization-form</code> parameter specifies a normalization
form that is not supported by the <a title="serializer" href=
"#serializer">serializer</a>; the <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST</strong> signal the
error.</p>
<p>The meanings associated with the possible values of the
<code>normalization-form</code> parameter are as follows:</p>
<ul>
<li>
<p><code>NFC</code> specifies the serialized result will be in
Normalization Form C, using the rules specified in <a href=
"#charmod-norm">[Character Model for the World Wide Web 1.0:
Normalization]</a>.</p>
</li>
<li>
<p><code>NFD</code> specifies the serialized result will be in
Normalization Form D, as specified in <a href=
"#UNICODE-NORMALIZATION-FORM">[UAX #15: Unicode Normalization
Forms]</a>.</p>
</li>
<li>
<p><code>NFKC</code> specifies the serialized result will be in
Normalization Form KC, as specified in <a href=
"#UNICODE-NORMALIZATION-FORM">[UAX #15: Unicode Normalization
Forms]</a>.</p>
</li>
<li>
<p><code>NFKD</code> specifies the serialized result will be in
Normalization Form KD, as specified in <a href=
"#UNICODE-NORMALIZATION-FORM">[UAX #15: Unicode Normalization
Forms]</a>.</p>
</li>
<li>
<p><code>fully-normalized</code> specifies the serialized result
will be in fully normalized text, as specified in <a href=
"#charmod-norm">[Character Model for the World Wide Web 1.0:
Normalization]</a>.</p>
</li>
<li>
<p><code>none</code> specifies that no <a title=
"Unicode Normalization" href="#unicode-normalization">Unicode
Normalization</a> will be applied.</p>
</li>
<li>
<p>An <a title="implementation-defined" href=
"#impdef">implementation-defined</a> value has an <a title=
"implementation-defined" href="#impdef">implementation-defined</a>
effect.</p>
</li>
</ul>
<p>If the value of the parameter is <code>fully-normalized</code>,
then no <em>relevant construct</em> of the parsed entity created by
the <a title="serializer" href="#serializer">serializer</a> may
start with a composing character. The term <em>relevant
construct</em> has the meaning defined in section 2.13 of <a href=
"#xml11">[XML11]</a>. If this condition is not satisfied, a
<a title="serialization error" href="#serial-err">serialization
error</a> [<a href="#ERRSERE0012" title=
"err:SERE0012">err:SERE0012</a>] <strong>MUST</strong> be
signaled.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>Specifying <code>fully-normalized</code> as the value of this
parameter does not guarantee that the XML document output by the
<a title="serializer" href="#serializer">serializer</a> will in
fact be fully normalized as defined in <a href=
"#xml11">[XML11]</a>. This is because the <a title="serializer"
href="#serializer">serializer</a> does not check that the text is
<code>include normalized</code>, which would involve checking all
external entities that it refers to (such as an external DTD).
Furthermore, the <a title="serializer" href=
"#serializer">serializer</a> does not check whether any character
escape generated using character maps represents a composing
character.</p>
</div>
</div>
<div class="div3">
<h4><a name="XML_MEDIA-TYPE" id="XML_MEDIA-TYPE"></a>5.1.9 XML
Output Method: the <code>media-type</code> Parameter</h4>
<p>The <code>media-type</code> parameter is applicable to the XML
output method. See <a href="#serparam"><b>3 Serialization
Parameters</b></a> for more information.</p>
</div>
<div class="div3">
<h4><a name="XML_USE-CHARACTER-MAPS" id=
"XML_USE-CHARACTER-MAPS"></a>5.1.10 XML Output Method: the
<code>use-character-maps</code> Parameter</h4>
<p>The <code>use-character-maps</code> parameter is applicable to
the XML output method. The result of serialization using the XML
output method is not guaranteed to be well-formed XML if character
maps have been specified. See <a href="#character-maps"><b>9
Character Maps</b></a> for more information.</p>
</div>
<div class="div3">
<h4><a name="XML_BYTE-ORDER-MARK" id=
"XML_BYTE-ORDER-MARK"></a>5.1.11 XML Output Method: the
<code>byte-order-mark</code> Parameter</h4>
<p>The <code>byte-order-mark</code> parameter is applicable to the
XML output method. See <a href="#serparam"><b>3 Serialization
Parameters</b></a> for more information.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>The byte order mark may be undesirable under certain
circumstances; for example, to concatenate resulting XML fragments
without additional processing to remove the byte order mark.
Therefore this specification does not mandate the
<code>byte-order-mark</code> parameter to have the value
<code>yes</code> when the encoding is UTF-16, even though the XML
1.0 and XML 1.1 specifications state that entities encoded in
UTF-16 must begin with a byte order mark. Consequently, this
specification does not guarantee that the resulting XML fragment,
without a byte order mark, will not cause an error when processed
by a conforming XML processor.</p>
</div>
</div>
<div class="div3">
<h4><a name="XML_ESCAPE-URI-ATTRIBUTES" id=
"XML_ESCAPE-URI-ATTRIBUTES"></a>5.1.12 XML Output Method: the
<code>escape-uri-attributes</code> Parameter</h4>
<p>The <code>escape-uri-attributes</code> parameter is not
applicable to the XML output method. It is the responsibility of
the <a title="host language" href="#host-language">host
language</a> to specify whether an error occurs if this parameter
is specified in combination with the XML output method, or if the
parameter is simply dropped.</p>
</div>
<div class="div3">
<h4><a name="XML_INCLUDE-CONTENT-TYPE" id=
"XML_INCLUDE-CONTENT-TYPE"></a>5.1.13 XML Output Method: the
<code>include-content-type</code> Parameter</h4>
<p>The <code>include-content-type</code> parameter is not
applicable to the XML output method. It is the responsibility of
the <a title="host language" href="#host-language">host
language</a> to specify whether an error occurs if this parameter
is specified in combination with the XML output method, or if the
parameter is simply dropped.</p>
</div>
</div>
</div>
<div class="div1">
<h2><a name="xhtml-output" id="xhtml-output"></a>6 XHTML Output
Method</h2>
<p>The XHTML output method serializes the instance of the data
model as XML, using the HTML compatibility guidelines defined in
the XHTML specification.</p>
<p>It is entirely the responsibility of the person or process that
creates the instance of the data model to ensure that the instance
of the data model conforms to the <a href="#xhtml1">[XHTML 1.0]</a>
or <a href="#xhtml11">[XHTML 1.1]</a> specification. It is not an
error if the instance of the data model is invalid XHTML. Equally,
it is entirely under the control of the person or process that
creates the instance of the data model whether the output conforms
to XHTML 1.0 Strict, XHTML 1.0 Transitional, or any other specific
definition of XHTML.</p>
<p>The serialization of the instance of the data model follows the
same rules as for the XML output method, with the general
exceptions noted below and parameter-specific exceptions in
<a href="#XHTML_PARAMS"><b>6.1 The Influence of Serialization
Parameters upon the XHTML Output Method</b></a>. These differences
are based on the HTML compatibility guidelines published in
Appendix C of <a href="#xhtml1">[XHTML 1.0]</a>, which are designed
to ensure that as far as possible, XHTML is rendered correctly on
user agents designed originally to handle HTML.</p>
<ul>
<li>
<p>[<a name="XHTMLEMPTY" id="XHTMLEMPTY" title=
"EMPTY">Definition</a>: The following XHTML elements have an
<b>EMPTY</b> content model: <code>area</code>, <code>base</code>,
<code>br</code>, <code>col</code>, <code>hr</code>,
<code>img</code>, <code>input</code>, <code>link</code>,
<code>meta</code>, <code>basefont</code>, <code>frame</code>,
<code>isindex</code>, and <code>param</code>.] Given an empty
instance of an XHTML element whose content model is not <a title=
"EMPTY" href="#XHTMLEMPTY">EMPTY</a> (for example, an empty title
or paragraph) the <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST NOT</strong> use the
minimized form. That is, it <strong>MUST</strong> output
<code>&lt;p&gt;&lt;/p&gt;</code> and not
<code>&lt;p&#160;/&gt;</code>.</p>
</li>
<li>
<p><span>If an element that has no children is an XHTML element
with an <a title="EMPTY" href="#XHTMLEMPTY">EMPTY</a> content
model,</span> the <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST</strong> use the
minimized tag syntax, for example <code>&lt;br&#160;/&gt;</code>,
as the alternative syntax <code>&lt;br&gt;&lt;/br&gt;</code>
allowed by XML gives uncertain results in many existing user
agents. The <a title="serializer" href="#serializer">serializer</a>
<strong>MUST</strong> include a space before the trailing
<code>/&gt;</code>, e.g. <code>&lt;br&#160;/&gt;</code>,
<code>&lt;hr&#160;/&gt;</code> and
<code>&lt;img&#160;src="karen.jpg"&#160;alt="Karen"&#160;/&gt;</code>.</p>
</li>
<li>
<p>The <a title="serializer" href="#serializer">serializer</a>
<strong>MUST NOT</strong> use the entity reference
<code>&amp;apos;</code> which, although <span>defined</span> in XML
and therefore in XHTML, is not defined in HTML and is not
recognized by all HTML user agents.</p>
</li>
<li>
<p>The <a title="serializer" href="#serializer">serializer</a>
<strong>SHOULD</strong> output namespace declarations in a way that
is consistent with the requirements of the XHTML DTD if this is
possible. The XHTML 1.0 DTDs require the declaration
<code>xmlns="http://www.w3.org/1999/xhtml"</code> to appear on the
<code>html</code> element, and only on the <code>html</code>
element. The <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST</strong> output namespace
declarations that are consistent with the namespace <a title="node"
href="#dt-node">nodes</a> present in the <a title="result tree"
href="#result-tree">result tree</a>, but it <strong>MUST</strong>
avoid outputting redundant namespace declarations on elements where
the DTD would make them invalid.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>If the <code>html</code> element is generated by an XSLT literal
result element of the form <code>&lt;html
xmlns="http://www.w3.org/1999/xhtml"&gt; ... &lt;/html&gt;</code>,
or by an XQuery direct element constructor of the same form, then
the <code>html</code> element in the result document will have a
<a title="node" href="#dt-node">node</a> name whose prefix is "",
which will satisfy the requirements of the DTD. In other cases the
prefix assigned to the element is implementation-dependent.</p>
</div>
</li>
</ul>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>Appendix C of <a href="#xhtml1">[XHTML 1.0]</a> describes a
number of compatibility guidelines for users of XHTML who wish to
render their XHTML documents with HTML user agents. In some cases,
such as the guideline on the form empty elements should take, only
the serialization process itself has the ability to follow the
guideline. In such cases, those guidelines are reflected in the
requirements on the <a title="serializer" href=
"#serializer">serializer</a> described above.</p>
<p>In all other cases, the guidelines can be adhered to by the
instance of the data model that is input to the serialization
process. The guideline on the use of whitespace characters in
attribute values is one such example. Another example is that
<code>xml:lang="..."</code> does not serialize to both
<code>xml:lang="..."</code> and <code>lang="..."</code> as required
by some legacy user agents. It is the responsibility of the person
or process that creates the instance of the data model that is
input to the serialization process to ensure it is created in a way
that is consistent with the guidelines. No <a title=
"serialization error" href="#serial-err">serialization error</a>
results if the input instance of the data model does not adhere to
the guidelines.</p>
</div>
<div class="div2">
<h3><a name="XHTML_PARAMS" id="XHTML_PARAMS"></a>6.1 The Influence
of Serialization Parameters upon the XHTML Output Method</h3>
<div class="div3">
<h4><a name="XHTML_VERSION" id="XHTML_VERSION"></a>6.1.1 XHTML
Output Method: the <code>version</code> Parameter</h4>
<p>The behavior for <code>version</code> parameter for the XHTML
output method is described in <a href="#XML_VERSION"><b>5.1.1 XML
Output Method: the version Parameter</b></a>.</p>
</div>
<div class="div3">
<h4><a name="XHTML_ENCODING" id="XHTML_ENCODING"></a>6.1.2 XHTML
Output Method: the <code>encoding</code> Parameter</h4>
<p>The behavior for <code>encoding</code> parameter for the XHTML
output method is described in <a href="#XML_ENCODING"><b>5.1.2 XML
Output Method: the encoding Parameter</b></a>.</p>
</div>
<div class="div3">
<h4><a name="XHTML_INDENT" id="XHTML_INDENT"></a>6.1.3 XHTML Output
Method: the <code>indent</code> <span>and
<code>suppress-indentation</code></span> Parameters</h4>
<p>If the <code>indent</code> parameter has the value
<code>yes</code>, the serializer <strong>MAY</strong> add or remove
whitespace as it serializes the <a title="result tree" href=
"#result-tree">result tree</a>, <span>if it observes the following
constraints.</span></p>
<ul>
<li>
<p><span>Whitespace <strong>MUST NOT</strong> be added other than
before or after an element, or adjacent to an existing whitespace
character.</span></p>
</li>
<li>
<p><span>Whitespace <strong>MUST NOT</strong> be added or removed
adjacent to an inline element. The inline elements are those
elements in the XHTML namespace in the %inline category of any of
the XHTML 1.0 DTD's, in the %inline.class category of the XHTML 1.1
DTD, and elements in the XHTML namespace with local names
<code>ins</code> and <code>del</code> if they are used as inline
elements (i.e., if they do not contain element
children).</span></p>
</li>
<li>
<p><span>Whitespace <strong>MUST NOT</strong> be added or removed
inside a formatted element, the formatted elements being those in
the XHTML namespace with local names <code>pre</code>,
<code>script</code>, <code>style</code>, and
<code>textarea</code>.</span></p>
</li>
<li>
<p>Whitespace characters <strong>MUST NOT</strong> be added in the
content of an element whose expanded QName is a member of the list
of expanded QNames in the value of the
<code>suppress-indentation</code> parameter.</p>
</li>
</ul>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p><span>The effect of the above constraints is to ensure any
insertion or deletion of whitespace would not affect how a
conforming HTML user agent would render the output, assuming the
serialized document does not refer to any HTML style
sheets.</span></p>
<p>The HTML definition of whitespace is different from the XML
definition: see section 9.1 of <a href="#html401">[HTML]</a> 4.01
specification.</p>
</div>
</div>
<div class="div3">
<h4><a name="XHTML_CDATA-SECTION-ELEMENTS" id=
"XHTML_CDATA-SECTION-ELEMENTS"></a>6.1.4 XHTML Output Method: the
<code>cdata-section-elements</code> Parameter</h4>
<p>The behavior for <code>cdata-section-elements</code> parameter
for the XHTML output method is described in <a href=
"#XML_CDATA-SECTION-ELEMENTS"><b>5.1.4 XML Output Method: the
cdata-section-elements Parameter</b></a>.</p>
</div>
<div class="div3">
<h4><a name="XHTML_OMIT-XML-DECLARATION" id=
"XHTML_OMIT-XML-DECLARATION"></a>6.1.5 XHTML Output Method: the
<code>omit-xml-declaration</code> and <code>standalone</code>
Parameters</h4>
<p>The behavior for <code>omit-xml-declaration</code> and
<code>standalone</code> parameters for the XHTML output method is
described in <a href="#XML_OMIT-XML-DECLARATION"><b>5.1.5 XML
Output Method: the omit-xml-declaration and standalone
Parameters</b></a>.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>As with the XML output method, the XHTML output method specifies
that an XML declaration will be output unless it is suppressed
using the <code>omit-xml-declaration</code> parameter. Appendix C.1
of <a href="#xhtml1">[XHTML 1.0]</a> provides advice on the
consequences of including, or omitting, the XML declaration.</p>
</div>
</div>
<div class="div3">
<h4><a name="XHTML_DOCTYPE" id="XHTML_DOCTYPE"></a>6.1.6 XHTML
Output Method: the <code>doctype-system</code> and
<code>doctype-public</code> Parameters</h4>
<p>The behavior for <code>doctype-system</code> and
<code>doctype-public</code> parameters for the XHTML output method
is described in <a href="#XML_DOCTYPE"><b>5.1.6 XML Output Method:
the doctype-system and doctype-public Parameters</b></a>.</p>
</div>
<div class="div3">
<h4><a name="XHTML_UNDECLARE-PREFIXES" id=
"XHTML_UNDECLARE-PREFIXES"></a>6.1.7 XHTML Output Method: the
<code>undeclare-prefixes</code> Parameter</h4>
<p>The behavior for <code>undeclare-prefixes</code> parameter for
the XHTML output method is described in <a href=
"#xml-undeclare-NS"><b>5.1.7 XML Output Method: the
undeclare-prefixes Parameter</b></a>.</p>
</div>
<div class="div3">
<h4><a name="XHTML_NORMALIZATION-FORM" id=
"XHTML_NORMALIZATION-FORM"></a>6.1.8 XHTML Output Method: the
<code>normalization-form</code> Parameter</h4>
<p>The behavior for <code>normalization-form</code> parameter for
the XHTML output method is described in <a href=
"#XML_NORMALIZATION-FORM"><b>5.1.8 XML Output Method: the
normalization-form Parameter</b></a>.</p>
</div>
<div class="div3">
<h4><a name="XHTML_MEDIA-TYPE" id="XHTML_MEDIA-TYPE"></a>6.1.9
XHTML Output Method: the <code>media-type</code> Parameter</h4>
<p>The behavior for <code>media-type</code> parameter for the XHTML
output method is described in <a href="#XML_MEDIA-TYPE"><b>5.1.9
XML Output Method: the media-type Parameter</b></a>.</p>
</div>
<div class="div3">
<h4><a name="XHTML_USE-CHARACTER-MAPS" id=
"XHTML_USE-CHARACTER-MAPS"></a>6.1.10 XHTML Output Method: the
<code>use-character-maps</code> Parameter</h4>
<p>The behavior for <code>use-character-maps</code> parameter for
the XHTML output method is described in <a href=
"#XML_USE-CHARACTER-MAPS"><b>5.1.10 XML Output Method: the
use-character-maps Parameter</b></a>.</p>
</div>
<div class="div3">
<h4><a name="XHTML_BYTE-ORDER-MARK" id=
"XHTML_BYTE-ORDER-MARK"></a>6.1.11 XHTML Output Method: the
<code>byte-order-mark</code> Parameter</h4>
<p>The behavior for <code>byte-order-mark</code> parameter for the
XHTML output method is described in <a href=
"#XML_BYTE-ORDER-MARK"><b>5.1.11 XML Output Method: the
byte-order-mark Parameter</b></a>.</p>
</div>
<div class="div3">
<h4><a name="XHTML_ESCAPE-URI-ATTRIBUTES" id=
"XHTML_ESCAPE-URI-ATTRIBUTES"></a>6.1.12 XHTML Output Method: the
<code>escape-uri-attributes</code> Parameter</h4>
<p>If the <code>escape-uri-attributes</code> parameter has the
value <code>yes</code>, the XHTML output method
<strong>MUST</strong> apply <a title="URI Escaping" href=
"#uri-escaping">URI escaping</a> to <a title="URI attribute values"
href="#uri-attribute-values">URI attribute values</a>, except that
relative URIs <strong>MUST NOT</strong> be absolutized.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>This escaping is deliberately confined to non-ASCII characters,
because escaping of ASCII characters is not always appropriate, for
example when URIs or URI fragments are interpreted locally by the
HTML user agent. Even in the case of non-ASCII characters, escaping
can sometimes cause problems. More precise control of <a title=
"URI Escaping" href="#uri-escaping">URI escaping</a> is therefore
available by setting <code>escape-uri-attributes</code> to
<code>no</code>, and controlling the escaping of URIs by using
methods defined in <a href=
"http://www.w3.org/TR/xpath-functions-30/#func-encode-for-uri">Section
6.2 fn:encode-for-uri</a> <sup><small>FO30</small></sup> and
<a href=
"http://www.w3.org/TR/xpath-functions-30/#func-iri-to-uri">Section
6.3 fn:iri-to-uri</a> <sup><small>FO30</small></sup>.</p>
</div>
</div>
<div class="div3">
<h4><a name="XHTML_INCLUDE-CONTENT-TYPE" id=
"XHTML_INCLUDE-CONTENT-TYPE"></a>6.1.13 XHTML Output Method: the
<code>include-content-type</code> Parameter</h4>
<p>If the instance of the data model includes a <code>head</code>
element in the XHTML namespace, and the
<code>include-content-type</code> parameter has the value
<code>yes</code>, the XHTML output method <strong>MUST</strong> add
a <code>meta</code> element as the first child element of the
<code>head</code> element, specifying the character encoding
actually used.</p>
<div class="exampleOuter">
<p>For example,</p>
<div class="exampleInner">
<pre>
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" /&gt;
...
</pre></div>
</div>
<p>The content type <strong>SHOULD</strong> be set to the value
given for the <code>media-type</code> parameter.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>It is recommended that the <a title="host language" href=
"#host-language">host language</a> use as default value for this
parameter one of the MIME types (<a href="#RFC2046">[RFC2046]</a>)
registered for XHTML. Currently, these are <code>text/html</code>
(registered by <a href="#RFC2854">[RFC2854]</a>) and
<code>application/xhtml+xml</code> (registered by <a href=
"#RFC3236">[RFC3236]</a>). Note that some user agents fail to
recognize the charset parameter if the content type is not
<code>text/html</code>.</p>
</div>
<p>If a <code>meta</code> element has been added to the
<code>head</code> element as described above, then any existing
<code>meta</code> element child of the <code>head</code> element
having an <code>http-equiv</code> attribute with the value
"Content-Type", making the comparison <span><a title=
"without regard to case" href="#caseless-compare">without regard to
case</a> after first stripping leading and trailing spaces from the
value of the attribute solely for the purposes of
comparison,</span> <strong>MUST</strong> be discarded.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>This process removes possible parameters in the attribute value.
For example,</p>
<div class="exampleInner">
<pre>
&lt;meta http-equiv="Content-Type" content="text/html;version='3.0'" /&gt;
</pre></div>
<p>in the data model instance would be replaced by,</p>
<div class="exampleInner">
<pre>
&lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8" /&gt;
</pre></div>
</div>
</div>
</div>
</div>
<div class="div1">
<h2><a name="html-output" id="html-output"></a>7 HTML Output
Method</h2>
<p>The HTML output method serializes the instance of the data model
as HTML.</p>
<div class="exampleOuter">
<p>For example, the following XSL stylesheet generates html
output,</p>
<div class="exampleInner">
<pre>
&lt;xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
&lt;xsl:output method="html" version="4.0"/&gt;
&lt;xsl:template match="/"&gt;
  &lt;html&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/html&gt;
&lt;/xsl:template&gt;
...
&lt;/xsl:stylesheet&gt;
</pre></div>
</div>
<p>In the example, the <code>version</code> attribute of the
<code>xsl:output</code> element indicates the version of the HTML
Recommendation <a href="#html401">[HTML]</a> to which the
serialized result is to conform.</p>
<p>It is entirely the responsibility of the person or process that
creates the instance of the data model to ensure that the instance
of the data model conforms to the HTML Recommendation <a href=
"#html401">[HTML]</a>. It is not an error if the instance of the
data model is invalid HTML. Equally, it is entirely under the
control of the person or process that creates the instance of the
data model whether the output conforms to HTML. <span>If the result
tree is valid HTML, the serializer <strong>MUST</strong> serialize
the result in a way that conforms with the version of HTML
specified by the <code>version</code> serialization
parameter.</span></p>
<table border="1" summary="Editorial note">
<tr>
<td align="left" valign="top" width="50%"><b>Editorial
note</b></td>
<td align="right" valign="top" width="50%">&#160;</td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">Need to take into account
HTML 5.0, per request made in <a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=6129">Bugzilla bug
6129</a>.</td>
</tr>
</table>
<div class="div2">
<h3><a name="HTML_MARKUP" id="HTML_MARKUP"></a>7.1 Markup for
Elements</h3>
<p><span>As is described in detail below, the</span> HTML output
method <span>will not</span> output an element differently from the
XML output method unless the expanded QName of the element has a
<a title="null namespace URI" href="#null-namespace-URI">null
namespace URI</a>. [<a name="XML-ISLAND" id="XML-ISLAND" title=
"XML Island">Definition</a>: The portion of the serialized document
representing the result of serializing an element whose expanded
QName does not have a <a title="null namespace URI" href=
"#null-namespace-URI">null namespace URI</a>, is known as an <b>XML
Island.</b>] If the expanded QName of the element has a <a title=
"null namespace URI" href="#null-namespace-URI">null namespace
URI</a>, but the local part of the expanded QName is not recognized
as the name of an HTML element, the element <strong>MUST</strong>
be output in the same way as a non-empty, inline element such as
<code>span</code>. In particular:</p>
<ol class="enumar">
<li>
<p>If the <a title="result tree" href="#result-tree">result
tree</a> contains namespace <a title="node" href=
"#dt-node">nodes</a> for namespaces other than the XML namespace,
the HTML output method <strong>MUST</strong> represent these
namespaces using attributes named <code>xmlns</code> or
<code>xmlns:</code><em>prefix</em> in the same way as the XML
output method would represent them when the <code>version</code>
parameter is set to <code>1.0</code>.</p>
</li>
<li>
<p>If the <a title="result tree" href="#result-tree">result
tree</a> contains elements or attributes whose names have a
<a title="non-null namespace URI" href=
"#non-null-namespace-URI">non-null namespace URI</a>, the HTML
output method <strong>MUST</strong> generate namespace-prefixed
QNames for these <a title="node" href="#dt-node">nodes</a> in the
same way as the XML output method would do when the
<code>version</code> parameter is set to <code>1.0</code>.</p>
</li>
<li>
<p>Where special rules are defined later in this section for
serializing specific HTML elements and attributes, these rules
<strong>MUST NOT</strong> be applied to an element or attribute
whose name has a <a title="non-null namespace URI" href=
"#non-null-namespace-URI">non-null namespace URI</a>. However, the
generic rules for the HTML output method that apply to all elements
and attributes, for example the rules for escaping special
characters in the text and the rules for indentation,
<strong>MUST</strong> be used also for namespaced elements and
attributes.</p>
</li>
<li>
<p>When serializing an element whose name is not defined in the
HTML specification, but that is in the null namespace, the HTML
output method <strong>MUST</strong> apply the same rules (for
example, indentation rules) as when serializing a <code>span</code>
element. The descendants of such an element <strong>MUST</strong>
be serialized as if they were descendants of a <code>span</code>
element.</p>
</li>
<li>
<p>When serializing an element whose name is in a non-null
namespace, the HTML output method <strong>MUST</strong> apply the
same rules (for example, indentation rules) as when serializing a
<code>div</code> element. The descendants of such an element
<strong>MUST</strong> be serialized as if they were descendants of
a <code>div</code> element. <span>, except for the influence of the
<code>cdata-section-elements</code> serialization parameter on any
text node children of the element.</span></p>
</li>
</ol>
<p>The HTML output method <strong>MUST NOT</strong> output an
end-tag for an <span>empty element if the element type has an empty
content model.</span> For HTML 4.0, the <span>element types that
have an empty content model are</span> <code>area</code>,
<code>base</code>, <code>basefont</code>, <code>br</code>,
<code>col</code>, <code>frame</code>, <code>hr</code>,
<code>img</code>, <code>input</code>, <code>isindex</code>,
<code>link</code>, <code>meta</code> and <code>param</code>. For
example, an element written as <code>&lt;br/&gt;</code> or
<code>&lt;br&gt;&lt;/br&gt;</code> in an XSLT stylesheet
<strong>MUST</strong> be output as <code>&lt;br&gt;</code>.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>The markup generation step of the <a title="" href=
"#serphases">phases of serialization</a> only creates start tags
and end tags for the HTML output method, never XML-style empty
element tags. As such, a serializer MUST serialize an HTML element
that has no children, but whose content model is not empty, using a
pair of adjacent start and end element tags, or as a solitary start
tag if the permitted by the context.</p>
</div>
<p>The HTML output method <strong>MUST</strong> recognize the names
of HTML elements <span>making the comparison <a title=
"without regard to case" href="#caseless-compare">without regard to
case</a>.</span> For example, elements named <code>br</code>,
<code>BR</code> or <code>Br</code> <strong>MUST</strong> all be
recognized as the HTML <code>br</code> element and output without
an end-tag.</p>
<p>The HTML output method <strong>MUST NOT</strong> perform
escaping for <span>any text node descendant, nor for any attribute
of an element node descendant,</span> of <span>a</span>
<code>script</code> <span>or</span> <code>style</code>
<span>element</span>.</p>
<div class="exampleOuter">
<p>For example, a <code>script</code> element created by an XQuery
direct element constructor or an XSLT literal result element, such
as:</p>
<div class="exampleInner">
<pre>
&lt;script&gt;if (a &amp;lt; b) foo()&lt;/script&gt;
</pre></div>
<p>or</p>
<div class="exampleInner">
<pre>
&lt;script&gt;&lt;![CDATA[if (a &lt; b) foo()]]&gt;&lt;/script&gt;
</pre></div>
<p><strong>MUST</strong> be output as</p>
<div class="exampleInner">
<pre>
&lt;script&gt;if (a &lt; b) foo()&lt;/script&gt;
</pre></div>
</div>
<div class="exampleOuter">
<p>A common requirement is to output a <code>script</code> element
as shown in the example below:</p>
<div class="exampleInner">
<pre>
&lt;script type="application/ecmascript"&gt;
      document.write ("&lt;em&gt;This won't work&lt;/em&gt;")
&lt;/script&gt;
</pre></div>
<p>This is <span>invalid</span> HTML, for the reasons explained in
section B.3.2 of the <a href="#html401">[HTML]</a> 4.01
specification. Nevertheless, it is possible to output this
fragment, using either of the following constructs:</p>
<p>Firstly, by use of a <code>script</code> element created by an
XQuery direct element constructor or an XSLT literal result
element:</p>
<div class="exampleInner">
<pre>
&lt;script type="application/ecmascript"&gt;
      document.write ("&lt;em&gt;This won't work&lt;/em&gt;")
&lt;/script&gt;
</pre></div>
<p>Secondly, by constructing the markup from ordinary text
characters:</p>
<div class="exampleInner">
<pre>
&lt;script type="application/ecmascript"&gt;
      document.write ("&amp;lt;em&amp;gt;This won't work&amp;lt;/em&amp;gt;")
&lt;/script&gt;
</pre></div>
<p>As the <a href="#html401">[HTML]</a> specification points out,
the correct way to write this is to use the escape conventions for
the specific scripting language. For JavaScript, it can be written
as:</p>
<div class="exampleInner">
<pre>
&lt;script type="application/ecmascript"&gt;
      document.write ("&amp;lt;em&amp;gt;This will work&amp;lt;\/em&amp;gt;")
&lt;/script&gt;
</pre></div>
<p>The <a href="#html401">[HTML]</a> 4.01 specification also shows
examples of how to write this in various other scripting languages.
The escaping <strong>MUST</strong> be done manually; it will not be
done by the <a title="serializer" href=
"#serializer">serializer</a>.</p>
</div>
</div>
<div class="div2">
<h3><a name="HTML_ATTRIBS" id="HTML_ATTRIBS"></a>7.2 Writing
Attributes</h3>
<p>The HTML output method <strong>MUST NOT</strong> escape
"<code>&lt;</code>" characters occurring in attribute values.</p>
<p>A boolean attribute is an attribute with only a single allowed
value in any of the HTML DTDs, where the allowed value is equal
without regard to case to the name of the attribute. The HTML
output method MUST output any boolean attribute in minimized form
if and only if the value of the attribute node actually is equal to
the name of the attribute <span>making the comparison <a title=
"without regard to case" href="#caseless-compare">without regard to
case</a></span>.</p>
<div class="exampleOuter">
<p>For example, a start-tag created using the following XQuery
direct element constructor or XSLT literal result element</p>
<div class="exampleInner">
<pre>
&lt;OPTION selected="selected"&gt;
</pre></div>
<p><strong>MUST</strong> be output as</p>
<div class="exampleInner">
<pre>
&lt;OPTION selected&gt;
</pre></div>
</div>
<p>The HTML output method <strong>MUST NOT</strong> escape a
<code>&amp;</code> character occurring in an attribute value
immediately followed by a <code>{</code> character (see <a href=
"http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.7.1.1">Section
B.7.1</a> of the HTML Recommendation <a href=
"#html401">[HTML]</a>).</p>
<div class="exampleOuter">
<p>For example, a start-tag created using the following XQuery
direct element constructor or XSLT literal result element</p>
<div class="exampleInner">
<pre>
&lt;BODY bgcolor='&amp;amp;{{randomrbg}};'&gt;
</pre></div>
<p><strong>MUST</strong> be output as</p>
<div class="exampleInner">
<pre>
&lt;BODY bgcolor='&amp;{randomrbg};'&gt;
</pre></div>
</div>
<p>See <a href="#HTML_PARAMS"><b>7.4 The Influence of Serialization
Parameters upon the HTML Output Method</b></a> for additional
directives on how attributes may be written.</p>
</div>
<div class="div2">
<h3><a name="HTML_CHARDATA" id="HTML_CHARDATA"></a>7.3 Writing
Character Data</h3>
<p>The HTML output method <strong>MAY</strong> output a character
using a character entity reference in preference to using a numeric
character reference, if an entity is defined for the character in
the version of HTML that the output method is using. Entity
references and character references <strong>SHOULD</strong> be used
only where the character is not present in the selected encoding,
or where the visual representation of the character is unclear (as
with <code>&amp;nbsp;</code>, for example).</p>
<p>When outputting a sequence of whitespace characters in the
instance of the data model, within an element where whitespace is
treated normally (but not in elements such as <code>pre</code> and
<code>textarea</code>), the HTML output method <strong>MAY</strong>
represent it using any sequence of whitespace that will be treated
in the same way by an HTML user agent. See section 3.5 of <a href=
"#xhtml-modularization">[XHTML Modularization]</a> for some
additional information on handling of whitespace by an HTML user
agent.</p>
<p>Certain characters are <span>permitted</span> in XML, but not in
HTML <span>— for example, the control characters #x7F-#x9F, are
<span>permitted</span> in both XML 1.0 and XML 1.1, and the control
characters #x1-#x8, #xB, #xC and #xE-#x1F are
<span>permitted</span> in XML 1.1, but none of these is permitted
in HTML</span>. It is a <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSERE0014"
title="err:SERE0014">err:SERE0014</a>] to use the HTML output
method when such characters appear in the instance of the data
model. The <a title="serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal the error.</p>
<p>The HTML output method <strong>MUST</strong> terminate
processing instructions with <code>&gt;</code> rather than
<code>?&gt;</code>. It is a <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSERE0015"
title="err:SERE0015">err:SERE0015</a>] to use the HTML output
method when <code>&gt;</code> appears within a processing
instruction in the data model instance being serialized.</p>
</div>
<div class="div2">
<h3><a name="HTML_PARAMS" id="HTML_PARAMS"></a>7.4 The Influence of
Serialization Parameters upon the HTML Output Method</h3>
<div class="div3">
<h4><a name="HTML_VERSION" id="HTML_VERSION"></a>7.4.1 HTML Output
Method: the <code>version</code> Parameter</h4>
<p>The <code>version</code> attribute indicates the version of the
HTML Recommendation <a href="#html401">[HTML]</a> to which the
serialized result is to conform. If the <a title="serializer" href=
"#serializer">serializer</a> does not support the version of HTML
specified by this parameter, it <strong>MUST</strong> signal a
<a title="serialization error" href="#serial-err">serialization
error</a> [<a href="#ERRSESU0013" title=
"err:SESU0013">err:SESU0013</a>].</p>
<p>This document provides the normative definition of serialization
for the HTML output method if the version parameter has the lexical
form of a value of type decimal whose value is 1.0 or greater, but
no greater than 4.01. For any other value of version parameter, the
behavior is <a title="implementation-defined" href=
"#impdef">implementation-defined</a>. In that case the <a title=
"implementation-defined" href="#impdef">implementation-defined</a>
behavior <strong>MAY</strong> supersede all other requirements of
this recommendation.</p>
</div>
<div class="div3">
<h4><a name="HTML_ENCODING" id="HTML_ENCODING"></a>7.4.2 HTML
Output Method: the <code>encoding</code> Parameter</h4>
<p>The <code>encoding</code> parameter specifies the encoding to be
used. <a title="serializer" href="#serializer">Serializers</a> are
<strong>REQUIRED</strong> to support values of <code>UTF-8</code>
and <code>UTF-16</code>. A <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSESU0007"
title="err:SESU0007">err:SESU0007</a>] occurs if an output encoding
other than <code>UTF-8</code> or <code>UTF-16</code> is requested
and the <a title="serializer" href="#serializer">serializer</a>
does not support that encoding. The <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST</strong> signal the
error.</p>
<p>It is possible that the instance of the data model will contain
a character that cannot be represented in the encoding that the
<a title="serializer" href="#serializer">serializer</a> is using
for output. In this case, if the character occurs in a context
where HTML recognizes character references, then the character
<strong>MUST</strong> be output as a character entity reference or
decimal numeric character reference; otherwise (for example, in a
<code>script</code> or <code>style</code> element or in a comment),
the <a title="serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal a <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSERE0008"
title="err:SERE0008">err:SERE0008</a>].</p>
<p>See <a href="#HTML_INCLUDE-CONTENT-TYPE"><b>7.4.13 HTML Output
Method: the include-content-type Parameter</b></a> regarding how
this parameter is used with the <code>include-content-type</code>
parameter.</p>
</div>
<div class="div3">
<h4><a name="HTML_INDENT" id="HTML_INDENT"></a>7.4.3 HTML Output
Method: the <code>indent</code> <span>and
<code>suppress-indentation</code></span> Parameters</h4>
<p>If the <code>indent</code> parameter has the value
<code>yes</code>, then the HTML output method <strong>MAY</strong>
add or remove whitespace as it serializes the <a title=
"result tree" href="#result-tree">result tree</a>, <span>if it
observes the following constraints.</span></p>
<ul>
<li>
<p><span>Whitespace <strong>MUST NOT</strong> be added other than
before or after an element, or adjacent to an existing whitespace
character.</span></p>
</li>
<li>
<p><span>Whitespace <strong>MUST NOT</strong> be added or removed
adjacent to an inline element. The inline elements are those
included in the <code>%inline</code> category of any of the HTML
4.01 DTD's, as well as the <code>ins</code> and <code>del</code>
elements if they are used as inline elements (i.e., if they do not
contain element children).</span></p>
</li>
<li>
<p><span>Whitespace <strong>MUST NOT</strong> be added or removed
inside a formatted element, the formatted elements being
<code>pre</code>, <code>script</code>, <code>style</code>, and
<code>textarea</code>.</span></p>
</li>
<li>
<p>Whitespace characters <strong>MUST NOT</strong> be added in the
content of an element whose expanded QName is a member of the list
of expanded QNames in the value of the
<code>suppress-indentation</code> parameter.</p>
</li>
</ul>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p><span>The effect of the above constraints is to ensure any
insertion or deletion of whitespace would not affect how a
conforming HTML user agent would render the output, assuming the
serialized document does not refer to any HTML style
sheets.</span></p>
<p>Note that the HTML definition of whitespace is different from
the XML definition (see section 9.1 of the <a href=
"#html401">[HTML]</a> specification).</p>
</div>
</div>
<div class="div3">
<h4><a name="HTML_CDATA-SECTION-ELEMENTS" id=
"HTML_CDATA-SECTION-ELEMENTS"></a>7.4.4 HTML Output Method: the
<code>cdata-section-elements</code> Parameter</h4>
<p>The <code>cdata-section-elements</code> parameter is not
applicable to the HTML output method, except in the case of
<a title="XML Island" href="#XML-ISLAND">XML Islands</a>.</p>
</div>
<div class="div3">
<h4><a name="HTML_OMIT-XML-DECLARATION" id=
"HTML_OMIT-XML-DECLARATION"></a>7.4.5 HTML Output Method: the
<code>omit-xml-declaration</code> and <code>standalone</code>
Parameters</h4>
<p>The <code>omit-xml-declaration</code> and
<code>standalone</code> parameters are not applicable to the HTML
output method.</p>
</div>
<div class="div3">
<h4><a name="HTML_DOCTYPE" id="HTML_DOCTYPE"></a>7.4.6 HTML Output
Method: the <code>doctype-system</code> and
<code>doctype-public</code> Parameters</h4>
<p>If the <code>doctype-public</code> or
<code>doctype-system</code> parameters are specified, then the HTML
output method <strong>MUST</strong> output a document type
declaration immediately before the first element. The name
following <code>&lt;!DOCTYPE</code> <strong>MUST</strong> be
<code>HTML</code> or <code>html</code>. If the
<code>doctype-public</code> parameter is specified, then the output
method <strong>MUST</strong> output <code>PUBLIC</code> followed by
the specified public identifier; if the <code>doctype-system</code>
parameter is also specified, it <strong>MUST</strong> also output
the specified system identifier following the public identifier. If
the <code>doctype-system</code> parameter is specified but the
<code>doctype-public</code> parameter is not specified, then the
output method <strong>MUST</strong> output <code>SYSTEM</code>
followed by the specified system identifier.</p>
</div>
<div class="div3">
<h4><a name="HTML_UNDECLARE-PREFIXES" id=
"HTML_UNDECLARE-PREFIXES"></a>7.4.7 HTML Output Method: the
<code>undeclare-prefixes</code> Parameter</h4>
<p>The <code>undeclare-prefixes</code> parameter is not applicable
to the HTML output method.</p>
</div>
<div class="div3">
<h4><a name="HTML_NORMALIZATION-FORM" id=
"HTML_NORMALIZATION-FORM"></a>7.4.8 HTML Output Method: the
<code>normalization-form</code> Parameter</h4>
<p>The <code>normalization-form</code> parameter is applicable to
the HTML output method. The values <code>NFC</code> and
<code>none</code> <strong>MUST</strong> be supported by the
<a title="serializer" href="#serializer">serializer</a>. A
<a title="serialization error" href="#serial-err">serialization
error</a> [<a href="#ERRSESU0011" title=
"err:SESU0011">err:SESU0011</a>] results if the value of the
<code>normalization-form</code> parameter specifies a normalization
form that is not supported by the <a title="serializer" href=
"#serializer">serializer</a>; the <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST</strong> signal the
error.</p>
</div>
<div class="div3">
<h4><a name="HTML_MEDIA-TYPE" id="HTML_MEDIA-TYPE"></a>7.4.9 HTML
Output Method: the <code>media-type</code> Parameter</h4>
<p>The <code>media-type</code> parameter is applicable to the HTML
output method. See <a href="#serparam"><b>3 Serialization
Parameters</b></a> for more information. See <a href=
"#HTML_INCLUDE-CONTENT-TYPE"><b>7.4.13 HTML Output Method: the
include-content-type Parameter</b></a> regarding how this parameter
is used with the <code>include-content-type</code> parameter.</p>
</div>
<div class="div3">
<h4><a name="HTML_USE-CHARACTER-MAPS" id=
"HTML_USE-CHARACTER-MAPS"></a>7.4.10 HTML Output Method: the
<code>use-character-maps</code> Parameter</h4>
<p>The <code>use-character-maps</code> parameter is applicable to
the HTML output method. See <a href="#character-maps"><b>9
Character Maps</b></a> for more information.</p>
</div>
<div class="div3">
<h4><a name="HTML_BYTE-ORDER-MARK" id=
"HTML_BYTE-ORDER-MARK"></a>7.4.11 HTML Output Method: the
<code>byte-order-mark</code> Parameter</h4>
<p>The <code>byte-order-mark</code> parameter is applicable to the
HTML output method. See <a href="#serparam"><b>3 Serialization
Parameters</b></a> for more information.</p>
</div>
<div class="div3">
<h4><a name="HTML_ESCAPE-URI-ATTRIBUTES" id=
"HTML_ESCAPE-URI-ATTRIBUTES"></a>7.4.12 HTML Output Method: the
<code>escape-uri-attributes</code> Parameter</h4>
<p>If the <code>escape-uri-attributes</code> parameter has the
value <code>yes</code>, the HTML output method
<strong>MUST</strong> apply <a title="URI Escaping" href=
"#uri-escaping">URI escaping</a> to <a title="URI attribute values"
href="#uri-attribute-values">URI attribute values</a>, except that
relative URIs <strong>MUST NOT</strong> be absolutized.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>This escaping is deliberately confined to non-ASCII characters,
because escaping of ASCII characters is not always appropriate, for
example when URIs or URI fragments are interpreted locally by the
HTML user agent. Even in the case of non-ASCII characters, escaping
can sometimes cause problems. More precise control of <a title=
"URI Escaping" href="#uri-escaping">URI escaping</a> is therefore
available by setting <code>escape-uri-attributes</code> to
<code>no</code>, and controlling the escaping of URIs by using
methods defined in <a href=
"http://www.w3.org/TR/xpath-functions-30/#func-encode-for-uri">Section
6.2 fn:encode-for-uri</a> <sup><small>FO30</small></sup> and
<a href=
"http://www.w3.org/TR/xpath-functions-30/#func-iri-to-uri">Section
6.3 fn:iri-to-uri</a> <sup><small>FO30</small></sup>.</p>
</div>
</div>
<div class="div3">
<h4><a name="HTML_INCLUDE-CONTENT-TYPE" id=
"HTML_INCLUDE-CONTENT-TYPE"></a>7.4.13 HTML Output Method: the
<code>include-content-type</code> Parameter</h4>
<p>If there is a <code>head</code> element, and the
<code>include-content-type</code> parameter has the value
<code>yes</code>, the HTML output method <strong>MUST</strong> add
a <code>meta</code> element as the first child element of the
<code>head</code> element specifying the character encoding
actually used.</p>
<div class="exampleOuter">
<p>For example,</p>
<div class="exampleInner">
<pre>
&lt;HEAD&gt;
&lt;META http-equiv="Content-Type" content="text/html; charset=EUC-JP"&gt;
...
</pre></div>
</div>
<p>The content type <strong>MUST</strong> be set to the value given
for the <code>media-type</code> parameter.</p>
<p>If a <code>meta</code> element has been added to the
<code>head</code> element as described above, then any existing
<code>meta</code> element child of the <code>head</code> element
having an <code>http-equiv</code> attribute with the value
"Content-Type"<span>, making the comparison <span><a title=
"without regard to case" href="#caseless-compare">without regard to
case</a> after first stripping leading and trailing spaces from the
value of the attribute solely for the purposes of
comparison,</span></span> <strong>MUST</strong> be discarded.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>This process removes possible parameters in the attribute value.
For example,</p>
<div class="exampleInner">
<pre>
&lt;meta http-equiv="Content-Type" content="text/html;version='3.0'"/&gt;
</pre></div>
<p>in the data model instance would be replaced by,</p>
<div class="exampleInner">
<pre>
&lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8"/&gt;
</pre></div>
</div>
</div>
</div>
</div>
<div class="div1">
<h2><a name="text-output" id="text-output"></a>8 Text Output
Method</h2>
<p>The Text output method serializes the instance of the data model
by outputting the <a title="string value" href=
"#dt-string-value">string value</a> of the document <a title="node"
href="#dt-node">node</a> created by <span>the markup generation
step of the <a title="" href="#serphases">phases of
serialization</a></span> without any escaping.</p>
<p>A newline character in the instance of the data model
<strong>MAY</strong> be output using any character sequence that is
conventionally used to represent a line ending in the chosen system
environment.</p>
<div class="div2">
<h3><a name="TEXT_PARAMS" id="TEXT_PARAMS"></a>8.1 The Influence of
Serialization Parameters upon the Text Output Method</h3>
<div class="div3">
<h4><a name="TEXT_VERSION" id="TEXT_VERSION"></a>8.1.1 Text Output
Method: the <code>version</code> Parameter</h4>
<p>The <code>version</code> parameter is not applicable to the Text
output method.</p>
</div>
<div class="div3">
<h4><a name="TEXT_ENCODING" id="TEXT_ENCODING"></a>8.1.2 Text
Output Method: the <code>encoding</code> Parameter</h4>
<p>The <code>encoding</code> parameter identifies the encoding that
the Text output method <strong>MUST</strong> use to convert
sequences of characters to sequences of bytes. <a title=
"serializer" href="#serializer">Serializers</a> are
<strong>REQUIRED</strong> to support values of <code>UTF-8</code>
and <code>UTF-16</code>. A <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSESU0007"
title="err:SESU0007">err:SESU0007</a>] occurs if the <a title=
"serializer" href="#serializer">serializer</a> does not support the
encoding specified by the <code>encoding</code> parameter. The
<a title="serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal the error. If the instance of the data
model contains a character that cannot be represented in the
encoding that the <a title="serializer" href=
"#serializer">serializer</a> is using for output, the <a title=
"serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal a <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSERE0008"
title="err:SERE0008">err:SERE0008</a>].</p>
</div>
<div class="div3">
<h4><a name="TEXT_INDENT" id="TEXT_INDENT"></a>8.1.3 Text Output
Method: the <code>indent</code> <span>and
<code>suppress-indentation</code></span> Parameters</h4>
<p>The <code>indent</code> <span>and
<code>suppress-indentation</code> parameters are</span> not
applicable to the Text output method.</p>
</div>
<div class="div3">
<h4><a name="TEXT_CDATA-SECTION-ELEMENTS" id=
"TEXT_CDATA-SECTION-ELEMENTS"></a>8.1.4 Text Output Method: the
<code>cdata-section-elements</code> Parameter</h4>
<p>The <code>cdata-section-elements</code> parameter is not
applicable to the Text output method.</p>
</div>
<div class="div3">
<h4><a name="TEXT_OMIT-XML-DECLARATION" id=
"TEXT_OMIT-XML-DECLARATION"></a>8.1.5 Text Output Method: the
<code>omit-xml-declaration</code> and <code>standalone</code>
Parameters</h4>
<p>The <code>omit-xml-declaration</code> and
<code>standalone</code> parameters are not applicable to the Text
output method.</p>
</div>
<div class="div3">
<h4><a name="TEXT_DOCTYPE" id="TEXT_DOCTYPE"></a>8.1.6 Text Output
Method: the <code>doctype-system</code> and
<code>doctype-public</code> Parameters</h4>
<p>The <code>doctype-system</code> and <code>doctype-public</code>
parameters are not applicable to the Text output method.</p>
</div>
<div class="div3">
<h4><a name="TEXT_UNDECLARE-PREFIXES" id=
"TEXT_UNDECLARE-PREFIXES"></a>8.1.7 Text Output Method: the
<code>undeclare-prefixes</code> Parameter</h4>
<p>The <code>undeclare-prefixes</code> parameter is not applicable
to the Text output method.</p>
</div>
<div class="div3">
<h4><a name="TEXT_NORMALIZATION-FORM" id=
"TEXT_NORMALIZATION-FORM"></a>8.1.8 Text Output Method: the
<code>normalization-form</code> Parameter</h4>
<p>The <code>normalization-form</code> parameter is applicable to
the Text output method. The values <code>NFC</code> and
<code>none</code> <strong>MUST</strong> be supported by the
<a title="serializer" href="#serializer">serializer</a>. A
<a title="serialization error" href="#serial-err">serialization
error</a> [<a href="#ERRSESU0011" title=
"err:SESU0011">err:SESU0011</a>] results if the value of the
<code>normalization-form</code> parameter specifies a normalization
form that is not supported by the <a title="serializer" href=
"#serializer">serializer</a>; the <a title="serializer" href=
"#serializer">serializer</a> <strong>MUST</strong> signal the
error.</p>
</div>
<div class="div3">
<h4><a name="TEXT_MEDIA-TYPE" id="TEXT_MEDIA-TYPE"></a>8.1.9 Text
Output Method: the <code>media-type</code> Parameter</h4>
<p>The <code>media-type</code> parameter is applicable to the Text
output method. See <a href="#serparam"><b>3 Serialization
Parameters</b></a> for more information.</p>
</div>
<div class="div3">
<h4><a name="TEXT_USE-CHARACTER-MAPS" id=
"TEXT_USE-CHARACTER-MAPS"></a>8.1.10 Text Output Method: the
<code>use-character-maps</code> Parameter</h4>
<p>The <code>use-character-maps</code> parameter is applicable to
the Text output method. See <a href="#character-maps"><b>9
Character Maps</b></a> for more information.</p>
</div>
<div class="div3">
<h4><a name="TEXT_BYTE-ORDER-MARK" id=
"TEXT_BYTE-ORDER-MARK"></a>8.1.11 Text Output Method: the
<code>byte-order-mark</code> Parameter</h4>
<p>The <code>byte-order-mark</code> parameter is applicable to the
Text output method. See <a href="#serparam"><b>3 Serialization
Parameters</b></a> for more information.</p>
</div>
<div class="div3">
<h4><a name="TEXT_ESCAPE-URI-ATTRIBUTES" id=
"TEXT_ESCAPE-URI-ATTRIBUTES"></a>8.1.12 Text Output Method: the
<code>escape-uri-attributes</code> Parameter</h4>
<p>The <code>escape-uri-attributes</code> parameter is not
applicable to the Text output method.</p>
</div>
<div class="div3">
<h4><a name="TEXT_INCLUDE-CONTENT-TYPE" id=
"TEXT_INCLUDE-CONTENT-TYPE"></a>8.1.13 Text Output Method: the
<code>include-content-type</code> Parameter</h4>
<p>The <code>include-content-type</code> parameter is not
applicable to the Text output method.</p>
</div>
</div>
</div>
<div class="div1">
<h2><a name="character-maps" id="character-maps"></a>9 Character
Maps</h2>
<p>The <code>use-character-maps</code> parameter is a list of
characters and corresponding string substitutions.</p>
<p>Character maps allow a specific character appearing in a text or
attribute <a title="node" href="#dt-node">node</a> in the instance
of the data model to be replaced with a specified string of
characters during serialization. The string that is substituted is
output "as is," and the <a title="serializer" href=
"#serializer">serializer</a> performs no checks that the resulting
document is well-formed. This mechanism can therefore be used to
introduce arbitrary markup in the serialized output. See <a href=
"http://www.w3.org/TR/xslt-30/#character-maps">Section 23.1
Character Maps</a><sup><small>XT30</small></sup> of <a href=
"#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a> for
examples of using character mapping in XSLT.</p>
<p>Character mapping is applied to the characters that actually
appear in a text or attribute <a title="node" href=
"#dt-node">node</a> in the instance of the data model, before any
other serialization operations such as escaping or <a title=
"Unicode Normalization" href="#unicode-normalization">Unicode
Normalization</a> are applied. If a character is mapped, then it is
not subjected to XML or HTML escaping, nor to Unicode
Normalization. The string that is substituted for a character is
not validated or processed in any way by the <a title="serializer"
href="#serializer">serializer</a>, except for translation into the
target encoding. In particular, it is not subjected to XML or HTML
escaping, it is not subjected to Unicode Normalization, and it is
not subjected to further character mapping.</p>
<p>Character mapping is not applied to characters in text <a title=
"node" href="#dt-node">nodes</a> whose parent elements are listed
in the <code>cdata-section-elements</code> parameter, nor to
characters for which output escaping has been disabled (disabling
output escaping is an <a href="#xslt-30">[XSL Transformations
(XSLT) Version 3.0]</a> feature), nor to characters in attribute
values that are subject to <a title="URI Escaping" href=
"#uri-escaping">URI escaping</a> defined for the HTML and XHTML
output methods, unless <a title="URI Escaping" href=
"#uri-escaping">URI escaping</a> has been disabled using the
<code>escape-uri-attributes</code> parameter in the output
definition.</p>
<p>On serialization, occurrences of a character specified in the
<code>use-character-maps</code> in text <a title="node" href=
"#dt-node">nodes</a> and attribute values are replaced by the
corresponding string from the <code>use-character-maps</code>
parameter.</p>
<div class="note">
<p class="prefix"><b>Note:</b></p>
<p>Using a character map can result in non-well-formed documents if
the string contains XML-significant characters. For example, it is
possible to create documents containing unmatched start and end
tags, references to entities that are not declared, or attributes
that contain tags or unescaped quotation marks.</p>
</div>
<p>If a character is mapped, then it is not subjected to XML or
HTML escaping.</p>
<p>A <a title="serialization error" href=
"#serial-err">serialization error</a> [<a href="#ERRSERE0008"
title="err:SERE0008">err:SERE0008</a>] occurs if character mapping
causes the output of a string containing a character that cannot be
represented in the encoding that the <a title="serializer" href=
"#serializer">serializer</a> is using for output. The <a title=
"serializer" href="#serializer">serializer</a>
<strong>MUST</strong> signal the error.</p>
</div>
<div class="div1">
<h2><a name="conformance" id="conformance"></a>10 Conformance</h2>
<p>[<a name="host-language" id="host-language" title=
"host language">Definition</a>: Serialization is intended primarily
as a component of a <b>host language</b> such as <a href=
"#xslt-30">[XSL Transformations (XSLT) Version 3.0]</a> or <a href=
"#xquery-30">[XQuery 3.0: An XML Query Language]</a>.] Therefore,
this document relies on specifications that use it to specify
conformance criteria for Serialization in their respective
environments. Specifications that set conformance criteria for
their use of Serialization <strong>MUST NOT</strong> change the
semantic definitions of Serialization as given in this
specification, except by subsetting and/or compatible extensions.
It is the responsibility of the <a title="host language" href=
"#host-language">host language</a> to specify how <a title=
"serialization error" href="#serial-err">serialization errors</a>
should be handled.</p>
<p>Certain facilities in this specification are described as
producing <a title="implementation-defined" href=
"#impdef">implementation-defined</a> results. A claim that asserts
conformance with this specification <strong>MUST</strong> be
accompanied by documentation stating the effect of each
implementation-defined feature. For convenience, a non-normative
checklist of implementation-defined features is provided at
<a href="#implementation-defined-features"><b>E Checklist of
Implementation-Defined Features</b></a>.</p>
</div>
</div>
<div class="back">
<div class="div1">
<h2><a name="references" id="references"></a>A References</h2>
<div class="div2">
<h3><a name="normative-references" id=
"normative-references"></a>A.1 Normative References</h3>
<dl>
<dt class="label"><span><a name="charmod-norm" id=
"charmod-norm"></a>Character Model for the World Wide Web 1.0:
Normalization</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/charmod-norm/"><cite>Character
Model for the World Wide Web 1.0: Normalization</cite></a>, Richard
Ishida, François Yergeau, Addison Phillips, <em>et. al.</em>,
Editors. World Wide Web Consortium, 27&#160;Oct&#160;2005. This
version is http://www.w3.org/TR/2005/WD-charmod-norm-20051027/. The
<a href="http://www.w3.org/TR/charmod-norm/">latest version</a> is
available at http://www.w3.org/TR/charmod-norm/.</div>
</dd>
<dt class="label"><span><a name="xpath-datamodel-30" id=
"xpath-datamodel-30"></a>XQuery and XPath Data Model (XDM)
3.0</span></dt>
<dd>
<div><a href=
"http://www.w3.org/TR/xpath-datamodel-30/"><cite>XQuery and XPath
Data Model (XDM) 3.0</cite></a>, Norman Walsh, John Snelson,
Editors. World Wide Web Consortium, 13 December 2011. This version
is http://www.w3.org/TR/2011/WD-xpath-datamodel-30-20111213/. The
<a href="http://www.w3.org/TR/xpath-datamodel-30/">latest
version</a> is available at
http://www.w3.org/TR/xpath-datamodel-30/.</div>
</dd>
<dt class="label"><span><a name="xpath-functions-30" id=
"xpath-functions-30"></a>XQuery and XPath Functions and Operators
3.0</span></dt>
<dd>
<div><a href=
"http://www.w3.org/TR/xpath-functions-30/"><cite>XQuery and XPath
Functions and Operators 3.0</cite></a>, Michael Kay, Editor. World
Wide Web Consortium, 13 December 2011. This version is
http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/. The
<a href="http://www.w3.org/TR/xpath-functions-30/">latest
version</a> is available at
http://www.w3.org/TR/xpath-functions-30/.</div>
</dd>
<dt class="label"><span><a name="html401" id=
"html401"></a>HTML</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/html401/"><cite>HTML 4.01
Specification</cite></a>, Arnaud Le Hors, David Raggett, and Ian
Jacobs, Editors. World Wide Web Consortium, 24&#160;Dec&#160;1999.
This version is http://www.w3.org/TR/1999/REC-html401-19991224/.
The <a href="http://www.w3.org/TR/html401/">latest version</a> is
available at http://www.w3.org/TR/html401/.</div>
</dd>
<dt class="label"><span><a name="IANA" id=
"IANA"></a>IANA</span></dt>
<dd>
<div><a href=
"http://www.iana.org/assignments/character-sets"><cite>Character
Sets</cite></a>. Internet Assigned Numbers Authority. Jan
2005.</div>
</dd>
<dt class="label"><span><a name="RFC2046" id=
"RFC2046"></a>RFC2046</span></dt>
<dd>
<div><a href=
"http://www.ietf.org/rfc/rfc2046.txt"><cite>Multipurpose Internet
Mail Extensions (MIME) Part Two: Media Types</cite></a>, N. Freed,
N. Borenstein. Network Working Group, IETF, Nov 1996.</div>
</dd>
<dt class="label"><span><a name="RFC2119" id=
"RFC2119"></a>RFC2119</span></dt>
<dd>
<div><a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words
for use in RFCs to Indicate Requirement Levels</cite></a>, S.
Bradner. Network Working Group, IETF, Mar 1997.</div>
</dd>
<dt class="label"><span><a name="RFC2278" id=
"RFC2278"></a>RFC2278</span></dt>
<dd>
<div><a href="http://www.ietf.org/rfc/rfc2278.txt"><cite>IANA
Charset Registration Procedures</cite></a>, N. Freed and J. Postel
Network Working Group, IETF, Jan 1998.</div>
</dd>
<dt class="label"><span><a name="RFC2854" id=
"RFC2854"></a>RFC2854</span></dt>
<dd>
<div><a href="http://www.ietf.org/rfc/rfc2854.txt"><cite>The
'text/html' Media Type</cite></a>, D. Connolly, L. Masinter.
Network Working Group, IETF, Jun 2000.</div>
</dd>
<dt class="label"><span><a name="RFC3236" id=
"RFC3236"></a>RFC3236</span></dt>
<dd>
<div><a href="http://www.ietf.org/rfc/rfc3236.txt"><cite>The
'application/xhtml+xml' Media Type</cite></a>, M. Baker and P.
Stark. Network Working Group, IETF, Jan 2002.</div>
</dd>
<dt class="label"><span><a name="UNICODE-ENCODING" id=
"UNICODE-ENCODING"></a>Unicode Encoding</span></dt>
<dd>
<div><a href="http://www.unicode.org/reports/tr17/"><cite>Unicode
Character Encoding Model</cite></a>, Unicode Consortium. Unicode
Standard Annex #17.</div>
</dd>
<dt class="label"><span><a name="UNICODE-NORMALIZATION-FORM" id=
"UNICODE-NORMALIZATION-FORM"></a>UAX #15: Unicode Normalization
Forms</span></dt>
<dd>
<div><a href="http://www.unicode.org/reports/tr15/"><cite>Unicode
Normalization Forms</cite></a>, Unicode Consortium. Unicode
Standard Annex #15.</div>
</dd>
<dt class="label"><span><a name="xhtml1" id="xhtml1"></a>XHTML
1.0</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/xhtml1/"><cite>XHTML™ 1.0 The
Extensible HyperText Markup Language (Second Edition)</cite></a>,
Steven Pemberton, Editor. World Wide Web Consortium,
01&#160;Aug&#160;2002. This version is
http://www.w3.org/TR/2002/REC-xhtml1-20020801/. The <a href=
"http://www.w3.org/TR/xhtml1/">latest version</a> is available at
http://www.w3.org/TR/xhtml1/.</div>
</dd>
<dt class="label"><span><a name="xhtml11" id="xhtml11"></a>XHTML
1.1</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/xhtml11/"><cite>XHTML™ 1.1 -
Module-based XHTML</cite></a>, Shane McCarron and Murray Altheim,
Editors. World Wide Web Consortium, 31&#160;May&#160;2001. This
version is http://www.w3.org/TR/2001/REC-xhtml11-20010531. The
<a href="http://www.w3.org/TR/xhtml11/">latest version</a> is
available at http://www.w3.org/TR/xhtml11/. <a href=
"http://www.w3.org/TR/xhtml11/"><cite>XHTML™ 1.1 - Module-based
XHTML - Second Edition</cite></a>, Shane McCarron and Masayasu
Ishikawa, Editors. World Wide Web Consortium,
16&#160;Feb&#160;2007. This version is
http://www.w3.org/TR/2007/WD-xhtml11-20070216. The <a href=
"http://www.w3.org/TR/xhtml11/">latest version</a> is available at
http://www.w3.org/TR/xhtml11/.</div>
</dd>
<dt class="label"><span><a name="xml" id=
"xml"></a>XML10</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/xml/"><cite>Extensible Markup
Language (XML) 1.0 (Fifth Edition)</cite></a>, Tim Bray, François
Yergeau, Jean Paoli, <em>et. al.</em>, Editors. World Wide Web
Consortium, 26&#160;Nov&#160;2008. This version is
http://www.w3.org/TR/2008/REC-xml-20081126/. The <a href=
"http://www.w3.org/TR/xml/">latest version</a> is available at
http://www.w3.org/TR/xml/.</div>
</dd>
<dt class="label"><span><a name="xml11" id=
"xml11"></a>XML11</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/xml11/"><cite>Extensible Markup
Language (XML) 1.1 (Second Edition)</cite></a>, Eve Maler, Jean
Paoli, John Cowan, <em>et. al.</em>, Editors. World Wide Web
Consortium, 16&#160;Aug&#160;2006. This version is
http://www.w3.org/TR/2006/REC-xml11-20060816. The <a href=
"http://www.w3.org/TR/xml11/">latest version</a> is available at
http://www.w3.org/TR/xml11/.</div>
</dd>
<dt class="label"><span><a name="xml-names" id="xml-names"></a>XML
Names</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/xml-names/"><cite>Namespaces in
XML 1.0 (Third Edition)</cite></a>, Dave Hollander, Richard Tobin,
Tim Bray, <em>et. al.</em>, Editors. World Wide Web Consortium,
08&#160;Dec&#160;2009. This version is
http://www.w3.org/TR/2009/REC-xml-names-20091208/. The <a href=
"http://www.w3.org/TR/xml-names/">latest version</a> is available
at http://www.w3.org/TR/xml-names/.</div>
</dd>
<dt class="label"><span><a name="xml-names11" id=
"xml-names11"></a>XML Names 1.1</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/xml-names11/"><cite>Namespaces
in XML 1.1 (Second Edition)</cite></a>, Dave Hollander, Tim Bray,
Andrew Layman, and Richard Tobin, Editors. World Wide Web
Consortium, 16&#160;Aug&#160;2006. This version is
http://www.w3.org/TR/2006/REC-xml-names11-20060816. The <a href=
"http://www.w3.org/TR/xml-names11/">latest version</a> is available
at http://www.w3.org/TR/xml-names11/.</div>
</dd>
<dt class="label"><span><a name="xmlschema-1" id=
"xmlschema-1"></a>XML Schema</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/xmlschema-1/"><cite>XML Schema
Part 1: Structures Second Edition</cite></a>, David Beech, Henry S.
Thompson, Murray Maloney, and Noah Mendelsohn, Editors. World Wide
Web Consortium, 28&#160;Oct&#160;2004. This version is
http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/. The <a href=
"http://www.w3.org/TR/xmlschema-1/">latest version</a> is available
at http://www.w3.org/TR/xmlschema-1/.</div>
</dd>
<dt class="label"><span><a name="xpath-30" id="xpath-30"></a>XML
Path Language (XPath) 3.0</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/xpath-30/"><cite>XML Path
Language (XPath) 3.0</cite></a>, Jonathan Robie, Don Chamberlin,
Michael Dyck, John Snelson, Editors. World Wide Web Consortium, 13
December 2011. This version is
http://www.w3.org/TR/2011/WD-xpath-30-20111213/. The <a href=
"http://www.w3.org/TR/xpath-30/">latest version</a> is available at
http://www.w3.org/TR/xpath-30/.</div>
</dd>
<dt class="label"><span><a name="xquery-30" id=
"xquery-30"></a>XQuery 3.0: An XML Query Language</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/xquery-30/"><cite>XQuery 3.0: An
XML Query Language</cite></a>, Jonathan Robie, Don Chamberlin,
Michael Dyck, John Snelson, Editors. World Wide Web Consortium, 13
December 2011. This version is
http://www.w3.org/TR/2011/WD-xquery-30-20111213/. The <a href=
"http://www.w3.org/TR/xquery-30/">latest version</a> is available
at http://www.w3.org/TR/xquery-30/.</div>
</dd>
<dt class="label"><span><a name="xslt-30" id="xslt-30"></a>XSL
Transformations (XSLT) Version 3.0</span></dt>
<dd>
<div><cite>XSL Transformations (XSLT) Version 3.0</cite>
(expected), Michael Kay, Editor. World Wide Web Consortium, (not
yet published but anticipated in 2012; see the <a href=
"http://www.w3.org/TR/#tr_XSLT">list of XSLT
specifications</a>)</div>
</dd>
</dl>
</div>
<div class="div2">
<h3><a name="informative-references" id=
"informative-references"></a>A.2 Informative References</h3>
<dl>
<dt class="label"><span><a name="xhtml-modularization" id=
"xhtml-modularization"></a>XHTML Modularization</span></dt>
<dd>
<div><a href=
"http://www.w3.org/TR/xhtml-modularization/"><cite>XHTML™
Modularization 1.1</cite></a>, Shane McCarron, Subramanian
Peruvemba, Mark Birbeck, <em>et. al.</em>, Editors. World Wide Web
Consortium, 08&#160;Oct&#160;2008. This version is
http://www.w3.org/TR/2008/REC-xhtml-modularization-20081008. The
<a href="http://www.w3.org/TR/xhtml-modularization/">latest
version</a> is available at
http://www.w3.org/TR/xhtml-modularization/. <a href=
"http://www.w3.org/TR/xhtml-modularization/"><cite>Modularization
of XHTML™ 1.0 - Second Edition</cite></a>, , , , <em>et. al.</em>,
Editors. World Wide Web Consortium, 18&#160;Feb&#160;2004. This
version is
http://www.w3.org/TR/2004/WD-xhtml-modularization-20040218. The
<a href="http://www.w3.org/TR/xhtml-modularization/">latest
version</a> is available at
http://www.w3.org/TR/xhtml-modularization/.</div>
</dd>
<dt class="label"><span><a name="xpath-datamodel" id=
"xpath-datamodel"></a>XQuery 1.0 and XPath 2.0 Data
Model</span></dt>
<dd>
<div><a href="http://www.w3.org/TR/xpath-datamodel/"><cite>XQuery
1.0 and XPath 2.0 Data Model (XDM) (Second Edition)</cite></a>,
Norman Walsh, Mary Fernández, Ashok Malhotra, <em>et. al.</em>,
Editors. World Wide Web Consortium, 14 December 2010. This version
is http://www.w3.org/TR/2010/REC-xpath-datamodel-20101214/. The
<a href="http://www.w3.org/TR/xpath-datamodel/">latest version</a>
is available at http://www.w3.org/TR/xpath-datamodel/.</div>
</dd>
<dt class="label"><span><a name="serialization-10-2ed" id=
"serialization-10-2ed"></a>XSLT 2.0 and XQuery 1.0 Serialization
(Second Edition)</span></dt>
<dd>
<div><a href=
"http://www.w3.org/TR/2010/REC-xslt-xquery-serialization-20101214/">
<cite>XSLT 2.0 and XQuery 1.0 Serialization (Second Edition), W3C
Recommendation</cite></a>, Henry Zongaro, Norman Walsh, Joanne
Tong, <em>et. al.</em>, Editors. World Wide Web Consortium,
14&#160; December&#160; 2010. This version is
http://www.w3.org/TR/2010/REC-xslt-xquery-serialization-20101214/</div>
</dd>
</dl>
</div>
</div>
<div class="div1">
<h2><a name="serparams-schema" id="serparams-schema"></a>B Schema
for Serialization Parameters</h2>
<p>The following schema describes the structure of a Data Model
instance that can be used to specify the settings of serialization
parameters using the mechanism described in <a href=
"#serparams-in-xdm-instance"><b>3.1 Setting Serialization
Parameters by Means of a Data Model Instance</b></a>.</p>
<p>A copy of this schema is available at <a href=
"http://www.w3.org/2010/xslt-xquery-serialization/schema-for-parameters-for-xslt-xquery-serialization.xsd">
http://www.w3.org/2010/xslt-xquery-serialization/schema-for-parameters-for-xslt-xquery-serialization.xsd</a>.</p>
<pre>
&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://www.w3.org/2010/xslt-xquery-serialization"
      xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization"
      elementFormDefault="qualified"&gt;

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      This is a schema for serialization parameters for
      XSLT and XQuery Serialization 3.0.

      This schema is available for use under the conditions of the
      W3C Software License published at
      http://www.w3.org/Consortium/Legal/copyright-software-19980720 
      
      It defines a schema for XML Infoset instances with which a user of
      a host language MAY specify serialization parameters for use in
      serializing an instance of the XQuery and XPath Data Model.  It
      also provides hooks that allow the inclusion of implementation-
      defined serialization parameters and implementation-defined
      modifiers to serialization parameters.
    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;

  &lt;xs:simpleType name="QNames-type"&gt;
    &lt;xs:list itemType="xs:QName"/&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:simpleType name="yes-no-type"&gt;
    &lt;xs:restriction base="xs:token"&gt;
      &lt;xs:enumeration value="no"/&gt;
      &lt;xs:enumeration value="yes"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:simpleType name="yes-no-omit-type"&gt;
    &lt;xs:restriction base="xs:token"&gt;
      &lt;xs:enumeration value="no"/&gt;
      &lt;xs:enumeration value="omit"/&gt;
      &lt;xs:enumeration value="yes"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:simpleType name="char-type"&gt;
    &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:maxLength value="1"/&gt;
      &lt;xs:minLength value="1"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:simpleType name="encoding-string-type"&gt;
    &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:pattern value="[A-Za-z][A-Za-z0-9._\-]*"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:simpleType name="method-type"&gt;
    &lt;xs:union&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:string"&gt;
          &lt;xs:enumeration value="html"/&gt;
          &lt;xs:enumeration value="text"/&gt;
          &lt;xs:enumeration value="xml"/&gt;
          &lt;xs:enumeration value="xhtml"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:QName"&gt;
          &lt;xs:pattern value=".*:.*"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:union&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:simpleType name="pubid-char-string-type"&gt;
    &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:pattern value="([- \r\n\ta-zA-Z0-9'()+,./:=?;!*#@$_%])*"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:simpleType name="system-id-string-type"&gt;
    &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:pattern value="[^']*|[^&amp;quot;]*"/&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;

  &lt;!--
     - Base type of all serialization parameter types
    --&gt;
  &lt;xs:complexType name="base-param-type"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:restriction base="xs:anyType"&gt;
        &lt;xs:anyAttribute namespace="##other" processContents="lax"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;

  &lt;!--
     - Generic string serialization parameters
    --&gt;
  &lt;xs:complexType name="string-param-type"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="output:base-param-type"&gt;
        &lt;xs:attribute name="value" type="xs:string" use="required"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;

  &lt;!--
     - Serialization parameter type for "yes" or "no"
     - serialization parameters
    --&gt;
  &lt;xs:complexType name="yes-no-param-type"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="output:base-param-type"&gt;
        &lt;xs:attribute name="value" type="output:yes-no-type" use="required"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;

  &lt;!--
     - Serialization parameter type for list of xs:QName
     - serialization parameters
    --&gt;
  &lt;xs:complexType name="QNames-param-type"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="output:base-param-type"&gt;
        &lt;xs:attribute name="value" type="output:QNames-type" use="required"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;

  &lt;!--
     - Serialization parameter type for "yes", "no" or "omit"
     - serialization parameters
    --&gt;
  &lt;xs:complexType name="yes-no-omit-param-type"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="output:base-param-type"&gt;
        &lt;xs:attribute name="value" type="output:yes-no-omit-type"
              use="required"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;

  &lt;!--
     - Serialization parameter element for byte-order-mark parameter
    --&gt;
  &lt;xs:element name="serialization-parameter-element"
        abstract="true"
        type="output:base-param-type"/&gt;

  &lt;!--
     - Serialization parameter element for byte-order-mark parameter
    --&gt;
  &lt;xs:element id="byte-order-mark" name="byte-order-mark" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter element for cdata-section-elements parameter
    --&gt;
  &lt;xs:element id="cdata-section-elements" name="cdata-section-elements" type="output:QNames-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter type for doctype-public parameter
    --&gt;
  &lt;xs:complexType name="doctype-public-param-type"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="output:base-param-type"&gt;
        &lt;xs:attribute name="value" type="output:pubid-char-string-type"
              use="required"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;

  &lt;!--
     - Serialization parameter element for doctype-public parameter
    --&gt;
  &lt;xs:element id="doctype-public" name="doctype-public" type="output:doctype-public-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter type for doctype-system parameter
    --&gt;
  &lt;xs:complexType name="doctype-system-param-type"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="output:base-param-type"&gt;
        &lt;xs:attribute name="value" type="output:system-id-string-type"
              use="required"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;

  &lt;!--
     - Serialization parameter element for doctype-system parameter
    --&gt;
  &lt;xs:element id="doctype-system" name="doctype-system" type="output:doctype-system-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter type for encoding parameter
    --&gt;
  &lt;xs:complexType name="encoding-param-type"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="output:base-param-type"&gt;
        &lt;xs:attribute name="value" type="output:encoding-string-type"
              use="required"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;

  &lt;!--
     - Serialization parameter element for encoding parameter
    --&gt;
  &lt;xs:element id="encoding" name="encoding" type="output:encoding-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter element for escape-uri-attributes parameter
    --&gt;
  &lt;xs:element id="escape-uri-attributes" name="escape-uri-attributes" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter element for include-content-type parameter
    --&gt;
  &lt;xs:element id="include-content-type" name="include-content-type" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter element for indent parameter
    --&gt;
  &lt;xs:element id="indent" name="indent" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter element for media-type parameter
    --&gt;
  &lt;xs:element id="media-type" name="media-type" type="output:string-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter type for method parameter
    --&gt;
  &lt;xs:complexType name="method-param-type"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="output:base-param-type"&gt;
        &lt;xs:attribute name="value" type="output:method-type"
                use="required"/&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;

  &lt;!--
     - Serialization parameter element for method parameter
    --&gt;
  &lt;xs:element id="method" name="method" type="output:method-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;
  &lt;!--
     - Serialization parameter element for normalization-form parameter
    --&gt;
  &lt;xs:element id="normalization-form" name="normalization-form" type="output:string-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter element for omit-xml-declaration parameter
    --&gt;
  &lt;xs:element id="omit-xml-declaration" name="omit-xml-declaration" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter element for standalone parameter
    --&gt;
  &lt;xs:element id="standalone" name="standalone" type="output:yes-no-omit-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter element for suppress-indentation parameter
    --&gt;
  &lt;xs:element id="suppress-indentation" name="suppress-indentation" type="output:QNames-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter element for undeclare-prefixes parameter
    --&gt;
  &lt;xs:element id="undeclare-prefixes" name="undeclare-prefixes" type="output:yes-no-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter type for use-character-maps
     - parameter
    --&gt;
  &lt;xs:complexType name="use-character-maps-param-type"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="output:base-param-type"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="character-map" minOccurs="0"
                  maxOccurs="unbounded"&gt;
            &lt;xs:complexType&gt;
              &lt;xs:attribute name="character" type="output:char-type"/&gt;
              &lt;xs:attribute name="map-string" type="xs:string"/&gt;
              &lt;xs:anyAttribute namespace="##other"
                     processContents="lax"/&gt;
            &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
          &lt;xs:any minOccurs="0" namespace="##other"
                     processContents="lax"/&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;

  &lt;!--
     - Serialization parameter element for use-character-maps parameter
    --&gt;
  &lt;xs:element id="use-character-maps" name="use-character-maps"
        type="output:use-character-maps-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;!--
     - Serialization parameter element for version parameter
    --&gt;
  &lt;xs:element id="version" name="version"
        type="output:string-param-type"
        substitutionGroup="output:serialization-parameter-element"/&gt;

  &lt;xs:element name="serialization-parameters"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref="output:serialization-parameter-element"
              minOccurs="0" maxOccurs="unbounded"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
&lt;/xs:schema&gt;
</pre></div>
<div class="div1">
<h2><a name="id-errors" id="id-errors"></a>C Summary of Error
Conditions</h2>
<p>This document uses the <code>err</code> prefix which represents
the same namespace URI (http://www.w3.org/2005/xqt-errors) as
defined in <a href="#xpath-30">[XML Path Language (XPath) 3.0]</a>.
Use of this namespace prefix binding in this document is not
normative.</p>
<dl>
<dt><a name="ERRSENR0001" id="ERRSENR0001"></a>err:SENR0001</dt>
<dd>
<p>It is an error if an item in <em>S<sub>6</sub></em> in <a title=
"sequence normalization" href="#sequence-normalization">sequence
normalization</a> is an attribute node or a namespace node.</p>
</dd>
<dt><a name="ERRSERE0003" id="ERRSERE0003"></a>err:SERE0003</dt>
<dd>
<p>It is an error if the <a title="serializer" href=
"#serializer">serializer</a> is unable to satisfy the rules for
either a well-formed XML document entity or a well-formed XML
external general parsed entity, or both, except for content
modified by the character expansion phase of serialization.</p>
</dd>
<dt><a name="ERRSEPM0004" id="ERRSEPM0004"></a>err:SEPM0004</dt>
<dd>
<p>It is an error to specify the doctype-system parameter, or to
specify the standalone parameter with a value other than
<code>omit</code>, if the instance of the data model contains text
nodes or multiple element nodes as children of the root node.</p>
</dd>
<dt><a name="ERRSERE0005" id="ERRSERE0005"></a>err:SERE0005</dt>
<dd>
<p>It is an error if the serialized result would contain an
<a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName
NCName NCName NCName NCName NCName NCName NCName NCName
NCName</a><sup><small>Names</small></sup> that contains a character
that is not permitted by the version of Namespaces in XML specified
by the <code>version</code> parameter.</p>
</dd>
<dt><a name="ERRSERE0006" id="ERRSERE0006"></a>err:SERE0006</dt>
<dd>
<p>It is an error if the serialized result would contain a
character that is not permitted by the version of XML specified by
the <code>version</code> parameter.</p>
</dd>
<dt><a name="ERRSESU0007" id="ERRSESU0007"></a>err:SESU0007</dt>
<dd>
<p>It is an error if an output encoding other than
<code>UTF-8</code> or <code>UTF-16</code> is requested and the
<a title="serializer" href="#serializer">serializer</a> does not
support that encoding.</p>
</dd>
<dt><a name="ERRSERE0008" id="ERRSERE0008"></a>err:SERE0008</dt>
<dd>
<p>It is an error if a character that cannot be represented in the
encoding that the <a title="serializer" href=
"#serializer">serializer</a> is using for output appears in a
context where character references are not allowed (for example if
the character occurs in the name of an element).</p>
</dd>
<dt><a name="ERRSEPM0009" id="ERRSEPM0009"></a>err:SEPM0009</dt>
<dd>
<p>It is an error if the <code>omit-xml-declaration</code>
parameter has the value <code>yes</code>, and the
<code>standalone</code> attribute has a value other than
<code>omit</code>; or the <code>version</code> parameter has a
value other than <code>1.0</code> and the
<code>doctype-system</code> parameter is specified.</p>
</dd>
<dt><a name="ERRSEPM0010" id="ERRSEPM0010"></a>err:SEPM0010</dt>
<dd>
<p>It is an error if the output method is <code>xml</code> <span>or
<code>xhtml</code></span>, the value of the
<code>undeclare-prefixes</code> parameter is <code>yes</code>, and
the value of the <code>version</code> parameter is 1.0.</p>
</dd>
<dt><a name="ERRSESU0011" id="ERRSESU0011"></a>err:SESU0011</dt>
<dd>
<p>It is an error if the value of the
<code>normalization-form</code> parameter specifies a normalization
form that is not supported by the <a title="serializer" href=
"#serializer">serializer</a>.</p>
</dd>
<dt><a name="ERRSERE0012" id="ERRSERE0012"></a>err:SERE0012</dt>
<dd>
<p>It is an error if the value of the
<code>normalization-form</code> parameter is
<code>fully-normalized</code> and any relevant construct of the
result begins with a combining character.</p>
</dd>
<dt><a name="ERRSESU0013" id="ERRSESU0013"></a>err:SESU0013</dt>
<dd>
<p>It is an error if the <a title="serializer" href=
"#serializer">serializer</a> does not support the version of XML or
HTML specified by the <code>version</code> parameter.</p>
</dd>
<dt><a name="ERRSERE0014" id="ERRSERE0014"></a>err:SERE0014</dt>
<dd>
<p>It is an error to use the HTML output method if characters which
are <span>permitted</span> in XML but not in HTML appear in the
instance of the data model.</p>
</dd>
<dt><a name="ERRSERE0015" id="ERRSERE0015"></a>err:SERE0015</dt>
<dd>
<p>It is an error to use the HTML output method when
<code>&gt;</code> appears within a processing instruction in the
data model instance being serialized.</p>
</dd>
<dt><a name="ERRSEPM0016" id="ERRSEPM0016"></a>err:SEPM0016</dt>
<dd>
<p>It is an error if a parameter value is invalid for the defined
domain.</p>
</dd>
<dt><a name="ERRSEPM0017" id="ERRSEPM0017"></a>err:SEPM0017</dt>
<dd>
<p>It is an error if evaluating an expression in order to extract
the setting of a serialization parameter from a data model instance
would yield an error.</p>
</dd>
<dt><a name="ERRSEPM0018" id="ERRSEPM0018"></a>err:SEPM0018</dt>
<dd>
<p>It is an error if evaluating an expression in order to extract
the setting of the <code>use-character-maps</code> serialization
parameter from a data model instance would yield a sequence of
length greater than one.</p>
</dd>
<dt><a name="ERRSEPM0019" id="ERRSEPM0019"></a>err:SEPM0019</dt>
<dd>
<p>It is an error if an instance of the data model used to specify
the settings of serialization parameters specifies the value of the
same parameter more than once.</p>
</dd>
</dl>
</div>
<div class="div1">
<h2><a name="list-of-uri-attributes" id=
"list-of-uri-attributes"></a>D List of URI Attributes</h2>
<p>The following list of attributes are declared as type
<code>%URI</code> or <code>%UriList</code> for a given HTML or
XHTML element, with the exception of the <code>name</code>
attribute for element <code>A</code> which is not a URI type. The
<code>name</code> attribute for element <code>A</code> should be
escaped as is recommended by the HTML Recommendation <a href=
"#html401">[HTML]</a> in Appendix B.2.1.</p>
<table width="500" border="1" summary="Attributes of type URI">
<col width="200" span="1" />
<col width="300" span="1" />
<thead>
<tr>
<th align="left" colspan="1">Attributes</th>
<th align="left" colspan="1">Elements</th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>FORM</td>
</tr>
<tr>
<td>archive</td>
<td>OBJECT</td>
</tr>
<tr>
<td>background</td>
<td>BODY</td>
</tr>
<tr>
<td>cite</td>
<td>BLOCKQUOTE, DEL, INS, Q</td>
</tr>
<tr>
<td>classid</td>
<td>OBJECT</td>
</tr>
<tr>
<td>codebase</td>
<td>APPLET, OBJECT</td>
</tr>
<tr>
<td>data</td>
<td>OBJECT</td>
</tr>
<tr>
<td>datasrc</td>
<td>BUTTON, DIV, INPUT, OBJECT, SELECT, SPAN, TABLE, TEXTAREA</td>
</tr>
<tr>
<td>for</td>
<td>SCRIPT</td>
</tr>
<tr>
<td>href</td>
<td>A, AREA, BASE, LINK</td>
</tr>
<tr>
<td>longdesc</td>
<td>FRAME, IFRAME, IMG</td>
</tr>
<tr>
<td>name</td>
<td>A</td>
</tr>
<tr>
<td>profile</td>
<td>HEAD</td>
</tr>
<tr>
<td>src</td>
<td>FRAME, IFRAME, IMG, INPUT, SCRIPT</td>
</tr>
<tr>
<td>usemap</td>
<td>IMG, INPUT, OBJECT</td>
</tr>
</tbody>
</table>
</div>
<div class="div1">
<h2><a name="implementation-defined-features" id=
"implementation-defined-features"></a>E Checklist of
Implementation-Defined Features (Non-Normative)</h2>
<p>This appendix provides a summary of Serialization features whose
effect is explicitly <a title="implementation-defined" href=
"#impdef">implementation-defined</a>. The conformance rules (see
<a href="#conformance"><b>10 Conformance</b></a>) require vendors
to provide documentation that explains how these choices have been
exercised.</p>
<ol>
<li>For any <a title="implementation-defined" href=
"#impdef">implementation-defined</a> output method, it is <a title=
"implementation-defined" href="#impdef">implementation-defined</a>
whether <a title="sequence normalization" href=
"#sequence-normalization">sequence normalization</a> process takes
place. (See <a href="#serdm"><b>2 Sequence
Normalization</b></a>)</li>
<li>If the namespace URI is non-null for the <code>method</code>
serialization parameter, then the parameter specifies an <a title=
"implementation-defined" href="#impdef">implementation-defined</a>
output method. (See <a href="#serparam"><b>3 Serialization
Parameters</b></a>)</li>
<li>The effect of additional serialization parameters on the output
of the serializer, where the name of such a parameter must be
namespace-qualified, is <a title="implementation-defined" href=
"#impdef">implementation-defined</a> or <a title=
"implementation-dependent" href=
"#impdep">implementation-dependent</a>. The extent of this effect
on the output must not override the provisions of this
specification. (See <a href="#serparam"><b>3 Serialization
Parameters</b></a>)</li>
<li>The effect of providing an option that allows the encoding
phase to be skipped, so that the result of serialization is a
stream of Unicode characters, is <a title="implementation-defined"
href="#impdef">implementation-defined</a>. The <a title=
"serializer" href="#serializer">serializer</a> is not required to
support such an option. (See <a href="#serphases"><b>4 Phases of
Serialization</b></a>)</li>
<li><span>If an implementation supports a value of the
<code>version</code> parameter for the XML or XHTML output method
for which this document does not provide a normative definition,
the behavior is <a title="implementation-defined" href=
"#impdef">implementation-defined</a>.</span> (See <a href=
"#XML_VERSION"><b>5.1.1 XML Output Method: the version
Parameter</b></a>)</li>
<li>An <a title="serializer" href="#serializer">serializer</a> may
provide an <a title="implementation-defined" href=
"#impdef">implementation-defined</a> mechanism to place CDATA
sections in the <a title="result tree" href="#result-tree">result
tree</a>. (See <a href="#XML_CDATA-SECTION-ELEMENTS"><b>5.1.4 XML
Output Method: the cdata-section-elements Parameter</b></a>)</li>
<li>If the value of the <code>normalization-form</code> form
parameter is not <code>NFC</code>, <code>NFD</code>,
<code>NFKC</code>, <code>NFKD</code>,
<code>fully-normalized</code>, or <code>none</code> then the
meaning of the value and its effect is <a title=
"implementation-defined" href="#impdef">implementation-defined</a>.
(See <a href="#XML_NORMALIZATION-FORM"><b>5.1.8 XML Output Method:
the normalization-form Parameter</b></a>)</li>
<li><span>If an implementation supports a value of the
<code>version</code> parameter for the HTML output method for which
this document does not provide a normative definition, the behavior
is <a title="implementation-defined" href=
"#impdef">implementation-defined</a>.</span> (See <a href=
"#HTML_VERSION"><b>7.4.1 HTML Output Method: the version
Parameter</b></a>)</li>
</ol>
</div>
<div class="div1">
<h2><a name="revision-log" id="revision-log"></a>F Change Log
(Non-Normative)</h2>
<p>This appendix details the changes that have been made since the
publication of the <a href="#serialization-10-2ed">[XSLT 2.0 and
XQuery 1.0 Serialization (Second Edition)]</a>.</p>
<div class="div2">
<h3><a name="changes-for-this-WD" id="changes-for-this-WD"></a>F.1
Changes applied for the current Public Working Draft</h3>
<p>The following changes have been applied since the publication of
the third Public Working Draft to produce the current Public
Working Draft. None of these changes introduces an incompatibility
with <a href="#serialization-10-2ed">[XSLT 2.0 and XQuery 1.0
Serialization (Second Edition)]</a>.</p>
<table border="1" cellpadding="5" width="100%" summary=
"Changes for first public working draft">
<thead>
<tr>
<td>Bugzilla bug (if applicable)</td>
<td>Erratum (if applicable)</td>
<td>Category</td>
<td>Description of change</td>
<td>Affected sections</td>
</tr>
</thead>
<tbody>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=12852">Bugzilla bug
12852</a></td>
<td>None</td>
<td>Substantive</td>
<td>Corrected the type of the <code>media-type</code> serialization
parameter in the Schema for Serialization Parameters.</td>
<td>
<ul>
<li>
<p><a href="#serparams-schema"><b>B Schema for Serialization
Parameters</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=13688">Bugzilla bug
13688</a></td>
<td>None</td>
<td>Substantive</td>
<td>Corrected the regular expression associated with the
<code>encoding-string-type</code> type in the Schema for
Serialization Parameters, so that hyphens are permitted to appear
in the <code>encoding</code> serialization parameter.</td>
<td>
<ul>
<li>
<p><a href="#serparams-schema"><b>B Schema for Serialization
Parameters</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=10176">Bugzilla bug
10176</a></td>
<td>SE.E20</td>
<td>Substantive</td>
<td>Clarified what it means for the html output method to output an
XML island as XML.</td>
<td>
<ul>
<li>
<p><a href="#HTML_MARKUP"><b>7.1 Markup for Elements</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=14751">Bugzilla bug
14751</a></td>
<td>None</td>
<td>Editorial</td>
<td>Corrected typographical errors in the comments associated with
the <code>yes-no-param-type</code> and
<code>encoding-param-type</code> types in the Schema for
Serialization Parameters.</td>
<td>
<ul>
<li>
<p><a href="#serparams-schema"><b>B Schema for Serialization
Parameters</b></a></p>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="div2">
<h3><a name="changes-for-3rd-WD" id="changes-for-3rd-WD"></a>F.2
Changes applied for the third Public Working Draft</h3>
<p>The following changes were applied after the publication of the
second Public Working Draft to produce the third Public Working
Draft. None of these changes introduces an incompatibility with
<a href="#serialization-10-2ed">[XSLT 2.0 and XQuery 1.0
Serialization (Second Edition)]</a>, except as noted below.</p>
<table border="1" cellpadding="5" width="100%" summary=
"Changes for first public working draft">
<thead>
<tr>
<td>Bugzilla bug (if applicable)</td>
<td>Erratum (if applicable)</td>
<td>Category</td>
<td>Description of change</td>
<td>Affected sections</td>
</tr>
</thead>
<tbody>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=11635">Bugzilla bug
11635</a></td>
<td>SE.E19</td>
<td>Substantive</td>
<td>Clarified that serialization error SEPM0010 applies to the
xhtml output method as well as the xml output method.</td>
<td>
<ul>
<li>
<p><a href="#id-errors"><b>C Summary of Error
Conditions</b></a></p>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="div2">
<h3><a name="changes-for-2nd-WD" id="changes-for-2nd-WD"></a>F.3
Changes applied for the second Public Working Draft</h3>
<p>The following changes were applied after the publication of the
first Public Working Draft to produce the second Public Working
Draft. None of these changes introduces an incompatibility with
<a href="#serialization-10-2ed">[XSLT 2.0 and XQuery 1.0
Serialization (Second Edition)]</a>, except as noted below.</p>
<table border="1" cellpadding="5" width="100%" summary=
"Changes for first public working draft">
<thead>
<tr>
<td>Bugzilla bug (if applicable)</td>
<td>Erratum (if applicable)</td>
<td>Category</td>
<td>Description of change</td>
<td>Affected sections</td>
</tr>
</thead>
<tbody>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=6535">Bugzilla bug
6535</a></td>
<td>None</td>
<td>Substantive</td>
<td>Added definition of the <code>suppress-indentation</code>
serialization parameter.</td>
<td>
<ul>
<li>
<p><a href="#serparam"><b>3 Serialization Parameters</b></a></p>
</li>
<li>
<p><a href="#serphases"><b>4 Phases of Serialization</b></a></p>
</li>
<li>
<p><a href="#xml-indent"><b>5.1.3 XML Output Method: the indent and
suppress-indentation Parameters</b></a></p>
</li>
<li>
<p><a href="#XHTML_INDENT"><b>6.1.3 XHTML Output Method: the indent
and suppress-indentation Parameters</b></a></p>
</li>
<li>
<p><a href="#HTML_INDENT"><b>7.4.3 HTML Output Method: the indent
and suppress-indentation Parameters</b></a></p>
</li>
<li>
<p><a href="#TEXT_INDENT"><b>8.1.3 Text Output Method: the indent
and suppress-indentation Parameters</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=7829">Bugzilla bug
7829</a></td>
<td>SE.E14</td>
<td>Substantive</td>
<td>Clarified how minimized attributes are handled under the rules
of the HTML output method.</td>
<td>
<ul>
<li>
<p><a href="#HTML_ATTRIBS"><b>7.2 Writing Attributes</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=8245">Bugzilla bug
8245</a></td>
<td>SE.E15</td>
<td>Editorial</td>
<td>Corrected description of a serialization error that mentions
which control characters are not permitted under the rules of the
HTML output method</td>
<td>
<ul>
<li>
<p><a href="#HTML_CHARDATA"><b>7.3 Writing Character
Data</b></a></p>
</li>
<li>
<p><a href="#id-errors"><b>C Summary of Error
Conditions</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=7823">Bugzilla bug
7823</a></td>
<td>SE.E16</td>
<td>Substantive</td>
<td>Clarified how the <code>script</code> and <code>style</code>
elements are handled for the HTML output method.</td>
<td>
<ul>
<li>
<p><a href="#HTML_MARKUP"><b>7.1 Markup for Elements</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=8651">Bugzilla bug
8651</a></td>
<td>SE.E17</td>
<td>Substantive</td>
<td>Clarified what it means to compare without regard to case.</td>
<td>
<ul>
<li>
<p><a href="#terminology"><b>1.1 Terminology</b></a></p>
</li>
<li>
<p><a href="#XHTML_INCLUDE-CONTENT-TYPE"><b>6.1.13 XHTML Output
Method: the include-content-type Parameter</b></a></p>
</li>
<li>
<p><a href="#HTML_MARKUP"><b>7.1 Markup for Elements</b></a></p>
</li>
<li>
<p><a href="#HTML_ATTRIBS"><b>7.2 Writing Attributes</b></a></p>
</li>
<li>
<p><a href="#HTML_INCLUDE-CONTENT-TYPE"><b>7.4.13 HTML Output
Method: the include-content-type Parameter</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=8206">Bugzilla bug
8206</a></td>
<td>SE.E18</td>
<td>Editorial</td>
<td>Clarified what it means to escape according to HTML or XML
rules.</td>
<td>
<ul>
<li>
<p><a href="#serphases"><b>4 Phases of Serialization</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=6808">Bugzilla bug
6808</a></td>
<td>None</td>
<td>Substantive</td>
<td>Relaxed rules for the XML output method that specify where a
serializer is permitted to add whitespace. This introduces an
incompatibility only inasmuch as the serialized results produced by
a serializer conforming to this specification could differ from the
results a serializer that adheres to <a href=
"#serialization-10-2ed">[XSLT 2.0 and XQuery 1.0 Serialization
(Second Edition)]</a> would be permitted to produce.</td>
<td>
<ul>
<li>
<p><a href="#xml-indent"><b>5.1.3 XML Output Method: the indent and
suppress-indentation Parameters</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=9302">Bugzilla bug
9302</a></td>
<td>None</td>
<td>Substantive</td>
<td>Defined a mechanism for specifying serialization parameter
settings in the form of a data model instance.</td>
<td>
<ul>
<li>
<p><a href="#serparams-in-xdm-instance"><b>3.1 Setting
Serialization Parameters by Means of a Data Model
Instance</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td>None</td>
<td>None</td>
<td>Editorial</td>
<td>Replaced all uses of the words <em>legal</em> and
<em>illegal</em> with more appropriate terms.</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="div2">
<h3><a name="changes-for-1st-WD" id="changes-for-1st-WD"></a>F.4
Changes applied for the first Public Working Draft</h3>
<p>The following changes were applied after the publication of
<a href="#serialization-10-2ed">[XSLT 2.0 and XQuery 1.0
Serialization (Second Edition)]</a> to produce the first Public
Working Draft. None of these changes introduces an incompatibility
with <a href="#serialization-10-2ed">[XSLT 2.0 and XQuery 1.0
Serialization (Second Edition)]</a>.</p>
<table border="1" cellpadding="5" width="100%" summary=
"Changes for first public working draft">
<thead>
<tr>
<td>Bugzilla bug (if applicable)</td>
<td>Erratum (if applicable)</td>
<td>Category</td>
<td>Description of change</td>
<td>Affected sections</td>
</tr>
</thead>
<tbody>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=6723">Bugzilla bug
6723</a></td>
<td>SE.E13</td>
<td>Substantive</td>
<td>Clarified how HTML elements that have no children but whose
content model is not empty are serialized.</td>
<td>
<ul>
<li>
<p><a href="#html-output"><b>7 HTML Output Method</b></a></p>
</li>
<li>
<p><a href="#HTML_MARKUP"><b>7.1 Markup for Elements</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href=
"http://www.w3.org/Bugs/Public/show_bug.cgi?id=6732">Bugzilla bug
6732</a></td>
<td>SE.E12</td>
<td>Substantive</td>
<td>Clarified for which versions of XML and HTML this document
makes normative statements.</td>
<td>
<ul>
<li>
<p><a href="#XML_VERSION"><b>5.1.1 XML Output Method: the version
Parameter</b></a></p>
</li>
<li>
<p><a href="#HTML_VERSION"><b>7.4.1 HTML Output Method: the version
Parameter</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td>None</td>
<td>None</td>
<td>Substantive</td>
<td>Take into account presence of function items in a sequence that
is to be serialized.</td>
<td>
<ul>
<li>
<p><a href="#serdm"><b>2 Sequence Normalization</b></a></p>
</li>
</ul>
</td>
</tr>
<tr>
<td>None</td>
<td>None</td>
<td>Editorial</td>
<td>Miscellaneous minor editorial corrections and
improvements.</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>