index.html 200 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title>Ink Markup Language (InkML)</title>
<style type="text/css" xml:space="preserve">
/*<![CDATA[*/
/**/
  .menu { text-align: center }
  .ex { color: green; font-size: 115%}
  .schema { color: #cc3333 }
  .attrs td { background-color: #ccffcc }
  .attrs th { background-color: #99ffcc }
  .reqs td { background-color: #ccffff }
  .reqs th { background-color: #99ffff }
  .trace th { background-color: #99ffcc }
  .trace td { background-color: #ccffcc }
  .channels th { background-color: #99ffcc }
  .channels td { background-color: #ccffcc }
  .channelproperties th { background-color: #99ffcc }
  .channelproperties td { background-color: #ccffcc }
  .units th { background-color: #99ffcc }
  .units td { background-color: #ccffcc }
  .units { background-color: #ccffcc }
  /*.contents th { background-color: #99ffcc; text-align: left }*/
  .contents { background-color: #dddddd; width: 95%; padding: 0.5em;
  margin-left: 2.5%; }
  /*.contents dt { background-color: #dddddd; }*/
  .nlcontents { background-color: #dddddd; width: 95%; padding: 0.5em;
  margin-left: 2.5%; }
  td.trace { background-color: #99ff99 }
  div.content ul {list-style: none }
  div.content li li { margin-top: 0 }
  dl.toc { margin-left: 5% }
  .toc a { text-decoration: none}
  table { margin-left: 5%}
  li { margin-top: 0.5em}

  div.issues {
   border-width: thin;
   border-style: solid;
   border-color: maroon;
   background-color: #ffcc99;
   width: 95%; padding: 0.5em; }
  .issues h4 { margin-top: 0px; font-size: larger}

  div.units {
   background-color: #dddddd;
   padding: 0.5em;
   margin-left: 2.5%;
   width: 95% }

  div.attr {
   background-color: #dddddd;
   padding: 0.5em;
   margin-left: 2.5%;
   width: 95% }

  div.attrdef {
   margin-left: 2% }
  .obsolete { text-decoration: line-through; }
  .figure { text-align: center }
  .caption { text-align: center }

  code { font-size: 120%; font-weight: bold }

  .diff-add  { background-color: #FFFF99}
  .diff-del  { background-color: #FF9999; text-decoration: line-through }
  .diff-chg  { background-color: #99FF99 }
  /**/
/*]]>*/

.style1 {
    font-family: monospace;
    font-size: 110%;
}

.style2 {
    margin-left: 40px;
}

* {
  line-height: 1.25;
}

.style4 {
    font-size: 110%;
}



.tocline { list-style-type: none }



</style>

<link href="http://www.w3.org/StyleSheets/TR/W3C-REC.css"
type="text/css" rel="stylesheet" />
<!-- <link href="http://www.w3.org/StyleSheets/TR/base.css" type=
  "text/css" rel="stylesheet" /> -->
</head>
<body>
<div class="head">
<p><a href="http://www.w3.org/"><img height="48" width="72"
alt="W3C" src="http://www.w3.org/Icons/w3c_home" /></a></p>

<h1>Ink Markup Language (InkML)</h1>

<h2>W3C Recommendation 20 September 2011</h2>

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

<dd><a href="http://www.w3.org/TR/2011/REC-InkML-20110920/">
http://www.w3.org/TR/2011/REC-InkML-20110920/</a></dd>

<dt>Latest version:</dt>

<dd><a href="http://www.w3.org/TR/InkML">http://www.w3.org/TR/InkML</a></dd>

<dt>Previous version:</dt>

<dd><a href="http://www.w3.org/TR/2011/PR-InkML-20110510/">
http://www.w3.org/TR/2011/PR-InkML-20110510/</a></dd>

<dt>Editors:</dt>

<dd>Stephen M. Watt, University of Western Ontario and Maplesoft</dd>
<dd>Tom Underhill, Microsoft</dd>

<dt>Authors:</dt>
<dd>Yi-Min Chee (until 2006 while at IBM)</dd>
<dd>Katrin Franke (until 2004 while at Fraunhofer Gesellschaft)</dd>
<dd>Max Froumentin (until 2006 while at W3C)</dd>
<dd>Sriganesh Madhvanath (until 2009 while at HP)</dd>
<dd>Jose-Antonio Magaña (until 2006 while at HP)</dd>
<dd>Grégory Pakosz (until 2007 while at Vision Objects)</dd>
<dd>Gregory Russell (until 2005 while at IBM)</dd>
<dd>Muthuselvam Selvaraj (until 2009 while at HP)</dd>
<dd>Giovanni Seni (until 2003 while at Motorola)</dd>
<dd>Christopher Tremblay (until 2003 while at Corel)</dd>
<dd>Larry Yaeger (until 2004 while at Apple)</dd>
</dl>

<p>Please refer to the <a href="http://www.w3.org/2011/06/InkML-errata.html"> <strong>errata</strong></a> for this document, which may include some normative corrections.</p>

<p>See also <a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=InkML"> <strong>translations</strong></a>.</p>

<p class="copyright"><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
&copy;2003-2011 <a href="http://www.w3.org/" shape="rect"><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"
shape="rect">trademark</a> and <a
href="http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> rules apply.</p>
</div>

<hr title="Separator from Header" />
<div class="abstract">
<h2 id="abstract">Abstract</h2>

<p>This document describes the syntax and semantics for the Ink Markup Language.&nbsp; The Ink Markup Language serves as the data format for
representing ink entered with an electronic pen or stylus. The
markup allows for the input and processing of handwriting,
gestures, sketches, music and other notational languages in
applications. It provides a common format for the exchange of ink
data between components such as handwriting and gesture
recognizers, signature verifiers, and other ink-aware modules.&nbsp; It may be 
used in the <a
href="http://www.w3.org/TR/mmi-framework/">W3C Multimodal
Interaction Framework</a> as proposed by the <a
href="http://www.w3.org/2002/mmi/">W3C Multimodal Interaction
Activity</a>. </p>
</div>

<div class="status">
<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 is the
<a href="http://www.w3.org/2005/10/Process-20051014/tr.html#RecsW3C">
Recommendation
</a>
of "Ink Markup Language (InkML)".

It has been produced by the
<a href="http://www.w3.org/2002/mmi/">Multimodal Interaction Working Group</a>,
which is part of the
<a href="http://www.w3.org/2002/mmi/Activity.html">Multimodal Interaction Activity</a>.
</p>

<p>Comments are welcome on <a href="mailto:www-multimodal@w3.org">www-multimodal@w3.org</a>
(<a href="http://lists.w3.org/Archives/Public/www-multimodal/">archive</a>).

See <a href="http://www.w3.org/Mail/">W3C mailing list and archive
usage guidelines</a>.</p>

<p>The design of InkML has been widely reviewed
(see the <a href="http://www.w3.org/TR/2011/CR-InkML-20110111/inkml-disp.html"> disposition of comments</a>)
and satisfies the Working Group's technical requirements.

A list of implementations is included in the
<a href="http://www.w3.org/2002/mmi/2011/inkml-ir/">InkML 1.0 Implementation Report</a>.

There are no substantial changes from the
<a href="http://www.w3.org/TR/2011/PR-InkML-20110510/">
10 May 2011 Proposed Recommendation</a>.
</p>

<p>This document has been reviewed by W3C Members, by software
  developers, and by other W3C groups and interested parties, and is
  endorsed by the Director as a W3C Recommendation. It is a stable
  document and may be used as reference material or cited from another
  document. W3C's role in making the Recommendation is to draw
  attention to the specification and to promote its widespread
  deployment. This enhances the functionality and interoperability of
  the Web.</p>

<p>This specification describes markup for representing ink entered with an 
electronic pen or stylus and forms part of the proposals for the
<a href="http://www.w3.org/TR/mmi-framework/"></a>
<a href=
"http://www.w3.org/TR/mmi-framework/">W3C Multimodal Interaction
Framework</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/34607/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. </p>
</div>

<hr />
<div class="content">
<h2 class="notoc" id="contents">Table of Contents</h2>

<ul>
<li>1 <a href="#Overview">Overview</a> 

<ul>
<li>1.1 <a href="#OverviewUses">Uses of InkML</a></li>

<li>1.2 <a href="#OverviewElements">Elements</a></li>

<li>1.3 <a href="#OverviewModes">Exchange Modes</a></li>

<li>1.4 <a href="#conventions">Conventions used in this
document</a></li>
</ul>
</li>

<li>2 <a href="#structure" name="3.1.1">Structure</a> 

<ul>
<li>2.1 <a href="#inkElement"><code>&lt;ink&gt;</code>
element</a></li>
</ul>
</li>

<li>3 <a href="#TraceIntro">Traces and Trace Formatting</a> 

<ul>
<li>3.1 <a href="#traceFormats">Trace Formats</a> 

<ul>
<li>3.1.1 <a href="#traceFormat"><code>&lt;traceFormat&gt;</code>
element</a></li>

<li>3.1.2 <a href="#channel"><code>&lt;channel&gt;</code>
element</a></li>

<li>3.1.3 <a
href="#intermittentChannels"><code>&lt;intermittentChannels&gt;</code>
element</a></li>

	<li>3.1.4 <a href="#orientation">Orientation Channels</a></li>

<li>3.1.5 <a href="#color">Color Channels</a></li>

<li>3.1.6 <a href="#width">Width Channel</a></li>

<li>3.1.7 <a href="#time">Time Channel</a></li>

<li>3.1.8 <a href="#user">User Defined Channels</a></li>

<li>3.1.9 <a href="#specifying">Specifying Trace Formats</a></li>
</ul>
</li>

<li>3.2 <a href="#traces">Traces</a> 

<ul>
<li>3.2.1 <a href="#trace"><code>&lt;trace&gt;</code>
element</a></li>
</ul>
</li>

<li>3.3 <a href="#traceCollections">Trace Collections</a> 

<ul>
<li>3.3.1 <a href="#traceGroup"><code>&lt;traceGroup&gt;</code>
element</a></li>

<li>3.3.2 <a
href="#traceViewElement"><code>&lt;traceView&gt;</code>
element</a></li>
</ul>
</li>
</ul>
</li>

<li>4 <a href="#ContextIntro">Contexts</a> 

<ul>
<li>4.1 <a href="#contextElement">The <code>&lt;context&gt;</code>
element</a></li>

<li>4.2 <a href="#inkSource">Ink Sources</a> 

<ul>
<li>4.2.1 <a
href="#inkSourceElement"><code>&lt;inkSource&gt;</code>
element</a></li>

<li>4.2.2 <a href="#sampleRate"><code>&lt;sampleRate&gt;</code>
element</a></li>

<li>4.2.3 <a href="#latency"><code>&lt;latency&gt;</code>
element</a></li>

<li>4.2.4 <a href="#activeArea"><code>&lt;activeArea&gt;</code>
element</a></li>

<li>4.2.5 <a
href="#srcProperty"><code>&lt;sourceProperty&gt;</code>
element</a></li>

<li>4.2.6 <a
href="#channelProperties"><code>&lt;channelProperties&gt;</code>
element</a></li>

<li>4.2.7 <a
href="#channelProperty"><code>&lt;channelProperty&gt;</code>
element</a></li>
</ul>
</li>

<li>4.3 <a href="#brushes">Brushes</a> 

<ul>
<li>4.3.1 <a href="#brushElement"><code>&lt;brush&gt;</code>
element</a></li>

<li>4.3.2 <a
href="#brushPropertyElement"><code>&lt;brushProperty&gt;</code>
element</a></li>
</ul>
</li>

<li>4.4 <a href="#timestamps">Timestamps</a> 

<ul>
<li>4.4.1 <a href="#timestamp"><code>&lt;timestamp&gt;</code>
element</a></li>
</ul>
</li>

<li>4.5 <a href="#defaultContext">The Default Context</a></li>

<li>4.6 <a href="#contextPriority">Context Priority</a></li>
</ul>
</li>

<li>5 <a href="#canvas">Canvases</a> 

<ul>
<li>5.1 <a href="#canvasElement"><code>&lt;canvas&gt;</code>
element</a></li>

<li>5.2 <a
href="#canvasTransformElement"><code>&lt;canvasTransform&gt;</code>
element</a></li>

<li>5.3 <a href="#DefaultCanvas">The Default Canvas</a></li>
</ul>
</li>

<li>6 <a href="#generics">Generics</a> 

<ul>
<li>6.1 <a href="#mappings">Mappings</a> 

<ul>
<li>6.1.1 <a href="#mappingElement"><code>&lt;mapping&gt;</code>
element</a></li>

<li>6.1.2 <a href="#bindElement"><code>&lt;bind&gt;</code>
element</a></li>

<li>6.1.3 <a href="#tableElement"><code>&lt;table&gt;</code>
element</a></li>

<li>6.1.4 <a href="#affineElement"><code>&lt;affine&gt;</code>
element</a></li>
</ul>
</li>

<li>6.2 <a href="#definitions">Definitions</a> 

<ul>
<li>6.2.1 <a
href="#definitionsElement"><code>&lt;definitions&gt;</code>
element</a></li>
</ul>
</li>

<li>6.3 <a href="#annotations">Annotations</a> 

<ul>
<li>6.3.1 <a
href="#annotationElement"><code>&lt;annotation&gt;</code>
element</a></li>

<li>6.3.2 <a
href="#annotationXMLElement"><code>&lt;annotationXML&gt;</code>
element</a></li>
</ul>
</li>

<li>6.4 <a href="#units">Units</a></li>
</ul>
</li>

<li>7 <a href="#streamsAndArchives">Archives and Streams</a> 

<ul>
<li>7.1 <a href="#Archival">Archival Applications</a></li>

<li>7.2 <a href="#Streaming">Streaming Applications</a></li>

<li>7.3 <a href="#Equivalence">Archival and Streaming
Equivalence</a></li>
</ul>
</li>

	<li>8 <a href="#s8">Conformance</a>
	<ul class="tocline">
		<li>8.1 <a href="#s8.1">Conforming InkML Documents</a></li>
		<li>8.2 <a href="#s8.2">Using InkML with other Namespaces</a></li>
		<li>8.3 <a href="#s8.3">Conforming InkML Processors</a></li>
	</ul>
	</li>

<li>A <a href="#acknowledgements">Acknowledgements</a></li>

<li>B <a href="#guidelines">Implementation Guidelines</a></li>

<li>C <a href="#references">References</a></li>

<li>D <a href="#mime-definition">The InkML Media Type</a> 

<ul>
<li>D.1 <a href="#media-type-registration">Registration of MIME
media type application/inkml+xml</a></li>

<li>D.2 <a href="#media-type-fragid">Fragment Identifiers</a></li>
</ul>
</li>

<li>E <a href="#xsd">XML Schema</a></li>

</ul>
</div>

<hr />
<h2 id="Overview">1 Overview</h2>

<p>As more electronic devices with pen interfaces have and continue
to become available for entering and manipulating information,
applications need to be more effective at using this method of
input. Handwriting is a powerful and versatile input modality that
is very familiar for most users since everyone learns to write in
school. Hence, users will tend to use this as a mode of input and
control when available.</p>

<p>A pen-based interface is enabled by a device that allows
movements of the pen to be captured as digital ink. A number of
methods may be used for ink capture, including those based on radio
frequency, optical tracking, physical pressure, or other
technologies. Digital ink can be passed on to recognition software
that will convert the pen input into appropriate computer actions.
Alternatively, the handwritten input can be organized into ink
documents, notes or messages that can be stored for later retrieval
or exchanged through telecommunications means. Such ink documents
are appealing because they capture information as the user composed
it, including text in any mix of languages and drawings such as
equations and graphs.</p>

<p>Hardware and software vendors have typically stored and
represented digital ink using proprietary or restrictive formats.
The lack of a public and comprehensive digital ink format has
severely limited the capture, transmission, processing, and
presentation of digital ink across heterogeneous devices developed
by multiple vendors. In response to this need, the Ink Markup
Language (InkML) provides a simple and platform-neutral data format
to promote the interchange of digital ink between software
applications.</p>

<p>InkML supports a complete and accurate representation of digital
ink. In addition to the pen position over time, InkML allows
recording of information about device characteristics and detailed
dynamic behavior to support applications such as handwriting
recognition and authentication. For example, there is support to
record additional information such as pen tilt and pen tip force
(often referred to as "pressure") and information about the
recording device such as accuracy and dynamic distortion. InkML
also provides features to support rendering of digital ink captured
optically to approximate the original appearance. For example,
stroke width and color information can be recorded.</p>

<p>It is not within the design of InkML to describe and store
semantic information, such as the plain text of ink recognized as
handwriting.&nbsp; Nor is it a goal of InkML to store the
contextual information about the ink, such as what kind of field in
a form where ink was written.&nbsp; However, InkML provides means
for extension.&nbsp; InkML can include XML from other schemas at
specific locations in a file or stream (see <code><a
href="#annotationXMLElement">&lt;annotationXML&gt;</a></code>.)&nbsp;
Additionally, InkML could be embedded within other XML
documents.</p>

<h3 id="OverviewUses">1.1 Uses of InkML</h3>

<p>With the establishment of a non-proprietary ink standard, a
number of applications, old and new, are expanded where the pen can
be used as a very convenient and natural form of input. Here are a
few examples.</p>

<ul>
<li><b>Ink Messaging</b> 

<p>Two-way transmission of digital ink, possibly wireless, offers
mobile-device users a compelling new way to communicate. Users can
draw or write with a pen on the device's screen to compose a note
in their own handwriting. Such an ink note can then be addressed
and delivered to other mobile users, desktop users, or fax
machines. The recipient views the message as the sender composed
it, including text in any mix of languages and drawings.</p>
</li>

<li><b>Ink and SMIL</b> 

<p>A photo taken with a digital camera can be annotated with a pen;
the digital ink can be coordinated with a spoken commentary. The
ink annotation could be used for indexing the photo (for example,
one could assign different handwritten glyphs to different
categories of pictures).</p>
</li>

<li><b>Ink Archiving and Retrieval</b> 

<p>A software application may allow users to archive handwritten
notes and later retrieve them by a variety of mechanisms.</p>
</li>

<li><b>Electronic Form-Filling</b> 

<p>In support of natural and robust data entry for electronic forms
on a wide spectrum of keyboard-less devices, a developer may define an API that takes InkML as
input for fields of the form.</p>
</li>

<li><b>Pen Input and Multimodal Systems</b> 

<p>Robust and flexible user interfaces can be created that
integrate the pen with other input modalities such as speech.
Multimodal applications may share context information across
modalities, leading to better recognition in each modality
individually.&nbsp; In this setting, pen input may be used to
disambiguate voice recognition and vice-versa.</p>
</li>
</ul>

<h3 id="OverviewElements">1.2 Elements</h3>

<p>The current InkML specification defines a set of primitive
elements sufficient for all basic ink applications. All content of
an InkML document is contained within a single
<code>&lt;ink&gt;</code> element. The fundamental data element in
an InkML file is the <code>&lt;trace&gt;</code>. A trace represents
a sequence of contiguous ink points, where each point captures the
values of particular quantities such as the X and Y coordinates of
the pen's position. A sequence of traces accumulates to meaningful
units, such as characters, words or diagrams.</p>

<p>In its simplest form, an InkML file with its enclosed traces
looks like this:</p>

<pre class="ex" xml:space="preserve">
&lt;ink xmlns=&quot;http://www.w3.org/2003/InkML&quot;&gt;
   &lt;trace&gt;
      10 0, 9 14, 8 28, 7 42, 6 56, 6 70, 8 84, 8 98, 8 112, 9 126, 10 140,
      13 154, 14 168, 17 182, 18 188, 23 174, 30 160, 38 147, 49 135,
      58 124, 72 121, 77 135, 80 149, 82 163, 84 177, 87 191, 93 205
   &lt;/trace&gt;
   &lt;trace&gt;
      130 155, 144 159, 158 160, 170 154, 179 143, 179 129, 166 125,
      152 128, 140 136, 131 149, 126 163, 124 177, 128 190, 137 200,
      150 208, 163 210, 178 208, 192 201, 205 192, 214 180
   &lt;/trace&gt;
   &lt;trace&gt;
      227 50, 226 64, 225 78, 227 92, 228 106, 228 120, 229 134,
      230 148, 234 162, 235 176, 238 190, 241 204
   &lt;/trace&gt;
   &lt;trace&gt;
      282 45, 281 59, 284 73, 285 87, 287 101, 288 115, 290 129,
      291 143, 294 157, 294 171, 294 185, 296 199, 300 213
   &lt;/trace&gt;
   &lt;trace&gt;
      366 130, 359 143, 354 157, 349 171, 352 185, 359 197,
      371 204, 385 205, 398 202, 408 191, 413 177, 413 163,
      405 150, 392 143, 378 141, 365 150
   &lt;/trace&gt;
&lt;/ink&gt;
</pre>

<p>These traces consist simply of X and Y value pairs, and may look
like this when rendered:</p>

<div class="figure">
<p><img style="border: none;" src="hello.png"
alt="a possible rendering of the sample trace above" /></p>

<p class="caption">Figure 1: Example of trace rendering</p>
</div>

<p>Figure 1 shows a trace of a sampled handwriting signal. The dots
mark the sampling positions which were interpolated by the blue
line. Green points represent pen-downs whereas red dots indicate
pen-ups.</p>

<div>
<p>More generally, traces consist of sequences of points. Each
point consists of a number of coordinate values whose meanings are
given by a <code>&lt;traceFormat&gt;</code> element. These
coordinates may provide values for such quantities as pen position,
angle, tip force, button states and so on.</p>
</div>

<p>Information about the device used to collect the ink (e.g., the
sampling rate and resolution) may be specified with the
<code>&lt;inkSource&gt;</code> element.</p>

<p>Ink traces can have certain attributes such as color and width,
writer identification, pen modes (eraser versus writing), and so
on. These and other attributes are captured using the
<code>&lt;brush&gt;</code> element. Traces that share the same
characteristics, such as being written with the same brush, can be
grouped together with the <code>&lt;traceGroup&gt;</code>
element.</p>

<div>
<p>Ink traces may also be organized into collections for
application-specific purposes either by grouping the traces objects
themselves, using the <code>&lt;traceGroup&gt;</code> element, or
by reference, using the <code>&lt;traceView&gt;</code> element.</p>
</div>

<div>
<p>Certain applications, such as collaborative whiteboards (where
ink coming from different devices is drawn on a common canvas) or
document review (where ink annotation from various sources are
combined), will require ink sharing. The
<code>&lt;context&gt;</code> element allows representation and
grouping of the pertinent information, such as the trace format,
brush, and canvas. Canvas transformations allow ink from different
devices to be combined and manipulated by multiple parties.</p>
</div>

<div>
<p>InkML supports the semantic labeling of traces with attributes
on traces or collections of traces. These may be given with either
<code>&lt;annotation&gt;</code>, for text, or
<code>&lt;annotationXML&gt;</code>, for XML, using
application-defined encodings.</p>
</div>

<p>In all appropriate cases, the InkML specification defines
default values for elements that are not specified, and rules that
establish the scope of a given attribute.</p>

<p>Finally, the InkML specification is limited in scope: It is
currently oriented to fixed Cartesian coordinate systems, it does
not support sophisticated compression of trace data, and it does
not support non-ink events (although the later could be handled via
annotations).</p>

<h3 id="OverviewModes">1.3 Exchange Modes</h3>

<p>Most ink-related applications fall into two broad categories:
"Streaming" and "Archival". Archival ink applications capture and
store digital ink for later processing, such as document
storage/retrieval applications and batch forms processing . In
these applications, an entire <code>&lt;ink&gt;</code> element is
written prior to processing. For ease of implementation in archival
mode, referenced elements should be defined inside a declaration
block using the <code>&lt;definitions&gt;</code> element (see <a
href="#defaultContext">The Default Context</a> section, the <a
href="#definitions">Definitions</a> section, and the <a
href="#Archival">Archival Applications</a> section).</p>

<p>Streaming ink applications, on the other hand, transmit digital
ink as it is captured, such as in the electronic whiteboard example
mentioned above. In order to support a streaming style of ink
markup generation, the InkML language supports the notion of a
"current" state (e.g., the current brush) and allows for
incremental changes to this state.</p>

<div>
<h3 id="conventions">1.4 Conventions used in this document</h3>

<p>This document uses the following conventions:</p>

<dl>
<dt>Syntax of element contents</dt>

<dd>The syntax of the contents of InkML elements is expressed in
Backus-Naur Form, using the notation defined in the <a
href="#traceContents">Trace</a> section. Non-literal symbols
represent InkML markup and are linked to the relevant section in
this document. For example: 

<div class="contents"><samp><a href="#channel">channel</a>* <a
href="#intermittentChannels">intermittentChannels</a>?</samp></div>
</dd>

<dt>Syntax of attribute contents</dt>

<dd>In this specification attributes definitions are formatted as: 

<div class="attr"><b>default</b> = xsd:decimal | xsd:boolean</div>

The left hand side of the '=' sign is the name of the attribute and
the right hand side describes the syntax of the attribute's
contents, using the same Backus-Naur Form notation as used for
element definitions. In addition, a non-literal symbol will
represent a data type name. By convention, this specification uses
the prefix 'xsd:' to indicate that the following name is that of a
datatype formally defined in the XML Schema Part 2: Datatypes
Recommendation [<cite><a href="#XMLSCHEMA2">XMLSCHEMA2</a></cite>].
The 'xsd' prefix is used only as a notation in this specification,
and does not mandate any prefix when using XML Schema names in
InkML.</dd>
</dl>
</div>

<hr />
<div>
<h2 id="structure">2 Structure</h2>

<p>InkML documents are well-formed XML documents which comply to
the syntax rules of this specification.</p>

<p>The namespace URI of InkML is
<code>http://www.w3.org/2003/InkML</code></p>

<p>The media type of InkML document is
<code>application/inkml+xml</code>. See the <a
href="#mime-definition">Media Type definition</a> for details. This
media type is expected to be registered with IETF.</p>

<h3 id="inkElement">2.1 <code>&lt;ink&gt;</code> element</h3>

<p>The <code>ink</code> element is the root element of any InkML
instance. When combining InkML and other XML elements within
applications, elements from different namespaces must be
disambiguated by use of the namespace qualifier. The allowed
sub-elements of the <code>ink</code> element can occur any number
of times, in any order.</p>

<h6 id="inkElementAttrs">Attributes:</h6>

<div class="attr"><b>documentID</b> = xsd:anyURI
<div class="attrdef">The unique identifier for this document.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>
</div>

<div class="attrdef">
<p>A URI that uniquely identifies this document. No two documents
with a distinct application intent may have the same
<code>documentID</code> contents. The value of this property is an
opaque URI whose interpretation is not defined in this
specification.</p>

</div>

<h6 id="inkContents">Contents:</h6>

<div class="contents"><samp> <a
href="#trace">trace</a> ( <a
href="#definitionsElement">definitions</a> 
<!-- | <a href="#brushElement">brush</a> -->
 | <a href="#contextElement">context</a> | <a
href="#trace">trace</a> | <a href="#traceGroup">traceGroup</a> | <a
href="#traceViewElement">traceView</a> | <a
href="#annotationElement">annotation</a> | <a
href="#annotationXMLElement">annotationXML</a> )*</samp></div>

<h6 id="inkExample">Example:</h6>

<pre class="ex" xml:space="preserve">
&lt;ink xmlns="http://www.w3.org/2003/InkML"
    documentID="uuid:6B29FC40-CA47-1067-B31D-00DD010662DA&quot;&gt;
   ...
&lt;/ink&gt;
</pre>
</div>

<hr />
<h2 id="TraceIntro">3 Traces and Trace Formatting</h2>

<p><code>&lt;trace&gt;</code> is the basic element used to record
the trajectory of a pen as the user writes digital ink. More
specifically, these recordings describe sequences of connected
points. On most devices, these sequences of points will be bounded
by pen contact change events (pen-up and pen-down), although some
devices may simply record proximity and force data without
providing an interpretation of pen-up or pen-down state.</p>

<p>The simplest form of encoding specifies the X and Y coordinates
of each sample point. For compactness, it may be desirable to
specify absolute coordinates only for the first point in the trace
and use delta-x and delta-y values to encode subsequent points.
Some devices record acceleration rather than absolute or relative
position; some provide additional data that may be encoded in the
trace, including Z coordinates or tip force, or the state of side
switches or buttons.</p>

<p>These variations in the information available from different ink
sources, or needed by different applications, are supported in
InkML through the <code>&lt;traceFormat&gt;</code> and
<code>&lt;trace&gt;</code> elements. The
<code>&lt;traceFormat&gt;</code> element specifies the encoding
format for each sample of a recorded trace, while
<code>&lt;trace&gt;</code> elements are used to represent the
actual trace data. If no <code>&lt;traceFormat&gt;</code> is
specified, a default encoding format of X followed by Y coordinates
is assumed.</p>

<p>Traces generated by different devices, or used in differing
applications, may contain different types of information. InkML
defines <em><a href="#channel">channels</a></em> to describe the
data that may be encoded in a trace.</p>

<p>A channel can be characterized as either <em>regular</em>,
meaning that its value is recorded for every sample point of the
trace, or <em>intermittent</em>, meaning that its value may change
infrequently and thus will not necessarily be recorded for every
sample point. X and Y coordinates are examples of likely regular
channels, while the state of a pen button is likely to be an
intermittent channel.</p>

<h3 id="traceFormats">3.1 Trace Formats</h3>

<h4 id="traceFormat">3.1.1 <code>&lt;traceFormat&gt;</code>
element</h4>

<h6 id="traceFormatAttrs">Attributes:</h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The unique identifier for this trace
format.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>
</div>

<h6 id="traceFormatContents">Contents:</h6>

<div class="contents"><samp><a href="#channel">channel</a>* <a
href="#intermittentChannels">intermittentChannels</a>?</samp></div>

<p>The <code>&lt;traceFormat&gt;</code> element describes the
format used to encode points within <code>&lt;trace&gt;</code>
elements. In particular, it defines the sequence of channel values
that occurs within <code>&lt;trace&gt;</code> elements. The order
of declaration of channels in the <code>&lt;traceFormat&gt;</code>
element determines the order of appearance of their values within
<code>&lt;trace&gt;</code> elements.</p>

<p>Regular channels appear first in the <code>&lt;trace&gt;</code>,
followed by any intermittent channels. Correspondingly, the
<code>&lt;traceFormat&gt;</code> element contains an ordered
sequence of <code>&lt;channel&gt;</code>s, giving the regular
channels (if any), followed by an optional
<code>&lt;intermittentChannels&gt;</code> section. The order of the
coordinates in each point of a trace is determined by the order of
the <code>&lt;channel&gt;</code> elements in the trace format,
including those from the intermittent channels part.</p>

<p>The <code>&lt;context&gt;</code> element may use the <b>traceFormatRef</b> 
attribute to refer to a <code>&lt;traceFormat&gt;</code> by it&#39;s id.&nbsp; If no <code>&lt;traceFormat&gt;</code> 
is specified in an InkML file, an application defined default trace format is 
used.&nbsp; The default trace has the reserved id &quot;<code><strong>DefaultTraceFormat</strong></code>&quot; 
and may be explicitly referenced using the
URI "<code><strong>#DefaultTraceFormat</strong></code>&quot;.</p>

<h4 id="channel">3.1.2 <code>&lt;channel&gt;</code> element</h4>

<h6><a name="channelAttrs" id="channelAttrs">Attributes:</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The unique identifier for this element.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>name</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">The case sensitive name of this channel.<br
style="clear:none;" />
<em>Required:</em> yes<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>type</b> = "integer" | "decimal" | "double" | "boolean"<br
style="clear:none;" />
 

<div class="attrdef">The data type of the point values for this
channel.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> "decimal"<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>default</b> = xsd:decimal | xsd:boolean<br
style="clear:none;" />
 

<div class="attrdef">The default value of the point data for this
channel. This only applies to intermittent channels.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> 0 (for integer or decimal
channel), F (for boolean channel)<br style="clear:none;" />
</div>

<br style="clear:none;" />
 

<div><b>min</b> = xsd:number<br style="clear:none;" />
 

<div class="attrdef">The lower boundary for the values of this
channel.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>max</b> = xsd:number<br style="clear:none;" />
 

<div class="attrdef">The upper boundary for the values of this
channel.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>orientation</b> = "+ve" | "-ve"<br style="clear:none;" />
 

<div class="attrdef">The orientation of increasing channel values
with respect to the default direction of the channel's coordinate
axis, where applicable.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> "+ve"<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>respectTo</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">Specifies that the values are relative to
another reference point.&nbsp; The reference point may be the URI
of a <strong><span class="style1">&lt;timestamp&gt;</span></strong>
for time channels, or an application defined URI for application
specific channels.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>units</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">The units in which the values of the channel
are expressed (numerical channels only).<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>
</div>
</div>

<h6><a name="channelContents"
id="channelContents">Contents:</a></h6>

<div class="contents">
<dl>
<dt><samp><a href="#mappingElement">mapping</a>?</samp></dt>
</dl>
</div>

<p>Channels are described using the <code>&lt;channel&gt;</code>
element, with various attributes.</p>

<p>The required <b>name</b> attribute specifies the interpretation
of the channel in the trace data. The following case sensitive channel names, with
their specified meanings, are reserved:</p>

<table border="1" cellspacing="0" cellpadding="3" width="80%"
class="channels" summary="">
<tbody>
<tr>
<th>channel name</th>
<th>dimension</th>
<th>default unit</th>
<th>interpretation</th>
</tr>

<tr>
<td>X</td>
<td>length</td>
<td>mm</td>
<td>X coordinate. This is the horizontal pen position on the
writing surface, increasing to the right for +ve orientation.</td>
</tr>

<tr>
<td>Y</td>
<td>length</td>
<td>mm</td>
<td>Y coordinate. This is the vertical position on the writing
surface, increasing downward for +ve orientation.</td>
</tr>

<tr>
<td>Z</td>
<td>length</td>
<td>mm</td>
<td>Z coordinate. This is the height of pen above the writing
surface, increasing upward for +ve orientation.</td>
</tr>

<tr>
<td>F</td>
<td>force</td>
<td>%</td>
<td>pen tip force</td>
</tr>

<tr>
<td>S</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>tip switch state (touching/not touching the writing
surface)</td>
</tr>

<tr>
<td>B1...Bn</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>side button states</td>
</tr>

<tr>
<td>OTx</td>
<td>angle</td>
<td>deg</td>
<td>tilt along the x-axis</td>
</tr>

<tr>
<td>OTy</td>
<td>angle</td>
<td>deg</td>
<td>tilt along the y-axis</td>
</tr>

<tr>
<td>OA</td>
<td>angle</td>
<td>deg</td>
<td>azimuth angle of the pen (yaw)</td>
</tr>

<tr>
<td>OE</td>
<td>angle</td>
<td>deg</td>
<td>elevation angle of the pen (pitch)</td>
</tr>

<tr>
<td>OR</td>
<td>angle</td>
<td>deg</td>
<td>rotation (counter-clockwise rotation about pen axis )</td>
</tr>

<tr>
<td>C</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>color value as an RGB octet triple (i.e. #000000 to
#FFFFFF).</td>
</tr>

<tr>
<td>CR,CG,CB</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>color values (Red/Green/Blue)</td>
</tr>

<tr>
<td>CC,CM,CY,CK</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>color values (Cyan/Magenta/Yellow/Black)</td>
</tr>

<tr>
<td>A</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>transparency (device-specific encoding)</td>
</tr>

<tr>
<td>W</td>
<td>length</td>
<td>mm</td>
<td>stroke width (orthogonal to stroke)</td>
</tr>

<tr>
<td colspan="1">BW</td>
<td colspan="1">length</td>
<td>mm</td>
<td colspan="1">brush width</td>
</tr>

<tr>
<td colspan="1">BH</td>
<td colspan="1">length</td>
<td>mm</td>
<td colspan="1">brush height</td>
</tr>

<tr>
<td>T</td>
<td>time</td>
<td>ms</td>
<td>time (of the sample point)</td>
</tr>
</tbody>
</table>

<p>The <b>type</b> attribute defines the encoding type for the
channel (either boolean, decimal, or integer). If <b>type</b> is
not specified, it defaults to decimal.</p>

<p>A default value can be specified for the channel using the
<b>default</b> attribute; the use of default values within a trace
is described in the next section. If no <b>default</b> is
specified, it is assumed to be zero for integer and decimal-valued
channels, and false for boolean channels.</p>

<div>
<p>The <b>min</b> and <b>max</b> attributes, if given, specify the
minimum and maximum possible values for a channel of type integer
or decimal. If neither is given, then there is no a prior bound on
the channel values. If one is given, then the channel values are
bounded above or below but unbounded in the other direction. If
both are given, then all channel values must fall within the
specified range.</p>

<p>The <b>orientation</b> attribute is applicable to channels of
integer or decimal type. It gives the meaning of increasing value.
For example, whether X increases to the left or the right. The
value may be given as "+ve" or "-ve", with "+ve" being the
default.</p>

<p>The <b>respectTo</b> attribute specifies the origin for channels
of integer or decimal type. For time channels, this is given as a
URI for a <code>&lt;timestamp&gt;</code> element. For other
application defined channels the URI is application-dependent.</p>
</div>

<p>Typically, a channel in the <code>&lt;traceFormat&gt;</code>
will map directly to a corresponding channel provided by the
digitizing device, and its values as recorded in the trace data
will be the original channel values recorded by the device.
However, for some applications, it may be useful to store
normalized channel values instead, or even to remap the channels
provided by the digitizing device to different channels in the
trace data. This correspondence between the trace data and the
device channels is recorded using a <code>&lt;mapping&gt;</code>
element (described in the <a href="#mappings">Mappings section</a>)
within the <code>&lt;channel&gt;</code> element. If no mapping is
specified for a channel, it is assumed to be unknown.</p>

<h4 id="intermittentChannels">3.1.3
<code>&lt;intermittentChannels&gt;</code> element</h4>

<h6><a name="intermittentChannelsAttrs"
id="intermittentChannelsAttrs">Attributes:</a></h6>

<div class="attr">none</div>

<h6><a name="intermittentChannelsContents"
id="intermittentChannelsContents">Contents:</a></h6>

<div class="contents">
<dl>
<dt><samp><a href="#channel">channel</a>*</samp></dt>
</dl>
</div>

<p>The <strong><span
class="style1">&lt;intermittentChannels&gt;</span></strong> element
lists those channels whose value may optionally be recorded for
each sample point.&nbsp; The order of the enclosed channel
declarations gives the order of the intermittent channel data
samples within traces having this format.&nbsp; The <strong><span
class="style1">&lt;intermittentChannels&gt;</span></strong> section
is optional and must appear after the regular
<strong>&lt;channel&gt;</strong> elements (if any) within a
<strong>&lt;traceFormat&gt;</strong> element.</p>

<h4 id="orientation">3.1.4 Orientation Channels</h4>

<p>The channels OTx, OTy, OA, OE and OR record pen orientation
data. Implementers may choose to use either pen azimuth OA and pen
elevation OE, or alternatively tilt angles OTx and OTy. The latter
are the angles of projections of the pen axis onto the XZ and YZ
planes, measured from the vertical. It is often useful to record
the sine of this angle, rather than the angle itself, as this is
usually more useful in calculations involving angles. The <code><a
href="#mappingElement">&lt;mapping&gt;</a></code> element can be
employed to specify an applied sine transformation. While it is not
forbidden to use channels from different groups together (i.e. from
more than one of {OA, OE} and {OTx, OTy}), applications will not
normally do this.</p>

<p>The third degree of freedom in orientation is generally defined
as the rotation of the pen about its axis. This is potentially
useful (in combination with tilt) in application such as
illustration or calligraphy, and signature verification.</p>

<div class="figure">
<p><img src="azimuth.png"
alt="Diagram showing the azimuth and elevation of the pen"
width="212" height="224" /><img src="tilt.png"
alt="Diagram showing the tilt angles of the pen" width="198"
height="224" /></p>

<p class="caption">Figure 2: (a) azimuth and elevation angles, (b)
tilt angles</p>
</div>

<div class="figure">
<p><img src="projection.png"
alt="Diagram showing the pen orientation decomposition" width="211"
height="244" /><img src="rotation.png"
alt="Diagram showing the rotation angle around the axis of the pen"
width="198" height="244" /></p>

<p class="caption">Figure 3: (a) pen orientation decomposition, (b)
pen rotation</p>
</div>

<p>Figure 2a displays the pen orientation using Azimuth and
Elevation. The origin of the Azimuth is at the Y-axis. Azimuth
increases anticlockwise up to 360 degrees. The origin of Elevation
is located within the XY-plane. Elevation increases up to 90
degrees, at which point the pen is perpendicular to the
XY-plane.</p>

<p>Figure 2b explains the definition of the Tilt-X and the Tilt-Y
angles. For both the origin is along the Z-axis. Tilt-X increases
up to +90 degrees for inclinations along the positive X-axis and
decreases up to -90 degrees for inclinations along the negative
X-axis. Respectively, Tilt-Y is defined for pen inclinations along
the Y-axis.</p>

<p>Figure 3a displays the pen orientation decomposition as
functions of Azimuth/Elevation or alternatively as function of
Tilt-X/Tilt-Y. Thereby, elevations of the pen which are mapped to
the XZ- and to the YZ- plane lead to Tilt-X and Tilt-Y.</p>

<p>Figure 3b shows the Rotation of the pen along its longitudinal
axis.&nbsp; The departure of a reference mark or meridian on the
pen barrel from the nominal 'up' direction which may be constructed
by a ray perpendicular to the pen barrel (somewhere not at the tip)
and intersecting a pure-Z ray arising from the surface of the pen
passing through the tip. This angle is measured in a clockwise
direction when viewing the pen barrel from tail to tip, in
degrees.</p>

<div>
<h4 id="color">3.1.5 Color Channels</h4>

<p>The channels CR, CG, CB, CC, CM, CY, CK, C and A are defined to
record color and transparency data as captured by an optical
device, as generated by software or by other means.</p>

<p>The channels CR, CG, CB provide an additive color model for the
colors red, green and blue. The channels CC, CY, CM, CK provide a
subtractive color model for the colors cyan, magenta, yellow and
black. The channel C provides a mechanism to give color as a single
numerical value in the range #000000..#FFFFFF that encodes the
colors red, green and blue as three octets. While it is not
forbidden to use channels from different groups together (i.e. from
more than one of {C}, {CR, CG, CB} and {CC, CY, CM, CK}),
applications will not normally do this. The A channel records
transparency as an integer. The value 0 represents opaque ink and
the maximum permissible value represents complete transparency.</p>

<p>Color channels are intended for use when these values are part
of the data itself and hence potentially changing from one sample
to the next. Strokes with constant color may more economically be
described with reference to a <code>&lt;brush&gt;</code>
element.</p>

<p>It is legitimate for an application to have an accessibility
mode or alternative rendering mode where the explicit color values
in the InkML are reinterpreted as other colors for better
accessibility or suitability of the rendering device. Examples of
this would be mapping color to black and white for monochrome
devices or to high-contrast colors for greater visibility.</p>
</div>

<h4 id="width">3.1.6 Width Channels</h4>

<div>
<p>Three channels are provided to provide stroke width
information.&nbsp;</p>

<p>The channel W is provided for recording stroke width. The value
is in length units and is the diameter of the larger circle that
can be inscribed within the trace locus. This allows optical
devices to record measured stroke width and allows applications
that generate InkML to specify desired width for rendering.</p>

<p>The channels BW and BH are defined to record the brush width and
height at each point.&nbsp; The meaning of the width and height is
defined by the brush tip shape, as given by a
<code>&lt;brushProperty&gt;.&nbsp;</code></p>

<p>As with the color channels, the width channels are intended for
use when this quantity is part of the data itself and hence
potentially changing from one sample to the next. Strokes with
constant width may more economically be described with reference to
a <code>&lt;brush&gt;</code> element with <strong>width</strong>
and <strong>height</strong> properties.</p>
</div>

<h4 id="time">3.1.7 Time Channel</h4>

<p>The time channel allows for detailed recording of the timing
information for each sample point within a trace. This can be
useful if the digitizing device has a non-uniform sampling rate,
for example, or in cases where duplicate point data is removed for
the sake of compactness.</p>

<p>The time channel can be specified as either a regular or
intermittent channel. When specified as a regular channel, the
single quote prefix can be used to record incremental time between
successive points.&nbsp; The
value of the time channel for a given sample point is defined to be
the timestamp of that point in the units and frame of reference
specified by the <strong>respectTo</strong> attribute of the time
channel that is defined in the associated <a
href="#traceFormat"><code class="style4">&lt;traceFormat&gt;</code></a> of the
trace.</p>

<p>As with the other predefined channels, the meaning of the integer or decimal 
values recorded by the time channel in a given trace is defined by the trace's 
associated <strong><span
class="style1">&lt;traceFormat&gt;</span></strong>. In the case of
the time channel, its <strong><span
class="style1">&lt;channel&gt;</span></strong> element contains
both a <b>units</b> and <b>respectTo</b> attribute.</p>

<p>The <b>units</b> attribute gives the units of the recorded time
values, and the <b>respectTo</b> attribute describes the frame of
reference for those recorded values. The value of the
<b>respectTo</b> attribute is a reference to a time stamp. If it is
not given, the time channel values are relative to the beginning
timestamps of the individual traces in which they appear.</p>

<div>
<p>The following example defines a time channel whose values for a
given point are the relative to the timestamp referred to by
<tt>#ts1</tt>:</p>

<pre class="ex" xml:space="preserve">
&lt;channel name="T"
         type="integer"
         units="ms"
         respectTo="#ts1" /&gt;
</pre>
</div>

<p>If no <strong><span
class="style1">&lt;traceFormat&gt;</span></strong> information is provided, or
if no value is specified for the <b>respectTo</b> attribute, the
ink processor cannot make any assumption about the relative timing
of points within different traces. Likewise, if no units are
specified, no assumption can be made about the units of the time
channel data.</p>

<h4 id="user">3.1.8 User Defined Channels</h4>

<p>In addition to the pre-defined channels, user-defined channels
are allowed, although their interpretation is not required by
conforming ink markup processors.</p>

<div>
<p>When specifying a number of related channels, it is recommended
to use a common prefix. For example, direction-sensitive stylus
force could be named FX, FY, FZ.</p>

<p>User defined channels may be used to describe ink traces in
non-Cartesian coordinate systems, using various compression
schemes, or with supplementary information. Channels need not
describe properties of the digital ink, per se, but may be used to
provide additional information in the ink stream.&nbsp;&nbsp; For
example, a user defined channels could give&nbsp; information about
changing lighting conditions.</p>
</div>

<h4 id="specifying">3.1.9 Specifying Trace Formats</h4>

<p id="ex-tracefmt">The following example defines a
<code>&lt;traceFormat&gt;</code> which reports decimal-valued X and
Y coordinates for each point, and intermittent boolean values for
the states of two buttons B1 and B2, which have default values of F
("false"):</p>

<pre class="ex" xml:space="preserve">
&lt;traceFormat xml:id="xyb1b2"&gt;
   &lt;channel name="X" type="decimal"&gt;
      &lt;mapping type="identity"/&gt;
   &lt;/channel&gt;
   &lt;channel name="Y" type="decimal"&gt;
      &lt;mapping type="identity"/&gt;
   &lt;/channel&gt;

   &lt;intermittentChannels&gt;
      &lt;channel name="B1" type="boolean" default="F"&gt;
         &lt;mapping type="identity"/&gt;
      &lt;/channel&gt;
      &lt;channel name="B2" type="boolean" default="F"&gt;
         &lt;mapping type="identity"/&gt;
      &lt;/channel&gt;
   &lt;/intermittentChannels&gt;
&lt;/traceFormat&gt;
</pre>

<p id="default-tracefmt">The appearance of a
<code>&lt;traceFormat&gt;</code> element in an InkML file both
defines the format and installs it as the current format for
subsequent traces except within a <a href="#definitionsElement"
shape="rect"><code>&lt;definitions&gt;</code></a> block (see <a
href="#specifying">Specifying Trace Formats</a>). The <b>id</b>
attribute of a <code>&lt;traceFormat&gt;</code> allows the format
to be reused by multiple contexts (see the <a
href="#contextElement">Context</a> section). If no
<code>&lt;traceFormat&gt;</code> is specified, the following
default format is assumed:</p>

<pre class="ex" xml:space="preserve">
&lt;traceFormat xml:id="DefaultTraceFormat"&gt;
    &lt;channel name="X" type="decimal"/&gt;
    &lt;channel name="Y" type="decimal"/&gt;
&lt;/traceFormat&gt;
</pre>

<p>Thus, in the simplest case, an InkML file may contain nothing
but <code>&lt;trace&gt;</code> elements within an <code>&lt;ink&gt;</code> element.</p>

<h3 id="traces">3.2 Traces</h3>

<div>
<h4 id="trace">3.2.1 <code>&lt;trace&gt;</code> element</h4>

<h6><a name="traceAttrs" id="traceAttrs">Attributes:</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The identifier for this trace.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>type</b> = "penDown" | "penUp" | "indeterminate"<br
style="clear:none;" />
 

<div class="attrdef">The type of this trace.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> "penDown"<br
style="clear:none;" />
</div>

<br style="clear:none;" />
 

<div><b>continuation</b> = "begin" | "middle" | "end"<br
style="clear:none;" />
 

<div class="attrdef">This attribute indicates whether this trace is
a trace fragment, and if so, where this trace is located in the set
of continuation traces. <em><br />
	Required:</em> no, <em>Default:</em>
none</div>

<br style="clear:none;" />
</div>

<div><b>priorRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">The URI of the trace this one is a
continuation of.<br style="clear:none;" />
	<em>Required:</em> if and only if
<code><strong>continuation</strong></code> has values "end" or
"middle", <em>Default:</em> none<br style="clear:none;" />
</div>

<br style="clear:none;" />
</div>

<div><b>contextRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">The context for this trace. Any values in this
context over-ride the values in the inherited context.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em>
"<code><strong>#DefaultContext</strong></code>," unless this
<strong><span class="style1">&lt;trace&gt;</span></strong> is
contained within a <strong><span
class="style1">&lt;traceGroup&gt;</span></strong>, then inherit
from the <strong><span
class="style1">&lt;traceGroup&gt;.</span></strong><br
style="clear:none;" />
</div>
</div>

<br style="clear:none;" />
<b>brushRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">The brush for this trace.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> Inherited from context.<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>duration</b> = xsd:decimal<br style="clear:none;" />
 

<div class="attrdef">The duration of this trace, in
milliseconds.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>timeOffset</b> = xsd:decimal<br style="clear:none;" />
 

<div class="attrdef">The relative timestamp or time-of-day for the
start of this trace, in milliseconds.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>
</div>
</div>

<h6><a name="traceContents" id="traceContents">Contents:</a></h6>

<div class="nlcontents">
<p>The following grammar defines the syntax of the data that
appears within a <code>&lt;trace&gt;</code> element.&nbsp; It is
described using the subset of Extended Backus-Naur Form defined in the Notation
section of the <cite class="w3crec">Extensible
Markup Language (XML) 1.0 (Fourth Edition) </cite>specification [<a href="#EBNF">EBNF</a>].&nbsp; 
This subset of EBNF includes the following
notation:</p>

<ul>
<li>*: 0 or more</li>

<li>+: 1 or more</li>

<li>?: 0 or 1</li>

<li>(): grouping</li>

<li>|: separates alternatives</li>

<li>double or single quotes surround literals</li>

<li>#x precedes hex character codes</li>
</ul>

<div>
<p>The grammar is as follows:</p>

<pre class="grammar" xml:space="preserve">
trace   ::= point ("," point)* ","? wsp*

point   ::= (wsp* value)+ wsp*

value   ::= difference_order?  wsp* "-"? wsp* number | "T" | "F" | "*" | "?"

number  ::= (decimal | double | hex)

double  ::= decimal ("e"|"E") ("+"|"-")? digit+ 

decimal ::= digit+ ("." digit*)? | "." digit+

hex     ::= "#" (digit | "A" | "B" | "C" | "D" | "E" | "F")+

difference_order ::= ("!" | "'" | '"')

digit   ::= ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")

wsp     ::= (#x20 | #x9 | #xD | #xA)
</pre>

Additionally, <em>wsp</em> <b>may</b> occur anywhere except within
a <em>decimal, float</em> or <em>hex</em> and <b>must</b> occur if
required to separate two <em>values</em>. Otherwise the longest
token is matched. For example, "3245" requires an internal
<em>wsp</em> character if it is to be interpreted as two decimal
numbers, "32" and "45". On the other hand, "0.923.45" will be
interpreted as "0.923" and ".45".</div>

<div>
<p>The number of <em>value</em> tokens appearing within each point
must be at least equal to the number of regular channels and be no
more than the number of regular channels plus the number of
intermittent channels.</p>
</div>
</div>

<p>The <code>&lt;trace&gt;</code> element is used to record the
data captured by the digitizer. It contains a sequence of points
encoded according to the specification given by the
<code>&lt;traceFormat&gt;</code> element.</p>

<p>The <b>type</b> attribute of a <code>&lt;trace&gt;</code>
indicates the pen contact state (either "<code>penUp</code>" or
"<code>penDown</code>") during its recording. A value of
"<code>indeterminate</code>" is used if the contact-state is
neither pen-up nor pen-down, and may be either unknown or variable
within the trace. For example, a signature may be captured as a
single indeterminate trace containing both the actual writing and
the trajectory of the pen between strokes.&nbsp; The values of the tip switch 
state channel &quot;S&quot;, if present in the trace, overrides the value of the <strong>
type</strong> attribute.</p>

<p>If a <code>continuation</code> attribute is present, it
indicates that the current trace is a continuation trace, i.e. its
points are a temporally contiguous continuation of (and thus should
be connected to) another trace element. The possible values of the
attribute are:</p>

<ul>
<li><code>begin</code>: the current trace is the first of the set
of continuation traces</li>

<li><code>end</code>: the current trace is the last of the set of
continuation traces</li>

<li><code>middle</code>: the current trace is a continuation trace,
but is neither the first nor the last in the set of traces</li>
</ul>

<p>If the current trace is a continuation trace but is not the
first trace in the set (i.e. the <code>continuation</code>
attribute has value <code>middle</code> or <code>end</code>) then a
<code>priorRef</code> attribute must be present and must contain
the URI of the trace of which the current trace is a continuation.
A <code>begin</code> or <code>middle</code> trace can be the prior
trace for exactly one trace. An <code>end</code> trace cannot be
the prior trace of any other trace.</p>

<p>Regular channels may be reported as explicit values,
differences, or second differences: Prefix symbols are used to
indicate the interpretation of a value: a preceding exclamation
point (<code>!</code>) indicates an explicit value, a single quote
(<code>'</code>) indicates a single difference, and a double quote
prefix (<code>"</code>) indicates a second difference. If there is
no prefix, then the channel value is interpreted as explicit,
difference, or second difference based on the last prefix for the
channel. If there is no last prefix, the value is interpreted as
explicit.</p>

<p>A second difference encoding must be preceded by a single
difference representation; which, in turn, must be preceded with an
explicit encoding.</p>

<p>All traces must begin with an explicit value, not with a first
or second difference. This is true of continuation traces as well.
This allows the location and velocity state information to be
discarded at the end of each trace, simplifying parser
design.&nbsp; This is true for continuation traces.</p>

<p>Both regular and intermittent channels may be encoded with the
wildcard character "*". This wildcard character means either that
the value of the channel remains at the previous channel value (if
explicit), or that the channel continues integrating with the
previous velocity or acceleration values, as appropriate.</p>

<div>
<p>Intermittent channels may be encoded with the wildcard character
"?". This means that a value of a channel is not given at that
point. It is useful when there are several independent intermittent
channels, and they do not always report simultaneously, e.g.</p>

<pre class="ex" xml:space="preserve">
&lt;trace&gt; 11 12 9, 21 22 ? T, 31 32, 41 42 5, 51 52 ? F&lt;/trace&gt;
</pre>
</div>

<p>Booleans are encoded as "T" or "F".</p>

<p>For each point in the trace, regular channel values are reported
first in the order given by the <code>&lt;channel&gt;</code>
elements of the applicable <code>&lt;traceFormat&gt;</code>. All
regular channels must be reported, if only with the explicit
wildcard "*".&nbsp; If any intermittent values are reported for the
point, they are given next, in the order given by the
<code>&lt;intermittentChannels&gt;</code> elements of the
applicable <code>&lt;traceFormat&gt;</code>. Unreported
intermittent channels are interpreted as though they were given by
the wildcard "*".</p>

<p id="ex-trace">Here is an example of a trace of 11 points, using
the following traceFormat:</p>

<pre class="ex" xml:space="preserve">
&lt;traceFormat&gt;
   &lt;channel name="X" type="decimal"/&gt;
   &lt;channel name="Y" type="decimal"/&gt;

   &lt;intermittentChannels&gt;
      &lt;channel name="B1" type="boolean" default="F"/&gt;
      &lt;channel name="B2" type="boolean" default="F"/&gt;
   &lt;/intermittentChannels&gt;
&lt;/traceFormat&gt;

&lt;trace xml:id="id4525abc"&gt;
   1125 18432,'23'43,"7"-8,3-5,7 -3,6 2,6 8,3 6 T,2 4*T,3 6,3-6 F F
&lt;/trace&gt;
</pre>

<p>The trace is interpreted as follows:</p>

<table border="1" cellspacing="0" cellpadding="3" width="80%"
class="trace" summary="">
<tbody>
<tr>
<th rowspan="1" colspan="1">Trace</th>
<th rowspan="1" colspan="1">X</th>
<th rowspan="1" colspan="1">Y</th>
<th rowspan="1" colspan="1">vx</th>
<th rowspan="1" colspan="1">vy</th>
<th rowspan="1" colspan="1">B1</th>
<th rowspan="1" colspan="1">B2</th>
<th rowspan="1" colspan="1">Comments</th>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">1125 18432</td>
<td rowspan="1" colspan="1">1125</td>
<td rowspan="1" colspan="1">18432</td>
<td rowspan="1" colspan="1">?</td>
<td rowspan="1" colspan="1">?</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">button default values</td>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">'23'43</td>
<td rowspan="1" colspan="1">1148</td>
<td rowspan="1" colspan="1">18475</td>
<td rowspan="1" colspan="1">23</td>
<td rowspan="1" colspan="1">43</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">velocity values</td>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">"7"-8</td>
<td rowspan="1" colspan="1">1178</td>
<td rowspan="1" colspan="1">18510</td>
<td rowspan="1" colspan="1">30</td>
<td rowspan="1" colspan="1">35</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">acceleration Values</td>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">3-5</td>
<td rowspan="1" colspan="1">1211</td>
<td rowspan="1" colspan="1">18540</td>
<td rowspan="1" colspan="1">33</td>
<td rowspan="1" colspan="1">30</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">implicit acceleration<br
style="clear:none;" />
no whitespace needed</td>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">7 -3</td>
<td rowspan="1" colspan="1">1251</td>
<td rowspan="1" colspan="1">18567</td>
<td rowspan="1" colspan="1">40</td>
<td rowspan="1" colspan="1">27</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">optional whitespace</td>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">6 2</td>
<td rowspan="1" colspan="1">1297</td>
<td rowspan="1" colspan="1">18596</td>
<td rowspan="1" colspan="1">46</td>
<td rowspan="1" colspan="1">29</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">whitespace required</td>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">6 8</td>
<td rowspan="1" colspan="1">1349</td>
<td rowspan="1" colspan="1">18633</td>
<td rowspan="1" colspan="1">52</td>
<td rowspan="1" colspan="1">37</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">&nbsp;</td>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">3 6 T</td>
<td rowspan="1" colspan="1">1404</td>
<td rowspan="1" colspan="1">18676</td>
<td rowspan="1" colspan="1">55</td>
<td rowspan="1" colspan="1">43</td>
<td rowspan="1" colspan="1">T</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">an optional value</td>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">2 4*T</td>
<td rowspan="1" colspan="1">1461</td>
<td rowspan="1" colspan="1">18723</td>
<td rowspan="1" colspan="1">57</td>
<td rowspan="1" colspan="1">47</td>
<td rowspan="1" colspan="1">T</td>
<td rowspan="1" colspan="1">T</td>
<td rowspan="1" colspan="1">wildcard</td>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">3 6</td>
<td rowspan="1" colspan="1">1521</td>
<td rowspan="1" colspan="1">18776</td>
<td rowspan="1" colspan="1">60</td>
<td rowspan="1" colspan="1">53</td>
<td rowspan="1" colspan="1">T</td>
<td rowspan="1" colspan="1">T</td>
<td rowspan="1" colspan="1">optional keep last</td>
</tr>

<tr>
<td class="trace" rowspan="1" colspan="1">3-6 F F</td>
<td rowspan="1" colspan="1">1584</td>
<td rowspan="1" colspan="1">18823</td>
<td rowspan="1" colspan="1">63</td>
<td rowspan="1" colspan="1">47</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">F</td>
<td rowspan="1" colspan="1">optionals</td>
</tr>
</tbody>
</table>

<p>An ink markup generator might also include additional whitespace
formatting for clarity. The following trace specification is
identical in meaning to the more compact version shown above:</p>

<div>
<pre class="ex" xml:space="preserve">
&lt;trace xml:id="id4525abc"&gt;
   1125 18432,
   '23 '43,
   "7 "-8,
   3 -5,
   7 -3,
   6 2,
   6 8,
   3 6 T,
   2 4 * T,
   3 6,
   3 -6 F F
&lt;/trace&gt;
</pre>
</div>

<div>
<p>Note: see Appendix B <a href="#guidelines">Implementation
Guidelines</a> for information about reducing file or stream
size.</p>
</div>

<div>
<h3 id="traceCollections">3.3 Trace Collections</h3>

<p>InkML provides mechanisms to gather and combine traces into
structured collections via the <code>&lt;traceGroup&gt;</code> and
<code>&lt;traceView&gt;</code> elements. These allow multiple
traces or groups to be treated as single units for the purposes of
referencing, attaching context information, semantic labeling, or
application-specific needs. The <code>&lt;traceGroup&gt;</code>
element gathers <code>&lt;trace&gt;</code> other
<code>&lt;traceGroup&gt;</code> or <code>&lt;traceView&gt;</code>
elements into a unit. The <code>&lt;traceView&gt;</code> element
refers to existing <code>&lt;trace&gt;</code>,
<code>&lt;traceGroup&gt;</code> or other
<code>&lt;traceView&gt;</code> elements to provide alternative
views or organization on the ink. For example, a diagramming
application may record a stream of fixed-length
<code>&lt;trace&gt;</code> packages, organized as continuations,
and use <code>&lt;traceGroup&gt;</code> elements containing
<code>&lt;traceView&gt;</code> elements to record the logical
structure of the diagram.</p>
</div>

<h4 id="traceGroup">3.3.1 <code>&lt;traceGroup&gt;</code>
element</h4>

<h6><a id="traceGroupAttrs"
name="traceGroupAttrs">Attributes:</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The identifier for this traceGroup.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>contextRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">The context associated with this
traceGroup.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em>
"<code><strong>#DefaultContext</strong></code>," unless this
<strong><span class="style1">&lt;traceGroup&gt;</span></strong> is
contained within another <strong><span
class="style1">&lt;traceGroup&gt;</span></strong>, then inherit
from the containing <strong><span
class="style1">&lt;traceGroup&gt;.</span></strong><br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>brushRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">The brush associated with this <strong><span
class="style1">&lt;traceGroup&gt;</span></strong>.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> Inherited from context<br
style="clear:none;" />
</div>
</div>

<h6><a name="traceGroupContents"
id="traceGroupContents">Contents:</a></h6>

<div class="contents">
<dl>
<dt><samp>( <a href="#trace">trace</a> | <a
href="#traceGroup">traceGroup</a> | <a
href="#traceViewElement">traceView</a>| <a
href="#annotationElement">annotation</a> | <a
href="#annotationXMLElement">annotationXML</a> )*</samp></dt>
</dl>
</div>

<p>The <code>&lt;traceGroup&gt;</code> element is used to group
successive traces which share common characteristics, such as the
same <code>&lt;traceFormat&gt;</code>. The brush and context
sections describe other contextual values that can be specified for
a <code>&lt;traceGroup&gt;</code>. In the following example the two
traces enclosed in the <code>&lt;traceGroup&gt;</code> share the
same brush (see the <a href="#brushes">Brushes</a> section for a
description of brushes).</p>

<pre class="ex" xml:space="preserve">
&lt;traceGroup brushRef="#penA"&gt;
    &lt;trace&gt;...&lt;/trace&gt;
    &lt;trace&gt;...&lt;/trace&gt;
&lt;/traceGroup&gt;
</pre>

<p>The <code>&lt;traceGroup&gt;</code> element may be used for
various purposes, such as to group traces according to their
properties at the time of capture or according to computed
recognition results. The element may be nested, and it may be used
as a generic grouping mechanism, e.g. for the semantic labeling of
traces.</p>

<p>Trace groups are the primary mechanism for assigning
<code>&lt;context&gt;</code> to traces in archival ink markup. For
additional details about this usage, see the <a href="#Archival"
shape="rect">Archival Applications</a> section.</p>

<div>
<h4 id="traceViewElement">3.3.2 <code>&lt;traceView&gt;</code>
element</h4>

<h6><a id="traceViewAttrs"
name="traceViewAttrs">Attributes:</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The identifier for this traceView.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>traceDataRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">A URI reference to a
<code>&lt;trace&gt;</code>, <code>&lt;traceGroup&gt;</code> or
<code>&lt;traceView&gt;</code> element.<br style="clear:none;" />
<em>Required:</em> yes, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
 <b>from</b> = xsd:integer[ ':' xsd:integer ]*<br
style="clear:none;" />
<div class="attrdef">The index of the first item (point, trace or
group) in the trace or trace group that this
<code>&lt;traceView&gt;</code> element references.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> the index of the first
referenced point (see prose)</div>

<br style="clear:none;" />
<b>to</b> = xsd:integer[ ':' xsd:integer ]*<br
style="clear:none;" />
 

<div class="attrdef">The index of the last item (point, trace or
group) in the trace or trace group that this
<code>&lt;traceView&gt;</code> element references.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> the index of the last
referenced point (see prose)</div>
</div>

<h6><a name="traceViewContents"
id="traceViewContents">Contents:</a></h6>

<div class="contents">
<dl>
<dt><samp>EMPTY</samp></dt>
</dl>
</div>

<p>The <code>&lt;traceView&gt;</code> element is used to include
traces by reference from the current document or other documents. A
common use is to group a collection of
<code>&lt;traceView&gt;</code> elements in a
<code>&lt;traceGroup&gt;</code> to provide annotations.</p>

<p>Together, <strong>traceDataRef</strong>, <strong>from</strong>
and <strong>to</strong> refer to another element and select part of
it. A <strong>traceDataRef</strong> attribute may refer to a
<code>&lt;trace&gt;</code>, a <code>&lt;traceGroup&gt;</code> or
another <code>&lt;traceView&gt;</code>.</p>

<p>A missing <strong>from</strong> attribute is equivalent to
selecting the first point in the (recursively) first child of the
referenced element. A missing <strong>to</strong> attribute is
equivalent to selecting the last point in the (recursively) last
child of the referenced element. With these defaults, the
<code>&lt;traceView&gt;</code> selects the portion of the
referenced element from the first point to the last point,
inclusive. If neither a <strong>to</strong> nor
<strong>from</strong> attribute is given, this implies the entire
referenced element is selected.</p>

<p>Any value of a <strong>from</strong> or <strong>to</strong>
attribute is a colon-separated list of integers, whose meaning is
defined as follows: An empty list of integers selects the entire
referenced object (point, <code>&lt;trace&gt;</code>,
<code>&lt;traceGroup&gt;</code> or <code>&lt;traceView&gt;</code>).
If the list is non-empty, then its first element is taken as a
1-based index into the referenced object, and the remaining list is
used to select within the object. It is an error to try to select
within a single point. The rationale to allow selection using this
colon-separated-integer indexing scheme is that the desired ink
selections in a referenced document might not have id attributes on
the desired nodes.</p>

<p>If the referenced object is a <code>&lt;traceView&gt;</code>,
then the indexing is relative to the tree selected by the
<code>&lt;traceView&gt;</code>, not relative to the original
object.</p>

<p>If a <code>&lt;traceGroup&gt;</code> contains continuation
traces, they are counted independently.</p>

<h6><a name="traceViewExamples"
id="traceViewExamples">Examples:</a></h6>

<p>Suppose we have the following ink element:</p>

<pre class="ex" xml:space="preserve">
&lt;ink xmlns=&quot;http://www.w3.org/2003/InkML&quot;&gt;
   &lt;trace xml:id="L1"&gt;911 912, 921 922, 931 932&lt;/trace&gt;

   &lt;traceGroup xml:id="L2"&gt;
      &lt;trace&gt;111 112, 121 122&lt;/trace&gt;
      &lt;traceGroup xml:id="L2-Larry"&gt;
         &lt;trace&gt;221 212, 221 222&lt;/trace&gt;
         &lt;trace&gt;311 312, 321 322&lt;/trace&gt;
      &lt;/traceGroup&gt;
      &lt;trace&gt;411 412, 421 422&lt;/trace&gt;
      &lt;traceGroup&gt;
         &lt;traceGroup&gt;
            &lt;trace xml:id="L2-Moe"&gt;521 512, 521 522&lt;/trace&gt;
            &lt;trace&gt;611 612, 621 622&lt;/trace&gt;
         &lt;/traceGroup&gt;
      &lt;/traceGroup&gt;
      &lt;trace&gt;711 712, 721 722&lt;/trace&gt;
   &lt;/traceGroup&gt;

   &lt;traceGroup xml:id="L3"&gt;
      &lt;traceView traceDataRef="#L1" from="2"/&gt;
      &lt;traceView traceDataRef="#L2" from="2" to="4:1:1"/&gt;
   &lt;/traceGroup&gt;

   &lt;traceView xml:id="L4" traceDataRef="#L3" from="1:2" to="2:1:2:1"/&gt;
&lt;/ink&gt;
</pre>

<p>With <strong>traceDataRef</strong> "#L1", the <b>from</b> index
"2" refers to the point (921, 922). With
<strong>traceDataRef</strong> "#L2", the <b>from</b> index "2"
refers to the <code>&lt;traceGroup&gt;</code> with id "L2-Larry",
the index "4:1:1" refers to the element with id "L2-Moe", the index
"4:1:1:2" refers to the point (521, 522), and the index "4:1:1:2:1"
is illegal.</p>

<p>The <code>&lt;traceGroup&gt;</code> with id "L3" selects the
following structure</p>

<pre class="ex" xml:space="preserve">
&lt;traceGroup&gt;
   &lt;trace&gt;921 922, 931 932&lt;/trace&gt;

   &lt;traceGroup&gt;
      &lt;traceGroup&gt;
         &lt;trace&gt;221 212, 221 222&lt;/trace&gt;
         &lt;trace&gt;311 312, 321 322&lt;/trace&gt;
      &lt;/traceGroup&gt;
      &lt;trace&gt;411 412, 421 422&lt;/trace&gt;
      &lt;traceGroup&gt;
         &lt;traceGroup&gt;
            &lt;trace&gt;521 512, 521 522&lt;/trace&gt;
         &lt;/traceGroup&gt;
      &lt;/traceGroup&gt;
   &lt;/traceGroup&gt;

&lt;/traceGroup&gt;
</pre>

and the <code>&lt;traceView&gt;</code> with id "L4" selects 

<pre class="ex" xml:space="preserve">
&lt;traceGroup&gt;
   &lt;trace&gt;931 932&lt;/trace&gt;
   &lt;traceGroup&gt;
      &lt;traceGroup&gt;
         &lt;trace&gt;221 212, 221 222&lt;/trace&gt;
         &lt;trace&gt;311 312&lt;/trace&gt;
      &lt;/traceGroup&gt;
   &lt;/traceGroup&gt;
&lt;/traceGroup&gt;
</pre>
</div>

<hr />
<h2 id="ContextIntro">4 Contexts</h2>

<p>The context in which ink is written and recorded comprises many
details. Examples include the size of the surface the traces were
recorded on, the pen tip used or the accuracy of the pressure
measurements. This contextual information needs to be captured by
InkML in order to fully characterize the recorded ink data. This
section defines markup that provides a way to describe this
information, including the <a
href="#contextElement"><code>&lt;context&gt;</code></a> element
which provides a means to associate a defined context with trace
data.</p>

<div>
<p>The format of trace data -- both in the channels available and
their particulars -- may vary from device to device, including from
stylus to stylus with the same tablet. Therefore, the
<code>&lt;context&gt;</code> element may refer to or contain a
specific <a
href="#traceFormat"><code>&lt;traceFormat&gt;</code></a> and <a
href="#inkSourceElement"><code>&lt;inkSource&gt;</code></a> element
for the device.</p>

<p>As the ink is generated, there may be various context-dependent
attributes associated with the pen. For this, a <a
href="#brushElement"><code>&lt;brush&gt;</code></a> element may be
used to record the attributes of the pen during the capture of the
digital ink.</p>

<p>The start times of traces are often given relative to a
specified point in time. A context may provide a <a
href="#timestamp"><code>&lt;timestamp&gt;</code></a> element for
this.</p>

<p>For applications that require the sharing of ink, contexts may
relate their ink to a shared canvas, given by a <a
href="#canvasElement"><code>&lt;canvas&gt;</code></a> element. The
trace format of the ink source is related to the trace format of a
shared canvas by means of a <a
href="#canvasTransformElement"><code>&lt;canvasTransform&gt;</code></a>
element.</p>
</div>

<h3 id="contextElement">4.1 The <code>&lt;context&gt;</code>
element</h3>

<p>This section describes the <code>&lt;context&gt;</code> element
and its attributes. The context element both provides access to a
useful shared context (canvas) and serves as a convenient
agglomeration of contextual attributes. It is used by the <a
href="#traceGroup"><code>&lt;traceGroup&gt;</code></a> and <a
href="#traceViewElement"><code>&lt;traceView&gt;</code></a>
elements to define the complete shared context of a group of traces
or may be referred to as part of a context change in streaming
mode. In either mode, individual attributes may be overridden at
time of use. Additionally, individual traces may refer to a
previously defined context (again optionally overriding its
attributes) to describe a context change that persists only for the
duration of that trace.</p>

<p>Although the use of the <code>&lt;context&gt;</code> element and
attributes is strongly encouraged, default interpretations are
provided so that they are not required in an InkML file if all
trace data is recorded in the same virtual coordinate system, and
its relationship to device coordinates is either not needed or
unknown.</p>

<h6><a name="contextAttrs" id="contextAttrs">Attributes:</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The unique identifier for this context.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>contextRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">A previously defined context upon which this
context is to be based.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
 

<div><b>canvasRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">The URI of a <b>canvas</b> element for this
context.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em>
"<strong>#DefaultCanvas</strong>", or inherited from
<b>contextRef</b><br style="clear:none;" />
</div>
</div>

<br style="clear:none;" />
<b>canvasTransformRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">This is a reference to a mapping from the
coordinate system of the trace to the coordinate system of the
canvas.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> identity, or inherited
from <b>contextRef</b><br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>traceFormatRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">A reference to the traceFormat for this
context.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em>
"<strong>#DefaultTraceFormat</strong>", or inherited from
<b>contextRef</b><br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>inkSourceRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">A reference to the inkSource for this
context.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> default capture device, or
inherited from <b>contextRef</b><br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>brushRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">A reference to the brush for this context.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> &quot;<strong>#DefaultBrush</strong>&quot;, or inherited from
<b>contextRef</b><br style="clear:none;" />
</div>

<div><br style="clear:none;" />
<b>timestampRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">A reference to the timestamp for this
context.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none, or inherited from
<b>contextRef</b><br style="clear:none;" />
</div>
</div>
</div>

<h6><a name="ContextContents"
id="ContextContents">Contents:</a></h6>

<div class="nlcontents">
<div><samp><a href="#canvas">canvas</a>?</samp><br
style="clear:none;" />
<samp><a
href="#canvasTransformElement">canvasTransform</a>?</samp><br
style="clear:none;" />
<samp><a href="#traceFormat">traceFormat</a>?</samp><br
style="clear:none;" />
<samp><a href="#inkSource">inkSource</a>?</samp><br
style="clear:none;" />
<samp><a href="#brushElement">brush</a>?</samp><br
style="clear:none;" />
<samp><a href="#timestamp">timestamp</a>?</samp></div>
</div>

<p>The <code>&lt;context&gt;</code> element consolidates all
salient characteristics of one or more ink traces. It may be
specified by declaring all non-default attributes, or by referring
to a previously defined context and overriding specific attributes.
The element is found either in the <a
href="#definitionsElement"><code>&lt;definitions&gt;</code></a>
element or as a child of the <a
href="#inkElement"><code>&lt;ink&gt;</code></a> element in <a
href="#Streaming">Streaming InkML</a></p>

<div>
<p>Each constituent part of a context may be provided either by a
referencing attribute or as a child element. If both are given,
then the child element is used. Thus it is possible to have either
a <b>traceFormatRef</b> attribute or a
<code>&lt;traceFormat&gt;</code> child element. If both are given,
then the <code>&lt;traceFormat&gt;</code> child is used and the
attribute is ignored.</p>
</div>

<h3 id="inkSource">4.2 Ink Sources</h3>

<div>
<p>One of the important requirements for the ink format is to allow
accurate recording of metadata about the format and quality of ink
as it is reported by the source. The source is typically hardware
as embodied in a digitizer device, but may in general be any
"virtual" source of ink, such as a software application that is
tracking the trajectory of an object. This is accomplished in the
<code>&lt;inkSource&gt;</code> element, which supports capture of
basic information about the make and model of the device and the
ink channels captured, as well as very detailed information about a
number of source characteristics.</p>

<p>Some of these characteristics are already commonly used in
digitizer specifications, while others are somewhat more esoteric,
but nonetheless potentially very useful. In general, these source
characteristics describe signal fidelity, allow understanding of
the quality of the data, and impose some limits on how the data can
be used. They are not intended to be used for repair of bad data
from the source.</p>
</div>

<h4 id="inkSourceElement">4.2.1 <code>&lt;inkSource&gt;</code>
element</h4>

<h6><a id="inkSourceAttrs"
name="inkSourceAttrs">Attributes:</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The unique identifier for this
<code>&lt;inkSource&gt;</code> element.<br style="clear:none;" />
<em>Required:</em> yes<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>manufacturer</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">String identifying the digitizer device
manufacturer.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>model</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">String identifying the digitizer model.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>

<br style="clear:none;" />
 

<div><b>serialNo</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">Unique manufacturer (or other) serial number
for the device.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>specificationRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">URI of a page providing detailed or additional
specifications.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>description</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">String describing the ink source, especially
one implemented in software.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>
</div>
</div>

<h6><a name="inkSourceContents"
id="inkSourceContents">Contents:</a></h6>

<div class="contents">
<div>
<dl>
<dt><samp><a href="#traceFormat">traceFormat</a></samp></dt>

<dt><samp><a href="#sampleRate">sampleRate</a>?</samp></dt>

<dt><samp><a href="#latency">latency</a>?</samp></dt>

<dt><samp><a href="#activeArea">activeArea</a>?</samp></dt>

<dt><samp><a href="#srcProperty">sourceProperty</a>*</samp></dt>

<dt><samp><a
href="#channelProperties">channelProperties</a>?</samp></dt>
</dl>
</div>
</div>

<h6><a name="inkSourceExamples"
id="inkSourceExamples">Examples:</a></h6>

<div>
<pre class="ex" xml:space="preserve">
&lt;inkSource xml:id="mytablet"
   manufacturer="Example.com"
   model="ExampleTab 2000 USB"
   specificationRef="http://www.example.com/products/exampletab/2000usb.html"&gt;

   &lt;traceFormat&gt;
      &lt;channel name=&quot;X&quot; ... /&gt;
      &lt;channel name=&quot;Y&quot; ... /&gt;
      &lt;channel name=&quot;F&quot; ... /&gt;
   &lt;/traceFormat&gt;
   &lt;sampleRate uniform="true" value="200"/&gt;
   &lt;latency value=&quot;50&quot;/&gt;
   &lt;activeArea size="A6" height="100" width="130" units="mm"/&gt;
   &lt;sourceProperty name="weight" value="100" units="g"/&gt;

   &lt;channelProperties&gt;
      &lt;channelProperty channel="X" name=&quot;resolution&quot; value="5000" units="1/in"/&gt;
      &lt;channelProperty channel="Y" name=&quot;resolution&quot; value="5000" units="1/in"/&gt;
      &lt;channelProperty channel="Y" name="peakRate"   value="50"   units="cm/s"/&gt;
      &lt;channelProperty channel="F" name=&quot;resolution&quot; value="1024" units="dev"/&gt;
   &lt;/channelProperties&gt;

&lt;/inkSource&gt;
</pre>
</div>

<p>The <code>&lt;inkSource&gt;</code> element will allow
specification of:</p>

<div>
<ul>
<li>Manufacturer, model and serial number (of a hardware
device)</li>

<li>Text description of source, and reference (URI) to detailed or
additional information</li>

<li>Trace format - regular and intermittent channels reported by
source</li>

<li>Sampling rate, latency and active area</li>

<li>Additional properties of the device in the form of
name-value-units triples</li>

<li>Properties of individual channels</li>
</ul>
</div>

<div><!-- sampleRate -->
<h4 id="sampleRate">4.2.2 <code>&lt;sampleRate&gt;</code>
element</h4>

<p>The <code>&lt;sampleRate&gt;</code> element captures the rate at
which ink samples are reported by the ink source. Many devices
report at a uniform rate; other devices may skip duplicate points
or report samples only when there is a change in direction. This is
indicated using the <code>uniform</code> attribute, which must be
designated "false" (non-uniform) if <b>any</b> pen-down points are
skipped or if the sampling is irregular.</p>

<p>A time channel should be used to get time information when the
sampling rate is not uniform. When the sampling rate is not
uniform, the <strong><span class="style1">value</span></strong>
attribute of the <code>&lt;sampleRate&gt;</code> element specifies
the maximum sampling rate.</p>

<h6><a name="sampleRateAttrs"
id="sampleRateAttrs">Attributes:</a></h6>

<div class="attr"><b>uniform</b> = xsd:boolean<br
style="clear:none;" />
 

<div class="attrdef">Sampling uniformity: Is the sample rate
consistent, with no dropped points?<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> true<br
style="clear:none;" />
</div>

<b><br />
 value</b> = xsd:decimal<br style="clear:none;" />
 

<div class="attrdef">The basic sample rate in samples/second.<br
style="clear:none;" />
<em>Required:</em> yes<br style="clear:none;" />
</div>
</div>

<h6><a name="sampleRateContents"
id="sampleRateContents">Contents:</a></h6>

<div class="nlcontents"><samp>EMPTY</samp></div>

<h6><a name="sampleRateExamples"
id="sampleRateExamples">Examples:</a></h6>

<pre class="ex" xml:space="preserve">
&lt;sampleRate uniform="true" value="200"/&gt;
</pre>

<!-- latency -->
<h4 id="latency">4.2.3 <code>&lt;latency&gt;</code> element</h4>

<p>The <code>&lt;latency&gt;</code> element captures the basic
device latency that applies to all channels, in milliseconds, from
physical action to the API time stamp. This is specified at the
device level, since all channels often are subject to a common
processing and communications latency.</p>

<h6><a name="latencyAttrs" id="latencyAttrs">Attributes:</a></h6>

<div class="attr"><b>value</b> = xsd:decimal<br
style="clear:none;" />
 

<div class="attrdef">Latency in milliseconds.<br
style="clear:none;" />
<em>Required:</em> yes<br style="clear:none;" />
</div>
</div>

<h6><a name="latencyContents"
id="latencyContents">Contents:</a></h6>

<div class="nlcontents"><samp>EMPTY</samp></div>

<h6><a name="latencyExamples"
id="latencyExamples">Examples:</a></h6>

<pre class="ex" xml:space="preserve">
&lt;latency value="50"/&gt;
</pre>

<!-- activeArea -->
<h4 id="activeArea">4.2.4 <code>&lt;activeArea&gt;</code>
element</h4>

<p>Many ink capture devices have a notion of active area, which
describes the two-dimensional area within which the device is
capable of sensing the pen position. This element allows the
specification of a rectangular active area.</p>

<h6><a name="activeAreaAttrs"
id="activeAreaAttrs">Attributes:</a></h6>

<div class="attr"><b>size</b> = xsd:string

<div class="attrdef">The active area, described using an
international ISO paper sizes standard such as ISO216.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>height</b> = xsd:decimal<br style="clear:none;" />
 

<div class="attrdef">Height of the active area (corresponding to
the Y channel).<br style="clear:none;" />
<em>Required:</em> yes, <em>Default:</em> unknown<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>width</b> = xsd:decimal<br style="clear:none;" />
 

<div class="attrdef">Width of the active area (corresponding to the
X channel).<br style="clear:none;" />
<em>Required:</em> yes, <em>Default:</em> unknown<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>units</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">Units used for width and height.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>
</div>

<h6><a name="activeAreaContents"
id="activeAreaContents">Contents:</a></h6>

<div class="nlcontents"><samp>EMPTY</samp></div>

<h6><a name="activeAreaExamples"
id="activeAreaExamples">Examples:</a></h6>

<pre class="ex" xml:space="preserve">
&lt;activeArea size="A6" height="100" width="130" units="mm"/&gt;
</pre>

<!-- srcProperty -->
<h4 id="srcProperty">4.2.5 <code>&lt;sourceProperty&gt;</code>
element</h4>

<p>The <code>&lt;sourceProperty&gt;</code> element provides a
simple mechanism for the capture of additional <b>numeric</b> or
<strong>string</strong> properties of the ink source as a
whole.</p>

<h6><a name="srcPropertyAttrs"
id="srcPropertyAttrs">Attributes:</a></h6>

<div class="attr"><b>name</b> = xsd:string<br
style="clear:none;" />
 

<div class="attrdef">Name of the property of device or ink
source.<br style="clear:none;" />
<em>Required:</em> yes<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>value</b> = xsd:decimal | xsd:string<br style="clear:none;" />
 

<div class="attrdef">Value of named property.<br
style="clear:none;" />
<em>Required:</em> yes<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>units</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">Units used for value.&nbsp; If present, the
value must be a numeric property.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>
</div>

<h6><a name="srcPropertyContents"
id="srcPropertyContents">Contents:</a></h6>

<div class="nlcontents"><samp>EMPTY</samp></div>

<h6><a name="srcPropertyExamples"
id="srcPropertyExamples">Examples:</a></h6>

<pre class="ex" xml:space="preserve">
&lt;sourceProperty name="weight" value="100" units="g"/&gt;
</pre>

<!-- channelProperties -->
<h4 id="channelProperties">4.2.6
<code>&lt;channelProperties&gt;</code> element</h4>

<p>The <code>&lt;channelProperties&gt;</code> element is meant for
describing properties of specific channels reported by the ink
source. Properties such as range and resolution may be specified
using corresponding elements. For more esoteric properties (from a
lay user's standpoint) the generic <a
href="#channelProperty"><strong><span
class="style1">&lt;</span></strong><strong><span
class="style1">channelProperty&gt;</span></strong></a> element may
be used.</p>

<h6><a name="channelPropertiesAttrs" id="channelPropertiesAttrs"
shape="rect">Attributes:</a></h6>

<div class="attr">None</div>

<h6><a name="channelPropertiesContents"
id="channelPropertiesContents">Contents:</a></h6>

<div class="contents">
<dl>
<dt><samp><a
href="#channelProperty">channelProperty</a>*</samp></dt>
</dl>
</div>

<h6><a name="channelPropertiesExamples"
id="channelPropertiesExamples">Examples:</a></h6>

<pre class="ex" xml:space="preserve">
&lt;channelProperties&gt;
   &lt;channelProperty channel="X" name="resolution" value="5000" units="1/in"/&gt;
   &lt;channelProperty channel="Y" name="resolution" value="5000" units="1/in"/&gt;
   &lt;channelProperty channel="Y" name="peakRate"   value="50"   units="cm/s"&gt;
   &lt;channelProperty channel="F" name="resolution" value="1024" units="dev"/&gt;
&lt;/channelProperties&gt;
</pre>

<h4 id="channelProperty">4.2.7 <code>&lt;channelProperty&gt;</code>
element</h4>

<p>The <code>&lt;channelProperty&gt;</code> element provides a
simple mechanism for the capture of additional <b>numeric</b> or
<strong>string</strong> properties of specific channels when known
and appropriate. The following channel property names, with their
specified meanings, are reserved. Other properties may be defined
by the user.</p>

<table border="1" cellspacing="0" cellpadding="3" width="80%"
class="channelproperties" summary="">
<tbody>
<tr>
<th rowspan="1" colspan="1">Property name</th>
<th rowspan="1" colspan="1">Interpretation</th>
</tr>

<tr>
<td rowspan="1" colspan="1">threshold</td>
<td rowspan="1" colspan="1">Threshold - e.g. for a binary channel,
the threshold force at which the tip switch is activated</td>
</tr>

<tr>
<td rowspan="1" colspan="1">resolution</td>
<td rowspan="1" colspan="1">Resolution - the scale of the values
recorded. This may be expressed as fractions of a unit, e.g. 1/1000
<em>in</em> (inches), 0.1 <em>mm</em>, 1 <em>deg</em> (degrees). It
may also be expressed, more popularly, in inverse units, e.g.
"1000 points per inch" would be given as 1000 in units
<em>1/in</em>.</td>
</tr>

<tr>
<td rowspan="1" colspan="1">quantization</td>
<td rowspan="1" colspan="1">Quantization - the unit of smallest
change in the reported values. If the value is reported as integer,
this is assumed to be the same as the resolution. Note that if
decimal values are recorded for resolution, the quantization of the
data may be smaller than the "resolution".</td>
</tr>

<tr>
<td rowspan="1" colspan="1">noise</td>
<td rowspan="1" colspan="1">Noise - the RMS value of noise
typically observed on the channel. This is distinct from accuracy!
It is an indication of the difference observed in the data from the
device when the same path is traced out multiple times (e.g. by a
robot).</td>
</tr>

<tr>
<td rowspan="1" colspan="1">accuracy</td>
<td rowspan="1" colspan="1">Accuracy - the typical accuracy of the
data on the channel (e.g. "0.5 mm", "10 degrees" or "0.1 Newton")
This is the typical difference between the reported position and
the actual position of the pen tip (or tilt ...)</td>
</tr>

<tr> 
<td rowspan="1" colspan="1">crossCoupling</td> 
<td rowspan="1" colspan="1">Cross-coupling - the distortion in the
data from one channel due to changes in another channel. For
example, the X and Y coordinates in an electromagnetic digitizer
are influenced by the tilt of the pen. This would be specified by
dX/dOTx = ... or max delta X vs. OTx = ... If the influencing
channels are also recorded, and the cross-couplings are accurately
specified, it may be possible to compensate for the cross-coupling
by subtracting the influence, at the expense of higher noise. The
cross-coupling is always expressed in the units of the two
channels, e.g. if X mm and OTx is in degrees, then cross-coupling
is in mm/deg.</td> 
</tr> 

<tr>
<td rowspan="1" colspan="1">skew</td>
<td rowspan="1" colspan="1">Skew - the temporal skew of this
channel relative to the basic device latency, if any. For example,
some devices actually sample X and Y at different points in time,
so one might have a skew of -5 millisecond, and the other +5
millisecond.</td>
</tr>

<tr>
<td rowspan="1" colspan="1">minBandwidth</td>
<td rowspan="1" colspan="1">Minimum bandwidth (in Hz) - the minimum
bandwidth of the channel, in Hz (not samples/second), i.e., the
frequency of input motion up to which the signal is accurate to
within 3dB.</td>
</tr>

<tr>
<td rowspan="1" colspan="1">peakRate</td>
<td rowspan="1" colspan="1">Peak rate - the maximum speed at which
the device can accurately track motion</td>
</tr>

<tr>
<td rowspan="1" colspan="1">distortion</td>
<td rowspan="1" colspan="1">Dynamic distortion, e.g., how velocity
affects position accuracy. This is expressed in inverse seconds,
e.g. 0.01 mm / mm / s. This kind of distortion is often cross
channel, but this specification only allows a generic,
channel-specific value.</td>
</tr>
</tbody>
</table>

<h6><a name="channelPropertyAttrs"
id="channelPropertyAttrs">Attributes:</a></h6>

<div class="attr"><b>channel</b> = xsd:string<br
style="clear:none;" />
 

<div class="attrdef">The name of the channel. Must be one among
those defined by the ink source's trace format.<br
style="clear:none;" />
<em>Required:</em> yes<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>name</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">Name of the property of device or ink
source.<br style="clear:none;" />
<em>Required:</em> yes<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>value</b> = xsd:decimal | xsd:string<br style="clear:none;" />
 

<div class="attrdef">Value of named property.<br
style="clear:none;" />
<em>Required:</em> yes<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>units</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">Units used for value.&nbsp; If present, the
value must be a numeric property.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>
</div>

<h6><a name="channelPropertyContents" id="channelPropertyContents"
shape="rect">Contents:</a></h6>

<div class="nlcontents"><samp>EMPTY</samp></div>

<h6><a name="channelPropertyExamples" id="channelPropertyExamples"
shape="rect">Examples:</a></h6>

<pre class="ex" xml:space="preserve">
&lt;channelProperty channel="F" name="threshold" value="0.1" units="N"/&gt;
&lt;channelProperty channel="X" name="quantization" value="0.01" units="mm"/&gt;
</pre>
</div>

<!-- Rest of former captureDevice deleted -->
<h3 id="brushes">4.3 Brushes</h3>

<p>Along with trace data, it is often necessary to record certain
attributes of the pen during ink capture. For example, in a note
taking application, it is important to be able to distinguish
between traces captured while writing as opposed to those which
represent erasures. Because these attributes will often be
application specific, this specification does not attempt to
enumerate all the brush attributes which can be associated with a
trace. It provides a syntax for specifying brush property names,
units and values.&nbsp; Some common brush property names are
defined by the specification.&nbsp; But applications may define
other named properties not explicitly named in the specification
since it is possible to imagine attributes which are described
using complex functions parameterized by time, pen-tip force, or
other factors. The specification allows for capturing the fact that
a given trace was recorded in a particular brush context, leaving
the details of precisely defining specific attributes of that
context (such as complex brush geometries and colors in non-RGB
color spaces) to a higher-level, application specific layer.</p>

<p>Depending on the application, brush attributes may change
frequently. Accordingly, there should be a concise mechanism to
assign the attributes for an individual trace. On the other hand,
it is likely that many traces will be recorded using the same sets
of attributes; therefore, it should not be necessary to explicitly
state the attributes of every trace (again, for reasons of
conciseness). Furthermore, it should be possible to define entities
which encompass these attribute sets and refer to them rather than
listing the entire set each time. Since many attribute sets will be
similar to one another, it should also be possible to inherit
attributes from a prior set while overriding some of the attributes
in the set.</p>

<h4 id="brushElement">4.3.1 <code>&lt;brush&gt;</code> element</h4>

<h6><a name="brushAttrs" id="brushAttrs">Attributes:</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The unique identifier for this brush.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none.<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>brushRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">A brush whose attributes are inherited by this
brush.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> &quot;<strong>#DefaultBrush</strong>&quot;<br
style="clear:none;" />
</div>
</div>

<h6><a name="brushContents" id="brushContents">Contents:</a></h6>

<div class="nlcontents"><samp>( <a
href="#brushPropertyElement">brushProperty</a> | <a
href="#annotationElement" shape="rect">annotation</a> | <a
href="#annotationXMLElement" shape="rect">annotationXML</a>
)*</samp></div>

<p>In the ink markup, brush attributes are described by the
<code>&lt;brush&gt;</code> element. This element allows for the
definition of reusable sets of brush attributes which may be
associated with traces. For reference purposes, a brush specifies
an identifier which can be used to refer to the brush. A brush can
inherit the attributes of another <code>&lt;brush&gt;</code>
element by including a brushRef attribute which contains the id of
the referenced brush. The brush attributes are stored in
<code>&lt;brushProperty&gt;</code> child elements. Brushes may be
used to convey information about how a stroke is to be rendered or
simply to distinguish between different types of traces (e.g. an
eraser vs. a pen, different writers). In this later case, all that
matters is that brushes are distinct so no brush properties are
necessary.</p>

<p>Brush attributes are associated with traces using the brushRef
attribute. When it appears as an attribute of an individual
<code>&lt;trace&gt;</code>, the brushRef specifies the brush
attributes for that trace. When it appears as an attribute of a
<code>&lt;traceGroup&gt;</code> element, the brushRef specifies the
common brush attributes for all traces enclosed in the
<code>&lt;traceGroup&gt;</code>. Within the
<code>&lt;traceGroup&gt;</code>, an individual trace may still
override the traceGroup's brush attributes using a brushRef
attribute.</p>

<p>Brush attributes can also be associated with a context by
including the brushRef attribute on a <code>&lt;context&gt;</code>
element. Any traces which reference the context using a contextRef
attribute are assigned the brush attributes defined by the context.
If a trace includes both brushRef and contextRef attributes, the
brushRef overrides any brush attributes given by the
contextRef.</p>
<p>The default brush may be explicitly specified using the URI
"<code><strong>#DefaultBrush</strong></code>".&nbsp; The id &quot;<code><strong>DefaultBrush</strong></code>&quot; 
is therefore reserved and may not be used as the id of a user defined <code>&lt;brush&gt;</code> 
element.&nbsp; The default brush is identical to a user defined brush that has 
not explicit
<code>&lt;brushProperty&gt;</code> child elements.</p>

<p>In streaming ink markup, brushes are assigned to a trace
according to the current brush, which can be set using the
<code>&lt;context&gt;</code> and <code>&lt;brush&gt;</code>
elements. See section <a href="#Streaming">Streaming
Applications</a> for a detailed description of streaming mode.</p>

<h4 id="brushPropertyElement">4.3.2
<code>&lt;brushProperty&gt;</code> element</h4>

<p>The <code>&lt;brushProperty&gt;</code> element provides a
mechanism for the storage of named properties of brushes. The
following brush property names, with their specified meanings, are
reserved. Other properties may be defined by the user.</p>

<table border="1" cellspacing="0" cellpadding="3" width="80%"
class="channelproperties" summary="">
<tbody>
<tr>
<th rowspan="1" colspan="1">Property name</th>
<th rowspan="1" colspan="1">Interpretation</th>
</tr>

<tr>
<td rowspan="1" colspan="1">width</td>
<td rowspan="1" colspan="1">Width of the brush.<br />
 <br />
 If the width property is not given and a BW channel is present,
the values of the BW channel are used as the brush width. <br />
<br />
The default value is defined by the application.</td>
</tr>

<tr>
<td rowspan="1" colspan="1">height</td>
<td rowspan="1" colspan="1">Height of the brush.<br />
 <br />
 If a height property is not given and a BH channel is present, the
values of the BH channel are used as the brush height.<br />
<br />
The default value is defined by the application.</td>
</tr>

<tr>
<td rowspan="1" colspan="1">color</td>
<td rowspan="1" colspan="1">Color of brush as three octets for
RGB.<br />
<br />
 If a color property is not given and color channels are present (C
or CR, CG, CB or CC, CM, CY, CK), their values are used for the
color.<br />
<br />
Default is #000000.</td>
</tr>

<tr>
<td rowspan="1" colspan="1">transparency</td>
<td rowspan="1" colspan="1">Transparency of brush as an integer: 0
is opaque.<br />
<br />
If a transparency property is not given and the transparency
channel (A) is present, its value is used.<br />
Default is 0.</td>
</tr>

<tr>
<td rowspan="1" colspan="1">tip</td>
<td rowspan="1" colspan="1">The type of pen tip:
<strong>ellipse</strong>, <strong>rectangle</strong>, or
<strong>drop</strong>.<br />
<br />
If <strong>ellipse</strong>, then the width property specifies the
horizontal diameter, and the height property specifies the vertical
diameter.&nbsp; If the height property is absent, its default value
is the value of width.<br />
<br />
If <strong>rectangle</strong>, the width and height properties
specify the width and height of the rectangle.&nbsp; If the height
property is absent, the default value is the value of width making
the brush a square.<br />
<br />
If <strong>drop</strong>, the shape is defined by a circle
and&nbsp; two tangent lines to a point outside the circle, located
above the circle on the vertical axis, as shown in <em>F<span
class="units">igure 4</span></em>. The width property is the
diameter the circle part, and the height property is the maximum
diameter of the shape.<br />
 <br />
Default is <strong>ellipse</strong>.<br />
 <br />
 If the OR channel is present, the tip shape is rotated
counter-clockwise by this amount about its origin.</td>
</tr>

<tr>
<td rowspan="1" colspan="1">rasterOp</td>
<td rowspan="1" colspan="1">A value that defines how the colors of
the pen and background interact.&nbsp; In the example images below,
the original background is white with the black text 'abc' and it
is overwritten with a single curved yellow ink stroke.<br />
<br />
<table>
<tr>
<td valign="top"><strong><img style="vertical-align:top;"
alt="noOperation" src="rasterOp-noOperation.png" height="27"
width="50" /></strong></td>
<td valign="top"><strong>noOperation</strong> specifies no
operation; the background is rendered without ink.</td>
</tr>

<tr>
<td valign="top"><strong><img style="vertical-align:top;"
alt="copyPen" src="rasterOp-copyPen.png" height="27"
width="50" /></strong></td>
<td valign="top"><strong>copyPen</strong> specifies that the
current pen color property is used and overwrites the
background.</td>
</tr>

<tr>
<td valign="top"><strong><img style="vertical-align:top;"
alt="maskPen" src="rasterOp-maskPen.png" height="27"
width="50" /></strong></td>
<td valign="top"><strong>maskPen</strong> specifies a combination
of the colors common to both the pen and the display.&nbsp; This
value simulates the effect of a highlighter pen.</td>
</tr>

<!--
    <tr>
        <td valign="top"><strong><img align="top" alt="black" src="rasterOpBlack.png" /></strong></td>
        <td valign="top"><strong>black</strong> specifies a black pen color.</td>
    </tr>
    <tr>
        <td style="height: 44px" valign="top"><strong>
        <img align="top" alt="maskNotPen" src="rasterOpMaskNotPen.png" /></strong></td>
        <td style="height: 44px" valign="top"><strong>maskNotPen</strong> specifies a combination of the colors are common to both the pen and
the inverse of the display.</td>
    </tr>
    <tr>
        <td valign="top"><strong>
        <img align="top" alt="maskPenNot" src="rasterOpMaskPenNot.png" /></strong></td>
        <td valign="top"><strong>maskPenNot</strong> specifies a combination of the colors are common to the background
color and the inverse of the pen.</td>
    </tr>
    <tr>
        <td valign="top"><strong>
        <img align="top" alt="mergeNotPen" src="rasterOpMergeNotPen.png" /></strong></td>
        <td valign="top"><strong>mergeNotPen</strong> specifies a combination of the display color and the inverse of the
pen color.</td>
    </tr>
    <tr>
        <td valign="top"><strong>
        <img align="top" alt="mergePen" src="rasterOpMergePen.png" height="15" width="31" /></strong></td>
        <td valign="top"><strong>mergePen</strong> specifies a combination of the pen color and the display color.</td>
    </tr>
    <tr>
        <td valign="top"><strong>
        <img align="top" alt="mergePenNot" src="rasterOpMergePenNot.png" /></strong></td>
        <td valign="top"><strong>mergePenNot</strong> specifies a combination of the pen color and the inverse of the
display color.</td>
    </tr>
    <tr>
        <td valign="top">
        <img alt="not" src="rasterOpNot.png" height="15" width="31" /></td>
        <td valign="top"><strong>not</strong> specifies the inverse of the display color.</td>
    </tr>
    <tr>
        <td valign="top"><strong>
        <img align="top" alt="notCopyPen" src="rasterOpNotCopyPen.png" /></strong></td>
        <td valign="top"><strong>notCopyPen</strong> specifies the inverse of copyPen.</td>
    </tr>
    <tr>
        <td valign="top"><strong>
        <img align="top" alt="notMaskPen" src="rasterOpNotMaskPen.png" /></strong></td>
        <td valign="top"><strong>notMaskPen</strong> specifies the inverse of maskPen.</td>
    </tr>
    <tr>
        <td valign="top"><strong>
        <img align="top" alt="notMergePen" src="rasterOpNotMergePen.png" /></strong></td>
        <td valign="top"><strong>notMergePen</strong> specifies the inverse of mergePen.</td>
    </tr>
    <tr>
        <td valign="top"><strong>
        <img align="top" alt="notXOrPen" src="rasterOpNotXOrPen.png" /></strong></td>
        <td valign="top"><strong>notXOrPen</strong> specifies an inverse of xOrPen.</td>
    </tr>
    <tr>
        <td valign="top"><strong><img align="top" alt="white" src="rasterOpWhite.png" /></strong></td>
        <td valign="top"><strong>white</strong> specifies a white pen color.</td>
    </tr>
    <tr>
        <td valign="top"><strong>
        <img align="top" alt="xOrPen" src="rasterOpXOrPen.png" /></strong></td>
        <td valign="top"><strong>xOrPen</strong> specifies a combination of the colors in the pen and in the display
color, but not in both.</td>
    </tr>
    -->
</table>

<br />
The default value is <strong>copyPen</strong>, which indicates that
the current pen color is used.&nbsp; Applications may define
additional rasterOp values.</td>
</tr>

<tr>
<td colspan="1">antiAliased</td>
<td colspan="1">The drawn ink is anti-aliased.<br />
<br />
Default is true.</td>
</tr>

<tr>
<td colspan="1">fitToCurve</td>
<td colspan="1">The ink is rendered as a series of curves versus as
lines between pen sample points.<br />
<br />
Default is false.</td>
</tr>

<tr>
<td colspan="1">ignorePressure</td>
<td colspan="1">If true, pressure from the pen tip is ignored and
the width of the ink remains the same regardless of the pressure of
the pen on the tablet surface.<br />
<br />
If false, the width of the ink gets wider with increased pressure
of the pen on the tablet surface.<br />
<br />
Default is false.</td>
</tr>
</tbody>
</table>

<div class="menu"><img alt="drop shape" height="266" src="drop.png"
width="208" /><br />
 <em>Figure 4.&nbsp; Drop tip shape</em></div>

<h6><a name="brushPropertyAttrs0"
id="brushPropertyAttrs0">Attributes:</a></h6>

<div class="attr"><b>name</b> = xsd:string

<div class="attrdef">Name of property.<br style="clear:none;" />
<em>Required:</em> yes</div>

<br style="clear:none;" />
<b>value</b> = xsd:decimal | xsd:string

<div class="attrdef">Value of named property.<br
style="clear:none;" />
<em>Required:</em> yes</div>

<br style="clear:none;" />
<b>units</b> = xsd:string

<div class="attrdef">Units used for value.&nbsp; If present, the
value must be a numeric property.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>
</div>

<h6><a name="brushContents0" id="brushContents0">Contents:</a></h6>

<div class="nlcontents"><samp>( <a href="#annotationElement"
shape="rect">annotation</a> | <a href="#annotationXMLElement"
shape="rect">annotationXML</a> )*</samp></div>

<h6><a name="annotationExample0"
id="annotationExample0">Example:</a></h6>

<pre class="ex" xml:space="preserve">
&lt;brushProperty name="width" value="2" units="cm"/&gt;
&lt;brushProperty name="color" value="#FF0000"/&gt;
</pre>

<h3 id="timestamps">4.4 Timestamps</h3>

<p>Timestamping of traces is supported by the
<code>&lt;timestamp&gt;</code> element and the <b>timestampRef</b>,
<b>timeOffset</b> and <b>duration</b> attributes of the
<code>&lt;trace&gt;</code> element. For ease of processing, all
timestamps are expressed in milliseconds. Finer-grained timestamps
are obtained using fractional values.</p>

<h4 id="timestamp">4.4.1 <code>&lt;timestamp&gt;</code>
element</h4>

<h6><a name="timestampAttrs"
id="timestampAttrs">Attributes:</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The identifier for this timestamp.<br
style="clear:none;" />
<em>Required:</em> yes<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>time</b> = xsd:decimal<br style="clear:none;" />
 

<div class="attrdef">The absolute time for this timestamp, in
milliseconds since 1 January 1970 00:00:00 UTC.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none.<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>timestampRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">The absolute time for this timestamp, given as
a reference to another timestamp.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
 

<div><b>timeString</b> = xsd:dateTime<br style="clear:none;" />
 

<div class="attrdef">The absolute time for this timestamp, given in
a human-readable standard format.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none.<br
style="clear:none;" />
</div>

<br style="clear:none;" />
</div>

<b>timeOffset</b> = xsd:decimal<br style="clear:none;" />
 

<div class="attrdef">The relative time for this reference
timestamp, in milliseconds.<br style="clear:none;" />
<em>Required:</em> No. <em>Default.</em> 0<br
style="clear:none;" />
</div>
</div>

<h6><a name="timestampContents"
id="timestampContents">Contents:</a></h6>

<div class="nlcontents"><samp>EMPTY</samp></div>

<p>The <code>&lt;timestamp&gt;</code> element establishes a
reference timestamp which can then be used for relative
timestamping of traces.</p>

<p>At most one of the attributes <b>time</b>, <b>timestampRef</b>
or <b>timeString</b> is used. The time thus given, plus the value
of the attribute <b>timeOffset</b>, gives the time value of the
timestamp.</p>

<p>If more than one of <b>time</b>, <b>timeString</b> and
<b>timestampRef</b> are given, then <b>time</b> is used if present.
Failing that, <b>timeString</b> is used.</p>

<p>If none of <b>time</b>, <b>timestampRef</b> or <b>timeString</b>
are given, then the timestamp refers to some unspecified moment in
time. This is useful when the timestamp is referenced by multiple
elements to provide relative timing information.</p>

<p>The four examples below illustrate the establishment of various
reference timestamps. The first <code>&lt;timestamp&gt;</code>
element, ts001, refers to January 2, 2004 at 7:00am, UTC. The
second establishes timestamp ts002 which refers to January 2, 2004
at 7:10am, UTC (10 minutes after the reference timestamp ts001),
and the third time stamp, ts003, gives the same time using the
<b>timeString</b> attribute. The fourth creates ts004 with time
January 2, 2004 at 7:10:04.32, UTC (4.32 seconds after the
timestamp of trace ts002).</p>

<pre class="ex" xml:space="preserve">
&lt;timestamp xml:id="ts001" time="1073026800000"/&gt;
&lt;timestamp xml:id="ts002" timeOffset="600000" timestampRef="#ts001"/&gt;
&lt;timestamp xml:id="ts003" timeString="2004-01-02T07:10:00Z"/&gt;
&lt;timestamp xml:id="ts004" timeOffset="4320" timestampRef="#ts002"/&gt;
</pre>

<div>
<h3 id="defaultContext">4.5 The Default Context</h3>

<p>Ink traces may specify their contexts explicitly, using a
<b>contextRef</b> attribute, or implicitly, in which case they use
a default context.</p>

<p>Explicitly referenced <code>&lt;context&gt;</code> elements may
occur in a <code>&lt;definitions&gt;</code> element, elsewhere in
the same document or in other documents. Explicit contexts are
typically used in archival ink applications.</p>

<p>Traces that do not make explicit reference to a context occur in
a default context. This is established by the sequence of elements
in the <code>&lt;ink&gt;</code> element. Initially the default
context is empty and uses defaults for all properties, including a
default trace format, default canvas, etc. Then, interspersed with
ink data, other elements may occur that alter the default context.
These elements are <code>&lt;brush&gt;</code>,
<code>&lt;context&gt;</code>, <code>&lt;traceFormat&gt;</code>,
<code>&lt;inkSource&gt;</code> and <code>&lt;timestamp&gt;</code>.
As the ink is processed from the first child onward, whenever one
of these elements is encountered, it is installed as the default to
be used by traces. These are used by traces that do not otherwise
specify these properties.</p>

<p>The default context may be explicitly specified using the URI
"<code><strong>#DefaultContext</strong></code>".&nbsp; The id &quot;<code><strong>DefaultContext</strong></code>&quot; 
is therefore reserved and may not be used as the id of a user defined <code>&lt;context&gt;</code> 
element. </p>
</div>

<h3 id="contextPriority">4.6 Context Priority</h3>

<p>To describe how contextual information is determined, we start
with the notions of "fully resolved context" and "current context"
as follows.</p>

<p>A <i>fully resolved context</i> is one for which all the context
information (brush, canvas, canvasTransform, inkSource, timestamp,
traceFormat) has been obtained either from direct children, by
references or inherited. Values are obtained for the context
information by giving the contents of the
<code>&lt;context&gt;</code> priority over specific references
(<b>brushRef</b>, <b>canvasRef</b>, <b>canvasTransformRef</b>,
<b>inkSourceRef</b>, <b>timestampRef</b>, <b>traceFormatRef</b>),
which take priority over <b>contextRef</b>, which takes priority
over the current context.</p>

<p>The <i>current context</i> is a syntactic notion associated to
each node in an ink document. Roughly speaking, the current context
is changed only by <code>&lt;context&gt;</code>elements that occur
directly as children to the <code>&lt;ink&gt;</code> element (i.e.
not inside <code>&lt;definitions&gt;</code>). It is defined as
follows.</p>

<ul>
<li>The first top-level child of an <code>&lt;ink&gt;</code>
element has the default context its current context.</li>

<li>If a top-level child of an <code>&lt;ink&gt;</code> element has
a <code>&lt;context&gt;</code> element as its previous sibling,
then that context fully resolved is the child's current
context.</li>

<li>If a top-level child has another kind of previous sibling, then
that sibling's current context is the child's current context.</li>

<li>All descendants of a <code>&lt;definitions&gt;</code> element
have the default context as their current context.</li>

<li>All descendants of other kinds of top-level children have that
child's current context as their current context.</li>

<li>All descendants of a top-level child have that child's current
context as their current context.</li>
</ul>

<p>The current context is central to streaming ink applications
(see <a href="#Streaming">Streaming</a>).</p>

<p>We can now describe how contextual information is determined for
ink traces.</p>

<ul>
<li>For a top-level <code>&lt;trace&gt;</code>,
<code>&lt;traceGroup&gt;</code> or <code>&lt;traceView&gt;</code>
element (i.e. on that occurs as a direct child of an
<code>&lt;ink&gt;</code> element), a specific reference
(<b>brushRef</b>) takes priority over <b>contextRef</b> which takes
priority over the current context. The resulting anonymous context
is the context of this node.</li>

<li>For other <code>&lt;trace&gt;</code>,
<code>&lt;traceGroup&gt;</code> or <code>&lt;traceView&gt;</code>
elements, a specific reference (<b>brushRef</b>) takes priority
over <b>contextRef</b> which takes priority over the enclosing
<code>&lt;traceGroup&gt;</code> or <code>&lt;traceView&gt;</code>
node's context which takes priority over the current context. The
resulting anonymous context is the context of this node.</li>
</ul>

<hr />
<h2 id="canvas">5 Canvases</h2>

<div>
<p>InkML provides support for applications that are required to
combine ink from multiple sources. This may arise, for example,
from real-time collaboration among several devices, from multiple
ink annotations on the same base document or multiple pens
operating on the same surface. To support these applications, InkML
uses the concept of a shared space, called a <em>canvas</em>.</p>

<p>A canvas is specified using a <code>&lt;canvas&gt;</code>
element, and is typically referred to by one or more
<code>&lt;context&gt;</code> elements. These contexts may each have
their own set of ink capture characteristics and trace formats. In
order to map traces from a particular context to a canvas, and vice
versa, each context provides its own canvas transform, inverse
transform or both.</p>

<p>A context neither referencing nor inheriting a canvas uses a
default canvas, sufficient to allow simple single-canvas sharing
without further action on the part of devices or applications.</p>

<p>Each canvas defines its dimensions by giving a
<code>&lt;traceFormat&gt;</code> element. Its channel declarations
may specify minimum and/or maximum values, an orientation and
units. If no minimum or maximum is given for a channel of integer
or decimal type, then it is unbounded in that direction.</p>

<p>If a canvas is bounded in any direction, then all traces defined
on that canvas must be contained inside its limits. There may be
applications where strokes appear outside of the canvas. In these
cases the processing of out-of-bounds traces is not defined by the
specification.</p>

<p>Although canvases are virtual spaces, each of the coordinates
may be assigned a unit of measure. This allows collaborating
parties to establish a common notion of scale.</p>
</div>

<div>
<p>An example use for such a shared canvas might be a single ink
markup stream or file that contains traces captured on a tablet
computer, a PDA device, and an opaque graphics tablet attached to a
desktop computer. The size of these traces on each ink source and
corresponding display might differ, yet it may be necessary to
relate these traces to one another. They could represent scribbles
on a shared electronic whiteboard, annotations of a common
document, or the markings of two players in a distributed
tic-tac-toe game.</p>

<p>The trace data for these different ink sessions could be
recorded using the same set of virtual coordinates; however, it is
often useful, and may even be necessary at times, to record the
data in the ink source coordinates, in order to more precisely
represent the original capture conditions, for compactness, or to
avoid round-off errors that might be associated with the use of a
common coordinate system. Thus we define the concept of a "canvas
transform", which can vary according to the ink source. The default
transform is the identity. It is also possible to specify the
mapping from the canvas back to the coordinates of the original
trace format. This is useful in collaborative ink applications
where ink added to the canvas from one source must be interpreted
in the frame of reference of the other sources. It is not always
necessary to specify the inverse transform. If the canvas transform
is given as an affine map of full rank, then it may be inverted
numerically. Likewise if coordinates are transformed by a lookup
table with linear interpolation, then the mapping may be inverted
numerically. In all other cases the inverse transformation must be
provided if the inverse mapping is required.</p>
</div>

<h3 id="canvasElement">5.1 <code>&lt;canvas&gt;</code> element</h3>

<p>The <code>&lt;canvas&gt;</code> element provides the virtual
coordinate system, which uniquely identifies a shared virtual space
for cooperation of ink applications. Together with the
trace-to-canvas coordinate transform (discussed below), it provides
a common frame of reference for ink collected in multiple sessions
on different devices.</p>

<h6 id="canvasElementAttrs">Attributes:</h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The unique identifier for this element.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none.<br
style="clear:none;" />
</div>

<b><br />
 traceFormatRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">A link to a <code>&lt;traceFormat&gt;</code>
element.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none.<br
style="clear:none;" />
</div>
</div>

<h6 id="canvasContents">Contents:</h6>

<div class="contents"><samp><a
href="#traceFormat">traceFormat</a>?</samp></div>

<div>
<p>A <code>&lt;canvas&gt;</code> element must have an associated
<code>&lt;traceFormat&gt;</code>, which may either be given as a
child element or referred to by a
<b>traceFormatRef </b> attribute.&nbsp; If
both a <strong><span
class="style1">&lt;traceFormat&gt;</span></strong> element and a
<strong><span class="style4">traceFormatRef</span></strong>
attribute are specified, then the element overrides the attribute.
The coordinate space of the canvas is given by the regular channels
of the trace format and any intermittent channels are ignored.</p>

<p>Example:</p>

<pre class="ex" xml:space="preserve">
&lt;canvas xml:id="A4PaperCanvas"&gt;
   &lt;traceFormat&gt;
      &lt;channel name="X" type="decimal" min="0" max="210" units="mm"/&gt;
      &lt;channel name="Y" type="decimal" min="0" max="297" units="mm"/&gt;
   &lt;/traceFormat&gt;
&lt;/canvas&gt;
</pre>
</div>

<div>
<h3 id="canvasTransformElement">5.2
<code>&lt;canvasTransform&gt;</code> element</h3>

<h6><a name="canvasTransformAttrs"
id="canvasTransformAttrs">Attributes:</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The identifier for this canvas transform.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>invertible</b> = xsd:boolean<br style="clear:none;" />
 

<div class="attrdef"><em>Required:</em> no, <em>Default:</em>
false<br style="clear:none;" />
</div>
</div>

<br style="clear:none;" />
 

<h6><a name="canvasTransformContents" id="canvasTransformContents"
shape="rect">Contents:</a></h6>

<div class="contents">
<dl>
<dt><samp><a href="#mappingElement">mapping</a> <a
href="#mappingElement">mapping</a>?</samp></dt>
</dl>
</div>

<p>The <code>&lt;canvasTransform&gt;</code> element is used to
relate two coordinate systems. The source and target coordinate
systems are ultimately defined in terms of
<code>&lt;traceFormat&gt;</code> elements. These trace formats may
either be given directly, or indirectly by
<code>&lt;inkSource&gt;</code>, <code>&lt;context&gt;</code> or
other <code>&lt;canvas&gt;</code> elements. In general, the source
and target coordinate systems may involve a different number and
type of coordinates, or have different ranges and orientation for
the same dimension.</p>

<p>The contents of the <code>&lt;canvasTransform&gt;</code>
consists of one or two <a
href="#mappingElement"><code>&lt;mapping&gt;</code></a> elements.
If there is only one, then it is the mapping from the source to the
target coordinate system, where the meaning of "source" and
"target" is determined by the use. If there are two children, the
first is the mapping from the source to the target and the second
is the inverse mapping from the target back to the source.</p>

<p>The transform and its inverse need not be full inverses in the
mathematical sense. If a transform is from a trace format to a
canvas with fewer coordinates, then the inverse transform may map
from the canvas back to the original trace format by supplying
default values for the coordinates not in the canvas. This would
occur, for example, if a party were sharing ink from a device with
a force channel with a canvas with only spatial coordinates.</p>

<p>For certain classes of mappings, the inverse mapping may be
determined automatically. These are mappings of type "identity",
"affine" (for matrices of full rank), "table" (univariate, with
linear interpolation), and "product" mappings of these. In this
case, it is possible to specify that an inverse should be
determined automatically by giving only the forward transform and
specifying a value of <code>true</code> for the <b>invertible</b>
attribute.&nbsp; If two <code>&lt;mapping&gt;</code> elements are
specified, then the <strong>invertible</strong> attribute is
ignored.</p>

<p>For an application to give only the inverse transform, it should
supply the forward transform as an unknown mapping:</p>

<pre class="ex" xml:space="preserve">
&lt;canvasTransform&gt;
   &lt;mapping type="unknown"/&gt;
   &lt;mapping mappingRef="#map001"/&gt;
&lt;/canvasTransform&gt;
</pre>
</div>

<div>
<h3 id="DefaultCanvas">5.3 The Default Canvas</h3>

<p>The default canvas has two real-valued coordinates X and Y, both
unbounded in the positive and negative directions. More precisely,
the default canvas is made available as though the following
element were included in each InkML document:</p>

<pre class="ex" xml:space="preserve">
&lt;canvas xml:id="DefaultCanvas"&gt;
   &lt;traceFormat&gt;
      &lt;channel name="X"
               type="decimal" default="0" orientation="+ve" units="em"/&gt;
      &lt;channel name="Y"
               type="decimal" default="0" orientation="+ve" units="em"/&gt;
   &lt;/traceFormat&gt;
&lt;/canvas&gt;
</pre>

<p>The default canvas may be explicitly specified using the URI
"<code><strong>#DefaultCanvas</strong></code>".&nbsp; The id &quot;<code><strong>DefaultCanvas</strong></code>&quot; 
is therefore reserved and may not be used as the id of a user defined <code>&lt;canvas&gt;</code> 
element. </p>
</div>

<hr />
<h2 id="generics">6 Generics</h2>

<p>This section describes components of the ink markup which are
applicable to multiple aspects of the ink markup.</p>

<h3 id="mappings">6.1 Mappings</h3>

<p>The <code>&lt;mapping&gt;</code> element provides a uniform
syntax for the various uses of mappings in the ink markup. The
element has an <b>id</b> attribute, which allows a particular
mapping to be applied in multiple places. When a previously defined
mapping is reused, the <b>mappingRef</b> attribute is used to refer
to the <code>&lt;mapping&gt;</code> element, which might be defined
in a <code>&lt;definitions&gt;</code> block. Mappings appear in the
following different places in InkML:</p>

<ol>
<li>In a <code>&lt;channel&gt;</code> element of a
<code>&lt;traceFormat&gt;</code>, the <code>&lt;mapping&gt;</code>
element is used to describe the transformation from the values
actually produced by the device to the values recorded in the trace
data.</li>

<li>Used by a <code>&lt;canvasTransform&gt;</code>, a mapping may
be used to specify the forward or inverse transformations between
an ink source and a canvas coordinate system.</li>
</ol>

<p>InkML supports several types of mappings: unknown, identity,
lookup table, affine map, formula (specified using a subset of
MathML [<cite><a href="#MATHML2">MATHML2</a></cite>]) and cross product. The mapping type is indicated by the <b>type</b> attribute of a <code>&lt;mapping&gt;</code> element.
Note: If no mapping appears for a <code>&lt;channel&gt;</code>, it
defaults to "unknown", which is safer than assuming that 'X' is
identical to the device's 'X' since some filtering or modifications
could have been applied. Furthermore, one can specify whether the
results of a mapping expression are absolute or relative to the
current data value. This is done by means of the <b>apply</b>
attribute. For lookup table mappings in particular, one can
determine how to interpret intermediate mapping values. This is
specified using the <b>interpolation</b> attribute.</p>
<p>Some points may have channel values that cannot be mapped.&nbsp; These may 
lie outside the domain of a MathML mapping (e.g. division by zero, arcsine of 7) 
or outside the scope of a lookup table (e.g. below the lowest value when the 
interpolation scheme is other than "ceiling"). In this situation the behavior 
is not specified and may vary from implementation to implementation.&nbsp; For 
example, an implementation may choose to raise an error or omit the points.</p>

<h4 id="mappingElement">6.1.1 <code>&lt;mapping&gt;</code>
element</h4>

<h6><a name="mappingAttrs" id="mappingAttrs">Attributes</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The identifier for this mapping.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>type</b> = "identity" | "product" | "table" | "affine" |
"mathml" | "unknown"<br style="clear:none;" />
 

<div class="attrdef">The type for the particular mapping.<br
style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> unknown<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>mappingRef</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">The ID of a mapping which has previously been
defined.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>
</div>

<h6><a name="mappingContents"
id="mappingContents">Contents</a></h6>

<div class="nlcontents">
<div><samp>( <a href="#bindElement">bind</a>* ( <a
href="#tableElement">table</a> | <a href="#affineElement"
shape="rect">affine</a> | mathml:math )? ) | <a
href="#mappingElement">mapping</a>*</samp></div>
</div>

<p class="style2">(The mathml prefix above is declared as
"http://www.w3.org/1998/Math/MathML", the MathML schema
namespace [<cite><a href="#MATHML2">MATHML2</a></cite>].)</p>

<div>
<h6 id="identityMap">The identity map</h6>

<p>If the <strong>type</strong> attribute has value
<strong>identity</strong> then the element is empty.</p>

<p>Identity mappings are specified using an empty mapping
element:</p>

<pre class="ex" xml:space="preserve">
&lt;mapping xml:id="m01" type="identity" /&gt;

&lt;channel name="X" type="decimal" units="pt" default="0"&gt;
   &lt;mapping type="identity"/&gt;   
&lt;/channel&gt;
</pre>

<p>They are used, for example, to define a
<code>&lt;traceFormat&gt;</code> channel that reports the exact
data that is recorded by a corresponding device channel, with no
filtering or transformation.</p>
</div>

<div>
<h6 id="CrossProductMaps">Cross Product Maps</h6>

<p>If the <strong>type</strong> attribute has value
<strong>product</strong> then the contents is a set of
<code>&lt;mapping&gt;</code> elements, each giving values for one
or more of the coordinates. This allows a multivariate mapping to
compute the different coordinate results according to the most
convenient means. For example, spatial coordinates may be
transformed using an affine map, button states by lookup tables,
and color coordinates using formulas.</p>
</div>

<div>
<h6 id="LookupTables">Lookup Tables</h6>

<p>If the <strong>type</strong> attribute has value
<strong>table</strong> then the mapping is a function specified by
a lookup table given as a <code>&lt;table&gt;</code> element
containing rows of values separated by commas.</p>

<div>
<h6 id="AffineMapes">Affine Maps</h6>

<p>If the <strong>type</strong> attribute has value
<strong>affine</strong> then the content is an
<code>&lt;affine&gt;</code> element specifying an affine
transformation (<b>u</b><b>M</b>&nbsp;<b>u</b> + <b>b</b>) from
<i>n</i> source values to <i>m</i> target values. All of the source
and target values must be of the same type, either integer or real
(decimal or float). A matrix <b>M</b> containing only the values 0,
1 and -1 may be used to perform arbitrary permutation and
reflection of coordinates. If the affine map computes a real number
for an integer coordinate, then the value is rounded to the nearest
integer.</p>
</div>

<h6 id="MathMLMappings">MathML mappings</h6>

<p>If the <strong>type</strong> attribute has value
<strong>mathml</strong> then the content is a subset of MathML [<cite><a href="#MATHML2">MATHML2</a></cite>]
restricted to the following subset of Content MathML 2.0
elements:</p>

<div>
<ul>
<li>Numbers: <samp>cn</samp></li>

<li>Named constants: <samp>exponentiale, pi, true,
false</samp></li>

<li>Identifiers: <samp>ci</samp>. These must be associated to
channels using a <code>&lt;bind&gt;</code> element.</li>

<li>Arithmetic: <samp>plus, minus, times, divide, quotient, rem,
power, root, min, max, abs, floor, ceiling</samp></li>

<li>Elementary classical functions: <samp>sin, cos, tan, arcsin,
arccos, arctan, exp, ln, log</samp></li>

<li>Logic: <samp>and, or, xor, not</samp></li>

<li>Relations: <samp>eq, neq, gt, lt, geq, leq</samp></li>

<li>Operator application: <samp>apply</samp></li>
	<li>
	<p>Operator qualifiers: <samp>degree, logbase</samp></p>
	</li>
</ul>

<p>This is a subset has been selected to provide expressions
suitable for scalar functions on integers, real numbers and boolean
values. A number of restrictions apply:</p>

<ul>
<li>The only elements permitted within the
<code>&lt;mathml:math&gt;</code> element are those in the above
list.</li>

<li>The content of <code>&lt;ci&gt;</code> and
<code>&lt;cn&gt;</code> elements is restricted to be text. In
particular, Presentation MathML markup is not allowed.</li>

<li>The only attribute that is recognized is the <b>type</b>
attribute on the <code>&lt;cn&gt;</code> element. The <b>type</b>
attribute may take the values <samp>integer</samp>,
<samp>real</samp> or <samp>rational</samp>. Other attributes may be
given on elements, but they are ignored.</li>
	<li>All intermediate expressions must evaluate to an integer, real or double 
	value.</li>

<li>Elements of the arithmetic, elementary classical functions,
logic and relations categories above may appear only as the first
child of an <code>&lt;apply&gt;</code> element.</li>
</ul>

<p>The content of The arithmetic operators return values whose type
depends on the type of the arguments. The logical operators and
relations return boolean values. The elementary functions return
real values.</p>

<!--
<p>Additionally, an explicit <samp>list</samp> may be used at the
top-most level of the MathML expression when the mapping returns
multiple values. This is the case in a coordinate
transformation.</p>
-->
<p>Example: The following mapping converts from polar to
rectangular coordinates.</p>

<pre class="ex" xml:space="preserve">
&lt;mapping type="product"&gt;
   &lt;mapping type="mathml"&gt;
      &lt;bind target="X"/&gt;
      &lt;bind source="VR"  variable="r"/&gt;
      &lt;bind source="VTh" variable="theta"/&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
         &lt;apply&gt;
            &lt;times/&gt;
            &lt;ci&gt;r&lt;/ci&gt;
            &lt;apply&gt; &lt;cos/&gt; &lt;ci&gt;theta&lt;/ci&gt; &lt;/apply&gt;
         &lt;/apply&gt;
      &lt;/math&gt;
   &lt;/mapping&gt;
   &lt;mapping type="mathml"&gt;
      &lt;bind target="Y"/&gt;
      &lt;bind source="VR"  variable="r"/&gt;
      &lt;bind source="VTh" variable="theta"/&gt;
      &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
         &lt;apply&gt;
            &lt;times/&gt;
            &lt;ci&gt;r&lt;/ci&gt;
            &lt;apply&gt; &lt;sin/&gt; &lt;ci&gt;theta&lt;/ci&gt; &lt;/apply&gt;
         &lt;/apply&gt;
      &lt;/math&gt;
   &lt;/mapping&gt;
&lt;/mapping&gt;
</pre>
</div>
</div>

<h4 id="bindElement">6.1.2 <code>&lt;bind&gt;</code> element</h4>

<h6><a name="bindAttrs" id="bindAttrs">Attributes</a></h6>

<div class="attr"><b>source</b> = xsd:string<br
style="clear:none;" />
 

<div class="attrdef">Specifies source data values and/or channel to
be considered in the mapping.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>target</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">Specifies target data values and/or channel to
be considered in the mapping.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>column</b> = xsd:integer<br style="clear:none;" />
 

<div class="attrdef">
	Specifies the assigned column within a lookup table either for source or 
	target channels or the assigned position for a channel within the source or 
	target vector of an affine mapping.<br style="clear:none;" />
	<em>Required:</em> <span>for lookup table bindings and affine mappings</span>, <em>Default:</em>
none<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>variable</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">Specifies the variable within a formula that
represents the current source data/channel.<br
style="clear:none;" />
<em>Required:</em> for mathml bindings, <em>Default:</em> none<br
style="clear:none;" />
</div>
</div>

<h6><a name="bindContents" id="bindContents">Contents</a></h6>

<div class="nlcontents"><samp>EMPTY</samp></div>

<p>The <code>&lt;bind&gt;</code> element is provided for binding
channels to entities (variable names, lookup table columns) within
a mapping, and thus it supports the reuse of predefined mappings.
For each type of mapping, the relevant bindings can be expressed by
the combined usage of the <code>&lt;bind&gt;</code> element's
attributes, which are <b>source</b>, <b>target</b>, <b>column</b>
and <b>variable</b>.<br style="clear:none;" />
</p>

<p>For an identity mapping (<b>type="identity"</b>), if the source
channel has a different name than the channel being defined, this
can be specified using a <code>&lt;bind&gt;</code> element with a
<b>source</b> attribute. In the following markup, the
<code>&lt;traceFormat&gt;</code> channel X contains unmanipulated
data from the device's devX channel.&nbsp;&nbsp; When the mapping
type is an identity mapping, the <code>&lt;bind&gt;</code> element
<strong>source</strong> attribute is required, and the other
attributes <strong>target</strong>, <strong>column</strong>, and
<strong>variable</strong> must not be present.</p>

<pre class="ex" xml:space="preserve">
&lt;channel name="X"&gt;
   &lt;mapping type="identity"&gt;
      &lt;bind source="devX"/&gt;
   &lt;/mapping&gt;
&lt;/channel&gt;
</pre>

<p>Within a mapping formula (<b>type="mathml"</b>), the variable
names in the formula need to be bound to particular channel names.
This is specified using a combination of <b>source</b> and
<b>variable</b> attributes for binding inputs of the formula, and
<b>target</b> and <b>variable</b> for the output of the formula.
This is useful if the same mapping formula is to be reused across
multiple channels, like X and Y for example.&nbsp; When the mapping
type is an mathml mapping the <strong>column</strong> attribute for
the <code>&lt;bind&gt;</code> element must not be present.</p>

<pre class="ex" xml:space="preserve">
&lt;mapping xml:id="m06" type="mathml"&gt;
   &lt;bind target="X" variable="Q" /&gt;
   &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
      &lt;apply&gt;
         &lt;plus/&gt;
         &lt;ci&gt;Q&lt;/ci&gt;
         &lt;cn&gt;10&lt;/cn&gt;
      &lt;/apply&gt;
   &lt;/math&gt;
&lt;/mapping&gt;
</pre>

<p>The example shown above means that the channel X is referred to
by the variable name Q in the mapping expression "Q+10".</p>

<p>For a lookup table (<b>type="table"</b>), each index column must
be bound to the channel that provides the input for the lookup
operation. This is done with a <code>&lt;bind&gt;</code> element
that specifies <b>source</b> and <b>column</b> attributes.
Similarly, each value column must be bound to the channel that
receives the output of the lookup. Its <code>&lt;bind&gt;</code>
element specifies <b>target</b> and <b>column</b>.&nbsp;&nbsp; When
the mapping type is a lookup mapping the <strong>variable</strong>
attribute for the <code>&lt;bind&gt;</code> element must not be
present.</p>

<div>
<p>The following example indicates assignments of channels to
columns. It means that values for the channels OTx and P are used
to look up the value of the cross-coupling for channel X in the
table given by the mapping below:</p>

<pre class="ex" xml:space="preserve">
&lt;mapping xml:id="m07" type="table"&gt;
   &lt;bind target="X" column="1"/&gt;
   &lt;bind source="OTx" column="2"/&gt;
   &lt;bind source="P" column="3"/&gt;
   &lt;table apply="relative" interpolation="floor"&gt;
      10    45    512,
      9     45    400,
      8     45    372,
      7     45    418,

      10    50    510,
      9     50    403,
      8     50    302,
      7     50    407,

      10    55    512,
      9     55    410,
      8     55    303,
      7     55    405,

      10    60    512,
      9     60    420,
      8     60    355,
      7     60    401,
   &lt;/table&gt;
&lt;/mapping&gt;</pre>
	<p>
For an affine mapping (<strong>type="affine"</strong>), the column values give 
	the meaning of the rows and columns of the transformation matrix. Suppose an 
	affine mapping is specified by the augmented matrix (M b), corresponding to 
	the transformation v = M . u + b. Then a <code>&lt;bind&gt;</code>
	element with a <strong>source</strong> attribute will have a <strong>column</strong> attribute specifying which index in the vector u corresponds to the named source
channel.   Likewise, a <code>&lt;bind&gt;</code>
	element with a <strong>target</strong> attribute 
	will have a <strong>column</strong> attribute specifying which index in the vector v
corresponds to the named target channel.    If the target bindings are
the same as the source bindings, then they may be omitted.
</p>
</div>

<div>
<h4 id="tableElement">6.1.3 <code>&lt;table&gt;</code> element</h4>

<h6><a name="tableAttrs" id="tableAttrs">Attributes</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The unique identifier for this
<code>table</code> element.<br style="clear:none;" />
<em>Required:</em> no<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>apply</b> = "absolute" | "relative"<br style="clear:none;" />
 

<div class="attrdef">Specifies whether the mapping values are used
from the table/formula, or whether this table/formula needs to be
added to the current data value.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> absolute<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>interpolation</b> = "floor" | "middle" | "ceiling" | "linear" |
"cubic"<br style="clear:none;" />
 

<div class="attrdef">Specifies the interpolation between discrete
mapping values defined by a lookup table.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> "linear"<br
style="clear:none;" />
</div>
</div>

<h6><a name="tableContents" id="tableContents">Contents</a></h6>

<div class="nlcontents"><samp>((number | "T" | "F")+ ",")* (number
| "T" | "F")*</samp><br />
<p>where <samp>number</samp> is defined by the grammar given in the
<a href="#trace"><samp>&lt;trace&gt;</samp> element</a>
section.</p>
</div>

<p>The <code>&lt;table&gt;</code> gives a set of points for a
mapping. The points are given as comma-separated rows. Each row
must have the same number of entries. The final row may optionally
be followed by a comma. Each row in the table represents a value of
the function at one point. Which columns represent the argument(s)
and which the result(s) is determined by <code>&lt;bind&gt;</code>
elements.</p>

<p>The entries in the table may either be all numerical or all
boolean. They may be derived empirically, by measuring properties
of a device, calculated to provide efficient approximation to a
numerical function, or give an exhaustive enumeration of values of
a function over a finite set of values.</p>

<p>Example:</p>

<p>The following example means that X is a function of OE, given by
a lookup table. The value "relative" for the <b>apply</b>, means
the table gives an amount to increase X.</p>

<pre class="ex" xml:space="preserve">
&lt;channel name="X"...&gt;
   ...
   &lt;mapping xml:id="m03" type="table"&gt;
      &lt;bind source="OE"/&gt;
      &lt;bind target="X"/&gt;
      &lt;table apply="relative" interpolation="floor"&gt;
         45  10,
         50   9,
         55   8,
         60   7
      &lt;/table&gt;
   &lt;/mapping&gt;
   ...
&lt;/channel&gt;
</pre>

<p>Tables may have more than two columns, with some of them (the
source columns) determining others (the target columns). If there
is more than one source column, then all possible combinations of
source values must be given. For example, if there are two source
columns with one having 3 distinct values and the other having 5
distinct values, then the table must have 15 rows.</p>

<p>The value of the <b>interpolation</b> attribute defines the
behavior for indices that don't appear in a numerical table. The
following summarizes the behavior of the above table for the
various values of <b>interpolation</b>:</p>

<table border="1" cellspacing="0" cellpadding="3" width="80%"
class="trace" summary="">
<tbody>
<tr>
<th>"floor"</th>
<td>The value is determined by rounding all source variables down
to the nearest specified value. 

<pre xml:space="preserve">
X += 10  if 45 ≤ OE &lt; 50,
X += 9   if 50 ≤ OE &lt; 55,
...
</pre>
</td>
</tr>

<tr>
<th>"middle"</th>
<td>The value is constant on regions whose boundaries are mid-way
between the given source values. 

<pre xml:space="preserve">
X += 10  if 45   ≤ OE &lt; 47.5,
X += 9   if 47.5 ≤ OE &lt; 52.5,
...
</pre>
</td>
</tr>

<tr>
<th>"ceiling"</th>
<td>The value is determined by rounding all source variables up to
the nearest specified value. 

<pre xml:space="preserve">
X += 10  if      OE ≤ 45,
X += 9   if 45 &lt; OE ≤ 50,
...
</pre>
</td>
</tr>

<tr>
<th>"linear"</th>
<td rowspan="1" colspan="1">Piece-wise linear interpolation.</td>
</tr>

<tr>
<th valign="top">"cubic"</th>
<td>Interpolation by cubic splines. This option may be used only
for univariate mappings and requires the table have at least 4
points.</td>
</tr>
</tbody>
</table>

<p>The <b>interpolation</b> attribute may not be used with boolean
tables.</p>
</div>

<div>
<h4 id="affineElement">6.1.4 <code>&lt;affine&gt;</code>
element</h4>

<h6><a name="affineAttrs" id="affineAttrs">Attributes</a></h6>

<div class="attr"><b>xml:id</b> = xsd:ID<br style="clear:none;" />
 

<div class="attrdef">The unique identifier for this
<code>&lt;affine&gt;</code> element.<br style="clear:none;" />
<em>Required:</em> no<br style="clear:none;" />
</div>
</div>

<h6><a name="affineContents" id="affineContents">Contents</a></h6>

<div class="nlcontents">
<p><samp>( number+ ",")* number*</samp></p>

<p>where <samp>number</samp> is defined by the grammar given in the
<a href="#trace"><samp>&lt;trace&gt;</samp> element</a>
section.</p>
</div>

<p>The <code>&lt;affine&gt;</code> element provides the entries for
an affine mapping from <i>n</i> source values to <i>m</i> target
values. An affine mapping consists of a linear transformation
(multiplication by a matrix) and a shift (adding a vector). The
content of the <code>&lt;affine&gt;</code> element is text giving a
<i>m</i> comma-separated rows of <i>n+1</i> numbers each. The final
row may optionally be followed by a comma. The first <i>n</i>
columns specify an <i>m ×n</i> matrix <b>M</b>, and the last column
gives a vector <b>b</b> of length <i>m</i>. If <b>u</b> is the
source vector of <i>n</i> coordinates, then <b>v = M &nbsp; u +
b</b> is the target vector of <i>m</i> coordinates.</p>

<p>The following is an example of an affine mapping using an
<code>&lt;affine&gt;</code> element to describe the transform (X,
Y) ↦ (-Y, X+200).</p>

<pre class="ex" xml:space="preserve">
 &lt;mapping xml:id="m01" type="affine"&gt;
   &lt;bind source="X" column=&quot;1&quot;/&gt;
   &lt;bind source="Y" column=&quot;2&quot;/&gt;
   &lt;affine&gt;
      0 -1   0,
      1  0 200,
   &lt;/affine&gt;
&lt;/mapping&gt;
</pre>
</div>

<h3 id="definitions">6.2 Definitions</h3>

<h4 id="definitionsElement">6.2.1 <code>&lt;definitions&gt;</code>
element</h4>

<h6><a id="definitionsAttrs"
name="definitionsAttrs">Attributes:</a></h6>

<div class="attr">none</div>

<h6><a id="definitionsContent"
name="definitionsContent">Contents:</a></h6>

<div>
<div class="contents">
<dl>
<dt><samp>( <a href="#brushElement">brush</a> | <a
href="#canvas">canvas</a> | <a
href="#canvasTransformElement">canvasTransform</a> | <a
href="#contextElement">context</a> | <a
href="#inkSourceElement">inkSource</a> | <a
href="#mappingElement">mapping</a> | <a href="#timestamp"
shape="rect">timestamp</a> | <a href="#trace">trace</a> | <a
href="#traceFormat">traceFormat</a> | <a
href="#traceGroup">traceGroup</a> | <a
href="#traceViewElement">traceView</a> )*</samp></dt>
</dl>
</div>

<p>The <code>&lt;definitions&gt;</code> element is a container
which is used to define reusable content. The definitions within a
<code>&lt;definitions&gt;</code> block can be referenced by other
elements using the appropriate syntax. Content within a
<code>&lt;definitions&gt;</code> block has no impact on the
interpretation of traces, unless referenced from outside the
<code>&lt;definitions&gt;</code> block. In order to allow them to
be referenced, elements within a <code>&lt;definitions&gt;</code>
block must include an <b>id</b>; attribute. Therefore, an element
which is defined inside a <code>&lt;definitions&gt;</code> without
an <b>id</b>, or that is never referenced, serves no purpose.</p>

<p>One of the primary uses of <code>&lt;definitions&gt;</code> is
to define contextual information. In particular, the elements
<code>&lt;brush&gt;</code>, <code>&lt;canvas&gt;</code>,
<code>&lt;canvasTransform&gt;</code>, <code>&lt;context&gt;</code>,
<code>&lt;inkSource&gt;</code>, <code>&lt;mapping&gt;</code>,
<code>&lt;timestamp&gt;</code> and <code>&lt;traceFormat&gt;</code>
may be given inside a <code>&lt;definitions&gt;</code>. These may
be referenced from other elements by the attributes
<b>brushRef</b>, <b>canvasRef</b>, <b>canvasTransformRef</b>,
<b>contextRef</b>, <b>inkSourceRef</b>, <b>mappingRef</b>,
<b>timestampRef</b> and <b>traceFormatRef</b>, respectively.
Timestamps may also be referenced by the <b>respectTo</b> attribute
of the <code>&lt;channel&gt;</code>element.</p>

<p>Another use of <code>&lt;definitions&gt;</code> is to define
digital ink traces for later reference. These may be given by
<code>&lt;trace&gt;</code>, <code>&lt;traceGroup&gt;</code> or
<code>&lt;traceView&gt;</code>. These are not considered part of
the ink data to be handled by the application until they are
referenced from other elements (outside the
<code>&lt;definitions&gt;</code>) by a <b>traceDataRef</b>
attribute. This is useful in archival applications.</p>

<p>The following simple example illustrates usage of the
<code>&lt;definitions&gt;</code> element.</p>

<pre class="ex" xml:space="preserve">
&lt;ink xmlns=&quot;http://www.w3.org/2003/InkML&quot;&gt;
   &lt;definitions&gt;
      &lt;brush xml:id="redPen"/&gt;
      &lt;brush xml:id="bluePen"/&gt;
      &lt;traceFormat xml:id="normal"/&gt;
      &lt;traceFormat xml:id="noForce"/&gt;
      &lt;context xml:id="context1"
            brushRef="#redPen"
            traceFormatRef="#normal"/&gt;
      &lt;context xml:id="context2"
            contextRef="#context1"
            brushRef="#bluePen"/&gt;
   &lt;/definitions&gt;
   &lt;context contextRef="#context2" traceFormatRef="#noForce"/&gt;
   &lt;context xml:id="context3"/&gt;
&lt;/ink&gt;
</pre>

<p>More details on the usage of the
<code>&lt;definitions&gt;</code> element are provided in the <a
href="#Archival">Archival Applications</a> section.</p>
</div>

<div>
<h3 id="annotations">6.3 Annotations</h3>

<p>InkML provides generic ways of assigning metadata or semantics
to ink via two elements <code>&lt;annotation&gt;</code> and
<code>&lt;annotationXML&gt;</code>, modeled after the corresponding
elements in MathML. However since annotations are typically
application-specific, InkML does not attempt to prescribe the
contents of these elements.&nbsp; Since the contents of
<code>&lt;annotation&gt;</code> or
<code>&lt;annotationXML&gt;</code> elements are application
defined, implementers should use them with care and remain aware
that other implementations may ignore them or fail to round-trip
unrecognized annotations.</p>

<h4 id="annotationElement">6.3.1 <code>&lt;annotation&gt;</code>
element</h4>

<h6><a id="annotationAttrs"
name="annotationAttrs">Attributes</a></h6>

<div class="attr"><b>type</b> = xsd:string<br
style="clear:none;" />
 

<div class="attrdef">The category of annotation that this element
describes, for descriptive purposes only. (Applications may define
their own types.)<br style="clear:none;" />
<em>Required:</em> no<br style="clear:none;" />
<em>Default:</em> none<br style="clear:none;" />
</div>

<br style="clear:none;" />
<b>encoding</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">The kind of syntax, standard or convention
being used for the values of the annotation, e.g. ISO639 for
language codes. <em>Required:</em> no<br style="clear:none;" />
<em>Default:</em> none<br style="clear:none;" />
</div>

<p>Other attributes in a namespace other than that of InkML are
also allowed, such as general metadata properties (e.g. from the
Dublin Core vocabulary) or application-specific attributes.</p>
</div>

<p>The <code>&lt;annotation&gt;</code> element provides a mechanism
for inserting simple textual descriptions in the ink markup. This
may be used for multiple purposes. For instance, the text contained
in the <code>&lt;annotation&gt;</code> may include additional
information provided by the user generating InkML, and may be
displayed by an InkML consumer rendering a graphical representation
of traces. Or it may be used for the indication of metadata such as
the writer, the writing instrument. Another important potential
application is the semantic tagging of traces.</p>

<h6><a name="annotationExample"
id="annotationExample">Example:</a></h6>

<pre class="ex" xml:space="preserve">
&lt;ink xmlns=&quot;http://www.w3.org/2003/InkML&quot;
     xmlns:dc="http://dublincore.org/documents/2001/10/26/dcmi-namespace/"&gt;
   &lt;annotation type="description"&gt;A Sample of Einstein's Writings&lt;/annotation&gt;
   &lt;annotation type="writer"&gt;Albert Einstein&lt;/annotation&gt;
   &lt;annotation type="contentCategory"&gt;Text/en&lt;/annotation&gt;
   &lt;annotation type="language" encoding="ISO639"&gt;en&lt;/annotation&gt;
   &lt;annotation dc:language="en"/&gt;

   &lt;trace xml:id="trace1"&gt;
      ...
   &lt;/trace&gt;
   &lt;traceGroup xml:id="tg1"&gt;
      &lt;annotation type="truth"&gt;Hello World&lt;/annotation&gt;
      &lt;traceGroup&gt;
         &lt;annotation type="truth"&gt;Hello&lt;/annotation&gt;
         &lt;trace&gt; ...  &lt;/trace&gt;
         ...
      &lt;/traceGroup&gt;
      &lt;traceGroup&gt;
         &lt;annotation type="truth"&gt;World&lt;/annotation&gt;
         &lt;trace&gt; ...  &lt;/trace&gt;
         ...
     &lt;/traceGroup&gt;
   &lt;/traceGroup&gt;
   &lt;traceView traceDataRef="#tg1"/&gt;
&lt;/ink&gt;
</pre>

<p>For semantic tagging, one of the common types of
<code>&lt;annotation&gt;</code> is "contentCategory", which
describes at a basic level the category of content that the traces
represent; e.g., "Text/English", "Drawing", "Math", "Music". Such
categories are useful for general data identification purposes, and
may be essential for selecting data to train handwriting
recognizers in different problem domains.</p>

<p>Although largely application-defined, a number of likely, common
categories are suggested below.</p>

<ul>
<li>Text/&lt;language&gt;[/&lt;script&gt;][/&lt;sub-category&gt;]
(e.g., Text/jpn/Kanji, Text/en/SSN)</li>

<li>Drawing[/&lt;sub-category&gt;] (e.g., Drawing/Sketch,
Drawing/Diagram)</li>

<li>Math</li>

<li>Music</li>

<li>Chemistry[&lt;sub-category&gt;]</li>
</ul>

<p>The language specification may be made using any of the language
identifiers specified in ISO 639, using 2-letter codes, 3-letter
codes, or country names. Some text may also require a script
specification (such as Kanji, Katakana, or Hiragana) in addition to
the language.</p>

<p>For some applications it may be useful to provide additional
sub-categories defining the type of the data. For example, some
suggested sub-categories for Text include:</p>

<ul>
<li>SSN (Social Security Number)</li>

<li>Phone</li>

<li>Date</li>

<li>Time</li>

<li>Currency</li>

<li>URL</li>
</ul>

<p>Suggested possible sub-categories for Drawing are:</p>

<ul>
<li>Sketch (Not suitable for geometric clean-up)</li>

<li>Diagram (Suitable for geometric clean-up)</li>
</ul>

<h4 id="annotationXMLElement">6.3.2
<code>&lt;annotationXML&gt;</code> element</h4>

<h6><a id="annotationXMLAttrs"
name="annotationXMLAttrs">Attributes</a></h6>

<div class="attr"><b>type</b> = xsd:string<br
style="clear:none;" />
 

<div class="attrdef">The category of annotation that this element
describes, for descriptive purposes only. (Applications may define
their own types.)<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>encoding</b> = xsd:string<br style="clear:none;" />
 

<div class="attrdef">The kind of syntax, standard or convention
being used for the values of the annotation, e.g. ChemML, MathML,
RDF, etc.<br style="clear:none;" />
<em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<br style="clear:none;" />
<b>href</b> = xsd:anyURI<br style="clear:none;" />
 

<div class="attrdef">A reference to XML content giving the
annotation. <em>Required:</em> no, <em>Default:</em> none<br
style="clear:none;" />
</div>

<p>Other attributes in a namespace other than that of InkML are
also allowed, such as general metadata properties (e.g. from the
Dublin Core vocabulary) or application-specific attributes.</p>
</div>

<h6><a id="annotationXMLContents" name="annotationXMLContents"
shape="rect">Contents</a></h6>

<div class="contents"><samp>Any XML-based annotation</samp></div>

<p>This element allows ink to be annotated with general XML
objects. For instance a handwritten equation may be described using
a snippet of MathML, or metadata and semantic annotation may be
provided using an XML language. These annotations may be given
either as the content of an <code>&lt;annotationXML&gt;</code>
element or may be referred to by a <code>href</code> attribute, but
not both.&nbsp; If several annotations are desired, several
<code>&lt;annotationXML&gt;</code> elements should be given.</p>

<p>When annotations of a parent node include the content of the
annotations of the child nodes, then one should consider using
<code>&lt;annotationXML&gt;</code> annotations on the children with
<code>href</code> attributes referring to sub-trees of the parents
annotation in order to maintain linear space complexity in the
annotations.</p>

<h6><a name="annotationXMLExample1" id="annotationXMLExample1"
shape="rect">Example:</a></h6>

<pre class="ex" xml:space="preserve">
&lt;ink xmlns=&quot;http://www.w3.org/2003/InkML&quot;&gt;
   &lt;annotation type="description"&gt;A Sample of Einstein's Writings&lt;/annotation&gt;    
   &lt;annotationXML type="metadata" encoding="rdf"&gt;
      &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
               xmlns:dc="http://purl.org/dc/elements/1.1/" &gt;
         &lt;rdf:Description about=""
            dc:language="en"
            dc:date="2004-04-11"
            dc:creator="InkML Maker v0.1"
            dc:publisher="Famous Handwritings Ltd."/&gt;
      &lt;/rdf:RDF&gt;
   &lt;/annotationXML&gt;

   &lt;trace&gt; ... &lt;/trace&gt;
   ...
   &lt;trace&gt; ... &lt;/trace&gt;
&lt;/ink&gt;
</pre>

<h6><a name="annotationXMLExample2" id="annotationXMLExample2"
shape="rect">Example:</a></h6>

<pre class="ex" xml:space="preserve">
&lt;ink xmlns=&quot;http://www.w3.org/2003/InkML&quot;&gt;
   &lt;annotationXML type="truth" encoding="application/xhtml+xml"&gt;
      &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
         &lt;body&gt;
            &lt;div xml:id="Ch1"&gt;
               &lt;h1 xml:id="T1"&gt;&lt;span xml:id="W1"&gt;Weather &lt;/span&gt;&lt;/h1&gt;
               &lt;p xml:id="P1"&gt;
                 &lt;span xml:id="W2"&gt;The&lt;/span&gt;
                 &lt;span xml:id="W3"&gt;rain&lt;/span&gt;
                 ... more words
               &lt;/p&gt;
               &lt;p xml:id="P2"&gt;...&lt;/p&gt;
               ... more paragraphs
            &lt;/div&gt;
            ... more chapters
         &lt;/body&gt;
      &lt;/html&gt;
   &lt;/annotationXML&gt;

   &lt;traceGroup&gt;
      &lt;annotationXML href="#Ch1"/&gt;
      &lt;traceGroup&gt;
         &lt;annotationXML href="#T1"/&gt;
         &lt;traceGroup&gt;
            &lt;!-- Weather --&gt;
            &lt;annotationXML href="#W1"/&gt;
            &lt;trace&gt;...&lt;/trace&gt;
         &lt;/traceGroup&gt;
      &lt;/traceGroup&gt;

      &lt;traceGroup&gt;
         &lt;annotationXML href="#P1"/&gt;
         &lt;traceGroup&gt;
            &lt;!-- The --&gt;
            &lt;annotationXML href="#W2"/&gt;
            &lt;trace&gt;...&lt;/trace&gt;
         &lt;/traceGroup&gt;
         &lt;traceGroup&gt;
            &lt;!-- rain --&gt;
            &lt;annotationXML href="#W3"/&gt;
            &lt;trace&gt;...&lt;/trace&gt;
         &lt;/traceGroup&gt;
         ... more words in paragraph
      &lt;/traceGroup&gt;
   &lt;/traceGroup&gt;
   &lt;traceGroup&gt;
       &lt;annotationXML href="#P2"/&gt;
       ... words in paragraph
   &lt;/traceGroup&gt;
   ... more paragraphs in chapter.
&lt;/ink&gt;
</pre>

<p>If it were not for the sharing of the substructure of the
attribute XML data, then each attribute word would be repeated
three times (as a word, in a paragraph, and in a chapter), each
paragraph would be repeated twice, etc.</p>
</div>

<div>
<h3 id="units">6.4 Units</h3>

<p>Units are used in several parts of ink mark up. For example
channels may report their values with some dimension, such as
length, requiring units. Other elements may give values, such as
resolution, as quantities in particular units.</p>

<p>The following abbreviations must be recognized as unit attribute
values.</p>

<table border="1" cellspacing="0" cellpadding="3" width="80%"
class="units" summary="">
<tbody>
<tr>
<th>Dimension</th>
<th>Unit</th>
<th>Interpretation</th>
</tr>

<tr>
<td>length</td>
<td>m</td>
<td>meters</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>cm</td>
<td>centimeters</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>mm</td>
<td>millimeters</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>in</td>
<td>inches</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>pt</td>
<td>points (1pt = 1/72 in)</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>pc</td>
<td>picas (1pc = 1/22 pt)</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>em</td>
<td>ems, the width of a letter "M" in a notional normal size</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>ex</td>
<td>exs, the height of a letter "x" in a notional normal size</td>
</tr>

<tr>
<td>time</td>
<td>s</td>
<td>seconds</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>ms</td>
<td>milliseconds</td>
</tr>

<tr>
<td>mass</td>
<td>kg</td>
<td>kilograms</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>g</td>
<td>grams</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>mg</td>
<td>milligrams</td>
</tr>

<tr>
<td>force</td>
<td>N</td>
<td>Newtons</td>
</tr>

<tr>
<td>angle</td>
<td>deg</td>
<td>degrees</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>rad</td>
<td>radians</td>
</tr>

<tr>
<td>all</td>
<td>%</td>
<td>percentage, expressed as a fraction (1.0 = 100%) relative to <em>max-min</em></td>
</tr>

<tr>
<td>&nbsp;</td>
<td>dev</td>
<td>quanta relative to a device resolution. This can correspond to
pixels, force levels, clock ticks, etc.</td>
</tr>
</tbody>
</table>

<p>In addition to the units named above, the following expressions
must also be recognized:</p>

<div class="units">
<pre xml:space="preserve">
unitExpr ::=
      unit    
    | "1"      "/" unit
    | unitExpr "/" unit
    | unitExpr "*" unit

unitPrimitive ::= unit | "(" unitExpr ")"

unit ::= <em>one of the units from the table above,
         with the exception of em, ex, % and dev.</em>
</pre>
</div>

<p>Other units are permitted, but need not be recognized by a
compliant application.</p>
</div>

<hr />
<h2 id="streamsAndArchives">7 Archives and Streams</h2>

<p>The ink markup is expected to be used in many different
scenarios. Ink markup data may be transmitted in substantially real
time while exchanging ink messages, or ink documents may be
archived for later retrieval or processing. InkML has been designed
with both of these uses in mind, and it is natural to use InkML in
a particular way in each of these settings.</p>

<p>These settings illustrate two different styles of ink generation
and usage. In the later, the markup must facilitate the incremental
transmission of a stream of ink data, while in the former, the
markup should provide the structure necessary for operations such
as search and interpretation. In order to support both cases, InkML
provides archival and streaming modes of usage. These are not
distinct and incompatible languages, but rather are two stylized
ways of using InkML.</p>

<h3 id="Archival">7.1 Archival Applications</h3>

<p>Archival applications typically handle ink data that has been
collected over some span of time and has some structure,
organization or interpretation associated to the ink data. These
applications may re-organize ink traces so it is preferable that
the traces be state-free. That is, in archival applications, to the
extent that ink traces make use of context information, this is
always done explicitly and never through the "current" context.</p>

<p>In archival usage, contextual elements occur within one or more
<code>&lt;definitions&gt;</code> elements and are assigned
identifiers using the id attribute. References to defined elements
are made using the corresponding <b>brushRef</b>,
<b>traceFormatRef</b>, and <b>contextRef</b> attributes. This is
illustrated in the following example:</p>

<pre class="ex" xml:space="preserve">
&lt;definitions&gt;
   &lt;brush xml:id="penA"/&gt;
   &lt;brush xml:id="penB"/&gt;
   &lt;traceFormat xml:id="fmt1"&gt;
      &lt;channel name="X" type="integer"/&gt;
      &lt;channel name="Y" type="integer"/&gt;
      &lt;channel name="Z" type="integer"/&gt;
   &lt;/traceFormat&gt;

   &lt;canvas xml:id="canvasA"&gt;
      &lt;traceFormat&gt;
         &lt;channel name="X" type="decimal" min="0" max="200" units="mm"/&gt;
         &lt;channel name="Y" type="decimal" min="0" max="150" units="mm"/&gt;
      &lt;/traceFormat&gt;
   &lt;/canvas&gt;
   &lt;canvasTransform xml:id="trans1"&gt;
      &lt;mapping type="affine"&gt;1 0 0 0,0 1 0 0&lt;/mapping&gt;
   &lt;/canvasTransform&gt;
   &lt;canvasTransform xml:id="trans2"&gt;
      &lt;mapping type="affine"&gt;2 0 0 0,0 -2 0 0&lt;/mapping&gt;
   &lt;/canvasTransform&gt;

   &lt;context xml:id="context1"
      canvasRef="#canvasA"
      canvasTransformRef="#trans1"
      traceFormatRef="#fmt1"
      brushRef="#penA"/&gt;

   &lt;context xml:id="context2"
      canvasRef="#canvasA"
      canvasTransformRef="#trans2"
      traceFormatRef="#fmt1"
      brushRef="#penB"/&gt;
&lt;/definitions&gt;
</pre>

<p>This example defines two brushes ("penA" and "penB"), a
traceFormat ("fmt1"), and two contexts ("context1" and "context2")
which both refer to the same canvas ("canvasA") and traceFormat
("fmt1"), but with different canvas transforms and brushes. Note
the use of the <b>brushRef</b>, <b>traceFormatRef</b>,
<b>canvasRef</b> and <b>canvasTransformRef</b> attributes to refer
to previously defined <code>&lt;brush&gt;</code>,
<code>&lt;traceFormat&gt;</code> <code>&lt;canvas&gt;</code> and
<code>&lt;canvasTransform&gt;</code> elements.</p>

<p>Within the scope of a <code>&lt;definitions&gt;</code> element,
unspecified attributes of a <code>&lt;context&gt;</code> element
are assumed to have their default values. The
<code>&lt;definitions&gt;</code> block below defines "context1",
which is comprised of "canvasA" with the default canvasTransform
and traceFormat (the identity mapping and a traceFormat consisting
of decimal X-Y coordinate pairs), and "penA".</p>

<pre class="ex" xml:space="preserve">
 &lt;definitions&gt;
    &lt;brush xml:id="penA"/&gt;
    &lt;context xml:id="context1"
      canvasRef="#canvasA"
      brushRef="#penA"/&gt;
&lt;/definitions&gt;
</pre>

<p>A <code>&lt;context&gt;</code> element can inherit and override
the values of a previously defined context by including a
contextRef attribute, so the following block defines "context2"
which shares the same canvas ("canvasA") and traceFormat (the
default format) as "context1", but has a different canvasTransform
and brush.</p>

<pre class="ex" xml:space="preserve">
&lt;definitions&gt;
   &lt;brush xml:id="penA"/&gt;
   &lt;context xml:id="context1"
      canvasRef="#canvasA"  
      canvasTransformRef="#trans1"/&gt;
   &lt;context xml:id="context2"
      contextRef="#context1"
      canvasTransformRef="#trans2"
      brushRef="#penA"/&gt;
&lt;/definitions&gt;
</pre>

<p>Within archival ink markup, traces can either explicitly specify
their context through the use of contextRef and brushRef
attributes, or they can have their context provided by an enclosing
traceGroup. In the following example, traces "t001" and "t003" have
the context defined by "context1", while trace "t002" has a context
consisting of the default canvas, canvasTransform and traceFormat,
and "penA".</p>

<pre class="ex" xml:space="preserve">
&lt;trace xml:id="t001" contextRef="#context1&quot;&gt;...&lt;/trace&gt;
&lt;trace xml:id="t002" brushRef="#penA&quot;&gt;...&lt;/trace&gt;

&lt;traceGroup contextRef="#context1"&gt;
   &lt;trace xml:id="t003"&gt;...&lt;/trace&gt;
&lt;/traceGroup&gt;
</pre>

<p>Traces within a <code>&lt;traceGroup&gt;</code> element can also
override the context or brush specified by the traceGroup. In the
following example, traces "t001" and "t003" have their context
specified by "context1" while trace "t002" overrides the default
brush of "context1" with "penA".</p>

<pre class="ex" xml:space="preserve">
&lt;traceGroup contextRef="#context1"&gt;
   &lt;trace xml:id="t001"&gt;...&lt;/trace&gt;
   &lt;trace xml:id="t002" brushRef="#penA"&gt;...&lt;/trace&gt;
   &lt;trace xml:id="t003"&gt;...&lt;/trace&gt;
&lt;/traceGroup&gt;
</pre>

<p>A trace or traceGroup can both reference a context and override
its brush, as in the following example which assigns the context
specified by "context1" to traces "t001" and "t002", but with
"penA" instead of the default brush.</p>

<pre class="ex" xml:space="preserve">
&lt;trace xml:id="t001" contextRef="#context1" brushRef="#penA"&gt;...&lt;/trace&gt;
&lt;traceGroup contextRef="#context1" brushRef="#penA"&gt;
    &lt;trace xml:id="t002"&gt;...&lt;/trace&gt;
&lt;/traceGroup&gt; 
</pre>

<p>In archival mode, the ink markup processor can straightforwardly
determine the context for a given trace by examining only the
<code>&lt;definitions&gt;</code> blocks within the markup and the
enclosing traceGroup for the trace.</p>

<h3 id="Streaming">7.2 Streaming Applications</h3>

<p>Streaming ink applications present digital ink traces in
sequential time order. Contextual information is inserted into the
stream of ink traces, as needed, to provide interpretation for the
ink strokes. These changes to the current trace context are given
by <code>&lt;context&gt;</code> elements. These may directly
contain brush, trace format and other information or which may
refer to previously seen such elements. This corresponds to an
event-driven model of ink generation, where events which result in
contextual changes map directly to elements in the markup.</p>

<p>The current context consists of the set of canvas,
canvasTransform, traceFormat and brush which are associated with
subsequent traces in the ink markup. Initially, the current context
contains the default canvas, an identity canvasTransform, the
default traceFormat, and a brush with no attributes. Each
<code>&lt;brush&gt;</code>, <code>&lt;traceFormat&gt;</code>, and
<code>&lt;context&gt;</code> element which appears outside of a
<code>&lt;definitions&gt;</code> element changes the current
context accordingly (elements appearing within a
<code>&lt;definitions&gt;</code> block have no effect on the
current context, and behave as described above in the archival
section).</p>

<p>The appearance of a <code>&lt;brush&gt;</code> element in the
ink markup sets the current brush attributes, leaving all other
contextual values the same. Likewise, the appearance of a
<code>&lt;traceFormat&gt;</code> element sets the current
traceFormat, and the appearance of a <code>&lt;context&gt;</code>
element sets the current context.</p>

<p>Outside of a <code>&lt;definitions&gt;</code> block, any values
which are not specified within a <code>&lt;context&gt;</code>
element are taken from the current context. For instance, the
<code>&lt;context&gt;</code> element in the following example
changes the current brush from "penB" to "penA", leaving the
canvas, canvasTransform, and traceFormat unchanged from trace
"t001" to trace "t002". That is, each context element is taken to
inherit from the previously established context.</p>

<pre class="ex" xml:space="preserve">
&lt;brush xml:id="penA"/&gt;
&lt;brush xml:id="penB"/&gt;
&lt;trace xml:id="t001"&gt;...&lt;/trace&gt;
&lt;context brushRef="#penA"/&gt;
&lt;trace xml:id="t002"&gt;...&lt;/trace&gt;
</pre>

<p>In order to change a contextual value back to its default value,
its attribute can be specified with the value "<strong>#DefaultCanvas</strong>" 
or &quot;<strong>#DefaultBrush</strong>&quot;. In the
following:</p>

<pre class="ex" xml:space="preserve">
&lt;context canvasRef="#canvasA" brushRef="#penA"/&gt;
&lt;trace xml:id="t001"&gt;...&lt;/trace&gt;
&lt;context canvasRef="#DefaultCanvas" brushRef="#DefaultBrush"/&gt;
&lt;trace xml:id="t002"&gt;...&lt;/trace&gt;
</pre>

<p>Trace "t001" is on "canvasA" and has the brush specified by
"penA", while trace "t002" is on the default canvas and has the
default brush.</p>

<p>Brushes, traceFormats, and contexts which appear outside of a
<code>&lt;definitions&gt;</code> block and contain an <b>id</b>
attribute both set the current context and define contextual
elements which can be reused (as shown above for the brushes "penA"
and "penB"). This example:</p>

<pre class="ex" xml:space="preserve">
&lt;context xml:id="context1"
    canvasRef="#canvasA"
    canvasTransformRef="#trans1"
    traceFormatRef="#fmt1"
    brushRef="#penA"/&gt;
</pre>

<p>defines a context which can be referred to by its identifier
"context1". It also sets the current context to the values
specified in the <code>&lt;context&gt;</code> element.</p>

<p>A previously defined context is referenced using the
<b>contextRef</b> attribute of the <code>&lt;context&gt;</code>
element. For example:</p>

<pre class="ex" xml:space="preserve">
&lt;context contextRef="#context1"/&gt;
</pre>

<p>sets the current context to have the values specified by
"context1". A <code>&lt;context&gt;</code> element can also
override values of a previously defined context by including both a
<b>contextRef</b> attribute and one or more of the
<b>canvasRef</b>, <b>canvasTransformRef</b>, <b>traceFormatRef</b>
or <b>brushRef</b> attributes. The following:</p>

<pre class="ex" xml:space="preserve">
&lt;context contextRef="#context1" brushRef="#penB"/&gt;
</pre>

<p>sets the current context to the values specified by "context1",
except that the current brush is set to "penB" instead of
"penA".</p>

<p>A <code>&lt;context&gt;</code> element which inherits and
overrides values from a previous context can itself be reused, so
the element:</p>

<pre class="ex" xml:space="preserve">
&lt;context xml:id="context2" contextRef="#context1" brushRef="#penB"/&gt;
</pre>

<p>defines "context2" which has the same context values as
"context1" except for the brush.</p>

<p>Finally, a <code>&lt;context&gt;</code> element with only an id
has the effect of taking a "snapshot" of the current context which
can then be reused. The element:</p>

<pre class="ex" xml:space="preserve">
&lt;context xml:id="context3"/&gt;
</pre>

<p>defines "context3", whose values consist of the current
canvasRef, canvasTransform, traceFormat, and brush at the point
where the element occurs (note that since "context3" does not
specify any values, the element has no effect on the current
context).</p>

<p>An advantage of the streaming style is that it is easier to
express overlapping changes to the individual elements of the
context. However, determining the context for a particular trace
can require more computation from the ink markup processor, since
the entire file may need to be scanned from the beginning in order
to establish the current context at the point of the
<code>&lt;trace&gt;</code> element.</p>

<p>While it is possible to wait and generate each trace as it is
completed, this can lead to considerable latency from the starting
time with long strokes.&nbsp; This may be avoided by
generating traces of partial strokes and using continuation
traces.</p>

<p>Finally, it should be noted that traces can overlap in
time.&nbsp; This can occur in collaborative applications with
several writers or with one user on "multi-touch" devices.&nbsp;
Here it is also possible to generate traces for complete strokes on
pen up, but applications may use partial strokes of limited time
duration to guarantee that a buffer restricted to a sliding time
window sees all simultaneous traces.</p>

<h3 id="Equivalence">7.3 Archival and Streaming Equivalence</h3>

<p>The following examples of archival and streaming ink markup data
are equivalent, but they highlight the differences between the two
styles:</p>

<p><em>Archival</em></p>

<div>
<pre class="ex" xml:space="preserve">
&lt;ink xmlns=&quot;http://www.w3.org/2003/InkML&quot;&gt;
   ...
   &lt;definitions&gt;
      &lt;brush xml:id="penA"/&gt;
      &lt;brush xml:id="penB"/&gt;
      &lt;context xml:id="context1"
         canvasRef="#canvas1"
         canvasTransformRef="#trans1"
         traceFormatRef="#format1"/&gt;
      &lt;context xml:id="context2"
         contextRef="#context1"
         canvasTransformRef="#trans2"/&gt;
   &lt;/definitions&gt;
   &lt;traceGroup contextRef="#context1"&gt;
        &lt;trace&gt;...&lt;/trace&gt;
        ...
   &lt;/traceGroup&gt;
   &lt;traceGroup contextRef="#context2"&gt;
        &lt;trace&gt;...&lt;/trace&gt;
        ...
   &lt;/traceGroup&gt;
   &lt;traceGroup contextRef="#context2" brushRef="#penB"&gt;
        &lt;trace&gt;...&lt;/trace&gt;
        ...
   &lt;/traceGroup&gt;
   &lt;traceGroup contextRef="#context1" brushRef="#penB"&gt;
        &lt;trace&gt;...&lt;/trace&gt;
        ...
   &lt;/traceGroup&gt;
   &lt;traceGroup contextRef="#context1" brushRef="#penA"&gt;
        &lt;trace&gt;...&lt;/trace&gt;
        ...
   &lt;/traceGroup&gt;
&lt;/ink&gt;
</pre>
</div>

<p><em>Streaming</em></p>

<div>
<pre class="ex" xml:space="preserve">
&lt;ink xmlns=&quot;http://www.w3.org/2003/InkML&quot;&gt;
   ...
   &lt;definitions&gt;
      &lt;brush xml:id="penA"/&gt;
      &lt;brush xml:id="penB"/&gt;
   &lt;/definitions&gt;
   &lt;context xml:id="context1"
      canvasRef="#canvas1"
      canvasTransformRef="#trans1"
      traceFormatRef="#format1"/&gt;
   &lt;trace&gt;...&lt;/trace&gt;
   ...
   &lt;context xml:id="context2"
      contextRef="#context1"
      canvasTransformRef="#trans2"/&gt;
   &lt;trace&gt;...&lt;/trace&gt;
   ...
   &lt;context brushRef="#penB"/&gt;
   &lt;trace&gt;...&lt;/trace&gt;
   ...
   &lt;context contextRef="#context1"/&gt;
   &lt;trace&gt;...&lt;/trace&gt;
   ...
   &lt;context brushRef="#penA"/&gt;
   &lt;trace&gt;...&lt;/trace&gt;
   ... 
&lt;/ink&gt;
</pre>
</div>

<p>In the archival case, the context for each trace is simply
determined by the <code>&lt;trace&gt;</code> element, its enclosing
traceGroup, and contextual elements defined in the
<code>&lt;definitions&gt;</code> block, while in the streaming
case, the context for a trace can depend on the entire sequence of
context changes up to the point of the <code>&lt;trace&gt;</code>
element.</p>

<p>However, the streaming case more simply expresses the changes of
context involving "penB", "context1", and "penA", whereas the
archival case requires the restatement of the unchanged values in
the successive traceGroups.</p>

<p>The two styles of ink markup are equally expressive, but impose
different requirements on the ink markup processor and generator.
Tools to translate from streaming to archival style might also be
of use to applications which work on stored ink markup.</p>
<h2 id="s8">8. Conformance</h2>
<p>The contents of this section are normative.</p>
<h3 id="s8.1">8.1 Conforming InkML Documents</h3>
<p>A document is a Conforming InkML Document if it meets both the following 
conditions:</p>
<ul>
	<li>It is a well-formed XML document [<a href="#XML">XML</a>] conforming to 
	Namespaces in XML [<a href="#XMLNS">XMLNS</a>].</li>
	<li>It adheres to the specification described in this document (InkML 
	Specification) including the constraints expressed in the Schema (see
	<a href="#xsd">Appendix E</a>) and having an XML Prolog and root element as 
	specified in <a href="#inkElement">Section 2.1</a>.</li>
</ul>
<p>The InkML specification and these conformance criteria provide no designated 
size limits on any aspect of InkML documents. There are no maximum values on the 
number of elements, the amount of character data, or the number of characters in 
attribute values.</p>
<p><span>Within this specification, the term URI refers to a Universal Resource 
Identifier as defined in [<a href="#RFC3986">RFC3986</a>] and extended in [<a href="#RFC3987">RFC3987</a>] 
with the new name IRI. The term URI has been retained in preference to IRI to 
avoid introducing new names for concepts such as &quot;Base URI&quot; that are defined or 
referenced across the whole family of XML specifications</span>.</p>
<h3 id="s8.2">8.2 Using InkML with other Namespaces</h3>
<p>The InkML namespace is intended to be used with other XML namespaces as per 
the Namespaces in XML Recommendation [<a href="#XMLNS">XMLNS</a>]. Future work 
by W3C is expected to address ways to specify conformance for documents 
involving multiple namespaces.</p>
<h3 id="s8.3">8.3 Conforming InkML Processors</h3>
<p>An InkML processor is a program that can process and/or generate Conforming 
InkML documents.</p>
<p>In a Conforming InkML Processor, the XML parser MUST be able to parse and 
process all XML constructs defined by XML 1.1 [<a href="#XML">XML</a>] and 
Namespaces in XML [<a href="#XMLNS">XMLNS</a>]. It is not required that a 
Conforming InkML Processor uses a validating XML parser.</p>
<p>A Conforming InkML Processor MUST correctly understand and apply the semantics 
of each markup element or attribute as described by this document.</p>
<p>There is, however, no conformance requirement with respect to performance 
characteristics of the InkML Processor. For instance, no statement is required 
regarding the accuracy, speed or other characteristics of output produced by the 
processor. No statement is made regarding the size of input that a InkML 
Processor is required to support.</p>

<hr />
<div>
<h2 id="acknowledgements">A Acknowledgements</h2>

<p>We thank our colleagues at IBM for providing their work in 2002
as a starting point for this definition.</p>

<p>We thank all participants in the InkML activity of the
Multimodal Interaction Working Group for the many detailed
constructive discussions. Without the participants' desire to
obtain the best outcome, regardless of corporate affiliation, this
work would not have been possible.</p>

<p>We specifically thank the W3C staff who have supported the InkML
activity: Max Froumentin who served as a staff member of W3C until
2006 and served as editor of previous working drafts and Kazuyuki
Ashimura who then took responsibility for the InkML activity at W3C
and has provided continuous energy and support.</p>

<p>Finally, we thank Deborah Dahl, whose stewardship of the W3C
Multimodal Interaction Working Group has provided the perfect
environment for this work to come to fruition.</p>

<h2 id="guidelines">B Implementation Guidelines</h2>

<p>The following are informative implementation guidelines for
reducing InkML file size and environmental interactions.</p>

<ol>
<li>Gzip compression. 

<p class="style2">The lossless gzip compression [<cite><a
href="#RFC1952">RFC1952</a></cite>] will help to reduce the InkML
file size considerably.&nbsp; It is recommend that applications
have the facility to compress and decompress InkML files and
streams using the gzip algorithm.</p>

<p class="style2">The lossless gzip compression [<cite><a
href="#RFC1952">RFC1952</a></cite>] will help to reduce the InkML
file size</p>
</li>

<li>Authoring tips 

<p class="style2">The elements which define constructs that can be
referenced repeatedly such as <code>&lt;brush&gt;</code>
definitions, and <strong><span
class="style1">&lt;traceFormat&gt;</span></strong> definitions
should be placed within a <strong><span
class="style1">&lt;definition&gt;</span></strong> element and
referred to in required places such as <strong><span
class="style1">&lt;trace&gt;</span></strong> elements.</p>

<p class="style2">Applications should take advantage of trace data
prefixes (' | " | *) for defining relative coordinate values.&nbsp;
The use of first and second order derivative coordinates can
effectively compress <strong><span
class="style1">&lt;trace&gt;</span></strong> element data
losslessly.</p>

<p class="style2">Applications should make use of the 'current
context' to cache the context property values and hence reduce the
context property markups that are being sent explicitly along with
trace data.</p>
</li>

<li>InkML transmission 

<p class="style2">Any of the usual XML protocols (StAX, SOAP, etc)
may be used to transmit InkML documents or fragments between
subprograms or distributed programs.</p>
</li>

<li>Network streaming 

<p class="style2">Client and server applications that wish to
stream InkML should have the capability to process the data sent in
multiple fragments of InkML packets.&nbsp; The receipt of such
InkML fragments may progressively render on the client or
clients.</p>
</li>
</ol>

<h2 id="references">C References</h2>

<dl>
<dt><a id="DC" name="DC">[DC]</a></dt>

<dd><cite><a href="http://dublincore.org/documents/dces/">Dublin
Core Metadata Element Set, Version 1.1: Reference
Description</a></cite>. http://dublincore.org/documents/dces/
.</dd>

<dt><a id="RDF-SYNTAX" name="RDF-SYNTAX">[RDF-SYNTAX]</a></dt>

<dd><cite><a
href="http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/">RDF/XML
Syntax Specification (Revised)</a></cite>, D. Beckett, Editor, W3C
Recommendation, 10 February 2004,
http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/ .

<a href="http://www.w3.org/TR/rdf-syntax-grammar/">Latest version</a>
available at http://www.w3.org/TR/rdf-syntax-grammar/ .</dd>

<dt><a id="RFC1952" name="RFC1952">[RFC1952]</a></dt>

<dd><cite><a href="http://www.ietf.org/rfc/rfc1952.txt">GZIP file
format specification version 4.3</a></cite>. IETF RFC 1952.
http://www.ietf.org/rfc/rfc1952.txt .</dd>

<dt><a id="RFC3023" name="RFC3023"></a>[RFC3023]</dt>

<dd><cite><a href="http://www.ietf.org/rfc/rfc3023.txt">XML Media
Types</a></cite>. IETF RFC 3023.
http://www.ietf.org/rfc/rfc3023.txt .</dd>

<dt id="XML">[XML]</dt>

<dd><cite><a href="http://www.w3.org/TR/2006/REC-xml11-20060816/">Extensible Markup Language (XML) 1.1 (Second Edition)</a></cite>, Tim Bray et al., Editors, W3C Recommendation, 16 August 2006, http://www.w3.org/TR/2006/REC-xml11-20060816/ . <a href="http://www.w3.org/TR/xml11/">Latest version</a> available at http://www.w3.org/TR/xml11/ .</dd>

<dt id="XMLNS">[XMLNS]</dt>

<dd><cite><a href="http://www.w3.org/TR/2006/REC-xml-names11-20060816/">Namespaces in XML 1.1 (Second Edition)</a></cite>, Tim Bray et al., Editors, W3C Recommendation, 16 August 2006, http://www.w3.org/TR/2006/REC-xml-names11-20060816/ . <a href="http://www.w3.org/TR/xml-names11/">Latest version</a> available at http://www.w3.org/TR/xml-names11/ .</dd>

<dt><a id="XMLSCHEMA2" name="XMLSCHEMA2">[XMLSCHEMA2]</a></dt>

<dd><cite><a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/">XML Schema Part 2: Datatypes Second Edition</a></cite>, A. Malhotra, P. V. Biron,
Editors, W3C Recommendation, 28 October 2004, http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/ . <a href="http://www.w3.org/TR/xmlschema-2/">Latest version</a> available at http://www.w3.org/TR/xmlschema-2/ .</dd>

<dt><a id="MATHML2" name="MATHML2">[MATHML2]</a></dt>

<dd><cite><a
href="http://www.w3.org/TR/2003/REC-MathML2-20031021/">Mathematical Markup Language (MathML) Version 2.0 (Second Edition)</a></cite>, David Carlisle,
Patrick Ion,
Robert Miner,
Nico Poppelier, Editors, W3C Recommendation, 21 October 2003,
http://www.w3.org/TR/2003/REC-MathML2-20031021/ . <a
href="http://www.w3.org/TR/MathML2/">Latest version</a>
http://www.w3.org/TR/MathML2/ .</dd>

<dt><a id="RFC3986" name="RFC3986">[RFC3986]</a></dt>

<dd><cite><a href="http://www.ietf.org/rfc/rfc3986.txt">Uniform
Resource Identifier (URI): Generic Syntax.</a></cite> IETF RFC
3986. http://www.ietf.org/rfc/rfc3986.txt, January 2005</dd>

<dt><a id="RFC3987" name="RFC3987">[RFC3987]</a></dt>

<dd><cite><a
href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized
Resource Identifiers (IRIs).</a></cite> IETF RFC 3987,
http://www.ietf.org/rfc/rfc3987.txt, January 2005.</dd>

<dt><a id="EBNF" name="EBNF">[EBNF]</a></dt>

<dd><cite><a
href="http://standards.iso.org/ittf/PubliclyAvailableStandards/s026153_ISO_IEC_14977_1996(E).zip">
Information technology — Syntactic metalanguage — Extended
BNF</a></cite>, International Organization for Standardization,
1996.<br />
Available at
http://standards.iso.org/ittf/PubliclyAvailableStandards/s026153_ISO_IEC_14977_1996(E).zip.
<!--
This specification uses the subset of EBNF defined in the <a
href="http://www.w3.org/TR/2006/REC-xml-20060816/#sec-notation">Notation</a>
section of <cite class="w3crec"><a
href="http://www.w3.org/TR/2006/REC-xml-20060816/">Extensible
Markup Language (XML) 1.0 (Fourth Edition)</a></cite>.
-->
</dd>
</dl>
</div>

<div>
<h2 id="mime-definition">D The InkML Media Type</h2>

<p>This appendix registers a new MIME media type,
"<code>application/inkml+xml</code>".</p>

<p>The
"<code>application/inkml+xml</code>"
media type is 
registered with IANA at
<a href="http://www.iana.org/assignments/media-types/application/">
http://www.iana.org/assignments/media-types/application/</a>.
</p>

<div>
<h3 id="media-type-registration">D.1 Registration of MIME media
type application/inkml+xml</h3>

<dl>
<dt>MIME media type name:</dt>

<dd>
<p><code>application</code></p>
</dd>

<dt>MIME subtype name:</dt>

<dd>
<p><code>inkml+xml</code></p>
</dd>

<dt>Required parameters:</dt>

<dd>
<p>None.</p>
</dd>

<dt>Optional parameters:</dt>

<dd>
<p><code>charset</code></p>
<p>This parameter has identical semantics to the
<code>charset</code> parameter of the <code>application/xml</code>
media type as specified in [<cite><a
href="#RFC3023">RFC3023</a></cite>] or its successor.</p>
</dd>

<dt>Encoding considerations:</dt>

<dd>
<p>By virtue of InkML content being XML, it has the same
considerations when sent as "<code>application/inkml+xml</code>" as
does XML. See RFC 3023 (or its successor), section 3.2.</p>
</dd>

<dt>Security considerations:</dt>

<dd>
<p>InkML elements may include arbitrary URIs.

Therefore the security issues of
[<cite><a href="#RFC3986">RFC3986</a></cite>], section 7, should be
considered.</p>

<p>In addition, because of the extensibility features for InkML, it
is possible that "<code>application/inkml+xml</code>" may describe
content that has security implications beyond those described here.
However, if the processor follows only the normative semantics of
this specification, this content will be ignored. Only in the case
where the processor recognizes and processes the additional
content, or where further processing of that content is dispatched
to other processors, would security issues potentially arise. And
in that case, they would fall outside the domain of this
registration document.</p>
</dd>

<dt>Interoperability considerations:</dt>

<dd>
<p>This specification describes processing semantics that dictate
behavior that must be followed when dealing with, among other
things, unrecognized elements.</p>

<p>Because InkML is extensible, conformant
"<code>application/inkml+xml</code>" processors MAY expect that
content received is well-formed XML, but processors SHOULD NOT
assume that the content is valid InkML or expect to recognize all of
the elements and attributes in the document.</p>
</dd>

<dt>Published specification:</dt>

<dd>
<p>This media type registration is extracted from Appendix D of
the <a href="http://www.w3.org/TR/InkML/">Ink Markup Language
(InkML)</a> specification.</p>
</dd>

<dt>Additional information:</dt>

<dd>
<dl>
<dt>Magic number(s):</dt>

<dd>
<p>There is no single initial octet sequence that is always present
in InkML documents.</p>
</dd>

<dt>File extension(s):</dt>

<dd>
<p>InkML documents are most often identified with the extensions
"<code>.ink</code>" or "<code>.inkml</code>".</p>
</dd>

<dt>Macintosh File Type Code(s):</dt>

<dd>
<p>TEXT</p>
</dd>
</dl>
</dd>

<dt>Person &amp; email address to contact for further
information:</dt>

<dd>
<p>Kazuyuki Ashimura, &lt;<a
href="mailto:ashimura@w3.org">ashimura@w3.org</a>&gt;.</p>
</dd>

<dt>Intended usage:</dt>

<dd>
<p>COMMON</p>
</dd>

<dt>Author/Change controller:</dt>

<dd>
<p>The InkML specification is a work product of the World Wide Web
Consortium's Multimodal Interaction Working Group. The W3C has
change control over these specifications.</p>
</dd>
</dl>
</div>

<div>
<h3 id="media-type-fragid">D.2 Fragment Identifiers</h3>

<p>For documents labeled as "<code>application/inkml+xml</code>",
the fragment identifier notation is exactly that for
"<code>application/xml</code>", as specified in RFC 3023.</p>

<h2 id="xsd">E XML Schema</h2>

<p>This section defines the formal syntax for InkML documents in
terms of a normative XML Schema.</p>

<p>The latest version of the XML Schema for InkML is available at
<a href="http://www.w3.org/TR/InkML/inkml.xsd"> 
http://www.w3.org/TR/InkML/inkml.xsd</a>.</p>

<p>For stability it is RECOMMENDED that you use the dated URI available at 
<a href="http://www.w3.org/TR/2011/REC-InkML-20110920/inkml.xsd">
http://www.w3.org/TR/2011/REC-InkML-20110920/inkml.xsd</a>.</p>

</div>
</div>

</body>
</html>