NOTE-xml-events2-20101216 91.7 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
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://www.w3.org/StyleSheets/TR/W3C-WG-NOTE.css" type="text/css"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
    "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <title>XML Events 2</title>
  <style type="text/css">
      .dtd-code {  font-family: monospace; background-color: #dfdfdf; white-space: pre; border: #000000; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
      code {
      color: green;
      font-family: monospace;
      font-weight: bold;
      }
      h4 { color: #005A9C; background: white }
      code.greenmono {
      color: green;
      font-family: monospace;
      font-weight: bold;
      }
      .example {
      border: solid green;
      border-width: 2px;
      color: green;
      font-weight: bold;
      margin-right: 5%;
      margin-left: 0;
      }
      .bad  {
      border: solid red;
      border-width: 2px;
      margin-left: 0;
      margin-right: 5%;
      color: rgb(192, 101, 101);
      }
      div.navbar { text-align: center; }
      div.contents {
      background-color: rgb(204,204,255);
      padding: 0.5em;
      border: none;
      margin-right: 5%;
      }
      .tocline { list-style: none; }
      td { text-align: left }
      .ins { background-color: yellow }
      .del { background-color: yellow; text-decoration: line-through }
      ul.acks { list-style: none }
    p.issueTitle {
        font-size: 150% ;
    }
    div.issue {
        background-color: #cfc ;
        border: none ;
        margin-right: 5% ;
    }
/* assertion styles 

.must, .mustnot, .required, .shall, .shallnot, .should, .recommended, .may, .optional {
	font-style:  italic ;
	background-color: #FF8040 ;
}
*/
    </style>
	<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-WG-NOTE.css" />
	<link rel="license" href="http://www.w3.org/Consortium/Legal/copyright-documents" />
	<link rel="contents" href="#contents" />
	<link rel="copyright" href="#copyright" />
</head>

<body>

















































































































<div class="head">
<a href="http://www.w3.org/"><img height="48" width="72" alt="W3C"
src="http://www.w3.org/Icons/w3c_home" /></a> 









<h1 id="title" > XML Events 2
</h1>








<h2 id="subtitle" > An Events Syntax for XML
</h2>










<h2 id="w3c-doctype" > W3C Working Group Note 16 December 2010
</h2>










<dl>
  <dt>This version:</dt>

    <dd><a href="http://www.w3.org/TR/2010/NOTE-xml-events2-20101216">http://www.w3.org/TR/2010/NOTE-xml-events2-20101216</a>

</dd>

  <dt>Latest version:</dt>
    <dd><a href="http://www.w3.org/TR/xml-events2">http://www.w3.org/TR/xml-events2</a></dd>

  
  <dt>Previous version:</dt>
  <dd><a href="http://www.w3.org/TR/2007/WD-xml-events-20070216">http://www.w3.org/TR/2007/WD-xml-events-20070216</a></dd>

  <dt>Diff from previous version:</dt>
    <dd><a href="xml-events-diff.html">xml-events-diff.html</a></dd>

  <dt>Previous recommendation:</dt>
  <dd><a href="http://www.w3.org/TR/2003/REC-xml-events-20031014">http://www.w3.org/TR/2003/REC-xml-events-20031014</a></dd>

  <dt>Diff from previous recommendation:</dt>
    <dd><a href="xml-events-rec-diff.html">xml-events-rec-diff.html</a></dd>

  <dt>Editors:</dt>
    <dd><a href="mailto:shane@aptest.com">Shane McCarron</a>,
        <a href="http://www.aptest.com">Applied Testing and Technology,
            <abbr title="Incorporated">Inc.</abbr></a><br />
  <a href="mailto:mark.birbeck@sidewinderlabs.com">Mark Birbeck</a>,
  <a href="http://sidewinderlabs.com/">Sidewinder Labs</a><br />
        Roland Merrick, <a href="http://www.IBM.com">IBM</a>
    </dd>


  <dt>Version 1 Editors:</dt>
    <dd><a href="mailto:shane@aptest.com">Shane McCarron</a>,
        <a href="http://www.aptest.com">Applied Testing and Technology,
        <abbr title="Incorporated">Inc.</abbr></a><br />

      <a href="http://www.cwi.nl/~steven/">Steven Pemberton</a>,
      <a href="http://www.cwi.nl"><abbr xml:lang="nl" title="Centrum voor Wiskunde en Informatica">CWI</abbr></a>/<a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>&#xae;</sup><br />

      <a href="mailto:tvraman@almaden.ibm.com">T. V. Raman</a>,
      <a href="http://www.ibm.com"><abbr title="International Business Machines">IBM</abbr> Corporation</a></dd>
</dl>



<p>This document is also available in these non-normative formats:
<a href="xml-events.ps">PostScript version</a>,
<a href="xml-events.pdf">PDF version</a>,
<a href="xml-events.zip">ZIP archive</a>, and
<a href="xml-events.tgz">Gzip'd TAR archive</a>.</p>

<p>The English version of this specification is the only normative version.
Non-normative  <a href="http://www.w3.org/Consortium/Translation/"
>translations</a> may also be available.</p>

<p id="copyright" class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; 2003-2010 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>&reg;</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 />








<h2 id="abstract" > Abstract
</h2>


<p>This specification defines three modules:  XML Events to define events
and their characteristics; XML Handlers to define mappings between events
and actions; and XML Scripting to assist in defining functions to
support the handlers.
These modules work together to provide XML languages
with the ability to uniformly integrate event listeners and associated event
handlers with Document Object Model (DOM) Level 3 event interfaces
[<a class="nref" href="#ref_DOM3EVENTS">DOM3EVENTS</a>]. The result is to provide an interoperable way of
associating behaviors with document-level markup.</p>








<h2 id="status" > 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 document is a Working Group Note.  The XHTML2 Working Group's
charter expired before it could complete work on this document.  
Related work is being done by the <a
href="http://www.w3.org/MarkUp/Forms/">Forms Working
Group</a>.</p>

<p>Publication as a Working Group Note 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 has been produced by the <a href="http://www.w3.org/MarkUp/">W3C XHTML 2 Working Group</a> as part of the <a href="http://www.w3.org/MarkUp/Activity">HTML Activity</a>. The goals of
the XHTML 2 Working Group are discussed in the <a href="http://www.w3.org/2007/03/XHTML2-WG-charter">XHTML 2 Working Group charter</a>.</p>

<p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a rel="disclosure"
href="http://www.w3.org/2004/01/pp-impl/32107/status">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for
disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">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>

<p>Public discussion of HTML takes place on
<a href="mailto:www-html@w3.org">www-html@w3.org</a>
(<a href="http://lists.w3.org/Archives/Public/www-html/">archive</a>).
To subscribe send an email to
<a href="mailto:www-html-request@w3.org">www-html-request@w3.org</a>
with the word <em>subscribe</em> in the subject line.</p>

<p>Please report errors in this document to
<a href="mailto:www-html-editor@w3.org">www-html-editor@w3.org</a>
(<a href="http://lists.w3.org/Archives/Public/www-html-editor/">archive</a>).
</p>









<h1 id="contents" > Contents
</h1>


<div class="toc">
<ul class='toc'><li class='tocline'>
1.
<a href="#s_intro" class="tocxref"> Introduction</a>

</li><li class='tocline'>2.
<a href="#s_event_module_conformance" class="tocxref"> Conformance Requirements</a>

<ul class="toc"><li class='tocline'>2.1.
<a href="#docconf" class="tocxref"> Document Conformance</a>

</li><li class='tocline'>2.2.
<a href="#hostconf" class="tocxref"> Host Language Conformance</a>

</li><li class='tocline'>2.3.
<a href="#processorConf" class="tocxref"> Host Language Processor Conformance</a>

</li></ul></li><li class='tocline'>3.
<a href="#s_event_module_elements" class="tocxref"> The XML Events Module</a>

<ul class="toc"><li class='tocline'>3.1.
<a href="#section-listener-element" class="tocxref"> The listener Element</a>

<ul class="toc"><li class='tocline'>3.1.1.
<a href="#sec_3.1.1." class="tocxref"> Examples of listener Usage</a>

</li></ul></li><li class='tocline'>3.2.
<a href="#section-listener-observer" class="tocxref"> Attaching Attributes Directly
to the Observer Element</a>

<ul class="toc"><li class='tocline'>3.2.1.
<a href="#sec_3.2.1." class="tocxref">  Examples of Using Attributes Attached to an Observer Element</a>

</li></ul></li><li class='tocline'>3.3.
<a href="#section-listener-handler" class="tocxref"> Attaching Attributes Directly to the Handler Element</a>

<ul class="toc"><li class='tocline'>3.3.1.
<a href="#sec_3.3.1." class="tocxref"> Examples of Using Attributes Attached to a Handler Element</a>

</li></ul></li><li class='tocline'>3.4.
<a href="#section-attributedefaulting" class="tocxref"> Summary of Observer and Handler Attribute Defaulting</a>

</li><li class='tocline'>3.5.
<a href="#sec_3.5." class="tocxref"> Event Scope</a>

</li><li class='tocline'>3.6.
<a href="#sec_3.6." class="tocxref"> Listener Registration</a>

</li></ul></li><li class='tocline'>4.
<a href="#s_handler_module_elements" class="tocxref"> The XML Handlers Module</a>

<ul class="toc"><li class='tocline'>4.1.
<a href="#section-action-element" class="tocxref"> The action Element</a>

</li><li class='tocline'>4.2.
<a href="#section-dispatchEvent-element" class="tocxref"> The dispatchEvent Element</a>

</li><li class='tocline'>4.3.
<a href="#section-addEventListener-element" class="tocxref"> The addEventListener element</a>

</li><li class='tocline'>4.4.
<a href="#section-removeEventListener-element" class="tocxref"> The removeEventListener element</a>

</li><li class='tocline'>4.5.
<a href="#section-stopPropagation-element" class="tocxref"> The stopPropagation element</a>

</li><li class='tocline'>4.6.
<a href="#section-preventDefault-element" class="tocxref"> The preventDefault element</a>

</li></ul></li><li class='tocline'>5.
<a href="#s_script_module" class="tocxref"> The XML Scripting Module</a>

<ul class="toc"><li class='tocline'>5.1.
<a href="#section-script-element" class="tocxref"> The script Element</a>

</li></ul></li><li class='tocline'>6.
<a href="#section-event-naming" class="tocxref"> Naming Event Types</a>

</li><li class='tocline'>7.
<a href="#section-conditional-expressions" class="tocxref"> Conditional Expressions</a>

<ul class="toc"><li class='tocline'>7.1.
<a href="#conditional-function-library" class="tocxref"> Function Library</a>

<ul class="toc"><li class='tocline'>7.1.1.
<a href="#event-function" class="tocxref"> Event Function</a>

</li></ul></li></ul></li><li class='tocline'>A.
<a href="#a_DTD_definition" class="tocxref"> DTD Implementation</a>

<ul class="toc"><li class='tocline'>A.1.
<a href="#a_module_qname" class="tocxref"> Qualified Names Module</a>

</li><li class='tocline'>A.2.
<a href="#a_module_xml_events" class="tocxref"> XML Events Module</a>

</li><li class='tocline'>A.3.
<a href="#a_module_xml_handlers" class="tocxref"> XML Handlers Module</a>

</li><li class='tocline'>A.4.
<a href="#a_module_xml_script" class="tocxref"> XML Scripting Module</a>

</li></ul></li><li class='tocline'>B.
<a href="#a_Schema_definition" class="tocxref"> Schema Implementation</a>

<ul class="toc"><li class='tocline'>B.1.
<a href="#a_schema_attribs" class="tocxref"> Attributes Module</a>

</li><li class='tocline'>B.2.
<a href="#a_schema_xml_events" class="tocxref"> XML Events Module</a>

</li><li class='tocline'>B.3.
<a href="#a_schema_xml_handlers" class="tocxref"> XML Handlers Module</a>

</li><li class='tocline'>B.4.
<a href="#a_schema_xml_script" class="tocxref"> XML Scripting Module</a>

</li></ul></li><li class='tocline'>C.
<a href="#s_refs" class="tocxref"> References</a>

<ul class="toc"><li class='tocline'>C.1.
<a href="#s_norm-refs" class="tocxref"> Normative References</a>

</li><li class='tocline'>C.2.
<a href="#s_other-refs" class="tocxref"> Other References</a>

</li></ul></li><li class='tocline'>D.
<a href="#s_changes" class="tocxref"> Change History</a>

</li><li class='tocline'>E.
<a href="#s_acks" class="tocxref"> Acknowledgments</a>

</li></ul>
</div>




<!--OddPage-->



      
      
    




<h1 id="s_intro" >1. Introduction
</h1>



	
	


<p><em>This section is informative.</em></p>

<p>An <em>event</em> is the representation of some asynchronous occurrence
(such as a mouse click on the presentation of the element, or an arithmetical
error in the value of an attribute of the element, or any of unthinkably many
other possibilities) that gets associated with an element (<em>targeted</em> at it) in an XML
document.</p>

<p>In the DOM model of events [<a class="nref" href="#ref_DOM3EVENTS">DOM3EVENTS</a>], the general
behavior is that when an event occurs it is <em>dispatched</em> by passing it
down the document tree in a phase called <em>capture</em> to the element
where the event occurred (called its <em>target</em>), where it then may be
passed back up the tree again in the phase called <em>bubbling</em>. In
general an event can be responded to at any element in the path (an <em>observer</em>) in either
phase by causing an action, and/or by stopping the event, and/or by
cancelling the default action for the event. The following diagram illustrates this:</p>

<p>
<img src="images/event-flow.png" alt="Event propagation flow diagram"
longdesc="#event-flow-desc" />
<br />
<em id="event-flow-desc">Event flow in DOM3: an event targeted at an element (marked 'target') in the tree passes down the tree from the root to the target in the phase called 'capture'. 
When it arrives at the target it is in the 'target' (or 'at-target') phase. If the event type allows it, the event then travels back up the tree by the same route in a phase called 'bubbling'. Any node in the route, including the root node and the target, may be an 'observer': that is to say, a handler may be attached to it that is activated when the event passes through in either phase. A handler can only listen for one phase. To listen for both you have to attach two handlers.</em></p>

<p>An <em>action</em> is some way of responding to an event; a
<em>handler</em> is some specification for such an action, for instance using
scripting or some other method. A <em>listener</em> is a binding of such a
handler to an event targeting some element in a document.</p>

<p>HTML [<a class="nref" href="#ref_HTML4">HTML4</a>] binds events to an element by
encoding the event name in an attribute name, such that the value of the
attribute is the action for that event at that element. This method has two
main disadvantages: firstly it hardwires the events into the language, so
that to add a new event, you have to make a change to the language, and
secondly it forces you to mix the content of the document with the
specifications of the scripting and event handling, rather than allowing you
to separate them out.
SVG [<a class="nref" href="#ref_SVG">SVG</a>] uses a similar method.</p>

<p>The process of defining XHTML and related markup languages
identified the need for an
extensible event specification method. The design requirements were the
following:</p>
<ul>
  <li>Syntactically expose the DOM event model to an XML document
     [<a class="nref" href="#ref_XML">XML</a>].</li>
  <li>Provide for new event types without requiring modification to the DOM
    or the DTD.</li>
  <li>Allow for integration with other XML languages.</li>
</ul>

<p>The DOM specifies an event model that provides the following features:</p>
<ul>
  <li>A generic event system,</li>
  <li>Means for registering event listeners and handlers,</li>
  <li>Means for routing events through a tree structure,</li>
  <li>Access to context information for each event, and</li>
  <li>A definition of event flow, as sketched above.</li>
</ul>

<p>The elements and attributes defined in this
specification are the method of binding a DOM level 3 event at an element to
an event handler. They encapsulate various aspects of the DOM level 3 event
interface, thereby providing markup-level specification of the actions to be
taken during the various phases of event propagation.</p>

<p>This document neither specifies particular events, nor mandates any
particular methods of specifying actions. These definitions are left to any
markup language using the facilities described here.</p>

<!--OddPage-->



      
      
    




<h1 id="s_event_module_conformance" >2. Conformance Requirements
</h1>



	
	


<p>This section is <em>normative</em>.</p>
<p>
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as
described in [<a class="nref" href="#ref_RFC2119">RFC2119</a>].
</p>







<h2 id="docconf" >2.1. Document Conformance
</h2>






<p>XML Events is not a stand-alone document type.  It is intended to
be integrated into other Host Languages such as XHTML.
A conforming XML Events document is a document that
requires only the facilities described as mandatory in this
specification and the facilities described as mandatory in its Host Language.
Such a document must meet all the following
criteria:</p>

<ol>
<li>
<p><span class="must"  >The document MUST conform to the constraints expressed in
<a href='#a_Schema_definition'>Appendix&#160;B -
Schema Implementation</a> or
<a href='#a_DTD_definition'>Appendix&#160;A - 
DTD Implementation</a>, combined with the constraints expressed in its
Host Language implementation.</span></p>
</li>

<li>
<p><span class="must"  >If the Host Language does not incorporate XML Events 
elements and attributes into its own namespace, 
the document MUST contain an <code>xmlns</code> declaration for the XML Events namespace
[<a class="nref" href="#ref_XMLNAMES">XMLNAMES</a>]</span>.
The namespace for XML Events is
defined to be 
<code>http://www.w3.org/2001/xml-events</code>.
An example start tag of a root element might look like:</p>
<div class="good">
<pre>
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:ev="http://www.w3.org/2001/xml-events" &gt;
</pre>
</div>
</li>

</ol>








<h2 id="hostconf" >2.2. Host Language Conformance
</h2>






<p><span class="must"  >When XML Events are included in a Host Language, all of the
facilities required in this specification MUST be included in the Host
Language</span>.  <span class="must"  >In addition, the mandatory elements and attributes defined in this
specification MUST be included in the content model of the Host
Language</span>.
</p>









<h2 id="processorConf" >2.3. Host Language Processor Conformance
</h2>






<p><span class="must"  >A conforming Host Language Processor MUST support all of the features required
in this specification.</span></p>

<!--OddPage-->



      
      
    




<h1 id="s_event_module_elements" >3. The XML Events Module
</h1>



	
	


<p><em>This section is normative.</em></p>

<p>This specification defines a module called XML Events. The XML Events
module uses the XML namespace [<a class="nref" href="#ref_XMLNAMES">XMLNAMES</a>] identifier
<code>http://www.w3.org/2001/xml-events</code>.</p>

<p>Examples in this document that use the namespace prefix "<code>ev</code>"
all assume an <code>xmlns</code> declaration
<code>xmlns:ev="http://www.w3.org/2001/xml-events"</code> somewhere suitable
in the document involved. All examples are informative.</p>

<p>The remainder of this section describes the elements and attributes in
this module, the semantics, and provides an abstract module definition as
required in [<a class="nref" href="#ref_XHTMLMOD">XHTMLMOD</a>].</p>

<p>The XML Events Module supports the following element and attributes:</p>

<table cellpadding="3" class="moduledef" border="1"
summary="Element and Attributes for XML Events Module">
  <thead>
    <tr>
      <th>Element</th>
      <th>Attributes</th>
      <th>Minimal Content Model</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a href="#section-listener-element">listener</a></td>
      <td>event (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_QNames">QNames</a></span>),<br />
          observer (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_IDREFS">IDREFS</a></span>),<br />
          eventTarget (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_IDREFS">IDREFS</a></span>),<br />
          function (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_CDATA">CDATA</a></span>),<br />
          handler (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_URI">URI</a></span>),<br />
          phase ("bubble" | "capture" | "default"* | "target"),<br />
          propagate ("stop" | "continue"*),<br />
          defaultAction ("cancel" | "perform"*),<br />
          xml:id ([<a class="nref" href="#ref_XMLID">XMLID</a>])<br />
      </td>
      <td>EMPTY</td>
  </tr>
  </tbody>
</table>

<p>Implementations: <a href="#a_module_xml_events">DTD</a>,
<a href="#a_schema_xml_events">XML Schema</a></p>








<h2 id="section-listener-element" >3.1. The listener Element
</h2>





<p>Element <code>listener</code> supports a subset of the DOM's
<code>EventListener</code> interface. It is used to declare event listeners
and register them with specific nodes in the DOM, and has the following
attributes:</p>
<dl>
  <dt><a id="attr-listener-event">event</a></dt>
  <dd>The required <code>event</code> attribute specifies one, or more, event types
  for which the listener is being registered.</dd>
  <dt><a id="attr-listener-observer"></a>observer</dt>
    <dd>The optional <code>observer</code> attribute specifies the
      <code>id</code> of one, or more, elements with which the event listener is to be
      registered. If this attribute is not present, the observer is the
      element that the <code>event</code> attribute is on (see later under
      "<a href="#section-listener-observer">Attaching Attributes Directly to
      the Observer Element</a>"), or the parent of that element (see later
      under "<a href="#section-listener-handler">Attaching Attributes
      Directly to the Handler Element</a>").

  </dd>

  <dt><a id="attr-listener-eventTarget">eventTarget</a></dt>

    <dd>The optional <code>eventTarget</code> attribute specifies the
      <code>id</code> of one, or more, target elements of the event (i.e., the node that
      caused the event). If this attribute is present, only events that match
      both the <code>event</code> and <code>eventTarget</code> attributes will be
      processed by the associated event handler. Clearly because of the way
      events propagate, the target element should be a descendent node of 
      the observer element, or the observer element itself.
      <p>Use of this attribute requires care; for instance, if you specify</p>




<div class="example">
<pre>
&lt;listener event="click" observer="para1" eventTarget="link1" handler="#clicker"/&gt;
...
&lt;p id="para1"&gt;
    Here is some content in a paragraph that includes a link to
    &lt;a id="link1" href="Overview.html"&gt;the 
        &lt;em&gt;draft&lt;/em&gt;
    document&lt;/a&gt;.
&lt;/p&gt;
</pre>
</div>
      <p>and the user happens to click on the word "draft", the
      <code>em</code> element, and not the <code>a</code>,
      will be the target, and so the handler will not be activated; to catch
      all mouse clicks on the <code>a</code> element and its children,
      use <code>observer="link1"</code>, and no <code>eventTarget</code>
      attribute.</p>
    </dd>
  <dt id="attr-listener-function">function</dt>
  <dd>The <code>function</code> attribute identifies an optional
  function name that will be called when the event reaches the observer.</dd>
  <dt><a id="attr-listener-handler">handler</a></dt>
    <dd>The optional <code>handler</code> attribute specifies the URI reference of a
      resource that defines the action that should be performed if the event
      reaches the observer. 
      If this attribute is not present, the handler is the element that the <code>event</code>
      attribute is on (see later under "<a
      href="#section-listener-handler">Attaching Attributes Directly to the
      Handler Element</a>").
  <p><span class="must"  >If both the <code>function</code> and <code>handler</code> attributes
  are defined, the <code>handler</code> element MUST be ignored.</span></p>
  </dd>
  <dt><a id="attr-listener-phase">phase</a></dt>
     <dd>The optional <code>phase</code> attribute specifies when (during
      which DOM 3 event propagation phase) the listener will be activated by
      the desired event.
      <dl>
        <dt><code>bubble</code></dt>
          <dd>Listener is activated during the bubbling phase.</dd>
        <dt><code>capture</code></dt>
          <dd>Listener is activated during the capture phase.</dd>
        <dt><code>target</code></dt>
          <dd>Listener is activated during the target phase.</dd>
        <dt><code>default</code></dt>
          <dd>Listener is activated during target or bubbling phases.</dd>
      </dl>
      <p>If no <code>phase</code> attribute is specified it is equivalent to having specified <code>phase="default"</code>.</p>
      <p>Note that not all events bubble, in which case with <code>phase="default"</code>
      you can only handle the event by making the event's target the observer. The use of <code>phase="default"</code> is equivalent to invoking the DOM <code>addEventListener</code> method with a <code>useCapture</code> that is <code>false</code>.</p>
    </dd> 
  <dt><a id="attr-listener-propagate">propagate</a></dt>
    <dd>The optional <code>propagate</code> attribute specifies whether after
      processing all listeners at the current node, the event is allowed to
      continue on its path (either in the capture, target, or bubble phase). 
      <dl>
        <dt><code>stop</code></dt>
          <dd>event propagation stops</dd>
        <dt><code>continue</code></dt>
          <dd>event propagation continues (unless stopped by other means,
            such as scripting, or by another listener).</dd>
      </dl>
      <p>The default behavior is <code>propagate="continue"</code>.</p>
    </dd>
  <dt><a id="attr-listener-defaultAction">defaultAction</a></dt>
    <dd>The optional <code>defaultAction</code> attribute specifies whether after
      processing of all listeners for the event, the
      default action for the event (if any) should be performed or not. For
      instance, in XHTML the default action for a mouse click on an
      <code>a</code> element or one of its descendents 
	  is to traverse the link.
      <dl>
        <dt><code>cancel</code></dt>
          <dd>if the event type is cancelable, the default action is
            cancelled</dd>
        <dt><code>perform</code></dt>
          <dd>the default action is performed (unless cancelled by other
            means, such as scripting, or by another listener).</dd>
      </dl>
      <p>The default value is <code>defaultAction="perform"</code>.</p>
      <p>Note that not all events are cancelable, in which case this
      attribute is ignored.</p>
      </dd>
</dl>








<h3 id="sec_3.1.1." >3.1.1. Examples of listener Usage
</h3>





<ol>
  <li><p>This example attaches the handler in the element at
    <code>"#doit"</code> that will get activated when the event called
    <code>activate</code> occurs on the element with
    <code>id="button1"</code>, or any of its children. The activation will
    occur during bubbling, or if the event happened on the observer element
    itself, when the event reaches the element (phase <em>target</em>).</p>
    <pre>&lt;listener event="DOMActivate" observer="button1" handler="#doit"/&gt;</pre>
  </li>
  <li><p>This attaches the handler at <code>#overflow-handler</code> that
    will get activated when the event <code>overflow</code> occurs on the
    element with <code>id="expr1"</code> and bubbles up to the element with
    <code>id="prog1"</code>.</p>
    <pre>&lt;listener event="overflow" observer="prog1" eventTarget="expr1"
        handler="#overflow-handler"/&gt;</pre>
  </li>
  <li><p>This attaches the handler at <code>#popup</code> that will get
    activated whenever an <code>activate</code> event occurs at the element
    with <code>id="embargo"</code> or any of its children. Since it will be
    activated during the capture phase, and propagation is stopped, this will
    have the effect (regardless of what the handler does) of preventing any
    child elements of the <code>embargo</code> element seeing any
    <code>activate</code> events.</p>
    <pre>&lt;listener event="DOMActivate" observer="embargo" handler="#popup"
        phase="capture" propagate="stop"/&gt;</pre>
  </li>
  <li><p>This attaches a handler from another document.</p>
    <pre>&lt;listener event="DOMActivate" observer="image1"
    handler="/handlers/events.xml#activate"/&gt;</pre>
  </li>
</ol>








<h2 id="section-listener-observer" >3.2. Attaching Attributes Directly
to the Observer Element
</h2>






<p id="col_XMLEvents">All the attributes from the <code>listener</code> element with the
exception of <code>id</code> may be used as global attributes, as
defined in <em>Namespaces in XML</em> [<a class="nref" href="#ref_XMLNAMES">XMLNAMES</a>],
to attach the attributes to other elements.
<em>In the schema implementations, 
    this is done by defining the attribute collection <code>XMLEvents</code>.</em>
</p>

<p>Note that this means that the <code>listener</code> element is
strictly speaking redundant, since the following</p>
<pre>&lt;anyelement ev:event="click" ev:observer="button1" ev:handler="#clicker"/&gt;</pre>

<p>would have the same effect as</p>
<pre>&lt;ev:listener event="click" observer="button1" handler="#clicker"/&gt;</pre>

<p>Nonetheless, for utility the <code>listener</code> element has
been retained.</p>

<p>If the <code>observer</code> attribute is omitted (but not the
<code>handler</code> attribute), then the element that the other
attributes are attached to is the observer element.</p>








<h3 id="sec_3.2.1." >3.2.1.  Examples of Using Attributes Attached to an Observer Element
</h3>





<ol>
  <li><p>This first example will attach the handler identified by
    <code>"#popper"</code> to the <code>a</code> element, and cancel
    the default action for the event.</p>
    <pre>&lt;a href="doc.html" ev:event="DOMActivate" ev:handler="#popper"
   ev:defaultAction="cancel"&gt;The document&lt;/a&gt;</pre>
  </li>
  <li><p>This will attach the handler at <code>#handle-overflow</code> for
    the event <code>overflow</code> to the current element.</p>
    <pre>&lt;div ev:event="overflow" ev:handler="#handle-overflow"&gt; ... &lt;/div&gt;</pre>
  </li>
</ol>








<h2 id="section-listener-handler" >3.3. Attaching Attributes Directly to the Handler Element
</h2>






<p>If, when attaching the global attributes to an element, the <code>handler</code> attribute is 
omitted then the element that the other attributes are attached to is the handler element.</p>

<p>Note that, since the <code>observer</code> and <code>eventTarget</code>
attributes are IDREFs, in this case the handler and observer/target elements
must be in the same document (while in other cases, since the
<code>handler</code> attribute is a URI, the handler element may be in
another document).</p>

<p>If the <code>observer</code> attribute is also omitted, then
the parent of the handler element is the observer element.</p>








<h3 id="sec_3.3.1." >3.3.1. Examples of Using Attributes Attached to a Handler Element
</h3>






<ol>
  <li><p>In this case the element is the handler for the <code>submit</code>
    event on the element with <code>id="form1"</code>.</p>
    <pre>&lt;script type="application/x-javascript"
        ev:event="submit" ev:observer="form1"&gt;
   return docheck(event);
&lt;/script&gt;</pre>
  </li>
  <li><p>In this case the <code>action</code> element is the handler
    for event <code>q-submit</code>, and the observer is the
    <code>questionnaire</code> element.</p>
    <pre>&lt;questionnaire submissionURL="/q/tally"&gt;
    &lt;action ev:event="q-submit"&gt;
      ...
    &lt;/action&gt;
    ...
 &lt;/questionnaire&gt;</pre>
  </li>
  <li><p>The <code>script</code> element is the handler for event
    <code>click</code>; the <code>img</code> element is the
    observer.</p>
    <pre>&lt;img src="button.gif" alt="OK"&gt;
    &lt;script ev:event="DOMActivate" type="application/x-javascript"&gt;
        doactivate(event);
    &lt;/script&gt;
&lt;/img&gt;</pre>
  </li>
  <li><p>The <code>onevent</code> element is the handler for event
    <code>enterforward</code>. The <code>card</code> element is the
    observer.</p>
    <pre>&lt;card&gt;
    &lt;onevent ev:event="enterforward"&gt;
        &lt;go href="/url"/&gt;
    &lt;/onevent&gt;
    &lt;p&gt;
      Hello!
    &lt;/p&gt;
&lt;/card&gt;</pre>
  </li>
  <li><p>The <code>catch</code> element is the handler for the
    <code>nomatch</code> event. The observer is the <code>field</code>
    element.</p>
    <pre>&lt;form id="launch_missiles"&gt;
  &lt;field name="password"&gt;
    &lt;prompt&gt;What is the code word?&lt;/prompt&gt;
    &lt;grammar&gt;
      &lt;rule id="root" scope="public"&gt;rutabaga&lt;/rule&gt;
    &lt;/grammar&gt;
    &lt;help&gt;It is the name of an obscure vegetable.&lt;/help&gt;
    &lt;catch ev:event="nomatch"&gt;
      &lt;prompt&gt;Security violation!&lt;/prompt&gt;
      &lt;submit next="apprehend_felon" namelist="user_id"/&gt;
    &lt;/catch&gt;
  &lt;/field&gt;
  &lt;block&gt;
    &lt;goto next="#get_city"/&gt;
  &lt;/block&gt;
&lt;/form&gt;</pre>
  </li>
  <li><p>This example shows three handlers for different events. The observer
    for all three is the <code>secret</code> element.</p>
    <pre>&lt;secret ref="/login/password"&gt;
    &lt;caption&gt;Please enter your password&lt;/caption&gt;
    &lt;info ev:event="help"&gt;
        Mail help@example.com in case of problems
    &lt;/info&gt;
    &lt;info ev:event="hint"&gt;
        A pet's name
    &lt;/info&gt;
    &lt;info ev:event="alert"&gt;
        This field is required
    &lt;/info&gt;
&lt;/secret&gt;</pre>
  </li>
</ol>








<h2 id="section-attributedefaulting" >3.4. Summary of Observer and Handler Attribute Defaulting
</h2>






<p>The following table summarizes which elements play the role of
observer or handler if the relevant attribute is omitted.</p>

<table cellpadding="3" border="1" summary="The effect of omitted observer and handler attributes">
  <caption>The effect of omitted observer and handler attributes</caption>
  <tbody>
    <tr>
      <td></td>
      <th>Handler present</th>
      <th>Handler omitted</th>
    </tr>
    <tr>
      <th>Observer present</th>
      <td>(As declared)</td>
      <td>Element is handler</td>
    </tr>
    <tr>
      <th>Observer omitted</th>
      <td>Element is observer</td>
      <td>Element is handler<br />
        Parent is observer</td>
    </tr>
  </tbody>
</table>








<h2 id="sec_3.5." >3.5. Event Scope
</h2>





<p>In some environments (e.g., User Agents) it is possible to have multiple documents available simultaneously - even to 
the extent that one document is <em>embedded</em> within another (see the <code>iframe</code> element in [<a class="nref" href="#ref_XHTMLMOD">XHTMLMOD</a>]).
When multiple documents are available, each of these documents is in a separate <em>context</em>.
Consequently, it is not possible for DOM events to move among these separate documents.  This means, for example, that if one document is
embedded within another, an event fired in the context of that document WILL NOT be available to the event handlers in enclosing document.
See [<a class="nref" href="#ref_DOM3EVENTS">DOM3EVENTS</a>] for more information.</p>








<h2 id="sec_3.6." >3.6. Listener Registration
</h2>





<p><span class="must"  >Dynamic content MUST be evaluated by a user agent to ensure that any 
new listeners or handlers are correctly registered with the event system.</span></p>
<p><span class="must"  >An implementation MUST behave as if any event handlers
are registered prior to the DOM3 <code>load</code> event being fired.</span></p>

<!--OddPage-->



      
      
    




<h1 id="s_handler_module_elements" >4. The XML Handlers Module
</h1>



	
	

<p><em>This section is normative.</em></p>

<p>The purpose of this module is to provide a declarative way to map
specific events to a series of one or more actions.  Those actions are
declared either by the Host Language (e.g., [<a class="nref" href="#ref_XFORMS">XFORMS</a>]) or
within the document using the XML Events module above.  Implementing
actual handlers for the events remains the purview of the Host
Language, supported scripting languages, etc.</p>

<p>The XML Handlers Module supports the following elements and attributes:</p>

<table cellpadding="3" class="moduledef" border="1"
summary="Element and Attributes for XML Handlers Module">
  <thead>
    <tr>
      <th>Element</th>
      <th>Attributes</th>
      <th>Minimal Content Model</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a href="#section-action-element">action</a></td>
      <td>event (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_QNames">QNames</a></span>),<br />
          eventTarget (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_IDREFS">IDREFS</a></span>),<br />
          declare ("declare"),<br />
          if (<a href="#section-conditional-expressions">ConditionalExpression</a>),<br />
          while (<a href="#section-conditional-expressions">ConditionalExpression</a>),<br />
          xml:id ([<a class="nref" href="#ref_XMLID">XMLID</a>])
      </td>
      <td>( action | dispatchEvent | addEventListener | removeEventListener
	  | stopPropagation | preventDefault )+</td>
  </tr>
  <tr>
      <td><a href="#section-dispatchEvent-element">dispatchEvent</a></td>
      <td>eventType&nbsp;(<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_QName">QName</a></span>),<br />
          targetid&nbsp;(<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_IDREFS">IDREFS</a></span>),<br />
          bubbles&nbsp;("bubbles"),<br />
          cancelable&nbsp;("cancelable"),<br />
          xml:id&nbsp;([<a class="nref" href="#ref_XMLID">XMLID</a>])
      </td>
      <td>EMPTY</td>
  </tr>
  <tr>
      <td><a href="#section-addEventListener-element">addEventListener</a></td>
      <td>event* (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_QName">QName</a></span>),<br />
          handler* (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_IDREF">IDREF</a></span>),<br />
          phase ("bubble" | "capture" | "default"* | "target"),<br />
          xml:id ([<a class="nref" href="#ref_XMLID">XMLID</a>])
      </td>
      <td>EMPTY</td>
  </tr>
  <tr>
      <td><a href="#section-removeEventListener-element">removeEventListener</a></td>
      <td>event* (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_QName">QName</a></span>),<br />
          handler* (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_IDREF">IDREF</a></span>),<br />
          phase ("bubble" | "capture" | "default"* | "target"),<br />
          xml:id ([<a class="nref" href="#ref_XMLID">XMLID</a>])
      </td>
      <td>EMPTY</td>
  </tr>
  <tr>
      <td><a href="#section-stopPropagation-element">stopPropagation</a></td>
      <td>event* (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_QName">QName</a></span>),<br />
          xml:id ([<a class="nref" href="#ref_XMLID">XMLID</a>])
      </td>
      <td>EMPTY</td>
  </tr>
  <tr>
      <td><a href="#section-preventDefault-element">preventDefault</a></td>
      <td>event* (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_QName">QName</a></span>),<br />
          xml:id ([<a class="nref" href="#ref_XMLID">XMLID</a>])
      </td>
      <td>EMPTY</td>
  </tr>

  </tbody>
</table>

<p><span class="must"  >When this module is selected, the XML Events module MUST also be selected.</span></p>

<p>Implementations: <a href="#a_module_xml_handlers">DTD</a>,
<a href="#a_schema_xml_handlers">XML Schema</a></p>








<h2 id="section-action-element" >4.1. The action Element
</h2>






<p>The <code>action</code> element is used to group event 
handler elements (including other <code>action</code> elements)
that will act <em>in sequence</em>
as handlers for an event.  The
<code>action</code> element takes the following attributes:</p>
<dl>
  <dt><a id="attr-action-event">event</a></dt>
    <dd>The required <code>event</code> attribute specifies one, or more, event types 
    this action will handle.</dd>
  <dt><a id="attr-action-eventTarget">eventTarget</a></dt>

    <dd>The optional <code>eventTarget</code> attribute specifies the
      <code>id</code> of one, or more, target elements of the event (i.e., the node that
      caused the event). If this attribute is present, only events that match
      both the <code>event</code> and <code>eventTarget</code> attributes will be
      processed. Clearly because of the way
      events propagate, the target element should be a descendant node of 
      the observer element, or the observer element itself.
    </dd>
    <dt><a id="attr-action-declare">declare</a></dt>
    <dd>When present, this boolean attribute makes the current 
    element (and any elements it may contain) a declaration only.</dd>

	<dt><a id="attr-listener-if">if</a></dt>
	<dd>
          The optional if attribute allows a condition to be specified.  
          This condition must be met in order for the event handler to be activated. 
          The condition is specified using a <a href="#section-conditional-expressions">Conditional Expression</a>. 
          There is no default value.
          
          <p>This attribute allows event handlers to be specified that respond not just to named events, 
          but to more specific conditions, such as a mouse click with the control key pressed:</p>
          




<div class="example">
<pre>
&lt;action event="click" if="event('ctrlKey') = true()"&gt;
 . . .
&lt;/action&gt;
</pre>
</div>

	  <p>The event function is described in <a href="#event-function">Event Function</a>.</p>
	</dd>

	<dt><a id="attr-listener-while">while</a></dt>
	<dd>
	  The optional while attribute allows a condition to be
	  specified. This condition must be met in order for the event
	  handler to be activated. The condition is specified using an
	  <a href="#section-conditional-expressions">Conditional Expression</a>. There is no default value.
	  
	  <p>This attribute allows event handlers to be specified that
	  perform their action whilst some condition remains true.</p>
	  
	  <p><em>EDITORS' NOTE:</em> Can't think of an example that only makes use of what we 
	  have in this spec, i.e., the event() function. We may need to do something like delete a list in XForms.</p>
	</dd>

</dl>









<h2 id="section-dispatchEvent-element" >4.2. The dispatchEvent Element
</h2>






<p>The <code>dispatchEvent</code> element triggers the event
identified by the <code>eventType</code> attribute, delivering
it to the element identified by the <code>to</code> attribute.</p>

<p>The <code>dispatchEvent</code> element also defines two additional
attributes:</p>
<dl>
<dt><a id="attr-dispatchEvent-bubbles">bubbles</a></dt>
<dd>
  Optional boolean indicating if this event bubbles as defined
  in [<a class="nref" href="#ref_DOM3EVENTS">DOM3EVENTS</a>]. The default value will depend on the
  actual event being dispatched.</dd>

<dt><a id="attr-dispatchEvent-cancelable">cancelable</a></dt>
<dd>
  Optional boolean indicating if this event is cancelable as
  defined in [<a class="nref" href="#ref_DOM3EVENTS">DOM3EVENTS</a>]. The default value will depend on
  the actual event being dispatched.</dd>

  <dt><a id="attr-dispatchEvent-targetid">targetid</a></dt>
  <dd>This attribute specifies the <code>id</code> of one or more elements to which the event is dispatched. If this is not specified,
  it defaults to the parent of the <code>dispatchEvent</code> element</dd>

  <dt><a id="attr-dispatchEvent-eventType">eventType</a></dt>
  <dd>The <span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_QName">QName</a></span> of the event to be triggered.</dd>
</dl>








<h2 id="section-addEventListener-element" >4.3. The addEventListener element
</h2>






<p>This element allows the registration of a listener on a specific
event, as defined in [<a class="nref" href="#ref_DOM3EVENTS">DOM3EVENTS</a>]. </p>








<h2 id="section-removeEventListener-element" >4.4. The removeEventListener element
</h2>






<p>The <code>removeEventListener</code> element de-registers the 
handler identified by the required <code>handler</code> attribute for
the event identified by the required <code>event</code> attribute.</p>








<h2 id="section-stopPropagation-element" >4.5. The stopPropagation element
</h2>






<p>The <code>stopPropagation</code>
element is used to prevent further propagation of an
event during event flow. If this is called by any EventListener the
event will cease propagating through the tree. The event will complete
dispatch to all listeners on the current EventTarget before event flow
stops. This action may be used during any stage of event flow.</p>








<h2 id="section-preventDefault-element" >4.6. The preventDefault element
</h2>






<p>If an event is cancelable, the <code>preventDefault</code>
action is used to signify that
the event is to be canceled, meaning any default action normally taken by
the implementation as a result of the event will not occur. If, during any
stage of event flow, the <code>preventDefault</code>
action is called the event is
canceled. Any default action associated with the event will not occur.
Calling this action for a non-cancelable event has no effect. Once
preventDefault has been called it will remain in effect throughout the
remainder of the event's propagation. This action may be used during any
stage of event flow.</p>

<!--OddPage-->



      
      
    




<h1 id="s_script_module" >5. The XML Scripting Module
</h1>



	
	

<p><em>This section is normative.</em></p>

<p>The XML Script Module defines an element for defining event handlers
via a scripting language.  
This module can be used as a
replacement for the XHTML Scripting Module
defined in XHTML Modularization [<a class="nref" href="#ref_XHTMLMOD">XHTMLMOD</a>].</p>

<p>The XML Script Module supports the following element:</p>

<table cellpadding="3" class="moduledef" border="1" summary="Element for XML Script Module">
  <thead>
    <tr>
      <th>Element</th>
      <th>Attributes</th>
      <th>Minimal Content Model</th>
    </tr>
  </thead>
  <tbody>
      <tr>
          <td><a href="#section-script-element">script</a></td>
          <td>charset (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_Charset">Charset</a></span>),<br />
              defer ("defer"), <br />
              implements (<code>URIorSafeCURIEs</code>),<br />
              src (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_URI">URI</a></span>),<br />
              type (<span class="datatype"><a
        href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_ContentType">ContentType</a></span>),<br />
              xml:id ([<a class="nref" href="#ref_XMLID">XMLID</a>])
          </td>
          <td>PCDATA</td>
      </tr>
  </tbody>
</table>

<p>When the Scripting module is included AND the XML Handlers Module
is included, the <code>script</code> element is added to the content
model of the XML Handlers Module <code>action</code> element.</p>

<p>Implementations: <a href="#a_module_xml_script">DTD</a>,
<a href="#a_schema_xml_script">XML Schema</a></p>








<h2 id="section-script-element" >5.1. The script Element
</h2>






<p>The <code>script</code> element contains or references <em>scripts</em> that may register one or more event handlers for a document through a <em>scripting language</em> that is supported by the implementation.</p>

<dl>
  <dt id="attr-script-charset">charset</dt>
  <dd>The optional <code>charset</code> attribute specifies the encoding
  of the remote resource identified by the <code>src</code> attribute.
  </dd>
  <dt id="attr-script-defer">defer</dt>
  <dd>This attribute provides a hint to the user agent that the contents 
  of the <code>script</code> element will not effect the generation of the document.</dd>
  <dt><a id="attr-script-implements">implements</a></dt>
    <dd>The optional <code>implements</code> attribute indicates that the script provides an implementation of the feature or features identified via this attribute. 
    <span class="should"  >The script SHOULD only be loaded and used if the user agent does not have an implementation of the specified feature.</span>
    </dd>
  <dt id="attr-script-src">src</dt>
  <dd>The <code>src</code> attribute identifies an external resource 
  that provides the script implementation.</dd>
  <dt id="attr-script-type">type</dt>
  <dd>Defines the programming language in which the script is 
  implemented by using its media type.</dd>
  <dt id="attr-script-xml-id">xml:id</dt>
  <dd>The optional xml:id attribute assigns an identifier to an element. The value of this attribute must be unique within a document.</dd>
</dl>

<p>The event handler(s) may be defined within the contents of the
<code>script</code> element or in an external file. <span class="must"  >If the <code>src</code> 
attribute is not set, user agents MUST
interpret the contents of the element as the handler.</span> 
<span class="must"  >If the <code>src</code> has a URI value, user agents MUST ignore
the element's contents and retrieve the handler via the URI.</span>
</p>

<!--OddPage-->



      
      
    




<h1 id="section-event-naming" >6. Naming Event Types
</h1>



	
	


<p><em>This section is informative.</em></p>

<p>This specification does not normatively specify how language designers
should name events (i.e., the values used in the <code>event</code>
attribute).</p>

<p>However, future versions of DOM Events are likely to allow namespaced event names, so language designers are advised not to use the colon character ":" in event names.</p>

<p>A number of event types are defined in DOM 3 Events [<a class="nref" href="#ref_DOM3EVENTS">DOM3EVENTS</a>], to
which you should refer for their names and semantics.</p>

<!--OddPage-->



      
      
    




<h1 id="section-conditional-expressions" >7. Conditional Expressions
</h1>



	
	


<p>XML Events uses XPath-like expressions to specify conditionals 
(<a href="#attr-listener-if">if</a>, <a href="#attr-listener-while">while</a>).
As described in section 1 of [<a class="nref" href="#ref_XPATH">XPATH</a>], each expression is evaluated
within a context, which is made up of:
</p>
<ul>
    <li>a node (the context node)</li>
    <li>a pair of non-zero positive integers (the context position and the context size)</li>
    <li>a set of variable bindings</li>
    <li>a function library</li>
    <li>the set of namespace declarations in scope for the expression</li>
</ul>

<p>By default, XML Events expressions have no context node, and so the context
position is 0 and the context size is 0. There are no variable bindings, and
the function library contains the functions described below. It is
not necessary to provide namespace declarations.</p>

<p><span class="must"  >Host languages that import XML Events may provide a richer context, and
MUST specify whether their context is the same as that provided here, or
more.</span></p>









<h2 id="conditional-function-library" >7.1. Function Library
</h2>





<p>The function library consists of the following functions:</p>
<ul>
    <li>event</li>
</ul>








<h3 id="event-function" >7.1.1. Event Function
</h3>





<p><code>object event(string)</code></p>

<p>Function <code>event</code> returns the value of a property of the current event object,
as determined by the string argument. The value returned will be typed,
depending on the property. For example, the MouseEvent interface [<a class="nref" href="#ref_DOM3EVENTS">DOM3EVENTS</a>]
has the
attribute <code>shiftKey</code>, which is a <code>boolean</code>. This can be accessed by passing the
string value '<code>shiftKey</code>' to the event function. The result will be an XPath-like
boolean.</p>


<!--OddPage-->



      
      
    




<h1 id="a_DTD_definition" >A. DTD Implementation
</h1>



	
	


<p>This appendix is <em>normative</em>.</p>

<p>The DTD implementation of XML Events conforms to the requirements defined
in [<a class="nref" href="#ref_XHTMLMOD">XHTMLMOD</a>]. Consequently, it provides a Qualified
Names sub-module, and a module file for the XML Events
module defined in this Proposed Recommendation.</p>








<h2 id="a_module_qname" >A.1. Qualified Names Module
</h2>






<p>Note that this module defines the parameter entity
<code>%xml-events-attrs.qname;</code>. This entity is intended to be used in
the attribute lists of elements in any Host Language that permits the use of
event attributes on elements in its own namespace. In this case the Host
Language driver should set a parameter entity <code>%XML-EVENTS.prefixed;</code>
to <code>INCLUDE</code> and a parameter entity <code>%XML-EVENTS.prefix;</code>
to a value that is the prefix for the XML Events attributes.</p>








<pre class="dtd">
&lt;!-- ....................................................................... --&gt;
&lt;!-- XML Events Qname Module  ............................................ --&gt;
&lt;!-- file: xml-events-qname-2.mod

     This is XML Events - the Events Module for XML,
     a definition of access to the DOM events model.

     Copyright 2000-2007 W3C (MIT, ERCIM, Keio), All Rights Reserved.

     This DTD module is identified by the PUBLIC and SYSTEM identifiers:

       PUBLIC "-//W3C//ENTITIES XML Events Qnames 2.0//EN"
       SYSTEM "http://www.w3.org/MarkUp/DTD/xml-events-qname-2.mod"

     Revisions:
     (none)
     ....................................................................... --&gt;

&lt;!-- XML Events Qname (Qualified Name) Module

     This module is contained in two parts, labeled Section 'A' and 'B':

       Section A declares parameter entities to support namespace-
       qualified names, namespace declarations, and name prefixing
       for XML Events and extensions.

       Section B declares parameter entities used to provide
       namespace-qualified names for all XML Events element types:

         %listener.qname;   the xmlns-qualified name for &lt;listener&gt;
         ...

     XML Events extensions would create a module similar to this one.
     Included in the XML distribution is a template module
     ('template-qname-2.mod') suitable for this purpose.
--&gt;

&lt;!-- Section A: XML Events XML Namespace Framework :::::::::::::::::::: --&gt;

&lt;!-- 1. Declare a %XML-EVENTS.prefixed; conditional section keyword, used
        to activate namespace prefixing. The default value should
        inherit '%NS.prefixed;' from the DTD driver, so that unless
        overridden, the default behavior follows the overall DTD
        prefixing scheme.
--&gt;
&lt;!ENTITY <span class="entity">% NS.prefixed</span> "IGNORE" &gt;
&lt;!ENTITY <span class="entity">% XML-EVENTS.prefixed</span> "%NS.prefixed;" &gt;

&lt;!-- 2. Declare a parameter entity (eg., %XML-EVENTS.xmlns;) containing
        the URI reference used to identify the XML Events namespace
--&gt;
&lt;!ENTITY <span class="entity">% XML-EVENTS.xmlns</span>  "http://www.w3.org/2001/xml-events" &gt;

&lt;!-- 3. Declare parameter entities (eg., %XML.prefix;) containing
        the default namespace prefix string(s) to use when prefixing
        is enabled. This may be overridden in the DTD driver or the
        internal subset of an document instance. If no default prefix
        is desired, this may be declared as an empty string.

     NOTE: As specified in [XMLNAMES], the namespace prefix serves
     as a proxy for the URI reference, and is not in itself significant.
--&gt;
&lt;!ENTITY <span class="entity">% XML-EVENTS.prefix</span>  "" &gt;

&lt;!-- 4. Declare parameter entities (eg., %XML-EVENTS.pfx;) containing the
        colonized prefix(es) (eg., '%XML-EVENTS.prefix;:') used when
        prefixing is active, an empty string when it is not.
--&gt;
&lt;![%XML-EVENTS.prefixed;[
&lt;!ENTITY <span class="entity">% XML-EVENTS.pfx</span>  "%XML-EVENTS.prefix;:" &gt;
]]&gt;
&lt;!ENTITY <span class="entity">% XML-EVENTS.pfx</span>  "" &gt;

&lt;!-- declare qualified name extensions here ............ --&gt;
&lt;!ENTITY <span class="entity">% xml-events-qname-extra.mod</span> "" &gt;
%xml-events-qname-extra.mod;

&lt;!-- 5. The parameter entity %XML-EVENTS.xmlns.extra.attrib; may be
        redeclared to contain any non-XML Events namespace declaration
        attributes for namespaces embedded in XML. The default
        is an empty string.  XLink should be included here if used
        in the DTD.
--&gt;
&lt;!ENTITY <span class="entity">% XML-EVENTS.xmlns.extra.attrib</span> "" &gt;


&lt;!-- Section B: XML Qualified Names ::::::::::::::::::::::::::::: --&gt;

&lt;!-- 6. This section declares parameter entities used to provide
        namespace-qualified names for all XML Events element types.
--&gt;

&lt;!ENTITY <span class="entity">% xml-events.listener.qname</span>  "%XML-EVENTS.pfx;listener" &gt;


&lt;!ENTITY <span class="entity">% xml-handlers.action.qname</span>  "%XML-EVENTS.pfx;action" &gt;
&lt;!ENTITY <span class="entity">% xml-script.script.qname</span>  "%XML-EVENTS.pfx;script" &gt;
&lt;!ENTITY <span class="entity">% xml-handlers.dispatchEvent.qname</span>  "%XML-EVENTS.pfx;dispatchEvent" &gt;
&lt;!ENTITY <span class="entity">% xml-handlers.addEventListener.qname</span>  "%XML-EVENTS.pfx;addEventListener" &gt;
&lt;!ENTITY <span class="entity">% xml-handlers.removeEventListener.qname</span>  "%XML-EVENTS.pfx;removeEventListener" &gt;
&lt;!ENTITY <span class="entity">% xml-handlers.stopPropagation.qname</span>  "%XML-EVENTS.pfx;stopPropagation" &gt;
&lt;!ENTITY <span class="entity">% xml-handlers.preventDefault.qname</span>  "%XML-EVENTS.pfx;preventDefault" &gt;


&lt;!-- The following defines a PE for use in the attribute sets of elements in
     other namespaces that want to incorporate the XML Event attributes. Note
     that in this case the XML-EVENTS.pfx should always be defined. --&gt;

&lt;!ENTITY <span class="entity">% xml-events.attrs.qname</span>
   "%XML-EVENTS.pfx;event            NMTOKEN      #IMPLIED
    %XML-EVENTS.pfx;observer         IDREFS       #IMPLIED
    %XML-EVENTS.pfx;eventTarget      IDREFS       #IMPLIED
    %XML-EVENTS.pfx;handler          %URI.datatype;        #IMPLIED
    %XML-EVENTS.pfx;phase            (capture|default) #IMPLIED
    %XML-EVENTS.pfx;propagate        (stop|continue) #IMPLIED
    %XML-EVENTS.pfx;defaultAction    (cancel|perform) #IMPLIED
    %XML-EVENTS.pfx;condition        CDATA        #IMPLIED"
    &gt;

&lt;!-- end of xml-events-qname-2.mod --&gt;

</pre>








<h2 id="a_module_xml_events" >A.2. XML Events Module
</h2>













<pre class="dtd">
&lt;!-- ...................................................................... --&gt;
&lt;!-- XML Events Module .................................................... --&gt;
&lt;!-- file: xml-events-2.mod

     This is XML Events - the Events Module for XML.
     a redefinition of access to the DOM events model.

     Copyright 2000-2007 W3C (MIT, ERCIM, Keio), All Rights Reserved.

     This DTD module is identified by the PUBLIC and SYSTEM identifiers:

       PUBLIC "-//W3C//ENTITIES XML Events 2.0//EN"
       SYSTEM "http://www.w3.org/MarkUp/DTD/xml-events-2.mod"

     Revisions:
     (none)
     ....................................................................... --&gt;


&lt;!-- XML Events defines the listener element and its attributes --&gt;

&lt;!ENTITY <span class="entity">% xml-events.listener.content</span> "EMPTY" &gt;

&lt;!ELEMENT <span class="element">%xml-events.listener.qname;</span> %xml-events.listener.content;&gt;
&lt;!ATTLIST %xml-events.listener.qname;
    xml:id           ID           #IMPLIED
    event            NMTOKEN      #REQUIRED
    observer         IDREF        #IMPLIED
    eventTarget      IDREF        #IMPLIED
    handler          %anyURI.datatype;        #IMPLIED
    phase            (capture|default) #IMPLIED
    propagate        (stop|continue) #IMPLIED
    defaultAction    (cancel|perform)  #IMPLIED
&gt;

&lt;!-- end of xml-events-2.mod --&gt;

</pre>







<h2 id="a_module_xml_handlers" >A.3. XML Handlers Module
</h2>













<pre class="dtd">
&lt;!-- ................................................................... --&gt;
&lt;!-- XML Handlers Module ............................................... --&gt;
&lt;!-- file: xml-handlers-1.mod

     This is XML Handlers - the Handlers Module for XML.
     a redefinition of support for handlers of the DOM event model.

     Copyright 2007-2008 W3C (MIT, ERCIM, Keio), All Rights Reserved.

     This DTD module is identified by the PUBLIC and SYSTEM identifiers:

       PUBLIC "-//W3C//ENTITIES XML Handlers 1.0//EN"
       SYSTEM "http://www.w3.org/MarkUp/DTD/xml-handlers-1.mod"

     Revisions:
     (none)
     ....................................................................... --&gt;


&lt;!-- XML Handlers defines the various element and attributes --&gt;

&lt;!ENTITY <span class="entity">% xml-handlers.action.content</span> 
    "( %xml-handlers.action.qname; |
       %xml-handlers.dispatchevent.qname; |
       %xml-handlers.addEventListener.qname; |
       %xml-handlers.removeEventListener.qname; |
       %xml-handlers.stopPropagation.qname; |
       %xml-handlers.preventDefault.qname; |
       %xml-handlers.action.extras; )+ "
&gt;

&lt;!ELEMENT <span class="element">%xml-handlers.action.qname;</span> %xml-handlers.action.content;&gt;
&lt;!ATTLIST %xml-handlers.action.qname;
    xml:id           ID                   #IMPLIED
    event            %QName.datatype;     #IMPLIED
    eventTarget      IDREF                #IMPLIED
    declare          ( declare )          #IMPLIED
    if               CDATA                #IMPLIED
    while            CDATA                #IMPLIED
&gt;

&lt;!ENTITY <span class="entity">% xml-handlers.dispatchEvent.content</span> "NONE" &gt;
&lt;!ELEMENT <span class="element">%xml-handlers.dispatchEvent.qname;</span> 
          %xml-handlers.dispatchEvent.content &gt;

&lt;ENTITY % xml-handlers.dispatchEvent.attlist "INCLUDE" &gt;
&lt;![%xml-handlers.dispatchEvent.attlist;[
&lt;!ATTLIST %xml-handlers.dispatchEvent.qname;
      %XML-EVENTS.xmlns.attrib;
      xml:id       ID                       #IMPLIED
      targetid     IDREFS                   #IMPLIED
      eventType    %QName.datatype;         #IMPLIED
      bubbles      ( bubbles )              #IMPLIED
      cancelable   ( cancelable )           #IMPLIED
&gt;
&lt;!-- end of xml-handlers.dispatchEvent.attlist --&gt;]]&gt;

&lt;!ENTITY <span class="entity">% xml-handlers.addEventListener.content</span> "NONE" &gt;
&lt;!ELEMENT <span class="element">%xml-handlers.addEventListener.qname;</span> 
          %xml-handlers.addEventListener.content &gt;

&lt;ENTITY % xml-handlers.addEventListener.attlist "INCLUDE" &gt;
&lt;![%xml-handlers.addEventListener.attlist;[
&lt;!ATTLIST %xml-handlers.addEventListener.qname;
      %XML-EVENTS.xmlns.attrib;
      xml:id       ID                       #IMPLIED
      event        %QName.datatype;         #REQUIRED
      handler      IDREF                    #REQUIRED
      phase        (capture|default)        #IMPLIED
&gt;
&lt;!-- end of xml-handlers.addEventListener.attlist --&gt;]]&gt;

&lt;!ENTITY <span class="entity">% xml-handlers.removeEventListener.content</span> "NONE" &gt;
&lt;!ELEMENT <span class="element">%xml-handlers.removeEventListener.qname;</span> 
          %xml-handlers.removeEventListener.content &gt;

&lt;ENTITY % xml-handlers.removeEventListener.attlist "INCLUDE" &gt;
&lt;![%xml-handlers.removeEventListener.attlist;[
&lt;!ATTLIST %xml-handlers.removeEventListener.qname;
      %XML-EVENTS.xmlns.attrib;
      xml:id       ID                       #IMPLIED
      event        %QName.datatype;         #REQUIRED
      handler      IDREF                    #REQUIRED
      phase        (capture|default)        #IMPLIED
&gt;
&lt;!-- end of xml-handlers.addEventListener.attlist --&gt;]]&gt;

&lt;!ENTITY <span class="entity">% xml-handlers.stopPropagation.content</span> "NONE" &gt;
&lt;!ELEMENT <span class="element">%xml-handlers.stopPropagation.qname;</span> 
          %xml-handlers.stopPropagation.content &gt;

&lt;ENTITY % xml-handlers.stopPropagation.attlist "INCLUDE" &gt;
&lt;![%xml-handlers.stopPropagation.attlist;[
&lt;!ATTLIST %xml-handlers.stopPropagation.qname;
      %XML-EVENTS.xmlns.attrib;
      xml:id       ID                       #IMPLIED
      event        %QName.datatype;         #REQUIRED
&gt;
&lt;!-- end of xml-handlers.stopPropagation.attlist --&gt;]]&gt;

&lt;!ENTITY <span class="entity">% xml-handlers.preventDefault.content</span> "NONE" &gt;
&lt;!ELEMENT <span class="element">%xml-handlers.preventDefault.qname;</span> 
          %xml-handlers.preventDefault.content &gt;

&lt;ENTITY % xml-handlers.preventDefault.attlist "INCLUDE" &gt;
&lt;![%xml-handlers.preventDefault.attlist;[
&lt;!ATTLIST %xml-handlers.preventDefault.qname;
      %XML-EVENTS.xmlns.attrib;
      xml:id       ID                       #IMPLIED
      event        %QName.datatype;         #REQUIRED
&gt;
&lt;!-- end of xml-handlers.preventDefault.attlist --&gt;]]&gt;

&lt;!-- end of xml-handlers-1.mod --&gt;

</pre>







<h2 id="a_module_xml_script" >A.4. XML Scripting Module
</h2>













<pre class="dtd">
&lt;!-- ................................................................... --&gt;
&lt;!-- XML Scripting Module .............................................. --&gt;
&lt;!-- file: xml-script-1.mod

     This is XML Scripting - the Scripting Module for XML.

     Copyright 2008 W3C (MIT, ERCIM, Keio), All Rights Reserved.

     This DTD module is identified by the PUBLIC and SYSTEM identifiers:

       PUBLIC "-//W3C//ENTITIES XML Scripting 1.0//EN"
       SYSTEM "http://www.w3.org/MarkUp/DTD/xml-script-1.mod"

     Revisions:
     (none)
     ....................................................................... --&gt;


&lt;!-- XML Scripting defines the following element --&gt;

&lt;!ENTITY <span class="entity">% xml-script.script.content</span> "( #PCDATA )" &gt;
&lt;!ELEMENT <span class="element">%xml-script.script.qname;</span> %xml-handlers.script.content; &gt;
&lt;!ENTITY <span class="entity">% xml-script.script.attlist</span>  "INCLUDE" &gt;
&lt;![%xml-script.script.attlist;[
&lt;!ATTLIST %xml-script.script.qname;
      %XML-EVENTS.xmlns.attrib;
      xml:id       ID                       #IMPLIED
      encoding     %Charset.datatype;       #IMPLIED
      type         %ContentType.datatype;   #REQUIRED
      src          %URI.datatype;           #IMPLIED
      implements   %URIorSafeCURIEs.datatype;  #IMPLIED
&gt;
&lt;!-- end of xml-script.script.attlist --&gt;]]&gt;

&lt;!-- end of xml-script-1.mod --&gt;

</pre>

<!--OddPage-->



      
      
    




<h1 id="a_Schema_definition" >B. Schema Implementation
</h1>



	
	


<p>This appendix is <em>normative</em>.</p>
<p>The schema implementation of XML Events conforms to the requirements defined
in [<a class="nref" href="#ref_XHTMLMOD">XHTMLMOD</a>]. It is divided
into an attributes module and an element module for the XML Events
module defined in this Proposed Recommendation.</p>








<h2 id="a_schema_attribs" >B.1. Attributes Module
</h2>






<!-- INCLUDING SCHEMA SCHEMA/xml-events-attribs-2.xsd.mhtml -->







<pre class="dtd">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xs:schema 
    targetNamespace="http://www.w3.org/2001/xml-events" 
    xmlns:ev="http://www.w3.org/2001/xml-events" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.w3.org/2001/XMLSchema 
                        http://www.w3.org/2001/XMLSchema.xsd" 
    elementFormDefault="unqualified" 
    blockDefault="#all" 
    finalDefault="#all" 
    attributeFormDefault="unqualified"&gt;

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      This is the XML Schema for XML Events global attributes

      URI: http://www.w3.org/MarkUp/SCHEMA/xml-events-attribs-2.xsd
      $Id: Overview.html,v 1.2 2010/12/17 20:25:20 plehegar Exp $
    &lt;/xs:documentation&gt;
    &lt;xs:documentation source="xml-events-copyright-2.xsd"/&gt;
  &lt;/xs:annotation&gt;

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      XML Event Attributes
		
        These "global" event attributes are defined in "Attaching
        Attributes Directly to the Observer Element" of the XML
        Events specification.
    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;

  &lt;xs:attribute name="event" type="xs:NMTOKEN"/&gt;
  &lt;xs:attribute name="observer" type="xs:IDREF"/&gt;
  &lt;xs:attribute name="eventTarget" type="xs:IDREF"/&gt;
  &lt;xs:attribute name="handler" type="xs:anyURI"/&gt;
  &lt;xs:attribute name="phase" default="default"&gt;
    &lt;xs:simpleType&gt;
      &lt;xs:restriction base="xs:NMTOKEN"&gt;
        &lt;xs:enumeration value="bubble"/&gt;
        &lt;xs:enumeration value="capture"/&gt;
        &lt;xs:enumeration value="default"/&gt;
        &lt;xs:enumeration value="target"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
  &lt;/xs:attribute&gt;
  &lt;xs:attribute name="propagate" default="continue"&gt;
    &lt;xs:simpleType&gt;
      &lt;xs:restriction base="xs:NMTOKEN"&gt;
        &lt;xs:enumeration value="stop"/&gt;
        &lt;xs:enumeration value="continue"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
  &lt;/xs:attribute&gt;
  &lt;xs:attribute name="defaultAction" default="perform"&gt;
    &lt;xs:simpleType&gt;
      &lt;xs:restriction base="xs:NMTOKEN"&gt;
        &lt;xs:enumeration value="cancel"/&gt;
        &lt;xs:enumeration value="perform"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
  &lt;/xs:attribute&gt;

  &lt;xs:attributeGroup name="XmlEvents.attlist"&gt;
    &lt;xs:attribute ref="ev:event"/&gt;
    &lt;xs:attribute ref="ev:observer"/&gt;
    &lt;xs:attribute ref="ev:eventTarget"/&gt;
    &lt;xs:attribute ref="ev:handler"/&gt;
    &lt;xs:attribute ref="ev:phase"/&gt;
    &lt;xs:attribute ref="ev:propagate"/&gt;
    &lt;xs:attribute ref="ev:defaultAction"/&gt;
  &lt;/xs:attributeGroup&gt;

&lt;/xs:schema&gt;

</pre>
<!-- END OF FILE SCHEMA/xml-events-attribs-2.xsd.mhtml -->









<h2 id="a_schema_xml_events" >B.2. XML Events Module
</h2>






<!-- INCLUDING SCHEMA SCHEMA/xml-events-2.xsd.mhtml -->







<pre class="dtd">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xs:schema 
    targetNamespace="http://www.w3.org/2001/xml-events" 
    xmlns="http://www.w3.org/2001/xml-events" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.w3.org/2001/XMLSchema 
                        http://www.w3.org/2001/XMLSchema.xsd" 
    elementFormDefault="unqualified" 
    blockDefault="#all" 
    finalDefault="#all" 
    attributeFormDefault="unqualified"&gt;

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      This is the XML Schema for XML Events

      URI: http://www.w3.org/MarkUp/SCHEMA/xml-events-2.xsd
      $Id: Overview.html,v 1.2 2010/12/17 20:25:20 plehegar Exp $
    &lt;/xs:documentation&gt;
    &lt;xs:documentation source="xml-events-copyright-2.xsd"/&gt;
  &lt;/xs:annotation&gt;

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      XML Events element listener
		
        This module defines the listener element for XML Events.
        This element can be used to define event listeners. This
        module relies upon the XmlEvents.attlist attribute group
        defined in xml-events-attribs-2.xsd.
    &lt;/xs:documentation&gt;
  &lt;/xs:annotation&gt;

  &lt;xs:attributeGroup name="listener.attlist"&gt;
    &lt;xs:attribute name="event" use="required" type="xs:NMTOKEN"/&gt;
    &lt;xs:attribute name="observer" type="xs:IDREF"/&gt;
    &lt;xs:attribute name="eventTarget" type="xs:IDREF"/&gt;
    &lt;xs:attribute name="handler" type="xs:anyURI"/&gt;
    &lt;xs:attribute name="phase" default="default"&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:NMTOKEN"&gt;
          &lt;xs:enumeration value="capture"/&gt;
          &lt;xs:enumeration value="default"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
    &lt;xs:attribute name="propagate" default="continue"&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:NMTOKEN"&gt;
          &lt;xs:enumeration value="stop"/&gt;
          &lt;xs:enumeration value="continue"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
    &lt;xs:attribute name="defaultAction" default="perform"&gt;
      &lt;xs:simpleType&gt;
        &lt;xs:restriction base="xs:NMTOKEN"&gt;
          &lt;xs:enumeration value="cancel"/&gt;
          &lt;xs:enumeration value="perform"/&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
    &lt;xs:attribute name="id" type="xs:ID"/&gt;
  &lt;/xs:attributeGroup&gt;

  &lt;xs:complexType name="listener.type"&gt;
    &lt;xs:attributeGroup ref="listener.attlist"/&gt;
  &lt;/xs:complexType&gt;

  &lt;xs:element name="<span class="element" id="a_smodule_element_listener">listener</span>" type="listener.type"/&gt;

&lt;/xs:schema&gt;

</pre>
<!-- END OF FILE SCHEMA/xml-events-2.xsd.mhtml -->









<h2 id="a_schema_xml_handlers" >B.3. XML Handlers Module
</h2>






<!-- INCLUDING SCHEMA SCHEMA/xml-handlers-1.xsd.mhtml -->







<pre class="dtd">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xs:schema 
    targetNamespace="http://www.w3.org/2001/xml-events" 
    xmlns="http://www.w3.org/2001/xml-events" 
    xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.w3.org/2001/XMLSchema 
                        http://www.w3.org/2001/XMLSchema.xsd" 
    elementFormDefault="unqualified" 
    blockDefault="#all" 
    finalDefault="#all" 
    attributeFormDefault="unqualified"&gt;

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      This is the XML Schema for XML Handlers

      URI: http://www.w3.org/MarkUp/SCHEMA/xml-handlers-1.xsd
      $Id: Overview.html,v 1.2 2010/12/17 20:25:20 plehegar Exp $
    &lt;/xs:documentation&gt;
    &lt;xs:documentation source="xml-events-copyright-2.xsd"/&gt;
  &lt;/xs:annotation&gt;

  &lt;xs:attributeGroup name="action.attlist"&gt;
    &lt;xs:attribute name="event" use="required" type="xs:QName"/&gt;
    &lt;xs:attribute name="eventTarget" type="xs:IDREF"/&gt;
    &lt;xs:attribute name="declare"&gt;
        &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="declare"/&gt;
            &lt;/xs:restriction&gt;
        &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
    &lt;xs:attribute name="if" type="xs:normalizedString"/&gt;
    &lt;xs:attribute name="while" type="xs:normalizedString"/&gt;
    &lt;xs:attribute name="id" type="xs:ID"/&gt;
  &lt;/xs:attributeGroup&gt;

  &lt;xs:complexType name="action.type"&gt;
    &lt;xs:attributeGroup ref="action.attlist"/&gt;
  &lt;/xs:complexType&gt;

  &lt;xs:element name="<span class="element" id="a_smodule_element_action">action</span>" type="action.type"/&gt;

  &lt;xs:attributeGroup name="dispatchEvent.attlist"&gt;
    &lt;xs:attribute name="eventType" type="xs:QName"/&gt;
    &lt;xs:attribute name="targetid"&gt;
        &lt;xs:simpleType&gt;
            &lt;xs:list itemType="xs:IDREF"/&gt;
        &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
    &lt;xs:attribute name="bubbles"&gt;
        &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="bubbles"/&gt;
            &lt;/xs:restriction&gt;
        &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
    &lt;xs:attribute name="cancelable"&gt;
        &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="cancelable"/&gt;
            &lt;/xs:restriction&gt;
        &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
    &lt;xs:attribute name="id" type="xs:ID"/&gt;
  &lt;/xs:attributeGroup&gt;

  &lt;xs:complexType name="dispatchEvent.type"&gt;
    &lt;xs:attributeGroup ref="dispatchEvent.attlist"/&gt;
  &lt;/xs:complexType&gt;

  &lt;xs:element name="<span class="element" id="a_smodule_element_dispatchEvent">dispatchEvent</span>" type="dispatchEvent.type"/&gt;

  &lt;xs:attributeGroup name="addEventListener.attlist"&gt;
    &lt;xs:attribute name="event" use="required" type="xs:QName"/&gt;
    &lt;xs:attribute name="handler" use="required" type="xs:IDREF"/&gt;
    &lt;xs:attribute name="phase" default="default"&gt;
        &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="bubble"/&gt;
                &lt;xs:enumeration value="capture"/&gt;
                &lt;xs:enumeration value="default"/&gt;
                &lt;xs:enumeration value="target"/&gt;
            &lt;/xs:restriction&gt;
        &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
    &lt;xs:attribute name="id" type="xs:ID"/&gt;
  &lt;/xs:attributeGroup&gt;

  &lt;xs:complexType name="addEventListener.type"&gt;
    &lt;xs:attributeGroup ref="addEventListener.attlist"/&gt;
  &lt;/xs:complexType&gt;

  &lt;xs:element name="<span class="element" id="a_smodule_element_addEventListener">addEventListener</span>" type="addEventListener.type"/&gt;

  &lt;xs:attributeGroup name="removeEventListener.attlist"&gt;
    &lt;xs:attribute name="event" use="required" type="xs:QName"/&gt;
    &lt;xs:attribute name="handler" use="required" type="xs:IDREF"/&gt;
    &lt;xs:attribute name="phase" default="default"&gt;
        &lt;xs:simpleType&gt;
            &lt;xs:restriction base="xs:NMTOKEN"&gt;
                &lt;xs:enumeration value="bubble"/&gt;
                &lt;xs:enumeration value="capture"/&gt;
                &lt;xs:enumeration value="default"/&gt;
                &lt;xs:enumeration value="target"/&gt;
            &lt;/xs:restriction&gt;
        &lt;/xs:simpleType&gt;
    &lt;/xs:attribute&gt;
    &lt;xs:attribute name="id" type="xs:ID"/&gt;
  &lt;/xs:attributeGroup&gt;
  &lt;xs:complexType name="removeEventListener.type"&gt;
    &lt;xs:attributeGroup ref="removeEventListener.attlist"/&gt;
  &lt;/xs:complexType&gt;

  &lt;xs:element name="<span class="element" id="a_smodule_element_removeEventListener">removeEventListener</span>" type="removeEventListener.type"/&gt;

  &lt;xs:attributeGroup name="stopPropagation.attlist"&gt;
    &lt;xs:attribute name="event" use="required" type="xs:QName"/&gt;
    &lt;xs:attribute name="id" type="xs:ID"/&gt;
  &lt;/xs:attributeGroup&gt;

  &lt;xs:complexType name="stopPropagation.type"&gt;
    &lt;xs:attributeGroup ref="stopPropagation.attlist"/&gt;
  &lt;/xs:complexType&gt;

  &lt;xs:element name="<span class="element" id="a_smodule_element_stopPropagation">stopPropagation</span>" type="stopPropagation.type"/&gt;

  &lt;xs:attributeGroup name="preventDefault.attlist"&gt;
    &lt;xs:attribute name="event" use="required" type="xs:QName"/&gt;
    &lt;xs:attribute name="id" type="xs:ID"/&gt;
  &lt;/xs:attributeGroup&gt;

  &lt;xs:complexType name="preventDefault.type"&gt;
    &lt;xs:attributeGroup ref="preventDefault.attlist"/&gt;
  &lt;/xs:complexType&gt;

  &lt;xs:element name="<span class="element" id="a_smodule_element_preventDefault">preventDefault</span>" type="stopPropagation.type"/&gt;
&lt;/xs:schema&gt;

</pre>
<!-- END OF FILE SCHEMA/xml-handlers-1.xsd.mhtml -->









<h2 id="a_schema_xml_script" >B.4. XML Scripting Module
</h2>






<!-- INCLUDING SCHEMA SCHEMA/xml-script-1.xsd.mhtml -->







<pre class="dtd">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xs:schema 
    targetNamespace="http://www.w3.org/2001/xml-events" 
    xmlns="http://www.w3.org/2001/xml-events" 
    xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.w3.org/2001/XMLSchema 
                        http://www.w3.org/2001/XMLSchema.xsd" 
    elementFormDefault="unqualified" 
    blockDefault="#all" 
    finalDefault="#all" 
    attributeFormDefault="unqualified"&gt;

  &lt;xs:annotation&gt;
    &lt;xs:documentation&gt;
      This is the XML Schema for XML Scripting

      URI: http://www.w3.org/MarkUp/SCHEMA/xml-script-1.xsd
      $Id: Overview.html,v 1.2 2010/12/17 20:25:20 plehegar Exp $
    &lt;/xs:documentation&gt;
    &lt;xs:documentation source="xml-events-copyright-2.xsd"/&gt;
  &lt;/xs:annotation&gt;

  &lt;xs:attributeGroup name="script.attlist"&gt;
    &lt;xs:attribute name="encoding" type="xh11d:Charset"/&gt;
    &lt;xs:attribute name="implements" type="xh11d:URIorSafeCURIEs"/&gt;
    &lt;xs:attribute name="src" type="xs:anyURI"/&gt;
    &lt;xs:attribute name="type" type="xh11d:ContentTypes"/&gt;
    &lt;xs:attribute name="id" type="xs:ID"/&gt;
  &lt;/xs:attributeGroup&gt;

  &lt;xs:complexType name="script.type"&gt;
    &lt;xs:attributeGroup ref="script.attlist"/&gt;
  &lt;/xs:complexType&gt;

  &lt;xs:element name="<span class="element" id="a_smodule_element_script">script</span>" type="script.type"/&gt;
&lt;/xs:schema&gt;

</pre>
<!-- END OF FILE SCHEMA/xml-script-1.xsd.mhtml -->




<!--OddPage-->



      
      
    




<h1 id="s_refs" >C. References
</h1>



	
	


<p>This appendix is <em>normative</em>.</p>








<h2 id="s_norm-refs" >C.1. Normative References
</h2>






<dl>
<dt>[<a id="ref_DOM3EVENTS" 
class="normref">DOM3EVENTS</a>]</dt>

<dd>"<cite><a href="http://www.w3.org/TR/DOM-Level-3-Events/"
>Document Object Model (DOM) Level 3 Events Specification</a></cite>",
W3C Recommendation, Björn Höhrmann, <i><abbr title="editor">ed.</abbr></i>,
21 December 2007.<br />
Available at: http://www.w3.org/TR/DOM-Level-3-Events/<br />
The <a href="http://www.w3.org/TR/DOM-Level-3-Events">latest version</a>
is available at: http://www.w3.org/TR/DOM-Level-3-Events</dd>

<dt><a id="ref_RFC2119" class="normref">[RFC2119]</a></dt>

<dd>"<cite><a href="http://www.rfc-editor.org/rfc/rfc2119.txt">Key words for
use in RFCs to indicate requirement levels</a></cite>", RFC 2119,
S. Bradner, March 1997.<br /> 
Available at: http://www.rfc-editor.org/rfc/rfc2119.txt</dd>

<dt><a id="ref_RFC2616" class="normref">[RFC2616]</a></dt>

<dd>"<cite><a href="http://www.rfc-editor.org/rfc/rfc2616.txt">Hypertext Transfer
        Protocol - HTTP/1.1</a></cite>", RFC 2119,
H. Fielding <i xml:lang="lt">et al.</i>,
<i><abbr title="editors">eds.</abbr></i>, June 1999.<br />
Available at: http://www.rfc-editor.org/rfc/rfc2616.txt</dd>

<dt>[<a id="ref_XHTMLMOD">XHTMLMOD</a>]</dt>

<dd>"<cite><a href="http://www.w3.org/TR/2008/REC-xhtml-modularization-20081008"
        >Modularization of XHTML&#8482; 1.1</a></cite>", W3C Recommendation,
D. Austin <i xml:lang="lt">et al.</i>,
<i><abbr title="editors">eds.</abbr></i>, 8 October 2009.<br />
Available at: http://www.w3.org/TR/2008/REC-xhtml-modularization-20081008<br />
The <a href="http://www.w3.org/TR/xhtml-modularization">latest version</a>
is available at: http://www.w3.org/TR/xhtml-modularization</dd>

<dt>[<a id="ref_XML" class="normref">XML</a>]</dt>

<dd>"<cite><a href="http://www.w3.org/TR/2006/REC-xml-20060816">Extensible
Markup Language (XML) 1.0 (Fourth Edition)</a></cite>", W3C Recommendation,
T. Bray <i xml:lang="lt">et al.</i>,
<i><abbr title="editors">eds.</abbr></i>, 16 August 2006.<br />
Available at: http://www.w3.org/TR/2006/REC-xml-20060816<br />
The <a href="http://www.w3.org/TR/REC-xml">latest version</a>
is available at: http://www.w3.org/TR/REC-xml</dd>

<dt><a id="ref_XMLID" class="normref">[XMLID]</a></dt>

<dd>"<cite><a href="http://www.w3.org/TR/2005/REC-xml-id-20050909/">xml:id
Version 1.0</a></cite>", W3C Recommendation,
J. Marsh, D. Veillard, N. Walsh, <i><abbr title="editors">eds.</abbr></i>,
9 September 2005.<br />
Available at: http://www.w3.org/TR/2005/REC-xml-id-20050909/</dd>

<dt><a id="ref_XMLNAMES" class="ref">[XMLNAMES]</a></dt>

<dd>"<cite><a href="http://www.w3.org/TR/1999/REC-xml-names-19990114"
>Namespaces in XML</a></cite>", W3C Recommendation,
T. Bray <i xml:lang="lt">et al.</i>,
<i><abbr title="editors">eds.</abbr></i>, 14 January 1999.<br />
Available at: http://www.w3.org/TR/1999/REC-xml-names-19990114<br />
The <a href="http://www.w3.org/TR/REC-xml-names">latest version</a>
is available at: http://www.w3.org/TR/REC-xml-names</dd>

</dl>








<h2 id="s_other-refs" >C.2. Other References
</h2>






<dl>
<dt>[<a id="ref_HTML4" >HTML4</a>]</dt>

<dd>"<cite><a href="http://www.w3.org/TR/1999/REC-html401-19991224">HTML 4.01
Specification</a></cite>", W3C Recommendation,
D. Raggett <i xml:lang="lt">et al.</i>,
<i><abbr title="editors">eds.</abbr></i>, 24 December 1999.<br />
Available at: http://www.w3.org/TR/1999/REC-html401-19991224<br />
The <a href="http://www.w3.org/TR/html4">latest version</a>
is available at: http://www.w3.org/TR/html4</dd>

<dt><a id="ref_MIMETYPES" class="normref">[MIMETYPES]</a></dt>
<dd>"<cite><a href="http://www.iana.org/assignments/media-types/">MIME Media Types</a></cite>", 
IANA.<br /> 
Available at: http://www.iana.org/assignments/media-types/</dd>

<dt>[<a id="ref_SVG" >SVG</a>]</dt>

<dd>"<cite><a href="http://www.w3.org/TR/2001/REC-SVG-20010904/">Scalable
Vector Graphics (SVG) 1.0 Specification</a></cite>", W3C Recommendation,
J. Ferraiolo, <i><abbr title="editor">ed.</abbr></i>, 4 September 2001.<br />
Available at: http://www.w3.org/TR/2001/REC-SVG-20010904/<br />
The <a href="http://www.w3.org/TR/SVG/">latest version</a>
is available at: http://www.w3.org/TR/SVG/</dd>
	
<dt>[<a id="ref_XFORMS" >XFORMS</a>]</dt>

<dd>"<cite><a href="http://www.w3.org/TR/2004/WD-xforms11-20041115/">XForms
1.1</a></cite>", W3C Working Draft,
M. Dubinko <i xml:lang="la">et al.</i>,
<i><abbr title="editors">eds.</abbr></i>, 15 November 2004.<br />
Available at: http://www.w3.org/TR/2004/WD-xforms11-20041115/</dd>

<dt>[<a id="ref_XHTML" >XHTML</a>]</dt>

<dd>"<cite><a href="http://www.w3.org/TR/2002/REC-xhtml1-20020801">XHTML&#8482;
1.0: The Extensible HyperText Markup Language (Second Edition)</a></cite>".
S. Pemberton <i xml:lang="lt">et al.</i>, 26 January 2000,
revised 1 August 2002.<br />
Available at: http://www.w3.org/TR/2002/REC-xhtml1-20020801<br />
The <a href="http://www.w3.org/TR/xhtml1">latest version</a>
is available at: http://www.w3.org/TR/xhtml1</dd>

<dt><a id="ref_XPATH" class="ref">[XPATH]</a></dt>
<dd>"<cite><a href="http://www.w3.org/TR/1999/REC-xpath-19991116"
>XML Path Language</a></cite>", W3C Recommendation,
James Clark, <i xml:lang="lt">et al.</i>,
<i><abbr title="editors">eds.</abbr></i>, 16 November 1999.<br />
Available at: http://www.w3.org/TR/1999/REC-xpath-19991116<br />
The <a href="http://www.w3.org/TR/xpath">latest version</a>
is available at: http://www.w3.org/TR/xpath</dd>
</dl>

<!--OddPage-->



      
      
    




<h1 id="s_changes" >D. Change History
</h1>



	
	

<p><em>This section is informative.</em></p>
<p>In developing version 2 of XML Events, the following major
changes have been made:</p>
<ul>
    <li>Changed from using DOM 2 Events to DOM 3 Events.</li>
    <li>Added XML Handlers Module.</li>
    <li>Added XML Scripting Module.</li>
    <li>Added XML Schema implementation of modules.</li>
    <li>Permitted incorporation of elements and attributes into
    other namespaces.</li>
</ul>

<!--OddPage-->



      
      
    




<h1 id="s_acks" >E. Acknowledgments
</h1>



	
	


<p><em>This section is informative.</em></p>

<p>This document was prepared by
the <acronym title="World Wide Web Consortium">W3C</acronym>
<acronym title="Extensible HyperText Markup Language">XHTML2</acronym> Working Group.
The members at the time of publication of the Note were:</p>

<ul>
<li>Markus Gylling, <a href="http://www.daisy.org">DAISY Consortium</a>
(<acronym title="Extensible HyperText Markup Language">XHTML</acronym> 2 Working Group Co-Chair)</li>
<li>Steven Pemberton, <acronym title="Centrum voor Wiskunde en Informatica"
    xml:lang="nl">CWI</acronym> 
(<acronym title="Extensible HyperText Markup Language">XHTML</acronym> 2 Working Group Co-Chair)</li>
<li>Mark Birbeck, Sidewinder Labs (Invited Expert)</li>
<li>Susan Borgrink, Progeny Systems</li>
<li>Christina Bottomley, Society for Technical Communication (STC)</li>
<li>Alessio Cartocci, International Webmasters Association / HTML Writers Guild (IWA-HWG)</li>
<li>Alexander Graf, University of Innsbruck</li>
<li>Tina Holmboe, Greytower Technologies (Invited Expert)</li>
<li>John Kugelman, Progeny Systems</li>
<li>Luca Mascaro, International Webmasters Association / HTML Writers Guild (IWA-HWG)</li>
<li>Shane McCarron, Applied Testing and Technology, Inc. (Invited Expert)</li>
<li>Michael Rawling, IVIS Group Limited</li>
<li>Gregory Rosmaita, Invited Expert</li>
<li>Sebastian Schnitzenbaumer, Dreamlab Technologies AG</li>
<li>Richard Schwerdtfeger,
<acronym title="International Business Machines">IBM</acronym></li>
<li>Elias Torres, 
<acronym title="International Business Machines">IBM</acronym></li>
<li>Masataka Yakura, Mitsue-Links Co., Ltd.</li>
<li>Toshihiko Yamakami, ACCESS Co., Ltd. </li>
</ul>


<p>At publication of the first edition, the acknowledgements included was:</p>

<p>This document was originally edited by Ted Wugofski (Openwave).</p>

<p>Special acknowledgments to: Mark Baker (Sun Microsystems), Wayne Carr
(Intel Corporation), Warner ten Kate (Philips Electronics), Patrick Schmitz,
and Peter Stark (Ericsson) for their significant contributions to the
evolution of this specification.</p>

<p>At the time of publication, the participants in the W3C HTML Working Group
were:</p>

<ul class="acks">
<li>Steven Pemberton, <abbr>CWI</abbr>/<abbr>W3C</abbr> (HTML Working Group Chair)</li>
<li>Daniel Austin, W. W. Grainger, <abbr>Inc.</abbr></li>
<li>Jim Bigelow, Hewlett-Packard Company</li>
<li>Mark Birbeck, x-port.net <abbr title="Limited">Ltd.</abbr>
(Invited Expert)</li>
<li>Jonny Axelsson, Opera Software</li>
<li>Tantek &#199;elik, Microsoft Corporation</li>
<li>Beth Epperson, Netscape/<abbr title="America Online">AOL</abbr></li>
<li>Masayasu Ishikawa, <abbr>W3C</abbr> (Team Contact)</li>
<li>Shin'ichi Matsui, Panasonic</li>
<li>Shane McCarron, Applied Testing and Technology (Invited Expert)</li>
<li>Ann Navarro, WebGeek, <abbr>Inc.</abbr> (Invited Expert)</li>
<li>Subramanian Peruvemba, Oracle Corporation</li>
<li>Sebastian Schnitzenbaumer, SAP <abbr xml:lang="de"
title="Aktiengesellschaft">AG</abbr></li>
</ul>


</body>
</html>