index.html 542 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 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 14138 14139 14140 14141 14142 14143 14144 14145 14146 14147 14148 14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 14292 14293 14294 14295 14296 14297 14298 14299 14300 14301 14302 14303 14304 14305 14306 14307 14308 14309 14310 14311 14312 14313 14314 14315 14316 14317 14318 14319 14320 14321 14322 14323 14324 14325 14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 14336 14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 14350 14351 14352 14353 14354 14355 14356 14357 14358 14359 14360 14361 14362 14363 14364 14365 14366 14367 14368 14369 14370 14371 14372 14373 14374 14375 14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 14428 14429 14430 14431 14432 14433 14434 14435 14436 14437 14438 14439 14440 14441 14442 14443 14444 14445 14446 14447 14448 14449 14450 14451 14452 14453 14454 14455 14456 14457 14458 14459 14460 14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 14478 14479 14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 14518 14519 14520 14521 14522 14523 14524 14525 14526 14527 14528 14529 14530 14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587 14588 14589 14590 14591 14592 14593 14594 14595 14596 14597 14598 14599 14600 14601 14602 14603 14604 14605 14606 14607 14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14648 14649 14650 14651 14652 14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 14664 14665 14666 14667 14668 14669 14670 14671 14672 14673 14674 14675 14676 14677 14678 14679 14680 14681 14682 14683 14684 14685 14686 14687 14688 14689 14690 14691 14692 14693 14694 14695 14696 14697 14698 14699 14700 14701 14702 14703 14704 14705 14706 14707 14708 14709 14710 14711 14712 14713 14714 14715 14716 14717 14718 14719 14720 14721 14722 14723 14724 14725 14726 14727 14728 14729 14730 14731 14732 14733 14734 14735 14736 14737 14738 14739 14740 14741 14742 14743 14744 14745 14746 14747 14748 14749 14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 14764 14765 14766 14767 14768 14769 14770 14771 14772 14773 14774 14775 14776 14777 14778 14779 14780 14781 14782 14783 14784 14785 14786 14787 14788 14789 14790 14791 14792 14793 14794 14795 14796 14797 14798 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888 14889 14890 14891 14892 14893 14894 14895 14896 14897 14898 14899 14900 14901 14902 14903 14904 14905 14906 14907 14908 14909 14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 14947 14948 14949 14950 14951 14952 14953 14954 14955 14956 14957 14958 14959 14960 14961 14962 14963 14964 14965 14966 14967 14968 14969 14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15126 15127 15128 15129 15130 15131 15132 15133 15134 15135 15136 15137 15138 15139 15140 15141 15142 15143 15144 15145 15146 15147 15148 15149 15150 15151 15152 15153 15154 15155 15156 15157 15158 15159 15160 15161 15162 15163 15164 15165 15166 15167 15168 15169 15170 15171 15172 15173 15174 15175 15176 15177 15178 15179 15180 15181 15182 15183 15184 15185 15186 15187 15188 15189 15190 15191 15192 15193 15194 15195 15196 15197 15198 15199 15200 15201 15202 15203 15204 15205 15206 15207 15208 15209 15210 15211 15212 15213 15214 15215 15216 15217 15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231 15232 15233 15234 15235 15236 15237 15238 15239 15240 15241 15242 15243 15244 15245 15246 15247 15248 15249 15250 15251 15252 15253 15254 15255 15256 15257 15258 15259 15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 15287 15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 15330 15331 15332 15333 15334 15335 15336 15337 15338 15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15352 15353 15354 15355 15356 15357 15358 15359 15360 15361 15362 15363 15364 15365 15366 15367 15368 15369 15370 15371 15372 15373 15374 15375 15376 15377 15378 15379 15380 15381 15382 15383 15384 15385 15386 15387 15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452 15453 15454 15455 15456 15457 15458 15459 15460 15461 15462 15463 15464 15465 15466 15467 15468 15469 15470 15471 15472 15473 15474 15475 15476 15477 15478 15479 15480 15481 15482 15483 15484 15485 15486 15487 15488 15489 15490 15491 15492 15493 15494 15495 15496 15497 15498 15499 15500 15501 15502 15503 15504 15505 15506 15507 15508 15509 15510 15511 15512 15513 15514 15515 15516 15517 15518 15519 15520 15521 15522 15523 15524 15525 15526 15527 15528 15529 15530 15531 15532 15533 15534 15535 15536 15537 15538 15539 15540 15541 15542 15543 15544 15545 15546 15547 15548 15549 15550 15551 15552 15553 15554 15555 15556 15557 15558 15559 15560 15561 15562 15563 15564 15565 15566 15567 15568 15569 15570 15571 15572 15573 15574 15575 15576 15577 15578 15579 15580 15581 15582 15583 15584 15585 15586 15587 15588 15589 15590 15591 15592 15593 15594 15595 15596 15597 15598 15599 15600 15601 15602 15603 15604 15605 15606 15607 15608 15609 15610 15611 15612 15613 15614 15615 15616 15617 15618 15619 15620 15621 15622 15623 15624 15625 15626 15627 15628 15629 15630 15631 15632 15633 15634 15635 15636 15637 15638 15639 15640 15641 15642 15643 15644 15645 15646 15647 15648 15649 15650 15651 15652 15653 15654 15655 15656 15657 15658 15659 15660 15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 15691 15692 15693 15694 15695 15696 15697 15698 15699 15700 15701 15702 15703 15704 15705 15706 15707 15708 15709 15710 15711 15712 15713 15714 15715 15716 15717 15718 15719 15720 15721 15722 15723 15724 15725 15726 15727 15728 15729 15730 15731 15732 15733 15734 15735 15736 15737 15738 15739 15740 15741 15742 15743 15744 15745 15746 15747 15748 15749 15750 15751 15752 15753 15754 15755 15756 15757 15758 15759 15760 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 15772 15773 15774 15775 15776 15777 15778 15779 15780 15781 15782 15783 15784 15785 15786 15787 15788 15789 15790 15791 15792 15793 15794 15795 15796 15797 15798 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 15828 15829 15830 15831 15832 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 15848 15849 15850 15851 15852 15853 15854 15855 15856 15857 15858 15859 15860 15861 15862 15863 15864 15865 15866 15867 15868 15869 15870 15871 15872 15873 15874 15875 15876 15877 15878 15879 15880 15881 15882 15883 15884 15885 15886 15887 15888 15889 15890 15891 15892 15893 15894 15895 15896 15897 15898 15899 15900 15901 15902 15903 15904 15905 15906 15907 15908 15909 15910 15911 15912 15913 15914 15915 15916 15917 15918 15919 15920 15921 15922 15923 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 15938 15939 15940 15941 15942 15943 15944
<?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" xml:lang="en"
lang="en">
<head>
<title>Voice Extensible Markup Language (VoiceXML) Version
2.0</title>
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8" />
<style type="text/css" xml:space="preserve">
body {
font-family: sans-serif;
margin-left: 10%;
margin-right: 5%;
color: black;
background-color: white;
}
h2,h3,h4,h5,h5,h6 {
font-weight: normal;
color: rgb(0, 92, 160);
}
img { color: white; border: 0; }
h2 { margin-top: 2em; clear: both; }
.tocline { list-style: none; }
div.navbar,div.head { margin-bottom: 1em; }
div.navbar { text-align: center; }
p.copyright { font-size: 70%; }
pre.example {
   font-family: "Courier New", monospace;
   white-space: pre;
   background-color: rgb(204,204,255);
   padding: 0.5em;
   border: none;
   margin-left: 0;
   font-size: 90%;
   width: 97%;
}
.fig { text-align: center }
.new { color: blue }
.remove { text-decoration: line-through }
.diff { color: red }
.changes { color: red }
.hide { display: none }
.issues {
        font-style: italic;
        color: green;
}
</style>

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

<!--- CHAPTER 1: BEGIN =-->
<h1 class="notoc" id="Voice">Voice Extensible Markup Language
(VoiceXML) Version 2.0</h1>

<h2 class="notoc" id="Working">W3C Recommendation 16 March 2004</h2>

<dl>
<dt>This Version:</dt>

<dd><a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/"
shape="rect">http://www.w3.org/TR/2004/REC-voicexml20-20040316/</a></dd>

<dt>Latest Version:</dt>

<dd><a href="http://www.w3.org/TR/voicexml20/"
shape="rect">http://www.w3.org/TR/voicexml20/</a></dd>

<dt>Previous Version:</dt>

<dd><a href="http://www.w3.org/TR/2004/PR-voicexml20-20040203/"
shape="rect">http://www.w3.org/TR/2004/PR-voicexml20-20040203/</a></dd>

<dt>Editors:</dt>

<dd>Scott McGlashan, Hewlett-Packard (Editor-in-Chief)<br
clear="none" />
 Daniel C. Burnett, Nuance Communications<br />
 Jerry Carter, Invited Expert<br />
 Peter Danielsen, Lucent (until October 2002)<br />
 Jim Ferrans, Motorola<br />
 Andrew Hunt, ScanSoft<br />
 Bruce Lucas, IBM<br />
 Brad Porter, Tellme Networks<br />
 Ken Rehor, Vocalocity<br />
 Steph Tryphonas, Tellme Networks</dd>
</dl>

<p>Please refer to the <a href=
"http://www.w3.org/2004/03/voicexml20-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=voicexml20"><strong>translations</strong></a>.</p>



<p class="copyright"><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
shape="rect">Copyright</a> &#169; 2004 <a
href="http://www.w3.org/" shape="rect"><acronym
title="World Wide Web Consortium">W3C</acronym></a><sup>&#174;</sup>
(<a href="http://www.csail.mit.edu/" shape="rect"><acronym
title="Massachusetts Institute of Technology">MIT</acronym></a>,
<a href="http://www.ercim.org/" shape="rect"><acronym
title="European Research Consortium for Informatics and Mathematics">
ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/"
shape="rect">Keio</a>), All Rights Reserved. W3C <a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer"
 shape="rect">liability</a>, <a
href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks"
 shape="rect">trademark</a>, <a
href="http://www.w3.org/Consortium/Legal/copyright-documents"
shape="rect">document use</a> and <a
href="http://www.w3.org/Consortium/Legal/copyright-software"
shape="rect">software licensing</a> rules apply.</p>

<hr title="Separator for header" />
</div>

<h2 class="notoc" id="Abstract001"><a id="abstract"
name="abstract" shape="rect">Abstract</a></h2>

<p>This document specifies VoiceXML, the Voice Extensible Markup
Language. VoiceXML is designed for creating audio dialogs that
feature synthesized speech, digitized audio, recognition of
spoken and DTMF key input, recording of spoken input, telephony,
and mixed initiative conversations. Its major goal is to bring
the advantages of Web-based development and content delivery to
interactive voice response applications.</p>

<h2 id="Status">Status of this Document</h2>

<p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at http://www.w3.org/TR/.</em></p>

<p>This document has been reviewed by W3C Members and other
interested parties, and it has been endorsed by the Director
as a <a
href="http://www.w3.org/2004/02/Process-20040205/tr.html#RecsW3C">W3C
Recommendation</a>. W3C's role in making the Recommendation is to
draw attention to the specification and to promote its widespread
deployment. This enhances the functionaility and interoperability
of the Web.</p>

<p>This specification is part of the W3C Speech Interface Framework
and has been developed within the <a href=
"http://www.w3.org/Voice/">W3C Voice Browser Activity</a><span
class="hide"><a href=
"http://www.w3.org/Voice/Activity.html"></a></span> by participants in
the <a href="http://www.w3.org/Voice/Group/">Voice Browser Working
Group</a> (<a href="http://cgi.w3.org/MemberAccess/AccessRequest">W3C
Members only</a>).</p>

<p>The design of VoiceXML 2.0 has been widely reviewed (see the
<a href=
"http://www.w3.org/TR/2004/PR-voicexml20-20040203/disposition.htm">
disposition of comments</a>) and satisfies the Working Group's <a
href=
"http://www.w3.org/TR/voice-dialog-reqs/">technical requirements</a>.
A list of implementations is included in the <a href=
"http://www.w3.org/Voice/2004/vxml-ir/">VoiceXML 2.0 implementation report</a>, along with the associated test suite.</p>

<p>Comments are welcome on <a
href="mailto:www-voice@w3.org">www-voice@w3.org</a> (<a
href="http://lists.w3.org/Archives/Public/www-voice/">archive</a>).
See <a href="http://www.w3.org/Mail/">W3C mailing list and archive usage
guidelines</a>.</p>

<p>The W3C maintains a list of <a href=
"http://www.w3.org/2001/09/voice-disclosures.html">any patent
disclosures related to this work</a>.</p>

<h2 id="Convention">Conventions of this Document</h2>

<p>In this document, the key words "must", "must not",
"required", "shall", "shall not", "should", "should not",
"recommended", "may", and "optional" are to be interpreted as
described in <a href="#ref_RFC2119" shape="rect">[RFC2119]</a>
and indicate requirement levels for compliant VoiceXML
implementations.</p>

<h2 class="notoc" id="Table"><a name="toc" id="toc"
shape="rect">Table of Contents</a></h2>

<h3 id="Abbreviate">Abbreviated Contents</h3>

<ul>
<li class="tocline">1. <a href="#dml1"
shape="rect">Overview</a></li>

<li class="tocline">2. <a href="#dml2" shape="rect">Dialog
Constructs</a></li>

<li class="tocline">3. <a href="#dml3" shape="rect">User
Input</a></li>

<li class="tocline">4. <a href="#dml4" shape="rect">System
Output</a></li>

<li class="tocline">5. <a href="#dml5" shape="rect">Control flow
and scripting</a></li>

<li class="tocline">6. <a href="#dml6" shape="rect">Environment
and Resources</a></li>

<li class="tocline"><a href="#dml7"
shape="rect">Appendices</a></li>
</ul>

<h3 id="Full">Full Contents</h3>

<ul>
<li class="tocline">1. <a href="#dml1" shape="rect">Overview</a> 

<ul>
<li class="tocline">1.1 <a href="#dml1.1"
shape="rect">Introduction</a></li>

<li class="tocline">1.2 <a href="#dml1.2"
shape="rect">Background</a> 

<ul>
<li class="tocline">1.2.1 <a href="#dml1.2.1"
shape="rect">Architectural Model</a></li>

<li class="tocline">1.2.2 <a href="#dml1.2.2" shape="rect">Goals
of VoiceXML</a></li>

<li class="tocline">1.2.3 <a href="#dml1.2.3" shape="rect">Scope
of VoiceXML</a></li>

<li class="tocline">1.2.4 <a href="#dml1.2.4"
shape="rect">Principles of Design</a></li>

<li class="tocline">1.2.5 <a href="#dml1.2.5"
shape="rect">Implementation Platform Requirements</a></li>
</ul>
</li>

<li class="tocline">1.3 <a href="#dml1.3"
shape="rect">Concepts</a> 

<ul>
<li class="tocline">1.3.1 <a href="#dml1.3.1"
shape="rect">Dialogs and Subdialogs</a></li>

<li class="tocline">1.3.2 <a href="#dml1.3.2"
shape="rect">Sessions</a></li>

<li class="tocline">1.3.3 <a href="#dml1.3.3"
shape="rect">Applications</a></li>

<li class="tocline">1.3.4 <a href="#dml1.3.4"
shape="rect">Grammars</a></li>

<li class="tocline">1.3.5 <a href="#dml1.3.5"
shape="rect">Events</a></li>

<li class="tocline">1.3.6 <a href="#dml1.3.6"
shape="rect">Links</a></li>
</ul>
</li>

<li class="tocline">1.4 <a href="#dml1.4" shape="rect">VoiceXML
Elements</a></li>

<li class="tocline">1.5 <a href="#dml1.5" shape="rect">Document
Structure and Execution</a> 

<ul>
<li class="tocline">1.5.1 <a href="#dml1.5.1"
shape="rect">Execution within one Document</a></li>

<li class="tocline">1.5.2 <a href="#dml1.5.2"
shape="rect">Executing a Multi-Document Application</a></li>

<li class="tocline">1.5.3 <a href="#dml1.5.3"
shape="rect">Subdialogs</a></li>

<li class="tocline">1.5.4 <a href="#dml1.5.4" shape="rect">Final
Processing</a></li>
</ul>
</li>
</ul>
</li>

<li class="tocline">2. <a href="#dml2" shape="rect">Dialog
Constructs</a> 

<ul>
<li class="tocline">2.1 <a href="#dml2.1" shape="rect">Forms</a> 

<ul>
<li class="tocline">2.1.1 <a href="#dml2.1.1" shape="rect">Form
Interpretation</a></li>

<li class="tocline">2.1.2 <a href="#dml2.1.2" shape="rect">Form
Items</a></li>

<li class="tocline">2.1.3 <a href="#dml2.1.3" shape="rect">Form
Item Variables and Conditions</a></li>

<li class="tocline">2.1.4 <a href="#dml2.1.4"
shape="rect">Directed Forms</a></li>

<li class="tocline">2.1.5 <a href="#dml2.1.5" shape="rect">Mixed
Initiative Forms</a></li>

<li class="tocline">2.1.6 <a href="#dml2.1.6" shape="rect">Form
Interpretation Algorithm</a></li>
</ul>
</li>

<li class="tocline">2.2 <a href="#dml2.2" shape="rect">Menus</a> 

<ul>
<li class="tocline">2.2.1 <a href="#dml2.2.1"
shape="rect">menu element</a></li>

<li class="tocline">2.2.2 <a href="#dml2.2.2"
shape="rect">choice element</a></li>

<li class="tocline">2.2.3 <a href="#dml2.2.3" shape="rect">DTMF
in Menus</a></li>

<li class="tocline">2.2.4 <a href="#dml2.2.4"
shape="rect">enumerate element</a></li>

<li class="tocline">2.2.5 <a href="#dml2.2.5"
shape="rect">Grammar Generation</a></li>

<li class="tocline">2.2.6 <a href="#dml2.2.6"
shape="rect">Interpretation Model</a></li>
</ul>
</li>

<li class="tocline">2.3 <a href="#dml2.3" shape="rect">Form
Items</a> 

<ul>
<li class="tocline">2.3.1 <a href="#dml2.3.1"
shape="rect">field element</a></li>

<li class="tocline">2.3.2 <a href="#dml2.3.2"
shape="rect">block element</a></li>

<li class="tocline">2.3.3 <a href="#dml2.3.3"
shape="rect">initial element</a></li>

<li class="tocline">2.3.4 <a href="#dml2.3.4"
shape="rect">subdialog element</a></li>

<li class="tocline">2.3.5 <a href="#dml2.3.5"
shape="rect">object element</a></li>

<li class="tocline">2.3.6 <a href="#dml2.3.6"
shape="rect">record element</a></li>

<li class="tocline">2.3.7 <a href="#dml2.3.7"
shape="rect">transfer element</a></li>
</ul>
</li>

<li class="tocline">2.4 <a href="#dml2.4"
shape="rect">Filled</a></li>

<li class="tocline">2.5 <a href="#dml2.5"
shape="rect">Links</a></li>
</ul>
</li>

<li class="tocline">3. <a href="#dml3" shape="rect">User
Input</a> 

<ul>
<li class="tocline">3.1 <a href="#dml3.1"
shape="rect">Grammars</a> 

<ul>
<li class="tocline">3.1.1 <a href="#dml3.1.1" shape="rect">Speech
Grammars</a></li>

<li class="tocline">3.1.2 <a href="#dml3.1.2" shape="rect">DTMF
Grammars</a></li>

<li class="tocline">3.1.3 <a href="#dml3.1.3" shape="rect">Scope
of Grammars</a></li>

<li class="tocline">3.1.4 <a href="#dml3.1.4"
shape="rect">Activation of Grammars</a></li>

<li class="tocline">3.1.5 <a href="#dml3.1.5"
shape="rect">Semantic Interpretation of Input</a></li>

<li class="tocline">3.1.6 <a href="#dml3.1.6"
shape="rect">Mapping Semantic Interpretation Results to VoiceXML
forms</a></li>
</ul>
</li>
</ul>
</li>

<li class="tocline">4. <a href="#dml4" shape="rect">System
Output</a> 

<ul>
<li class="tocline">4.1 <a href="#dml4.1" shape="rect">Prompt</a>


<ul>
<li class="tocline">4.1.1 <a href="#dml4.1.1" shape="rect">Speech
Markup</a></li>

<li class="tocline">4.1.2 <a href="#dml4.1.2" shape="rect">Basic
Prompts</a></li>

<li class="tocline">4.1.3 <a href="#dml4.1.3" shape="rect">Audio
Prompting</a></li>

<li class="tocline">4.1.4 <a href="#dml4.1.4"
shape="rect">&lt;value&gt; Element</a></li>

<li class="tocline">4.1.5 <a href="#dml4.1.5"
shape="rect">Bargein</a></li>

<li class="tocline">4.1.6 <a href="#dml4.1.6" shape="rect">Prompt
Selection</a></li>

<li class="tocline">4.1.7 <a href="#dml4.1.7"
shape="rect">Timeout</a></li>

<li class="tocline">4.1.8 <a href="#dml4.1.8" shape="rect">Prompt
Queueing and Input Collection</a></li>
</ul>
</li>
</ul>
</li>

<li class="tocline">5. <a href="#dml5" shape="rect">Control flow
and scripting</a> 

<ul>
<li class="tocline">5.1 <a href="#dml5.1" shape="rect">Variables
and Expressions</a> 

<ul>
<li class="tocline">5.1.1 <a href="#dml5.1.1"
shape="rect">Declaring Variables</a></li>

<li class="tocline">5.1.2 <a href="#dml5.1.2"
shape="rect">Variable Scopes</a></li>

<li class="tocline">5.1.3 <a href="#dml5.1.3"
shape="rect">Referencing Variables</a></li>

<li class="tocline">5.1.4 <a href="#dml5.1.4"
shape="rect">Standard Session Variables</a></li>

<li class="tocline">5.1.5 <a href="#dml5.1.5"
shape="rect">Standard Application Variables</a></li>
</ul>
</li>
</ul>

<ul>
<li class="tocline">5.2 <a href="#dml5.2" shape="rect">Event
Handling</a> 

<ul>
<li class="tocline">5.2.1 <a href="#dml5.2.1"
shape="rect">throw element</a></li>

<li class="tocline">5.2.2 <a href="#dml5.2.2"
shape="rect">catch element</a></li>

<li class="tocline">5.2.3 <a href="#dml5.2.3"
shape="rect">Shorthand Notation</a></li>

<li class="tocline">5.2.4 <a href="#dml5.2.4" shape="rect">catch
Element Selection</a></li>

<li class="tocline">5.2.5 <a href="#dml5.2.5"
shape="rect">Default catch elements</a></li>

<li class="tocline">5.2.6 <a href="#dml5.2.6" shape="rect">Event
Types</a></li>
</ul>
</li>

<li class="tocline">5.3 <a href="#dml5.3" shape="rect">Executable
Content</a> 

<ul>
<li class="tocline">5.3.1 <a href="#dml5.3.1"
shape="rect">var element</a></li>

<li class="tocline">5.3.2 <a href="#dml5.3.2"
shape="rect">assign element</a></li>

<li class="tocline">5.3.3 <a href="#dml5.3.3"
shape="rect">clear element</a></li>

<li class="tocline">5.3.4 <a href="#dml5.3.4" shape="rect">if,
elseif, else elements</a></li>

<li class="tocline">5.3.5 <a href="#dml5.3.5"
shape="rect">prompts</a></li>

<li class="tocline">5.3.6 <a href="#dml5.3.6"
shape="rect">reprompt element</a></li>

<li class="tocline">5.3.7 <a href="#dml5.3.7"
shape="rect">goto element</a></li>

<li class="tocline">5.3.8 <a href="#dml5.3.8"
shape="rect">submit element</a></li>

<li class="tocline">5.3.9 <a href="#dml5.3.9"
shape="rect">exit element</a></li>

<li class="tocline">5.3.10 <a href="#dml5.3.10"
shape="rect">return element</a></li>

<li class="tocline">5.3.11 <a href="#dml5.3.11"
shape="rect">disconnect element</a></li>

<li class="tocline">5.3.12 <a href="#dml5.3.12"
shape="rect">script element</a></li>

<li class="tocline">5.3.13 <a href="#dml5.3.13"
shape="rect">log element</a></li>
</ul>
</li>
</ul>
</li>

<li class="tocline">6. <a href="#dml6" shape="rect">Environment
and Resources</a> 

<ul>
<li class="tocline">6.1 <a href="#dml6.1" shape="rect">Resource
Fetching</a> 

<ul>
<li class="tocline">6.1.1 <a href="#dml6.1.1"
shape="rect">Fetching</a></li>

<li class="tocline">6.1.2 <a href="#dml6.1.2"
shape="rect">Caching</a></li>

<li class="tocline">6.1.3 <a href="#dml6.1.3"
shape="rect">Prefetching</a></li>

<li class="tocline">6.1.4 <a href="#dml6.1.4"
shape="rect">Protocols</a></li>
</ul>
</li>

<li class="tocline">6.2 <a href="#dml6.2" shape="rect">Metadata
Information</a> 

<ul>
<li class="tocline">6.2.1 <a href="#dml6.2.1"
shape="rect">meta element</a></li>

<li class="tocline">6.2.2 <a href="#dml6.2.2"
shape="rect">metadata element</a></li>
</ul>
</li>

<li class="tocline">6.3 <a href="#dml6.3"
shape="rect">property element</a> 

<ul>
<li class="tocline">6.3.1 <a href="#dml6.3.1"
shape="rect">Platform-Specific Properties</a></li>

<li class="tocline">6.3.2 <a href="#dml6.3.2"
shape="rect">Generic Speech Recognizer Properties</a></li>

<li class="tocline">6.3.3 <a href="#dml6.3.3"
shape="rect">Generic DTMF Recognizer Properties</a></li>

<li class="tocline">6.3.4 <a href="#dml6.3.4" shape="rect">Prompt
and Collect Properties</a></li>

<li class="tocline">6.3.5 <a href="#dml6.3.5"
shape="rect">Fetching Properties</a></li>

<li class="tocline">6.3.6 <a href="#dml6.3.6"
shape="rect">Miscellaneous Properties</a></li>
</ul>
</li>

<li class="tocline">6.4 <a href="#dml6.4"
shape="rect">param element</a></li>

<li class="tocline">6.5 <a href="#dml6.5"
shape="rect">Value Designations</a></li>
</ul>
</li>

<li class="tocline"><a href="#dml7" shape="rect">Appendices</a> 

<ul>
<li class="tocline">Appendix A. <a href="#dmlATerms"
shape="rect">Glossary of Terms</a></li>

<li class="tocline">Appendix B. <a href="#dmlADTD"
shape="rect">VoiceXML Document Type Definition</a></li>

<li class="tocline">Appendix C. <a href="#dmlAFIA"
shape="rect">Form Interpretation Algorithm</a></li>

<li class="tocline">Appendix D. <a href="#dmlATiming"
shape="rect">Timing Properties</a></li>

<li class="tocline">Appendix E. <a href="#dmlAAudioFormats"
shape="rect">Audio File Formats</a></li>

<li class="tocline">Appendix F. <a href="#dmlAConformance"
shape="rect">Conformance</a></li>

<li class="tocline">Appendix G. <a
href="#dmlAInternationalization"
shape="rect">Internationalization</a></li>

<li class="tocline">Appendix H. <a href="#dmlAAccessibility"
shape="rect">Accessibility</a></li>

<li class="tocline">Appendix I. <a href="#dmlAPrivacy"
shape="rect">Privacy</a></li>

<li class="tocline">Appendix J. <a href="#dmlAChanges"
shape="rect">Changes from VoiceXML 1.0</a></li>

<li class="tocline">Appendix K. <a href="#dmlAReusability"
shape="rect">Reusability</a></li>

<li class="tocline">Appendix L. <a href="#dmlAAcknowledge"
shape="rect">Acknowledgements</a></li>

<li class="tocline">Appendix M. <a href="#dmlAReferences"
shape="rect">References</a></li>

<li class="tocline">Appendix N. <a href="#dmlAMediaType"
shape="rect">Media Type and File Suffix</a></li>

<li class="tocline">Appendix O. <a href="#dmlASchema"
shape="rect">VoiceXML XML Schema Definition</a></li>

<li class="tocline">Appendix P. <a href="#dmlABuiltins"
shape="rect">Builtin Grammar Types</a></li>
</ul>
</li>
</ul>

<hr />
<h1 id="L852"><a id="dml1" name="dml1" shape="rect">1.
Overview</a></h1>

<p>This document defines VoiceXML, the Voice Extensible Markup
Language. Its background, basic concepts and use are presented in
<a href="#dml1.1" shape="rect">Section 1</a>. The dialog
constructs of form, menu and link, and the mechanism (Form
Interpretation Algorithm) by which they are interpreted are then
introduced in <a href="#dml2" shape="rect">Section 2</a>. User
input using DTMF and speech grammars is covered in <a
href="#dml3" shape="rect">Section 3</a>, while <a href="#dml4"
shape="rect">Section 4</a> covers system output using speech
synthesis and recorded audio. Mechanisms for manipulating dialog
control flow, including variables, events, and executable
elements, are explained in <a href="#dml5" shape="rect">Section
5</a>. Environment features such as parameters and properties as
well as resource handling are specified in <a href="#dml6"
shape="rect">Section 6</a>. The appendices provide additional
information including the <a href="#dmlASchema"
shape="rect">VoiceXML Schema</a>, a detailed specification of the
<a href="#dmlAFIA" shape="rect">Form Interpretation Algorithm</a>
and <a href="#dmlATiming" shape="rect">timing</a>, <a
href="#dmlAAudioFormats" shape="rect">audio file formats</a>, and
statements relating to <a href="#dmlAConformance"
shape="rect">conformance</a>, <a href="#dmlAInternationalization"
shape="rect">internationalization</a>, <a
href="#dmlAAccessibility" shape="rect">accessibility</a> and <a
href="#dmlAPrivacy" shape="rect">privacy</a>.</p>

<p>The origins of VoiceXML began in 1995 as an XML-based dialog
design language intended to simplify the speech recognition
application development process within an AT&amp;T project called
Phone Markup Language (PML). As AT&amp;T reorganized, teams at
AT&amp;T, Lucent and Motorola continued working on their own
PML-like languages.</p>

<p>In 1998, W3C hosted a conference on voice browsers. By this
time, AT&amp;T and Lucent had different variants of their
original PML, while Motorola had developed VoxML, and IBM was
developing its own SpeechML. Many other attendees at the
conference were also developing similar languages for dialog
design; for example, such as HP's TalkML and PipeBeach's
VoiceHTML.</p>

<p>The VoiceXML Forum was then formed by AT&amp;T, IBM, Lucent,
and Motorola to pool their efforts. The mission of the VoiceXML
Forum was to define a standard dialog design language that
developers could use to build conversational applications. They
chose XML as the basis for this effort because it was clear to
them that this was the direction technology was going.</p>

<p>In 2000, the VoiceXML Forum released VoiceXML 1.0 to the
public. Shortly thereafter, VoiceXML 1.0 was submitted to the W3C
as the basis for the creation of a new international standard.
VoiceXML 2.0 is the result of this work based on input from W3C
Member companies, other W3C Working Groups, and the public.</p>

<p>Developers familiar with VoiceXML 1.0 are particularly directed
to <a href="#dmlAChanges" shape="rect">Changes from Previous
Public Version</a> which summarizes how VoiceXML 2.0 differs from
VoiceXML 1.0.</p>

<h2 id="L904"><a id="dml1.1" name="dml1.1" shape="rect">1.1
Introduction</a></h2>

<p>VoiceXML is designed for creating audio dialogs that feature
synthesized speech, digitized audio, recognition of spoken and
DTMF key input, recording of spoken input, telephony, and
mixed initiative conversations. Its major goal is to bring the
advantages of Web-based development and content delivery to
interactive voice response applications.</p>

<p>Here are two short examples of VoiceXML. The first is the
venerable "Hello World":</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"
   version="2.0"&gt;
  &lt;form&gt;
    &lt;block&gt;Hello World!&lt;/block&gt;
  &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>The top-level element is &lt;vxml&gt;, which is mainly a
container for <i>dialogs</i>. There are two types of dialogs:
<i>forms</i> and <i>menus</i>. Forms present information and
gather input; menus offer choices of what to do next. This
example has a single form, which contains a block that
synthesizes and presents "Hello World!" to the user. Since the
form does not specify a successor dialog, the conversation
ends.</p>

<p>Our second example asks the user for a choice of drink and
then submits it to a server script:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"
   version="2.0"&gt;
  &lt;form&gt;
  &lt;field name="drink"&gt;
     &lt;prompt&gt;Would you like coffee, tea, milk, or nothing?&lt;/prompt&gt;
     &lt;grammar src="drink.grxml" type="application/srgs+xml"/&gt;
  &lt;/field&gt;
  &lt;block&gt;
     &lt;submit next="http://www.drink.example.com/drink2.asp"/&gt;
  &lt;/block&gt;
 &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>A <i>field</i> is an input field. The user must provide a
value for the field before proceeding to the next element in the
form. A sample interaction is:</p>

<blockquote>
<p>C <span class="stage">(computer)</span>: Would you like
coffee, tea, milk, or nothing?</p>

<p>H <span class="stage">(human)</span>: Orange juice.</p>

<p>C: I did not understand what you said. <span class="stage">(a
platform-specific default message.)</span></p>

<p>C: Would you like coffee, tea, milk, or nothing?</p>

<p>H: Tea</p>

<p>C: <span class="stage">(continues in document
drink2.asp)</span></p>
</blockquote>

<h2 id="L960"><a id="dml1.2" name="dml1.2" shape="rect">1.2
Background</a></h2>

<p>This section contains a high-level architectural model, whose
terminology is then used to describe the goals of VoiceXML, its
scope, its design principles, and the requirements it places on
the systems that support it.</p>

<h3 id="L965"><a id="dml1.2.1" name="dml1.2.1" shape="rect">1.2.1
Architectural Model</a></h3>

<p>The architectural model assumed by this document has the
following components:</p>

<p class="fig"><img height="290"
alt="VoiceXML interpreter fits between document server and implementation platform"
 src="Images/image005.gif" width="322" /><br />
Figure 1: Architectural Model</p>

<p>A <i>document server</i> (e.g. a Web server) processes
<i>requests</i> from a client application, <i>the VoiceXML
Interpreter</i>, through the <i>VoiceXML interpreter context</i>.
The server produces <i>VoiceXML documents</i> in reply, which are
processed by the VoiceXML interpreter. The VoiceXML interpreter
context may monitor user inputs in parallel with the VoiceXML
interpreter. For example, one VoiceXML interpreter context may
always listen for a special escape phrase that takes the user to
a high-level personal assistant, and another may listen for
escape phrases that alter user preferences like volume or
text-to-speech characteristics.</p>

<p>The <i>implementation platform</i> is controlled by the
VoiceXML interpreter context and by the VoiceXML interpreter. For
instance, in an interactive voice response application, the
VoiceXML interpreter context may be responsible for detecting an
incoming call, acquiring the initial VoiceXML document<i>,</i>
and answering the call, while the VoiceXML interpreter conducts
the dialog after answer. The implementation platform generates
events in response to user actions (e.g. spoken or character
input received, disconnect) and system events (e.g. timer
expiration). Some of these events are acted upon by the VoiceXML
interpreter itself, as specified by the VoiceXML document, while
others are acted upon by the VoiceXML interpreter context.</p>

<h3 id="L1000"><a id="dml1.2.2" name="dml1.2.2"
shape="rect">1.2.2 Goals of VoiceXML</a></h3>

<p>VoiceXML's main goal is to bring the full power of Web
development and content delivery to voice response applications,
and to free the authors of such applications from low-level
programming and resource management. It enables integration of
voice services with data services using the familiar
client-server paradigm. A voice service is viewed as a sequence
of interaction dialogs between a user and an implementation
platform. The dialogs are provided by document servers, which may
be external to the implementation platform. Document servers
maintain overall service logic, perform database and legacy
system operations, and produce dialogs. A VoiceXML document
specifies each interaction dialog to be conducted by a VoiceXML
interpreter. User input affects dialog interpretation and is
collected into requests submitted to a document server. The
document server replies with another VoiceXML document to
continue the user's session with other dialogs.</p>

<p>VoiceXML is a markup language that:</p>

<ul>
<li>
<p>Minimizes client/server interactions by specifying multiple
interactions per document.</p>
</li>

<li>
<p>Shields application authors from low-level, and
platform-specific details.</p>
</li>

<li>
<p>Separates user interaction code (in VoiceXML) from service
logic (e.g. CGI scripts).</p>
</li>

<li>
<p>Promotes service portability across implementation platforms.
VoiceXML is a common language for content providers, tool
providers, and platform providers.</p>
</li>

<li>
<p>Is easy to use for simple interactions, and yet provides
language features to support complex dialogs.</p>
</li>
</ul>

<p>While VoiceXML strives to accommodate the requirements of a
majority of voice response services, services with stringent
requirements may best be served by dedicated applications that
employ a finer level of control.</p>

<h3 id="L1029"><a id="dml1.2.3" name="dml1.2.3"
shape="rect">1.2.3 Scope of VoiceXML</a></h3>

<p>The language describes the human-machine interaction provided
by voice response systems, which includes:</p>

<ul>
<li>
<p>Output of synthesized speech (text-to-speech).</p>
</li>

<li>
<p>Output of audio files.</p>
</li>

<li>
<p>Recognition of spoken input.</p>
</li>

<li>
<p>Recognition of DTMF input.</p>
</li>

<li>
<p>Recording of spoken input.</p>
</li>

<li>
<p>Control of dialog flow.</p>
</li>

<li>
<p>Telephony features such as call transfer and disconnect.</p>
</li>
</ul>

<p>The language provides means for collecting character and/or
spoken input, assigning the input results to document-defined
request variables, and making decisions that affect the
interpretation of documents written in the language. A document
may be linked to other documents through Universal Resource
Identifiers (URIs).</p>

<h3 id="L1058"><a id="dml1.2.4" name="dml1.2.4"
shape="rect">1.2.4 Principles of Design</a></h3>

<p>VoiceXML is an XML application <a href="#ref_XML"
shape="rect">[XML]</a>.</p>

<ol>
<li>
<p>The language promotes portability of services through
abstraction of platform resources.</p>
</li>

<li>
<p>The language accommodates platform diversity in supported
audio file formats, speech grammar formats, and URI schemes.
While producers of platforms may support various grammar formats
the language requires a common grammar format, namely the XML
Form of the W3C Speech Recognition Grammar Specification <a
href="#ref_SRGS" shape="rect">[SRGS]</a>, to facilitate
interoperability. Similarly, while various audio formats for
playback and recording may be supported, the audio formats
described in <a href="#dmlAAudioFormats" shape="rect">Appendix
E</a> must be supported</p>
</li>

<li>
<p>The language supports ease of authoring for common types of
interactions.</p>
</li>

<li>
<p>The language has well-defined semantics that preserves the
author's intent regarding the behavior of interactions with the
user. Client heuristics are not required to determine document
element interpretation.</p>
</li>

<li>
<p>The language recognizes semantic interpretations from grammars
and makes this information available to the application.</p>
</li>

<li>
<p>The language has a control flow mechanism.</p>
</li>

<li>
<p>The language enables a separation of service logic from
interaction behavior.</p>
</li>

<li>
<p>It is not intended for intensive computation, database
operations, or legacy system operations. These are assumed to be
handled by resources outside the document interpreter, e.g. a
document server.</p>
</li>

<li>
<p>General service logic, state management, dialog generation,
and dialog sequencing are assumed to reside outside the document
interpreter.</p>
</li>

<li>
<p>The language provides ways to link documents using URIs, and
also to submit data to server scripts using URIs.</p>
</li>

<li>
<p>VoiceXML provides ways to identify exactly which data to
submit to the server, and which HTTP method (GET or POST) to use
in the submittal.</p>
</li>

<li>
<p>The language does not require document authors to explicitly
allocate and deallocate dialog resources, or deal with
concurrency. Resource allocation and concurrent threads of
control are to be handled by the implementation platform.</p>
</li>
</ol>

<h3 id="L1106"><a id="dml1.2.5" name="dml1.2.5"
shape="rect">1.2.5 Implementation Platform Requirements</a></h3>

<p>This section outlines the requirements on the
hardware/software platforms that will support a VoiceXML
interpreter.</p>

<p><b>Document acquisition.</b> The interpreter context is
expected to acquire documents for the VoiceXML interpreter to act
on. The "http" URI scheme must be supported. In some cases, the
document request is generated by the interpretation of a VoiceXML
document, while other requests are generated by the interpreter
context in response to events outside the scope of the language,
for example an incoming phone call. When issuing document
requests via http, the interpreter context identifies itself
using the "User-Agent" header variable with the value
"&lt;name&gt;/&lt;version&gt;", for example,
"acme-browser/1.2"</p>

<p><b>Audio output.</b> An implementation platform must support
audio output using audio files and text-to-speech (TTS). The
platform must be able to freely sequence TTS and audio output. If
an audio output resource is not available, an error.noresource
event must be thrown. Audio files are referred to by a URI. The
language specifies a required set of audio file formats which
must be supported (see <a href="#dmlAAudioFormats"
shape="rect">Appendix E</a>); additional audio file formats may
also be supported.</p>

<p><b>Audio input.</b> An implementation platform is required to
detect and report character and/or spoken input simultaneously
and to control input detection interval duration with a timer
whose length is specified by a VoiceXML document. If an audio
input resource is not available, an error.noresource event must
be thrown.</p>

<ul>
<li>
<p>It must report <u>characters</u> (for example, DTMF) entered
by a user. Platforms must support the XML form of DTMF grammars
described in the W3C Speech Recognition Grammar Specification
<a href="#ref_SRGS" shape="rect">[SRGS]</a>. They should also
support the Augmented BNF (ABNF) form of DTMF grammars described
in the W3C Speech Recognition Grammar Specification
<a href="#ref_SRGS" shape="rect">[SRGS]</a>.</p>
</li>

<li>
<p>It must be able to receive <u>speech recognition</u> grammar
data dynamically. It must be able to use speech grammar data in
the XML Form of the W3C Speech Recognition Grammar Specification
<a href="#ref_SRGS" shape="rect">[SRGS]</a>. It should be able to
receive speech recognition grammar data in the ABNF form of the
W3C Speech Recognition Grammar Specification <a href="#ref_SRGS"
shape="rect">[SRGS]</a>, and may support other formats such as
the JSpeech Grammar Format <a href="#ref_JSGF"
shape="rect">[JSGF]</a> or proprietary formats. Some VoiceXML
elements contain speech grammar data; others refer to speech
grammar data through a URI. The speech recognizer must be able to
accommodate dynamic update of the spoken input for which it is
listening through either method of speech grammar data
specification.</p>
</li>

<li>
<p>It must be able to <u>record</u> audio received from the user.
The implementation platform must be able to make the recording
available to a <i>request</i> variable. The language specifies a
required set of recorded audio file formats which must be
supported (see <a href="#dmlAAudioFormats" shape="rect">Appendix
E</a>); additional formats may also be supported.</p>
</li>
</ul>

<p><b>Transfer</b> The platform should be able to support making
a third party connection through a communications network, such
as the telephone.</p>

<h2 id="L1170"><a id="dml1.3" name="dml1.3" shape="rect">1.3
Concepts</a></h2>

<p>A VoiceXML <i>document</i> (or a set of related documents
called an <i>application</i>) forms a conversational finite state
machine. The user is always in one conversational state, or
<i>dialog</i>, at a time. Each dialog determines the next dialog
to transition to. <i>Transitions</i> are specified using URIs,
which define the next document and dialog to use. If a URI does
not refer to a document, the current document is assumed. If it
does not refer to a dialog, the first dialog in the document is
assumed. Execution is terminated when a dialog does not specify
a successor, or if it has an element that explicitly exits the
conversation.</p>

<h3 id="L1187"><a id="dml1.3.1" name="dml1.3.1"
shape="rect">1.3.1 Dialogs and Subdialogs</a></h3>

<p>There are two kinds of dialogs: <i>forms</i> and <i>menus</i>.
Forms define an interaction that collects values for a set of
form item variables. Each field may specify a grammar that
defines the allowable inputs for that field. If a form-level
grammar is present, it can be used to fill several fields from
one utterance. A menu presents the user with a choice of options
and then transitions to another dialog based on that choice.</p>

<p>A <i>subdialog</i> is like a function call, in that it
provides a mechanism for invoking a new interaction, and
returning to the original form. Variable instances, grammars, and
state information are saved and are available upon returning to
the calling document. Subdialogs can be used, for example, to
create a confirmation sequence that may require a database query;
to create a set of components that may be shared among documents
in a single application; or to create a reusable library of
dialogs shared among many applications.</p>

<h3 id="L1203"><a id="dml1.3.2" name="dml1.3.2"
shape="rect">1.3.2 Sessions</a></h3>

<p>A <i>session</i> begins when the user starts to interact with
a VoiceXML interpreter context, continues as documents are loaded
and processed, and ends when requested by the user, a document,
or the interpreter context.</p>

<h3 id="L1211"><a id="dml1.3.3" name="dml1.3.3"
shape="rect">1.3.3 Applications</a></h3>

<p>An <i>application</i> is a set of documents sharing the same
<i>application root document</i>. Whenever the user interacts
with a document in an application, its application root document
is also loaded. The application root document remains loaded
while the user is transitioning between other documents in the
same application, and it is unloaded when the user transitions to
a document that is not in the application. While it is loaded,
the application root document's variables are available to the
other documents as application variables, and its grammars remain
active for the duration of the application, subject to the grammar
activation rules discussed in <a href="#dml3.1.4"
shape="rect">Section 3.1.4</a>.</p>

<p>Figure 2 shows the transition of documents (D) in an
application that share a common application root document
(root).</p>

<p class="fig"><img height="191"
alt="root over sequence of 3 documents" src="Images/image006.gif"
width="227" /><br />
Figure 2: Transitioning between documents in an application.</p>

<h3 id="L1234"><a id="dml1.3.4" name="dml1.3.4"
shape="rect">1.3.4 Grammars</a></h3>

<p>Each dialog has one or more speech and/or DTMF <i>grammars</i>
associated with it. In <i>machine directed</i> applications, each
dialog's grammars are active only when the user is in that
dialog. In <i>mixed initiative</i> applications, where the user
and the machine alternate in determining what to do next, some of
the dialogs are flagged to make their grammars <i>active</i>
(i.e., listened for) even when the user is in another dialog in
the same document, or on another loaded document in the same
application. In this situation, if the user says something
matching another dialog's active grammars, execution
transitions to that other dialog, with the user's utterance
treated as if it were said in that dialog. Mixed initiative adds
flexibility and power to voice applications.</p>

<h3 id="L1257"><a id="dml1.3.5" name="dml1.3.5"
shape="rect">1.3.5 Events</a></h3>

<p>VoiceXML provides a form-filling mechanism for handling
"normal" user input. In addition, VoiceXML defines a mechanism
for handling events not covered by the form mechanism.</p>

<p>Events are thrown by the platform under a variety of
circumstances, such as when the user does not respond, doesn't
respond intelligibly, requests help, etc. The interpreter also
throws events if it finds a semantic error in a VoiceXML
document. Events are caught by catch elements or their syntactic
shorthand. Each element in which an event can occur may specify
catch elements. Furthermore, catch elements are also inherited
from enclosing elements "as if by copy". In this way, common
event handling behavior can be specified at any level, and it
applies to all lower levels.</p>

<h3 id="L1264"><a id="dml1.3.6" name="dml1.3.6"
shape="rect">1.3.6 Links</a></h3>

<p>A <i>link</i> supports mixed initiative. It specifies a
grammar that is active whenever the user is in the scope of the
link. If user input matches the link's grammar, control
transfers to the link's destination URI. A link can be used
to throw an event or go to a destination URI.</p>

<h2 id="L1276"><a id="dml1.4" name="dml1.4" shape="rect">1.4
VoiceXML Elements</a></h2>

<div align="center">
<table cellspacing="0" cellpadding="4" width="80%" border="1"
summary="Table 1: VoiceXML Elements">
<caption align="bottom">Table 1: VoiceXML Elements</caption>

<thead>
<tr>
<th>Element</th>
<th>Purpose</th>
<th>Section</th>
</tr>
</thead>

<tbody>
<tr>
<td>&lt;assign&gt;</td>
<td>Assign a variable a value</td>
<td><a href="#dml5.3.2"
shape="rect">5.3.2</a> </td>
</tr>

<tr class="stripe">
<td>&lt;audio&gt;</td>
<td>Play an audio clip within a
prompt</td>
<td><a href="#dml4.1.3"
shape="rect">4.1.3</a> </td>
</tr>

<tr>
<td>&lt;block&gt;</td>
<td>A container of (non-interactive)
executable code</td>
<td><a href="#dml2.3.2"
shape="rect">2.3.2</a></td>
</tr>

<tr>
<td>&lt;catch&gt;</td>
<td>Catch an event</td>
<td><a href="#dml5.2.2"
shape="rect">5.2.2</a> </td>
</tr>

<tr class="stripe">
<td>&lt;choice&gt;</td>
<td>Define a menu item</td>
<td><a href="#dml2.2.2"
shape="rect">2.2.2</a></td>
</tr>

<tr>
<td>&lt;clear&gt;</td>
<td>Clear one or more form item
variables</td>
<td><a href="#dml5.3.3"
shape="rect">5.3.3</a> </td>
</tr>

<tr class="stripe">
<td>&lt;disconnect&gt;</td>
<td>Disconnect a session</td>
<td><a href="#dml5.3.11"
shape="rect">5.3.11</a> </td>
</tr>

<tr>
<td>&lt;else&gt;</td>
<td>Used in &lt;if&gt; elements</td>
<td><a href="#dml5.3.4"
shape="rect">5.3.4</a> </td>
</tr>

<tr class="stripe">
<td>&lt;elseif&gt;</td>
<td>Used in &lt;if&gt; elements</td>
<td><a href="#dml5.3.4"
shape="rect">5.3.4</a> </td>
</tr>

<tr class="stripe">
<td>&lt;enumerate&gt;</td>
<td>Shorthand for enumerating the choices
in a menu</td>
<td><a href="#dml2.2.4"
shape="rect">2.2.4</a></td>
</tr>

<tr>
<td>&lt;error&gt;</td>
<td>Catch an error event</td>
<td><a href="#dml5.2.3"
shape="rect">5.2.3</a> </td>
</tr>

<tr class="stripe">
<td>&lt;exit&gt;</td>
<td>Exit a session</td>
<td><a href="#dml5.3.9"
shape="rect">5.3.9</a> </td>
</tr>

<tr>
<td>&lt;field&gt;</td>
<td>Declares an input field in a
form</td>
<td><a href="#dml2.3.1"
shape="rect">2.3.1</a> </td>
</tr>

<tr class="stripe">
<td>&lt;filled&gt;</td>
<td>An action executed when fields are
filled</td>
<td><a href="#dml2.4"
shape="rect">2.4</a> </td>
</tr>

<tr>
<td>&lt;form&gt;</td>
<td>A dialog for presenting information
and collecting data</td>
<td><a href="#dml2.1"
shape="rect">2.1</a> </td>
</tr>

<tr class="stripe">
<td>&lt;goto&gt;</td>
<td>Go to another dialog in the same or
different document</td>
<td><a href="#dml5.3.7"
shape="rect">5.3.7</a> </td>
</tr>

<tr>
<td>&lt;grammar&gt;</td>
<td>Specify a speech recognition or DTMF
grammar</td>
<td><a href="#dml3.1"
shape="rect">3.1</a> </td>
</tr>

<tr class="stripe">
<td>&lt;help&gt;</td>
<td>Catch a help event</td>
<td><a href="#dml5.2.3"
shape="rect">5.2.3</a> </td>
</tr>

<tr>
<td>&lt;if&gt;</td>
<td>Simple conditional logic</td>
<td><a href="#dml5.3.4"
shape="rect">5.3.4</a> </td>
</tr>

<tr class="stripe">
<td>&lt;initial&gt;</td>
<td>Declares initial logic upon entry
into a (mixed initiative) form</td>
<td><a href="#dml2.3.3"
shape="rect">2.3.3</a> </td>
</tr>

<tr>
<td>&lt;link&gt;</td>
<td>Specify a transition common to all
dialogs in the link's scope</td>
<td><a href="#dml2.5"
shape="rect">2.5</a> </td>
</tr>

<tr>
<td>&lt;log&gt;</td>
<td>Generate a debug message</td>
<td><a href="#dml5.3.13"
shape="rect">5.3.13</a> </td>
</tr>

<tr class="stripe">
<td>&lt;menu&gt;</td>
<td>A dialog for choosing amongst
alternative destinations</td>
<td><a href="#dml2.2.1"
shape="rect">2.2.1</a></td>
</tr>

<tr>
<td>&lt;meta&gt;</td>
<td>Define a metadata item as a
name/value pair</td>
<td><a href="#dml6.2.1"
shape="rect">6.2.1</a> </td>
</tr>

<tr>
<td>&lt;metadata&gt;</td>
<td>Define metadata information using a
metadata schema</td>
<td><a href="#dml6.2.2"
shape="rect">6.2.2</a> </td>
</tr>

<tr class="stripe">
<td>&lt;noinput&gt;</td>
<td>Catch a noinput event</td>
<td><a href="#dml5.2.3"
shape="rect">5.2.3</a> </td>
</tr>

<tr>
<td>&lt;nomatch&gt;</td>
<td>Catch a nomatch event</td>
<td><a href="#dml5.2.3"
shape="rect">5.2.3</a> </td>
</tr>

<tr class="stripe">
<td>&lt;object&gt;</td>
<td>Interact with a custom extension</td>
<td><a href="#dml2.3.5"
shape="rect">2.3.5</a> </td>
</tr>

<tr>
<td>&lt;option&gt;</td>
<td>Specify an option in a
&lt;field&gt;</td>
<td><a href="#dml2.3.1.3"
shape="rect">2.3.1.3</a> </td>
</tr>

<tr class="stripe">
<td>&lt;param&gt;</td>
<td>Parameter in &lt;object&gt; or
&lt;subdialog&gt;</td>
<td><a href="#dml6.4"
shape="rect">6.4</a> </td>
</tr>

<tr>
<td>&lt;prompt&gt;</td>
<td>Queue speech synthesis and audio
output to the user</td>
<td><a href="#dml4.1"
shape="rect">4.1</a> </td>
</tr>

<tr class="stripe">
<td>&lt;property&gt;</td>
<td>Control implementation platform
settings.</td>
<td><a href="#dml6.3"
shape="rect">6.3</a> </td>
</tr>

<tr class="stripe">
<td>&lt;record&gt;</td>
<td>Record an audio sample</td>
<td><a href="#dml2.3.6"
shape="rect">2.3.6</a> </td>
</tr>

<tr>
<td>&lt;reprompt&gt;</td>
<td>Play a field prompt when a field is
re-visited after an event</td>
<td><a href="#dml5.3.6"
shape="rect">5.3.6</a> </td>
</tr>

<tr class="stripe">
<td>&lt;return&gt;</td>
<td>Return from a subdialog.</td>
<td><a href="#dml5.3.10"
shape="rect">5.3.10</a> </td>
</tr>

<tr class="stripe">
<td>&lt;script&gt;</td>
<td>Specify a block of ECMAScript
client-side scripting logic</td>
<td><a href="#dml5.3.12"
shape="rect">5.3.12</a> </td>
</tr>

<tr>
<td>&lt;subdialog&gt;</td>
<td>Invoke another dialog as a subdialog
of the current one</td>
<td><a href="#dml2.3.4"
shape="rect">2.3.4</a> </td>
</tr>

<tr class="stripe">
<td>&lt;submit&gt;</td>
<td>Submit values to a document
server</td>
<td><a href="#dml5.3.8"
shape="rect">5.3.8</a> </td>
</tr>

<tr>
<td>&lt;throw&gt;</td>
<td>Throw an event.</td>
<td><a href="#dml5.2.1"
shape="rect">5.2.1</a> </td>
</tr>

<tr class="stripe">
<td>&lt;transfer&gt;</td>
<td>Transfer the caller to another
destination</td>
<td><a href="#dml2.3.7"
shape="rect">2.3.7</a> </td>
</tr>

<tr>
<td>&lt;value&gt;</td>
<td>Insert the value of an expression in
a prompt</td>
<td><a href="#dml4.1.4"
shape="rect">4.1.4</a> </td>
</tr>

<tr class="stripe">
<td>&lt;var&gt;</td>
<td>Declare a variable</td>
<td><a href="#dml5.3.1"
shape="rect">5.3.1</a> </td>
</tr>

<tr>
<td>&lt;vxml&gt;</td>
<td>Top-level element in each VoiceXML
document</td>
<td><a href="#dml1.5.1"
shape="rect">1.5.1</a> </td>
</tr>
</tbody>
</table>
</div>

<h2 id="L1767"><a id="dml1.5" name="dml1.5" shape="rect">1.5
Document Structure and Execution</a></h2>

<p>A VoiceXML document is primarily composed of top-level
elements called <i>dialogs</i>. There are two types of dialogs:
<i>forms</i> and <i>menus</i>. A document may also have
&lt;meta&gt; and &lt;metadata&gt; elements, &lt;var&gt; and
&lt;script&gt; elements, &lt;property&gt; elements, &lt;catch&gt;
elements, and &lt;link&gt; elements.</p>

<h3 id="L1781"><a id="dml1.5.1" name="dml1.5.1"
shape="rect">1.5.1 Execution within One Document</a></h3>

<p>Document execution begins at the first dialog by default. As
each dialog executes, it determines the next dialog. When a
dialog doesn't specify a successor dialog, document
execution stops.</p>

<p>Here is "Hello World!" expanded to illustrate some of this. It
now has a document level variable called "hi" which holds the
greeting. Its value is used as the prompt in the first form. Once
the first form plays the greeting, it goes to the form named
"say_goodbye", which prompts the user with "Goodbye!" Because the
second form does not transition to another dialog, it causes the
document to be exited.</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"
   version="2.0"&gt;
 &lt;meta name="author" content="John Doe"/&gt;
 &lt;meta name="maintainer" content="hello-support@hi.example.com"/&gt;
 &lt;var name="hi" expr="'Hello World!'"/&gt;
 &lt;form&gt;
  &lt;block&gt;
     &lt;value expr="hi"/&gt;
     &lt;goto next="#say_goodbye"/&gt;
  &lt;/block&gt;
 &lt;/form&gt;
 &lt;form id="say_goodbye"&gt;
  &lt;block&gt;
     Goodbye!
  &lt;/block&gt;
 &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>Alternatively the forms can be combined:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"
   version="2.0"&gt;
 &lt;meta name="author" content="John Doe"/&gt;
 &lt;meta name="maintainer" content="hello-support@hi.example.com"/&gt;
 &lt;var name="hi" expr="'Hello World!'"/&gt;
 &lt;form&gt;
  &lt;block&gt;
     &lt;value expr="hi"/&gt; Goodbye!
  &lt;/block&gt;
 &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>Attributes of &lt;vxml&gt; include:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 2: vxml attributes">
<caption align="bottom">Table 2: &lt;vxml&gt;
Attributes</caption>

<tbody>
<tr>
<th>version</th>
<td>The version of VoiceXML of this
document (required). The current version number is 2.0.</td>
</tr>

<tr>
<th>xmlns</th>
<td>The designated namespace for VoiceXML
(required). The namespace for VoiceXML is defined to be
http://www.w3.org/2001/vxml.</td>
</tr>

<tr>
<th>xml:base</th>
<td>The base URI for this document as
defined in <a href="#ref_XML-BASE" shape="rect">[XML-BASE]</a>.
As in <a href="#ref_HTML" shape="rect">[HTML]</a>, a URI which
all relative references within the document take as their
base.</td>
</tr>

<tr>
<th>xml:lang</th>
<td>The <a href="#term-language"
shape="rect">language identifier</a> for this document .
If omitted, the value is a platform-specific default.</td>
</tr>

<tr>
<th>application</th>
<td>The URI of this document's
application root document, if any.</td>
</tr>
</tbody>
</table>

<p>Language information is inherited down the document hierarchy:
the value of "xml:lang" is inherited by elements which also
define the "xml:lang" attribute, such as &lt;grammar&gt; and
&lt;prompt&gt;, unless these elements specify an alternative
value.</p>

<h3 id="L1843"><a id="dml1.5.2" name="dml1.5.2"
shape="rect">1.5.2 Executing a Multi-Document
Application</a></h3>

<p>Normally, each document runs as an isolated application. In
cases where you want multiple documents to work together as one
application, you select one document to be the <i>application
root document</i>, and the rest to be <i>application leaf
documents</i>. Each leaf document names the root document in its
&lt;vxml&gt; element.</p>

<p>When this is done, every time the interpreter is told to load
and execute a leaf document in this application, it first loads
the application root document if it is not already loaded. The
application root document remains loaded until the interpreter is
told to load a document that belongs to a different application.
Thus one of the following two conditions always holds during
interpretation:</p>

<ul>
<li>
<p>The application root document is loaded and the user is
executing in it: there is no leaf document.</p>
</li>

<li>
<p>The application root document and a single leaf document are
both loaded and the user is executing in the leaf document.</p>
</li>
</ul>

<p>If there is a chain of subdialogs defined in separate
documents, then there may be more than one leaf document loaded
although execution will only be in one of these documents.</p>

<p>When a leaf document load causes a root document load, none of
the dialogs in the root document are executed. Execution begins
in the leaf document.</p>

<p>There are several benefits to multi-document applications.</p>

<ul>
<li>The root document's variables are available for use by the
leaf documents, so that information can be shared and
retained.</li>

<li>Root document &lt;property&gt; elements specify default
values for properties used in the leaf documents.</li>

<li>Common ECMAScript code can be defined in root document
&lt;script&gt; elements and used in the leaf documents.</li>

<li>Root document &lt;catch&gt; elements define default event
handling for the leaf documents.</li>

<li>Document-scoped grammars in the root document are active when
the user is in a leaf document, so that the user is able to
interact with forms, links, and menus in the root document.</li>
</ul>

<p>Here is a two-document application illustrating this:</p>

<p><b>Application root document</b> (app-root.vxml)</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"
   version="2.0"&gt;
 &lt;var name="bye" expr="'Ciao'"/&gt;
 &lt;link next="operator_xfer.vxml"&gt;
   &lt;grammar type="application/srgs+xml" root="root" version="1.0"&gt;
     &lt;rule id="root" scope="public"&gt;operator&lt;/rule&gt;
  &lt;/grammar&gt;
 &lt;/link&gt;
&lt;/vxml&gt;
</pre>

<p><b>Leaf document</b> (leaf.vxml)</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"
   version="2.0" application="app-root.vxml"&gt;
 &lt;form id="say_goodbye"&gt;
  &lt;field name="answer"&gt;
     &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
     &lt;prompt&gt;Shall we say &lt;value expr="application.bye"/&gt;?&lt;/prompt&gt;
     &lt;filled&gt;
       &lt;if cond="answer"&gt;
        &lt;exit/&gt;
       &lt;/if&gt;
       &lt;clear namelist="answer"/&gt;
     &lt;/filled&gt;
  &lt;/field&gt;
 &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>In this example, the application is designed so that leaf.vxml
must be loaded first. Its application attribute specifies that
app-root.vxml should be used as the application root document.
So, app-root.vxml is then loaded, which creates the application
variable bye and also defines a link that navigates to
operator-xfer.vxml whenever the user says "operator". The user
starts out in the say_goodbye form:</p>

<blockquote>
<p>C: Shall we say Ciao?</p>

<p>H: Si.</p>

<p>C: I did not understand what you said. <span class="stage">(a
platform-specific default message.)</span></p>

<p>C: Shall we say Ciao?</p>

<p>H: Ciao</p>

<p>C: I did not understand what you said.</p>

<p>H: Operator.</p>

<p>C: <span class="stage">(Goes to operator_xfer.vxml, which
transfers the caller to a human operator.)</span></p>
</blockquote>

<p>Note that when the user is in a multi-document application, at
most two documents are loaded at any one time: the application
root document and, unless the user is actually interacting with
the application root document, an application leaf document. A
root document's &lt;vxml&gt; element does not have an application
attribute specified. A leaf document's &lt;vxml&gt; element does
have an application attribute specified. An interpreter always
has an application root document loaded; it does not always have
an application leaf document loaded.</p>

<p><a id="appNameDefn" name="appNameDefn" shape="rect">The
<i>name</i> of the interpreter's current application is the
application root document's absolute URI</a>. The absolute URI
includes a query string, if present, but it does not include a
fragment identifier. The interpreter remains in the same
application as long as the name remains the same. When the name
changes, a new application is entered and its root context is
initialized. The application's root context consists of the
variables, grammars, catch elements, scripts, and properties in
application scope.</p>

<p>During a user session an interpreter transitions from one
document to another as requested by &lt;choice&gt;, &lt;goto&gt;
&lt;link&gt;, &lt;subdialog&gt;, and &lt;submit&gt; elements.
Some transitions are within an application, others are between
applications. The preservation or initialization of the root
context depends on the type of transition:</p>

<dl>
<dt>Root to Leaf Within Application</dt>

<dd>A root to leaf transition within the same application occurs
when the current document is a root document and the target
document's application attribute's value resolves to the same
absolute URI as the name of the current application. The
application root document and its context are preserved.</dd>

<dt>Leaf to Leaf Within Application</dt>

<dd>A leaf to leaf transition within the same application occurs
when the current document is a leaf document and the target
document's application attribute's value resolves to the same
absolute URI as the name of the current application. The
application root document and its context are preserved.</dd>

<dt>Leaf to Root Within Application</dt>

<dd>A leaf to root transition within the same application occurs
when the current document is a leaf document and the target
document's absolute URI is the same as the name of the current
application. The current application root document and its
context are preserved when the transition is caused by a
&lt;choice&gt;, &lt;goto&gt;, or &lt;link&gt; element. The root
context is initialized when a &lt;submit&gt; element causes the
leaf to root transition, because a &lt;submit&gt; always results
in a fetch of its URI.</dd>

<dt>Root to Root</dt>

<dd>A root to root transition occurs when the current document is
a root document and the target document is a root document, i.e.
it does not have an application attribute. The root context is
initialized with the application root document returned by the
caching policy in <a href="#dml6.1.2" shape="rect">Section
6.1.2</a>. The caching policy is consulted even when the <a
href="#appNameDefn" shape="rect">name</a> of the target
application and the current application are the same.</dd>

<dt>Subdialog</dt>

<dd>A subdialog invocation occurs when a root or leaf document
executes a &lt;subdialog&gt; element. As discussed in <a
href="#dml2.3.4" shape="rect">Section 2.3.4</a>, subdialog
invocation creates a new execution context. The application root
document and its context in the calling document's execution
context are preserved untouched during subdialog execution, and
are used again once the subdialog returns. A subdialog's new
execution context has its own root context and, possibly, leaf
context. When the subdialog is invoked with a non-empty URI
reference, the caching policy in <a href="#dml6.1.2"
shape="rect">Section 6.1.2</a> is used to acquire the root and
leaf documents that will be used to initialize the new root and
leaf contexts. If a subdialog is invoked with an empty URI
reference and a fragment identifier, e.g. "#sub1", the root and
leaf documents remain unchanged, and therefore the current root
and leaf documents will be used to initialize the new root and
leaf contexts.</dd>

<dt>Inter-Application Transitions</dt>

<dd>All other transitions are between applications which cause
the application root context to be initialized with the next
application's root document.</dd>
</dl>

<p>If a document refers to a non-existent application root
document, an error.badfetch event is thrown. If a document's
application attribute refers to a document that also has an
application attribute specified, an error.semantic event is
thrown.</p>

<p>The following diagrams illustrate the effect of the
transitions between root and leaf documents on the application
root context. In these diagrams, boxes represent documents, box
texture changes identify root context initialization, solid
arrows symbolize transitions to the URI in the arrow's label,
dashed vertical arrows indicate an application attribute whose
URI is the arrow's label.</p>

<p class="fig"><img
alt="Transitions that Preserve the Root Context"
src="Images/image021.gif" /><br />
Figure 3: Transitions that Preserve the Root Context<br
clear="none" />
</p>

<p>In this diagram, all the documents belong to the same
application. The transitions are identified by the numbers 1-4
across the top of the figure. They are:</p>

<ol>
<li>A transition to URI A results in document 1, the application
context is initialized from document 1's content. Assume that
this is the first document in the session. The current
application's name is A.</li>

<li>Document 1 specifies a transition to URI B, which yields
document 2. Document 2's application attribute equals URI A. The
root is document 1 with its context preserved. This is a root to
leaf transition within the same application.</li>

<li>Document 2 specifies a transition to URI C, which yields
another leaf document, document 3. Its application attribute also
equals URI A. The root is document 1 with its context preserved.
This is a leaf to leaf transition within the same
application.</li>

<li>Document 3 specifies a transition to URI A using a
&lt;choice&gt;, &lt;goto&gt;, or &lt;link&gt;. Document 1 is used
with its root context intact. This is a leaf to root transition
within the same application.</li>
</ol>

<p>The next diagram illustrates transitions which initialize the
root context.</p>

<p class="fig"><img
alt="Transitions that Initialize the Root Context"
src="Images/image022.gif" /><br />
Figure 4: Transitions that Initialize the Root Context<br
clear="none" />
</p>

<ol start="5">
<li>Document 1 specifies a transition to its own URI A. The
resulting document 4 does not have an application attribute, so
it is considered a root document, and the root context is
initialized. This is a root to root transition.</li>

<li>Document 4 specifies a transition to URI D, which yields a
leaf document 5. Its application attribute is different: URI E. A
new application is being entered. URI E produces the root
document 6. The root context is initialized from the content of
document 6. This is an inter-application transition.</li>

<li>Document 5 specifies a transition to URI A. The cache check
returns document 4 which does not have an application attribute
and therefore belongs to application A, so the root context is
initialized. Initialization occurs even though this application
and this root document were used earlier in the session. This is
an inter-application transition.</li>
</ol>

<h3 id="L1999"><a id="dml1.5.3" name="dml1.5.3"
shape="rect">1.5.3 Subdialogs</a></h3>

<p>A subdialog is a mechanism for decomposing complex sequences
of dialogs to better structure them, or to create reusable
components. For example, the solicitation of account information
may involve gathering several pieces of information, such as
account number, and home telephone number. A customer care
service might be structured with several independent applications
that could share this basic building block, thus it would be
reasonable to construct it as a subdialog. This is illustrated in
the example below. The first document, app.vxml, seeks to adjust
a customer's account, and in doing so must get the account
information and then the adjustment level. The account
information is obtained by using a subdialog element that invokes
another VoiceXML document to solicit the user input. While the
second document is being executed, the calling dialog is
suspended, awaiting the return of information. The second
document provides the results of its user interactions using a
&lt;return&gt; element, and the resulting values are accessed
through the variable defined by the name attribute on the
&lt;subdialog&gt; element.</p>

<p><b>Customer Service Application</b> (app.vxml)</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"
   version="2.0"&gt;
  &lt;form id="billing_adjustment"&gt;
    &lt;var name="account_number"/&gt;
    &lt;var name="home_phone"/&gt;
    &lt;subdialog name="accountinfo" src="acct_info.vxml#basic"&gt;
      &lt;filled&gt;
        &lt;!-- Note the variable defined by "accountinfo" is
          returned as an ECMAScript object and it contains two
          properties defined by the variables specified in the
          "return" element of the subdialog. --&gt;

        &lt;assign name="account_number" expr="accountinfo.acctnum"/&gt;
        &lt;assign name="home_phone" expr="accountinfo.acctphone"/&gt;
      &lt;/filled&gt;
    &lt;/subdialog&gt;

    &lt;field name="adjustment_amount"&gt;
     &lt;grammar type="application/srgs+xml" src="/grammars/currency.grxml"/&gt;
      &lt;prompt&gt;
        What is the value of your account adjustment?
      &lt;/prompt&gt;
      &lt;filled&gt;
        &lt;submit  next="/cgi-bin/updateaccount"/&gt;
      &lt;/filled&gt;
    &lt;/field&gt;
  &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p><b>Document Containing Account Information Subdialog</b>
(acct_info.vxml)</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"
   version="2.0"&gt;
  &lt;form id="basic"&gt;
    &lt;field name="acctnum"&gt;
      &lt;grammar type="application/srgs+xml" src="/grammars/digits.grxml"/&gt;
      &lt;prompt&gt; What is your account number? &lt;/prompt&gt;
    &lt;/field&gt;
    &lt;field name="acctphone"&gt;
      &lt;grammar type="application/srgs+xml" src="/grammars/phone_numbers.grxml"/&gt;
      &lt;prompt&gt; What is your home telephone number? &lt;/prompt&gt;
      &lt;filled&gt;
        &lt;!-- The values obtained by the two fields are supplied
          to the calling dialog by the "return" element. --&gt;
        &lt;return namelist="acctnum acctphone"/&gt;
      &lt;/filled&gt;
    &lt;/field&gt;
  &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>Subdialogs add a new execution context when they are
invoked.The subdialog could be a new dialog within the existing
document, or a new dialog within a new document.</p>

<p>Subdialogs can be composed of several documents. Figure 5
shows the execution flow where a sequence of documents (D)
transitions to a subdialog (SD) and then back.</p>

<p class="fig"><img
alt="subdialog composed of several documents, returning from the last subdialog document"
 src="Images/image019.gif" /><br />
Figure 5: Subdialog composed of several documents<br
clear="none" />
returning from the last subdialog document.</p>

<p>The execution context in dialog D2 is suspended when it
invokes the subdialog SD1 in document sd1.vxml. This subdialog
specifies execution is to be transfered to the dialog in sd2.vxml
(using &lt;goto&gt;). Consequently, when the dialog in sd2.vxml
returns, control is returned directly to dialog D2.</p>

<p>Figure 6 shows an example of a multi-document subdialog where
control is transferred from one subdialog to another.</p>

<p class="fig"><img
alt="subdialog composed of several documents, returning from the first subdialog document"
 src="Images/image020.gif" /><br />
Figure 6: Subdialog composed of several documents<br
clear="none" />
returning from the first subdialog document.</p>

<p>The subdialog in sd1.vxml specifies that control is to be
transfered to a second subdialog, SD2, in sd2.vxml. When
executing SD2, there are two suspended contexts: the dialog
context in D2 is suspending awaiting SD1 to return; and the
dialog context in SD1 awaiting SD2 to return. When SD2 returns,
control is returned to the SD1. It in turn returns control to
dialog D2.</p>

<h3 id="LXXXXq234523421341"><a id="dml1.5.4" name="dml1.5.4"
shape="rect">1.5.4 Final Processing</a></h3>

<p>Under certain circumstances (in particular, while the VoiceXML
interpreter is processing a disconnect event) the interpreter may
continue executing in the <em>final processing state</em> after
there is no longer a connection to allow the interpreter to
interact with the end user. The purpose of this state is to allow
the VoiceXML application to perform any necessary final cleanup,
such as submitting information to the application server. For
example, the following &lt;catch&gt; element will catch the
connection.disconnect.hangup event and execute in the final
processing state:</p>

<pre class="example" xml:space="preserve">
&lt;catch event="connection.disconnect.hangup"&gt;
    &lt;submit namelist="myExit" next="http://mysite/exit.jsp"/&gt;
&lt;/catch&gt;
</pre>

<p>While in the final processing state the application must
remain in the transitioning state and may not enter the waiting
state (as described in <a href="#dml4.1.8" shape="rect">Section
4.1.8</a>). Thus for example the application should not enter
&lt;field&gt;, &lt;record&gt;, or &lt;transfer&gt; while in the
final processing state. The VoiceXML interpreter must exit if the
VoiceXML application attempts to enter the waiting state while in
the final processing state.</p>

<p>Aside from this restriction, execution of the VoiceXML
application continues normally while in the final processing
state. Thus for example the application may transition between
documents while in the final processing state, and the
interpreter must exit if no form item is eligible to be selected
(as described in <a href="#dml2.1.1" shape="rect">Section
2.1.1</a>).</p>

<!--- CHAPTER 1: END =-->
<!--- CHAPTER 2: BEGIN =-->
<h1 id="L2052"><a id="dml2" name="dml2" shape="rect">2. Dialog
Constructs</a></h1>

<h2 id="L2055"><a id="dml2.1" name="dml2.1" shape="rect">2.1
Forms</a></h2>

<p>Forms are the key component of VoiceXML documents. A form
contains:</p>

<ul>
<li>
<p>A set of <i>form items</i>, elements that are visited in the
main loop of the form interpretation algorithm. Form items are
subdivided into <i>input items</i> that can be 'filled' by user
input and <i>control items</i> that cannot.</p>
</li>

<li>
<p>Declarations of non-form item variables.</p>
</li>

<li>
<p>Event handlers.</p>
</li>

<li>
<p>"Filled" actions, blocks of procedural logic that execute when
certain combinations of input item variables are assigned.</p>
</li>
</ul>

<p>Form attributes are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 3: form attributes">
<caption align="bottom">Table 3: &lt;form&gt;
Attributes</caption>

<tbody>
<tr>
<th>id</th>
<td>The name of the form. If specified,
the form can be referenced within the document or from another
document. For instance &lt;form id="weather"&gt;, &lt;goto
next="#weather"&gt;.</td>
</tr>

<tr>
<th>scope</th>
<td>The default scope of the form's
grammars. If it is dialog then the form grammars are active only
in the form. If the scope is document, then the form grammars are
active during any dialog in the same document. If the scope is
document and the document is an application root document, then
the form grammars are active during any dialog in any document of
this application. Note that the scope of individual form grammars
takes precedence over the default scope; for example, in non-root
documents a form with the default scope "dialog", and a form
grammar with the scope "document", then that grammar is active in
any dialog in the document.</td>
</tr>
</tbody>
</table>

<p>This section describes some of the concepts behind forms, and
then gives some detailed examples of their operation.</p>

<h3 id="L2116"><a id="dml2.1.1" name="dml2.1.1"
shape="rect">2.1.1 Form Interpretation</a></h3>

<p>Forms are interpreted by an implicit form interpretation
algorithm (FIA). The FIA has a main loop that repeatedly selects
a form item and then visits it. The selected form item is the
first in document order whose guard condition is not satisfied.
For instance, a field's default guard condition tests to
see if the field's form item variable has a value, so that
if a simple form contains only fields, the user will be prompted
for each field in turn.</p>

<p>Interpreting a form item generally involves:</p>

<ul>
<li>
<p>Selecting and playing one or more prompts;</p>
</li>

<li>
<p>Collecting a user input, either a response that fills in one
or more input items, or a throwing of some event (help, for
instance); and</p>
</li>

<li>
<p>Interpreting any &lt;filled&gt; actions that pertained to the
newly filled in input items.</p>
</li>
</ul>

<p>The FIA ends when it interprets a transfer of control
statement (e.g. a &lt;goto&gt; to another dialog or document, or
a &lt;submit&gt; of data to the document server). It also ends
with an implied &lt;exit&gt; when no form item remains eligible
to select.</p>

<p>The FIA is described in more detail in <a href="#dml2.1.6"
shape="rect">Section 2.1.6</a>.</p>

<h3 id="L2142"><a id="dml2.1.2" name="dml2.1.2"
shape="rect">2.1.2 Form Items</a></h3>

<p>Form items are the elements that can be visited in the main
loop of the form interpretation algorithm. Input items direct the
FIA to gather a result for a specific element. When the FIA
selects a control item, the control item may contain a block of
procedural code to execute, or it may tell the FIA to set up the
initial prompt-and-collect for a mixed initiative form.</p>

<h4 id="L2149"><a id="dml2.1.2.1" name="dml2.1.2.1"
shape="rect">2.1.2.1 Input Items</a></h4>

<p>An input item specifies an <i>input item variable</i> to
gather from the user. Input items have prompts to tell the user
what to say or key in, grammars that define the allowed inputs,
and event handlers that process any resulting events. An input
item may also have a &lt;filled&gt; element that defines an
action to take just after the input item variable is filled.
Input items consist of:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 4: input items">
<caption align="bottom">Table 4: Input Items</caption>

<tbody>
<tr>
<th>&lt;field&gt;</th>
<td>An input item whose value is obtained
via ASR or DTMF grammars.</td>
</tr>

<tr>
<th>&lt;record&gt;</th>
<td>An input item whose value is an audio
clip recorded by the user. A &lt;record&gt; element could collect
a voice mail message, for instance.</td>
</tr>

<tr>
<th>&lt;transfer&gt;</th>
<td>An input item which transfers the
user to another telephone number. If the transfer returns
control, the field variable will be set to the result
status.</td>
</tr>

<tr>
<th>&lt;object&gt;</th>
<td>This input item invokes a
platform-specific "object" with various parameters. The result of
the platform object is an ECMAScript Object. One platform object
could be a builtin dialog that gathers credit card information.
Another could gather a text message using some proprietary DTMF
text entry method. There is no requirement for implementations to
provide platform-specific objects, although implementations must
handle the &lt;object&gt; element by throwing
error.unsupported.objectname if the particular platform-specific
object is not supported (note that 'objectname' in
error.unsupported.objectname is a fixed string, so not
substituted with the name of the unsupported object; more
specific error information may be provided in the event
"_message" special variable as described in <a href="#dml5.2.2"
shape="rect">Section 5.2.2</a>).</td>
</tr>

<tr>
<th>&lt;subdialog&gt;</th>
<td>A &lt;subdialog&gt; input item is
roughly like a function call. It invokes another dialog on the
current page, or invokes another VoiceXML document. It returns an
ECMAScript Object as its result.</td>
</tr>
</tbody>
</table>

<h4 id="L2202"><a id="dml2.1.2.2" name="dml2.1.2.2"
shape="rect">2.1.2.2 Control Items</a></h4>

<p>There are two types of control items:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 5: control items">
<caption align="bottom">Table 5: Control Items</caption>

<tbody>
<tr>
<th>&lt;block&gt;</th>
<td>A sequence of procedural statements
used for prompting and computation, but not for gathering input.
A block has a (normally implicit) form item variable that is set
to true just before it is interpreted.</td>
</tr>

<tr>
<th>&lt;initial&gt;</th>
<td>This element controls the initial
interaction in a mixed initiative form. Its prompts should be
written to encourage the user to say something matching a form
level grammar. When at least one input item variable is filled as
a result of recognition during an &lt;initial&gt; element, the
form item variable of &lt;initial&gt; becomes true, thus removing
it as an alternative for the FIA.</td>
</tr>
</tbody>
</table>

<h3 id="L2231"><a id="dml2.1.3" name="dml2.1.3"
shape="rect">2.1.3 Form Item Variables and Conditions</a></h3>

<p>Each form item has an associated <i>form item variable</i>,
which by default is set to undefined when the form is entered.
This form item variable will contain the result of interpreting
the form item. An input item's form item variable is also
called an <i>input item variable</i>, and it holds the value
collected from the user. A form item variable can be given a name
using the name attribute, or left nameless, in which case an
internal name is generated.</p>

<p>Each form item also has a <i>guard condition</i>, which
governs whether or not that form item can be selected by the form
interpretation algorithm. The default guard condition just tests
to see if the form item variable has a value. If it does, the
form item will not be visited.</p>

<p>Typically, input items are given names, but control items are
not. Generally form item variables are not given initial values
and additional guard conditions are not specified. But sometimes
there is a need for more detailed control. One form may have a
form item variable initially set to hide a field, and later
cleared (e.g., using &lt;clear&gt;) to force the field's
collection. Another field may have a guard condition that
activates it only when it has not been collected, and when two
other fields have been filled. A block item could execute only
when some condition holds true. Thus, fine control can be
exercised over the order in which form items are selected and
executed by the FIA, however in general, many dialogs can be
constructed without resorting to this level of complexity.</p>

<p>In summary, all form items have the following attributes:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 6: common form item attributes">
<caption align="bottom">Table 6: Common Form Item
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>The name of a dialog-scoped form item
variable that will hold the value of the form item.</td>
</tr>

<tr>
<th>expr</th>
<td>The initial value of the form item
variable; default is ECMAScript undefined. If initialized to a
value, then the form item will not be executed unless the form
item variable is cleared.</td>
</tr>

<tr>
<th>cond</th>
<td>An expression to evaluate in
conjunction with the test of the form item variable. If absent,
this defaults to true, or in the case of &lt;initial&gt;, a test
to see if any input item variable has been filled in.</td>
</tr>
</tbody>
</table>

<h3 id="L2286"><a id="dml2.1.4" name="dml2.1.4"
shape="rect">2.1.4 Directed Forms</a></h3>

<p>The simplest and most common type of form is one in which the
form items are executed exactly once in sequential order to
implement a computer-directed interaction. Here is a weather
information service that uses such a form.</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="weather_info"&gt;
 &lt;block&gt;Welcome to the weather information service.&lt;/block&gt;
 &lt;field name="state"&gt;
  &lt;prompt&gt;What state?&lt;/prompt&gt;
  &lt;grammar src="state.grxml"  type="application/srgs+xml"/&gt;
  &lt;catch event="help"&gt;
     Please speak the state for which you want the weather.
  &lt;/catch&gt;
 &lt;/field&gt;
 &lt;field name="city"&gt;
  &lt;prompt&gt;What city?&lt;/prompt&gt;
  &lt;grammar src="city.grxml" type="application/srgs+xml"/&gt;
  &lt;catch event="help"&gt;
     Please speak the city for which you want the weather.
  &lt;/catch&gt;
 &lt;/field&gt;
 &lt;block&gt;
  &lt;submit next="/servlet/weather" namelist="city state"/&gt;
 &lt;/block&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>This dialog proceeds sequentially:</p>

<blockquote>
<p>C (computer): Welcome to the weather information service. What
state?</p>

<p>H (human): Help</p>

<p>C: Please speak the state for which you want the weather.</p>

<p>H: Georgia</p>

<p>C: What city?</p>

<p>H: Tblisi</p>

<p>C: I did not understand what you said. What city?</p>

<p>H: Macon</p>

<p>C: The conditions in Macon Georgia are sunny and clear at 11
AM ...</p>
</blockquote>

<p>The form interpretation algorithm's first iteration
selects the first block, since its (hidden) form item variable is
initially undefined. This block outputs the main prompt, and its
form item variable is set to true. On the FIA's second
iteration, the first block is skipped because its form item
variable is now defined, and the state field is selected because
the dialog variable state is undefined. This field prompts the
user for the state, and then sets the variable state to the
answer. A detailed description of the filling of form item
variables from a field-level grammar may be found in <a
href="#dml3.1.6" shape="rect">Section 3.1.6</a>. The third form
iteration prompts and collects the city field. The fourth
iteration executes the final block and transitions to a different
URI.</p>

<p>Each field in this example has a prompt to play in order to
elicit a response, a grammar that specifies what to listen for,
and an event handler for the help event. The help event is thrown
whenever the user asks for assistance. The help event handler
catches these events and plays a more detailed prompt.</p>

<p>Here is a second directed form, one that prompts for credit
card information:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="get_card_info"&gt;
 &lt;block&gt;We now need your credit card type, number,
    and expiration date.&lt;/block&gt;
 &lt;field name="card_type"&gt;
  &lt;prompt count="1"&gt;What kind of credit card
    do you have?&lt;/prompt&gt;
  &lt;prompt count="2"&gt;Type of card?&lt;/prompt&gt;
  &lt;!-- This is an inline grammar. --&gt;
  &lt;grammar type="application/srgs+xml" root="r2" version="1.0"&gt;
    &lt;rule id="r2" scope="public"&gt;
       &lt;one-of&gt;
       &lt;item&gt;visa&lt;/item&gt;
       &lt;item&gt;master &lt;item repeat="0-1"&gt;card&lt;/item&gt;&lt;/item&gt;
       &lt;item&gt;amex&lt;/item&gt;
       &lt;item&gt;american express&lt;/item&gt;
       &lt;/one-of&gt;
    &lt;/rule&gt;
  &lt;/grammar&gt;
  &lt;help&gt; Please say Visa, MasterCard, or American Express.&lt;/help&gt;
 &lt;/field&gt;

 &lt;field name="card_num"&gt;
  &lt;grammar type="application/srgs+xml" src="/grammars/digits.grxml"/&gt;
  &lt;prompt count="1"&gt;What is your card number?&lt;/prompt&gt;
  &lt;prompt count="2"&gt;Card number?&lt;/prompt&gt;
  &lt;catch event="help"&gt;
  &lt;if cond="card_type =='amex' || card_type =='american express'"&gt;
       Please say or key in your 15 digit card number.
     &lt;else/&gt;
       Please say or key in your 16 digit card number.
     &lt;/if&gt;
  &lt;/catch&gt;
  &lt;filled&gt;
     &lt;if cond="(card_type == 'amex' || card_type =='american express') 
          &amp;amp;&amp;amp; card_num.length != 15"&gt;
       American Express card numbers must have 15 digits.
       &lt;clear namelist="card_num"/&gt;
       &lt;throw event="nomatch"/&gt;
     &lt;elseif cond="card_type != 'amex'
                &amp;amp;&amp;amp; card_type !='american express'
                &amp;amp;&amp;amp; card_num.length != 16"/&gt;
       MasterCard and Visa card numbers have 16 digits.
       &lt;clear namelist="card_num"/&gt;
       &lt;throw event="nomatch"/&gt;
     &lt;/if&gt;
  &lt;/filled&gt;
 &lt;/field&gt;

 &lt;field name="expiry_date"&gt;
   &lt;grammar type="application/srgs+xml" src="/grammars/digits.grxml"/&gt;
   &lt;prompt count="1"&gt;What is your card's expiration date?&lt;/prompt&gt;
   &lt;prompt count="2"&gt;Expiration date?&lt;/prompt&gt;
  &lt;help&gt;
     Say or key in the expiration date, for example one two oh one.
  &lt;/help&gt;
  &lt;filled&gt;
     &lt;!-- validate the mmyy --&gt;
     &lt;var name="mm"/&gt;
     &lt;var name="i" expr="expiry_date.length"/&gt;
     &lt;if cond="i == 3"&gt;
       &lt;assign name="mm" expr="expiry_date.substring(0,1)"/&gt;
     &lt;elseif cond="i == 4"/&gt;
       &lt;assign name="mm" expr="expiry_date.substring(0,2)"/&gt;
     &lt;/if&gt;
     &lt;if cond="mm == '' || mm &amp;lt; 1 || mm &amp;gt; 12"&gt;
       &lt;clear namelist="expiry_date"/&gt;
       &lt;throw event="nomatch"/&gt;
     &lt;/if&gt;
  &lt;/filled&gt;
 &lt;/field&gt;

 &lt;field name="confirm"&gt;
  &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
  &lt;prompt&gt;
      I have &lt;value expr="card_type"/&gt; number
      &lt;value expr="card_num"/&gt;, expiring on
      &lt;value expr="expiry_date"/&gt;.
      Is this correct?
  &lt;/prompt&gt;
  &lt;filled&gt;
    &lt;if cond="confirm"&gt;
      &lt;submit next="place_order.asp"
        namelist="card_type card_num expiry_date"/&gt;
    &lt;/if&gt;
    &lt;clear namelist="card_type card_num expiry_date confirm"/&gt;
  &lt;/filled&gt;
 &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>Note that the grammar alternatives 'amex' and 'american
express' return literal values which need to be handled
separately in the conditional expressions. <a href="#dml3.1.5"
shape="rect">Section 3.1.5</a> describes how semantic attachments
in the grammar can be used to return a single representation of
these inputs.</p>

<p>The dialog might go something like this:</p>

<blockquote>
<p>C: We now need your credit card type, number, and expiration
date.</p>

<p>C: What kind of credit card do you have?</p>

<p>H: Discover</p>

<p>C: I did not understand what you said. <span class="stage">(a
platform-specific default message.)</span></p>

<p>C: Type of card? <span class="stage">(the second prompt is
used now.)</span></p>

<p>H: Shoot. <span class="stage">(fortunately treated as "help"
by this platform)</span></p>

<p>C: Please say Visa, MasterCard, or American Express.</p>

<p>H: Uh, Amex. <span class="stage">(this platform ignores
"uh")</span></p>

<p>C: What is your card number?</p>

<p>H: One two three four ... wait ...</p>

<p>C: I did not understand what you said.</p>

<p>C: Card number?</p>

<p>H: <span class="stage">(uses DTMF)</span> 1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 #</p>

<p>C: What is your card's expiration date?</p>

<p>H: one two oh one</p>

<p>C: I have Amex number 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 expiring
on 1 2 0 1. Is this correct?</p>

<p>H: Yes</p>
</blockquote>

<p>Fields are the major building blocks of forms. A field
declares a variable and specifies the prompts, grammars, DTMF
sequences, help messages, and other event handlers that are used
to obtain it. Each field declares a VoiceXML form item variable
in the form's dialog scope. These may be submitted once the
form is filled, or copied into other variables.</p>

<p>Each field has its own speech and/or DTMF grammars, specified
explicitly using &lt;grammar&gt; elements, or implicitly using
the type attribute. The type attribute is used for builtin
grammars, like digits, boolean, or number.</p>

<p>Each field can have one or more prompts. If there is one, it
is repeatedly used to prompt the user for the value until one is
provided. If there are many, prompts are selected for playback
according to the prompt selection algorithm (see <a
href="#dml4.1.6" shape="rect">Section 4.1.6</a>). The count
attribute can be used to determine which prompts to use on each
attempt. In the example, prompts become shorter. This is called
<i>tapered prompting</i>.</p>

<p>The &lt;catch event="help"&gt; elements are event handlers
that define what to do when the user asks for help. Help messages
can also be tapered. These can be abbreviated, so that the
following two elements are equivalent:</p>

<pre class="example" xml:space="preserve">
&lt;catch event="help"&gt;
 Please say visa, mastercard, or amex.
&lt;/catch&gt;

&lt;help&gt;
 Please say visa, mastercard, or amex.
&lt;/help&gt;
</pre>

<p>The &lt;filled&gt; element defines what to do when the user
provides a recognized input for that field. One use is to specify
integrity constraints over and above the checking done by the
grammars, as with the date field above.</p>

<h3 id="L2400"><a id="dml2.1.5" name="dml2.1.5"
shape="rect">2.1.5 Mixed Initiative Forms</a></h3>

<p>The last section talked about forms implementing rigid,
computer-directed conversations. To make a form <i>mixed
initiative</i>, where both the computer and the human direct
the conversation, it must have one or more form-level grammars.
The dialog may be written in several ways. One common authoring
tyle combines an &lt;initial&gt; element that prompts for a
general response with &lt;field&gt; elements that prompt for
specific information. This is illustrated in the example
below. More complex techniques, such as using the 'cond'
attribute on &lt;field&gt; elements, may achieve a similar
effect.</p>

<p>If a <i>form</i> has form-level grammars:</p>

<ul>
<li>
<p>Its input items can be filled in any order.</p>
</li>

<li>
<p>More than one input item can be filled as a result of a single
user utterance.</p>
</li>
</ul>

<p>Only input items (and not control items) can be filled as a
result of matching a form-level grammar. The filling of field
variables when using a form-level grammar is described in <a
href="#dml3.1.6" shape="rect">Section 3.1.6</a>.</p>

<p>Also, the form's grammars can be active when the user is
in other dialogs. If a document has two forms on it, say a car
rental form and a hotel reservation form, and both forms have
grammars that are active for that document, a user could respond
to a request for hotel reservation information with information
about the car rental, and thus direct the computer to talk about
the car rental instead. The user can speak to any active grammar,
and have input items set and actions taken in response.</p>

<p><b>Example.</b> Here is a second version of the weather
information service, showing mixed initiative. It has been
"enhanced" for illustrative purposes with advertising and with a
confirmation of the city and state:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="weather_info"&gt;

 &lt;grammar src="cityandstate.grxml" type="application/srgs+xml"/&gt;

 &lt;!-- Caller can't barge in on today's advertisement. --&gt;
 &lt;block&gt;
  &lt;prompt bargein="false"&gt;
     Welcome to the weather information service.
     &lt;audio src="http://www.online-ads.example.com/wis.wav"/&gt;
  &lt;/prompt&gt;
 &lt;/block&gt;

 &lt;initial name="start"&gt;
  &lt;prompt&gt;
     For what city and state would you like the weather?
  &lt;/prompt&gt;
  &lt;help&gt; 
    Please say the name of the city and
    state for which you would like a weather report.
  &lt;/help&gt;
  &lt;!-- If user is silent, reprompt once, then
   try directed prompts. --&gt;
  &lt;noinput count="1"&gt; &lt;reprompt/&gt;&lt;/noinput&gt;
  &lt;noinput count="2"&gt; &lt;reprompt/&gt;
    &lt;assign name="start" expr="true"/&gt;&lt;/noinput&gt;
 &lt;/initial&gt;

 &lt;field name="state"&gt;
  &lt;prompt&gt;What state?&lt;/prompt&gt;
  &lt;help&gt;
    Please speak the state for which you want the weather.
  &lt;/help&gt;
 &lt;/field&gt;

 &lt;field name="city"&gt;
  &lt;prompt&gt;Please say the city in &lt;value expr="state"/&gt; 
                for which you want the weather.&lt;/prompt&gt;
  &lt;help&gt;Please speak the city for which you
    want the weather.&lt;/help&gt;
  &lt;filled&gt;
     &lt;!-- Most of our customers are in LA. --&gt;
     &lt;if cond="city == 'Los Angeles' &amp;amp;&amp;amp; state == undefined"&gt;
       &lt;assign name="state" expr="'California'"/&gt;
     &lt;/if&gt;
  &lt;/filled&gt;
 &lt;/field&gt;

 &lt;field name="go_ahead" modal="true"&gt;
  &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
  &lt;prompt&gt;Do you want to hear the weather for
    &lt;value expr="city"/&gt;, &lt;value expr="state"/&gt;?
  &lt;/prompt&gt;
  &lt;filled&gt;
     &lt;if cond="go_ahead"&gt;
       &lt;prompt bargein="false"&gt;
         &lt;audio src="http://www.online-ads.example.com/wis2.wav"/&gt;
       &lt;/prompt&gt;
       &lt;submit next="/servlet/weather" namelist="city state"/&gt;
     &lt;/if&gt;
     &lt;clear namelist="start city state go_ahead"/&gt;
  &lt;/filled&gt;
 &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>Here is a transcript showing the advantages for even a novice
user:</p>

<blockquote>
<p>C: Welcome to the weather information service. Buy Joe's
Spicy Shrimp Sauce.</p>

<p>C: For what city and state would you like the weather?</p>

<p>H: Uh, California.</p>

<p>C: Please say the city in California for which you want the
weather.</p>

<p>H: San Francisco, please.</p>

<p>C: Do you want to hear the weather for San Francisco,
California?</p>

<p>H: No</p>

<p>C: For what city and state would you like the weather?</p>

<p>H: Los Angeles.</p>

<p>C: Do you want to hear the weather for Los Angeles,
California?</p>

<p>H: Yes</p>

<p>C: Don't forget, buy Joe's Spicy Shrimp Sauce
tonight!</p>

<p>C: Mostly sunny today with highs in the 80s. Lows tonight from
the low 60s ...</p>
</blockquote>

<p>The go_ahead field has its modal attribute set to true. This
causes all grammars to be disabled except the ones defined in the
current form item, so that the only grammar active during this
field is the grammar for boolean.</p>

<p>An experienced user can get things done much faster (but is
still forced to listen to the ads):</p>

<blockquote>
<p>C: Welcome to the weather information service. Buy Joe's
Spicy Shrimp Sauce.</p>

<p>C: What ...</p>

<p>H <span class="stage">(barging in)</span>: LA</p>

<p>C: Do you ...</p>

<p>H <span class="stage">(barging in)</span>: Yes</p>

<p>C: Don't forget, buy Joe's Spicy Shrimp Sauce
tonight!</p>

<p>C: Mostly sunny today with highs in the 80s. Lows tonight from
the low 60s ...</p>
</blockquote>

<h4 id="L2501"><a id="dml2.1.5.1" name="dml2.1.5.1"
shape="rect">2.1.5.1 Controlling the order of field
collection.</a></h4>

<p>The form interpretation algorithm can be customized in several
ways. One way is to assign a value to a form item variable, so
that its form item will not be selected. Another is to use
&lt;clear&gt; to set a form item variable to undefined; this
forces the FIA to revisit the form item again.</p>

<p>Another method is to explicitly specify the next form item to
visit using &lt;goto nextitem&gt;. This forces an immediate
transfer to that form item even if any cond attribute present
evaluates to "false". No variables, conditions or counters in
the targeted form item will be reset. The form item's prompt
will be played even if it has already been visited. If the
&lt;goto nextitem&gt; occurs in a &lt;filled&gt; action, the rest
of the &lt;filled&gt; action and any pending &lt;filled&gt;
actions will be skipped.</p>

<p>Here is an example &lt;goto nextitem&gt; executed in response
to the exit event:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;link event="exit"&gt;
 &lt;grammar type="application/srgs+xml" src="/grammars/exit.grxml"/&gt;
&lt;/link&gt;

&lt;form id="survey_2000_03_30"&gt;
  &lt;catch event="exit"&gt;
    &lt;reprompt/&gt;
    &lt;goto nextitem="confirm_exit"/&gt;
  &lt;/catch&gt;
  &lt;block&gt;
   &lt;prompt&gt;
     Hello, you have been called at random to answer questions
     critical to U.S. foreign policy.
   &lt;/prompt&gt;
  &lt;/block&gt;

  &lt;field name="q1"&gt;
   &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
   &lt;prompt&gt;Do you agree with the IMF position on
     privatizing certain functions of Burkina Faso's
     agriculture ministry?&lt;/prompt&gt;
  &lt;/field&gt;

  &lt;field name="q2"&gt;
    &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
    &lt;prompt&gt;If this privatization occurs, will its
      effects be beneficial mainly to Ouagadougou and
      Bobo-Dioulasso?&lt;/prompt&gt;
  &lt;/field&gt;

  &lt;field name="q3"&gt;
    &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
    &lt;prompt&gt;Do you agree that sorghum and millet output
      might thereby increase by as much as four percent per
      annum?&lt;/prompt&gt;
  &lt;/field&gt;

  &lt;block&gt;
    &lt;submit next="register" namelist="q1 q2 q3"/&gt;
  &lt;/block&gt;

  &lt;field name="confirm_exit"&gt;
    &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
    &lt;prompt&gt;You have elected to exit.  Are you
      sure you want to do this, and perhaps adversely affect
      U.S. foreign policy vis-a-vis sub-Saharan Africa for
      decades to come?&lt;/prompt&gt;
    &lt;filled&gt;
      &lt;if cond="confirm_exit"&gt;
        Okay, but the U.S. State Department is displeased.
        &lt;exit/&gt;
      &lt;else/&gt;
        Good, let's pick up where we left off.
        &lt;clear namelist="confirm_exit"/&gt;
      &lt;/if&gt;
    &lt;/filled&gt;
    &lt;catch event="noinput nomatch"&gt;
      &lt;throw event="exit"/&gt;
    &lt;/catch&gt;
  &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>If the user says "exit" in response to any of the survey
questions, an exit event is thrown by the platform and caught by
the &lt;catch&gt; event handler. This handler directs that
confirm_exit be the next visited field. The confirm_exit field
would not be visited during normal completion of the survey
because the preceding &lt;block&gt; element transfers control to
the registration script.</p>

<h3 id="L2516"><a id="dml2.1.6" name="dml2.1.6"
shape="rect">2.1.6 Form Interpretation Algorithm</a></h3>

<p>We've presented the form interpretation algorithm (FIA)
at a conceptual level. In this section we describe it in more
detail. A more formal description is provided in <a
href="#dmlAFIA" shape="rect">Appendix C</a>.</p>

<h4 id="L2526"><a id="dml2.1.6.1" name="dml2.1.6.1"
shape="rect">2.1.6.1 Initialization Phase</a></h4>

<p>Whenever a form is entered, it is initialized. Internal prompt
counter variables (in the form's dialog scope) are reset to
1. Each variable (form-level &lt;var&gt; elements and form item
variables) is initialized, in document order, to undefined or to
the value of the relevant expr attribute.</p>

<h4 id="L2533"><a id="dml2.1.6.2" name="dml2.1.6.2"
shape="rect">2.1.6.2 Main Loop</a></h4>

<p>The main loop of the FIA has three phases:</p>

<p>The <i>select</i> phase: the next unfilled form item is
selected for visiting.</p>

<p>The <em>collect</em> phase: the selected <em>form item</em> is
visited, which prompts the user for input, enables the
appropriate grammars, and then waits for and collects an
<em>input</em> (such as a spoken phrase or DTMF key presses) or
an <em>event</em> (such as a request for help or a no input
timeout).</p>

<p>The <em>process</em> phase: an input is processed by filling
form items and executing &lt;filled&gt; elements to perform
actions such as input validation. An event is processed by
executing the appropriate event handler for that event type.</p>

<p>Note that the FIA may be given an input (a set of grammar
slot/slot value pairs) that was collected while the user was in a
different form's FIA. In this case the first iteration of
the main loop skips the select and collect phases, and goes right
to the process phase with that input. Also note that if an
error occurs in the select or collect phase that causes an event
to be generated, the event is thrown and the FIA moves directly
into the process phase.</p>

<h4 id="L2566"><a id="dml2.1.6.2.1" name="dml2.1.6.2.1"
shape="rect">2.1.6.2.1 Select phase</a></h4>

<p>The purpose of the select phase is to select the next form
item to visit. This is done as follows:</p>

<p>If a &lt;goto&gt; from the last main loop iteration's
process phase specified a &lt;goto nextitem&gt;, then the
specified form item is selected.</p>

<p>Otherwise the first form item whose <em>guard condition</em>
is false is chosen to be visited. If an error occurs while
checking guard conditions, the event is thrown which skips the
collect phase, and is handled in the process phase.</p>

<p>If no guard condition is false, and the last iteration
completed the form without encountering an explicit transfer of
control, the FIA does an implicit &lt;exit&gt; operation
(similarly, if execution proceeds outside of a form, such as when
an error is generated outside of a form, and there is no explicit
transfer of control, the interpreter will perform an implicit
&lt;exit&gt; operation).</p>

<h4 id="L2582"><a id="dml2.1.6.2.2" name="dml2.1.6.2.2"
shape="rect">2.1.6.2.2 Collect phase</a></h4>

<p>The purpose of the collect phase is to collect an input or an
event. The selected form item is <em>visited</em>, which performs
actions that depend on the type of form item:</p>

<p>If a &lt;field&gt; or &lt;record&gt; is visited,
the FIA selects and queues up any prompts based on the
item's prompt counter and the prompt conditions. Then it
activates and listens for the field level grammar(s) and any
active higher-level grammars, and waits for the item to be
filled or for some event to be generated.</p>

<p>If a &lt;transfer&gt; is visited, the prompts are queued based
on the item's prompt counter and the prompt conditions. The
item grammars are activated. The queue is played before the
transfer is executed.</p>

<p>If a &lt;subdialog&gt; or &lt;object&gt; is visited, the
prompts are queued based on the item's prompt counter and
the prompt conditions. Grammars are not activated. Instead, the
input collection behavior is specified by the executing context
for the subdialog or object. The queue is not played before the
subdialog or object is executed, but instead should be played
during the subsequent input collection.</p>

<p>If an &lt;initial&gt; is visited, the FIA selects and queues
up prompts based on the &lt;initial&gt;'s prompt counter
and prompt conditions. Then it listens for the form level
grammar(s) and any active higher-level grammars. It waits for a
grammar recognition or for an event.</p>

<p>A &lt;block&gt; element is visited by setting its form item
variable to true, evaluating its content, and then bypassing the
process phase. No input is collected, and the next iteration of
the FIA's main loop is entered.</p>

<h4 id="L2610"><a id="dml2.1.6.2.3" name="dml2.1.6.2.3"
shape="rect">2.1.6.2.3 Process phase</a></h4>

<p>The purpose of the process phase is to process the input or
event collected during the previous phases, as follows:</p>

<ul>
<li>If an event (such as a noinput or a hangup) occurred, then
the applicable catch element is identified and executed.
Selection of the applicable catch element starts in the scope of
the current form item and then proceeds outward by enclosing
dialog scopes. This can cause the FIA to terminate (e.g. if it
transitions to a different dialog or document or it does an
&lt;exit&gt;), or it can cause the FIA to go into the next
iteration of the main loop (e.g. as when the default help event
handler is executed).</li>

<li>If an input matches a grammar from a &lt;link&gt; then that
link's transition is executed, or its event is thrown. If
the &lt;link&gt; throws an event, the event is processed in the
context of the current form item (e.g. &lt;initial&gt;,
&lt;field&gt;, &lt;transfer&gt;, and so forth).</li>

<li>If an input matches a grammar in a form other than the
current form, then the FIA terminates, the other form is
initialized, and that form's FIA is started with this input
in its process phase.</li>
</ul>

<p>If an input matches a grammar in this form, then:</p>

<ul>
<li>The semantic result from the grammar is mapped into one or
more form item variables as described in <a href="#dml3.1.6"
shape="rect">Section 3.1.6</a>.</li>

<li>The &lt;filled&gt; actions triggered by these assignments are
identified as described in <a href="#dml2.4" shape="rect">Section
2.4</a>.</li>

<li>Each identified &lt;filled&gt; action is executed in document
order. If a &lt;submit&gt;, &lt;disconnect&gt;, &lt;exit&gt;,
&lt;return&gt;, &lt;goto&gt; or &lt;throw&gt; is encountered, the
remaining &lt;filled&gt; elements are not executed, and the FIA
either terminates or continues in the next main loop iteration.
&lt;reprompt&gt; does not terminate the FIA (the name suggests an
action), but rather just sets a flag that affects the treatment
of prompts on the subsequent iteration of the FIA. If an event is
thrown during the execution of a &lt;filled&gt;, event handler
selection starts in the scope of the &lt;filled&gt;, which could
be a form item or the form itself, and then proceeds outward by
enclosing dialog scopes.</li>
</ul>

<p>After completion of the process phase, interpretation
continues by returning to the select phase.</p>

<p>A more detailed form interpretation algorithm can be found in
<a href="#dmlAFIA" shape="rect">Appendix C.</a></p>

<h2 id="L2652"><a id="dml2.2" name="dml2.2" shape="rect">2.2
Menus</a></h2>

<p>A <i>menu</i> is a convenient syntactic shorthand for a form
containing a single anonymous field that prompts the user to make
a choice and transitions to different places based on that
choice. Like a regular form, it can have its grammar scoped such
that it is active when the user is executing another dialog. The
following menu offers the user three choices:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;menu&gt;
  &lt;prompt&gt;
    Welcome home. Say one of: &lt;enumerate/&gt;
  &lt;/prompt&gt;
  &lt;choice next="http://www.sports.example.com/vxml/start.vxml"&gt;
     Sports
  &lt;/choice&gt;
  &lt;choice next="http://www.weather.example.com/intro.vxml"&gt;
     Weather
  &lt;/choice&gt;
  &lt;choice next="http://www.stargazer.example.com/voice/astronews.vxml"&gt;
     Stargazer astrophysics news
  &lt;/choice&gt;
  &lt;noinput&gt;Please say one of &lt;enumerate/&gt;&lt;/noinput&gt;
&lt;/menu&gt;
&lt;/vxml&gt;
</pre>

<p>This dialog might proceed as follows:</p>

<blockquote>
<p>C: Welcome home. Say one of: sports; weather; Stargazer
astrophysics news.</p>

<p>H: Astrology.</p>

<p>C: I did not understand what you said. <span class="stage">(a
platform-specific default message.)</span></p>

<p>C: Welcome home. Say one of: sports; weather; Stargazer
astrophysics news.</p>

<p>H: sports.</p>

<p>C: <span class="stage">(proceeds to
http://www.sports.example.com/vxml/start.vxml)</span></p>
</blockquote>

<h3 id="L221"><a id="dml2.2.1" name="dml2.2.1" shape="rect">2.2.1
menu element</a></h3>

<p>This identifies the menu, and determines the scope of its
grammars. The menu element's attributes are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 7: menu attributes">
<caption align="bottom">Table 7: &lt;menu&gt;
Attributes</caption>

<tbody>
<tr>
<th>id</th>
<td>The identifier of the menu. It allows
the menu to be the target of a &lt;goto&gt; or a
&lt;submit&gt;.</td>
</tr>

<tr>
<th>scope</th>
<td>The menu's grammar scope. If it
is dialog (the default), the menu's grammars are only
active when the user transitions into the menu. If the scope is
document, its grammars are active over the whole document (or if
the menu is in the application root document, any loaded document
in the application).</td>
</tr>

<tr>
<th>dtmf</th>
<td>When set to true, the first nine
choices that have not explicitly specified a value for the dtmf
attribute are given the implicit ones "1", "2", etc. Remaining
choices that have not explicitly specified a value for the dtmf
attribute will not be assigned DTMF values (and thus cannot be
matched via a DTMF keypress). If there are choices which have
specified their own DTMF sequences to be something other than
"*", "#", or "0", an error.badfetch will be thrown. The default
is false.</td>
</tr>

<tr>
<th>accept</th>
<td>When set to "exact" (the default),
the text of the choice elements in the menu defines the exact
phrase to be recognized. When set to "approximate", the text of
the choice elements defines an approximate recognition phrase (as
described under <a href="#dml2.2.5" shape="rect">Section
2.2.5</a>). Each &lt;choice&gt; can override this setting.</td>
</tr>
</tbody>
</table>

<h3 id="L222"><a id="dml2.2.2" name="dml2.2.2" shape="rect">2.2.2
choice element</a></h3>

<p>The &lt;choice&gt; element serves several purposes:</p>

<ul>
<li>
<p>It may specify a speech grammar, defined either using a
&lt;grammar&gt; element or automatically generated by the process
described in <a href="#dml2.2.5" shape="rect">Section
2.2.5</a>.</p>
</li>

<li>
<p>It may specify a DTMF grammar, as discussed in <a
href="#dml2.2.3" shape="rect">Section 2.2.3</a>.</p>
</li>

<li>
<p>The contents may be used to form the &lt;enumerate&gt; prompt
string. This is described in <a href="#dml2.2.4"
shape="rect">Section 2.2.4</a>.</p>
</li>

<li>
<p>And it specifies either an event to be thrown or the URI to go
to when the choice is selected.</p>
</li>
</ul>

<p>The choice element's attributes are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 8: choice attributes">
<caption align="bottom">Table 8: &lt;choice&gt;
Attributes</caption>

<tbody>
<tr>
<th>dtmf</th>
<td>The DTMF sequence for this choice. It
is equivalent to a simple DTMF &lt;grammar&gt; and DTMF
properties (<a href="#dml6.3.3" shape="rect">Section 6.3.3</a>)
apply to recognition of the sequence. Unlike DTMF grammars,
whitespace is optional: dtmf="123#" is equivalent to dtmf="1 2 3
#".</td>
</tr>

<tr>
<th>accept</th>
<td>Override the setting for accept in
&lt;menu&gt; for this particular choice. When set to "exact" (the
default), the text of the choice element defines the exact phrase
to be recognized. When set to "approximate", the text of the
choice element defines an approximate recognition phrase (as
described under <a href="#dml2.2.5" shape="rect">Section
2.2.5</a>).</td>
</tr>

<tr>
<th>next</th>
<td>The URI of next dialog or
document.</td>
</tr>

<tr>
<th>expr</th>
<td>Specify an expression to evaluate as
a URI to transition to instead of specifying a next.</td>
</tr>

<tr>
<th>event</th>
<td>Specify an event to be thrown instead
of specifying a next.</td>
</tr>

<tr>
<th>eventexpr</th>
<td>An ECMAScript expression evaluating
to the name of the event to be thrown.</td>
</tr>

<tr>
<th>message</th>
<td>A message string providing additional
context about the event being thrown. The message is available as
the value of a variable within the scope of the catch element,
see <a href="#dml5.2.2" shape="rect">Section 5.2.2</a>.</td>
</tr>

<tr>
<th>messageexpr</th>
<td>An ECMAScript expression evaluating
to the message string.</td>
</tr>

<tr>
<th>fetchaudio</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchaudio
property.</td>
</tr>

<tr>
<th>fetchhint</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
documentfetchhint property.</td>
</tr>

<tr>
<th>fetchtimeout</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchtimeout
property.</td>
</tr>

<tr>
<th>maxage</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the documentmaxage
property.</td>
</tr>

<tr>
<th>maxstale</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
documentmaxstale property.</td>
</tr>
</tbody>
</table>

<p>Exactly one of "next", "expr", "event" or "eventexpr" must be
specified; otherwise, an error.badfetch event is thrown. Exactly
one of "message" or "messageexpr" may be specified; otherwise, an
error.badfetch event is thrown.</p>

<p>If a &lt;grammar&gt; element is specified in &lt;choice&gt;,
then the external grammar is used instead of an automatically
generated grammar. This allows the developer to precisely control
the &lt;choice&gt; grammar; for example:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;menu&gt;
  &lt;choice next="http://www.sports.example.com/vxml/start.vxml"&gt;
    &lt;grammar src="sports.grxml" type="application/srgs+xml"/&gt;
    Sports
  &lt;/choice&gt;
  &lt;choice next="http://www.weather.example.com/intro.vxml"&gt;
   &lt;grammar src="weather.grxml" type="application/srgs+xml"/&gt;
   Weather
  &lt;/choice&gt;
  &lt;choice next="http://www.stargazer.example.com/voice/astronews.vxml"&gt;
   &lt;grammar src="astronews.grxml" type="application/srgs+xml"/&gt;
   Stargazer astrophysics
  &lt;/choice&gt;
&lt;/menu&gt;
&lt;/vxml&gt;
</pre>

<br />
 

<h3 id="L223"><a id="dml2.2.3" name="dml2.2.3" shape="rect">2.2.3
DTMF in Menus</a></h3>

<p>Menus can rely purely on speech, purely on DTMF, or both in
combination by including a &lt;property&gt; element in the
&lt;menu&gt;. Here is a DTMF-only menu with explicit DTMF
sequences given to each choice, using the choice's dtmf
attribute:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;menu&gt;
  &lt;property name="inputmodes" value="dtmf"/&gt;
  &lt;prompt&gt;
   For sports press 1, For weather press 2, For Stargazer
   astrophysics press 3.
  &lt;/prompt&gt;
  &lt;choice dtmf="1" next="http://www.sports.example.com/vxml/start.vxml"/&gt;
  &lt;choice dtmf="2" next="http://www.weather.example.com/intro.vxml"/&gt;
  &lt;choice dtmf="3" next="http://www.stargazer.example.com/astronews.vxml"/&gt;
&lt;/menu&gt;
&lt;/vxml&gt;
</pre>

<p>Alternatively, you can set the &lt;menu&gt;'s dtmf
attribute to true to assign sequential DTMF digits to each of the
first nine choices that have not specified their own DTMF
sequences: the first choice has DTMF "1", and so on:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;menu dtmf="true"&gt;
  &lt;property name="inputmodes" value="dtmf"/&gt;
  &lt;prompt&gt;
   For sports press 1, For weather
   press 2, For Stargazer astrophysics press 3.
  &lt;/prompt&gt;
  &lt;choice next="http://www.sports.example.com/vxml/start.vxml"/&gt;
  &lt;choice next="http://www.weather.example.com/intro.vxml"/&gt;
  &lt;choice dtmf="0" next="#operator"/&gt;
  &lt;choice next="http://www.stargazer.example.com/voice/astronews.vxml"/&gt;
&lt;/menu&gt;
&lt;/vxml&gt;
</pre>

<h3 id="L224"><a id="dml2.2.4" name="dml2.2.4" shape="rect">2.2.4
enumerate element</a></h3>

<p>The &lt;enumerate&gt; element is an automatically generated
description of the choices available to the user. It specifies a
template that is applied to each choice in the order they appear
in the menu. If it is used with no content, a default template
that lists all the choices is used, determined by the interpreter
context. If it has content, the content is the template
specifier. This specifier may refer to two special variables:
_prompt is the choice's prompt, and _dtmf is a normalized
representation (i.e. a single whitespace between DTMF tokens)
of the choice's assigned DTMF sequence (note that if no DTMF
sequence is assigned to the choice element, or if a
&lt;grammar&gt; element is specified in &lt;choice&gt;, then
the _dtmf variable is assigned the ECMAScript undefined value ).
For example, if the menu were rewritten as</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;menu dtmf="true"&gt;
  &lt;prompt&gt;
    Welcome home.
    &lt;enumerate&gt;
     For &lt;value expr="_prompt"/&gt;, press &lt;value
     expr="_dtmf"/&gt;.
   &lt;/enumerate&gt;
   &lt;/prompt&gt;
   &lt;choice next="http://www.sports.example.com/vxml/start.vxml"&gt;
      sports &lt;/choice&gt;
   &lt;choice next="http://www.weather.example.com/intro.vxml"&gt;
      weather &lt;/choice&gt;
   &lt;choice next="http://www.stargazer.example.com/voice/astronews.vxml"&gt;
      Stargazer astrophysics news
   &lt;/choice&gt;
&lt;/menu&gt;
&lt;/vxml&gt;
</pre>

<p>then the menu's prompt would be:</p>

<blockquote>
<p>C: Welcome home. For sports, press 1. For weather, press 2.
For Stargazer astrophysics news, press 3.</p>
</blockquote>

<p>The &lt;enumerate&gt; element may be used within the prompts
and the catch elements associated with &lt;menu&gt; elements and
with &lt;field&gt; elements that contain &lt;option&gt; elements,
as discussed in <a href="#dml2.3.1.3" shape="rect">Section
2.3.1.3</a>. An error.semantic event is thrown if
&lt;enumerate&gt; is used elsewhere (for example,
&lt;enumerate&gt; within an &lt;enumerate&gt;).</p>

<h3 id="L225"><a id="dml2.2.5" name="dml2.2.5" shape="rect">2.2.5
Grammar Generation</a></h3>

<p>Any <i>choice phrase</i> specifies a set of words and phrases
to listen for. A choice phrase is constructed from the PCDATA of
the elements contained directly or indirectly in a &lt;choice&gt;
element of a &lt;menu&gt;, or in the &lt;option&gt; element of a
&lt;field&gt;.</p>

<p>If the accept attribute is "exact" then the user must say the
entire phrase in the same order in which they occur in the choice
phrase.</p>

<p>If the accept attribute is "approximate", then the choice may
be matched when a user says a subphrase of the expression. For
example, in response to the prompt "Stargazer astrophysics news"
a user could say "Stargazer", "astrophysics", "Stargazer news",
"astrophysics news", and so on. The equivalent grammar may be
language and platform dependent.</p>

<p>As an example of using "exact" and "approximate" in different
choices, consider this example:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;menu accept="approximate"&gt;
  &lt;choice next="http://www.stargazer.example.com/voice/astronews.vxml"&gt; 
   Stargazer Astrophysics News &lt;/choice&gt;
  &lt;choice accept="exact"
  next="http://www.physicsweekly.com/voice/example.vxml"&gt; 
   Physics Weekly  &lt;/choice&gt;
  &lt;choice accept="exact"
  next="http://www.particlephysics.com/voice/example.vxml"&gt; 
  Particle Physics Update &lt;/choice&gt;
  &lt;choice next="http://www.astronomytoday.com/voice/example.vxml"&gt; 
  Astronomy Today &lt;/choice&gt;
&lt;/menu&gt;
&lt;/vxml&gt;
</pre>

<p>Because "approximate" is specified for the first choice, the
user may say a subphrase when matching the first choice; for
instance, "Stargazer" or "Astrophysics News". However, because
"exact" is specified in the second and third choices, only a
complete phrase will match: "Physics Weekly" and "Particle
Physics Update".</p>

<h3 id="L226"><a id="dml2.2.6" name="dml2.2.6" shape="rect">2.2.6
Interpretation Model</a></h3>

<p>A menu behaves like a form with a single field that does all
the work. The menu prompts become field prompts. The menu event
handlers become the field event handlers. The menu grammars
become <i>form</i> grammars. As with forms, grammar matches in
menu will update the application.lastresult$ array. These
variables are described in <a href="#dml5.1.5"
shape="rect">Section 5.1.5</a>. Generated grammars must always
produce simple results whose interpretation and utterance values
are identical.</p>

<p>Upon entry, the menu's grammars are built and enabled,
and the prompt is played. When the user input matches a choice,
control transitions according to the value of the next, expr,
event or eventexpr attribute of the &lt;choice&gt;, only one of
which may be specified. If an event attribute is specified but
its event handler does not cause the interpreter to exit or
transition control, then the FIA will clear the form item
variable of the menu's anonymous field, causing the menu to be
executed again.</p>

<h2 id="L2931"><a id="dml2.3" name="dml2.3" shape="rect">2.3 Form
Items</a></h2>

<p>A <i>form item</i> is an element of a &lt;form&gt; that can be
visited during form interpretation. These elements are
&lt;field&gt;, &lt;block&gt;, &lt;initial&gt;, &lt;subdialog&gt;,
&lt;object&gt;, &lt;record&gt;, and &lt;transfer&gt;.</p>

<p>All form items have the following characteristics:</p>

<ul>
<li>
<p>They have a result variable, specified by the name attribute.
This variable may be given an initial value with the expr
attribute.</p>
</li>

<li>
<p>They have a guard condition specified with the cond attribute.
A form item is visited if it is not filled and its cond is not
specified or evaluates, after conversion to boolean, to true.</p>
</li>
</ul>

<p>Form items are subdivided into <i>input items</i>, those that
define the form's input item variables, and <i>control
items</i>, those that help control the gathering of the
form's input items. Input items (&lt;field&gt;,
&lt;subdialog&gt;, &lt;object&gt;, &lt;record&gt;, and
&lt;transfer&gt;) generally may contain the following
elements:</p>

<ul>
<li>
<p>&lt;filled&gt; elements containing some action to execute
after the result input item variable is filled in.</p>
</li>

<li>
<p>&lt;property&gt; elements to specify properties that are in
effect for this input item (the &lt;initial&gt; form item can
also contain this element).</p>
</li>

<li>
<p>&lt;prompt&gt; elements to specify prompts to be played when
this element is visited.</p>
</li>

<li>
<p>&lt;grammar&gt; elements to specify allowable spoken and
character input for this input item (&lt;subdialog&gt; and
&lt;object&gt; cannot contain this element).</p>
</li>

<li>
<p>&lt;catch&gt; elements and catch shorthands that are in effect
for this input item (the &lt;initial&gt; form item can also
contain this element).</p>
</li>
</ul>

<p>Each input item may have an associated set of <i>shadow
variables</i>. Shadow variables are used to return results from
the execution of an input item, other than the value stored under
the name attribute. For example, it may be useful to know the
confidence level that was obtained as a result of a recognized
grammar in a &lt;field&gt; element. A shadow variable is
referenced as <i>name</i>$.<i>shadowvar</i> where <i>name</i> is
the value of the form item's name attribute, and
<i>shadowvar</i> is the name of a specific shadow variable.
Shadow variables are writeable and can be modified by the
application. For example, the &lt;field&gt; element returns a
shadow variable confidence. The example below illustrates how
this shadow variable is accessed.</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="get_state"&gt;
&lt;field name="state"&gt;
  &lt;prompt&gt; Please say the name of a state. &lt;/prompt&gt;
  &lt;grammar src="http://mygrammars.example.com/states.gram"
              type="application/srgs"/&gt;
  &lt;filled&gt;
    &lt;if cond="state$.confidence &amp;lt; 0.4"&gt;
      &lt;throw event="nomatch"/&gt;
    &lt;/if&gt;
  &lt;/filled&gt;
&lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>In the example, the confidence of the result is examined, and
the result is rejected if the confidence is too low.</p>

<h3 id="L2999"><a id="dml2.3.1" name="dml2.3.1"
shape="rect">2.3.1 field element</a></h3>

<p>A field specifies an input item to be gathered from the user.
The field element's attributes are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 9: field attributes">
<caption align="bottom">Table 9: &lt;field&gt;
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>The form item variable in the dialog
scope that will hold the result. The name must be unique among
form items in the form. If the name is not unique, then a
badfetch error is thrown when the document is fetched. The name
must conform to the variable naming conventions in <a
href="#dml5.1" shape="rect">Section 5.1</a>.</td>
</tr>

<tr>
<th>expr</th>
<td>The initial value of the form item
variable; default is ECMAScript undefined. If initialized to a
value, then the form item will not be visited unless the form
item variable is cleared.</td>
</tr>

<tr>
<th>cond</th>
<td>An expression that must evaluate to
true after conversion to boolean in order for the form item to be
visited. The form item can also be visited if the attribute is
not specified.</td>
</tr>

<tr>
<th>type</th>
<td>The type of field, i.e., the name of
a builtin grammar type (see <a href="#dmlABuiltins"
shape="rect">Appendix P</a>). Platform support for builtin
grammar types is optional. If the specified builtin type is
not supported by the platform, an error.unsupported.builtin event
is thrown.</td>
</tr>

<tr>
<th>slot</th>
<td>The name of the grammar slot used to
populate the variable (if it is absent, it defaults to the
variable name). This attribute is useful in the case where the
grammar format being used has a mechanism for returning sets of
slot/value pairs and the slot names differ from the form item
variable names.</td>
</tr>

<tr>
<th>modal</th>
<td>If this is false (the default) all
active grammars are turned on while collecting this field. If
this is true, then only the field's grammars are enabled:
all others are temporarily disabled.</td>
</tr>
</tbody>
</table>

<p>The shadow variables of a &lt;field&gt; element with the name
<i>name</i> are given in Table 10. The values of the utterance,
inputmode and interpretation shadow variables must
be the same as those in application.lastresult$ (see <a
href="#dml5.1.5" shape="rect">Section 5.1.5</a>).</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 10: field shadow variables">
<caption align="bottom">Table 10: &lt;field&gt; Shadow
Variables</caption>

<tbody>
<tr>
<th><b><i>name</i>$.utterance</b> </th>
<td>The raw string of words that were
recognized. The exact tokenization and spelling is
platform-specific (e.g. "five hundred thirty" or "5 hundred 30"
or even "530"). In the case of a DTMF grammar, this variable will
contain the matched digit string.</td>
</tr>

<tr>
<th><b><i>name</i>$.inputmode</b> </th>
<td>The mode in which user input was
provided: dtmf or voice.</td>
</tr>

<tr>
<th><b><i>name</i>$.interpretation</b>
</th>
<td>An ECMAScript variable containing the
interpretation as described in <a href="#dml3.1.5"
shape="rect">Section 3.1.5</a>.</td>
</tr>

<tr>
<th><b><i>name</i>$.confidence</b> </th>
<td>
<p>The confidence level for the <i>name</i> field and may range
from 0.0-1.0. A value of 0.0 indicates minimum confidence, and a
value of 1.0 indicates maximum confidence.</p>

<p>A platform may use the utterance confidence (the value of
application.lastresult$.confidence) as the value of
<i>name</i>$.confidence. This distinction between field and
utterance level confidence is platform-dependent.</p>

<p>More specific interpretation of a confidence value is
platform-dependent since its computation is likely to differ
between platforms.</p>
</td>
</tr>
</tbody>
</table>

<h4 id="L3180"><a id="dml2.3.1.1" name="dml2.3.1.1"
shape="rect">2.3.1.1. Fields Using Explicit Grammars</a></h4>

<p>Explicit grammars can be specified via a URI, which can be
absolute or relative:</p>

<pre class="example" xml:space="preserve">
&lt;field name="flavor"&gt;
  &lt;prompt&gt;What is your favorite ice cream?&lt;/prompt&gt;
  &lt;grammar src="../grammars/ice_cream.grxml"
           type="application/srgs+xml"/&gt;
&lt;/field&gt;
</pre>

<p>Grammars can be specified inline, for example using a W3C ABNF
grammar:</p>

<pre class="example" xml:space="preserve">
&lt;field name="flavor"&gt;
  &lt;prompt&gt;What is your favorite flavor?&lt;/prompt&gt;
  &lt;help&gt;Say one of vanilla, chocolate, or strawberry.&lt;/help&gt;
  &lt;grammar mode="voice" type="application/srgs"&gt;
   #ABNF 1.0;
   $options = vanilla | chocolate | strawberry
  &lt;/grammar&gt;
&lt;/field&gt;
</pre>

<p>If both the &lt;grammar&gt; src attribute and an inline
grammar are specified, then an error.badfetch is thrown.</p>

<h4 id="L3292"><a id="dml2.3.1.2" name="dml2.3.1.2"
shape="rect">2.3.1.2. Explicit Grammars with
Platform-specific Builtins</a></h4>

<p>Platform support for builtin resources such as speech
grammars, DTMF grammars and audio files is optional. These
resources are accessed using platform-specific URIs, such as
"http://localhost:5000/grammar/boolean", or platform-specific
schemes such as the commonly used 'builtin' scheme,
"<i>builtin:</i>grammar/boolean".</p>

<p>If a platform supports access to builtin resources, then it
should support access to fundamental builtin grammars (see <a
href="#dmlABuiltins" shape="rect">Appendix P</a>); for
example</p>

<pre class="example" xml:space="preserve">
&lt;grammar src="builtin:grammar/boolean"/&gt;
&lt;grammar src="builtin:dtmf/boolean"/&gt;
</pre>

<p>where the first &lt;grammar&gt; references the builtin boolean
speech grammar, and the second references the builtin boolean
DTMF grammar.</p>

<p>By definition the following:</p>

<pre class="example" xml:space="preserve">
&lt;field type="<i>sample</i>"&gt;
   &lt;prompt&gt;Prompt for builtin grammar&lt;/prompt&gt;
&lt;/field&gt;
</pre>

<p>is equivalent to the following platform-specific builtin
grammars :</p>

<pre class="example" xml:space="preserve">
&lt;field&gt;
   &lt;grammar src="builtin:grammar/<i>sample</i>"/&gt;
   &lt;grammar src="builtin:dtmf/<i>sample</i>"/&gt; 
   &lt;prompt&gt;Prompt for builtin grammar&lt;/prompt&gt;
&lt;/field&gt;
</pre>

<p>where <i>sample</i> is one of the fundamental builtin field
types (e.g., boolean, date, etc.).</p>

<p>In addition, platform-specific builtin URI schemes may be used
to access grammars that are supported by particular interpreter
contexts. It is recommended that platform-specific builtin grammar
names begin with the string "x-", as this namespace will not be
used in future versions of the standard.</p>

<p>Examples of platform-specific builtin grammars:</p>

<pre class="example" xml:space="preserve">
&lt;grammar src="builtin:grammar/x-<i>sample</i>"/&gt;
&lt;grammar src="builtin:dtmf/x-<i>sample</i>"/&gt;
</pre>

<h4 id="L3193"><a id="dml2.3.1.3" name="dml2.3.1.3"
shape="rect">2.3.1.3. Fields Using Option Lists</a></h4>

<p>When a simple set of alternatives is all that is needed to
specify the legal input values for a field, it may be more
convenient to use an option list than a grammar. An option list
is represented by a set of &lt;option&gt; elements contained in a
&lt;field&gt; element. Each &lt;option&gt; element contains
PCDATA that is used to generate a speech grammar. This follows
the grammar generation method described for &lt;choice&gt; in <a
href="#dml2.2.5" shape="rect">Section 2.2.5</a> . Attributes may
be used to specify a DTMF sequence for each option and to control
the value assigned to the field's form item variable. When an
option is chosen, the value attribute determines the
interpretation value for the field's shadow variable and for
application.lastresult$.</p>

<p>The following field offers the user three choices and assigns
the value of the value attribute of the selected option to the
maincourse variable:</p>

<pre class="example" xml:space="preserve">
&lt;field name="maincourse"&gt;
  &lt;prompt&gt;
      Please select an entree. Today, we are featuring &lt;enumerate/&gt;
  &lt;/prompt&gt;

  &lt;option dtmf="1" value="fish"&gt; swordfish &lt;/option&gt;
  &lt;option dtmf="2" value="beef"&gt; roast beef &lt;/option&gt;
  &lt;option dtmf="3" value="chicken"&gt; frog legs &lt;/option&gt;

  &lt;filled&gt;
    &lt;submit next="/cgi-bin/maincourse.cgi"
        method="post" namelist="maincourse"/&gt;
  &lt;/filled&gt;
&lt;/field&gt;
</pre>

<p>This conversation might sound like:</p>

<blockquote>
<p>C: Please select an entree. Today, we're featuring
swordfish; roast beef; frog legs.</p>

<p>H: frog legs</p>

<p>C: <span class="stage">(assigns "chicken" to "maincourse",
then submits "maincourse=chicken" to /maincourse.cgi)</span></p>
</blockquote>

<p>The following example shows proper and improper use of
&lt;enumerate&gt; in a catch element of a form with several
fields containing &lt;option&gt; elements:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form&gt;
  &lt;block&gt;
    We need a few more details to complete your order.
  &lt;/block&gt;
  &lt;field name="color"&gt;
    &lt;prompt&gt;Which color?&lt;/prompt&gt;
    &lt;option&gt;red&lt;/option&gt;
    &lt;option&gt;blue&lt;/option&gt;
    &lt;option&gt;green&lt;/option&gt;
  &lt;/field&gt;
  &lt;field name="size"&gt;
    &lt;prompt&gt;Which size?&lt;/prompt&gt;
    &lt;option&gt;small&lt;/option&gt;
    &lt;option&gt;medium&lt;/option&gt;
    &lt;option&gt;large&lt;/option&gt;
  &lt;/field&gt;
  &lt;field name="quantity"&gt;
    &lt;grammar type="application/srgs+xml" src="/grammars/number.grxml"/&gt;
    &lt;prompt&gt;How many?&lt;/prompt&gt;
  &lt;/field&gt;
  &lt;block&gt;
    Thank you.  Your order is being processed.
    &lt;submit next="details.cgi" namelist="color size quantity"/&gt;
  &lt;/block&gt;
  &lt;catch event="help nomatch"&gt;
    Your options are &lt;enumerate/&gt;.
  &lt;/catch&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>A scenario might be:</p>

<p>C: We need a few more details to complete your order. Which
color?</p>

<p>H: help. (throws "help" event caught by form-level
&lt;catch&gt;)</p>

<p>C: Your options are red, blue, green.</p>

<p>H: red.</p>

<p>C: Which size?</p>

<p>H: 7 (throws "nomatch" event caught by form-level
&lt;catch&gt;)</p>

<p>C: Your options are small, medium, large.</p>

<p>H: small.</p>

<p>In the steps above, the &lt;enumerate/&gt; in the form-level
catch had something to enumerate: the &lt;option&gt; elements in
the "color" and "size" &lt;field&gt; elements. The next
&lt;field&gt;, however, is different:</p>

<p>C: How many?</p>

<p>H: a lot. (throws "nomatch" event caught by form-level
&lt;catch&gt;)</p>

<p>The form-level &lt;catch&gt;'s use of &lt;enumerate&gt; causes
an "error.semantic" event to be thrown because the "quantity"
&lt;field&gt; does not contain any &lt;option&gt; elements that
can be enumerated.</p>

<p>One solution is to add a field-level &lt;catch&gt; to the
"quantity" &lt;field&gt;:</p>

<pre class="example" xml:space="preserve">
&lt;catch event="help nomatch"&gt;
       Please say the number of items to be ordered.
&lt;/catch&gt;
</pre>

<p>The "nomatch" event would then be caught locally, resulting in
the following possible completion of the scenario:</p>

<p>C: Please say the number of items to be ordered.</p>

<p>H: 50</p>

<p>C: Thank you. Your order is being processed.</p>

<p>The &lt;enumerate&gt; element is also discussed in <a
href="#dml2.2.4" shape="rect">Section 2.2.4</a>.</p>

<p>The attributes of &lt;option&gt; are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 11: option attributes">
<caption align="bottom">Table 11: &lt;option&gt;
Attributes</caption>

<tbody>
<tr>
<th>dtmf</th>
<td>An optional DTMF sequence for
this option. It is equivalent to a simple DTMF
&lt;grammar&gt; and DTMF properties (<a href="#dml6.3.3"
shape="rect">Section 6.3.3</a>) apply to recognition of the
sequence. Unlike DTMF grammars, whitespace is optional:
dtmf="123#" is equivalent to dtmf="1 2 3 #". If unspecified,
no DTMF sequence is associated with this option so it cannot
be matched using DTMF.</td>
</tr>

<tr>
<th>accept</th>
<td>When set to "exact" (the default),
the text of the option element defines the exact phrase to be
recognized. When set to "approximate", the text of the option
element defines an approximate recognition phrase (as described
in <a href="#dml2.2.5" shape="rect">Section 2.2.5</a>).</td>
</tr>

<tr>
<th>value</th>
<td>The string to assign to the
field's form item variable when a user selects this option,
whether by speech or DTMF. The default assignment is the CDATA
content of the &lt;option&gt; element with leading and trailing
white space removed. If this does not exist, then the DTMF
sequence is used instead. If neither CDATA content nor a
dtmf sequence is specified, then the default assignment is
undefined and the field's form item variable is not
filled.</td>
</tr>
</tbody>
</table>

<p>The use of &lt;option&gt; does not preclude the simultaneous
use of &lt;grammar&gt;. The result would be the match from either
'grammar', not unlike the occurrence of two &lt;grammar&gt;
elements in the same &lt;field&gt; representing a disjunction of
choices.</p>

<h3 id="L3429"><a id="dml2.3.2" name="dml2.3.2"
shape="rect">2.3.2 block element</a></h3>

<p>This element is a form item. It contains executable content
that is executed if the block's form item variable is
undefined and the block's cond attribute, if any, evaluates to
true.</p>

<pre class="example" xml:space="preserve">
&lt;block&gt;
   Welcome to Flamingo, your source for lawn ornaments.
&lt;/block&gt;
</pre>

<p>The form item variable is automatically set to true just
before the block is entered. Therefore, blocks are typically
executed just once per form invocation.</p>

<p>Sometimes you may need more control over blocks. To do this,
you can name the form item variable, and set or clear it to
control execution of the &lt;block&gt;. This variable is declared
in the dialog scope of the form.</p>

<p>Attributes of &lt;block&gt; include:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 12: block attributes">
<caption align="bottom">Table 12: &lt;block&gt;
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>The name of the form item variable
used to track whether this block is eligible to be executed;
defaults to an inaccessible internal variable.</td>
</tr>

<tr>
<th>expr</th>
<td>The initial value of the form item
variable; default is ECMAScript undefined. If initialized to a
value, then the form item will not be visited unless the form
item variable is cleared.</td>
</tr>

<tr>
<th>cond</th>
<td>An expression that must evaluate to
true after conversion to boolean in order for the form item to be
visited.</td>
</tr>
</tbody>
</table>

<h3 id="L3475"><a id="dml2.3.3" name="dml2.3.3"
shape="rect">2.3.3. initial element</a></h3>

<p>In a typical mixed initiative form, an &lt;initial&gt; element
is visited when the user is initially being prompted for
form-wide information, and has not yet entered into the directed
mode where each field is visited individually. Like input items,
it has prompts, catches, and event counters. Unlike input items,
&lt;initial&gt; has no grammars, and no &lt;filled&gt; action.
For instance:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="get_from_and_to_cities"&gt;
   &lt;grammar src="http://www.directions.example.com/grammars/from_to.grxml" 
       type="application/srgs+xml"/&gt;
   &lt;block&gt;
       Welcome to the Driving Directions By Phone.
   &lt;/block&gt;
   &lt;initial name="bypass_init"&gt;
     &lt;prompt&gt;
       Where do you want to drive from and to?
     &lt;/prompt&gt;
     &lt;nomatch count="1"&gt;
        Please say something like "from Atlanta Georgia to Toledo Ohio".
     &lt;/nomatch&gt;
     &lt;nomatch count="2"&gt;
        I'm sorry, I still don't understand.
        I'll ask you for information one piece at a time.
        &lt;assign name="bypass_init" expr="true"/&gt;
        &lt;reprompt/&gt;
     &lt;/nomatch&gt;
   &lt;/initial&gt;
   &lt;field name="from_city"&gt;
     &lt;grammar src="http://www.directions.example.com/grammars/city.grxml" 
              type="application/srgs+xml"/&gt;
     &lt;prompt&gt;From which city are you leaving?&lt;/prompt&gt;
   &lt;/field&gt;
   &lt;field name="to_city"&gt;
     &lt;grammar src="http://www.directions.example.com/grammars/city.grxml" 
              type="application/srgs+xml"/&gt;
     &lt;prompt&gt;Which city are you going to?&lt;/prompt&gt;
   &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>If an event occurs while visiting an &lt;initial&gt;, then one
of its event handlers executes. As with other form items,
&lt;initial&gt; continues to be eligible to be visited while its
form item variable is undefined and while its cond attribute is
true. If one or more of the input item variables is set by user
input, then all &lt;initial&gt; form item variables are set to
true, before any &lt;filled&gt; actions are executed.</p>

<p>An &lt;initial&gt; form item variable can be manipulated
explicitly to disable, or re-enable the &lt;initial&gt;'s
eligibility to the FIA. For example, in the program above, the
&lt;initial&gt;'s form item variable is set on the second nomatch
event. This causes the FIA to no longer consider the
&lt;initial&gt; and to choose the next form item, which is a
&lt;field&gt; to prompt explicitly for the origination city.
Similarly, an &lt;initial&gt;'s form item variable could be
cleared, so that &lt;initial&gt; gets selected again by the
FIA.</p>

<p>More than one &lt;initial&gt; may be specified in the same
form. When the form is entered only the first &lt;initial&gt; in
document order that is eligible according to its cond attribute
will be visited. After the first form item variable is filled,
all &lt;initial&gt; form item variables are set to true so that
they are not visited. Explicitly clearing the &lt;initial&gt;s
can allow them to be reused, and even allow a different
&lt;initial&gt; to be selected on subsequent iterations of the
FIA.</p>

<p>The cond attribute can also be used to select which
&lt;initial&gt; to use in a given iteration. An application could
provide multiple &lt;initial&gt;s but mark them for use only
under special circumstances by using their cond attribute; for
example, if the cond attribute were used to test for novice
versus advanced operation mode, and only use the &lt;initial&gt;s
in advanced mode. Furthermore, if the first &lt;initial&gt; in
document order specified a value for its cond attribute which was
never fulfilled, then it would never be executed. If all
&lt;initial&gt;s had cond values which prevented their selection,
then none would be executed.</p>

<p>Normal grammar scoping rules apply when visiting an
&lt;initial&gt;, as described in <a href="#dml3.1.3"
shape="rect">Section 3.1.3.</a>. In particular, no grammars
scoped to a &lt;field&gt; are active.</p>

<p>Note: explicit assignment of values to input item variables
does not affect the value of an &lt;initial&gt;'s form item
variable.</p>

<p>Attributes of &lt;initial&gt; include:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 13: initial attributes">
<caption align="bottom">Table 13: &lt;initial&gt;
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>The name of a form item variable used
to track whether the &lt;initial&gt; is eligible to execute;
defaults to an inaccessible internal variable.</td>
</tr>

<tr>
<th>expr</th>
<td>The initial value of the form item
variable; default is ECMAScript undefined. If initialized to a
value, then the form item will not be visited unless the form
item variable is cleared.</td>
</tr>

<tr>
<th>cond</th>
<td>An expression that must evaluate to
true after conversion to boolean in order for the form item to be
visited.</td>
</tr>
</tbody>
</table>

<h3 id="L3525"><a id="dml2.3.4" name="dml2.3.4"
shape="rect">2.3.4 subdialog element</a></h3>

<p>Subdialogs are a mechanism for reusing common dialogs and
building libraries of reusable applications.</p>

<p>The &lt;subdialog&gt; element invokes a 'called' dialog (known
as the <i>subdialog</i>) identified by its src or srcexpr
attribute in the 'calling' dialog. The subdialog executes in a
new execution context that includes all the declarations and
state information for the subdialog, the subdialog's document,
and the subdialog's application root (if present), with counters
reset, and variables initialized. The subdialog proceeds until
the execution of a &lt;return&gt; or &lt;exit&gt; element, or
until no form items remain eligible for the FIA to select
(equivalent to an &lt;exit&gt;). A &lt;return&gt; element causes
control and data to be returned to the calling dialog (<a
href="#dml5.3.10" shape="rect">Section 5.3.10</a>). When the
subdialog returns, its execution context is deleted, and
execution resumes in the calling dialog with any appropriate
&lt;filled&gt; elements.</p>

<p>The subdialog context and the context of the called dialog are
independent, even if the dialogs are in the same document.
Variables in the scope chain of the calling dialog are not shared
with the called subdialog: there is no sharing of variable
instances between execution contexts. Even when the subdialog is
specified in the same document as the calling dialog, its
execution context contains different variable instances. When the
subdialog and calling dialog are in different documents but share
a root document, the subdialog's root variables are likewise
different instances. All variable bindings applied in the
subdialog context are lost on return to the calling context.</p>

<p>Within the subdialog context, however, normal scoping rules
for grammars, events and variables apply. Active grammars in a
subdialog include default grammars defined by the interpreter
context and appropriately scoped grammars in &lt;link&gt;,
&lt;menu&gt; and &lt;form&gt; elements in the subdialog's
document and its root document. Event handling and variable
binding likewise follow the standard scoping hierarchy.</p>

<p>From a programming perspective, subdialogs behave differently
from subroutines because the calling and called contexts are
independent. While a subroutine can access variable instances in
its calling routine, a subdialog cannot access the same variable
instance defined in its calling dialog. Similarly, subdialogs do
not follow the event percolation model in languages like Java
where an event thrown in a method automatically percolates up to
the calling context if not handled in the called context. Events
thrown in a subdialog are treated by event handlers defined
within its context; they can only be passed to the calling
context by a local event handler which explicitly returns the
event to the calling context (see <a href="#dml5.3.10"
shape="rect">Section 5.3.10</a>).</p>

<p>The subdialog is specified by the URI reference in the
&lt;subdialog&gt;'s src or srcexpr attribute (see <a
href="#ref_RFC2396" shape="rect">[RFC2396]</a>). If this
URI reference contains an absolute or relative URI, which may
include a query string, then that URI is fetched and the
subdialog is found in the resulting document. If the
&lt;subdialog&gt; has a namelist attribute, then those variables
are added to the query string of the URI.</p>

<p>If the URI reference contains only a fragment (i.e., no
absolute or relative URI), and if there is no namelist attribute,
then there is no fetch: the subdialog is found in the current
document.</p>

<p>The URI reference's fragment, if any, specifies the subdialog
to invoke. When there is no fragment, the subdialog invoked is
the lexically first dialog in the document.</p>

<p>If the URI reference is not valid (i.e. the dialog or document
does not exist), an error.badfetch must be thrown. Note that for
errors which occur during a dialog or document transition, the
scope in which errors are handled is platform specific.</p>

<p>The attributes are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 14: subdialog attributes">
<caption align="bottom">Table 14: &lt;subdialog&gt;
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>The result returned from the
subdialog, an ECMAScript object whose properties are the ones
defined in the namelist attribute of the &lt;return&gt;
element.</td>
</tr>

<tr>
<th>expr</th>
<td>The initial value of the form item
variable; default is ECMAScript undefined. If initialized to a
value, then the form item will not be visited unless the form
item variable is cleared.</td>
</tr>

<tr>
<th>cond</th>
<td>An expression that must evaluate to
true after conversion to boolean in order for the form item to be
visited.</td>
</tr>

<tr>
<th>namelist</th>
<td>The list of variables to submit. The
default is to submit no variables. If a namelist is supplied, it
may contain individual variable references which are submitted
with the same qualification used in the namelist. Declared
VoiceXML and ECMAScript variables can be referenced. If an
undeclared variable is referenced in the namelist, then an
error.semantic is thrown (<a href="#dml5.1.1"
shape="rect">Section 5.1.1</a>).</td>
</tr>

<tr>
<th>src</th>
<td>The URI of the subdialog.</td>
</tr>

<tr>
<th>srcexpr</th>
<td>An ECMAScript expression yielding the
URI of the subdialog</td>
</tr>

<tr>
<th>method</th>
<td>See <a href="#dml5.3.8"
shape="rect">Section 5.3.8</a>.</td>
</tr>

<tr>
<th>enctype</th>
<td>See <a href="#dml5.3.8"
shape="rect">Section 5.3.8</a>.</td>
</tr>

<tr>
<th>fetchaudio</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchaudio
property.</td>
</tr>

<tr>
<th>fetchtimeout</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchtimeout
property.</td>
</tr>

<tr>
<th>fetchhint</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
documentfetchhint property</td>
</tr>

<tr>
<th>maxage</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the documentmaxage
property.</td>
</tr>

<tr>
<th>maxstale</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
documentmaxstale property.</td>
</tr>
</tbody>
</table>

<p>Exactly one of "src" or "srcexpr" must be specified;
otherwise, an error.badfetch event is thrown.</p>

<p>The &lt;subdialog&gt; element may contain elements common to
all form items, and may also contain &lt;param&gt; elements.
The &lt;param&gt; elements of a &lt;subdialog&gt; specify the
parameters to pass to the subdialog. These parameters must be
declared as &lt;var&gt; elements in the form executed as
the subdialog or an error.semantic will be thrown. When a
subdialog initializes,  the subdialog's form level
&lt;var&gt; elements  are initialized in document order to
the value specified by the &lt;param&gt; element with the
corresponding name. The parameter values are computed by
evaluating the &lt;param&gt; expr attribute in the context of
the &lt;param&gt; element. An expr attribute in the &lt;var&gt;
element is ignored in this case. If no corresponding
&lt;param&gt; is specified to &lt;var&gt; element, an expr
attribute is used as a default value, or the variable is
undefined if the expr attribute is unspecified as with the
regular &lt;form&gt; element.</p>

<p>In the example below, the birthday of an individual is used to
validate their driver's license. The src attribute of the
subdialog refers to a form that is within the same document. The
&lt;param&gt; element is used to pass the birthday value to the
subdialog.</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;!-- form dialog that calls a subdialog --&gt;
&lt;form&gt;
  &lt;subdialog name="result" src="#getdriverslicense"&gt;
   &lt;param name="birthday" expr="'2000-02-10'"/&gt;
   &lt;filled&gt;
     &lt;submit next="http://myservice.example.com/cgi-bin/process"/&gt;
   &lt;/filled&gt;
  &lt;/subdialog&gt;
&lt;/form&gt;

&lt;!-- subdialog to get drivers license --&gt;
&lt;form id="getdriverslicense"&gt;
  &lt;var name="birthday"/&gt;
  &lt;field name="drivelicense"&gt;
   &lt;grammar src="http://grammarlib/drivegrammar.grxml"
      type="application/srgs+xml"/&gt;
   &lt;prompt&gt; Please say your drivers license number. &lt;/prompt&gt;
   &lt;filled&gt;
     &lt;if cond="validdrivelicense(drivelicense,birthday)"&gt;
       &lt;var name="status" expr="true"/&gt;
     &lt;else/&gt;
       &lt;var name="status" expr="false"/&gt;
     &lt;/if&gt;
     &lt;return namelist="drivelicense status"/&gt;
   &lt;/filled&gt;
  &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>The driver's license value is returned to calling
dialog, along with a status variable in order to indicate whether
the license is valid or not.</p>

<p>This example also illustrates the convenience of using
&lt;param&gt; as a means for forwarding data to the subdialog as
a means of instantiating values in the subdialog without using
server side scripting. An alternate solution that uses scripting,
is shown below.</p>

<h5 id="Document">Document with form that calls a subdialog</h5>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
  &lt;form&gt;
   &lt;field name="birthday"&gt;
     &lt;grammar type="application/srgs+xml" src="/grammars/date.grxml"/&gt;
     What is your birthday?
   &lt;/field&gt;
   &lt;subdialog name="result"
          src="/cgi-bin/getlib#getdriverslicense"
          namelist="birthday"&gt;
     &lt;filled&gt;
       &lt;submit next="http://myservice.example.com/cgi-bin/process"/&gt;
     &lt;/filled&gt;
   &lt;/subdialog&gt;
  &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<h5 id="Document1">Document containing the subdialog
<i>(generated by /cgi-bin/getlib)</i></h5>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
  &lt;form id="getdriverslicense"&gt;
    &lt;var name="birthday" expr="'1980-02-10'"/&gt;
    &lt;!-- Generated by server script --&gt;
   &lt;field name="drivelicense"&gt;
     &lt;grammar src="http://grammarlib/drivegrammar.grxml"
        type="application/srgs+xml"/&gt;
     &lt;prompt&gt;
       Please say your drivers license number.
     &lt;/prompt&gt;
     &lt;filled&gt;
       &lt;if cond="validdrivelicense(drivelicense,birthday)"&gt;
         &lt;var name="status" expr="true"/&gt;
       &lt;else/&gt;
         &lt;var name="status" expr="false"/&gt;
       &lt;/if&gt;
       &lt;return namelist="drivelicense status"/&gt;
     &lt;/filled&gt;
   &lt;/field&gt;
  &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>In the above example, a server side script had to generate the
document and embed the birthday value.</p>

<p>One last example is shown below that illustrates a subdialog
to capture general credit card information. First the subdialog
is defined in a separate document; it is intended to be reusable
across different applications. It returns a status, the credit
card number, and the expiry date; if a result cannot be obtained,
the status is returned with value "no_result".</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
   &lt;!-- Example of subdialog to collect credit card information. --&gt;
   &lt;!-- file is at http://www.somedomain.example.com/ccn.vxml --&gt;
   &lt;form id="getcredit"&gt;
     &lt;var name="status" expr="'no_result'"/&gt;

     &lt;field name="creditcardnum"&gt;
       &lt;prompt&gt;
         What is your credit card number?
       &lt;/prompt&gt;
       &lt;help&gt;
         I am trying to collect your credit card information.
         &lt;reprompt/&gt;
       &lt;/help&gt;
       &lt;nomatch&gt;
         &lt;return namelist="status"/&gt;
       &lt;/nomatch&gt;
       &lt;grammar src="ccn.grxml" type="application/srgs+xml"/&gt;
     &lt;/field&gt;

     &lt;field name="expirydate"&gt;
       &lt;grammar type="application/srgs+xml" src="/grammars/date.grxml"/&gt;
       &lt;prompt&gt;
         What is the expiry date of this card?
       &lt;/prompt&gt;
       &lt;help&gt;
         I am trying to collect the expiry date of the credit
         card number you provided.
         &lt;reprompt/&gt;
       &lt;/help&gt;
       &lt;nomatch&gt;
         &lt;return namelist="status"/&gt;
       &lt;/nomatch&gt;
     &lt;/field&gt;

     &lt;block&gt;
       &lt;assign name="status" expr="'result'"/&gt;
       &lt;return namelist="status creditcardnum expirydate"/&gt;
     &lt;/block&gt;
   &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>An application that includes a calling dialog is shown below.
It obtains the name of a software product and operating system
using a mixed initiative dialog, and then solicits credit card
information using the subdialog.</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
  &lt;!-- Example main program --&gt;
  &lt;!-- http://www.somedomain.example.com/main.vxml --&gt;
  &lt;!-- calls subdialog ccn.vxml --&gt;

  &lt;!-- assume this gets defined by some dialog --&gt;
  &lt;var name="username"/&gt;

  &lt;form id="buysoftware"&gt;
    &lt;var name="ccn"/&gt;
    &lt;var name="exp"/&gt;
    &lt;grammar src="buysoftware.grxml" type="application/srgs+xml"/&gt;
    &lt;initial name="start"&gt;
      &lt;prompt&gt;
        Please tell us the software product you wish to buy
        and the operating system on which it must run.
      &lt;/prompt&gt;
      &lt;noinput&gt;
        &lt;assign name="start" expr="true"/&gt;
      &lt;/noinput&gt;
    &lt;/initial&gt;

    &lt;field name="product"&gt;
      &lt;prompt&gt;
        Which software product would you like to buy?
      &lt;/prompt&gt;
    &lt;/field&gt;

    &lt;field name="operatingsystem"&gt;
      &lt;prompt&gt;
        Which operating system does this software need to run on?
      &lt;/prompt&gt;
    &lt;/field&gt;

    &lt;subdialog name="cc_results"
        src="http://somedomain.example.com/ccn.vxml"&gt;
      &lt;filled&gt;
        &lt;if cond="cc_results.status=='no_result'"&gt;
          Sorry, your credit card information could not be
          Obtained. This order is cancelled.
          &lt;exit/&gt;
        &lt;else/&gt;
          &lt;assign name="ccn" expr="cc_results.creditcardnum"/&gt;
          &lt;assign name="exp" expr="cc_results.expirydate"/&gt;
        &lt;/if&gt;
      &lt;/filled&gt;
    &lt;/subdialog&gt;

    &lt;block&gt;
      We will now process your order. Please hold.
      &lt;submit next="www.somedomain.example.com/process_order.asp"
              namelist="username product operatingsystem ccn exp"/&gt;
    &lt;/block&gt;
  &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<h3 id="L3697"><a id="dml2.3.5" name="dml2.3.5"
shape="rect">2.3.5. object element</a></h3>

<p>A VoiceXML implementation platform may expose
platform-specific functionality for use by a VoiceXML application
via the &lt;object&gt; element. The &lt;object&gt; element makes
direct use of its own content during initialization (e.g.
&lt;param&gt; child element) and execution. As a result,
&lt;object&gt; content cannot be treated as alternative content.
Notice that like other input items, &lt;object&gt; has prompts
and catch elements. It may also have &lt;filled&gt; actions.</p>

<p>For example, a platform-specific credit card collection object
could be accessed like this:</p>

<pre class="example" xml:space="preserve">
&lt;object
    name="debit"
    classid="method://credit-card/gather_and_debit"
    data="http://www.recordings.example.com/prompts/credit/jesse.jar"&gt;
  &lt;param name="amount" expr="document.amt"/&gt;
  &lt;param name="vendor" expr="vendor_num"/&gt;
&lt;/object&gt;
</pre>

<p>In this example, the &lt;param&gt; element (<a href="#dml6.4"
shape="rect">Section 6.4</a>) is used to pass parameters to the
object when it is invoked. When this &lt;object&gt; is executed,
it returns an ECMAScript object as the value of its form item
variable. This &lt;block&gt; presents the values returned from
the credit card object:</p>

<pre class="example" xml:space="preserve">
&lt;block&gt;
   &lt;prompt&gt;
     The card type is &lt;value expr="debit.card"/&gt;.
   &lt;/prompt&gt;

   &lt;prompt&gt;
     The card number is &lt;value expr="debit.card_no"/&gt;.
   &lt;/prompt&gt;

   &lt;prompt&gt;
     The expiration date is &lt;value expr="debit.expiry_date"/&gt;.
   &lt;/prompt&gt;

   &lt;prompt&gt;
     The approval code is &lt;value expr="debit.approval_code"/&gt;.
   &lt;/prompt&gt;

   &lt;prompt&gt;The confirmation number is
     &lt;value expr="debit.conf_no"/&gt;.
   &lt;/prompt&gt;
&lt;/block&gt;
</pre>

<p>As another example, suppose that a platform has a feature that
allows the user to enter arbitrary text messages using a
telephone keypad.</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="gather_pager_message"&gt;
  &lt;object name="message"
      classid="builtin://keypad-text-input"&gt;
   &lt;prompt&gt;
     Enter your message by pressing your keypad once
     per letter.  For a space, enter star.  To end the
     message, press the pound sign.
   &lt;/prompt&gt;
  &lt;/object&gt;

  &lt;block&gt;
    &lt;assign name="document.pager_message" expr="message.text"/&gt;
    &lt;goto next="#confirm_pager_message"/&gt;
  &lt;/block&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>The user is first prompted for the pager message, then keys it
in. The &lt;block&gt; copies the message to the variable
document.pager_message.</p>

<p>Attributes of &lt;object&gt; include:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 15: object attributes">
<caption align="bottom">Table 15: &lt;object&gt;
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>When the object is evaluated, it sets
this variable to an ECMAScript value whose type is defined by the
object.</td>
</tr>

<tr>
<th>expr</th>
<td>The initial value of the form item
variable; default is ECMAScript undefined. If initialized to a
value, then the form item will not be visited unless the form
item variable is cleared.</td>
</tr>

<tr>
<th>cond</th>
<td>An expression that must evaluate to
true after conversion to boolean in order for the form item to be
visited.</td>
</tr>

<tr>
<th>classid</th>
<td>The URI specifying the location of
the object's implementation. The URI conventions are
platform-dependent.</td>
</tr>

<tr>
<th>codebase</th>
<td>The base path used to resolve
relative URIs specified by classid, data, and archive. It
defaults to the base URI of the current document.</td>
</tr>

<tr>
<th>codetype</th>
<td>The content type of data expected
when downloading the object specified by classid. When absent it
defaults to the value of the type attribute.</td>
</tr>

<tr>
<th>data</th>
<td>The URI specifying the location of
the object's data. If it is a relative URI, it is
interpreted relative to the codebase attribute.</td>
</tr>

<tr>
<th>type</th>
<td>The content type of the data
specified by the data attribute.</td>
</tr>

<tr>
<th>archive</th>
<td>A space-separated list of URIs for
archives containing resources relevant to the object, which may
include the resources specified by the classid and data
attributes. URIs which are relative are interpreted relative to
the codebase attribute.<br />
 <br />
 </td>
</tr>

<tr>
<th>fetchhint</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
objectfetchhint property.</td>
</tr>

<tr>
<th>fetchtimeout</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchtimeout
property.</td>
</tr>

<tr>
<th>maxage</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the objectmaxage
property.</td>
</tr>

<tr>
<th>maxstale</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the objectmaxstale
property.</td>
</tr>
</tbody>
</table>

<p>There is no requirement for implementations to provide
platform-specific objects, although implementations must handle
the &lt;object&gt; element by throwing
error.unsupported.objectname if the particular platform-specific
object is not supported (note that 'objectname' in
error.unsupported.objectname is a fixed string, so not
substituted with the name of the unsupported object). If
an implementation does this, it is considered to be supporting
the &lt;object&gt; element.</p>

<p>The object itself is responsible for determining whether
parameter names or values it receives are invalid. If so, the
&lt;object&gt; element throws an error. The error may be either
object-specific or one of the standard errors listed in <a
href="#dml5.2.6" shape="rect">Section 5.2.6</a>.</p>

<h3 id="L3844"><a id="dml2.3.6" name="dml2.3.6"
shape="rect">2.3.6. record element</a></h3>

<p>The &lt;record&gt; element is an input item that collects a
recording from the user. A reference to the recorded audio is
stored in the input item variable, which can be played back
(using the expr attribute on &lt;audio&gt;) or submitted to a
server, as shown in this example:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
   &lt;form&gt;
     &lt;property name="bargein" value="true"/&gt;
     &lt;block&gt;
       &lt;prompt&gt;
         Riley is not available to take your call.
       &lt;/prompt&gt;
     &lt;/block&gt;
     &lt;record  name="msg" beep="true" maxtime="10s"
       finalsilence="4000ms" dtmfterm="true" type="audio/x-wav"&gt;
       &lt;prompt timeout="5s"&gt;
         Record a message after the beep.
       &lt;/prompt&gt;
       &lt;noinput&gt;
         I didn't hear anything, please try again.
       &lt;/noinput&gt;
     &lt;/record&gt;

     &lt;field name="confirm"&gt;
       &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
       &lt;prompt&gt;
          Your message is &lt;audio expr="msg"/&gt;.
       &lt;/prompt&gt;
       &lt;prompt&gt;
         To keep it, say yes.  To discard it, say no.
       &lt;/prompt&gt;
       &lt;filled&gt;
         &lt;if cond="confirm"&gt;
           &lt;submit next="save_message.pl" enctype="multipart/form-data"
               method="post" namelist="msg"/&gt;
         &lt;/if&gt;
         &lt;clear/&gt;
       &lt;/filled&gt;
     &lt;/field&gt;
   &lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>The user is prompted to record a message, and then records it.
The recording terminates when one of the following conditions is
met: the interval of final silence occurs, a DTMF key is pressed,
the maximum recording time is exceeded, or the caller hangs up.
The recording is played back, and if the user approves it, is
sent on to the server for storage using the HTTP POST method.
Notice that like other input items, &lt;record&gt; has grammar,
prompt and catch elements. It may also have &lt;filled&gt;
actions.</p>

<p class="fig"><img
alt="Timing diagram showing an example of prompting a user for input,
then recording the user's voice." src="Images/image026.gif"
width="600" /><br />
Figure 7: Timing of prompts, audio recording, and DTMF input</p>

<p>When a user hangs up during recording, the recording
terminates and a connection.disconnect.hangup event is thrown.
However, audio recorded up until the hangup is available through
the &lt;record&gt; variable. Applications, such as simple
voicemail services, can then return audio data to a server even
after disconnection:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form&gt;
   &lt;record  name="msg" beep="true" maxtime="10s"
       finalsilence="4000ms" dtmfterm="true" type="audio/x-wav"&gt;
       &lt;prompt timeout="5s"&gt;
         Record a message after the beep.
       &lt;/prompt&gt;
       &lt;noinput&gt;
         I didn't hear anything, please try again.
       &lt;/noinput&gt;
       &lt;catch event="connection.disconnect.hangup"&gt;
           &lt;submit next="./voicemail_server.asp"/&gt;
       &lt;/catch&gt;
   &lt;/record&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>A <i>recording begins</i> at the earliest after the playback
of any prompts (including the 'beep' tone if defined). As an
optimization, a platform may begin recording when the user starts
speaking.</p>

<p>A timeout interval is defined to begin immediately after
prompt playback (including the 'beep' tone if defined) and its
duration is determined by the 'timeout' property. If the timeout
interval is exceeded before recording begins, then a
&lt;noinput&gt; event is thrown.</p>

<p>A maxtime interval is defined to begin when recording begins
and its duration is determined by a 'maxtime' attribute. If the
maxtime interval is exceeded before recording ends, then the
recording is terminated and the maxtime shadow variable is set to
'true'.</p>

<p>A <i>recording ends</i> when an event is thrown, DTMF or
speech input matches an active grammar, or the maxtime interval
is exceeded. As an optimization, a platform may end recording
after a silence interval (set by the 'finalsilence' attribute)
indicating the user has stopped speaking.</p>

<p>If no audio is collected during execution of &lt;record&gt;,
then the record variable remains unfilled (<a
href="#unfilled_record" shape="rect">note</a>). This can occur,
for example, when DTMF or speech input is received during prompt
playback or before the timeout interval expires. In particular,
if no audio is collected before the user terminates recording
with DTMF input matching a local DTMF grammar (or when the
dtmfterm attribute is set to true), then the record variable is
not filled (so shadow variables are not set), and the FIA applies
as normal without a noinput event being thrown. However,
information about the input may be available in these situations
via application.lastresult$
as described in <a href="#dml5.1.5" shape="rect">Section
5.1.5</a>.</p>

<p>The &lt;record&gt; element contains a 'dtmfterm' attribute as
a developer convenience. A 'dtmfterm' attribute with the value
'true' is equivalent to the definition of a local DTMF grammar
which matches any DTMF input. The dtmfterm attribute has
priority over specified local DTMF grammars.</p>

<p>Any DTMF keypress matching an active grammar terminates
recording. DTMF keypresses not matching an active grammar are
ignored (and therefore do not terminate or otherwise affect
recording) and may optionally be removed from the signal by the
platform.</p>

<p>Platform support for recognition of speech grammars during
recording is optional. If the platform supports simultaneous
recognition and recording, then spoken input matching an
active non-local speech grammar terminates recording and the
FIA is invoked, transferring execution to the element
containing the grammar. The 'terminating' speech input is
accessible via application.lastresult$. The audio of the
recognized 'terminating' speech input is not available and is
not part of the recording. Note that, unlike DTMF, speech
recognition input cannot be used just to terminate recording:
if local speech grammars are specified, they are treated as
inactive (i.e. they are ignored), even if the platform supports
simultaneous recognition and recording.</p>

<p>If the termination grammar matched is a local grammar, the
recording is placed in the record variable. Otherwise, the record
variable is left unfilled (<a href="#unfilled_record"
shape="rect">note</a>) and the form interpretation algorithm is
invoked. In each case, application.lastresult$ is assigned.</p>

<p><i><a id="unfilled_record" name="unfilled_record"
shape="rect">note</a></i> Although the record variable is not
filled with a recording in this case, a match of a non-local
grammar may nevertheless result in an assignment of some value to
the record variable (see <a href="#dml3.1.6" shape="rect">Section
3.1.6</a>).</p>

<p>The attributes of &lt;record&gt; are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 16: record attributes">
<caption align="bottom">Table 16: &lt;record&gt;
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>
<p>The input item variable that will hold the recording.</p>

<p>Note that how this variable is implemented may vary between
platforms (although all platforms must support its behaviour in
&lt;audio&gt; and &lt;submit&gt; as described in this
specification).</p>
</td>
</tr>

<tr>
<th>expr</th>
<td>The initial value of the form item
variable; default is ECMAScript undefined. If initialized to a
value, then the form item will not be visited unless the form
item variable is cleared.</td>
</tr>

<tr>
<th>cond</th>
<td>An expression that must evaluate to
true after conversion to boolean in order for the form item to be
visited.</td>
</tr>

<tr>
<th>modal</th>
<td>If this is true (the default) all
non-local speech and DTMF grammars are not active while making
the recording. If this is false, non-local speech and DTMF
grammars are active.</td>
</tr>

<tr>
<th>beep</th>
<td>If true, a tone is emitted just prior
to recording. Defaults to false.</td>
</tr>

<tr>
<th>maxtime</th>
<td>The maximum duration to record.
The value is a Time Designation (see <a href="#dml6.5"
shape="rect">Section 6.5</a>). Defaults to a
platform-specific value.</td>
</tr>

<tr>
<th>finalsilence</th>
<td>The interval of silence that
indicates end of speech. The value is a Time Designation
(see <a href="#dml6.5" shape="rect">Section 6.5</a>).
Defaults to a platform-specific value.</td>
</tr>

<tr>
<th>dtmfterm</th>
<td>If true, any DTMF keypress not
matched by an active grammar will be treated as a match of an
active (anonymous) local DTMF grammar. Defaults to true.</td>
</tr>

<tr>
<th>type</th>
<td>The media format of the resulting
recording. Platforms must support the audio file formats
specified in <a href="#dmlAAudioFormats" shape="rect">Appendix
E</a> (other formats may also be supported). Defaults to a
platform-specific format which should be one of the required
formats.</td>
</tr>
</tbody>
</table>

<p>The &lt;record&gt; element has the following shadow variables
set after the recording has been made:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 17: record shadow variables">
<caption align="bottom">Table 17: &lt;record&gt; Shadow
Variables</caption>

<tbody>
<tr>
<th><b><i>name</i>$.duration</b> </th>
<td>The duration of the recording in
milliseconds.</td>
</tr>

<tr>
<th><b><i>name</i>$.size</b> </th>
<td>The size of the recording in
bytes.</td>
</tr>

<tr>
<th><b><i>name</i>$.termchar</b> </th>
<td>If the dtmfterm attribute is true,
and the user terminates the recording by pressing a DTMF key,
then this shadow variable is the key pressed (e.g. "#").
Otherwise it is undefined.</td>
</tr>

<tr>
<th><b><i>name</i>$.maxtime</b> </th>
<td>Boolean, true if the recording was
terminated because the maxtime duration was reached.</td>
</tr>
</tbody>
</table>

<h3 id="L4002"><a id="dml2.3.7" name="dml2.3.7"
shape="rect">2.3.7. transfer element</a></h3>

<p>The &lt;transfer&gt; element directs the interpreter to
connect the caller to another entity (e.g. telephone line or
another voice application). During the transfer operation, the
current interpreter session is suspended.</p>

<p>There are a variety of ways an implementation platform can
initiate a transfer, including "bridge", "blind", network-based
redirect (sometimes referred to as "take back and transfer"),
"switchhook transfer", etc. Bridge and blind transfer types are
supported; the others are highly dependent upon specific platform
and network features and configuration and therefore are outside
the scope of this specification.</p>

<p>The &lt;transfer&gt; element is optional, though platforms
should support it. Platforms that support &lt;transfer&gt; may
support bridge or blind transfer types, or both. Platforms that
support either type of transfer may optionally support bargein
input modes of DTMF, speech recognition, or both, during the call
transfer to drop the far-end. Blind transfer attempts can only
be cancelled up to the point the outgoing call begins.</p>

<p>Attributes are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 18: transfer attributes">
<caption align="bottom">Table 18: &lt;transfer&gt;
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>Stores the outcome of a bridge
transfer attempt. In the case of a blind transfer, this variable
is undefined.</td>
</tr>

<tr>
<th>expr</th>
<td>The initial value of the form item
variable; default is ECMAScript undefined. If initialized to a
value, then the form item will not be visited unless the form
item variable is cleared.</td>
</tr>

<tr>
<th>cond</th>
<td>An expression that must evaluate to
true in order for the form item to be visited.</td>
</tr>

<tr>
<th>dest</th>
<td>The URI of the destination
(telephone, IP telephony address). Platforms must support the
tel: URL syntax described in <a href="#ref_RFC2806"
shape="rect">[RFC2806]</a> and may support other URI-based
addressing schemes.</td>
</tr>

<tr>
<th>destexpr</th>
<td>An ECMAScript expression yielding the
URI of the destination.</td>
</tr>

<tr>
<th>bridge</th>
<td>
<p>Determines whether the platform remains in the connection with
the caller and callee.</p>

<dl>
<dt>bridge="true"</dt>

<dd>
<p><i>Bridge transfer.</i> The platform adds the callee to the
connection. Document interpretation suspends until the
transferred call terminates. The platform remains in the
connection for the duration of the transferred call; listening
during transfer is controlled by any included
&lt;grammar&gt;s.</p>

<p>If the caller disconnects by going onhook or if the network
disconnects the caller, the platform throws a
connection.disconnect.hangup event.</p>

<p>If the connection is released for any other reason, that
outcome is reported in the name attribute (see the following
table).</p>
</dd>

<dt>bridge="false"</dt>

<dd>
<p><i>Blind transfer (default).</i> The platform redirects the
caller to the callee without remaining in the connection, and
does not monitor the outcome.</p>

<p>The platform throws a connection.disconnect.transfer
immediately, regardless of whether the transfer was successful or
not.</p>
</dd>
</dl>
</td>
</tr>

<tr>
<th>connecttimeout</th>
<td>The time to wait while trying to
connect the call before returning the noanswer condition.
The value is a Time Designation (see <a href="#dml6.5"
shape="rect">Section 6.5</a>). Only applies if bridge is
true. Default is platform specific.</td>
</tr>

<tr>
<th height="56">maxtime</th>
<td height="56">The time that the call
is allowed to last, or 0s if no limit is imposed. The value is
a Time Designation (see <a href="#dml6.5" shape="rect">Section
6.5</a>). Only applies if bridge is true. Default is 0s.</td>
</tr>

<tr>
<th>transferaudio</th>
<td>
<p>The URI of audio source to play while the transfer attempt is
in progress (before far-end answer).</p>

<p>If the resource cannot be fetched, the error is ignored and
the transfer continues; what the caller hears is
platform-dependent.</p>
</td>
</tr>

<tr>
<th height="120">aai</th>
<td height="120">
<p>Application-to-application information. A string containing
data sent to an application on the far-end, available in the
session variable session.connection.aai.</p>

<p>The transmission of aai data may depend upon signaling network
gateways and data translation (e.g. ISDN to SIP); the status of
data sent to a remote site is not known or reported.</p>

<p>Although all platforms must support the aai attribute,
platforms are not required to send aai data and need not support
receipt of aai data. Platforms that cannot receive aai data must
set the session.connection.aai variable to the ECMAScript
undefined value. The underlying transmission mechanism may impose
data length limits.</p>
</td>
</tr>

<tr>
<th height="120">aaiexpr</th>
<td height="120">
<p>An ECMAScript expression yielding the AAI data.</p>
</td>
</tr>
</tbody>
</table>

<p>Exactly one of "dest" or "destexpr" may be specified;
otherwise, an error.badfetch event is thrown. Likewise, exactly
one of "aai" or "aaiexpr" may be specified; otherwise, an
error.badfetch event is thrown.</p>

<h4 id="L40021"><a id="dml2.3.7.1" name="dml2.3.7.1"
shape="rect">2.3.7.1 Blind Transfer</a></h4>

<p>With a blind transfer, an attempt is made to connect the
original caller with the callee. Any prompts preceding the
&lt;transfer&gt;, as well as prompts within the &lt;transfer&gt;,
are queued and played before the transfer attempt begins; bargein
properties apply as normal.</p>

<p class="fig"><img
alt="The VoiceXML implementation platform is not part of the audio connection between the caller and callee after a blind transfer. "
 src="Images/image023.gif" /><br />
 Figure 8: Audio Connections during a blind transfer:
&lt;transfer bridge="false"&gt;</p>

<p>Any audio source specified by the transferaudio attribute is
ignored since no audio can be played from the platform to the
caller during the transfer attempt. Whether the connection is
successful or not, the implementation platform cannot regain
control of the connections.</p>

<p>Connection status is not available. For example, it is not
possible to know whether the callee was busy, when a successful
call ends, etc. However, some error conditions may be reported if
known to the platform, such as if the caller is not authorized to
call the destination, or if the destination URI is malformed.
These are platform-specific, but should follow the naming
convention of other transfer form item variable values.</p>

<p>The caller can cancel the transfer attempt before the outgoing
call begins by barging in with a speech or DTMF command that
matches an active grammar during the playback of any queued
audio.</p>

<p>In this case, the form item variable is set, and the following
shadow variables are set:</p>

<table cellspacing="0" cellpadding="5" width="88%" border="1"
summary="Table 19: transfer shadow variables">
<caption align="bottom">Table 19: &lt;transfer&gt; Shadow
Variables</caption>

<tbody>
<tr>
<th><b><i>name</i>$.duration</b></th>
<td>
<p>The duration of a call transfer in seconds.</p>

<p>The duration is 0 if a call attempt was terminated by the
caller (using a voice or DTMF command) before the outgoing call
begins.</p>
</td>
</tr>

<tr>
<th><b><i>name</i>$.inputmode</b></th>
<td>
<p>The input mode of the terminating command (dtmf or voice), or
undefined if the transfer was not terminated by a grammar
match.</p>
</td>
</tr>

<tr>
<th><b><i>name</i>$.utterance</b></th>
<td>The utterance text used if transfer
was terminated by speech recognition input or the DTMF result if
the transfer was terminated by DTMF input; otherwise it is
undefined.</td>
</tr>
</tbody>
</table>

<p>Also, the application.lastresult$ variable will be filled as
described in <a href="#dml5.1.5" shape="rect">Section
5.1.5</a>.</p>

<p>If the caller disconnects by hanging up during a call transfer
attempt before the connection to the callee begins, a
connection.disconnect.hangup event will be thrown, and dialog
execution will transition to a handler for the hangup event (if
one exists). The form item variable, and thus shadow variables,
will not be set.</p>

<p>Once the transfer begins and the interpreter disconnects from
the session, the platform throws connection.disconnect.transfer
and document interpretation continues normally.</p>

<p>Any connection between the caller and callee remains in place
regardless of document execution.</p>

<table cellspacing="0" cellpadding="5" width="96%" border="1"
summary="Table 20: blind transfer">
<caption align="bottom">Table 20: Blind Transfer
Outcomes</caption>

<tr bgcolor="#eeeeee">
<th width="11%">Action</th>
<td width="11%"><b>Value of form<br
clear="none" />
 item variable</b> </td>
<td width="37%"><b>Event or Error</b>
</td>
<td width="41%"><b>Reason</b> </td>
</tr>

<tr>
<th width="11%">transfer begins</th>
<td width="11%"><i>undefined</i></td>
<td width="37%">connection.disconnect.transfer</td>
<td width="41%">An attempt has been made
to transfer the caller to another line and will not return.</td>
</tr>

<tr>
<th width="11%">caller cancels transfer
before outgoing call begins</th>
<td width="11%">near_end_disconnect</td>
<td width="37%">&#160;</td>
<td width="41%">The caller cancelled the
transfer attempt via a DTMF or voice command before the outgoing
call begins (during playback of queued audio).</td>
</tr>

<tr>
<th width="11%">transfer ends</th>
<td width="11%">unknown</td>
<td width="37%">&#160;</td>
<td width="41%">The transfer ended but
the reason is not known.</td>
</tr>
</table>

<h4 id="L40022"><a id="dml2.3.7.2" name="dml2.3.7.2"
shape="rect">2.3.7.2 Bridge Transfer</a></h4>

<p>For a bridge transfer, the platform connects the caller to the
callee in a full duplex conversation.</p>

<p class="fig"><img
alt="VoiceXML implementation platform (party B) involved in a bridge transfer between a caller
and callee." src="Images/image024.gif" /><br />
 Figure 9: Audio Connections during a bridge transfer:
&lt;transfer bridge="true"&gt;</p>

<p>Any prompts preceding the &lt;transfer&gt;, as well as
prompts within the &lt;transfer&gt;, are queued and played before
the transfer attempt begins. The bargein control applies
normally. Specification of bargeintype is ignored; "hotword" is
set by default.</p>

<p>The caller can cancel the transfer attempt before the outgoing
call begins by barging in with a speech or DTMF command that
matches an active grammar during the playback of any queued
audio.</p>

<h5 id="L400221"><a id="dml2.3.7.2.1" name="dml2.3.7.2.1"
shape="rect">2.3.7.2.1 Listening for user input during a
transfer</a></h5>

<p>Platforms may optionally support listening for caller commands
to terminate the transfer by specifying one or more grammars
inside the &lt;transfer&gt; element. The &lt;transfer&gt;
element is modal in that no grammar defined outside its scope is
active. The platform will monitor during playing of prompts and
during the entire length of the transfer connecting and talking
phases:</p>

<ul>
<li>DTMF input from the caller matching an included DTMF
grammar</li>

<li>an utterance from the caller matching an included speech
grammar</li>
</ul>

<p>A successful match will terminate the transfer (the connection
to the callee); document interpretation continues normally.
An unsuccessful match is ignored. If no grammars are specified,
the platform will not listen to input from the caller.</p>

<p>The platform does not monitor in-band signals or voice input
from the callee.</p>

<h5 id="L400222"><a id="dml2.3.7.2.2" name="dml2.3.7.2.2"
shape="rect">2.3.7.2.2 Handling caller, callee, or network
disconnections</a></h5>

<p>While attempting to connect to the callee, the platform
monitors call progress indicators (in-band and/or out-of-band,
depending upon the particular connection type and protocols). For
the duration of a successful transfer, the platform monitors for
(out-of-band) telephony events, such as disconnect, on both call
legs.</p>

<p>If the callee disconnects, the caller resumes his session with
the interpreter. If the caller disconnects, the platform
disconnects the callee, and document interpretation continues
normally. If both the caller and callee are disconnected by the
network, document interpretation continues normally.</p>

<p>The possible outcomes for a bridge transfer before the
connection to the callee is established are:</p>

<table cellspacing="0" cellpadding="5" width="94%" border="1"
summary="Table 21: bridged transfer outcomes prior to connection">
<caption align="bottom">Table 21: Bridged Transfer Outcomes Prior
to Connection Being Established</caption>

<tr bgcolor="#eeeeee">
<th width="14%">Action</th>
<td width="16%"><b>Value of form<br
clear="none" />
 item variable</b> </td>
<td width="31%"><b>Event</b> </td>
<td width="39%"><b>Reason</b> </td>
</tr>

<tr>
<th width="14%">caller disconnects</th>
<td width="16%">&#160;</td>
<td width="31%">connection.disconnect.hangup</td>
<td width="39%">The caller hung up.</td>
</tr>

<tr>
<th width="16%">caller disconnects
callee</th>
<td width="23%">near_end_disconnect</td>
<td width="32%">&#160;</td>
<td width="29%">The caller forced the
callee to disconnect via a DTMF or voice command.</td>
</tr>

<tr>
<th width="14%">callee busy</th>
<td width="16%">busy</td>
<td width="31%">&#160;</td>
<td width="39%">The callee was busy.</td>
</tr>

<tr>
<th width="14%">network busy</th>
<td width="16%">network_busy</td>
<td width="31%">&#160;</td>
<td width="39%">An intermediate network
refused the call.</td>
</tr>

<tr>
<th width="14%">callee does not
answer</th>
<td width="16%">noanswer</td>
<td width="31%">&#160;</td>
<td width="39%">There was no answer
within the time specified by the connecttimeout attribute.</td>
</tr>

<tr>
<th width="14%">---</th>
<td width="16%">unknown</td>
<td width="31%">&#160;</td>
<td width="39%">The transfer ended but
the reason is not known.</td>
</tr>
</table>

<p>The possible outcomes for a bridge transfer after the
connection to the callee is established are:</p>

<table cellspacing="0" cellpadding="5" width="94%" border="1"
summary="Table 22: bridged transfer outcomes after connection">
<caption align="bottom">Table 22: Bridged Transfer Outcomes After
Connection Established</caption>

<tbody>
<tr bgcolor="#eeeeee">
<th width="16%">Action</th>
<td width="23%"><b>Value of form<br
clear="none" />
 item variable</b> </td>
<td width="32%"><b>Event</b> </td>
<td width="29%"><b>Reason</b> </td>
</tr>

<tr>
<th width="16%">caller disconnects</th>
<td width="23%">&#160;</td>
<td width="32%">connection.disconnect.hangup</td>
<td width="29%">The caller hung up.</td>
</tr>

<tr>
<th width="16%">caller disconnects</th>
<td width="23%">near_end_disconnect</td>
<td width="32%">&#160;</td>
<td width="29%">The caller forced the
callee to disconnect via a DTMF or voice command.</td>
</tr>

<tr>
<th width="16%">platform disconnects
callee</th>
<td width="23%">maxtime_disconnect</td>
<td width="32%">&#160;</td>
<td width="29%">
<p>The callee was disconnected by the platform because the call
duration reached the value of maxtime attribute.</p>
</td>
</tr>

<tr>
<th width="16%">network disconnects
callee</th>
<td width="23%">network_disconnect</td>
<td width="32%">&#160;</td>
<td width="29%">
<p>The network disconnected the callee from the platform.</p>
</td>
</tr>

<tr>
<th width="16%">callee disconnects</th>
<td width="23%">far_end_disconnect</td>
<td width="32%">&#160;</td>
<td width="29%">The callee hung up.</td>
</tr>

<tr>
<th width="16%">---</th>
<td width="23%">unknown</td>
<td width="32%">&#160;</td>
<td width="29%">The transfer ended but
the reason is not known.</td>
</tr>
</tbody>
</table>

<p>If the caller disconnects by hanging up (either during a call
transfer or call transfer attempt), the connection to the callee
(if one exists) is dropped, a connection.disconnect.hangup event
will be thrown, and dialog execution will transition to a handler
for the hangup event (if one exists). The form item variable, and
thus shadow variables, will not be set.</p>

<p>If execution of &lt;transfer&gt; continues normally, then its
form item variable is set, and the following shadow variables
will be set:</p>

<table cellspacing="0" cellpadding="5" width="88%" border="1"
summary="Table 23: transfer shadow variables">
<caption align="bottom">Table 23: &lt;transfer&gt; Shadow
Variables</caption>

<tbody>
<tr>
<th><b><i>name</i>$.duration</b> </th>
<td>
<p>The duration of a call transfer in seconds.</p>

<p>The duration is 0 if a call attempt was terminated by the
caller (using a voice or DTMF command) prior to being
answered.</p>
</td>
</tr>

<tr>
<th><b><i>name</i>$.inputmode</b> </th>
<td>The input mode of the terminating
command (dtmf or voice) or undefined if the transfer was not
terminated by a grammar match.</td>
</tr>

<tr>
<th><b><i>name</i>$.utterance</b> </th>
<td>The utterance text used if transfer
was terminated by speech recognition input or the DTMF result
if the transfer was terminated by DTMF input; otherwise it is
undefined.</td>
</tr>
</tbody>
</table>

<p>If the transfer was terminated by speech recognition input,
then application.lastresult$ is assigned as usual.</p>

<h5 id="L400223"><a id="dml2.3.7.2.3" name="dml2.3.7.2.3"
shape="rect">2.3.7.2.3 Audio during bridge transfer
attempt</a></h5>

<p>During a bridge transfer, it might be desirable to play audio
to the caller while the platform attempts to connect to the
callee. For example, an advertisement ("Buy Joe's Spicy Shrimp
Sauce") or informational message ("Your call is very important to
us; please wait while we connect you to the next available
agent.") might be provided in place of call progress information
(ringing, busy, network announcements, etc.).</p>

<p>At the point the outgoing call begins, audio specified
by transferaudio begins playing. Playing of transferaudio
terminates when the answer status of the far-end connection is
determined. This status isn't always known, since the far-end
switch can play audio (such as a special information tone, busy
tone, network busy tone, or a recording saying the connection
can't be made) with out actually "answering" the call.</p>

<p>If a specified audio file play duration is shorter than the
time it takes to connect the far-end, the caller may hear
silence, platform-specific audio, or call progress information,
depending upon the platform.</p>

<h4 id="L40023"><a id="dml2.3.7.3" name="dml2.3.7.3"
shape="rect">2.3.7.3 Transfer Errors and Events</a></h4>

<p>One of the following events may be thrown during a
transfer:</p>

<table cellspacing="0" cellpadding="5" width="91%" border="1"
summary="Table 24: events thrown during transfer">
<caption align="bottom">Table 24: Events Thrown During
Transfer</caption>

<tr bgcolor="#eeeeee">
<th width="42%">Event</th>
<td width="40%"><b>Reason</b> </td>
<td width="18%"><b>Transfer<br
clear="none" />
 type</b> </td>
</tr>

<tr>
<th><b>connection.disconnect.hangup</b>
</th>
<td>The caller hung up.</td>
<td>bridge</td>
</tr>

<tr>
<th width="42%">
<b>connection.disconnect.transfer</b> </th>
<td width="40%">An attempt has been made
to transfer the caller to another line and will not return.</td>
<td width="18%">blind</td>
</tr>
</table>

<p>If a transfer attempt could not be made, one of the following
errors will be thrown:</p>

<table cellspacing="0" cellpadding="5" width="91%" border="1"
summary="Table 25: errors for transfer failure">
<caption align="bottom">Table 25: Transfer Attempt Error
Events</caption>

<tbody>
<tr bgcolor="#eeeeee">
<th width="42%">Error</th>
<td width="40%"><b>Reason</b> </td>
<td width="18%"><b>Transfer<br
clear="none" />
 type</b> </td>
</tr>

<tr>
<th width="42%">
<dl>
<dt><b>error.connection.noauthorization</b></dt>
</dl>
</th>
<td>The caller is not allowed to call the
destination.</td>
<td>blind and bridge</td>
</tr>

<tr>
<th>
<dl>
<dt><b>error.connection.baddestination</b></dt>
</dl>
</th>
<td width="40%">The destination URI is
malformed.</td>
<td width="18%">blind and bridge</td>
</tr>

<tr>
<th width="42%">
<dl>
<dt><b>error.connection.noroute</b></dt>
</dl>
</th>
<td width="40%">The platform is not able
to place a call to the destination.</td>
<td width="18%">bridge</td>
</tr>

<tr>
<th width="42%">
<dl>
<dt><b>error.connection.noresource</b></dt>
</dl>
</th>
<td width="40%">The platform cannot
allocate resources to place the call.</td>
<td width="18%">bridge</td>
</tr>

<tr>
<th width="42%">
<dl>
<dt><b>error.connection.<i>protocol.nnn</i></b></dt>
</dl>
</th>
<td width="40%">The protocol stack for
this connection raised an exception that does not correspond to
one of the other error.connection events.</td>
<td width="18%">bridge</td>
</tr>

<tr>
<th width="42%">
<dl>
<dt><b>error.unsupported.transfer.blind</b></dt>
</dl>
</th>
<td width="40%">The platform does not
support blind transfer.</td>
<td width="18%">blind</td>
</tr>

<tr>
<th width="42%">
<b>error.unsupported.transfer.bridge</b> </th>
<td width="40%">The platform does not
support bridge transfer.</td>
<td width="18%">bridge</td>
</tr>

<tr>
<th width="42%">
<dl>
<dt><b>error.unsupported.uri</b></dt>
</dl>
</th>
<td width="40%">The platform does not
support the URI format used. The special variable _message (<a
href="#dml5.2.2" shape="rect">Section 5.2.2</a>) will contain the
string "The URI <i>x</i> is not a supported URI format" where
<i>x</i> is the URI from the dest or destexpr &lt;transfer&gt;
attributes.</td>
<td width="18%">blind and bridge</td>
</tr>
</tbody>
</table>

<h4 id="L40024"><a id="dml2.3.7.4" name="dml2.3.7.4"
shape="rect">2.3.7.4 Example</a></h4>

<p>The following example attempts to perform a bridge transfer
the caller to a another party, and wait for that conversation to
terminate. Prompts may be included before or within the
&lt;transfer&gt; element. This may be used to inform the caller
of what is happening, with a notice such as "Please wait while we
transfer your call." The &lt;prompt&gt; within the &lt;block&gt;,
and the &lt;prompt&gt; within &lt;transfer&gt; are queued and
played before actually performing the transfer. After the audio
queue is flushed, the outgoing call is initiated. By default, the
caller is connected to the outgoing telephony channel. The
"transferaudio" attribute specifies an audio file to be played to
the caller in place of audio from the far-end until the far-end
answers. If the audio source is longer than the connect time, the
audio will stop playing immediately upon far-end answer.</p>

<p class="fig"><img
alt="Sequence and timing diagram during a bridge transfer. "
src="Images/image025.gif" /><br />
 Figure 10: Sequence and timing during an example of a bridge
transfer</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="xfer"&gt;
   &lt;var name="mydur" expr="0"/&gt;
   &lt;block&gt;
     &lt;!-- queued and played before starting the transfer --&gt;
     &lt;prompt&gt;
        Calling Riley. Please wait.
     &lt;/prompt&gt;
   &lt;/block&gt;

   &lt;!-- Play music while attempting to connect to far-end --&gt;
   &lt;!-- "hotword" bargeintype during transferaudio only --&gt;
   &lt;!-- Wait up to 60 seconds for the far end to answer  --&gt;
   &lt;transfer name="mycall" dest="tel:+1-555-123-4567"
      transferaudio="music.wav" connecttimeout="60s" bridge="true"&gt;

     &lt;!-- queued and played before starting the transfer --&gt;
     &lt;!-- bargein properties apply during this prompt --&gt;
     &lt;prompt&gt;
        Say cancel to disconnect this call at any time.
     &lt;/prompt&gt;

     &lt;!-- specify an external grammar to listen for "cancel" command --&gt;
     &lt;grammar src="cancel.grxml" type="application/srgs+xml"/&gt;

     &lt;filled&gt;
       &lt;assign name="mydur" expr="mycall$.duration"/&gt;
         &lt;if cond="mycall == 'busy'"&gt;
           &lt;prompt&gt;
             Riley's line is busy. Please call again later.
           &lt;/prompt&gt;
         &lt;elseif cond="mycall == 'noanswer'"/&gt;
           &lt;prompt&gt;
             Riley can't answer the phone now. Please call
             again later.
           &lt;/prompt&gt;
         &lt;/if&gt;
     &lt;/filled&gt;
   &lt;/transfer&gt;

   &lt;!-- submit call statistics to server --&gt;
   &lt;block&gt;
      &lt;submit namelist="mycall mydur" next="/cgi-bin/report"/&gt;
   &lt;/block&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<h2 id="L4272"><a id="dml2.4" name="dml2.4" shape="rect">2.4
Filled</a></h2>

<p>The &lt;filled&gt; element specifies an action to perform when
some combination of input items are filled. It may occur in two
places: as a child of the &lt;form&gt; element, or as a child of
an input item.</p>

<p>As a child of a &lt;form&gt; element, the &lt;filled&gt;
element can be used to perform actions that occur when a
combination of one or more input items is filled. For example,
the following &lt;filled&gt; element does a cross-check to ensure
that a starting city field differs from the ending city
field:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="get_starting_and_ending_cities"&gt;
  &lt;field name="start_city"&gt;
      &lt;grammar src="http://www.grammars.example.com/voicexml/city.grxml" 
        type="application/srgs+xml"/&gt;
      &lt;prompt&gt;What is the starting city?&lt;/prompt&gt;
  &lt;/field&gt;
  &lt;field name="end_city"&gt;
      &lt;grammar src="http://www.grammars.example.com/voicexml/city.grxml" 
        type="application/srgs+xml"/&gt;
      &lt;prompt&gt;What is the ending city?&lt;/prompt&gt;
  &lt;/field&gt;
  &lt;filled mode="all" namelist="start_city end_city"&gt;
    &lt;if cond="start_city == end_city"&gt;
      &lt;prompt&gt;
        You can't fly from and to the same city.
      &lt;/prompt&gt;
      &lt;clear/&gt;
    &lt;/if&gt;
  &lt;/filled&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>If the &lt;filled&gt; element appears inside an input item, it
specifies an action to perform after that input item is filled
in:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="get_city"&gt;
  &lt;field name="city"&gt;
    &lt;grammar type="application/srgs+xml"
      src="http://www.ship-it.example.com/grammars/served_cities.grxml"/&gt;
    &lt;prompt&gt;What is the city?&lt;/prompt&gt;
    &lt;filled&gt;
      &lt;if cond="city == 'Novosibirsk'"&gt;
        &lt;prompt&gt;
          Note, Novosibirsk service ends next year.
        &lt;/prompt&gt;
      &lt;/if&gt;
    &lt;/filled&gt;
  &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>After each gathering of the user's input, all the input
items mentioned in the input are set, and then the interpreter
looks at each &lt;filled&gt; element in document order (no
preference is given to ones in input items vs. ones in the form).
Those whose conditions are matched by the utterance are then
executed in order, until there are no more, or until one
transfers control or throws an event.</p>

<p>Attributes include:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 26: filled attributes">
<caption align="bottom">Table 26: &lt;filled&gt;
Attributes</caption>

<tbody>
<tr>
<th>mode</th>
<td>Either all (the default), or any. If
any, this action is executed when any of the specified input
items is filled by the last user input. If all, this action is
executed when all of the mentioned input items are filled, and at
least one has been filled by the last user input. A
&lt;filled&gt; element in an input item cannot specify a mode;
if a mode is specified, then an error.badfetch is thrown by
the platform upon encountering the document.</td>
</tr>

<tr>
<th>namelist</th>
<td>The input items to trigger on. For a
&lt;filled&gt; in a form, namelist defaults to the names
(explicit and implicit) of the form's input items. A
&lt;filled&gt; element in an input item cannot specify a namelist
(the namelist in this case is the input item name); if a
namelist is specified, then an error.badfetch is thrown by the
platform upon encountering the document. Note that control
items are not permitted in this list; an error.badfetch is
thrown when the document contains a &lt;filled&gt; element with a
namelist attribute referencing a control item variable.
</td>
</tr>
</tbody>
</table>

<h2 id="L4317"><a id="dml2.5" name="dml2.5" shape="rect">2.5
Links</a></h2>

<p>A &lt;link&gt; element may have one or more grammars which are
scoped to the element containing the &lt;link&gt;. A
"scope" attribute on the element containing the &lt;link&gt; has
no effect on the scope of the &lt;link&gt; grammars (for example,
when a &lt;link&gt; is contained in a &lt;form&gt; with
scope="document", the &lt;link&gt; grammars are scoped to the
form, not to the document). Grammar elements contained in
the &lt;link&gt; are not permitted to specify scope (see <a
shape="rect" href="#dml3.1.3">Section 3.1.3</a> for details).
When one of these grammars is matched, the link activates, and
either:</p>

<ul>
<li>
<p>Transitions to a new document or dialog (like &lt;goto&gt;),
or</p>
</li>

<li>
<p>Throws an event (like &lt;throw&gt;).</p>
</li>
</ul>

<p>For instance, this link activates when you say "books" or
press "2".</p>

<pre class="example" xml:space="preserve">
&lt;link next="http://www.voicexml.org/books/main.vxml"&gt;
  &lt;grammar mode="voice" version="1.0" root="root"&gt;
    &lt;rule id="root" scope="public"&gt;
       &lt;one-of&gt;
         &lt;item&gt;books&lt;/item&gt; 
         &lt;item&gt;VoiceXML books&lt;/item&gt; 
       &lt;/one-of&gt;
    &lt;/rule&gt;
  &lt;/grammar&gt;
  &lt;grammar mode="dtmf" version="1.0" root="r2"&gt;
     &lt;rule id="r2" scope="public"&gt; 2 &lt;/rule&gt;
  &lt;/grammar&gt;
&lt;/link&gt;
</pre>

<p>This link takes you to a dynamically determined dialog in the
current document:</p>

<pre class="example" xml:space="preserve">
&lt;link expr="'#' + document.helpstate"&gt;
  &lt;grammar mode="voice" version="1.0" root="root"&gt;
     &lt;rule id="root" scope="public"&gt; help &lt;/rule&gt;
  &lt;/grammar&gt;
&lt;/link&gt;
</pre>

<p>The &lt;link&gt; element can be a child of &lt;vxml&gt;,
&lt;form&gt;, or of the form items &lt;field&gt; and
&lt;initial&gt;. A link at the &lt;vxml&gt; level has grammars
that are active throughout the document. A link at the
&lt;form&gt; level has grammars active while the user is in that
form. If an application root document has a document-level link,
its grammars are active no matter what document of the
application is being executed.</p>

<p>If execution is in a modal form item, then link grammars at
the form, document or application level are not active.</p>

<p>You can also define a link that, when matched, throws an event
instead of going to a new document. This event is thrown at the
current location in the execution, not at the location where the
link is specified. For example, if the user matches this
link's grammar or enters '2' on the keypad, a help event is
thrown in the form item the user was visiting and is handled by
the best qualified &lt;catch&gt; in the item's scope (see <a
href="#dml5.2.4" shape="rect">Section 5.2.4</a> for further
details):</p>

<pre class="example" xml:space="preserve">
&lt;link dtmf="2" event="help"&gt;
  &lt;grammar mode="voice" version="1.0" root="r5"&gt;
    &lt;rule id="r5" scope="public"&gt;
       &lt;one-of&gt;
         &lt;item&gt;arrgh&lt;/item&gt; 
         &lt;item&gt;alas all is lost&lt;/item&gt; 
         &lt;item&gt;fie ye froward machine&lt;/item&gt; 
         &lt;item&gt;I don't get it&lt;/item&gt; 
       &lt;/one-of&gt;
    &lt;/rule&gt;
  &lt;/grammar&gt;
&lt;/link&gt;
</pre>

<p>When a link is matched, application.lastresult$ is assigned.
This allows callflow decisions to be made downstream based on the
actual semantic result. An example appears in <a href="#dml5.1.5"
shape="rect">Section 5.1.5</a>.</p>

<div>
<p>Conceptually the link element can be thought of as having two
parts: condition and action. The "condition" is the content of
the link element, i.e. the grammar(s) that must be matched in
order for the link to be activated. The "action" is specified by
the attributes of the element, i.e. where to transition or which
event to throw. The "condition" is resolved/evaluated lexically,
while the "action" is resolved/evaluated dynamically.
Specifically this means that</p>

<ul>
<li>any URIs in the content of the link are resolved lexically,
i.e. according to the base URI (see xml:base in <a
href="#dml1.5.1" shape="rect">Section 1.5.1</a>) for the document
in which the link is defined.</li>

<li>any URIs in an attribute of the link element are resolved
dynamically, i.e. according to the base URI in effect when the
link's grammar is matched.</li>

<li>any ECMAScript expressions in an attribute of the link
element are evaluated dynamically, i.e. in the scope and
execution context in effect when the grammar is matched.</li>
</ul>
</div>

<p>Attributes of &lt;link&gt; are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 27: link attributes">
<caption align="bottom">Table 27: &lt;link&gt;
Attributes</caption>

<tbody>
<tr>
<th>next</th>
<td>The URI to go to. This URI is a
document (perhaps with an anchor to specify the starting dialog),
or a dialog in the current document (just a bare anchor).</td>
</tr>

<tr>
<th>expr</th>
<td>Like next, except that the URI is
dynamically determined by evaluating the given ECMAScript
expression.</td>
</tr>

<tr>
<th>event</th>
<td>The event to throw when the user
matches one of the link grammars.</td>
</tr>

<tr>
<th>eventexpr</th>
<td>An ECMAScript expression evaluating
to the name of the event to throw when the user matches one of
the link grammars.</td>
</tr>

<tr>
<th>message</th>
<td>A message string providing additional
context about the event being thrown. The message is available as
the value of a variable within the scope of the catch element,
see <a href="#dml5.2.2" shape="rect">Section 5.2.2</a>.</td>
</tr>

<tr>
<th>messageexpr</th>
<td>An ECMAScript expression evaluating
to the message string.</td>
</tr>

<tr>
<th>dtmf</th>
<td>The DTMF sequence for this link. It
is equivalent to a simple DTMF &lt;grammar&gt; and DTMF
properties (<a href="#dml6.3.3" shape="rect">Section 6.3.3</a>)
apply to recognition of the sequence. Unlike DTMF grammars,
whitespace is optional: dtmf="123#" is equivalent to dtmf="1 2 3
#". The attribute can be used at the same time as other
&lt;grammar&gt;s: the link is activated when user input matches a
link grammar or the DTMF sequence.</td>
</tr>

<tr>
<th>fetchaudio</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchaudio
property.</td>
</tr>

<tr>
<th>fetchhint</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
documentfetchhint property.</td>
</tr>

<tr>
<th>fetchtimeout</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchtimeout
property.</td>
</tr>

<tr>
<th>maxage</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the documentmaxage
property.</td>
</tr>

<tr>
<th>maxstale</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
documentmaxstale property.</td>
</tr>
</tbody>
</table>

<p>Exactly one of "next", "expr", "event" or "eventexpr" must be
specified; otherwise, an error.badfetch event is thrown. Exactly
one of "message" or "messageexpr" may be specified; otherwise, an
error.badfetch event is thrown.</p>

<!--- CHAPTER 2: END =-->
<!--- CHAPTER 3: BEGIN =-->
<h1 id="L4448"><a id="dml3" name="dml3" shape="rect">3. User
Input</a></h1>

<h2 id="L4451"><a id="dml3.1" name="dml3.1" shape="rect">3.1
Grammars</a></h2>

<h3 id="L4454"><a id="dml3.1.1" name="dml3.1.1"
shape="rect">3.1.1 Speech Grammars</a></h3>

<p>The &lt;grammar&gt; element is used to provide a speech
grammar that</p>

<ul>
<li>
<p>specifies a set of utterances that a user may speak to perform
an action or supply information, and</p>
</li>

<li>
<p>for a matching utterance, returns a corresponding semantic
interpretation. This may be a simple value (such as a string), a
flat set of attribute-value pairs (such as day, month, and year),
or a nested object (for a complex request).</p>
</li>
</ul>

<p>The &lt;grammar&gt; element is designed to accommodate any
grammar format that meets these two requirements. VoiceXML
platforms must support at least one common format, the XML Form
of the W3C Speech Recognition Grammar Specification <a
href="#ref_SRGS" shape="rect">[SRGS]</a>. VoiceXML platforms
should support the Augmented BNF (ABNF) Form of the
W3C Speech Recognition Grammar Specification <a href="#ref_SRGS"
shape="rect">[SRGS]</a>. VoiceXML platforms may choose to
support grammar formats other than SRGS. For instance, a platform
might use the &lt;grammar&gt; element's support for PCDATA to
inline a proprietary grammar definition or use the "src" and
"type" attributes for an external one.</p>

<p>VoiceXML platforms must be a Conforming XML Form Grammar
Processor as defined in the W3C Speech Recognition Grammar
Specification <a href="#ref_SRGS" shape="rect">[SRGS]</a>. While
this requires a platform to process documents with one or more
"xml:lang" attributes defined, it does not require that the
platform must be multi-lingual. When an unsupported language is
encountered, the platform throws an
<b>error.unsupported.language</b> event which specifies the
unsupported language in its message variable.</p>

<h4 id="L400257965955">Elements of XML Form of SRGS</h4>

<p>The following elements are defined in the XML Form of the W3C
Speech Recognition Grammar Specification <a href="#ref_SRGS"
shape="rect">[SRGS]</a> and are available in VoiceXML 2.0. This
document does not redefine these elements. Refer to the W3C
Speech Recognition Grammar Specification <a href="#ref_SRGS"
shape="rect">[SRGS]</a> for definitions and examples.</p>

<div align="center">
<table cellspacing="0" cellpadding="4" width="80%" border="1"
summary="Table 28: SRGS Elements (XML Form)">
<caption align="bottom">Table 28: SRGS (XML Form)
Elements</caption>

<thead>
<tr>
<th>Element</th>
<th>Purpose</th>
<th>Section<br />
 <small>(in <a href="#ref_SRGS" shape="rect">[SRGS]</a>)</small>
</th>
</tr>
</thead>

<tbody>
<tr class="stripe">
<td>&lt;grammar&gt;</td>
<td>Root element of an XML grammar</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S4"
shape="rect">4.</a> </td>
</tr>

<tr class="stripe">
<td>&lt;meta&gt;</td>
<td>Header declaration of meta content of
an HTTP equivalent</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S4.11.1"
shape="rect">4.11.1</a> </td>
</tr>

<tr class="stripe">
<td>&lt;metadata&gt;</td>
<td>Header declaration of XML metadata
content</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S4.11.2"
shape="rect">4.11.2</a> </td>
</tr>

<tr class="stripe">
<td>&lt;lexicon&gt;</td>
<td>Header declaration of a pronunciation
lexicon</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S4.10"
shape="rect">4.10</a> </td>
</tr>

<tr>
<td>&lt;rule&gt;</td>
<td>Declare a named rule expansion of a
grammar</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S3"
shape="rect">3.</a> </td>
</tr>

<tr>
<td>&lt;token&gt;</td>
<td>Define a word or other entity that
may serve as input</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S2.1"
shape="rect">2.1</a> </td>
</tr>

<tr class="stripe">
<td>&lt;ruleref&gt;</td>
<td>Refer to a rule defined locally or
externally</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S2.2"
shape="rect">2.2</a> </td>
</tr>

<tr>
<td>&lt;item&gt;</td>
<td>Define an expansion with optional
repeating and probability</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S2.3"
shape="rect">2.3</a> </td>
</tr>

<tr class="stripe">
<td>&lt;one-of&gt;</td>
<td>Define a set of alternative rule
expansions</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S2.4"
shape="rect">2.4</a> </td>
</tr>

<tr class="stripe">
<td>&lt;example&gt;</td>
<td>Element contained within a rule
definition that provides an example of input that matches the
rule</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S3.3"
shape="rect">3.3</a> </td>
</tr>

<tr>
<td>&lt;tag&gt;</td>
<td>Define an arbitrary string that to be
included inline in an expansion which may be used for semantic
interpretation</td>
<td><a
href="http://www.w3.org/TR/speech-grammar/#S2.6"
shape="rect">2.6</a> </td>
</tr>
</tbody>
</table>
</div>

<h4 id="L4615"><a id="dml3.1.1.1" name="dml3.1.1.1"
shape="rect">3.1.1.1 Inline Grammars</a></h4>

<p>The &lt;grammar&gt; element may be used to specify an
<em>inline</em> grammar or an <em>external</em> grammar. An
inline grammar is specified by the content of a &lt;grammar&gt;
element and defines an entire grammar:</p>

<pre class="example" xml:space="preserve">
&lt;grammar type="<em>media-type</em>" mode="voice"&gt;
     <em>inline speech grammar</em>
&lt;/grammar&gt;
</pre>

<p>It may be necessary in this case to enclose the content in a
CDATA section <a href="#ref_XML" shape="rect">[XML]</a>. For
inline grammars the type parameter specifies a media type that
governs the interpretation of the content of the &lt;grammar&gt;
element.</p>

<p>The following is an example of inline grammar defined by the
XML Form of the W3C Speech Recognition Grammar Specification <a
href="#ref_SRGS" shape="rect">[SRGS]</a>.</p>

<pre class="example" xml:space="preserve">
&lt;grammar mode="voice" xml:lang="en-US" version="1.0" root="command"&gt;
  &lt;!-- Command is an action on an object --&gt;
  &lt;!-- e.g. "open a window" --&gt;
  &lt;rule id="command" scope="public"&gt;
    &lt;ruleref uri="#action"/&gt; &lt;ruleref uri="#object"/&gt;
  &lt;/rule&gt;

  &lt;rule id="action"&gt;
    &lt;one-of&gt;
      &lt;item&gt; open &lt;/item&gt;
      &lt;item&gt; close &lt;/item&gt;
      &lt;item&gt; delete &lt;/item&gt;
      &lt;item&gt; move &lt;/item&gt;
    &lt;/one-of&gt;
  &lt;/rule&gt;

  &lt;rule id="object"&gt;
   &lt;item repeat="0-1"&gt;
      &lt;one-of&gt; &lt;item&gt; the &lt;/item&gt; &lt;item&gt; a &lt;/item&gt; &lt;/one-of&gt;
    &lt;/item&gt;
    &lt;one-of&gt;
      &lt;item&gt; window &lt;/item&gt;
      &lt;item&gt; file &lt;/item&gt;
      &lt;item&gt; menu &lt;/item&gt;
    &lt;/one-of&gt;
  &lt;/rule&gt;
&lt;/grammar&gt;
</pre>

<p>The following is the equivalent example of the inline grammar
defined by the ABNF Form of the W3C Speech Recognition Grammar
Specification <a href="#ref_SRGS" shape="rect">[SRGS]</a>.
Because VoiceXML platforms are not required to support this
format it may be less portable.</p>

<pre class="example" xml:space="preserve">
&lt;grammar mode="voice" type="application/srgs"&gt;
#ABNF 1.0;
language en-US;
mode voice;
root $command;
  public $command = $action $object;
  $action = open | close | delete | move;
  $object = [the | a] (window | file | menu);
&lt;/grammar&gt;
</pre>

<h4 id="L4720"><a id="dml3.1.1.2" name="dml3.1.1.2"
shape="rect">3.1.1.2 External Grammars</a></h4>

<p>An external grammar is specified by an element of the form</p>

<pre class="example" xml:space="preserve">
&lt;grammar src="<i>URI</i>" type="<i>media-type</i>"/&gt;
</pre>

<p>The media type is optional in this case because the
interpreter context will attempt to determine the type
dynamically as described in <a href="#dml3.1.1.4"
shape="rect">Section 3.1.1.4</a>.</p>

<p>If the src attribute is defined and there is an inline grammar
as content of a grammar element then an error.badfetch event is
thrown.</p>

<p>The following is an example of a reference to an external
grammar written in the XML Form of the W3C Speech Recognition
Grammar Specification <a href="#ref_SRGS"
shape="rect">[SRGS]</a>.</p>

<pre class="example" xml:space="preserve">
&lt;grammar type="application/srgs+xml" src="http://www.grammar.example.com/date.grxml"/&gt;
</pre>

<p>The following example is the equivalent grammar reference for
a grammar that is authored using the ABNF Form of the W3C Speech
Recognition Grammar Specification <a href="#ref_SRGS"
shape="rect">[SRGS]</a>.</p>

<pre class="example" xml:space="preserve">
&lt;grammar type="application/srgs" src="http://www.grammar.example.com/date.gram"/&gt;
</pre>

<h4 id="L4754"><a id="dml3.1.1.3" name="dml3.1.1.3"
shape="rect">3.1.1.3 Grammar Weight</a></h4>

<p>A weight for the grammar can be specified by the weight
attribute:</p>

<pre class="example" xml:space="preserve">
&lt;grammar weight="0.6" src="form.grxml" type="application/srgs+xml"/&gt;
</pre>

<p>Grammar elements, including those in link, field and form
elements, can have a weight attribute. The grammar can be inline,
external or built-in.</p>

<p>Weights follow the definition of weights on alternatives in
the W3C Speech Recognition Grammar Specification <a
href="#ref_SRGS" shape="rect">[SRGS &#167;2.4.1]</a>. A weight is
a simple positive floating point values without exponentials.
Legal formats are "n", "n.", ".n" and "n.n" where "n" is a
sequence of one or many digits.</p>

<p>A weight is nominally a multiplying factor in the likelihood
domain of a speech recognition search. A weight of "1.0" is
equivalent to providing no weight at all. A weight greater than
"1.0" positively biases the grammar and a weight less than "1.0"
negatively biases the grammar. If unspecified, the default weight
for any grammar is "1.0". If no weight is specified for any
grammar element then all grammars are equally likely.</p>

<pre class="example" xml:space="preserve">
&lt;link event="help"&gt;
  &lt;grammar weight="0.5" mode="voice" version="1.0" root="help"&gt;
   &lt;rule id="help" scope="public"&gt;
      &lt;item repeat="0-1"&gt;Please&lt;/item&gt; help
   &lt;/rule&gt;  
  &lt;/grammar&gt;
&lt;/link&gt;

&lt;form&gt;
  &lt;grammar src="form.grxml" type="application/srgs+xml"/&gt;
  &lt;field name="expireDate"&gt;
     &lt;grammar weight="1.2" src="http://www.example.org/grammar/date"/&gt;
  &lt;/field&gt;
&lt;/form&gt;
</pre>

<p>In the example above, the semantics of weights is equivalent
to the following XML grammar.</p>

<pre class="example" xml:space="preserve">
&lt;grammar root="r1" type="application/srgs+xml"&gt;
&lt;rule id="r1"&gt;
  &lt;one-of&gt;
    &lt;item weight="0.5"&gt; &lt;ruleref uri="#help"/&gt; &lt;/item&gt;
    &lt;item weight="1.0"&gt; &lt;ruleref uri="form.grxml"/&gt; &lt;/item&gt;
    &lt;item weight="1.2"&gt; &lt;ruleref uri="http://www.example.org/grammar/date"/&gt;&lt;/item&gt;
  &lt;/one-of&gt;
&lt;/rule&gt;

&lt;rule id="help"&gt;
  &lt;item repeat="0-1"&gt;Please&lt;/item&gt; help
&lt;/rule&gt;
&lt;/grammar&gt;
</pre>

<p>Implicit grammars, such as those in options, do not support
weights - use the &lt;grammar&gt; element instead for control
over grammar weight.</p>

<p>Grammar weights only affect grammar processing. They do not
directly affect the post processing of grammar results, including
grammar precedence when user input matches multiple active
grammar (see <a href="#dml3.1.4" shape="rect">Section
3.1.4</a>).</p>

<p>A weight has no effect on DTMF grammars (See <a
href="#dml3.1.2" shape="rect">Section 3.1.2</a>). Any weight
attribute specified in a grammar element whose mode attribute is
dtmf is ignored.</p>

<pre class="example" xml:space="preserve">
&lt;!-- weight will be ignored --&gt;
&lt;grammar mode="dtmf" weight="0.3" src="http://www.example.org/dtmf/number"/&gt; 
</pre>

<p>Appropriate weights are difficult to determine, and guessing
weights does not always improve recognition performance.
Effective weights are usually obtained by study of real speech
and textual data on a particular platform. Furthermore, a grammar
weight is platform specific. Note that different ASR engines may
treat the same weight value differently. Therefore, the weight
value that works well on particular platform may generate
different results on other platforms.</p>

<h4 id="L4797"><a id="dml3.1.1.4" name="dml3.1.1.4"
shape="rect">3.1.1.4 Grammar Element</a></h4>

<p>Attributes of &lt;grammar&gt; inherited from the W3C Speech
Recognition Grammar Specification <a href="#ref_SRGS"
shape="rect">[SRGS]</a> are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 29: grammar attributes inherited from SRGS">
<caption align="bottom">Table 29: &lt;grammar&gt; Attributes
Inherited from SRGS</caption>

<tbody>
<tr>
<th>version</th>
<td>Defines the version of the
grammar.</td>
</tr>

<tr>
<th>xml:lang</th>
<td>The <a href="#term-language"
shape="rect">language identifier</a> of the grammar (for
example, "fr-CA" for Canadian French.) If omitted, the value is
inherited down from the document hierarchy.</td>
</tr>

<tr>
<th>mode</th>
<td>Defines the mode of the grammar
following the modes of the W3C Speech Recognition Grammar
Specification <a href="#ref_SRGS" shape="rect">[SRGS]</a>.</td>
</tr>

<tr>
<th>root</th>
<td>Defines the rule which acts as the
root rule of the grammar.</td>
</tr>

<tr>
<th>tag-format</th>
<td>Defines the tag content format for
all tags within the grammar.</td>
</tr>

<tr>
<th>xml:base</th>
<td>Declares the base URI from which
relative URIs in the grammar are resolved. 

<p>This base declaration has precedence over the &lt;vxml&gt;
base URI declaration. If a local declaration is omitted, the
value is inherited down the document hierarchy.</p>
</td>
</tr>
</tbody>
</table>

<p>The use and interpretation of these attributes is determined
as follows:</p>

<ol>
<li>Inline XML Form of SRGS: determined by W3C Speech Recognition
Grammar Specification which states that the version attribute is
required and must have the value is "1.0"; that the root
attribute is required and its value identifies which rule to
activate; and other attributes are optional (see <a
href="#ref_SRGS" shape="rect">[SRGS]</a> for further
details).</li>

<li>Inline ABNF Form of SRGS: any specified attributes must be
ignored by the platform</li>

<li>External XML and ABNF Forms of SRGS: any specified attributes
must be ignored by the platform</li>

<li>all other grammar types: the use and interpretation of any
specified attributes is platform-dependent</li>
</ol>

<p>Attributes of &lt;grammar&gt; added by VoiceXML 2.0 are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 30: grammar attributes added in voicexml">
<caption align="bottom">Table 30: &lt;grammar&gt; Attributes
Added in VoiceXML</caption>

<tbody>
<tr>
<th>src</th>
<td>The URI specifying the location of
the grammar and optionally a rulename within that grammar, if it
is external. The URI is interpreted as a rule reference as
defined in Section 2.2 of the Speech Recognition Grammar
Specification <a href="#ref_SRGS" shape="rect">[SRGS]</a> but not
all forms of rule reference are permitted from within VoiceXML.
The rule reference capabilities are described in detail below
this table.</td>
</tr>

<tr>
<th>scope</th>
<td>Either "document", which makes the
grammar active in all dialogs of the current document (and
relevant application leaf documents), or "dialog", to make the
grammar active throughout the current form. If omitted, the
grammar scoping is resolved by looking at the parent element. See
<a href="#dml3.1.3" shape="rect">Section 3.1.3</a> for details on
scoping including precedence behavior.</td>
</tr>

<tr>
<th>type</th>
<td>
<p>The preferred media type of the grammar. A resource indicated
by the URI reference in the src attribute may be available in one
or more media types. The author may specify the preferred
media-type via the type attribute. When the content represented
by a URI is available in many data formats, a VoiceXML platform
may use the preferred media-type to influence which of the
multiple formats is used. For instance, on a server implementing
HTTP content negotiation, the processor may use the preferred
media-type to order the preferences in the negotiation.</p>

<p>The resource representation delivered by dereferencing the URI
reference may be considered in terms of two types. The
<i>declared media-type</i> is the asserted value for the resource
and the <i>actual media-type</i> is the true format of its
content. The actual media-type should be the same as the declared
media-type, but this is not always the case (e.g. a misconfigured
HTTP server might return 'text/plain for an
'application/srgs+xml' document). A specific URI scheme may
require that the resource owner always, sometimes, or never
return a media-type. The declared media-type is the value
returned by the resource owner or, if none is returned, the
preferred media type. There may be no declared media-type if the
resource owner does not return a value and no preferred type is
specified. Whenever specified, the declared media-type is
authoritative.</p>

<p>Three special cases may arise. The declared media-type may not
be supported by the processor; in this case, an
error.unsupported.format is thrown by the platform. The declared
media-type may be supported but the actual media-type may not
match; an error.badfetch is thrown by the platform. Finally,
there may be no declared media-type; the behavior depends on the
specific URI scheme and the capabilities of the grammar
processor. For instance, HTTP 1.1 allows document intraspection
(see <a href="#ref_RFC2616" shape="rect">[RFC2616]</a>, section
7.2.1), the data scheme falls back to a default media type, and
local file access defines no guidelines. The following table
provides some informative examples:</p>

<table width="100%" border="1" cellpadding="3"
summary="Media type examples">
<tr>
<td width="20%" />
<td colspan="2" rowspan="1">
<div align="center"><b>HTTP 1.1 request</b></div>
</td>
<td colspan="2" rowspan="1">
<div align="center"><b>Local file access</b></div>
</td>
</tr>

<tr>
<td width="20%">Media-type returned by
the resource owner</td>
<td width="20%">text/plain</td>
<td width="20%">application/srgs+xml</td>
<td width="20%">&lt;none&gt;</td>
<td>&lt;none&gt;</td>
</tr>

<tr>
<td width="20%">Preferred media-type
appearing in the grammar</td>
<td colspan="2" rowspan="1">Not applicable; the returned type
takes precedence</td>
<td width="20%">application/srgs+xml</td>
<td>&lt;none&gt;</td>
</tr>

<tr>
<td width="20%">Declared media-type</td>
<td width="20%">text/plain</td>
<td width="20%">application/srgs+xml</td>
<td width="20%">application/srgs+xml</td>
<td>&lt;none&gt;</td>
</tr>

<tr>
<td width="20%">Behavior if the actual
media-type is application/srgs+xml</td>
<td width="20%">error.badfetch thrown;
the declared and actual types do not match</td>
<td colspan="2" rowspan="1">The declared and actual types match;
success if application/srgs+xml is supported by the processor;
otherwise an error.unsupported.format is thrown</td>
<td>Scheme specific; the processor might
intraspect the document to determine the type.</td>
</tr>
</table>

<p>The tentative media types for the W3C grammar format are
"application/srgs+xml" for the XML form and "application/srgs"
for ABNF grammars.</p>
</td>
</tr>

<tr>
<th>weight</th>
<td>Specifies the weight of the grammar.
See <a href="#dml3.1.1.3" shape="rect">Section 3.1.1.3</a> </td>
</tr>

<tr>
<th>fetchhint</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
grammarfetchhint property.</td>
</tr>

<tr>
<th>fetchtimeout</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchtimeout
property.</td>
</tr>

<tr>
<th>maxage</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the grammarmaxage
property.</td>
</tr>

<tr>
<th>maxstale</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
grammarmaxstale property.</td>
</tr>
</tbody>
</table>

<p>Either an "src" attribute or a inline grammar (but not both)
must be specified; otherwise, an error.badfetch event is
thrown.</p>

<p>The &lt;grammar&gt; element is also extended in VoiceXML 2.0
to allow PCDATA for inline grammar formats besides the XML Form
of the W3C Speech Recognition Grammar Specification <a
href="#ref_SRGS" shape="rect">[SRGS]</a>.</p>

<p>When referencing an external grammar, the value of the src
attribute is a URI specifying the location of the grammar with an
optional fragment for the rulename. Section 2.2 of the Speech
Recognition Grammar Specification <a href="#ref_SRGS"
shape="rect">[SRGS]</a> defines several forms of rule reference.
The following are the forms that are permitted on a grammar
element in VoiceXML:</p>

<ul>
<li><em>Reference to a named rule in an external grammar:</em>
src attribute is an absolute or relative URI reference to a
grammar which includes a fragment with a rulename. This form of
rule reference to an external grammar follows the behavior
defined in Section 2.2.2 of <a href="#ref_SRGS"
shape="rect">[SRGS]</a>. If the URI cannot be fetched or if the
rulename is not defined in the grammar or is not a <i>public</i>
(activatable) rule of that grammar then an error.badfetch is
thrown.</li>

<li><em>Reference to the root rule of an external grammar:</em>
src attribute is an absolute or relative URI reference to a
grammar but does not include a fragment identifying a rulename.
This form implicitly references the root rule of the grammar as
defined in Section 2.2.2 of <a href="#ref_SRGS"
shape="rect">[SRGS]</a>. If the URI cannot be fetched or if the
grammar cannot be referenced by its root (see Section 4.7 of <a
href="#ref_SRGS" shape="rect">[SRGS]</a>) then an error.badfetch
is thrown.</li>
</ul>

<p>The following are the forms of rule reference defined by
<a href="#ref_SRGS" shape="rect">[SRGS]</a> that are
<em>not supported</em> in VoiceXML 2.0.</p>

<ul>
<li><em>Local rule reference:</em> a fragment-only URI is not
permitted. (See definition in Section 2.2.1 of <a href="#ref_SRGS"
shape="rect">[SRGS]</a>). A fragment-only URI value for the src
attribute causes an error.semantic event.</li>

<li><em>Reference to special rules:</em> although an inline
grammar may reference the special rules of SRGS (NULL, VOID,
GARBAGE) there is no support for special rule references on the
grammar element itself. (See definitions in Section 2.2.3 of <a
href="#ref_SRGS" shape="rect">[SRGS]</a>). There is no syntactic
support for this form so no error can be generated.</li>
</ul>

<h3 id="L4986"><a id="dml3.1.2" name="dml3.1.2"
shape="rect">3.1.2 DTMF</a> Grammars</h3>

<p>The &lt;grammar&gt; element can be used to provide a DTMF
grammar that</p>

<ul>
<li>
<p>specifies a set of key presses that a user may use to perform
an action or supply information, and</p>
</li>

<li>for matching DTMF input, returns a corresponding semantic
interpretation. This may be a simple value (such as a string), a
flat set of attribute-value pairs (such as day, month, and year),
or a nested object (for a complex request).</li>
</ul>

<p>VoiceXML platforms are required to support the DTMF grammar
XML format defined in Appendix D of the <a href="#ref_SRGS"
shape="rect">[SRGS]</a> to advance application portability.</p>

<p>A DTMF grammar is distinguished from a speech grammar by the
mode attribute on the &lt;grammar&gt; element. An "xml:lang"
attribute has no effect on DTMF grammar handling. In other
respects speech and DTMF grammars are handled identically
including the ability to define the grammar inline, or by an
external grammar reference. The media type handling, scoping and
fetching are also identical.</p>

<p>The following is an example of a simple inline XML DTMF
grammar that accepts as input either "1 2 3" or "#".</p>

<pre class="example" xml:space="preserve">
&lt;grammar mode="dtmf" version="1.0" root="root"&gt;
  &lt;rule id="root" scope="public"&gt;
    &lt;one-of&gt;
      &lt;item&gt; 1 2 3 &lt;/item&gt;
      &lt;item&gt; # &lt;/item&gt;
    &lt;/one-of&gt;
  &lt;/rule&gt;
&lt;/grammar&gt;
</pre>

<h3 id="L5010"><a id="dml3.1.3" name="dml3.1.3"
shape="rect">3.1.3 Scope of Grammars</a></h3>

<p><em>Input item grammars</em> are always scoped to the
containing input item; that is, they are active only when the
containing input item was chosen during the select phase of
the FIA. Grammars contained in input items cannot specify a
scope; if they do, an error.badfetch is thrown.</p>

<p><em>Link grammars</em> are given the scope of the element that
contains the link. Thus, if they are defined in the application
root document, links are also active in any other loaded
application document. Grammars contained in links cannot specify
a scope; if they do, an error.badfetch is thrown.</p>

<p><em>Form grammars</em> are by default given dialog scope, so
that they are active only when the user is in the form. If they
are given scope document, they are active whenever the user is in
the document. If they are given scope document and the document
is the application root document, then they are also active
whenever the user is in another loaded document in the same
application. A grammar in a form may be given document scope
either by specifying the scope attribute on the form element or
by specifying the scope attribute on the &lt;grammar&gt; element.
If both are specified, the grammar assumes the scope specified by
the &lt;grammar&gt; element.</p>

<p><em>Menu grammars</em> are also by default given dialog scope,
and are active only when the user is in the menu. But they can be
given document scope and be active throughout the document, and
if their document is the application root document, also be
active in any other loaded document belonging to the application.
Grammars contained in menu choices cannot specify a scope; if
they do, an error.badfetch is thrown.</p>

<p>Sometimes a form may need to have some grammars active
throughout the document, and other grammars that should be active
only when in the form. One reason for doing this is to minimize
grammar overlap problems. To do this, each individual
&lt;grammar&gt; element can be given its own scope if that scope
should be different than the scope of the &lt;form&gt; element
itself:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form scope="document"&gt; 
  &lt;grammar type="application/srgs"&gt; 
    #ABNF 1.0;
    language en-gb;
    mode voice;
    root $command;
    public $command = one | two | three;
  &lt;/grammar&gt; 
  &lt;grammar type="application/srgs" scope="dialog"&gt; 
    #ABNF 1.0;
    language en-gb;
    mode voice;
    root $command2;
    public $command2 = four | five | six;
  &lt;/grammar&gt; 
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<h3 id="L5033"><a id="dml3.1.4" name="dml3.1.4"
shape="rect">3.1.4 Activation of Grammars</a></h3>

<p>When the interpreter waits for input as a result of visiting
an input item, the following grammars are active:</p>

<ul>
<li>
<p>grammars for that input item, including grammars
contained in links in that input item;</p>
</li>

<li>
<p>grammars for its form, including grammars contained in links
in that form;</p>
</li>

<li>
<p>grammars contained in links in its document, and grammars for
menus and other forms in its document which are given document
scope;</p>
</li>

<li>
<p>grammars contained in links in its application root document,
and grammars for menus and forms in its application root document
which are given document scope.</p>
</li>

<li>
<p>grammars defined by platform default event handlers, such as
help, exit and cancel.</p>
</li>
</ul>

<p>In the case that an input matches more than one active
grammar, the list above defines the precedence order. If the
input matches more than one active grammar with the same
precedence, the precedence is determined using document order:
the first grammar in document order has highest priority. If no
grammars are active when an input is expected, the platform must
throw an error.semantic event. The error will be thrown in the
context of the executing element. Menus behave with regard to
grammar activation like their equivalent forms (see <a
href="#dml2.2.1" shape="rect">Section 2.2.1</a>).</p>

<p>If the form item is modal (i.e., its modal attribute is set to
true), all grammars except its own are turned off while waiting
for input. If the input matches a grammar in a form or menu other
than the current form or menu, control passes to the other form
or menu. If the match causes control to leave the current form,
all current form data is lost.</p>

<p>Grammar activation is not affected by the inputmodes property.
For instance, if the inputmodes property restricts input to just
voice, DTMF grammars will still be activated, but cannot be
matched.</p>

<h3 id="L5067"><a id="dml3.1.5" name="dml3.1.5"
shape="rect">3.1.5 Semantic Interpretation of Input</a></h3>

<p>The Speech Recognition Grammar Specification defines a tag
element which contains content for semantic interpretation of
speech and DTMF grammars (see Section 2.6 of <a href="#ref_SRGS"
shape="rect">[SRGS]</a>).</p>

<p>The Semantic Interpretation for Speech Recognition
specification <a href="#ref_SISR" shape="rect">[SISR]</a>
describes a syntax and semantics for tags and specifies how a
semantic interpretation for user input can be computed using the
content of tags associated with the matched tokens and rules. The
semantic interpretation may be mapped into VoiceXML as described
in <a href="#dml3.1.6" shape="rect">Section 3.1.6</a>.</p>

<h3 id="L5115"><a id="dml3.1.6" name="dml3.1.6"
shape="rect">3.1.6 Mapping Semantic Interpretation Results to
VoiceXML forms</a></h3>

<p>The semantic interpretation returned from a Speech Recognition
Grammar Specification <a href="#ref_SRGS" shape="rect">[SRGS]</a>
grammar must be mapped into one or more VoiceXML ECMAScript
variables. The process by which this occurs differs slightly for
form- and field-level results; these differences will be explored
in the next sections. The format of the semantic interpretation,
using either the proposed Natural Language Semantics Markup
Language <a href="#ref_NLSML" shape="rect">[NLSML]</a> or the
ECMAScript-like output format of <a href="#ref_SISR"
shape="rect">[SISR]</a>, has no impact on this discussion. For
the purposes of this discussion, the actual result returned from
the recognizer is assumed to have been mapped into an
ECMAScript-like format which is identical to the representation
in application.lastresult$.interpretation as discussed in <a
href="#dml5.1.5" shape="rect">Section 5.1.5</a>.</p>

<p>It is possible that a grammar will match but not return a
semantic interpretation. In this case, the platform will use the
raw text string for the utterance as the semantic result.
Otherwise, this case is handled exactly as if the semantic
interpretation consisted of a simple value.</p>

<p>Every input item has an associated <i>slot name</i> which may
be used to extract part of the full semantic interpretation. The
slot name is the value of the 'slot' attribute, if present (only
possible for &lt;field&gt; elements), or else the value of the
'name' attribute (for &lt;field&gt;s without a slot attribute,
and for other input items as well). If neither slot nor name is
present, then the slot name is undefined.</p>

<p>The slot name is used during the Process Phase of the <a
href="#dmlAFIA" shape="rect">FIA</a> to determine whether or not
an input item matches. A match occurs when either the slot name
is the same as a top-level property or a slot name is used to
select a sub-property. A property having an undefined value (i.e.
ECMAScript undefined) will not match. Likewise, slot names which
are undefined will never match. Examples are given in <a
href="#dml3.1.6.3" shape="rect">Section 3.1.6.3</a>. Note that it
is possible for a specific slot value to fill more than one input
item if the slot names of the input items are the same.</p>

<p>The next sections concern mapping form-level and field-level
results. There is also a brief discussion of other issues such as
the NL Semantics&#160; to ECMAScript mapping, transitioning
information from ASR results to VoiceXML, and dealing with
mismatches between the interpretation result and the VoiceXML
form.</p>

<h4 id="L5128"><a id="dml3.1.6.1" name="dml3.1.6.1"
shape="rect">3.1.6.1 Mapping form-level results</a></h4>

<p>Grammars specified at the form-level produce a <em>form-level
result</em> which may fill multiple input items simultaneously.
This may occur anytime, whether in an &lt;initial&gt; element or
in an input item, that the user's input matches an active
form-level grammar.</p>

<p>Consider the interpretation result from the sentence "I would
like a coca cola and three large pizzas with pepperoni and
mushrooms." The semantic interpretation may be copied into
application.lastresult$.interpretation as</p>

<pre xml:space="preserve">
{
     drink: "coke",
     pizza: {
          number: "3",
          size: "large",
           topping: [
                "pepperoni",
                "mushrooms"
           ]
      }
}
</pre>

<p>The following table illustrates how this result from a
form-level grammar would be assigned to various input items
within the form. Note that all input items that can be filled
in from the interpretation are filled in simultaneously. The
existing values of matching input item variables will be
overwritten, and these items will be marked for &lt;filled&gt;
processing during the FIA's Process Phase as described in
<a href="#dml2.4" shape="rect">Section 2.4</a> and <a
href="#dmlAFIA" shape="rect">Appendix C</a>.</p>

<table cellspacing="0" cellpadding="3" border="1"
summary="Table 31: form-level grammar assignments">
<caption align="bottom">Table 31: Form-level Grammar
Assignments</caption>

<tbody>
<tr>
<th>VoiceXML field</th>
<th>Assigned ECMAScript value</th>
<th>Explanation</th>
</tr>

<tr>
<td valign="top" nowrap="nowrap">1.
&lt;field name="drink"/&gt; <em>--or--<br />
</em> &lt;object name="drink"/&gt; <em>--or--</em><br
clear="none" />
 &lt;record name="drink"/&gt;</td>
<td valign="top">"coke"</td>
<td valign="top">By default an
input item is assigned the top-level result property whose
name matches the input item name.</td>
</tr>

<tr>
<td valign="top" nowrap="nowrap">2.
&lt;field name="..." slot="drink"/&gt;</td>
<td valign="top">"coke"</td>
<td valign="top">If specified for a
field, the slot name overrides the field name
for selecting the result property.</td>
</tr>

<tr>
<td valign="top" nowrap="nowrap">3.
&lt;field name="pizza"/&gt; <em>--or--<br />
</em> &lt;object name="pizza"/&gt; <em>--or--</em><br
clear="none" />
 &lt;record name="pizza"/&gt; <em>--or--</em> <br
clear="none" />
 &lt;field name="..." slot="pizza"/&gt;</td>
<td valign="top">{number: "3", size:
"large", topping: ["pepperoni", "mushroom"]}</td>
<td valign="top">The input item name
or slot may select a property that is a non-scalar ECMAScript
variable in the same way that a scalar value is selected in the
previous example. However the application must then handle
inspecting the components of the object. This does not take
advantage of the VoiceXML form-filling algorithm, in that missing
slots in the result would not be automatically prompted for. This
may be sufficient in situations where the server is prepared to
deal with a structured object. Otherwise, an application may
prefer to use the method described in the next example.</td>
</tr>

<tr>
<td valign="top" nowrap="nowrap">4.
&lt;field name="..." slot="pizza.number"/&gt;<br />
 &lt;field name="..." slot="pizza.size"/&gt;</td>
<td valign="top">"3"<br />
 "large"</td>
<td valign="top">The slot may be used to
select a sub-property of the result. This approach distributes
the result among a number of fields.</td>
</tr>

<tr>
<td valign="top" nowrap="nowrap">5.
&lt;field name="..." slot="pizza.topping"/&gt;</td>
<td valign="top">["pepperoni",
"mushroom"]</td>
<td valign="top">The selected property
may be a compound object.</td>
</tr>
</tbody>
</table>

<p>The &lt;field ... slot="pizza.foo"&gt; examples above can be
explained by rules that are compatible with and are
straightforward extensions of the VoiceXML 1.0 "name" and "slot"
attributes:</p>

<ol>
<li>The "slot" attribute of a &lt;field&gt; is a (very
restricted) ECMAScript expression that selects some portion of
the result to be assigned to the field. In addition to selecting
the top-level result property, the attribute can select
properties at arbitrary levels of nesting, using a dot-separated
list of element/property names, as in "pizza.number" and
"order.pizza.topping".</li>

<li>If the "slot" attribute of a field is used to select a
sub-property of the result and that sub-property does not exist
in the result, then the field <i>does not match</i> the result
(see <a href="#dml3.1.6" shape="rect">Section
3.1.6</a>).</li>
</ol>

<h4 id="L5238"><a id="dml3.1.6.2" name="dml3.1.6.2"
shape="rect">3.1.6.2 Mapping a field-level result</a></h4>

<p>Grammars specified within an input item produce a
<em>field-level result</em> which may fill only the particular
input item in which they are contained. These grammars are active
only when the FIA is visiting that specific input item. This is
useful, for instance, in directed dialogs where a user is
prompted individually for each input item.</p>

<p>A field-level result fills the associated input
item in the following manner:</p>

<ul>
<li>If the interpretation is a simple result, this is assigned to
the input item variable.</li>

<li>If the interpretation is a structure and the slot name
matches a property, this property's value is assigned to the
input item variable.</li>

<li>Otherwise, the full semantic result is assigned.</li>
</ul>

<p>This process allows an input item to extract a particular
property from the semantic interpretation. This may be combined
with &lt;filled&gt; for achieve even greater control.</p>

<pre class="example" xml:space="preserve">
&lt;field name="getdate"&gt;
  &lt;prompt&gt;On what date would you like to fly?&lt;/prompt&gt;

  &lt;grammar src="http://server.example.com/date.grxml"/&gt;
  &lt;!-- this grammar always returns an object containing
       string values for the properties day, month, and year --&gt;

  &lt;filled&gt;
    &lt;assign name="getdate.datestring" 
            expr="getdate.year + getdate.month + getdate.day"/&gt;
  &lt;/filled&gt;
&lt;/field&gt;
</pre>

<h4 id="L5273"><a id="dml3.1.6.3" name="dml3.1.6.3"
shape="rect">3.1.6.3 Additional examples</a></h4>

<p>A matching slot name allows an input item to extract part of a
semantic interpretation. Consider this modified result from the
earlier pizza example.</p>

<pre xml:space="preserve">
application.lastresult$.interpretation =
{ drink: { size: 'large', liquid: 'coke' },
  pizza: { number: '3', size: 'large',
           topping: ['pepperoni', 'mushroom' ] }, 
  sidedish: undefined
}
</pre>

<p>The table below revisits the definition of when the slot name
matches a property in the result.</p>

<table border="1" cellspacing="0" cellpadding="5" width="80%"
summary="Table 32: Slot Name Matching">
<caption align="bottom">Table 32: Slot Name Matching</caption>

<tr>
<td><b>slot name</b> </td>
<td><b>match or not?</b> </td>
</tr>

<tr>
<td><i>undefined</i> </td>
<td>does not match</td>
</tr>

<tr>
<td>drink</td>
<td>matches; top level property</td>
</tr>

<tr>
<td>pizza</td>
<td>matches; top level property</td>
</tr>

<tr>
<td>sidedish</td>
<td>does not match; no defined value</td>
</tr>

<tr>
<td>size</td>
<td>does not match; not a top-level
property</td>
</tr>

<tr>
<td>pizza.size</td>
<td>matches; sub-property</td>
</tr>

<tr>
<td>pizza.liquid</td>
<td>does not match</td>
</tr>
</table>

<p>It is also possible to compare the behaviors of form-level and
field-level results. For this purpose, consider the following
document:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
    &lt;form id="exampleForm"&gt;
      &lt;grammar src="formlevel.grxml"/&gt;
      &lt;initial&gt; Say something. &lt;/initial&gt;

      &lt;field name="x"&gt;
        &lt;grammar src="fieldx.grxml"/&gt;
      &lt;/field&gt;

      &lt;field name="z" slot="y"&gt;
        &lt;grammar src="fieldz.grxml"/&gt;
      &lt;/field&gt;
    &lt;/form&gt;
  &lt;/vxml&gt;
</pre>

<p>This defines two input item variables, 'x' and 'z'. The
corresponding slot names are 'x' and 'y' respectively. The next
table describes the assignment of these variables depending on
which grammar is recognized and what semantic result is returned.
The shorthand <i>valueX</i> is used to indicate 'the structured
object or simple result value associated with the property
x'.</p>

<table border="1" cellpadding="2" cellspacing="0" width="100%"
summary="Table 33: Variable Assignments">
<caption align="bottom">Table 33: Variable Assignments Depending
on Grammar and Semantic Result</caption>

<tr>
<td>
<div align="center"><b>application. lastresult$.
interpretation</b></div>
</td>
<td>
<div align="center"><b>form-level result<br />
 (formlevel.grxml)</b></div>
</td>
<td>
<div align="center"><b>field-level result in field x<br
clear="none" />
 (fieldx.grxml)</b></div>
</td>
<td>
<div align="center"><b>field-level result in field z<br
clear="none" />
 (fieldz.grxml)</b></div>
</td>
</tr>

<tr>
<td>= 'hello'</td>
<td>
<p class="updated">no assignment; cycle FIA</p>
</td>
<td>x = 'hello'</td>
<td>z = 'hello'</td>
</tr>

<tr>
<td>= { x: valueX }</td>
<td>x = valueX</td>
<td>x = valueX</td>
<td>z = { x: valueX }</td>
</tr>

<tr>
<td>= { y: valueY }</td>
<td>z = valueY</td>
<td>x = { y: valueY }</td>
<td>z = valueY</td>
</tr>

<tr>
<td>= { z: valueZ }</td>
<td>
<p class="updated">no assignment; cycle FIA</p>
</td>
<td>x = { z: valueZ }</td>
<td>z = { z: valueZ }</td>
</tr>

<tr>
<td>= { x: valueX,<br />
 y: valueY,<br />
 z: valueZ }</td>
<td>x = valueX<br />
 z = valueY</td>
<td>x = valueX</td>
<td>z = valueY</td>
</tr>

<tr>
<td>= { a: valueA<br />
b: valueB }</td>
<td>
<p class="updated">no assignment; cycle FIA</p>
</td>
<td>x = { a: valueA,<br />
b: valueB }</td>
<td>z = { a: valueA,<br />
 b: valueB }</td>
</tr>
</table>

<p>At the form level, simple results like the string 'hello'
cannot match any input items; structured objects assign all input
item variables with matching slot names. At the field level,
simple results are always assigned to the input item variable;
structured objects will extract the matching property, if it
exists, or will otherwise be assigned the entire semantic
result.</p>

<h4 id="L5274"><a id="dml3.1.6.4" name="dml3.1.6.4"
shape="rect">3.1.6.4 Additional issues</a></h4>

<p>1. Mapping from NL semantics to ECMAScript: If the NL
Semantics Markup Language (<a href="#ref_NLSML"
shape="rect">[NLSML]</a>) is used, a mapping needs to be defined
from the NLSML representation to ECMAScript objects. Since both
types of representation have similar nested structures, this
mapping is fairly straightforward. This mapping is discussed in
detail in the NL Semantics specification.</p>

<p>2. Transitioning semantic results from ASR to VoiceXML: The
result of processing the semantic tags of a W3C ASR grammar is
the value of the attribute of the root rule when all semantic
attachment evaluations have been completed. In addition, the root
rule (like all non-terminals) has an associated "text" variable
which contains the series of tokens in the utterance that is
governed by that non-terminal. In the process of making ASR
results available to VoiceXML documents, the VoiceXML platform is
not only responsible for filling in the VoiceXML fields based on
the value of the attribute of the root rule, as described above,
but also for filling in the shadow variables of the field. The
name$.utterance shadow variable of the field should be the same
as the "text" variable value for the ASR root rule. The platform
is also responsible for instantiating the value of the shadow
variable "name$.confidence" based on information supplied by the
ASR platform, as well as the value of "name$.inputmode" based on
whether DTMF or speech was processed. Finally, the platform is
responsible for making this same information available in the
"application.lastresult$" variable, defined in Section 5.1.5
(specifically, "application.lastresult$.utterance",
"application.lastresult$.inputmode", and
"application.lastresult$.interpretation"), with the exception of
application.lastresult$.confidence, which the platform sets to
the confidence of the entire utterance interpretation.</p>

<p>3. Mismatches between semantic results and VoiceXML fields:
Mapping semantic results to VoiceXML depends on a tight
coordination between the ASR grammar and the VoiceXML markup.
Since in the current framework there's nothing that enforces
consistency between a grammar and the associated VoiceXML dialog,
mismatches can occur due to developer oversight. Since the
dialog's behaviour during these mismatches is difficult to
distinguish from certain normal situations, verifying consistency
of information is extremely important. Some examples of
mismatches:</p>

<ul>
<li>The semantic results contain extra information that doesn't
correspond to the VoiceXML fields.This could occur either due to
developer error or if a richer grammar is being used than is
required by the VoiceXML application. This extra information will
be ignored.</li>

<li>The VoiceXML application expects information in the result
that isn't present. This could also be due to developer error, or
it may be that the user simply didn't supply a value for a
particular slot. In this case the normal FIA applies and the
missing value would be elicited from the user. If the problem was
in fact caused by a developer error, and the grammar is actually
incapable of recognizing the correct value, the FIA will keep
eliciting the missing value until it invokes whatever provisions
the platform and application have in place for repeated nomatch
failures.</li>

<li>Finally, information might be present in both the VoiceXML
and the ASR result, but in inconsistent formats. For example, an
ASR grammar might provide a structured object for the drink which
includes the size and whether the drink is diet or non-diet, but
the VoiceXML form might only expect a string consisting of the
name of the drink. The system's behaviour in these situations
would depend on what is being done with the results. For example,
a structured object might be sent to a server side script that's
expecting a string, and the consequences of this would depend on
the server script.</li>
</ul>

<p>In order to address these potential problems, the committee is
looking at various approaches to ensuring consistency between the
grammar and the VoiceXML.</p>

<!--- CHAPTER 3: END =-->
<!--- CHAPTER 4: BEGIN =-->
<h1 id="L5302"><a id="dml4" name="dml4" shape="rect">4. System
Output</a></h1>

<h2 id="L5305"><a id="dml4.1" name="dml4.1" shape="rect">4.1
Prompts</a></h2>

<p>The &lt;prompt&gt; element controls the output of synthesized
speech and prerecorded audio. Conceptually, prompts are
instantaneously queued for play, so interpretation proceeds until
the user needs to provide an input. At this point, the prompts
are played, and the system waits for user input. Once the input
is received from the speech recognition subsystem (or the DTMF
recognizer), interpretation proceeds.</p>

<p>The &lt;prompt&gt; element has the following attributes:</p>

<table id="table34" cellspacing="0" cellpadding="5" width="80%"
border="1" summary="Table 34: prompt attributes">
<caption align="bottom">Table 34: &lt;prompt&gt;
Attributes</caption>

<tbody>
<tr>
<th>bargein</th>
<td>Control whether a user can interrupt
a prompt. This defaults to the value of the bargein property. See
<a href="#dml6.3.4" shape="rect">Section 6.3.4</a>.</td>
</tr>

<tr>
<th>bargeintype</th>
<td>Sets the type of bargein to be
'speech', or 'hotword'. This defaults to the value of the
bargeintype property. See <a href="#dml6.3.4"
shape="rect">Section 6.3.4</a>.</td>
</tr>

<tr>
<th>cond</th>
<td>An expression that must evaluate to
true after conversion to boolean in order for the prompt to be
played. Default is true.</td>
</tr>

<tr>
<th>count</th>
<td>A number that allows you to emit
different prompts if the user is doing something repeatedly.
If omitted, it defaults to "1".</td>
</tr>

<tr>
<th>timeout</th>
<td>The timeout that will be used for
the following user input. The value is a Time Designation (see
<a href="#dml6.5" shape="rect">Section 6.5</a>). The default
noinput timeout is platform specific.</td>
</tr>

<tr>
<th>xml:lang</th>
<td>The <a href="#term-language"
shape="rect">language identifier</a> for the prompt. If
omitted, it defaults to the value specified in the document's
"xml:lang" attribute.</td>
</tr>

<tr>
<th>xml:base</th>
<td>Declares the base URI from which
relative URIs in the prompt are resolved. This base declaration
has precedence over the &lt;vxml&gt; base URI declaration. If a
local declaration is omitted, the value is inherited down the
document hierarchy.</td>
</tr>
</tbody>
</table>

<h3 id="L5393"><a id="dml4.1.1" name="dml4.1.1"
shape="rect">4.1.1 Speech Markup</a></h3>

<p>The content of the &lt;prompt&gt; element is modelled on the
W3C Speech Synthesis Markup Language 1.0 <a href="#ref_SSML"
shape="rect">[SSML]</a>.</p>

<p>The following speech markup elements are defined in <a
href="#ref_SSML" shape="rect">[SSML]</a> and are available in
VoiceXML 2.0. Refer to the W3C Speech Synthesis Markup Language
1.0 [<a href="#ref_SSML" shape="rect">SSML]</a> for definitions
and examples.</p>

<table cellspacing="0" cellpadding="4" width="80%" border="1"
summary="Table 35: ssml elements">
<caption align="bottom">Table 35: SSML Elements Available in
VoiceXML</caption>

<thead>
<tr>
<th>Element</th>
<th>Purpose</th>
<th>Section<br />
 <small>(in SSML spec)</small> </th>
</tr>

<tr>
<td>&lt;audio&gt;</td>
<td>Specifies audio files to be played
and text to be spoken.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.3.1"
shape="rect">3.3.1</a> </td>
</tr>
</thead>

<tbody>
<tr>
<td>&lt;break&gt;</td>
<td>Specifies a pause in the speech
output.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.2.3"
shape="rect">3.2.3</a> </td>
</tr>

<tr>
<td>&lt;desc&gt;</td>
<td>Provides a description of a
non-speech audio source in &lt;audio&gt;.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.3.3"
shape="rect">3.3.3</a> </td>
</tr>

<tr>
<td>&lt;emphasis&gt;</td>
<td>Specifies that the enclosed text
should be spoken with emphasis.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.2.2"
shape="rect">3.2.2</a> </td>
</tr>

<tr>
<td>&lt;lexicon&gt;</td>
<td>Specifies a pronunciation lexicon for
the prompt.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.1.4"
shape="rect">3.1.4</a> </td>
</tr>

<tr>
<td>&lt;mark&gt;</td>
<td><i>Ignored by VoiceXML platforms.</i>
</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.3.2"
shape="rect">3.3.2</a> </td>
</tr>

<tr>
<td>&lt;meta&gt;</td>
<td>Specifies meta and "http-equiv"
properties for the prompt.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.1.5"
shape="rect">3.1.5</a> </td>
</tr>

<tr>
<td>&lt;metadata&gt;</td>
<td>Specifies XML metadata content for
the prompt.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.1.6"
shape="rect">3.1.6</a> </td>
</tr>

<tr class="stripe">
<td>
<p>&lt;p&gt;</p>
</td>
<td>Identifies the enclosed text as a
paragraph, containing zero or more sentences</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.1.7"
shape="rect">3.1.7</a> </td>
</tr>

<tr class="stripe">
<td>&lt;phoneme&gt;</td>
<td>Specifies a phonetic pronunciation
for the contained text.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.1.9"
shape="rect">3.1.9</a> </td>
</tr>

<tr class="stripe">
<td>&lt;prosody&gt;</td>
<td>Specifies prosodic information for
the enclosed text.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.2.4"
shape="rect">3.2.4</a> </td>
</tr>

<tr>
<td>&lt;say-as&gt;</td>
<td>Specifies the type of text construct
contained within the element.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.1.8"
shape="rect">3.1.8</a> </td>
</tr>

<tr class="stripe">
<td>&lt;s&gt;</td>
<td>Identifies the enclosed text as a
sentence.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.1.7"
shape="rect">3.1.7</a> </td>
</tr>

<tr>
<td>&lt;sub&gt;</td>
<td>Specifies replacement spoken text for
the contained text.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.1.10"
shape="rect">3.1.10</a> </td>
</tr>

<tr>
<td>&lt;voice&gt;</td>
<td>Specifies voice characteristics for
the spoken text.</td>
<td><a
href="http://www.w3.org/TR/speech-synthesis/#S3.2.1"
shape="rect">3.2.1</a> </td>
</tr>
</tbody>
</table>

<p>When used in VoiceXML, additional properties are defined for
the &lt;audio&gt; (<a href="#dml4.1.3" shape="rect">Section
4.1.3</a>) and &lt;say-as&gt; (<a href="#dmlABuiltins"
shape="rect">Appendix P</a>) elements. VoiceXML also allows
&lt;enumerate&gt; and &lt;value&gt; elements to appear within the
&lt;prompt&gt; element.</p>

<p>The VoiceXML platform must be a Conforming Speech Synthesis
Markup Language Processor as defined in the <a href="#ref_SSML"
shape="rect">[SSML]</a>. While this requires a platform to
process documents with one or more "xml:lang" attributes defined,
it does not require that the platform must be multi-lingual. When
an unsupported language is encountered, the platform throws an
<b>error.unsupported.language</b> event which specifies the
language in its message variable.</p>

<h3 id="L5367"><a id="dml4.1.2" name="dml4.1.2"
shape="rect">4.1.2 Basic Prompts</a></h3>

<p>You've seen prompts in the previous examples:</p>

<pre class="example" xml:space="preserve">
&lt;prompt&gt;Please say your city.&lt;/prompt&gt;
</pre>

<p>You can leave out the &lt;prompt&gt; ... &lt;/prompt&gt;
if:</p>

<ul>
<li>
<p>There is no need to specify a prompt attribute (like bargein),
and</p>
</li>

<li>
<p>The prompt consists entirely of PCDATA (contains no speech
markups) or consists of just an &lt;audio&gt; or &lt;value&gt;
element.</p>
</li>
</ul>

<p>For instance, these are also prompts:</p>

<pre class="example" xml:space="preserve">
Please say your city.

&lt;audio src="say_your_city.wav"/&gt;
</pre>

<p>But in this example, the enclosing prompt elements are
required due to the embedded speech markups:</p>

<pre class="example" xml:space="preserve">
&lt;prompt&gt;Please &lt;emphasis&gt;say&lt;/emphasis&gt; your city.&lt;/prompt&gt;
</pre>

<p>When prompt content is specified without an explicit
&lt;prompt&gt; element, then the prompt attributes are defined as
specified in <a shape="rect" href="#table34">Table 34</a>.</p>

<h3 id="L5820"><a id="dml4.1.3" name="dml4.1.3"
shape="rect">4.1.3 Audio Prompting</a></h3>

<p>Prompts can consist of any combination of prerecorded files,
audio streams, or synthesized speech:</p>

<pre class="example" xml:space="preserve">
&lt;prompt&gt;
   Welcome to the Bird Seed Emporium.
   &lt;audio src="rtsp://www.birdsounds.example.com/thrush.wav"/&gt;
   We have 250 kilogram drums of thistle seed for
   &lt;say-as interpret-as="currency"&gt;$299.95&lt;/say-as&gt;

   plus shipping and handling this month.
   &lt;audio src="http://www.birdsounds.example.com/mourningdove.wav"/&gt;
&lt;/prompt&gt;
</pre>

<p>Audio can be played in any prompt. The audio content can be
specified via a URI, and in VoiceXML it can also be in an
<i>audio</i> variable previously recorded:</p>

<pre class="example" xml:space="preserve">
&lt;prompt&gt;
   Your recorded greeting is
   &lt;audio expr="greeting"/&gt;
   To rerecord, press 1.
   To keep it, press pound.
   To return to the main menu press star M.
   To exit press star, star X.
&lt;/prompt&gt;
</pre>

<p>The &lt;audio&gt; element can have alternate content in case
the audio sample is not available:</p>

<pre class="example" xml:space="preserve">
&lt;prompt&gt;
   &lt;audio src="welcome.wav"&gt; 
     &lt;emphasis&gt;Welcome&lt;/emphasis&gt; to the Voice Portal. 
   &lt;/audio&gt;
&lt;/prompt&gt;
</pre>

<p>If the audio file cannot be played (e.g. 'src' referencing or
'expr' evaluating to an invalid URI, a file with an unsupported
format, etc), the content of the audio element is played instead.
The content may include text, speech markup, or another audio
element. If the audio file cannot be played and the content
of the audio element is empty, no audio is played and no error
event is thrown.</p>

<p>If &lt;audio&gt; contains an 'expr' attribute evaluating to
ECMAScript undefined, then the element, including its alternate
content, is ignored. This allows a developer to specify
&lt;audio&gt; elements with dynamically assigned content which,
if the element is not required, can be ignored by assigning its
'expr' a null value. For example, the following code shows how
this could be used to play back a hand of cards using
concatenated audio clips:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form&gt;
  &lt;!-- script contains the function sayCard(type,position)
       which takes as input the type of card description (audio or text) and
       its position in an array, and returns the selected card description in
       the specified array position; if there is no description in the 
       requested array position, then returns ECMAScript undefined
  --&gt; 
  
  &lt;script src="cardgame.js"/&gt;

  &lt;field name="takecard"&gt;
       &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
       &lt;prompt&gt;
           &lt;audio src="you_have.wav"&gt;You have the following cards: &lt;/audio&gt;
           &lt;!-- maximum of hand of 5 cards is described --&gt;
           &lt;audio expr="sayCard(audio,1)"&gt;&lt;value expr="sayCard(text,1)"/&gt;&lt;/audio&gt;
           &lt;audio expr="sayCard(audio,2)"&gt;&lt;value expr="sayCard(text,2)"/&gt;&lt;/audio&gt;
           &lt;audio expr="sayCard(audio,3)"&gt;&lt;value expr="sayCard(text,3)"/&gt;&lt;/audio&gt;
           &lt;audio expr="sayCard(audio,4)"&gt;&lt;value expr="sayCard(text,4)"/&gt;&lt;/audio&gt;
           &lt;audio expr="sayCard(audio,5)"&gt;&lt;value expr="sayCard(text,5)"/&gt;&lt;/audio&gt;
           &lt;audio src="another.wav"&gt;Would you like another card?&lt;/audio&gt;
        &lt;/prompt&gt;
        &lt;filled&gt;
              &lt;if cond="takecard"&gt;
                  &lt;script&gt;takeAnotherCard()&lt;/script&gt;
                  &lt;clear/&gt;
              &lt;else/&gt;
                  &lt;goto next="./make_bid.vxml"/&gt;
              &lt;/if&gt;
        &lt;/filled&gt;
   &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>Attributes of &lt;audio&gt; defined in <a href="#ref_SSML"
shape="rect">[SSML]</a> are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 36: audio attributes inherited from ssml">
<caption align="bottom">Table 36: &lt;audio&gt; Attributes
Inherited from SSML</caption>

<tbody>
<tr>
<th>src</th>
<td>The URI of the audio prompt. See <a
href="#dmlAAudioFormats" shape="rect">Appendix E</a> for required
audio file formats; additional formats may be used if supported
by the platform.</td>
</tr>
</tbody>
</table>

<p>Attributes of &lt;audio&gt; defined only in VoiceXML are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 37: audio attributes in VoiceXML only">
<caption align="bottom">Table 37: &lt;audio&gt; Attributes added
in VoiceXML</caption>

<tbody>
<tr>
<th>fetchtimeout</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchtimeout
property.</td>
</tr>

<tr>
<th>fetchhint</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the audiofetchhint
property.</td>
</tr>

<tr>
<th>maxage</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the audiomaxage
property.</td>
</tr>

<tr>
<th>maxstale</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the audiomaxstale
property.</td>
</tr>

<tr>
<th>expr</th>
<td>An ECMAScript expression which
determines the source of the audio to be played. The expression
may be either a reference to audio previously recorded with the
&lt;record/&gt; item or evaluate to the URI of an audio resource
to fetch.</td>
</tr>
</tbody>
</table>

<p>Exactly one of "src" or "expr" must be specified; otherwise,
an error.badfetch event is thrown.</p>

<p>Note that it is a platform optimization to stream audio: i.e.
the platform may begin processing audio content as it arrives and
not to wait for full retrieval. The "prefetch" fetchhint can be
used to request full audio retrieval prior to playback.</p>

<h3 id="L5919"><a id="dml4.1.4" name="dml4.1.4"
shape="rect">4.1.4 &lt;value&gt; Element</a></h3>

<p>The &lt;value&gt; element is used to insert the value of an
expression into a prompt. It has one attribute:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 38: value attributes">
<caption align="bottom">Table 38: &lt;value&gt;
Attributes</caption>

<tbody>
<tr>
<th>expr</th>
<td>The expression to render.</td>
</tr>
</tbody>
</table>

<p>For example if n is 12, the prompt</p>

<pre class="example" xml:space="preserve">
&lt;prompt&gt;
  &lt;value expr="n*n"/&gt; is the square of &lt;value expr="n"/&gt;.
&lt;/prompt&gt;
</pre>

<p>will result in the text string "144 is the square of 12" being
passed to the speech synthesis engine.</p>

<p>The manner in which the value attribute is played is
controlled by the surrounding speech synthesis markup. For
instance, a value can be played as a date in the following
example:</p>

<pre class="example" xml:space="preserve">
&lt;var name="date" expr="'2000/1/20'"/&gt;
&lt;prompt&gt;
    &lt;say-as interpret-as="date"&gt;
        &lt;value expr="date"/&gt;
    &lt;/say-as&gt;
&lt;/prompt&gt;
</pre>

<p>The text inserted by the &lt;value&gt; element is not subject
to any special interpretation; in particular, it is not parsed as
an <a href="#ref_SSML" shape="rect">[SSML]</a> document or
document fragment. XML special characters (&amp;, &gt;, and &lt;)
are not treated specially and do not need to be escaped. The
equivalent effect may be obtained by literally inserting the text
computed by the &lt;value&gt; element in a CDATA section. For
example, when the following variable assignment:</p>

<pre class="example" xml:space="preserve">
&lt;script&gt; 
    &lt;![CDATA[ 
        e1 = 'AT&amp;T';
    ]]&gt;
&lt;/script&gt; 
</pre>

<p>is referenced in a prompt element as</p>

<pre class="example" xml:space="preserve">
  &lt;prompt&gt; The price of &lt;value expr="e1"/&gt; is $1. &lt;/prompt&gt;
</pre>

<p>the following output is produced.</p>

<pre class="example" xml:space="preserve">
 The price of AT&amp;T is $1.
</pre>

<h3 id="L6037"><a id="dml4.1.5" name="dml4.1.5"
shape="rect">4.1.5 Bargein</a></h3>

<p>If an implementation platform supports bargein, the
application author can specify whether a user can interrupt, or
"bargein" on, a prompt using speech or DTMF input. This speeds up
conversations, but is not always desired. If the application
author requires that the user must hear all of a warning, legal
notice, or advertisement, bargein should be disabled. This is
done with the bargein attribute:</p>

<pre class="example" xml:space="preserve">
&lt;prompt bargein="false"&gt;&lt;audio src="legalese.wav"/&gt;&lt;/prompt&gt;
</pre>

<p>Users can interrupt a prompt whose bargein attribute is true,
but must wait for completion of a prompt whose bargein attribute
is false. In the case where several prompts are queued, the
bargein attribute of each prompt is honored during the period of
time in which that prompt is playing. If bargein occurs during
any prompt in a sequence, all subsequent prompts are not played
(even those whose bargein attribute is set to false). If the
bargein attribute is not specified, then the value of the
bargein property is used if set.</p>

<p>When the bargein attribute is false, input is not
buffered while the prompt is playing, and any DTMF input
buffered in a transition state is deleted from the buffer (<a
href="#dml4.1.8" shape="rect">Section 4.1.8</a> describes input
collection during transition states).</p>

<p>Note that not all speech recognition engines or implementation
platforms support bargein. For a platform to support bargein, it
must support at least one of the bargein types described in <a
href="#dml4.1.5.1" shape="rect">Section 4.1.5.1</a>.</p>

<h3 id="L6056"><a id="dml4.1.5.1" name="dml4.1.5.1"
shape="rect">4.1.5.1 Bargein</a> type</h3>

<p>When bargein is enabled, the bargeintype attribute can be
used to suggest the type of bargein the platform will perform
in response to voice or DTMF input. Possible values for this
attribute are:</p>

<table border="1" cellpadding="5" cellspacing="0" width="80%"
summary="Table 39: bargeintype values">
<caption align="bottom">Table 39: bargeintype Values</caption>

<tbody>
<tr>
<th width="140">speech</th>
<td width="618">The prompt will be
stopped as soon as speech or DTMF input is detected.
The prompt is stopped irrespective of whether or not the
input matches a grammar and irrespective of which grammars
are active.</td>
</tr>

<tr>
<th width="140">hotword</th>
<td width="618">The prompt will not be
stopped until a complete match of an active grammar is detected.
Input that does not match a grammar is ignored (note that this
even applies during the timeout period); as a consequence, a
nomatch event will never be generated in the case of hotword
bargein.</td>
</tr>
</tbody>
</table>

<p>If the bargeintype attribute is not specified, then the value
of the bargeintype property is used. Implementations that claim
to support bargein are required to support at least one of these
two types. Mixing these types within a single queue of prompts
can result in unpredictable behavior and is discouraged.</p>

<p>In the case of "speech" bargeintype, the exact meaning of
"speech input" is necessarily implementation-dependent, due to
the complexity of speech recognition technology. It is expected
that the prompt will be stopped as soon as the platform is able
to reliably determine that the input is speech. Stopping the
prompt as early as possible is desireable because it avoids the
"stutter" effect in which a user stops in mid-utterance and
re-starts if he does not believe that the system has heard
him.</p>

<h3 id="L6107"><a id="dml4.1.6" name="dml4.1.6"
shape="rect">4.1.6 Prompt Selection</a></h3>

<p><i>Tapered prompts</i> are those that may change with each
attempt. Information-requesting prompts may become more terse
under the assumption that the user is becoming more familiar with
the task. Help messages become more detailed perhaps, under the
assumption that the user needs more help. Or, prompts can change
just to make the interaction more interesting.</p>

<p>Each input item, &lt;initial&gt;, and menu has an internal
prompt counter that is reset to one each time the form or menu is
entered. Whenever the system selects a given input item in
the select phase of FIA and FIA does perform normal selection and
queuing of prompts (i.e., as described in <a href="#dml5.3.6"
shape="rect">Section 5.3.6</a>, the previous iteration of FIA did
not end with a catch handler that had no reprompt), the input
item's associated prompt counter is incremented. This is the
mechanism supporting tapered prompts.</p>

<p>For instance, here is a form with a form level prompt and
field level prompts:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="tapered"&gt;
  &lt;block&gt;
    &lt;prompt bargein="false"&gt;
      Welcome to the ice cream survey.
    &lt;/prompt&gt;
  &lt;/block&gt;
  &lt;field name="flavor"&gt;
  &lt;grammar mode="voice" version="1.0" root="root"&gt;
    &lt;rule id="root" scope="public"&gt;
      &lt;one-of&gt;
        &lt;item&gt;vanilla &lt;/item&gt;
        &lt;item&gt;chocolate&lt;/item&gt;
        &lt;item&gt;strawberry&lt;/item&gt;
     &lt;/one-of&gt;
    &lt;/rule&gt;
   &lt;/grammar&gt;
   &lt;prompt count="1"&gt;What is your favorite flavor?&lt;/prompt&gt;
   &lt;prompt count="3"&gt;Say chocolate, vanilla, or strawberry.&lt;/prompt&gt;
   &lt;help&gt;Sorry, no help is available.&lt;/help&gt;
  &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>A conversation using this form follows:</p>

<blockquote>
<p>C: Welcome to the ice cream survey.</p>

<p>C: What is your favorite flavor? <span class="stage">(the
"flavor" field's prompt counter is 1)</span></p>

<p>H: Pecan praline.</p>

<p>C: I do not understand.</p>

<p>C: What is your favorite flavor? <span class="stage">(the
prompt counter is now 2)</span></p>

<p>H: Pecan praline.</p>

<p>C: I do not understand.</p>

<p>C: Say chocolate, vanilla, or strawberry. <span
class="stage">(prompt counter is 3)</span></p>

<p>H: What if I hate those?</p>

<p>C: I do not understand.</p>

<p>C: Say chocolate, vanilla, or strawberry. <span
class="stage">(prompt counter is 4)</span></p>

<p>H: ...</p>
</blockquote>

<p>This is just an example to illustrate the use of prompt
counters. A polished form would need to offer a more extensive
range of choices and to deal with out of range values in more
flexible way.</p>

<p>When it is time to select a prompt, the prompt counter is
examined. The child prompt with the highest count attribute less
than or equal to the prompt counter is used. If a prompt has no
count attribute, a count of "1" is assumed.</p>

<p>A <i>conditional prompt</i> is one that is spoken only if its
condition is satisfied. In this example, a prompt is varied on
each visit to the enclosing form.</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="another_joke"&gt;
   &lt;var name="r" expr="Math.random()"/&gt;
   &lt;field name="another"&gt;
       &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
       &lt;prompt cond="r &amp;lt; .50"&gt;
          Would you like to hear another elephant joke?
       &lt;/prompt&gt;
       &lt;prompt cond="r &amp;gt;= .50"&gt;
         For another joke say yes.  To exit say no.
       &lt;/prompt&gt;
       &lt;filled&gt;
          &lt;if cond="another"&gt;
            &lt;goto next="#pick_joke"/&gt;
          &lt;/if&gt;
       &lt;/filled&gt;
   &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>When a prompt must be chosen, a set of prompts to be queued is
chosen according to the following algorithm:</p>

<ol>
<li>Form an ordered list of prompts consisting of all prompts in
the enclosing element in document order.</li>

<li>Remove from this list all prompts whose cond evaluates to
false after conversion to boolean.</li>

<li>Find the "correct count": the highest count among the prompt
elements still on the list less than or equal to the current
count value.</li>

<li>Remove from the list all the elements that don't have the
"correct count".</li>
</ol>

<p>All elements that remain on the list will be queued for
play.</p>

<h3 id="L6183"><a id="dml4.1.7" name="dml4.1.7"
shape="rect">4.1.7 Timeout</a></h3>

<p>The timeout attribute specifies the interval of silence
allowed while waiting for user input after the end of the last
prompt. If this interval is exceeded, the platform will throw a
noinput event. This attribute defaults to the value specified by
the timeout property (see <a href="#dml6.3.4"
shape="rect">Section 6.3.4</a>) at the time the prompt is
queued. In other words, each prompt has its own timeout
value.</p>

<p>The reason for allowing timeouts to be specified as prompt
attributes is to support tapered timeouts. For example, the user
may be given five seconds for the first input attempt, and ten
seconds on the next.</p>

<p>The prompt timeout attribute determines the noinput timeout
for the following input:</p>

<pre class="example" xml:space="preserve">
&lt;prompt count="1"&gt;
  Pick a color for your new Model T.
&lt;/prompt&gt;

&lt;prompt count="2" timeout="120s"&gt;
  Please choose color of your new nineteen twenty four
  Ford Model T. Possible colors are black, black, or
  black.  Please take your time.
&lt;/prompt&gt;
</pre>

<p>If several prompts are queued before a field input, the
timeout of the last prompt is used.</p>

<h3 id="L6199"><a id="dml4.1.8" name="dml4.1.8"
shape="rect">4.1.8 Prompt Queueing and Input Collection</a></h3>

<p>A VoiceXML interpreter is at all times in one of two
states:</p>

<ul>
<li><i>waiting</i> for input in an input item (such as
&lt;field&gt;, &lt;record&gt;, or &lt;transfer&gt;),
<i>or</i></li>

<li><i>transitioning</i> between input items in response to an
input (including spoken utterances, dtmf key presses, and
input-related events such as a noinput or nomatch event) received
while in the waiting state. While in the transitioning state no
speech input is collected, accepted or interpreted. Consequently
root and document level speech grammars (such as defined in
&lt;link&gt;s) may not be active at all times. However, DTMF
input (including timing information) should be collected and
buffered in the transition state. Similarly, asynchronously
generated events not related directly to execution of the
transition should also be buffered until the waiting state (e.g.
connection.disconnect.hangup).</li>
</ul>

<p>The waiting and transitioning states are related to the phases
of the Form Interpretation Algorithm as follows:</p>

<ul>
<li>the waiting state is eventually entered in the collect phase
of an input item (at the point at which the interpreter waits for
input), and</li>

<li>the transitioning state encompasses the process and select
phases, the collect phase for control items (such as
&lt;block&gt;s), and the collect phase for input items up until
the point at which the interpreter waits for input.</li>
</ul>

<p>This distinction of states is made in order to greatly
simplify the programming model. In particular, an important
consequence of this model is that the VoiceXML application
designer can rely on all executable content (such as the content
of &lt;filled&gt; and &lt;block&gt; elements) being run to
completion, because it is executed while in the transitioning
state, which may not be interrupted by input.</p>

<p>While in the transitioning state various prompts are queued,
either by the &lt;prompt&gt; element in executable content or by
the &lt;prompt&gt; element in form items. In addition, audio may
be queued by the fetchaudio attribute. The queued prompts and
audio are played either</p>

<ul>
<li>when the interpreter reaches the waiting state, at which
point the prompts are played and the interpreter listens for
input that matches one of the active grammars, <i>or</i></li>

<li>when the interpreter begins fetching a resource (such as a
document) for which fetchaudio was specified. In this case the
prompts queued before the fetchaudio are played to completion,
and then, if the resource actually needs to be fetched (i.e. it
is not unexpired in the cache), the fetchaudio is played until
the fetch completes. The interpreter remains in the transitioning
state and no input is accepted during the fetch.</li>
</ul>

<p>Note that when a prompt's bargein attribute is false, input is
not collected and DTMF input buffered in a transition state is
deleted (see <a href="#dml4.1.5" shape="rect">Section
4.1.5</a>).</p>

<p>When an ASR grammar is matched, if DTMF input was consumed by
a simultaneously active DTMF grammar (but did not result in a
complete match of the DTMF grammar), the DTMF input may, at
processor discretion, be discarded.</p>

<p>Before the interpreter exits all queued prompts are played to
completion. The interpreter remains in the transitioning state
and no input is accepted while the interpreter is exiting.</p>

<p>It is a permissible optimization to begin playing prompts
queued during the transitioning state before reaching the waiting
state, provided that correct semantics are maintained regarding
processing of the input audio received while the prompts are
playing, for example with respect to bargein and grammar
processing.</p>

<p>The following examples illustrate the operation of these rules
in some common cases.</p>

<h4 id="L56544561">Case 1</h4>

<p>Typical non-fetching case: field, followed by executable
content (such as &lt;block&gt; and &lt;filled&gt;), followed by
another field.</p>

<pre class="example" xml:space="preserve">
 in document d0

    &lt;field name="f0"/&gt;

    &lt;block&gt;
        executable content e1
        queues prompts {p1}
    &lt;/block&gt;

    &lt;field name="f2"&gt;
        queues prompts {p2}
        enables grammars {g2}
    &lt;/field&gt;
</pre>

<p>As a result of input received while waiting in field f0 the
following actions take place:</p>

<ul>
<li>in transitioning state 

<ul>
<li>execute e1 (without goto)</li>

<li>queue prompts {p1}</li>

<li>queue prompts {p2}</li>
</ul>
</li>

<li>in waiting state, simultaneously 

<ul>
<li>play prompts {p1,p2}</li>

<li>enable grammars {g2} and wait for input</li>
</ul>
</li>
</ul>

<h4 id="L56544562">Case 2</h4>

<p>Typical fetching case: field, followed by executable content
(such as &lt;block&gt; and &lt;filled&gt;) ending with a
&lt;goto&gt; that specifies fetchaudio, ending up in a field in a
different document that is fetched from a server.</p>

<pre class="example" xml:space="preserve">
 in document d0

    &lt;field name="f0"/&gt;

    &lt;block&gt;
        executable content e1
        queues prompts {p1}
        ends with goto f2 in d1 with fetchaudio fa
    &lt;/block&gt;

in document d1

    &lt;field name="f2"&gt;
        queues prompts {p2}
        enables grammars {g2}
    &lt;/field&gt;
</pre>

<p>As a result of input received while waiting in field f0 the
following actions take place:</p>

<ul>
<li>in transitioning state 

<ul>
<li>execute e1</li>

<li>queue prompts {p1}</li>

<li>simultaneously 

<ul>
<li>fetch d1</li>

<li>play prompts {p1} to completion and then play fa until fetch
completes</li>
</ul>
</li>

<li>queue prompts {p2}</li>
</ul>
</li>

<li>in waiting state, simultaneously 

<ul>
<li>play prompts {p2}</li>

<li>enable grammars {g2} and wait for input</li>
</ul>
</li>
</ul>

<h4 id="L56544563">Case 3</h4>

<p>As in Case 2, but no fetchaudio is specified.</p>

<pre class="example" xml:space="preserve">
 in document d0

    &lt;field name="f0"/&gt;

    &lt;block&gt;
        executable content e1
        queues prompts {p1}
        ends with goto f2 in d1 (no fetchaudio specified)
    &lt;/block&gt;

in document d1

    &lt;field name="f2"&gt;
        queues prompts {p2}
        enables grammars {g2}
    &lt;/field&gt;
</pre>

<p>As a result of input received while waiting in field f0 the
following actions take place:</p>

<ul>
<li>in transitioning state 

<ul>
<li>execute e1</li>

<li>queue prompts {p1}</li>

<li>fetch d1</li>

<li>queue prompts {p2}</li>
</ul>
</li>

<li>in waiting state, simultaneously 

<ul>
<li>play prompts {p1, p2}</li>

<li>enable grammars {g2} and wait for input</li>
</ul>
</li>
</ul>

<!--- CHAPTER 4: END =-->
<!--- CHAPTER 5: BEGIN =-->
<h1 id="L6390"><a id="dml5" name="dml5" shape="rect">5. Control
flow and scripting</a></h1>

<h2 id="L6393"><a id="dml5.1" name="dml5.1" shape="rect">5.1
Variables and Expressions</a></h2>

<p>VoiceXML variables are in all respects equivalent to
ECMAScript variables: they are part of the same variable space.
VoiceXML variables can be used in a &lt;script&gt; just as
variables defined in a &lt;script&gt; can be used in VoiceXML.
Declaring a variable using &lt;var&gt; is equivalent to using a
'var' statement in a &lt;script&gt; element. &lt;script&gt; can
also appear everywhere that &lt;var&gt; can appear. VoiceXML
variables are also declared by form items.</p>

<p>The variable naming convention is as in ECMAScript, but names
beginning with the underscore character ("_") and names ending
with a dollar sign ("$") are reserved for internal use. VoiceXML
variables, including form item variables, must not contain
ECMAScript reserved words. They must also follow ECMAScript rules
for referential correctness. For example, variable names must be
unique and their declaration must not include a dot - "var x.y"
is an illegal declaration in ECMAScript. Variable names which
violate naming conventions or ECMAScript rules cause an
'error.semantic' event to be thrown.</p>

<h3 id="L6400"><a id="dml5.1.1" name="dml5.1.1"
shape="rect">5.1.1 Declaring Variables</a></h3>

<p>Variables are declared by &lt;var&gt; elements:</p>

<pre class="example" xml:space="preserve">
&lt;var name="home_phone"/&gt; 
&lt;var name="pi" expr="3.14159"/&gt; 
&lt;var name="city" expr="'Sacramento'"/&gt;
</pre>

<p>They are also declared by form items:</p>

<pre class="example" xml:space="preserve">
&lt;field name="num_tickets"&gt; 
   &lt;grammar type="application/srgs+xml" src="/grammars/number.grxml"/&gt;
   &lt;prompt&gt;How many tickets do you wish to purchase?&lt;/prompt&gt; 
&lt;/field&gt;
</pre>

<p>Variables declared without an explicit initial value are
initialized to the ECMAScript undefined value. Variables must
be declared before being used either in VoiceXML or ECMAScript.
Use of an undeclared variable results in an ECMAScript error
which is thrown as an error.semantic. Variables declared using
"var" in ECMAScript can be used in VoiceXML, just as declared
VoiceXML variables can be used in ECMAScript.</p>

<p>In a form, the variables declared by &lt;var&gt; and those
declared by form items are initialized when the form is entered.
The initializations are guaranteed to take place in document
order, so that this, for example, is legal:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="test"&gt; 
   &lt;var name="one" expr="1"/&gt; 
   &lt;field name="two" expr="one+1"&gt;
     &lt;grammar type="application/srgs+xml" src="/grammars/number.grxml"/&gt;
   &lt;/field&gt; 
   &lt;var name="three" expr="two+1"/&gt; 
   &lt;field name="go_on" type="boolean"&gt; 
     &lt;prompt&gt;Say yes or no to continue&lt;/prompt&gt; 
   &lt;/field&gt; 
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>When the user visits this &lt;form&gt;, the form's
initialization first declares the variable one and sets its value
to 1. Then it declares the variable two and gives it the value 2.
Then the initialization logic declares the variable three and
gives it the value 3. The form interpretation algorithm then
enters its main interpretation loop and begins at the go_on
field.</p>

<h3 id="L6421"><a id="dml5.1.2" name="dml5.1.2"
shape="rect" />5.1.2 Variable Scopes</h3>

<p>VoiceXML uses an ECMAScript scope chain to allow variables to
be declared at different levels of hierarchy in an application.
For instance, a variable declared at document scope can be
referenced anywhere within that document, whereas a local
variable declared in a catch element is only available within
that catch element. In order to preserve these scoping semantics,
all ECMAScript variables must be declared. Use of an undeclared
variable results in an ECMAScript error which is thrown as an
error.semantic.</p>

<p>Variables can be declared in following scopes:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 40: variable scopes">
<caption align="bottom">Table 40: Variable Scopes</caption>

<tbody>
<tr>
<th>session</th>
<td>These are read-only variables that
pertain to an entire user session. They are declared and set by
the interpreter context. New session variables cannot be declared
by VoiceXML documents. See <a href="#dml5.1.4"
shape="rect">Section 5.1.4</a>.</td>
</tr>

<tr>
<th>application</th>
<td>These are declared with &lt;var&gt;
and &lt;script&gt; elements that are children of the
application root document's &lt;vxml&gt; element. They are
initialized when the application root document is loaded. They
exist while the application root document is loaded, and are
visible to the root document and any other loaded application
leaf document. Note that while executing inside the
application root document document.x is equivalent to
application.x.</td>
</tr>

<tr>
<th>document</th>
<td>These variables are declared with
&lt;var&gt; and &lt;script&gt; elements that are children of
the document's &lt;vxml&gt; element. They are initialized when
the document is loaded. They exist while the document is loaded.
They are visible only within that document, unless the document
is an application root, in which case the variables are visible
by leaf documents through the application scope only.</td>
</tr>

<tr>
<th>dialog</th>
<td>Each dialog (&lt;form&gt; or
&lt;menu&gt;) has a dialog scope that exists while the user is
visiting that dialog, and which is visible to the elements of
that dialog. Dialog scope contains the following variables:
variables declared by &lt;var&gt; and &lt;script&gt; child
elements of &lt;form&gt;, form item variables, and form item
shadow variables. The child &lt;var&gt; and &lt;script&gt;
elements of &lt;form&gt; are initialized when the form is first
visited, as opposed to &lt;var&gt; elements inside executable
content which are initialized when the executable content is
executed.</td>
</tr>

<tr>
<th><i>(anonymous)</i> </th>
<td>Each &lt;block&gt;, &lt;filled&gt;,
and &lt;catch&gt; element defines a new anonymous scope to
contain variables declared in that element.</td>
</tr>
</tbody>
</table>

<p>The following diagram shows the scope hierarchy:</p>

<p class="fig"><img height="297"
alt="flow from anonymous via dialog, document, application and session"
 src="Images/image008.gif" width="165" /><br />
Figure 11: The scope hierarchy.</p>

<p>The curved arrows in this diagram show that each scope
contains a pre-defined variable whose name is the same as the
scope that refers to the scope itself. This allows you for
example in the anonymous, dialog, and document scopes to refer to
a variable <i>X</i> in the document scope using
document.<i>X</i>. As another example, a &lt;filled&gt;'s
variable scope is an anonymous scope local to the &lt;filled&gt;,
whose parent variable scope is that of the &lt;form&gt;.</p>

<p>It is not recommended to use "session", "application",
"document", and "dialog" as the names of variables and form
items. While they are not reserved words, using them hides the
pre-defined variables with the same name because of ECMAScript
scoping rules used by VoiceXML.</p>

<h3 id="L6494"><a id="dml5.1.3" name="dml5.1.3"
shape="rect">5.1.3 Referencing Variables</a></h3>

<p>Variables are referenced in cond and expr attributes:</p>

<pre class="example" xml:space="preserve">
&lt;if cond="city == 'LA'"&gt; 
   &lt;assign name="city" expr="'Los Angeles'"/&gt; 
&lt;elseif cond="city == 'Philly'"/&gt; 
   &lt;assign name="city" expr="'Philadelphia'"/&gt; 
&lt;elseif cond="city =='Constantinople'"/&gt; 
   &lt;assign name="city" expr="'Istanbul'"/&gt; 
&lt;/if&gt; 

&lt;assign name="var1" expr="var1 + 1"/&gt; 

&lt;if cond="i &amp;gt; 1"&gt; 
   &lt;assign name="i" expr="i-1"/&gt; 
&lt;/if&gt;
</pre>

<p>The expression language used in cond and expr is precisely
ECMAScript. Note that the cond operators "&lt;", "&lt;=", and
"&amp;&amp;" must be escaped in XML (to "&amp;lt;" and so
on).</p>

<p>Variable references match the closest enclosing scope
according to the scope chain given above. You can prefix a
reference with a scope name for clarity or to resolve ambiguity.
For instance to save the value of a variable associated with one
of the fields in a form for use later on in a
document:</p>

<pre class="example" xml:space="preserve">
&lt;assign name="document.ssn" expr="dialog.ssn"/&gt;
</pre>

<p>If the application root document has a variable x, it is
referred to as application.x in non-root documents, and either
application.x or document.x in the application root document.
If the document does not have a specified application root
and has a variable x, it is referred to as either application.x
or document.x in the document.</p>

<h3 id="L6509"><a id="dml5.1.4" name="dml5.1.4"
shape="rect">5.1.4 Standard Session Variables</a></h3>

<dl>
<dt><b>session.connection.local.uri</b></dt>

<dd>This variable is a URI which addresses the local interpreter
context device.</dd>

<dt><b>session.connection.remote.uri</b></dt>

<dd>This variable is a URI which addresses the remote caller
device.</dd>

<dt><b>session.connection.protocol.name</b></dt>

<dd>This variable is the name of the connection protocol. The
name also represents the subobject name for protocol specific
information. For instance, if session.connection.protocol.name is
'q931', session.connection.protocol.q931.uui might specify the
user-to-user information property of the connection.</dd>

<dt><b>session.connection.protocol.version</b></dt>

<dd>This variable is the version of the connection protocol.</dd>

<dt><b>session.connection.redirect</b></dt>

<dd>This variable is an array representing the connection
redirection paths. The first element is the original called
number, the last element is the last redirected number. Each
element of the array contains a uri, pi (presentation
information), si (screening information), and reason property.
The reason property can be either "unknown", "user busy", "no
reply", "deflection during alerting", "deflection immediate
response", "mobile subscriber not reachable".</dd>

<dt><b>session.connection.aai</b></dt>

<dd>This variable is application-to-application information
passed during connection setup.</dd>

<dt><b>session.connection.originator</b></dt>

<dd>This variable directly references either the local or remote
property (For instance, the following ECMAScript would return
true if the remote party initiated the connection: var
caller_initiate = connection.originator ==
connection.remote).</dd>
</dl>

<h3 id="L6603"><a id="dml5.1.5" name="dml5.1.5"
shape="rect">5.1.5 Standard Application Variables</a></h3>

<dl>
<dt><b>application.lastresult$</b></dt>

<dd>This variable holds information about the last recognition to
occur within this application. It is an array of elements where
each element, application.lastresult$[i], represents a possible
result through the following variables:<br />
<br />
 

<dl>
<dt><b>application.lastresult$[i].confidence</b></dt>

<dd>The whole utterance confidence level for this interpretation
from 0.0-1.0. A value of 0.0 indicates minimum confidence, and a
value of 1.0 indicates maximum confidence. More specific
interpretation of a confidence value is platform-dependent.</dd>

<dt><b>application.lastresult$[i].utterance</b></dt>

<dd>The raw string of words that were recognized for this
interpretation. The exact tokenization and spelling is
platform-specific (e.g. "five hundred thirty" or "5 hundred 30"
or even "530"). In the case of a DTMF grammar, this variable will
contain the matched digit string.</dd>

<dt><b>application.lastresult$[i].inputmode</b></dt>

<dd>For this interpretation,the mode in which user input was
provided: dtmf or voice.</dd>

<dt><b>application.lastresult$[i].interpretation</b></dt>

<dd>An ECMAScript variable containing the interpretation as
described in <a href="#dml3.1.5" shape="rect">Section
3.1.5</a>.</dd>
</dl>

<p>Interpretations are sorted by confidence score, from highest
to lowest. Interpretations with the same confidence score are
further sorted according to the precedence relationship (see <a
href="#dml3.1.4" shape="rect">Section 3.1.4</a>) among the
grammars producing the interpretations. Different elements in
application.lastresult$ will always differ in their utterance,
interpretation, or both.</p>

<p>The number of application.lastresult$ elements is guaranteed
to be greater than or equal to one and less than or equal to the
system property "maxnbest". If no results have been generated by
the system, then "application.lastresult$" shall be ECMAScript
undefined.</p>

<p>Additionally, application.lastresult$ itself contains the
properties confidence, utterance, inputmode, and interpretation
corresponding to those of the 0th element in the ECMAScript
array.</p>

<p>All of the shadow variables described above are set
immediately after any recognition. In this context, a
&lt;nomatch&gt; event counts as a recognition, and causes the
value of "application.lastresult$" to be set, though the
values stored in application.lastresult$ are platform dependent.
In addition, the existing values of field variables are not
affected by a &lt;nomatch&gt;. In contrast, a
&lt;noinput&gt; event does not change the value of
"application.lastresult$". After the value of
"application.lastresult$" is set, the value persists
(unless it is modified by the application) until the
browser enters the next waiting state, when it is set to
<i>undefined.</i> Similarly, when an application root document
is loaded, this variable is set to the value <i>undefined</i>.
The variable application.lastresult$ and all of its
components are writeable and can be modified by the
application.</p>
</dd>
</dl>

<p>The following example shows how application.lastresult$ can be
used in a field level &lt;catch&gt; to access a &lt;link&gt;
grammar recognition result and transition to different dialog
states depending on confidence:</p>

<pre class="example" xml:space="preserve">
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;link event="menulinkevent"&gt;
    &lt;grammar src="/grammars/linkgrammar.grxml" type="application/srgs+xml"/&gt;
&lt;/link&gt;

&lt;form&gt;
    &lt;field&gt;
        &lt;prompt&gt; Say something &lt;/prompt&gt; 
        &lt;catch event="menulinkevent"&gt;
           &lt;if cond="application.lastresult$.confidence &amp;lt; 0.7"&gt;
              &lt;goto nextitem="confirmlinkdialog"/&gt;
           &lt;else/&gt;
              &lt;goto next="./main_menu.html"/&gt;
           &lt;/if&gt;
        &lt;/catch&gt;
    &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>The final example demonstrates how a script can be used to
iterate over the array of results in application.lastresult$,
where each element is represented by
"application.lastresult$[i]":</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
 &lt;form&gt;
    &lt;field name="color"&gt;
        &lt;prompt&gt; Say a color &lt;/prompt&gt;
    &lt;grammar type="application/srgs+xml" src="color.grxml" /&gt; 
        &lt;filled&gt;
        &lt;var name="confident_count" expr="0"/&gt;
            &lt;script&gt;
            &lt;![CDATA[ 
        // number of results 
         var len = application.lastresult$.length;

         // iterate through array
         for (var i = 0; i &lt; len; i++) {
           // check if DTMF 
           if (application.lastresult$[i].confidence &gt; .7) {
             confident_count++;
           }
         }
        ]]&gt;
        &lt;/script&gt;
        &lt;if cond="confident_count &gt; 1"&gt;
           &lt;goto next="#verify"/&gt;
        &lt;/if&gt;   
    &lt;/filled&gt;
    &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<h2 id="L6660"><a id="dml5.2" name="dml5.2" shape="rect">5.2
Event Handling</a></h2>

<p>The platform throws events when the user does not respond,
doesn't respond in a way that the application understands,
requests help, etc. The interpreter throws events if it finds
a semantic error in a VoiceXML document, or when it encounters
a &lt;throw&gt; element. Events are identified by character
strings.</p>

<p>Each element in which an event can occur has a set of <i>catch
elements</i>, which include:</p>

<ul>
<li>
<p>&lt;catch&gt;</p>
</li>

<li>
<p>&lt;error&gt;</p>
</li>

<li>
<p>&lt;help&gt;</p>
</li>

<li>
<p>&lt;noinput&gt;</p>
</li>

<li>
<p>&lt;nomatch&gt;</p>
</li>
</ul>

<p>An element inherits the catch elements ("as if by copy") from
each of its ancestor elements, as needed. If a field, for
example, does not contain a catch element for nomatch, but its
form does, the form's nomatch catch element is used. In
this way, common event handling behavior can be specified at any
level, and it applies to all descendents.</p>

<p>The "as if by copy" semantics for inheriting catch elements
implies that when a catch element is executed, variables are
resolved and thrown events are handled relative to the scope
where the original event originated, not relative to the scope
that contains the catch element. For example, consider a catch
element that is defined at document scope handling an event that
originated in a &lt;field&gt; within the document. In such a
catch element variable references are resolved relative to the
&lt;field&gt;'s scope, and if an event is thrown by the catch
element it is handled relative to the &lt;field&gt;. Similarly,
relative URI references in a catch element are resolved against
the active document and not relative to the document in which
they were declared. Finally, properties are resolved relative to
the element where the event originated. For example, a prompt
element defined as part of a document level catch would use the
innermost property value of the active form item to resolve its
timeout attribute if no value is explicitly specified.</p>

<h3 id="L6692"><a id="dml5.2.1" name="dml5.2.1"
shape="rect">5.2.1 throw element</a></h3>

<p>The &lt;throw&gt; element throws an event. These can be the
pre-defined ones:</p>

<pre class="example" xml:space="preserve">
&lt;throw event="nomatch"/&gt; 
&lt;throw event="connection.disconnect.hangup"/&gt;
</pre>

<p>or application-defined events:</p>

<pre class="example" xml:space="preserve">
&lt;throw event="com.att.portal.machine"/&gt;
</pre>

<p>Attributes of &lt;throw&gt; are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 41: throw attributes">
<caption align="bottom">Table 41: &lt;throw&gt;
Attributes</caption>

<tbody>
<tr>
<th>event</th>
<td>The event being thrown.</td>
</tr>

<tr>
<th>eventexpr</th>
<td>An ECMAScript expression evaluating
to the name of the event being thrown.</td>
</tr>

<tr>
<th>message</th>
<td>A message string providing additional
context about the event being thrown. For the pre-defined events
thrown by the platform, the value of the message is
platform-dependent.<br />
The message is available as the value of a variable within the
scope of the catch element, see below.</td>
</tr>

<tr>
<th>messageexpr</th>
<td>An ECMAScript expression evaluating
to the message string.</td>
</tr>
</tbody>
</table>

<p>Exactly one of "event" or "eventexpr" must be specified;
otherwise, an error.badfetch event is thrown. Exactly one of
"message" or "messageexpr" may be specified; otherwise, an
error.badfetch event is thrown.</p>

<p>Unless explicited stated otherwise, VoiceXML does not specify
when events are thrown.</p>

<h3 id="L6748"><a id="dml5.2.2" name="dml5.2.2"
shape="rect">5.2.2 catch element</a></h3>

<p>The catch element associates a catch with a document, dialog,
or form item (except for blocks). It contains executable
content.</p>

<pre class="example" xml:space="preserve">
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="launch_missiles"&gt;
  &lt;field name="user_id" type="digits"&gt; 
    &lt;prompt&gt;What is your username&lt;/prompt&gt; 
  &lt;/field&gt;
  &lt;field name="password"&gt; 
    &lt;prompt&gt;What is the code word?&lt;/prompt&gt; 
    &lt;grammar version="1.0" root="root"&gt;
     &lt;rule id="root" scope="public"&gt;rutabaga&lt;/rule&gt;
    &lt;/grammar&gt;
   &lt;help&gt;It is the name of an obscure vegetable.&lt;/help&gt; 
   &lt;catch event="nomatch noinput" count="3"&gt; 
     &lt;prompt&gt;Security violation!&lt;/prompt&gt; 
     &lt;submit next="http://www.example.com/apprehend_felon.vxml" 
                namelist="user_id"/&gt; 
   &lt;/catch&gt; 
  &lt;/field&gt; 
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>The catch element's anonymous variable scope includes the
special variable _event which contains the name of the event that
was thrown. For example, the following catch element can handle
two types of events:</p>

<pre class="example" xml:space="preserve">
&lt;catch event="event.foo event.bar"&gt;
  &lt;if cond="_event=='event.foo'"&gt;
    &lt;!-- Play this for event.foo events --&gt;
    &lt;audio src="foo.wav"/&gt;
  &lt;else/&gt;
    &lt;!-- Play this for event.bar events --&gt;
    &lt;audio src="bar.wav"/&gt;
  &lt;/if&gt;
  &lt;!-- Continue with common handling for either event --&gt;
&lt;/catch&gt;
</pre>

<p>The _event variable is inspected to select the audio to play
based on the event that was thrown. The foo.wav file will be
played for event.foo events. The bar.wav file will be played for
event.bar events. The remainder of the catch element contains
executable content that is common to the handling of both event
types.</p>

<p>The catch element's anonymous variable scope also includes the
special variable _message which contains the value of the message
string from the corresponding &lt;throw&gt; element, or a
platform-dependent value for the pre-defined events raised by the
platform. If the thrown event does not specify a message, the
value of _message is ECMAScript undefined.</p>

<p>If a &lt;catch&gt; element contains a &lt;throw&gt; element
with the same event, then there may be an infinite loop:</p>

<pre class="example" xml:space="preserve">
&lt;catch event="help"&gt; 
   &lt;throw event="help"/&gt; 
&lt;/catch&gt;
</pre>

<p>A platform could detect this situation and throw a semantic
error instead.</p>

<p>Attributes of &lt;catch&gt; are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 42: catch attributes">
<caption align="bottom">Table 42: &lt;catch&gt;
Attributes</caption>

<tbody>
<tr>
<th>event</th>
<td>The event or events to catch. A
space-separated list of events may be specified, indicating that
this &lt;catch&gt; element catches all the events named in the
list. In such a case a separate event counter (see "count"
attribute) is maintained for each event. If the attribute is
unspecified, all events are to be caught.</td>
</tr>

<tr>
<th>count</th>
<td>The occurrence of the event (default
is 1). The count allows you to handle different occurrences of
the same event differently. 

<p>Each &lt;form&gt;, &lt;menu&gt;, and form item maintains a
counter for each event that occurs while it is being visited.
Item-level event counters are used for events thrown while
visiting individual form items and while executing &lt;filled&gt;
elements contained within those items. Form-level and menu-level
counters are used for events thrown during dialog initialization
and while executing form-level &lt;filled&gt; elements.</p>

<p>Form-level and menu-level event counters are reset each time
the &lt;menu&gt; or &lt;form&gt; is re-entered. Form-level and
menu-level event counters are not reset by the &lt;clear&gt;
element.</p>

<p>Item-level event counters are reset each time the &lt;form&gt;
containing the item is re-entered. Item-level event counters are
also reset when the item is reset with the &lt;clear&gt; element.
An item's event counters are not reset when the item is
re-entered without leaving the &lt;form&gt;.</p>

<p>Counters are incremented against the full event name and every
prefix matching event name; for example, occurrence of the event
"event.foo.1" increments the counters for "event.foo.1" plus
"event.foo" and "event".</p>
</td>
</tr>

<tr>
<th>cond</th>
<td>An expression which must evaluate to
true after conversion to boolean in order for the event to be
caught. Defaults to true.</td>
</tr>
</tbody>
</table>

<h3 id="L6808"><a id="dml5.2.3" name="dml5.2.3"
shape="rect">5.2.3 Shorthand Notation</a></h3>

<p>The &lt;error&gt;, &lt;help&gt;, &lt;noinput&gt;, and
&lt;nomatch&gt; elements are shorthands for very common types of
&lt;catch&gt; elements.</p>

<p>The &lt;error&gt; element is short for &lt;catch
event="error"&gt; and catches all events of type error:</p>

<pre class="example" xml:space="preserve">
&lt;error&gt;
  An error has occurred -- please call again later.
  &lt;exit/&gt;
&lt;/error&gt;
</pre>

<p>The &lt;help&gt; element is an abbreviation for &lt;catch
event="help"&gt;:</p>

<pre class="example" xml:space="preserve">
&lt;help&gt;No help is available.&lt;/help&gt;
</pre>

<p>The &lt;noinput&gt; element abbreviates &lt;catch
event="noinput"&gt;:</p>

<pre class="example" xml:space="preserve">
&lt;noinput&gt;I didn't hear anything, please try again.&lt;/noinput&gt;
</pre>

<p>And the &lt;nomatch&gt; element is short for &lt;catch
event="nomatch"&gt;:</p>

<pre class="example" xml:space="preserve">
&lt;nomatch&gt;I heard something, but it wasn't a known city.&lt;/nomatch&gt;
</pre>

<p>These elements take the attributes:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 43: shorthand catch attributes">
<caption align="bottom">Table 43: Shorthand Catch
Attributes</caption>

<tbody>
<tr>
<th>count</th>
<td>The event count (as in
&lt;catch&gt;).</td>
</tr>

<tr>
<th>cond</th>
<td>An optional condition to test to see
if the event is caught by this element (as in &lt;catch&gt;
described in <a href="#dml5.2.2" shape="rect">Section 5.2.2</a>).
Defaults to true.</td>
</tr>
</tbody>
</table>

<h3 id="L6855"><a id="dml5.2.4" name="dml5.2.4"
shape="rect">5.2.4 catch element selection</a></h3>

<p>An element inherits the catch elements ("as if by copy") from
each of its ancestor elements, as needed. For example, if a
&lt;field&gt; element inherits a &lt;catch&gt; element from the
document</p>

<pre class="example" xml:space="preserve">
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;catch event="event.foo"&gt;
    &lt;audio src="beep.wav"/&gt;
&lt;/catch&gt;

&lt;form&gt;
    &lt;field name="color"&gt;
        &lt;prompt&gt;Please say a primary color&lt;/prompt&gt;
    &lt;grammar type="application/srgs"&gt;red | yellow | blue&lt;/grammar&gt;
        &lt;nomatch&gt;
            &lt;throw event="event.foo"/&gt;
        &lt;/nomatch&gt;
    &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>then the &lt;catch&gt; element is implicitly copied into
&lt;field&gt; as if defined below:</p>

<pre class="example" xml:space="preserve">
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form&gt;
    &lt;field&gt;
        &lt;prompt&gt;Please say a primary color&lt;/prompt&gt;
    &lt;grammar type="application/srgs"&gt;red | yellow | blue&lt;/grammar&gt;
        &lt;nomatch&gt;
            &lt;throw event="event.foo"/&gt;
        &lt;/nomatch&gt;
        &lt;catch event="event.foo"&gt;
            &lt;audio src="beep.wav"/&gt;
        &lt;/catch&gt;
    &lt;/field&gt;
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>When an event is thrown, the scope in which the event is
handled and its enclosing scopes are examined to find the <i>best
qualified</i> catch element, according to the following
algorithm:</p>

<ol>
<li>Form an ordered list of catches consisting of all catches in
the current scope and all enclosing scopes (form item, form,
document, application root document, interpreter context),
ordered first by scope (starting with the current scope), and
then within each scope by document order.</li>

<li>Remove from this list all catches whose event name does not
match the event being thrown or whose cond evaluates to false
after conversion to boolean.</li>

<li>Find the "correct count": the highest count among the catch
elements still on the list less than or equal to the current
count value.</li>

<li>Select the first element in the list with the "correct
count".</li>
</ol>

<p>The name of a thrown event matches the catch element event
name if it is an exact match, a prefix match or if the catch
event attribute is not specified (note that the event attribute
cannot be specified as an empty string - event="" is syntactically
invalid). A prefix match occurs when the catch element event
attribute is a token prefix of the name of the event being thrown,
where the dot is the token separator, all trailing dots are
removed, and a remaining empty string matches everything. For
example,</p>

<pre class="example" xml:space="preserve">
&lt;catch event="connection.disconnect"&gt;
   &lt;prompt&gt;Caught a connection dot disconnect event&lt;/prompt&gt;
&lt;/catch&gt;
</pre>

<p>will prefix match the event
connection.disconnect.transfer.</p>

<pre class="example" xml:space="preserve">
&lt;catch event="com.example.myevent"&gt;
   &lt;prompt&gt;Caught a com dot example dot my event&lt;/prompt&gt;
&lt;/catch&gt;
</pre>

<p>prefix matches com.example.myevent.event1.,
com.example.myevent. and com.example.myevent..event1 but not
com.example.myevents.event1. Finally,</p>

<pre class="example" xml:space="preserve">
&lt;catch event="."&gt;
   &lt;prompt&gt;Caught an event&lt;/prompt&gt;
&lt;/catch&gt;
</pre>

<p>prefix matches all events (as does &lt;catch&gt; without an
event attribute).</p>

<p>Note that the catch element selection algorithm gives priority
to catch elements that occur earlier in a document over those
that occur later, but does not give priority to catch elements
that are more specific over those that are less specific.
Therefore is generally advisable to specify catch elements in
order from more specific to less specific. For example, it would
be advisable to specify catch elements for "error.foo" and
"error" in that order, as follows:</p>

<pre class="example" xml:space="preserve">
&lt;catch event="error.foo"&gt; 
  &lt;prompt&gt;Caught an error dot foo event&lt;/prompt&gt;
&lt;/catch&gt; 
&lt;catch event="error"&gt; 
  &lt;prompt&gt;Caught an error event&lt;/prompt&gt; 
&lt;/catch&gt;
</pre>

<p>If the catch elements were specified in the opposite order,
the catch element for "error.foo" would never be executed.</p>

<h3 id="L6904"><a id="dml5.2.5" name="dml5.2.5"
shape="rect">5.2.5 Default catch elements</a></h3>

<p>The interpreter is expected to provide implicit default catch
handlers for the noinput, help, nomatch, cancel, exit, and error
events if the author did not specify them.</p>

<p>The system default behavior of catch handlers for various
events and errors is summarized by the definitions below that
specify (1) whether any audio response is to be provided, and (2)
how execution is affected. Note: where an audio response is
provided, the actual content is platform dependent.</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 44: default catch handlers">
<caption align="bottom">Table 44: Default Catch
Handlers</caption>

<tbody>
<tr align="left">
<th><b>Event Type</b> </th>
<th>Audio Provided</th>
<th>Action</th>
</tr>

<tr>
<td><b>cancel</b> </td>
<td>no</td>
<td>don't reprompt</td>
</tr>

<tr class="stripe">
<td><b>error</b> </td>
<td>yes</td>
<td>exit interpreter</td>
</tr>

<tr>
<td><b>exit</b> </td>
<td>no</td>
<td>exit interpreter</td>
</tr>

<tr class="stripe">
<td><b>help</b> </td>
<td>yes</td>
<td>reprompt</td>
</tr>

<tr>
<td><b>noinput</b> </td>
<td>no</td>
<td>reprompt</td>
</tr>

<tr class="stripe">
<td><b>nomatch</b> </td>
<td>yes</td>
<td>reprompt</td>
</tr>

<tr>
<td><b>maxspeechtimeout</b> </td>
<td>yes</td>
<td>reprompt</td>
</tr>

<tr>
<td><b>connection.disconnect</b> </td>
<td>no</td>
<td>exit interpreter</td>
</tr>

<tr class="stripe">
<td>all others</td>
<td>yes</td>
<td>exit interpreter</td>
</tr>
</tbody>
</table>

<p>Specific platforms will differ in the default prompts
presented.</p>

<h3 id="L7036"><a id="dml5.2.6" name="dml5.2.6"
shape="rect">5.2.6 Event Types</a></h3>

<p>There are pre-defined events, and application and
platform-specific events. Events are also subdivided into plain
events (things that happen normally), and error events (abnormal
occurrences). The error naming convention allows for multiple
levels of granularity.</p>

<p>A conforming browser may throw an event that extends a
pre-defined event string so long as the event contains the
specified pre-defined event string as a dot-separated exact
initial substring of its event name. Applications that write
catch handlers for the pre-defined events will be interoperable.
Applications that write catch handlers for extended event names
are not guaranteed interoperability. For example, if in loading a
grammar file a syntax error is detected the platform must throw
"error.badfetch". Throwing "error.badfetch.grammar.syntax" is an
acceptable implementation.</p>

<p>Components of event names in italics are to be substituted
with the relevant information; for example, in
error.unsupported.<i>element</i>, <i>element</i> is substituted
with the name of VoiceXML element which is not supported such as
error.unsupported.transfer. All other event name components are
fixed.</p>

<p>Further information about an event may be specified in the
"_message" variable (see <a href="#dml5.2.2" shape="rect">Section
5.2.2</a>).</p>

<p>The pre-defined events are:</p>

<dl>
<dt><b>cancel</b></dt>

<dd>The user has requested to cancel playing of the current
prompt.</dd>

<dt><b>connection.disconnect.hangup</b></dt>

<dd>The user has hung up.</dd>

<dt><b>connection.disconnect.transfer</b></dt>

<dd>The user has been transferred unconditionally to another line
and will not return.</dd>

<dt><b>exit</b></dt>

<dd>The user has asked to exit.</dd>

<dt><b>help</b></dt>

<dd>The user has asked for help.</dd>

<dt><b>noinput</b></dt>

<dd>The user has not responded within the timeout interval.</dd>

<dt><b>nomatch</b></dt>

<dd>The user input something, but it was not recognized.</dd>

<dt><b>maxspeechtimeout</b></dt>

<dd>The user input was too long exceeding the 'maxspeechtimeout'
property.</dd>
</dl>

<p>In addition to transfer errors (<a href="#dml2.3.7.3"
shape="rect">Section 2.3.7.3</a>), the pre-defined errors
are:</p>

<dl>
<dt><b>error.badfetch</b></dt>

<dd>The interpreter context throws this event when a fetch of a
document has failed <i>and</i> the interpreter context has
reached a place in the document interpretation where the fetch
result is required. Fetch failures result from unsupported scheme
references, malformed URIs, client aborts, communication errors,
timeouts, security violations, unsupported resource types,
resource type mismatches, document parse errors, and a variety of
errors represented by scheme-specific error codes.</dd>

<dd>If the interpreter context has speculatively prefetched a
document and that document turns out not to be needed,
error.badfetch is not thrown.&#160; Likewise if the fetch of an
&lt;audio&gt; document fails and if there is a nested alternate
&lt;audio&gt; document whose fetch then succeeds, or if there is
nested alternate text, no error.badfetch occurs.</dd>

<dd>When an interpreter context is transitioning to a new
document, the interpreter context throws error.badfetch on an
error until the interpreter is capable of executing the new
document, but again only at the point in time where the new
document is actually needed, not before. Whether or not variable
initialization is considered part of executing the new document
is platform-dependent.</dd>

<dt><b>error.badfetch.http.<i>response_code</i></b><br
clear="none" />
 <b>error.badfetch.<i>protocol.response_code</i></b></dt>

<dd>In the case of a fetch failure, the interpreter context must
use a detailed event type telling which specific HTTP or other
protocol-specific response code was encountered. The value of the
response code for HTTP is defined in <a href="#ref_RFC2616"
shape="rect">[RFC2616]</a>. This allows applications to
differentially treat a missing document from a prohibited
document, for instance. The value of the response code for other
protocols (such as HTTPS, RTSP, and so on) is dependent upon the
protocol.</dd>

<dt><b>error.semantic</b></dt>

<dd>A run-time error was found in the VoiceXML document, e.g.
substring bounds error, or an undefined variable was
referenced.</dd>

<dt><b>error.noauthorization</b></dt>

<dd>Thrown when the application tries to perform an
operation that is not authorized by the platform. Examples would
include dialing an invalid telephone number or one which the user
is not allowed to call, attempting to access a protected database
via a platform-specific &lt;object&gt;, inappropriate access to
builtin grammars, etc.</dd>

<dt><b>error.noresource</b></dt>

<dd>A run-time error occurred because a requested platform
resource was not available during execution.</dd>

<dt><b>error.unsupported.builtin</b></dt>

<dd>The platform does not support a requested builtin
type/grammar.</dd>

<dt><b>error.unsupported.format</b></dt>

<dd>The requested resource has a format that is not supported by
the platform, e.g. an unsupported grammar format, or media
type.</dd>

<dt><b>error.unsupported.language</b></dt>

<dd>The platform does not support the language for either speech
synthesis or speech recognition.</dd>

<dt><b>error.unsupported.objectname</b></dt>

<dd>The platform does not support a particular platform-specific
object. Note that 'objectname' is a fixed string and is not
substituted with the name of the unsupported object.</dd>

<dt><b>error.unsupported.<i>element</i></b></dt>

<dd>The platform does not support the given <i>element</i>,
where <i>element</i> is a VoiceXML element defined in this
specification. For instance, if a platform does not implement
&lt;transfer&gt;, it must throw error.unsupported.transfer.
This allows an author to use event handling to adapt to
different platform capabilities.</dd>
</dl>

<p>Errors encountered during document loading, including
transport errors (no document found, HTTP status code 404, and so
on) and syntactic errors (no &lt;vxml&gt; element, etc) result in
a badfetch error event raised in the calling document. Errors
that occur after loading and before entering the initialization
phase of the Form Interpretation Algorithm are handled in a
platform-specific manner. Errors that occur after entering the
FIA initialization phase, such as semantic errors, are raised in
the new document. The handling of errors encountered during the
loading of the first document in a session is
platform-specific.</p>

<p>Application-specific and platform-specific event types should
use the reversed Internet domain name convention to avoid naming
conflicts. For example:</p>

<dl>
<dt><b>error.com.example.voiceplatform.noauth</b></dt>

<dd>The user is not authorized to dial out on this platform.</dd>

<dt><b>org.example.voice.someapplication.toomanynoinputs</b></dt>

<dd>The user is far too quiet.</dd>
</dl>

<p>Catches can catch specific events (cancel) or all those
sharing a prefix (error.unsupported).</p>

<h2 id="L7193"><a id="dml5.3" name="dml5.3" shape="rect">5.3
Executable Content</a></h2>

<p><i>Executable content</i> refers to a block of procedural
logic. Such logic appears in:</p>

<ul>
<li>
<p>The &lt;block&gt; form item.</p>
</li>

<li>
<p>The &lt;filled&gt; actions in forms and input items.</p>
</li>

<li>
<p>Event handlers (&lt;catch&gt;, &lt;help&gt;, et cetera).</p>
</li>
</ul>

<p>Executable elements are executed in document order in their
block of procedural logic. If an executable element generates an
error, that error is thrown immediately. Subsequent executable
elements in that block of procedural logic are not executed.</p>

<p>This section covers the elements that can occur in executable
content.</p>

<h3 id="L7212"><a id="dml5.3.1" name="dml5.3.1"
shape="rect">5.3.1 var element</a></h3>

<p>This element declares a variable. It can occur in executable
content or as a child of &lt;form&gt; or &lt;vxml&gt;.
Examples:</p>

<pre class="example" xml:space="preserve">
&lt;var name="phone" expr="'6305551212'"/&gt; 
&lt;var name="y" expr="document.z+1"/&gt;
</pre>

<p>If it occurs in executable content, it declares a variable in
the anonymous scope associated with the enclosing &lt;block&gt;,
&lt;filled&gt;, or catch element. This declaration is made only
when the &lt;var&gt; element is executed. If the variable is
already declared in this scope, subsequent declarations act as
assignments, as in ECMAScript.</p>

<p>If a &lt;var&gt; is a child of a &lt;form&gt; element, it
declares a variable in the dialog scope of the &lt;form&gt;. This
declaration is made during the form's initialization phase
as described in <a href="#dml2.1.6.1" shape="rect">Section
2.1.6.1</a>. The &lt;var&gt; element is not a form item, and so
is not visited by the Form Interpretation Algorithm's main
loop.</p>

<p>If a &lt;var&gt; is a child of a &lt;vxml&gt; element, it
declares a variable in the document scope; and if it is the
child of a &lt;vxml&gt; element in a root document then it also
declares the variable in the application scope. This declaration
is made when the document is initialized; initializations happen
in document order.</p>

<p>Attributes of &lt;var&gt; include:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 45: var attributes">
<caption align="bottom">Table 45: &lt;var&gt;
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>The name of the variable that will
hold the result. Unlike the name attribute of &lt;assign&gt;
element (<a shape="rect" href="#dml5.3.2">Section 5.3.2</a>),
this attribute must not specify a variable with a scope prefix
(if a variable is specified with a scope prefix, then an
error.semantic event is thrown). The scope in which the variable
is defined is determined from the position in the document at
which the element is declared.</td>
</tr>

<tr>
<th>expr</th>
<td>The initial value of the variable
(optional). If there is no expr attribute, the variable retains
its current value, if any. Variables start out with the
ECMAScript value undefined if they are not given initial
values.</td>
</tr>
</tbody>
</table>

<h3 id="L7255"><a id="dml5.3.2" name="dml5.3.2"
shape="rect">5.3.2 assign element</a></h3>

<p>The &lt;assign&gt; element assigns a value to a variable:</p>

<pre class="example" xml:space="preserve">
&lt;assign name="flavor" expr="'chocolate'"/&gt; 
&lt;assign name="document.mycost" expr="document.mycost+14"/&gt;
</pre>

<p>It is illegal to make an assignment to a variable that has not
been explicitly declared using a &lt;var&gt; element or a var
statement within a &lt;script&gt;. Attempting to assign to an
undeclared variable causes an error.semantic event to be
thrown.</p>

<p>Note that when an ECMAScript object, e.g. "obj", has been
properly initialized then its properties, for instance
"obj.prop1", can be assigned without explicit declaration (in
fact, an attempt to declare ECMAScript object properties such as
"obj.prop1" would result in an error.semantic event being
thrown).</p>

<p>Attributes include:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 46 assign attributes">
<caption align="bottom">Table 46: &lt;assign&gt;
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>The name of the variable being
assigned to. As specified in <a shape="rect"
href="#dml5.1.2">Section 5.1.2</a>, the corresponding variable
must have been previously declared otherwise an error.semantic
event is thrown. By default, the scope in which the variable is
resolved is the closest enclosing scope of the currently active
element. To remove ambiguity, the variable name may be prefixed
with a scope name as described in <a shape="rect"
href="#dml5.1.3">Section 5.1.3</a>.</td>
</tr>

<tr>
<th>expr</th>
<td>The new value of the variable.</td>
</tr>
</tbody>
</table>

<h3 id="L7288"><a id="dml5.3.3" name="dml5.3.3"
shape="rect">5.3.3 clear element</a></h3>

<p>The &lt;clear&gt; element resets one or more variables,
including form items. For each specified variable name, the
variable is resolved relative to the current scope according to
<a href="#dml5.1.3" shape="rect">Section 5.1.3</a> (to remove
ambiguity, each variable name in the namelist may be prefixed
with a scope name). Once a declared variable has been identified,
its value is assigned the ECMAScript undefined value. In
addition, if the variable name corresponds to a form item, then
the form item's prompt counter and event counters are
reset.</p>

<p>For example:</p>

<pre class="example" xml:space="preserve">
&lt;clear namelist="city state zip"/&gt;
</pre>

<p>The attribute is:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 47: clear attributes">
<caption align="bottom">Table 47: &lt;clear&gt;
Attributes</caption>

<tbody>
<tr>
<th>namelist</th>
<td>The list of variables to be reset;
this can include variable names other than form items. If an
undeclared variable is referenced in the namelist, then an
error.semantic is thrown (<a href="#dml5.1.1"
shape="rect">Section 5.1.1</a>). When not specified, all
form items in the current form are cleared.</td>
</tr>
</tbody>
</table>

<h3 id="L7320"><a id="dml5.3.4" name="dml5.3.4"
shape="rect">5.3.4 if, elseif, else elements</a></h3>

<p>The &lt;if&gt; element is used for conditional logic. It has
optional &lt;else&gt; and &lt;elseif&gt; elements.</p>

<pre class="example" xml:space="preserve">
&lt;if cond="total &gt; 1000"&gt; 
  &lt;prompt&gt;This is way too much to spend.&lt;/prompt&gt; 
  &lt;throw event="com.xyzcorp.acct.toomuchspent"/&gt; 
&lt;/if&gt; 

&lt;if cond="amount &amp;lt; 29.95"&gt; 
  &lt;assign name="x" expr="amount"/&gt; 
&lt;else/&gt; 
  &lt;assign name="x" expr="29.95"/&gt; 
&lt;/if&gt; 

&lt;if cond="flavor == 'vanilla'"&gt; 
  &lt;assign name="flavor_code" expr="'v'"/&gt; 
&lt;elseif cond="flavor == 'chocolate'"/&gt; 
  &lt;assign name="flavor_code" expr="'h'"/&gt; 
&lt;elseif cond="flavor == 'strawberry'"/&gt; 
  &lt;assign name="flavor_code" expr="'b'"/&gt; 
&lt;else/&gt; 
  &lt;assign name="flavor_code" expr="'?'"/&gt; 
&lt;/if&gt;
</pre>

<h3 id="L7327"><a id="dml5.3.5" name="dml5.3.5"
shape="rect">5.3.5 prompts</a></h3>

<p>Prompts can appear in executable content, in their full
generality, except that the &lt;prompt&gt; count attribute is
meaningless. In particular, the cond attribute can be used in
executable content. Prompts may be wrapped with &lt;prompt&gt;
and &lt;/prompt&gt;, or represented using PCDATA. Wherever
&lt;prompt&gt; is allowed, the PCDATA <i>xyz</i> is interpreted
exactly as if it had appeared as
&lt;prompt&gt;<i>xyz&lt;</i>/prompt&gt;.</p>

<pre class="example" xml:space="preserve">
&lt;nomatch count="1"&gt; 
  To open the pod bay door, say your code phrase clearly. 
&lt;/nomatch&gt; 

&lt;nomatch count="2"&gt; 
  &lt;prompt&gt;
    This is your &lt;emphasis&gt;last&lt;/emphasis&gt; chance.
  &lt;/prompt&gt; 
&lt;/nomatch&gt; 

&lt;nomatch count="3"&gt; 
  Entrance denied. 
  &lt;exit/&gt; 
&lt;/nomatch&gt;
</pre>

<h3 id="L7340"><a id="dml5.3.6" name="dml5.3.6"
shape="rect">5.3.6 reprompt element</a></h3>

<p>The FIA expects a catch element to queue appropriate prompts
in the course of handling an event. Therefore, the FIA does not
generally perform the normal selection and queuing of prompts on
the next iteration following the execution of a catch element.
However, the FIA does perform normal selection and queueing of
prompts after the execution of a catch element (&lt;catch&gt;,
&lt;error&gt;, &lt;help&gt;, &lt;noinput&gt;, &lt;nomatch&gt;) in
two cases:</p>

<ul>
<li>if the catch element ends by executing a &lt;goto&gt; or
&lt;submit&gt; to another dialog, or if it ends with a
&lt;return&gt; from a subdialog; in this case the new dialog
needs to be guaranteed that its initial prompt remains intact and
cannot be suppressed or replaced by a referring dialog; or</li>

<li>if a &lt;reprompt&gt; is executed in the catch to request
that the subsequent prompts be played.</li>
</ul>

<p>In these two cases, after the FIA selects the next form item
to visit, it performs normal prompt processing, including
selecting and queuing the form item's prompts and incrementing
the form item's prompt counter.</p>

<p>For example, this noinput catch expects the next form item
prompt to be selected and played:</p>

<pre class="example" xml:space="preserve">
&lt;field name="want_ice_cream"&gt; 
  &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
  &lt;prompt&gt;Do you want ice cream for dessert?&lt;/prompt&gt; 
  &lt;prompt count="2"&gt; 
    If you want ice cream, say yes. 
    If you do not want ice cream, say no. 
  &lt;/prompt&gt; 
  &lt;noinput&gt; 
    I could not hear you. 
    &lt;!-- Cause the next prompt to be selected and played. --&gt; 
    &lt;reprompt/&gt;
  &lt;/noinput&gt; 
&lt;/field&gt;
</pre>

<p>A quiet user would hear:</p>

<blockquote>
<p>C: Do you want ice cream for dessert?</p>

<p>H: <span class="stage">(silence)</span></p>

<p>C: I could not hear you.</p>

<p>C: If you want ice cream, say yes. If you don't want ice
cream, say no.</p>

<p>H: <span class="stage">(silence)</span></p>

<p>C: I could not hear you.</p>

<p>C: If you want ice cream, say yes. If you don't want ice
cream, say no.</p>

<p>H: No</p>
</blockquote>

<p>If there were no &lt;reprompt&gt;, the user would instead
hear:</p>

<blockquote>
<p>C: Do you want ice cream for dessert?</p>

<p>H: <span class="stage">(silence)</span></p>

<p>C: I could not hear you.</p>

<p>H: <span class="stage">(silence)</span></p>

<p>C: I could not hear you.</p>

<p>H: No</p>
</blockquote>

<p>Note that a consequence of skipping the prompt selection phase
as described above is that the prompt counter of the form item
selected by the FIA after the execution of a catch element (that
does not execute a &lt;reprompt&gt;, or leave the dialog via
&lt;goto&gt;, &lt;submit&gt; or &lt;return&gt;) will not be
incremented.</p>

<p>Also note that the prompt selection phase following the
execution of a catch element (that does not execute a
&lt;reprompt&gt; or leave the dialog via &lt;goto&gt;,
&lt;submit&gt; or &lt;return&gt;) is skipped even if the form
item selected by the FIA is different from the previous form
item.</p>

<p>The &lt;reprompt&gt; element has no effect outside of a
catch.</p>

<h3 id="L7410"><a id="dml5.3.7" name="dml5.3.7"
shape="rect">5.3.7 goto element</a></h3>

<p>The &lt;goto&gt; element is used to:</p>

<ul>
<li>
<p>transition to another form item in the current form,</p>
</li>

<li>
<p>transition to another dialog in the current document, or</p>
</li>

<li>
<p>transition to another document.</p>
</li>
</ul>

<p>To transition to another form item, use the nextitem
attribute, or the expritem attribute if the form item name is
computed using an ECMAScript expression:</p>

<pre class="example" xml:space="preserve">
&lt;goto nextitem="ssn_confirm"/&gt; 
&lt;goto expritem="(type==12)? 'ssn_confirm' : 'reject'"/&gt;
</pre>

<p>To go to another dialog in the same document, use next (or
expr) with only a URI fragment:</p>

<pre class="example" xml:space="preserve">
&lt;goto next="#another_dialog"/&gt; 
&lt;goto expr="'#' + 'another_dialog'"/&gt;
</pre>

<p>To transition to another document, use next (or expr) with a
URI:</p>

<pre class="example" xml:space="preserve">
&lt;goto next="http://flight.example.com/reserve_seat"/&gt; 
&lt;goto next="./special_lunch#wants_vegan"/&gt;
</pre>

<p>The URI may be absolute or relative to the current document.
You may specify the starting dialog in the next document using a
fragment that corresponds to the value of the id attribute of a
dialog. If no fragment is specified, the first dialog in that
document is chosen.</p>

<p>Note that transitioning to another dialog in the current
document causes the old dialog's variables to be lost, even
in the case where a dialog is transitioning to itself.
Transitioning to another document using an absolute or relative
URI will likewise drop the old document level variables, even if
the new document is the same one that is making the transition.
However, document variables are retained when transitioning to an
empty URI reference with a fragment identifier. For example, the
following statements behave differently in a document with the
URI http://someco.example.com/index.vxml:</p>

<pre class="example" xml:space="preserve">
&lt;goto next="#foo"/&gt;

&lt;goto next="http://someco.example.com/index.vxml#foo"/&gt;
</pre>

<p>According to <a href="#ref_RFC2396"
shape="rect">[RFC2396]</a>, the fragment identifier (the part
after the '#') is not part of a URI and transitioning to empty
URI references plus fragment identifiers should never result in a
new document fetch. Therefore "#foo" in the first statement is an
empty URI reference with a fragment identifier and document
variables are retained. In the second statement "#foo" is part of
an absolute URI and the document variables are lost. If you want
data to persist across multiple documents, store data in the
application scope.</p>

<p>The dialog to transition to is specified by the URI reference
in the &lt;goto&gt;'s next or expr attribute (see <a
href="#ref_RFC2396" shape="rect">[RFC2396]</a>). If this URI
reference contains an absolute or relative URI, which may
include a query string, then that URI is fetched and the dialog
is found in the resulting document.</p>

<p>If the URI reference contains only a fragment (i.e., no
absolute or relative URI), then there is no fetch: the dialog is
found in the current document.</p>

<p>The URI reference's fragment, if any, names the dialog to
transition to. When there is no fragment, the dialog chosen is
the lexically first dialog in the document.</p>

<p>If the form item, dialog or document to transition to is not
valid (i.e. the form item, dialog or document does not exist),
an error.badfetch must be thrown. Note that for errors which occur
during a dialog or document transition, the scope in which errors
are handled is platform specific. For errors which occur
during form item transition, the event is handled in the dialog
scope.</p>

<p>Attributes of &lt;goto&gt; are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 48: goto attributes">
<caption align="bottom">Table 48: &lt;goto&gt;
Attributes</caption>

<tbody>
<tr>
<th>next</th>
<td>The URI to which to transition.</td>
</tr>

<tr>
<th>expr</th>
<td>An ECMAScript expression that yields
the URI.</td>
</tr>

<tr>
<th>nextitem</th>
<td>The name of the next form item to
visit in the current form.</td>
</tr>

<tr>
<th>expritem</th>
<td>An ECMAScript expression that yields
the name of the next form item to visit.</td>
</tr>

<tr>
<th>fetchaudio</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchaudio
property.</td>
</tr>

<tr>
<th>fetchhint</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
documentfetchhint property.</td>
</tr>

<tr>
<th>fetchtimeout</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchtimeout
property.</td>
</tr>

<tr>
<th>maxage</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the documentmaxage
property.</td>
</tr>

<tr>
<th>maxstale</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
documentmaxstale property.</td>
</tr>
</tbody>
</table>

<p>Exactly one of "next", "expr", "nextitem" or "expritem" must
be specified; otherwise, an error.badfetch event is thrown.</p>

<h3 id="L7544"><a id="dml5.3.8" name="dml5.3.8"
shape="rect">5.3.8 submit element</a></h3>

<p>The &lt;submit&gt; element is used to submit information to
the origin Web server and then transition to the document sent
back in the response. Unlike &lt;goto&gt;, it lets you submit a
list of variables to the document server via an HTTP GET or POST
request. For example, to submit a set of form items to the server
you might have:</p>

<pre class="example" xml:space="preserve">
&lt;submit next="log_request" method="post"
 namelist="name rank serial_number" 
 fetchtimeout="100s" fetchaudio="audio/brahms2.wav"/&gt;
</pre>

<p>The dialog to transition to is specified by the URI reference
in the &lt;submit&gt;'s next or expr attribute (see <a
href="#ref_RFC2396" shape="rect">[RFC2396]</a>, Section 4.2). The
URI is always fetched even if it contains just a fragment. In the
case of a fragment, the URI requested is the base URI of the
current document. This means that the following two elements have
substantially different effects:</p>

<pre class="example" xml:space="preserve">
&lt;goto next="#get_pin"/&gt;

&lt;submit next="#get_pin"/&gt;
</pre>

<p>Note that although the URI is always fetched and the resulting
document is transitioned to, some &lt;submit&gt; requests can be
satisfied by intermediate caches. This might happen, for example,
if the origin Web server provides an explicit expiration time with
the response.</p>

<p>If the dialog or document to transition to is not valid (i.e.
the dialog or document does not exist), an error.badfetch must be
thrown. Note that for errors which occur during a dialog or
document transition, the scope in which errors are handled is
platform specific.</p>

<p>Attributes of &lt;submit&gt; include:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 49: submit attributes">
<caption align="bottom">Table 49: &lt;submit&gt;
Attributes</caption>

<tbody>
<tr>
<th>next</th>
<td>The URI reference.</td>
</tr>

<tr>
<th>expr</th>
<td>Like next, except that the URI
reference is dynamically determined by evaluating the given
ECMAScript expression.</td>
</tr>

<tr>
<th>namelist</th>
<td>The list of variables to submit. By
default, all the named input item variables are submitted. If a
namelist is supplied, it may contain individual variable
references which are submitted with the same qualification used
in the namelist. Declared VoiceXML and ECMAScript variables can
be referenced. If an undeclared variable is referenced in the
namelist, then an error.semantic is thrown (<a
href="#dml5.1.1" shape="rect">Section 5.1.1</a>).</td>
</tr>

<tr>
<th>method</th>
<td>The request method: get (the default)
or post.</td>
</tr>

<tr>
<th>enctype</th>
<td>The media encoding type of the
submitted document (when the value of method is "post"). The
default is application/x-www-form-urlencoded. Interpreters must
also support multipart/form-data and may support additional
encoding types.</td>
</tr>

<tr>
<th>fetchaudio</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchaudio
property.</td>
</tr>

<tr>
<th>fetchhint</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
documentfetchhint property.</td>
</tr>

<tr>
<th>fetchtimeout</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchtimeout
property.</td>
</tr>

<tr>
<th>maxage</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the documentmaxage
property.</td>
</tr>

<tr>
<th>maxstale</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
documentmaxstale property.</td>
</tr>
</tbody>
</table>

<p>Exactly one of "next" or "expr" must be specified; otherwise,
an error.badfetch event is thrown.</p>

<p>When an ECMAScript variable is submitted to the server its
value is first converted into a string before being submitted. If
the variable is an ECMAScript Object the mechanism by which it is
submitted is not currently defined. The mechanism of ECMAScript
Object submission is reserved for future definition. Instead of
submitting ECMAScript Objects directly, the application developer
may explicitly submit properties of Object as in "date.month
date.year".</p>

<p>If a &lt;submit&gt; contains a variable which references
recorded audio but does not contain an ENCTYPE of
multipart/form-data, the behavior is not specified. It is
probably inappropriate to attempt to URL-encode large quantities
of data.</p>

<h3 id="L7652"><a id="dml5.3.9" name="dml5.3.9"
shape="rect">5.3.9 exit element</a></h3>

<p>Returns control to the interpreter context which determines
what to do next.</p>

<pre class="example" xml:space="preserve">
&lt;exit/&gt;
</pre>

<p>This element differs from &lt;return&gt; in that it terminates
all loaded documents, while &lt;return&gt; returns from a
&lt;subdialog&gt; invocation. If the &lt;subdialog&gt; caused a
new document (or application) to be invoked, then &lt;return&gt;
will cause that document to be terminated, but execution will
resume after the &lt;subdialog&gt;.</p>

<p>Note that once &lt;exit&gt; returns control to the interpreter
context, the interpreter context is free to do as it wishes. It
may play a top level menu for the user, drop the call, or
transfer the user to an operator, for example.</p>

<p>Attributes include:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 50: exit attributes">
<caption align="bottom">Table 50: &lt;exit&gt;
Attributes</caption>

<tbody>
<tr>
<th>expr</th>
<td>An ECMAScript expression that is
evaluated as the return value (e.g. "0", "'oops!'", or
"field1").</td>
</tr>

<tr>
<th>namelist</th>
<td>Variable names to be returned to
interpreter context. The default is to return no variables; this
means the interpreter context will receive an empty ECMAScript
object. If an undeclared variable is referenced in the namelist,
then an error.semantic is thrown (<a href="#dml5.1.1"
shape="rect">Section 5.1.1</a>).</td>
</tr>
</tbody>
</table>

<p>Exactly one of "expr" or "namelist" may be specified;
otherwise, an error.badfetch event is thrown.</p>

<p>The &lt;exit&gt; element does not throw an "exit" event.</p>

<h3 id="L7691"><a id="dml5.3.10" name="dml5.3.10"
shape="rect">5.3.10 return element</a></h3>

<p>Return ends execution of a subdialog and returns control and
data to a calling dialog.</p>

<p>The attributes are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 51: return attributes">
<caption align="bottom">Table 51: &lt;return&gt;
Attributes</caption>

<tbody>
<tr>
<th>event</th>
<td>Return, then throw this event.</td>
</tr>

<tr>
<th>eventexpr</th>
<td>Return, then throw the event to which
this ECMAScript expression evaluates.</td>
</tr>

<tr>
<th>message</th>
<td>A message string providing additional
context about the event being thrown. The message is available as
the value of a variable within the scope of the catch element,
see <a href="#dml5.2.2" shape="rect">Section 5.2.2</a>.</td>
</tr>

<tr>
<th>messageexpr</th>
<td>An ECMAScript expression evaluating
to the message string.</td>
</tr>

<tr>
<th>namelist</th>
<td>Variable names to be returned to
calling dialog. The default is to return no variables; this means
the caller will receive an empty ECMAScript object. If an
undeclared variable is referenced in the namelist, then an
error.semantic is thrown (<a href="#dml5.1.1"
shape="rect">Section 5.1.1</a>).</td>
</tr>
</tbody>
</table>

<p>Exactly one of "event", "eventexpr" or "namelist" may be
specified; otherwise, an error.badfetch event is thrown. Exactly
one of "message" or "messageexpr" may be specified; otherwise, an
error.badfetch event is thrown.</p>

<p>In returning from a subdialog, an event can be thrown at the
invocation point, or data is returned as an ECMAScript object
with properties corresponding to the variable specified in its
namelist. A return element that is encountered when not executing
as a subdialog throws a semantic error.</p>

<p>The example below shows an event propagated from a subdialog
to its calling dialog when the subdialog fails to obtain a
recognizable result. It also shows data returned under normal
conditions.</p>

<pre class="example" xml:space="preserve">
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form&gt; 
  &lt;subdialog name="result" src="#getssn"&gt; 
    &lt;nomatch&gt; 
      &lt;!-- a no match event that is returned by the
          subdialog indicates that a valid Social Securityy
          number could not be matched. --&gt; 
      &lt;goto next="http://myservice.example.com/ssn-problems.vxml"/&gt; 
    &lt;/nomatch&gt; 

    &lt;filled&gt; 
      &lt;submit namelist="result.ssn" 
       next="http://myservice.example.com/cgi-bin/process"/&gt; 
    &lt;/filled&gt; 
  &lt;/subdialog&gt; 
&lt;/form&gt;
&lt;form id="getssn"&gt; 
  &lt;field name="ssn"&gt; 
      &lt;grammar src="http://grammarlib/ssn.grxml" 
        type="application/srgs+xml"/&gt;
      &lt;prompt&gt; Please say Social Securityy number.&lt;/prompt&gt; 
      &lt;nomatch count="3"&gt;
        &lt;return event="nomatch"/&gt; 
      &lt;/nomatch&gt; 
      &lt;filled&gt; 
        &lt;return namelist="ssn"/&gt; 
      &lt;/filled&gt; 
  &lt;/field&gt; 
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>The subdialog event handler for &lt;nomatch&gt; is triggered
on the third failure to match; when triggered, it returns from
the subdialog, and includes the nomatch event to be thrown in the
context of the calling dialog. In this case, the calling dialog
will execute its &lt;nomatch&gt; handler, rather than the
&lt;filled&gt; element, where the resulting action is to execute
a &lt;goto&gt; element. Under normal conditions, the
&lt;filled&gt; element of the subdialog is executed after a
recognized Social Securityy number is obtained, and then this
value is returned to the calling dialog, and is accessible as
result.ssn.</p>

<h3 id="L7732"><a id="dml5.3.11" name="dml5.3.11"
shape="rect">5.3.11 disconnect element</a></h3>

<p>Causes the interpreter context to disconnect from the user. As
a result, the interpreter context will throw a
connection.disconnect.hangup event and enter the final processing
state (as described in <a shape="rect"
href="#dml1.5.4">Section 1.5.4</a>). Processing the
&lt;disconnect&gt; element will also flush the prompt queue (as
described in <a shape="rect" href="#dml4.1.8">Section
4.1.8</a>).</p>

<h3 id="L7741"><a id="dml5.3.12" name="dml5.3.12"
shape="rect">5.3.12 script element</a></h3>

<p>The &lt;script&gt; element allows the specification of a block
of client-side scripting language code, and is analogous to the
<a href="#ref_HTML" shape="rect">[HTML]</a> &lt;SCRIPT&gt;
element. For example, this document has a script that computes a
factorial.</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt; 
    &lt;script&gt; &lt;![CDATA[ 
       function factorial(n) 
       {
         return (n &lt;= 1)? 1 : n * factorial(n-1);
       } 
    ]]&gt; &lt;/script&gt; 

  &lt;form id="form"&gt; 
    &lt;field name="fact"&gt; 
      &lt;grammar type="application/srgs+xml" src="/grammars/number.grxml"/&gt;
      &lt;prompt&gt;
        Tell me a number and I'll tell you its factorial.
      &lt;/prompt&gt; 
      &lt;filled&gt; 
        &lt;prompt&gt; 
          &lt;value expr="fact"/&gt; factorial is 
          &lt;value expr="factorial(fact)"/&gt; 
        &lt;/prompt&gt; 
      &lt;/filled&gt; 
    &lt;/field&gt; 
  &lt;/form&gt; 
&lt;/vxml&gt;
</pre>

<p>A &lt;script&gt; element may occur in the &lt;vxml&gt; and
&lt;form&gt; elements, or in executable content (in
&lt;filled&gt;, &lt;if&gt;, &lt;block&gt;, &lt;catch&gt;, or the
short forms of &lt;catch&gt;). Scripts in the &lt;vxml&gt;
element are evaluated just after the document is loaded, along
with the &lt;var&gt; elements, in document order. Scripts in the
&lt;form&gt; element are evaluated in document order, along with
&lt;var&gt; elements and form item variables, each time execution
moves into the &lt;form&gt; element. A &lt;script&gt; element in
executable content is executed, like other executable elements,
as it is encountered.</p>

<p>The &lt;script&gt; element has the following attributes:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 52: script attributes">
<caption align="bottom">Table 52: &lt;script&gt;
Attributes</caption>

<tbody>
<tr>
<th>src</th>
<td>The URI specifying the location of
the script, if it is external.</td>
</tr>

<tr>
<th>charset</th>
<td>The character encoding of the script
designated by src. UTF-8 and UTF-16 encodings of ISO/IEC 10646
must be supported (as in <a href="#ref_XML"
shape="rect">[XML]</a>) and other encodings, as defined in the <a
href="#ref_IANA" shape="rect">[IANA]</a>, may be supported. The
default value is UTF-8.</td>
</tr>

<tr>
<th>fetchhint</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the
scriptfetchhint property.</td>
</tr>

<tr>
<th>fetchtimeout</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the fetchtimeout
property.</td>
</tr>

<tr>
<th>maxage</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the scriptmaxage
property.</td>
</tr>

<tr>
<th>maxstale</th>
<td>See <a href="#dml6.1"
shape="rect">Section 6.1</a>. This defaults to the scriptmaxstale
property.</td>
</tr>
</tbody>
</table>

<p>Either an "src" attribute or an inline script (but not both)
must be specified; otherwise, an error.badfetch event is
thrown.</p>

<p>The VoiceXML &lt;script&gt; element (unlike the <a
href="#ref_HTML" shape="rect">[HTML]</a> &lt;SCRIPT&gt; element)
does not have a type attribute; ECMAScript is the required
scripting language for VoiceXML.</p>

<p>Each &lt;script&gt; element is executed in the scope of its
containing element; i.e., it does not have its own scope. This
means for example that variables declared with var in the
&lt;script&gt; element are declared in the scope of the
containing element of the &lt;script&gt; element. (In ECMAScript
terminology, the "variable object" becomes the current scope of
the containing element of the &lt;script&gt; element).</p>

<p>Here is a time-telling service with a block containing a
script that initializes time variables in the dialog scope of a
form:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt; 
  &lt;form&gt; 
    &lt;var name="hours"/&gt; 
    &lt;var name="minutes"/&gt; 
    &lt;var name="seconds"/&gt; 
    &lt;block&gt; 
      &lt;script&gt; 
        var d = new Date(); 
        hours = d.getHours(); 
        minutes = d.getMinutes(); 
        seconds = d.getSeconds(); 
      &lt;/script&gt; 
    &lt;/block&gt; 
    &lt;field name="hear_another"&gt; 
      &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
      &lt;prompt&gt; 
        The time is &lt;value expr="hours"/&gt; hours, 
        &lt;value expr="minutes"/&gt; minutes, and 
        &lt;value expr="seconds"/&gt; seconds. 
      &lt;/prompt&gt; 
      &lt;prompt&gt;Do you want to hear another time?&lt;/prompt&gt; 
      &lt;filled&gt; 
        &lt;if cond="hear_another"&gt; 
          &lt;clear/&gt; 
        &lt;/if&gt; 
      &lt;/filled&gt; 
    &lt;/field&gt; 
  &lt;/form&gt; 
&lt;/vxml&gt;
</pre>

<p>The content of a &lt;script&gt; element is evaluated in the
same scope as a &lt;var&gt; element (see <a href="#dml5.1.2"
shape="rect">5.1.2 Variable Scopes</a> and <a href="#dml5.3.1"
shape="rect">5.3.1 VAR</a>).</p>

<p>The ECMAScript scope chain (see section 10.1.4 in <a
href="#ref_ECMASCRIPT" shape="rect">[ECMASCRIPT]</a>) is set up
so that variables declared either with &lt;var&gt; or inside
&lt;script&gt; are put into the scope associated with the element
in which the &lt;var&gt; or &lt;script&gt; element occurs. For
example, the variable declared in a &lt;script&gt; element under
a &lt;form&gt; element has a dialog scope, and can be accessed as
a dialog scope variable as follows:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt; 
  &lt;form&gt; 
    &lt;script&gt; 
      var now = new Date(); &lt;!-- this has a dialog scope--&gt;
    &lt;/script&gt;
    &lt;var name="seconds" expr="now.getSeconds()"/&gt; &lt;!-- this has a dialog scope--&gt;
    &lt;block&gt; 
      &lt;var name="now" expr="new Date()"/&gt; &lt;!-- this has an anonymous scope --&gt;
      &lt;script&gt; 
        var current = now.getSeconds();       &lt;!-- "now" in the anonymous scope --&gt;
        var approx = dialog.now.getSeconds(); &lt;!-- "now" in the dialog scope --&gt;
      &lt;/script&gt; 
    &lt;/block&gt; 
  &lt;/form&gt; 
&lt;/vxml&gt;
</pre>

<p>All variables must be declared before being referenced by
ECMAScript scripts, or by VoiceXML elements as described in <a
href="#dml5.1.1" shape="rect">Section 5.1.1</a>.</p>

<h3 id="L7845"><a id="dml5.3.13" name="dml5.3.13"
shape="rect">5.3.13 log element</a></h3>

<p>The &lt;log&gt; element allows an application to generate a
logging or debug message which a developer can use to help in
application development or post-execution analysis of application
performance.</p>

<p>The &lt;log&gt; element may contain any combination of text
(CDATA) and &lt;value&gt; elements. The generated message
consists of the concatenation of the text and the string form of
the value of the "expr" attribute of the &lt;value&gt;
elements.</p>

<p>The manner in which the message is displayed or logged is
platform-dependent. The usage of label is platform-dependent.
Platforms are not required to preserve white space.</p>

<p>ECMAScript expressions in &lt;log&gt; must be evaluated in
document order. The use of the &lt;log&gt; element should have no
other side-effects on interpretation.</p>

<pre class="example" xml:space="preserve">
&lt;log&gt;The card number was &lt;value expr="card_num"/&gt;&lt;/log&gt;
</pre>

<p>The &lt;log&gt; element has the following attributes:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 53: log attributes">
<caption align="bottom">Table 53: &lt;log&gt;
Attributes</caption>

<tbody>
<tr>
<th>label</th>
<td>An optional string which
may be used, for example, to indicate the purpose of the
log.</td>
</tr>

<tr>
<th>expr</th>
<td>An optional ECMAScript expression
evaluating to a string.</td>
</tr>
</tbody>
</table>

<!--- CHAPTER 5: END =-->
<!--- CHAPTER 6: BEGIN =-->
<h1 id="L7892"><a id="dml6" name="dml6" shape="rect">6.
Environment and Resources</a></h1>

<h2 id="L7895"><a id="dml6.1" name="dml6.1" shape="rect">6.1
Resource Fetching</a></h2>

<h3 id="L7898"><a id="dml6.1.1" name="dml6.1.1"
shape="rect">6.1.1 Fetching</a></h3>

<p>A VoiceXML interpreter context needs to fetch VoiceXML
documents, and other resources, such as audio files, grammars,
scripts, and objects. Each fetch of the content associated with a
URI is governed by the following attributes:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 54: fetch attributes">
<caption align="bottom">Table 54: Fetch Attributes</caption>

<tbody>
<tr>
<th>fetchtimeout</th>
<td>The interval to wait for the content
to be returned before throwing an error.badfetch event. The
value is a Time Designation (see <a href="#dml6.5"
shape="rect">Section 6.5</a>). If not specified, a value
derived from the innermost fetchtimeout property is used.</td>
</tr>

<tr>
<th>fetchhint</th>
<td>Defines when the interpreter context
should retrieve content from the server. prefetch indicates a
file may be downloaded when the page is loaded, whereas safe
indicates a file that should only be downloaded when actually
needed. If not specified, a value derived from the innermost
relevant fetchhint property is used.</td>
</tr>

<tr>
<th>maxage</th>
<td>Indicates that the document is
willing to use content whose age is no greater than the specified
time in seconds (cf. 'max-age' in HTTP 1.1 <a
href="#ref_RFC2616" shape="rect">[RFC2616]</a>). The document is
not willing to use stale content, unless maxstale is also provided.
If not specified, a value derived from the innermost relevant
maxage property, if present, is used.</td>
</tr>

<tr>
<th>maxstale</th>
<td>Indicates that the document is
willing to use content that has exceeded its expiration time
(cf. 'max-stale' in HTTP 1.1 <a href="#ref_RFC2616"
shape="rect">[RFC2616]</a>). If maxstale is assigned a value,
then the document is willing to accept content that has
exceeded its expiration time by no more than the specified number
of seconds. If not specified, a value derived from the innermost
relevant maxstale property, if present, is used.</td>
</tr>
</tbody>
</table>

<p>When content is fetched from a URI, the fetchtimeout attribute
determines how long to wait for the content (starting from the
time when the resource is needed), and the fetchhint attribute
determines when the content is fetched. The caching policy for a
VoiceXML interpreter context utilizes the maxage and maxstale
attributes and is explained in more detail below.</p>

<p>The fetchhint attribute, in combination with the various
fetchhint properties, is merely a hint to the interpreter context
about when it may schedule the fetch of a resource.&#160; Telling
the interpreter context that it may prefetch a resource does not
require that the resource be prefetched; it only suggests that
the resource <i>may</i> be prefetched. However, the interpreter
context is always required to honor the safe fetchhint.</p>

<p>When transitioning from one dialog to another, through either
a &lt;subdialog&gt;, &lt;goto&gt;, &lt;submit&gt;, &lt;link&gt;,
or &lt;choice&gt; element, there are additional rules that affect
interpreter behavior. If the referenced URI names a document
(e.g. "doc#dialog"), or if query data is provided (through POST
or GET), then a new document is obtained (either from a local
cache, intermediate cache, or from a origin Web server). When it
is obtained, the document goes through its initialization phase
(i.e., obtaining and initializing a new application root
document if needed, initializing document variables, and
executing document scripts). The requested dialog (or first
dialog if none is specified) is then initialized and execution
of the dialog begins.</p>

<p>Generally, if a URI reference contains only a fragment (e.g.,
"#my_dialog"), then no document is fetched, and no initialization
of that document is performed. However, &lt;submit&gt; always
results in a fetch, and if a fragment is accompanied by a
namelist attribute there will also be a fetch.</p>

<p>Another exception is when a URI reference in a leaf document
references the application root document. In this case, the root
document is transitioned to without fetching and without
initialization even if the URI reference contains an absolute or
relative URI (see <a href="#dml1.5.2" shape="rect">Section
1.5.2</a> and <a href="#ref_RFC2396" shape="rect">[RFC2396]</a>).
However, if the URI reference to the root document contains a
query string or a namelist attribute, the root document is
fetched.</p>

<p>Elements that fetch VoiceXML documents also support the
following additional attribute:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 55: fetch additional attribute">
<caption align="bottom">Table 55: Additional Fetch
Attribute</caption>

<tbody>
<tr>
<th width="109">fetchaudio</th>
<td width="649">The URI of the audio clip
to play while the fetch is being done. If not specified, the
fetchaudio property is used, and if that property is not set, no
audio is played during the fetch. The fetching of the audio clip
is governed by the audiofetchhint, audiomaxage, audiomaxstale,
and fetchtimeout properties in effect at the time of the fetch.
The playing of the audio clip is governed by the fetchaudiodelay,
and fetchaudiominimum properties in effect at the time of the
fetch.</td>
</tr>
</tbody>
</table>

<p>The fetchaudio attribute is useful for enhancing a user
experience when there may be noticeable delays while the next
document is retrieved. This can be used to play background music,
or a series of announcements. When the document is retrieved, the
audio file is interrupted if it is still playing. If an error
occurs retrieving fetchaudio from its URI, no badfetch event is
thrown and no audio is played during the fetch.</p>

<h3 id="L7971"><a id="dml6.1.2" name="dml6.1.2"
shape="rect">6.1.2 Caching</a></h3>

<p>The VoiceXML interpreter context, like <a href="#ref_HTML"
shape="rect">[HTML]</a> visual browsers, can use caching to
improve performance in fetching documents and other resources;
audio recordings (which can be quite large) are as common to
VoiceXML documents as images are to HTML pages. In a visual
browser it is common to include end user controls to update or
refresh content that is perceived to be stale. This is not the
case for the VoiceXML interpreter context, since it lacks
equivalent end user controls. Thus enforcement of cache refresh
is at the discretion of the document through appropriate use of
the maxage, and maxstale attributes.</p>

<p>The caching policy used by the VoiceXML interpreter context
must adhere to the cache correctness rules of HTTP 1.1 (<a
href="#ref_RFC2616" shape="rect">[RFC2616]</a>). In particular,
the Expires and Cache-Control headers must be honored. The
following algorithm summarizes these rules and represents the
interpreter context behavior when requesting a resource:</p>

<ul>
<li>If the resource is not present in the cache, fetch it from
the server using get.</li>

<li>If the resource is in the cache, 

<ul>
<li>If a maxage value is provided, 

<ul>
<li>If age of the cached resource &lt;= maxage, 

<ul>
<li>If the resource has expired, 

<ul>
<li>Perform maxstale check.</li>
</ul>
</li>

<li>Otherwise, use the cached copy.</li>
</ul>
</li>

<li>Otherwise, fetch it from the server using get.</li>
</ul>
</li>

<li>Otherwise, 

<ul>
<li>If the resource has expired, 

<ul>
<li>Perform maxstale check.</li>
</ul>
</li>

<li>Otherwise, use the cached copy.</li>
</ul>
</li>
</ul>
</li>
</ul>

<p>The "maxstale check" is:</p>

<ul>
<li>If maxstale is provided, 

<ul>
<li>If cached copy has exceeded its expiration time by no more
than maxstale seconds, then use the cached copy.</li>

<li>Otherwise, fetch it from the server using get.</li>
</ul>
</li>

<li>Otherwise, fetch it from the server using get.</li>
</ul>

<p>Note: it is an optimization to perform a "get if modified" on
a document still present in the cache when the policy requires a
fetch from the server.</p>

<p>The maxage and maxstale properties are allowed to have no
default value whatsoever. If the value is not provided by the
document author, and the platform does not provide a default
value, then the value is undefined and the 'Otherwise' clause of
the algorithm applies. All other properties must provide a
default value (either as given by the specification or by the
platform).</p>

<p>While the maxage and maxstale attributes are drawn from and
directly supported by HTTP 1.1, some resources may be addressed
by URIs that name protocols other than HTTP. If the protocol does
not support the notion of resource age, the interpreter context
shall compute a resource's age from the time it was received. If
the protocol does not support the notion of resource staleness,
the interpreter context shall consider the resource to have
expired immediately upon receipt.</p>

<h4 id="L8044"><a id="dml6.1.2.1" name="dml6.1.2.1"
shape="rect">6.1.2.1 Controlling the Caching Policy</a></h4>

<p>VoiceXML allows the author to override the default caching
behavior for each use of each resource (except for any document
referenced by the &lt;vxml&gt; element's application attribute:
there is no markup mechanism to control the caching policy for
an application root document).</p>

<p>Each resource-related element may specify maxage and maxstale
attributes. Setting maxage to a non-zero value can be used to get
a fresh copy of a resource that may not have yet expired in the
cache. A fresh copy can be unconditionally requested by setting
maxage to zero.</p>

<p>Using maxstale enables the author to state that an expired
copy of a resource, that is not too stale (according to the rules
of HTTP 1.1), may be used. This can improve performance by
eliminating a fetch that would otherwise be required to get a
fresh copy. It is especially useful for authors who may not have
direct server-side control of the expiration dates of large
static files.</p>

<h3 id="L8052"><a id="dml6.1.3" name="dml6.1.3"
shape="rect">6.1.3 Prefetching</a></h3>

<p>Prefetching is an optional feature that an interpreter context
may implement to obtain a resource before it is needed. A
resource that may be prefetched is identified by an element whose
fetchhint attribute equals "prefetch". When an interpreter
context does prefetch a resource, it must ensure that the
resource fetched is precisely the one needed. In particular, if
the URI is computed with an expr attribute, the interpreter
context must not move the fetch up before any assignments to the
expression's variables. Likewise, the fetch for a &lt;submit&gt;
must not be moved prior to any assignments of the namelist
variables.</p>

<p>The expiration status of a resource must be checked on each
use of the resource, and, if its fetchhint attribute is
"prefetch", then it is prefetched. The check must follow the
caching policy specified in Section 6.1.2.</p>

<h3 id="L8059"><a id="dml6.1.4" name="dml6.1.4"
shape="rect">6.1.4 Protocols</a></h3>

<p>The "http" URI scheme must be supported by VoiceXML
platforms, the "https" protocol should be supported and other URI
protocols may be supported.</p>

<h2 id="L8064"><a id="dml6.2" name="dml6.2" shape="rect">6.2
Metadata Information</a></h2>

<p>Metadata information is information about the document rather
than the document's content. VoiceXML 2.0 provides two elements
in which metadata information can be expressed: &lt;meta&gt; and
&lt;metadata&gt;. The &lt;metadata&gt; element provides more
general and powerful treatment of metadata information than
&lt;meta&gt;.</p>

<p>VoiceXML does not specify required metadata information.
However, it does recommend that metadata is expressed using
the &lt;metadata&gt; element with information in Resource
Description Framework (RDF) <a href="#ref_RDF-SYNTAX"
shape="rect">[RDF-SYNTAX]</a> using the Dublin Core version 1.0
RDF schema <a href="#ref_DC" shape="rect">[DC]</a> (see <a
href="#dml6.2.2" shape="rect">Section 6.2.2</a>).</p>

<h3 id="L80641"><a id="dml6.2.1" name="dml6.2.1"
shape="rect">6.2.1 meta element</a></h3>

<p>The &lt;meta&gt; element specifies meta information as in <a
href="#ref_HTML" shape="rect">[HTML]</a>. There are two types of
&lt;meta&gt;.</p>

<p>The first type specifies a metadata property of the document
as a whole and is expressed by the pair of attributes, name
and content. For example to specify the maintainer of a
VoiceXML document:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt; 
  &lt;meta name="maintainer" content="jpdoe@anycompany.example.com"/&gt;
  &lt;form&gt;
    &lt;block&gt;  
       &lt;prompt&gt;Hello&lt;/prompt&gt; 
    &lt;/block&gt;
  &lt;/form&gt;  
&lt;/vxml&gt;
</pre>

<p>The second type of &lt;meta&gt; specifies HTTP response
headers and is expressed by the pair of attributes
http-equiv and content. In the following example, the
first &lt;meta&gt; element sets an expiration date that prevents
caching of the document; the second &lt;meta&gt; element sets the
Date header.</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt; 
  &lt;meta http-equiv="Expires" content="0"/&gt; 
  &lt;meta http-equiv="Date"    content="Thu, 12 Dec 2000 23:27:21 GMT"/&gt; 
  &lt;form&gt;
    &lt;block&gt;  
       &lt;prompt&gt;Hello&lt;/prompt&gt; 
    &lt;/block&gt;
  &lt;/form&gt;  
&lt;/vxml&gt;
</pre>

<p>Attributes of &lt;meta&gt; are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 56: meta attributes">
<caption align="bottom">Table 56: &lt;meta&gt;
Attributes</caption>

<tbody>
<tr>
<th width="121">name</th>
<td width="637">The name of the metadata
property.</td>
</tr>

<tr>
<th width="121">content</th>
<td width="637">The value of the metadata
property.</td>
</tr>

<tr>
<th width="121">http-equiv</th>
<td width="637">The name of an HTTP
response header.</td>
</tr>
</tbody>
</table>

<p>Exactly one of "name" or "http-equiv" must be specified;
otherwise, an error.badfetch event is thrown.</p>

<h3 id="L806412"><a id="dml6.2.2" name="dml6.2.2"
shape="rect">6.2.2 metadata element</a></h3>

<p>The &lt;metadata&gt; element is container in which information
about the document can be placed using a metadata schema.
Although any metadata schema can be used with &lt;metadata&gt;,
it is recommended that the RDF schema is used in conjunction with
metadata properties defined in the Dublin Core Metadata
Initiative.</p>

<p>RDF is a declarative language and provides a standard way for
using XML to represent metadata in the form of statements about
properties and relationships of items on the Web. Content
creators should refer to W3C metadata Recommendations <a
href="#ref_RDF-SYNTAX" shape="rect">[RDF-SYNTAX]</a> and <a
href="#ref_RDF-SCHEMA" shape="rect">[RDF-SCHEMA]</a> as well as
the Dublin Core Metadata Initiative <a href="#ref_DC"
shape="rect">[DC]</a>, which is a set of generally applicable
core metadata properties (e.g., Title, Creator, Subject,
Description, Copyrights, etc.).</p>

<p>The following Dublin Core metadata properties are recommended
in &lt;metadata&gt;:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 57: recommended metadata properties">
<caption align="bottom">Table 57: Recommended Dublin Core
Metadata Properties</caption>

<tbody>
<tr>
<th width="120">Creator</th>
<td width="638">An entity primarily
responsible for making the content of the resource.</td>
</tr>

<tr>
<th width="120">Rights</th>
<td width="638">Information about rights
held in and over the resource.</td>
</tr>

<tr>
<th width="120">Subject</th>
<td width="638">The topic of the content
of the resource. Typically, a subject will be expressed as
keywords, key phrases or classification codes. Recommended best
practice is to select values from a controlled vocabulary or
formal classification scheme.</td>
</tr>
</tbody>
</table>

<p>Here is an example of how &lt;metadata&gt; can be included in
a VoiceXML document using the Dublin Core version 1.0 RDF schema
<a href="#ref_DC" shape="rect">[DC]</a>:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt; 
&lt;metadata&gt;
   &lt;rdf:RDF
       xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns:rdfs = "http://www.w3.org/TR/1999/PR-rdf-schema-19990303#"
       xmlns:dc = "http://purl.org/metadata/dublin_core#"&gt;

&lt;!-- Metadata about the VoiceXML document --&gt;
   &lt;rdf:Description about="http://www.example.com/meta.vxml"
       dc:Title="Directory Enquiry Service"
       dc:Description="Directory Enquiry Service for London in VoiceXML"
       dc:Publisher="W3C"
       dc:Language="en"
       dc:Date="2002-02-12"
       dc:Rights="Copyright 2002 John Smith"
       dc:Format="application/voicexml+xml" &gt;                
       &lt;dc:Creator&gt;
          &lt;rdf:Seq ID="CreatorsAlphabeticalBySurname"&gt;
             &lt;rdf:li&gt;Jackie Crystal&lt;/rdf:li&gt;
             &lt;rdf:li&gt;William Lee&lt;/rdf:li&gt;
          &lt;/rdf:Seq&gt;
       &lt;/dc:Creator&gt;
   &lt;/rdf:Description&gt;
  &lt;/rdf:RDF&gt;
 &lt;/metadata&gt;
 &lt;form&gt;
    &lt;block&gt;  
       &lt;prompt&gt;Hello&lt;/prompt&gt; 
    &lt;/block&gt;
 &lt;/form&gt;  
&lt;/vxml&gt;
</pre>

<h2 id="L8168"><a id="dml6.3" name="dml6.3" shape="rect">6.3
property element</a></h2>

<p>The &lt;property&gt; element sets a property value. Properties
are used to set values that affect platform behavior, such as the
recognition process, timeouts, caching policy, etc.</p>

<p>Properties may be defined for the whole application, for the
whole document at the &lt;vxml&gt; level, for a particular dialog
at the &lt;form&gt; or &lt;menu&gt; level, or for a particular
form item. Properties apply to their parent element and all the
descendants of the parent. A property at a lower level overrides
a property at a higher level. When different values for a property
are specified at the same level, the last one in document order
applies. Properties specified in the application root document
provide default values for properties in every document in the
application; properties specified in an individual document
override property values specified in the application root
document.</p>

<p>If a platform detects that the value of a property is invalid,
then it should throw an error.semantic.</p>

<p>In some cases, &lt;property&gt; elements specify default
values for element attributes, such as timeout or bargein. For
example, to turn off bargein by default for all the prompts in a
particular form:</p>

<pre class="example" xml:space="preserve">
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt; 
&lt;form id="no_bargein_form"&gt; 
  &lt;property name="bargein" value="false"/&gt; 
  &lt;block&gt; 
    &lt;prompt&gt;
      This introductory prompt cannot be barged into.
    &lt;/prompt&gt; 
    &lt;prompt&gt;
      And neither can this prompt.
    &lt;/prompt&gt; 
    &lt;prompt bargein="true"&gt;
      But this one &lt;emphasis&gt;can&lt;/emphasis&gt; be barged into.
    &lt;/prompt&gt; 
  &lt;/block&gt; 
  &lt;field type="boolean"&gt;
    &lt;prompt&gt;
      Please say yes or no.
    &lt;/prompt&gt;
  &lt;/field&gt;  
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>The &lt;property&gt; element has the following attributes:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 58: property attributes">
<caption align="bottom">Table 58: &lt;property&gt;
Attributes</caption>

<tbody>
<tr>
<th>name</th>
<td>The name of the property.</td>
</tr>

<tr>
<th>value</th>
<td>The value of the property.</td>
</tr>
</tbody>
</table>

<h3 id="L8179"><a id="dml6.3.1" name="dml6.3.1"
shape="rect">6.3.1 Platform-Specific Properties</a></h3>

<p>An interpreter context is free to provide platform-specific
properties. For example, to set the "multiplication factor"
for this platform in the scope of this document:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form&gt;
  &lt;property name="com.example.multiplication_factor" value="42"/&gt; 
  &lt;block&gt; 
    &lt;prompt&gt; Welcome &lt;/prompt&gt; 
  &lt;/block&gt;
&lt;/form&gt;  
&lt;/vxml&gt;
</pre>

<p>By definition, platform-specific properties introduce
incompatibilities which reduce application portability.
To minimize them, the following interpreter context
guidelines are strongly recommended:</p>

<ul>
<li>
<p>Platform-specific properties should use reverse domain names
to eliminate potential collisions as in: com.example.<i>foo</i>,
which is clearly different from net.example.<i>foo</i></p>
</li>
</ul>

<ul>
<li>
<p>An interpreter context must <i>not</i> throw an
error.unsupported.property event when encountering a property it
cannot process; rather the interpreter context must
just ignore that property.</p>
</li>
</ul>

<h3 id="L8199"><a id="dml6.3.2" name="dml6.3.2"
shape="rect">6.3.2 Generic Speech Recognizer Properties</a></h3>

<p>The generic speech recognizer properties mostly are taken from
the Java Speech API <a href="#ref_JSAPI"
shape="rect">[JSAPI]</a>:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 59: Generic Speech Recognizer Properties">
<caption align="bottom">Table 59: Generic Speech Recognizer
Properties</caption>

<tbody>
<tr>
<th>confidencelevel</th>
<td>The speech recognition confidence
level, a float value in the range of 0.0 to 1.0. Results are
rejected (a nomatch event is thrown) when
application.lastresult$.confidence is below this threshold.
A value of 0.0 means minimum confidence is needed for a
recognition, and a value of 1.0 requires maximum confidence.
The value is a Real Number Designation (see <a
href="#dml6.5" shape="rect">Section 6.5</a>). The default
value is 0.5.</td>
</tr>

<tr>
<th>sensitivity</th>
<td>Set the sensitivity level. A value of
1.0 means that it is highly sensitive to quiet input. A value of
0.0 means it is least sensitive to noise. The value is a
Real Number Designation (see <a href="#dml6.5"
shape="rect">Section 6.5</a>). The default value is
0.5.</td>
</tr>

<tr>
<th>speedvsaccuracy</th>
<td>A hint specifying the desired balance
between speed vs. accuracy. A value of 0.0 means fastest
recognition. A value of 1.0 means best accuracy. The value
is a Real Number Designation (see <a href="#dml6.5"
shape="rect">Section 6.5</a>). The default is value
0.5.</td>
</tr>

<tr>
<th>completetimeout</th>
<td>
<p>The length of silence required following user speech before
the speech recognizer finalizes a result (either accepting it or
throwing a nomatch event). The complete timeout is used when the
speech is a complete match of an active grammar. By contrast, the
incomplete timeout is used when the speech is an incomplete match
to an active grammar.</p>

<p>A long complete timeout value delays the result completion and
therefore makes the computer's response slow. A short complete
timeout may lead to an utterance being broken up inappropriately.
Reasonable complete timeout values are typically in the range of
0.3 seconds to 1.0 seconds. The value is a Time Designation
(see <a href="#dml6.5" shape="rect">Section 6.5</a>). The
default is platform-dependent. See <a href="#dmlATiming"
shape="rect">Appendix D</a>.</p>

<p>Although platforms must parse the completetimeout property,
platforms are not required to support the behavior of
completetimeout. Platforms choosing not to support the behavior
of completetimeout must so document and adjust the behavior of
the <i>incompletetimeout</i> property as described below.</p>
</td>
</tr>

<tr>
<th>incompletetimeout</th>
<td>
<p>The required length of silence following user speech after
which a recognizer finalizes a result. The incomplete timeout
applies when the speech prior to the silence is an incomplete
match of all active grammars.&#160; In this case, once the
timeout is triggered, the partial result is rejected (with a
nomatch event).</p>

<p>The incomplete timeout also applies when the speech prior to
the silence is a complete match of an active grammar, but where
it is possible to speak further and still match the grammar. By
contrast, the complete timeout is used when the speech is a
complete match to an active grammar and no further words can be
spoken.</p>

<p>A long incomplete timeout value delays the result completion
and therefore makes the computer's response slow. A short
incomplete timeout may lead to an utterance being broken up
inappropriately.</p>

<p>The incomplete timeout is usually longer than the complete
timeout to allow users to pause mid-utterance (for example, to
breathe). See <a href="#dmlATiming" shape="rect">Appendix
D.</a></p>

<p>Platforms choosing not to support the <i>completetimeout</i>
property (described above) must use the maximum of the
completetimeout and incompletetimeout values as the value for the
incompletetimeout.</p>

<p>The value is a Time Designation (see <a href="#dml6.5"
shape="rect">Section 6.5</a>).</p>
</td>
</tr>

<tr>
<th>maxspeechtimeout</th>
<td>
<p>The maximum duration of user speech. If this time elapsed
before the user stops speaking, the event "maxspeechtimeout" is
thrown. The value is a Time Designation (see <a
href="#dml6.5" shape="rect">Section 6.5</a>). The default
duration is platform-dependent.</p>
</td>
</tr>
</tbody>
</table>

<h3 id="L8276"><a id="dml6.3.3" name="dml6.3.3"
shape="rect">6.3.3 Generic DTMF Recognizer Properties</a></h3>

<p>Several generic properties pertain to DTMF grammar
recognition:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 60: Generic DTMF Recognizer Properties">
<caption align="bottom">Table 60: Generic DTMF Recognizer
Properties</caption>

<tbody>
<tr>
<th width="140">interdigittimeout</th>
<td width="618">The inter-digit timeout
value to use when recognizing DTMF input. The value is a Time
Designation (see <a href="#dml6.5" shape="rect">Section
6.5</a>). The default is platform-dependent. See <a
href="#dmlATiming" shape="rect">Appendix D</a>.</td>
</tr>

<tr>
<th width="140">termtimeout</th>
<td width="618">The terminating timeout
to use when recognizing DTMF input. The value is a Time
Designation (see <a href="#dml6.5" shape="rect">Section
6.5</a>). The default value is "0s". <a href="#dmlATiming"
shape="rect">Appendix D</a>.</td>
</tr>

<tr>
<th width="140">termchar</th>
<td width="618">The terminating DTMF
character for DTMF input recognition. The default value is "#".
See <a href="#dmlATiming" shape="rect">Appendix D</a>.</td>
</tr>
</tbody>
</table>

<h3 id="L8321"><a id="dml6.3.4" name="dml6.3.4"
shape="rect">6.3.4 Prompt and Collect Properties</a></h3>

<p>These properties apply to the fundamental platform prompt and
collect cycle:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 61: Prompt and Collect Properties">
<caption align="bottom">Table 61: Prompt and Collect
Properties</caption>

<tbody>
<tr>
<th width="140">bargein</th>
<td width="618">The bargein attribute to
use for prompts. Setting this to true allows bargein by default.
Setting it to false disallows bargein. The default value is
"true".</td>
</tr>

<tr>
<th width="140">bargeintype</th>
<td width="618">Sets the type of bargein
to be speech or hotword. Default is platform-specific. See <a
href="#dml4.1.5.1" shape="rect">Section 4.1.5.1</a>.</td>
</tr>

<tr>
<th width="140">timeout</th>
<td width="618">The time after which a
noinput event is thrown by the platform. The value is a
Time Designation (see <a href="#dml6.5" shape="rect">Section
6.5</a>). The default value is platform-dependent. See <a
href="#dmlATiming" shape="rect">Appendix D</a>.</td>
</tr>
</tbody>
</table>

<h3 id="L8363"><a id="dml6.3.5" name="dml6.3.5"
shape="rect">6.3.5 Fetching Properties</a></h3>

<p>These properties pertain to the fetching of new documents and
resources (note that maxage and maxstale properties may have no
default value - see <a href="#dml6.1.2"
shape="rect">Section 6.1.2</a>):</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 62: Fetching Properties">
<caption align="bottom">Table 62: Fetching Properties</caption>

<tbody>
<tr>
<th width="151">audiofetchhint</th>
<td width="607">This tells the platform
whether or not it can attempt to optimize dialog interpretation
by pre-fetching audio. The value is either safe to say that audio
is only fetched when it is needed, never before; or prefetch to
permit, but not require the platform to pre-fetch the audio. The
default value is prefetch.</td>
</tr>

<tr>
<th width="151">audiomaxage</th>
<td width="607">Tells the platform the
maximum acceptable age, in seconds, of cached audio resources.
The default is platform-specific.</td>
</tr>

<tr>
<th width="151">audiomaxstale</th>
<td width="607">Tells the platform the
maximum acceptable staleness, in seconds, of expired cached audio
resources. The default is platform-specific.</td>
</tr>

<tr>
<th width="151">documentfetchhint</th>
<td width="607">Tells the platform
whether or not documents may be pre-fetched. The value is either
safe (the default), or prefetch.</td>
</tr>

<tr>
<th width="151">documentmaxage</th>
<td width="607">Tells the platform the
maximum acceptable age, in seconds, of cached documents. The
default is platform-specific.</td>
</tr>

<tr>
<th width="151">documentmaxstale</th>
<td width="607">Tells the platform the
maximum acceptable staleness, in seconds, of expired cached
documents. The default is platform-specific.</td>
</tr>

<tr>
<th width="151">grammarfetchhint</th>
<td width="607">Tells the platform
whether or not grammars may be pre-fetched. The value is either
prefetch (the default), or safe.</td>
</tr>

<tr>
<th width="151">grammarmaxage</th>
<td width="607">Tells the platform the
maximum acceptable age, in seconds, of cached grammars. The
default is platform-specific.</td>
</tr>

<tr>
<th width="151">grammarmaxstale</th>
<td width="607">Tells the platform the
maximum acceptable staleness, in seconds, of expired cached
grammars. The default is platform-specific.</td>
</tr>

<tr>
<th width="151">objectfetchhint</th>
<td width="607">Tells the platform
whether the URI contents for &lt;object&gt; may be pre-fetched or
not. The values are prefetch (the default), or safe.</td>
</tr>

<tr>
<th width="151">objectmaxage</th>
<td width="607">Tells the platform the
maximum acceptable age, in seconds, of cached objects. The
default is platform-specific.</td>
</tr>

<tr>
<th width="151">objectmaxstale</th>
<td width="607">Tells the platform the
maximum acceptable staleness, in seconds, of expired cached
objects. The default is platform-specific.</td>
</tr>

<tr>
<th width="151">scriptfetchhint</th>
<td width="607">Tells whether scripts may
be pre-fetched or not. The values are prefetch (the default), or
safe.</td>
</tr>

<tr>
<th width="151">scriptmaxage</th>
<td width="607">Tells the platform the
maximum acceptable age, in seconds, of cached scripts. The
default is platform-specific.</td>
</tr>

<tr>
<th width="151">scriptmaxstale</th>
<td width="607">Tells the platform the
maximum acceptable staleness, in seconds, of expired cached
scripts. The default is platform-specific.</td>
</tr>

<tr>
<th width="151">fetchaudio</th>
<td width="607">The URI of the audio to
play while waiting for a document to be fetched. The default is
not to play any audio during fetch delays. There are no
fetchaudio properties for audio, grammars, objects, and scripts.
The fetching of the audio clip is governed by the audiofetchhint,
audiomaxage, audiomaxstale, and fetchtimeout properties in effect
at the time of the fetch. The playing of the audio clip is
governed by the fetchaudiodelay, and fetchaudiominimum properties
in effect at the time of the fetch.</td>
</tr>

<tr>
<th width="151">
<p>fetchaudiodelay</p>
</th>
<td width="607">
<p>The time interval to wait at the start of a fetch delay before
playing the fetchaudio source. The value is a Time
Designation (see <a href="#dml6.5" shape="rect">Section
6.5</a>). The default interval is platform-dependent, e.g.
"2s".&#160; The idea is that when a fetch delay is short, it may
be better to have a few seconds of silence instead of a bit of
fetchaudio that is immediately cut off.</p>
</td>
</tr>

<tr>
<th width="151">
<p>fetchaudiominimum</p>
</th>
<td width="607">
<p>The minimum time interval to play a fetchaudio source, once
started, even if the fetch result arrives in the meantime.
The value is a Time Designation (see <a href="#dml6.5"
shape="rect">Section 6.5</a>). The default is
platform-dependent, e.g., "5s".&#160; The idea is that once the
user does begin to hear fetchaudio, it should not be stopped too
quickly.</p>
</td>
</tr>

<tr>
<th width="151">fetchtimeout</th>
<td width="607">The timeout for fetches.
The value is a Time Designation (see <a href="#dml6.5"
shape="rect">Section 6.5</a>). The default value is
platform-dependent.</td>
</tr>
</tbody>
</table>

<h3 id="L8511"><a id="dml6.3.6" name="dml6.3.6"
shape="rect">6.3.6 Miscellaneous Properties</a></h3>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 63: Miscellaneous Properties">
<caption align="bottom">Table 63: Miscellaneous
Properties</caption>

<tbody>
<tr>
<th width="109">inputmodes</th>
<td width="649">This property determines
which input modality to use. The input modes to enable: dtmf and
voice. On platforms that support both modes, inputmodes defaults
to "dtmf voice". To disable speech recognition, set inputmodes to
"dtmf". To disable DTMF, set it to "voice". One use for this
would be to turn off speech recognition in noisy environments.
Another would be to conserve speech recognition resources by
turning them off where the input is always expected to be DTMF.
This property does not control the activation of grammars. For
instance, voice-only grammars may be active when the inputmode is
restricted to DTMF. Those grammars would not be matched, however,
because the voice input modality is not active.</td>
</tr>

<tr>
<th width="109">
<p>universals</p>
</th>
<td width="649">
<p>Platforms may optionally provide platform-specific universal
command grammars, such as "help", "cancel", or "exit" grammars,
that are always active (except in the case of modal input
items - see <a href="#dml3.1.4" shape="rect">Section 3.1.4</a>)
and which generate specific events.</p>

<p>Production-grade applications often need to define their own
universal command grammars, e.g., to increase application
portability or to provide a distinctive interface. They specify
new universal command grammars with &lt;link&gt; elements. They
turn off the default grammars with this property. Default catch
handlers are not affected by this property.</p>

<p>The value "none" is the default, and means that all platform
default universal command grammars are disabled. The value "all"
turns them all on. Individual grammars are enabled by listing
their names separated by spaces; for example, "cancel exit
help".</p>
</td>
</tr>

<tr>
<th width="109">
<p>maxnbest</p>
</th>
<td width="649">
<p>This property controls the maximum size of the
"application.lastresult$" array; the array is constrained to be
no larger than the value specified by 'maxnbest'. This property
has a minimum value of 1. The default value is 1.</p>
</td>
</tr>
</tbody>
</table>

<p>Our last example shows several of these properties used at
multiple levels.</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
  &lt;!-- set default characteristics for page --&gt; 
  &lt;property name="audiofetchhint" value="safe"/&gt; 
  &lt;property name="confidencelevel" value="0.75"/&gt;

  &lt;form&gt; 
    &lt;!-- override defaults for this form only --&gt; 
    &lt;property name="confidencelevel" value="0.5"/&gt; 
    &lt;property name="bargein" value="false"/&gt; 
    &lt;grammar src="address_book.grxml" type="application/srgs+xml"/&gt;
    &lt;block&gt; 
      &lt;prompt&gt; Welcome to the Voice Address Book &lt;/prompt&gt; 
    &lt;/block&gt; 
    &lt;initial name="start"&gt; 
      &lt;!-- override default timeout value --&gt; 
      &lt;property name="timeout" value="5s"/&gt; 
      &lt;prompt&gt; Who would you like to call? &lt;/prompt&gt; 
    &lt;/initial&gt; 
    &lt;field name="person"&gt; 
      &lt;prompt&gt;
        Say the name of the person you would like to call.
      &lt;/prompt&gt; 
    &lt;/field&gt; 
    &lt;field name="location"&gt; 
      &lt;prompt&gt;
        Say the location of the person you would like to call.
      &lt;/prompt&gt; 
    &lt;/field&gt; 
    &lt;field name="confirm"&gt; 
     &lt;grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/&gt;
      &lt;!-- Use actual utterances to playback recognized words, 
              rather than returned slot values --&gt; 
      &lt;prompt&gt; 
        You said to call &lt;value expr="person$.utterance"/&gt; 
        at &lt;value expr="location$.utterance"/&gt;. 
        Is this correct? 
      &lt;/prompt&gt; 
      &lt;filled&gt; 
        &lt;if cond="confirm"&gt; 
          &lt;submit namelist="person location"
            next="http://www.messagecentral.example.com/voice/make_call" /&gt;
        &lt;/if&gt; 
        &lt;clear/&gt; 
      &lt;/filled&gt; 
    &lt;/field&gt; 
  &lt;/form&gt; 
&lt;/vxml&gt;
</pre>

<h2 id="L8551"><a id="dml6.4" name="dml6.4" shape="rect">6.4
param element</a></h2>

<p>The &lt;param&gt; element is used to specify values that are
passed to subdialogs or objects. It is modeled on the <a
href="#ref_HTML" shape="rect">[HTML]</a> &lt;PARAM&gt; element.
Its attributes are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 64: param attributes">
<caption align="bottom">Table 64: &lt;param&gt;
Attributes</caption>

<tbody>
<tr>
<th width="99">name</th>
<td width="659">The name to be associated
with this parameter when the object or subdialog is invoked.</td>
</tr>

<tr>
<th width="99">expr</th>
<td width="659">An expression that
computes the value associated with name.</td>
</tr>

<tr>
<th width="99">value</th>
<td width="659">Associates a literal
string value with name.</td>
</tr>

<tr>
<th width="99">valuetype</th>
<td width="659">One of data or ref, by
default data; used to indicate to an object if the value
associated with name is data or a URI (ref). This is not used for
&lt;subdialog&gt; since values are always data.</td>
</tr>

<tr>
<th width="99">type</th>
<td width="659">The media type of the
result provided by a URI if the valuetype is ref; only relevant
for uses of &lt;param&gt; in &lt;object&gt;.</td>
</tr>
</tbody>
</table>

<p>Exactly one of "expr" or "value" must be specified; otherwise,
an error.badfetch event is thrown.</p>

<p>The use of valuetype and type is optional in general, although
they may be required by specific objects. When &lt;param&gt; is
contained in a &lt;subdialog&gt; element, the values specified by
it are used to initialize dialog &lt;var&gt; elements in the
subdialog that is invoked. See <a href="#dml2.3.4"
shape="rect">Section 2.3.4</a> for details regarding
initialization of variables in subdialogs using
&lt;param&gt;. When &lt;param&gt; is contained in an
&lt;object&gt;, the use of the parameter data is specific to the
object that is being invoked, and is outside the scope of the
VoiceXML specification.</p>

<p>Below is an example of &lt;param&gt; used as part of an
&lt;object&gt;. In this case, the first two &lt;param&gt;
elements have expressions (implicitly of valuetype="data"), the
third &lt;param&gt; has an explicit value, and the fourth is a
URI that returns a media type of text/plain. The meaning of this
data is specific to the object.</p>

<pre class="example" xml:space="preserve">
&lt;object name="debit" 
 classid="method://credit-card/gather_and_debit" 
 data="http://www.recordings.example.com/prompts/credit/jesse.jar"&gt; 
  &lt;param name="amount" expr="document.amt"/&gt; 
  &lt;param name="vendor" expr="vendor_num"/&gt; 
  &lt;param name="application_id" value="ADC5678-QWOO"/&gt; 
  &lt;param name="authentication_server"
   value="http://auth-svr.example.com" 
   valuetype="ref"
   type="text/plain"/&gt; 
&lt;/object&gt;
</pre>

<p>The next example illustrates &lt;param&gt; used with
&lt;subdialog&gt;. In this case, two expressions are used to
initialize variables in the scope of the subdialog form.</p>

<h5 id="Form1">Form with calling dialog</h5>

<pre class="example" xml:space="preserve">
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form&gt; 
  &lt;subdialog name="result" src="http://another.example.com/#getssn"&gt; 
    &lt;param name="firstname" expr="document.first"/&gt; 
    &lt;param name="lastname"  expr="document.last"/&gt; 
    &lt;filled&gt; 
      &lt;submit namelist="result.ssn"
        next="http://myservice.example.com/cgi-bin/process"/&gt; 
    &lt;/filled&gt; 
  &lt;/subdialog&gt; 
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<h5 id="Subdialog1">Subdialog in http://another.example.com</h5>

<pre class="example" xml:space="preserve">
 
&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
   http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;
&lt;form id="getssn"&gt; 
  &lt;var name="firstname"/&gt; 
  &lt;var name="lastname"/&gt; 
  &lt;field name="ssn"&gt; 
      &lt;grammar src="http://grammarlib/ssn.grxml"
        type="application/srgs+xml"/&gt;
      &lt;prompt&gt;
        Please say Social Securityy number.
      &lt;/prompt&gt; 
      &lt;filled&gt; 
        &lt;if cond="validssn(firstname,lastname,ssn)"&gt; 
          &lt;assign name="status" expr="true"/&gt; 
          &lt;return namelist="status ssn"/&gt; 
        &lt;else/&gt; 
          &lt;assign name="status" expr="false"/&gt; 
          &lt;return namelist="status"/&gt; 
        &lt;/if&gt; 
      &lt;/filled&gt; 
  &lt;/field&gt; 
&lt;/form&gt;
&lt;/vxml&gt;
</pre>

<p>Using &lt;param&gt; in a &lt;subdialog&gt; is a convenient way
of passing data to a subdialog without requiring the use of
server side scripting.</p>

<h2 id="L8619"><a id="dml6.5" name="dml6.5" shape="rect">6.5
Value Designations</a></h2>

<p>Several VoiceXML parameter values follow the conventions used
in the W3C's Cascading Style Sheet Recommendation <a
href="#ref_CSS2" shape="rect">[CSS2]</a>.</p>

<div>
<h3 id="L86191"><a id="dml6.5.1" name="dml6.5.1"
shape="rect">6.5.1 Integers and Real Numbers</a></h3>
</div>

<p>Real numbers and integers are specified in decimal notation
only. An integer consists of one or more digits "0" to "9". A
real number may be an integer, or it may be zero or more digits
followed by a dot (.) followed by one or more digits. Both
integers and real numbers may be preceded by a "-" or "+" to
indicate the sign.</p>

<div>
<h3 id="L86192"><a id="dml6.5.2" name="dml6.5.2"
shape="rect">6.5.2 Times</a></h3>
</div>

<p>Time designations consist of a non-negative real number
followed by a time unit identifier. The time unit identifiers
are:</p>

<ul>
<li>
<p><strong>ms</strong>: milliseconds</p>
</li>

<li>
<p><strong>s</strong>: seconds</p>
</li>
</ul>

<p>Examples include: "3s", "850ms", "0.7s", ".5s"
and "+1.5s".</p>

<!--- CHAPTER 6: END =-->
<!--- APPENDICES: BEGIN =-->
<h1 id="Appendices"><a id="dml7" name="dml7"
shape="rect">Appendices</a></h1>

<h2 id="Appendix"><a id="dmlATerms" name="dmlATerms"
shape="rect">Appendix A &#8212; Glossary of Terms</a></h2>

<dl>
<dt><br />
 <b>active grammar</b></dt>

<dd>A speech or DTMF grammar that is currently active. This is
based on the currently executing element, and the scope elements
of the currently defined grammars.</dd>

<dt><br />
 <b>application</b></dt>

<dd>A collection of <i>VoiceXML documents</i> that are tagged
with the same application name attribute.</dd>

<dt><br />
 <b>ASR</b></dt>

<dd>Automatic speech recognition.</dd>

<dt><br />
 <b>author</b></dt>

<dd>The creator of a <i>VoiceXML document.</i></dd>

<dt><br />
 <b>catch element</b></dt>

<dd>A &lt;catch&gt; block or one of its abbreviated forms.
Certain default catch elements are defined by the <i>VoiceXML
interpreter</i>.</dd>

<dt><br />
 <b>control item</b></dt>

<dd>A <i>form item</i> whose purpose is either to contain a block
of procedural logics (&lt;block&gt;) or to allow initial prompts
for a mixed initiative dialog (&lt;initial&gt;).</dd>

<dt><br />
 <b>CSS W3C Cascading Style Sheet specification</b>.</dt>

<dd>See <a href="#ref_CSS2" shape="rect">[CSS2]</a></dd>

<dt><br />
 <b>dialog</b></dt>

<dd>An interaction with the user specified in a <i>VoiceXML
document</i>. Types of dialogs include <i>forms</i> and
<i>menus</i>.</dd>

<dt><br />
 <b>DTMF</b> (Dual Tone Multi-Frequency)</dt>

<dd>Touch-tone or push-button dialing. Pushing a button on a
telephone keypad generates a sound that is a combination of two
tones, one high frequency and the other low frequency.</dd>

<dt><br />
 <b>ECMAScript</b></dt>

<dd>A standard version of JavaScript backed by the European
Computer Manufacturer's Association. See <a
href="#ref_ECMASCRIPT" shape="rect">[ECMASCRIPT]</a></dd>

<dt><br />
 <b>event</b></dt>

<dd>A notification "thrown" by the <i>implementation
platform</i>, <i>VoiceXML interpreter context</i>, <i>VoiceXML
interpreter</i>, or VoiceXML code. Events include exceptional
conditions (semantic errors), normal errors (user did not say
something recognizable), normal events (user wants to exit), and
user defined events.</dd>

<dt><br />
 <b>executable content</b></dt>

<dd>Procedural logic that occurs in &lt;block&gt;,
&lt;filled&gt;, and <i>event handlers</i>.</dd>

<dt><br />
 <b>form</b></dt>

<dd>A <i>dialog</i> that interacts with the <i>user</i> in a
highly flexible fashion with the computer and the <i>user</i>
sharing the initiative.</dd>

<dt><br />
 <b>FIA</b> (Form Interpretation Algorithm)</dt>

<dd>An algorithm implemented in a <i>VoiceXML interpreter</i>
which drives the interaction between the user and a VoiceXML form
or menu. See <a href="#dml2.1.6" shape="rect">Section 2.1.6</a>
and <a href="#dmlAFIA" shape="rect">Appendix C</a>.</dd>

<dt><br />
 <b>form item</b></dt>

<dd>An element of &lt;form&gt; that can be visited during form
execution: &lt;initial&gt;, &lt;block&gt;, &lt;field&gt;,
&lt;record&gt;, &lt;object&gt;, &lt;subdialog&gt;, and
&lt;transfer&gt;.</dd>

<dt><br />
 <b>form item variable</b></dt>

<dd>A variable, either implicitly or explicitly defined,
associated with each <i>form item</i> in a <i>form</i>. If the
form item variable is undefined, the form interpretation
algorithm will visit the form item and use it to interact with
the user.</dd>

<dt><br />
 <b>implementation platform</b></dt>

<dd>A computer with the requisite software and/or hardware to
support the types of interaction defined by VoiceXML.</dd>

<dt><br />
 <b>input item</b></dt>

<dd>A <i>form item</i> whose purpose is to input a input item
variable. Input items include &lt;field&gt;, &lt;record&gt;,
&lt;object&gt;, &lt;subdialog&gt;, and &lt;transfer&gt;.</dd>

<dt><br />
 <a id="term-language" name="term-language"
shape="rect"><b>language identifier</b></a></dt>

<dd>A language identifier labels information content as being of
a particular human language variant. Following the XML
specification for language identification <a href="#ref_XML"
shape="rect">[XML]</a>, a legal language identifier is identified
by an RFC 3066 <a href="#ref_RFC3066" shape="rect">[RFC3066]</a>
code. A language code is required by RFC 3066. A country code or
other subtag identifier is optional by RFC 3066.</dd>

<dt><br />
 <b>link</b></dt>

<dd>A set of grammars that when matched by something the
<i>user</i> says or keys in, either transitions to a new dialog
or document or throws an event in the current form item.</dd>

<dt><br />
 <b>menu</b></dt>

<dd>A <i>dialog</i> presenting the <i>user</i> with a set of
choices and takes action on the selected one.</dd>

<dt><br />
 <b>mixed initiative</b></dt>

<dd>A computer-human interaction in which either the computer or
the human can take initiative and decide what to do next.</dd>

<dt><br />
 <b>JSGF</b></dt>

<dd>Java API Speech Grammar Format. A proposed standard for
representing speech grammars. See <a href="#ref_JSGF"
shape="rect">[JSGF]</a></dd>

<dt><br />
 <b>object</b></dt>

<dd>A platform-specific capability with an interface available
via VoiceXML.</dd>

<dt><br />
 <b>request</b></dt>

<dd>A collection of data including: a URI specifying a document
server for the data, a set of name-value pairs of data to be
processed (optional), and a method of submission for processing
(optional).</dd>

<dt><br />
 <b>script</b></dt>

<dd>A fragment of logic written in a client-side scripting
language, especially <i>ECMAScript</i>, which is a scripting
language that must be supported by any <i>VoiceXML
interpreter</i>.</dd>

<dt><br />
 <b>session</b></dt>

<dd>A connection between a <i>user</i> and an <i>implementation
platform</i>, e.g. a telephone call to a voice response system.
One session may involve the interpretation of more than one
<i>VoiceXML document</i>.</dd>

<dt><br />
 <b>SRGS</b> (Speech Recognition Grammar Specification)</dt>

<dd>A standard format for context-free speech recognition
grammars being developed by the W3C Voice Browser group. Both
ABNF and XML formats are defined <a href="#ref_SRGS"
shape="rect">[SRGS]</a>.</dd>

<dt><br />
 <b>SSML</b> (Speech Synthesis Markup Language)</dt>

<dd>A standard format for speech synthesis being developed by the
W3C Voice Browser group <a href="#ref_SSML"
shape="rect">[SSML]</a>.</dd>

<dt><br />
 <b>subdialog</b></dt>

<dd>A VoiceXML dialog (or document) invoked from the current
<i>dialog</i> in a manner analogous to function calls.</dd>

<dt><br />
 <b>tapered prompts</b></dt>

<dd>A set of prompts used to vary a message given to the human.
Prompts may be tapered to be more terse with use (field
prompting), or more explicit (help prompts).</dd>

<dt><br />
 <b>throw</b></dt>

<dd>An element that fires an <i>event</i>.</dd>

<dt><br />
 <b>TTS</b></dt>

<dd>text-to-speech; speech synthesis.</dd>

<dt><br />
 <b>user</b></dt>

<dd>A person whose interaction with an <i>implementation
platform</i> is controlled by a <i>VoiceXML interpreter</i>.</dd>

<dt><br />
 <b>URI</b></dt>

<dd>Uniform Resource Indicator.</dd>

<dt><br />
 <b>URL</b></dt>

<dd>Uniform Resource Locator.</dd>

<dt><br />
 <b>VoiceXML document</b></dt>

<dd>An XML document conforming to the VoiceXML
specification.</dd>

<dt><br />
 <b>VoiceXML interpreter</b></dt>

<dd>A computer program that interprets a <i>VoiceXML document</i>
to control an <i>implementation platform</i> for the purpose of
conducting an interaction with a <i>user.</i></dd>

<dt><br />
 <b>VoiceXML interpreter context</b></dt>

<dd>A computer program that uses a <i>VoiceXML interpreter</i> to
interpret a <i>VoiceXML Document</i> and that may also interact
with the <i>implementation platform</i> independently of the
<i>VoiceXML interpreter</i>.</dd>

<dt><br />
 <b>W3C</b></dt>

<dd>World Wide Web Consortium <a href="http://www.w3.org/"
shape="rect">http://www.w3.org/</a></dd>
</dl>

<h2 id="Appendix1"><a id="dmlADTD" name="dmlADTD"
shape="rect">Appendix B &#8212; VoiceXML Document Type
Definition</a></h2>

<p>The VoiceXML DTD is located at <a href="./vxml.dtd"
shape="rect">http://www.w3.org/TR/voicexml20/vxml.dtd</a>.</p>

<p>Due to DTD limitations, the VoiceXML DTD does not correctly
express that the &lt;metadata&gt; element can contain elements
from other XML namespaces.</p>

<p>Note: the VoiceXML DTD includes modified elements from the
DTDs of the Speech Recognition Grammar Specification 1.0 <a
href="#ref_SRGS" shape="rect">[SRGS]</a> and the Speech Synthesis
Markup Language 1.0 <a href="#ref_SSML"
shape="rect">[SSML]</a>.</p>

<h2 id="Appendix2"><a id="dmlAFIA" name="dmlAFIA"
shape="rect">Appendix C &#8212; Form Interpretation
Algorithm</a></h2>

<p>The form interpretation algorithm (FIA) drives the interaction
between the user and a VoiceXML form or menu. A menu can be
viewed as a form containing a single field whose grammar and
whose &lt;filled&gt; action are constructed from the
&lt;choice&gt; elements.</p>

<p>The FIA must handle:</p>

<ul>
<li>
<p>Form initialization.</p>
</li>

<li>
<p>Prompting, including the management of the prompt counters
needed for prompt tapering.</p>
</li>

<li>
<p>Grammar activation and deactivation at the form and form item
levels.</p>
</li>

<li>
<p>Entering the form with an utterance that matched one of the
form's document-scoped grammars while the user was visiting
a different form or menu.</p>
</li>

<li>
<p>Leaving the form because the user matched another form, menu,
or link's document-scoped grammar.</p>
</li>

<li>
<p>Processing multiple field fills from one utterance, including
the execution of the relevant &lt;filled&gt; actions.</p>
</li>

<li>
<p>Selecting the next form item to visit, and then processing
that form item.</p>
</li>

<li>
<p>Choosing the correct catch element to handle any events thrown
while processing a form item.</p>
</li>
</ul>

<p>First we define some terms and data structures used in the
form interpretation algorithm:</p>

<dl>
<dt><br />
 <i>active grammar set</i></dt>

<dd>The set of grammars active during a VoiceXML interpreter
context's input collection operation.</dd>

<dt><br />
 <i>utterance</i></dt>

<dd>A summary of what the user said or keyed in, including the
specific grammar matched, and a semantic result consisting of an
interpretation structure or, where there is no semantic
interpretation, the raw text of the input (see <a
href="#dml3.1.6" shape="rect">Section 3.1.6</a>). An example
utterance might be: "grammar 123 was matched, and the semantic
interpretation is {drink: "coke" pizza: {number: "3" size:
"large"}}".</dd>

<dt><br />
 <i>execute</i></dt>

<dd>To execute executable content &#8211; either a block, a
filled action, or a set of filled actions. If an event is thrown
during execution, the execution of the executable content is
aborted. The appropriate event handler is then executed, and this
may cause control to resume in a form item, in the next iteration
of the form's main loop, or outside of the form. If a
&lt;goto&gt; is executed, the transfer takes place immediately,
and the remaining executable content is not executed.</dd>
</dl>

<p>Here is the conceptual form interpretation algorithm. The FIA
can start with no initial utterance, or with an initial utterance
passed in from another dialog:</p>

<pre class="example" xml:space="preserve">
//
// <b>Initialization Phase</b>
//

foreach ( &lt;var&gt;, &lt;script&gt; and form item, in document order )
   if ( the element is a &lt;var&gt; )
     Declare the variable, initializing it to the value of
     the "expr" attribute, if any, or else to undefined.
   else if ( the element is a &lt;script&gt; )
     Evaluate the contents of the script if inlined or else
     from the location specified by the "src" attribute.
   else if ( the element is a form item )
     Create a variable from the "name" attribute, if any, or
     else generate an internal name.  Assign to this variable
     the value of the "expr" attribute, if any, or else undefined.
            foreach ( input item and &lt;initial&gt; element )
                 Declare a prompt counter and set it to 1.

if ( user entered this form by speaking to its
      grammar while in a different form)
{
    Enter the main loop below, but start in
    the process phase, not the select phase:
    we already have a collection to process.
}

//
// <b>Main Loop</b>: select next form item and execute it.
//

while ( true )
{
    //
    // <b>Select Phase</b>: choose a form item to visit.
    //

    if ( the last main loop iteration ended
              with a &lt;goto nextitem&gt; )
        Select that next form item.

    else if (there is a form item with an
              unsatisfied guard condition )
        Select the first such form item in document order.

    else
        Do an &lt;exit/&gt; -- the form is full and specified no transition.

    //
    // <b>Collect Phase</b>: execute the selected form item.
    //
    // Queue up prompts for the form item.

    unless ( the last loop iteration ended with
            a catch that had no &lt;reprompt&gt;, 
        and the active dialog was not changed )
    {

        Select the appropriate prompts for an input item or &lt;initial&gt;.
        Queue the selected prompts for play prior to
        the next collect operation.

        Increment an input item's or &lt;initial&gt;'s prompt counter.
    }

    // Activate grammars for the form item.

    if ( the form item is modal )
        Set the active grammar set to the form item grammars,
        if any. (Note that some form items, e.g. &lt;block&gt;,
        cannot have any grammars).
    else
        Set the active grammar set to the form item
        grammars and any grammars scoped to the form,
        the current document, and the application root
        document.

    // Execute the form item.

    if ( a &lt;field&gt; was selected )
        Collect an utterance or an event from the user.
    else if ( a &lt;record&gt; was chosen )
        Collect an utterance (with a name/value pair
        for the recorded bytes) or event from the user.
    else if ( an &lt;object&gt; was chosen )
        Execute the object, setting the &lt;object&gt;'s
        form item variable to the returned ECMAScript value.
    else if ( a &lt;subdialog&gt; was chosen )
        Execute the subdialog, setting the &lt;subdialog&gt;'s
        form item variable to the returned ECMAScript value.
    else if ( a &lt;transfer&gt; was chosen )
        Do the transfer, and (if wait is true) set the
        &lt;transfer&gt; form item variable to the returned
        result status indicator.
    else if ( an &lt;initial&gt; was chosen )
        Collect an utterance or an event from the user.
    else if ( a &lt;block&gt; was chosen )
    {
        Set the block's form item variable to a defined value.

        Execute the block's executable context.
    }

    //
    // <b>Process Phase</b>: process the resulting utterance or event.
    //

    Assign the utterance and other information about the last
    recognition to application.lastresult$.
            // Must have an utterance

    if ( the utterance matched a grammar belonging to a &lt;link&gt; )
      If the link specifies an "next" or "expr" attribute,
      transition to that location.  Else if the link specifies an
      "event" or "eventexpr" attribute, generate that event.

    else if ( the utterance matched a grammar belonging to a &lt;choice&gt; )
      If the choice specifies an "next" or "expr" attribute,
      transition to that location.  Else if the choice specifies
      an "event" or "eventexpr" attribute, generate that event.

    else if ( the utterance matched a grammar from outside the current
              &lt;form&gt; or &lt;menu&gt; )
    {
      Transition to that &lt;form&gt; or &lt;menu&gt;, carrying the utterance
      to the new FIA.
    }

    // Process an utterance spoken to a grammar from this form.
    // First copy utterance result property values into corresponding
    // form item variables.

    Clear all "just_filled" flags.

    if ( the grammar is scoped to the field-level ) {
       // This grammar must be enclosed in an input item.  The input item
       // has an associated ECMAScript variable (referred to here as the input
       // item variable) and slot name.

       if ( the result is not a structure )
         Copy the result into the input item variable.
       elseif ( a top-level property in the result matches the slot name
                or the slot name is a dot-separated path matching a
                subproperty in the result )
         Copy the value of that property into the input item variable.
       else
         Copy the entire result into the input item variable

       Set this input item's "just_filled" flag.
    }
    else {
       foreach ( property in the user's utterance )
       {
          if ( the property matches an input item's slot name )
          {
             Copy the value of that property into the input item's form
             item variable.

             Set the input item's "just_filled" flag.
          }
       }
    }


    // Set all &lt;initial&gt; form item variables if any input items are filled.

    if ( any input item variable is set as a result of the user utterance )
        Set all &lt;initial&gt; form item variables to true.

    // Next execute any triggered &lt;filled&gt; actions. 

    foreach ( &lt;filled&gt; action in document order )
    {
        // Determine the input item variables the &lt;filled&gt; applies to.

        N = the &lt;filled&gt;'s "namelist" attribute.

        if ( N equals "" )
        {
           if ( the &lt;filled&gt; is a child of an input item )
             N = the input item's form item variable name.
           else if ( the &lt;filled&gt; is a child of a form )
             N = the form item variable names of all the input
                 items in that form.
        }

        // Is the &lt;filled&gt; triggered?

        if ( any input item variable in the set N was "just_filled"
               AND  (  the &lt;filled&gt; mode is "all"
                           AND all variables in N are filled
                       OR the &lt;filled&gt; mode is "any"
                           AND any variables in N are filled) )
             Execute the &lt;filled&gt; action.

         If an event is thrown during the execution of a &lt;filled&gt;,
             event handler selection starts in the scope of the &lt;filled&gt;,
         which could be an input item or the form itself.
    }
    // If no input item is filled, just continue.
}
</pre>

<div>
<p>During FIA execution, events may be generated at several
points. These events are processed differently depending on which
phase is active.</p>

<p>Before a form item is selected (i.e. during the Initialization
and Select phases), events are generated at the dialog level. The
corresponding catch handler is located and executed. If the catch
does not result in a transition from the current dialog, FIA
execution will terminate.</p>

<p>Similarly, events triggered after a form item is selected
(i.e. during the Collect and Process phases) are usually
generated at the form item level. There is one exception: events
triggered by a dialog level &lt;filled&gt; are generated at the
dialog level. The corresponding catch handler is located and
executed. If the catch does not result in a transition, the
current FIA loop is terminated and Select phase is reentered.</p>
</div>

<h2 id="Appendix3"><a id="dmlATiming" name="dmlATiming"
shape="rect">Appendix D &#8212; Timing Properties</a></h2>

<p>The various timing properties for speech and DTMF recognition
work together to define the user experience. The ways in which
these different timing parameters function are outlined in the
timing diagrams below. In these diagrams, the start for wait of
DTMF input, or user speech both occur at the time that the last
prompt has finished playing.</p>

<h3 id="L9212"><a id="a.1" name="a.1" shape="rect">D.1. DTMF
Grammars</a></h3>

<p>DTMF grammars use timeout, interdigittimeout, termtimeout and
termchar as described in <a href="#dml6.3.3" shape="rect">Section
6.3.3</a> to tailor the user experience. The effects of these are
shown in the following timing diagrams.</p>

<h4 id="L9217">timeout, No Input Provided</h4>

<p>The timeout parameter determines when the &lt;noinput&gt;
event is thrown because the user has failed to enter any DTMF
(Figure 12). Once the first DTMF has been entered, this
parameter has no further effect.</p>

<p class="fig"><img height="197"
alt="Timing diagram for timeout when no input provided"
src="Images/image009.gif" width="438" /><br />
Figure 12: Timing diagram for timeout when no input provided.</p>

<h4 id="L9226">interdigittimeout, Grammar is Not Ready to
Terminate</h4>

<p>In Figure 13, the interdigittimeout determines when the
nomatch event is thrown because a DTMF grammar is not yet
recognized, and the user has failed to enter additional DTMF.</p>

<p class="fig"><img height="228"
alt="Timing diagram for interdigittimeout, grammar is not ready to terminate"
 src="Images/image010.gif" width="449" /><br />
Figure 13: Timing diagram for interdigittimeout, grammar is not
ready to terminate.</p>

<h4 id="L9235">interdigittimeout, Grammar is Ready to
Terminate</h4>

<p>The example below shows the situation when a DTMF grammar
could terminate, or extend by the addition of more DTMF input,
and the user has elected not to provide any further input.</p>

<p class="fig"><img height="227"
alt="Timing diagram for interdigittimeout, grammar is ready to terminate"
 src="Images/image011.gif" width="450" /><br />
Figure 14: Timing diagram for interdigittimeout, grammar is ready
to terminate.</p>

<h4 id="termchar">termchar and interdigittimeout, Grammar Can
Terminate</h4>

<p>In the example below, a termchar is non-empty, and is entered
by the user before an interdigittimeout expires, to signify that
the users DTMF input is complete; the termchar is not included as
part of the recognized value.</p>

<p class="fig"><img height="223"
alt="Timing diagram for termchar and interdigittimeout, grammar can terminate"
 src="Images/image012.gif" width="459" /><br />
Figure 15: Timing diagram for termchar and interdigittimeout,
grammar can terminate.</p>

<h4 id="termchar1">termchar Empty When Grammar Must
Terminate</h4>

<p>In the example below, the entry of the last DTMF has brought
the grammar to a termination point at which no additional DTMF is
expected. Since termchar is empty, there is no optional
terminating character permitted, thus the recognition ends and
the recognized value is returned.</p>

<p class="fig"><img height="131"
alt="Timing diagram for termchar empty when grammar must terminate"
 src="Images/image013.gif" width="443" /><br />
Figure 16: Timing diagram for termchar empty when grammar must
terminate.</p>

<h4 id="termchar2">termchar Non-Empty and termtimeout When
Grammar Must Terminate</h4>

<p>In the example below, the entry of the last DTMF has brought
the grammar to a termination point at which no additional DTMF is
allowed by the grammar. If the termchar is non-empty, then the
user can enter an optional termchar DTMF. If the user fails to
enter this optional DTMF within termtimeout, the recognition ends
and the recognized value is returned. If the termtimeout is 0s
(the default), then the recognized value is returned immediately
after the last DTMF allowed by the grammar, without waiting for
the optional termchar. Note: the termtimeout applies only
when no additional input is allowed by the grammar; otherwise,
the interdigittimeout applies.</p>

<p class="fig"><img height="227"
alt="Timing diagram for termchar non-empty and termtimeout when grammar must terminate"
 src="Images/image014.gif" width="444" /><br />
Figure 17: Timing diagram for termchar non-empty and termtimeout
when grammar must terminate.</p>

<h4 id="termchar3">termchar Non-Empty and termtimeout When
Grammar Must Terminate</h4>

<p>In this example, the entry of the last DTMF has brought the
grammar to a termination point at which no additional DTMF is
allowed by the grammar. Since the termchar is non-empty, the user
enters the optional termchar within termtimeout causing the
recognized value to be returned (excluding the termchar).</p>

<p class="fig"><img height="223"
alt="Timing diagram for termchar non-empty when grammar must terminate"
 src="Images/image015.gif" width="450" /><br />
Figure 18: Timing diagram for termchar non-empty when grammar
must terminate.</p>

<h4 id="invaliddtmf1">Invalid DTMF Input</h4>

<p>While waiting for the first or additional DTMF, three
different timeouts may determine when the user's input is
considered complete. If no DTMF has been entered, the timeout
applies; if some DTMF has been entered but additional DTMF is
valid, then the interdigittimeout applies; and if no additional
DTMF is legal, then the termtimeout applies. At each point, the
user may enter DTMF which is not permitted by the active
grammar(s). This causes the collected DTMF string to be invalid.
Additional digits will be collected until either the termchar
is pressed or the interdigittimeout has elapsed. A nomatch event
is then generated.</p>

<h3 id="L9280"><a id="a.2" name="a.2" shape="rect">D.2. Speech
Grammars.</a></h3>

<p>Speech grammars use timeout, completetimeout, and
incompletetimeout as described in <a href="#dml6.3.4"
shape="rect">Section 6.3.4</a> and <a href="#dml6.3.2"
shape="rect">Section 6.3.2</a> to tailor the user experience. The
effects of these are shown in the following timing diagrams.</p>

<h4 id="timeout">timeout When No Speech Provided</h4>

<p>In the example below, the timeout parameter determines when
the noinput event is thrown because the user has failed to
speak.</p>

<p class="fig"><img height="198"
alt="Timing diagram for timeout when no speech provided"
src="Images/image016.gif" width="438" /><br />
Figure 19: Timing diagram for timeout when no speech
provided.</p>

<h4 id="completeti">completetimeout With Speech Grammar
Recognized</h4>

<p>In the example above, the user provided a utterance that was
recognized by the speech grammar. After a silence period of
completetimeout has elapsed, the recognized value is
returned.</p>

<p class="fig"><img height="219"
alt="Timing diagram for completetimeout with speech grammar recognized"
 src="Images/image017.gif" width="458" /><br />
Figure 20: Timing diagram for completetimeout with speech grammar
recognized.</p>

<h4 id="incomplete">incompletetimeout with Speech Grammar
Unrecognized</h4>

<p>In the example above, the user provided a utterance that is
not as yet recognized by the speech grammar but is the prefix of
a legal utterance. After a silence period of incompletetimeout
has elapsed, a nomatch event is thrown.</p>

<p class="fig"><img height="242"
alt="Timing diagram for incompletetimeout with speech grammar unrecognized"
 src="Images/image018.gif" width="450" /><br />
Figure 21: Timing diagram for incompletetimeout with speech
grammar unrecognized.</p>

<h2 id="Appendix4"><a id="dmlAAudioFormats"
name="dmlAAudioFormats" shape="rect">Appendix E &#8212; Audio
File Formats</a></h2>

<p>VoiceXML requires that a platform support the playing and
recording audio formats specified below.</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 65: mandatory audio formats">
<caption align="bottom">Table 65: Audio Formats Which Platforms
Must Support</caption>

<thead>
<tr>
<th>Audio Format</th>
<th>Media Type</th>
</tr>
</thead>

<tbody>
<tr>
<td>Raw (headerless) 8kHz 8-bit mono
mu-law [PCM] single channel. (G.711)</td>
<td>audio/basic (from <a
href="#ref_RFC1521" shape="rect">[RFC1521]</a>)</td>
</tr>

<tr>
<td>Raw (headerless) 8kHz 8 bit mono
A-law [PCM] single channel. (G.711)</td>
<td>audio/x-alaw-basic</td>
</tr>

<tr>
<td>WAV (RIFF header) 8kHz 8-bit mono
mu-law [PCM] single channel.</td>
<td>audio/x-wav</td>
</tr>

<tr>
<td>WAV (RIFF header) 8kHz 8-bit mono
A-law [PCM] single channel.</td>
<td>audio/x-wav</td>
</tr>
</tbody>
</table>

<p>The 'audio/basic' mime type is commonly used with the 'au'
header format as well as the headerless 8-bit 8Khz mu-law format.
If this mime type is specified for recording, the mu-law format
must be used. For playback with the 'audio/basic' mime type,
platforms must support the mu-law format and may support the 'au'
format.</p>

<h2 id="Appendix5"><a id="dmlAConformance" name="dmlAConformance"
shape="rect">Appendix F &#8212;Conformance</a></h2>

<p><strong>This section is Normative.</strong></p>

<h3 id="Conforming"><a id="dmlADocumentConformance"
name="dmlADocumentConformance" shape="rect">F1. Conforming
VoiceXML Document</a></h3>

<p>A <em>conforming VoiceXML document</em> is a well-formed <a
href="#ref_XML" shape="rect">[XML]</a> document that requires
only the facilities described as mandatory in this specification.
Such a document must meet all of the following criteria:</p>

<ol>
<li>
<p>The document must conform to the constraints expressed in the
VoiceXML Schema (<a href="#dmlASchema" shape="rect">Appendix
O</a>).</p>
</li>

<li>
<p>The root element of the document must be &lt;vxml&gt;.</p>
</li>

<li>
<p>The &lt;vxml&gt; element must include a "version" attribute
with the value "2.0".</p>
</li>

<li>
<p>The &lt;vxml&gt; element must designate the VoiceXML
namespace. This can be achieved by declaring an "xmlns"
attribute or an attribute with an "xmlns" prefix <a
href="#ref_XMLNAMES" shape="rect">[XMLNAMES]</a>. The namespace
for VoiceXML is defined to be http://www.w3.org/2001/vxml.</p>
</li>

<li>
<p>It is recommended that the &lt;vxml&gt; element also
indicate the location of the VoiceXML schema (see <a
href="#dmlASchema" shape="rect">Appendix O</a>) via the
xsi:schemaLocation attribute from <a href="#ref_SCHEMA1"
shape="rect">[SCHEMA1]</a>:</p>

<pre xml:space="preserve">
xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd"
</pre>

<p>Although such indication is not required, to encourage it this
document provides such indication on all of the examples.</p>
</li>

<li>
<p>There may be a DOCTYPE declaration in the document prior to
the root element. If present, the public identifier included in
the DOCTYPE declaration must reference the VoiceXML DTD (<a
href="#dmlADTD" shape="rect">Appendix B</a>) using its Formal
Public Identifier.</p>

<pre xml:space="preserve">
&lt;!DOCTYPE vxml 
     PUBLIC "-//W3C//DTD VOICEXML 2.0//EN" 
     "http://www.w3.org/TR/voicexml20/vxml.dtd"&gt;
</pre>

<p>The system identifier may be modified appropriately.</p>

<p>The DTD subset must not be used to override any parameter
entities in the DTD.</p>
</li>
</ol>

<p>Here is an example of a Conforming VoiceXML document:</p>

<pre class="example" xml:space="preserve">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.w3.org/2001/vxml 
 http://www.w3.org/TR/voicexml20/vxml.xsd"&gt;

 &lt;form&gt;
  &lt;block&gt;hello&lt;/block&gt;
 &lt;/form&gt;

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

<p>Note that in this example, the recommended "xmlns:xsi" and
"xsi:schemaLocation" attributes are included as is an XML
declaration. An XML declaration like the one above is not
required in all XML documents. VoiceXML document authors are
strongly encouraged to use XML declarations in all their
documents. Such a declaration is required when the character
encoding of the document is other than the default UTF-8 or
UTF-16 and no encoding was determined by a higher-level
protocol.</p>

<p>The VoiceXML language or these conformance criteria provide no
designated size limits on any aspect of VoiceXML 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>

<h3 id="ConformingNS"><a id="dmlAConformanceOtherNamespaces"
name="dmlAConformanceOtherNamespaces" shape="rect">F.2 Using
VoiceXML with other namespaces</a></h3>

<p>The VoiceXML namespace may be used with other XML namespaces
as per <a href="#ref_XMLNAMES" shape="rect">[XMLNAMES]</a>,
although such documents are not strictly conforming VoiceXML
documents as defined above. Future work by W3C will address ways
to specify conformance for documents involving multiple
namespaces.</p>

<h3 id="Conforming1"><a id="dmlAConformanceProcessor"
name="dmlAConformanceProcessor" shape="rect">F.3 Conforming
VoiceXML Processors</a></h3>

<p>A VoiceXML processor is a user agent that can parse and
process Conforming VoiceXML documents.</p>

<p>In a <em>Conforming VoiceXML Processor</em>, the XML parser
must be able to parse and process all well-formed XML constructs
defined within <a href="#ref_XML" shape="rect">[XML]</a> and <a
href="#ref_XMLNAMES" shape="rect">[XMLNAMES]</a>. It is not
required that a Conforming VoiceXML processor use a validating
parser.</p>

<p>A <em>Conforming VoiceXML Processor</em> must be a
<i>Conforming Speech Synthesis Markup Language Processor</i> <a
href="#ref_SSML" shape="rect">[SSML]</a> and a <i>Conforming XML
Grammar Processor</i> <a href="#ref_SRGS" shape="rect">[SRGS]</a>
except for differences described in this document. If a syntax
error is detected processing a grammar document, then an
"error.badfetch" event must be thrown.</p>

<p>A <em>Conforming VoiceXML Processor</em> must support the
syntax and semantics of all VoiceXML elements as described in
this document. Consequently, a <em>Conforming VoiceXML
Processor</em> must not throw an
'error.unsupported.&lt;element&gt;' for any VoiceXML element
which must be supported when processing a <a
href="#dmlADocumentConformance" shape="rect">Conforming VoiceXML
Document</a>.</p>

<p>When a <em>Conforming VoiceXML Processor</em> encounters a <a
href="#dmlADocumentConformance" shape="rect">Conforming VoiceXML
Document</a> with non-VoiceXML elements or attributes which are
proprietary, defined only in earlier versions of VoiceXML, or
defined in a non-VoiceXML namespace, and which cannot be
processed, then it must throw an "error.badfetch" event.</p>

<p>When a <em>Conforming VoiceXML Processor</em> encounters a
document with a root element designating a namespace other than
VoiceXML, its behavior is undefined.</p>

<p>There is, however, no conformance requirement with respect to
performance characteristics of the VoiceXML Processor.</p>

<h2 id="Appendix6"><a id="dmlAInternationalization"
name="dmlAInternationalization" shape="rect">Appendix G
&#8212;Internationalization</a></h2>

<p>VoiceXML is an application of <a href="#ref_XML"
shape="rect">[XML]</a> and thus supports <a href="#ref_UNICODE"
shape="rect">[UNICODE]</a> which defines a standard universal
character set.</p>

<p>Additionally, VoiceXML provides a mechanism for precise
control of the input and output languages via the use of
"xml:lang" attribute. This facility provides:</p>

<ul>
<li>The ability to specify the input and output language
overriding the VoiceXML Processor default language</li>

<li>The ability to produce multi-language output</li>

<li>The ability to interpret input in a language different from
the output language(s)</li>
</ul>

<h2 id="Appendix7"><a id="dmlAAccessibility"
name="dmlAAccessibility" shape="rect">Appendix H
&#8212;Accessibility</a></h2>

<div>
<p>Voice is central to, but not the limit of, VoiceXML
applications. While speaking and listening will be the most
widely used techniques in most circumstances and for most users
to interact with VoiceXML applications, some users may be unable
to speak and/or listen because of temporary (or permanent)
circumstances. Persons with disabilities, particularly those with
speech and/or hearing impairments, may need to interact with
VoiceXML applications in other ways:</p>

<ol>
<li>Hearing impaired users may read text on a display or (if they
are also blind) read Braille text by touch. In order to support
special devices for use by persons with speech and/or hearing
impairments, developers are encouraged to provide a text
equivalent of each audio prompt within the audio tag: For example


<pre class="example" xml:space="preserve">
&lt;audio src="greetings.wav"&gt;Greetings&lt;/audio&gt;
</pre>

would normally replay the greetings.wav audio file. However, if
the VoiceXML interpreter Context has detected that the user is
viewing the interaction on a display or is touching Braille
output, then the text "Greetings" is rendered by the display or
Braille output device.</li>

<li>Speaking impaired users may enter coded sequences that are
converted into alphabetic text before feeding them into the
VoiceXML platform. The conversion might be accomplished by a
special hardware attachment to a telephone that converts
keystrokes from, as examples, a QWERTY keyboard to alphabetic
text. The conversion might also be accomplished by software that
translates sequences of DTMF tones from a 12-key telephone keypad
into alphabetic text.</li>
</ol>

<p>Providing alternative paths to information delivery and user
input is central to all W3C technologies intended for use by
people. While initially authored to make on screen content
accessible, the following accessibility guidelines published by
W3C's Web Accessibility Initiative (WAI) also apply to
VoiceXML.</p>

<ul>
<li>Web Content Accessibility Guidelines 1.0 <a
href="#ref_WAI-WEBCONTENT" shape="rect">[WAI-WEBCONTENT]</a>
explains in detail how to make a Web site accessible for people
with a variety of disabilities.</li>

<li>Authoring Tool Accessibility Guidelines 1.0 <a
href="#ref_ATAGIO" shape="rect">[ATAGIO]</a>. For software
developers, explains how to make a variety of authoring tools
support the production of accessible Web content, and also how to
make the software itself accessible.</li>

<li>User Agent Accessibility Guidelines 1.0 <a href="#ref_UAAGIO"
shape="rect">[UAAGIO]</a>. For software developers, explains how
to make accessible browsers, multimedia players, and assistive
technologies that interface with these.</li>

<li>XML Accessibility Guidelines <a href="#ref_XAG"
shape="rect">[XAG]</a>. For developers of XML-based applications
explains how to ensure that XML-based applications support
accessibility.</li>
</ul>

<p>Additional guidelines for enabling persons with disabilities
to access VoiceXML applications include the following:</p>

<ul>
<li>Reuse navigation structures that are highly usable and
leverage learning across multiple applications--for example, the
navigational techniques for the ANSI/NISO Z39.86-2002 Digital
Talking book Standard, http://www.loc.gov/nls/z3986/.</li>

<li>Each element in which an event can occur should specify catch
elements, including one with a fail-soft or recovery
functionality.</li>

<li>Enable users to control the length of time before timeout,
the speaking rate of synthesized speech, and other such variables
that provide a little extra time to respond or complete an input
action, particularly when the VoiceXML interpreter Context has
detected that the user is using an ancillary device instead of
listening or speaking. These are especially useful for users with
cognitive disabilities.</li>

<li>Advertise alternative modes through which equivalent service
is available, including transfer to a human operator, text
telephone service, etc., or the availability of the same
information via the World Wide Web.</li>
</ul>
</div>

<h2 id="Appendix8"><a id="dmlAPrivacy" name="dmlAPrivacy"
shape="rect">Appendix I &#8212;Privacy</a></h2>

<p>A future version of VoiceXML may specify criteria by which a
VoiceXML Processor safeguards the privacy of personal data.</p>

<h2 id="Appendix9"><a id="dmlAChanges" name="dmlAChanges"
shape="rect">Appendix J &#8212;Changes from VoiceXML 1.0</a></h2>

<p>The following is a summary of the differences between VoiceXML
2.0 and VoiceXML 1.0 <a href="#ref_VOICEXML-1.0"
shape="rect">[VOICEXML-1.0]</a>.</p>

<p>Developers of VoiceXML 1.0 applications should pay particular
attentions to the changes incompatible with VoiceXML 1.0
specified in <a href="#dmlAChangesRemoved" shape="rect">Obsolete
Elements</a> and <a href="#dmlAChangesIncModified"
shape="rect">Incompatibly Modified Elements</a>.</p>

<h3 id="Elements"><a id="dmlAChangesNew" name="dmlAChangesNew"
shape="rect">New Elements</a></h3>

<ul>
<li>&lt;log&gt; to specify a debug message (<a href="#dml5.3.13"
shape="rect">5.3.13</a>)</li>

<li>&lt;metadata&gt; as a means of specifying metadata
information using a schema (<a href="#dml6.2"
shape="rect">6.2</a>, <a href="#dml6.2.2"
shape="rect">6.2.2</a>)</li>
</ul>

<h3 id="Obsolete"><a id="dmlAChangesRemoved"
name="dmlAChangesRemoved" shape="rect">Obsolete Elements</a></h3>

<ul>
<li>&lt;dtmf&gt; superceded by &lt;grammar&gt; with "mode=dtmf"
(<a href="#dml3.1.2" shape="rect">3.1.2</a>)</li>

<li>&lt;emp&gt;, &lt;div&gt;, &lt;pros&gt;, and &lt;sayas&gt;
JSML elements have been replaced by corresponding elements in
Speech Synthesis Markup Language <a href="#ref_SSML"
shape="rect">[SSML]</a> (<a href="#dml4.1.1"
shape="rect">4.1.1</a>)</li>
</ul>

<h3 id="Incompatib"><a id="dmlAChangesIncModified"
name="dmlAChangesIncModified" shape="rect">Incompatibly Modified
Elements</a></h3>

<ul>
<li>changed "lang" to "xml:lang" in &lt;vxml&gt; (<a
href="#dml1.5.1" shape="rect">1.5.1</a>).</li>

<li>Added required attribute xmlns in &lt;vxml&gt; (<a
href="#dml1.5.1" shape="rect">1.5.1</a>)</li>

<li>Replaced "base" attribute with "xml:base" in &lt;vxml&gt; (<a
href="#dml1.5.1" shape="rect">1.5.1</a>)</li>

<li>Changed and clarified that if an implementation does not
support a specific object, it throws
error.unsupported.objectname. The event error.unsupported.format
is not thrown for unsupported object types ( <a
href="#dml2.1.2.1" shape="rect">2.1.2.1</a>, <a href="#dml2.3.5"
shape="rect">2.3.5</a>, <a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>A field's type attribute does not indicate an implicit
&lt;say-as&gt; class to use when speaking out the field's value.
An explicit &lt;say-as&gt; must be used instead (<a
href="#dml2.1.4" shape="rect">2.1.4</a>, <a href="#dmlABuiltins"
shape="rect">Appendix P</a>)</li>

<li>added "accept" attribute to &lt;menu&gt; and &lt;choice&gt;
(<a href="#dml2.2.1" shape="rect">2.2.1</a>, <a href="#dml2.2.2"
shape="rect">2.2.2</a>)</li>

<li>An error.badfetch (previously, error.semantic) is thrown if a
&lt;menu&gt;'s dtmf attribute is set to true and it has choices
with DTMF sequences specified as something other than "*", "#",
or "0" (<a href="#dml2.2.1" shape="rect">2.2.1</a>)</li>

<li>Removed required support for access to builtin resources such
as grammars, and 'builtin' is treated as a platform-specific URI
scheme for accessing resources (<a href="#dml2.3.1.2"
shape="rect">2.3.1.2</a>, <a href="#dmlABuiltins"
shape="rect">Appendix P</a>)</li>

<li>Added 'accept' attribute to &lt;option&gt; and modified
description of 'choice phrase' in grammar generation (<a
href="#dml2.3.1.3" shape="rect">2.3.1.3</a>, <a href="#dml2.2.5"
shape="rect">2.2.5</a>)</li>

<li>removed "modal" attribute of &lt;subdialog&gt; (<a
href="#dml2.3.4" shape="rect">2.3.4</a>)</li>

<li>removed "fetchaudio" attribute from &lt;object&gt;(<a
href="#dml2.3.5" shape="rect">2.3.5</a>)</li>

<li>Removed capability of &lt;value&gt; to playback a record.
Only &lt;audio&gt; can be used to playback recording (<a
href="#dml2.3.6" shape="rect">2.3.6</a>, <a href="#dml4.1.3"
shape="rect">4.1.3</a>, <a href="#dml4.1.4"
shape="rect">4.1.4</a>)</li>

<li>If a platform supports simultaneous speech recognition and
recording, then spoken input can match an active non-local
speech grammar. If local speech grammars are specified, they
are treated as inactive (i.e. they are ignored), even if the
platform supports simultaneous recognition and recording
(<a href="#dml2.3.6" shape="rect">2.3.6</a>)</li>

<li>replaced "phone" URI schema with "tel" schema in
&lt;transfer&gt; dest (and destexpr) attribute (<a
href="#dml2.3.7" shape="rect">2.3.7</a>)</li>

<li>during bridged transfer, while bargein operates normally, the
bargeintype is fixed to "hotword", grammar activation is modal
(only local grammars are activated), and transferaudio begins
playing at the point the outgoing call begins (<a
href="#dml2.3.7" shape="rect">2.3.7</a>)</li>

<li>removed notational equivalence between &lt;filled&gt; in a
field and a form-level &lt;filled&gt; triggering on that field
(<a href="#dml2.4" shape="rect">2.4</a>)</li>

<li>The treatment of the 'type' in the &lt;grammar&gt; element
follows standard W3C practise. If a media type is returned by the
protocol, then it is authoritative: it cannot be override by the
VoiceXML platform even if it does not match the actual media type
of the resource or cannot be processed as a grammar. The value of
the 'type' attribute may be used to influence content type
negotiation (in HTTP 1.1 for example) and, only if no media type
is returned by the protocol, becomes the authorative media type
for the resource (<a href="#dml3.1.1.2" shape="rect">3.1.1.2</a>,
<a href="#dml3.1.1.4" shape="rect">3.1.1.4</a>)</li>

<li>TTS content in &lt;choice&gt;, &lt;prompt&gt;,
&lt;enumerate&gt;, and &lt;audio&gt; replaced with definition in
Speech Synthesis Markup Language <a href="#ref_SSML"
shape="rect">[SSML]</a>)</li>

<li>in &lt;audio&gt;, if the audio file cannot be played and the
content of the element is empty, no audio is played and no error
event is thrown (<a href="#dml4.1.3" shape="rect">4.1.3</a>)</li>

<li>removed "class", "mode" and "recsrc" attributes from
&lt;value&gt; (<a href="#dml4.1.4" shape="rect">4.1.4</a>)</li>

<li>removed standard session variable "session.uui". Added
new generic session variables "session.connection.protocol.name"
and "session.connection.aai", which would provide this
information and more (<a href="#dml5.1.4"
shape="rect">5.1.4</a>)</li>

<li>Replaced session.telephone variable space with
session.connection space which is not protocol-specific and more
extensible. Corresponding error names also changed. (<a
href="#dml5.1.4" shape="rect">5.1.4</a>)</li>

<li>The mechanism by which ECMAScript objects in the namelist of
&lt;submit&gt; are submitted is not currently defined but
reserved for future definition. Application developers may
explicit submit properties of the object instead of the object
itself (<a href="#dml5.3.8" shape="rect">5.3.8</a>)</li>

<li>removed "caching" attribute (<a href="#dml6.1"
shape="rect">6.1</a>)</li>

<li>added "maxage" and "maxstale" attributes (<a href="#dml6.1"
shape="rect">6.1</a>)</li>

<li>removed "stream" as value of fetchhint property (<a
href="#dml6.1.1" shape="rect">6.1.1</a>, <a href="#dml6.3.5"
shape="rect">6.3.5</a>)</li>

<li>removed "caching" from fetching properties (<a
href="#dml6.3.5" shape="rect">6.3.5</a>).</li>

<li>Platform-specific universal command grammars are optional (<a
href="#dml6.3.6" shape="rect">6.3.6</a>)</li>
</ul>

<h3 id="Modified"><a id="dmlAChangesModified"
name="dmlAChangesModified" shape="rect">Modified
Elements</a></h3>

<ul>
<li>Platforms may make a distinction between field and utterance
level confidence: i.e. field$.confidence and
application.lastresult$.confidence may differ (<a
href="#dml2.3.1" shape="rect">2.3.1</a>, <a href="#dml3.1.6.4"
shape="rect">3.1.6.4</a>, <a href="#dml5.1.5"
shape="rect">5.1.5</a>, <a href="#dml6.3.2"
shape="rect">6.3.2</a> )</li>

<li>Added 'srcexpr' attribute to &lt;subdialog&gt;(<a
href="#dml2.3.4" shape="rect">2.3.4</a>)</li>

<li>added "maxtime" shadow variable to &lt;record&gt;
(<a href="#dml2.3.6" shape="rect">2.3.6</a>)</li>

<li>added "transferaudio" attribute to &lt;transfer&gt;; added
"maxtimedisconnect", and "unknown" as values of bridge transfers;
added more error.connection events (<a href="#dml2.3.7"
shape="rect">2.3.7</a>)</li>

<li>added "aai" and "aaiexpr" attributes to allow data passing
with &lt;transfer&gt; (<a href="#dml2.3.7"
shape="rect">2.3.7</a>)</li>

<li>added 'dtmf' attribute to &lt;link&gt; (<a href="#dml2.5"
shape="rect">2.5</a>).</li>

<li>the XML Form of the W3C Speech Recognition Grammar
Specification <a href="#ref_SRGS" shape="rect">[SRGS]</a> must be
supported in &lt;grammar&gt; (<a href="#dml3.1"
shape="rect">3.1</a>).</li>

<li>added "weight", "mode", "xml:lang", "root" and "version"
attributes to &lt;grammar&gt; (<a href="#dml3.1"
shape="rect">3.1</a>).</li>

<li>added "xml:lang" attribute to &lt;prompt&gt; (<a
href="#dml4.1" shape="rect">4.1</a>).</li>

<li>added "bargeintype" attribute to &lt;prompt&gt; with values
"speech" and "hotword" (<a href="#dml4.1"
shape="rect">4.1</a>).</li>

<li>added "expr" attribute to &lt;audio&gt; element (<a
href="#dml4.1.3" shape="rect">4.1.3</a>)</li>

<li>added application variable "application.lastresult$"
describing last recognition result, including n-best (<a
href="#dml5.1.5" shape="rect">5.1.5</a>).</li>

<li>added "event", "eventexpr", "message" and "messageexpr" as
attributes of &lt;throw&gt;, &lt;choice&gt;, &lt;link&gt;, and
&lt;return&gt; (<a href="#dml5.2.1" shape="rect">5.2.1</a>).</li>

<li>added "_event" variable to &lt;catch&gt; (<a href="#dml5.2.2"
shape="rect">5.2.2</a>).</li>

<li>&lt;catch&gt; is no longer allowed to specify an event
attribute with an empty string value (<a href="#dml5.2.2"
shape="rect">5.2.2</a>, <a href="#dml5.2.4"
shape="rect">5.2.4</a>)</li>

<li>added "error.badfetch.http.nnn" as pre-defined error type (<a
href="#dml5.2.6" shape="rect">5.2.6</a>)</li>

<li>added "error.badfetch.protocol.&lt;response code&gt;" as
pre-defined error type (<a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>added "maxspeechtimeout" event (<a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>added "error.unsupported.language" pre-defined error type (<a
href="#dml5.2.6" shape="rect">5.2.6</a>)</li>

<li>added required support for "multipart/form-data" value as
"enctype" of &lt;submit&gt; (<a href="#dml5.3.8"
shape="rect">5.3.8</a>)</li>

<li>&lt;script&gt; can occur in &lt;form&gt; element (<a
href="#dml5.3.12" shape="rect">5.3.12</a>)</li>

<li>Failure to retrieve fetchaudio from its URI does not result
in a badfetch event being thrown; instead, no audio is played
during the fetch (<a href="#dml6.1.1"
shape="rect">6.1.1</a>)</li>

<li>HTTP is mandatory (<a href="#dml6.1.4"
shape="rect">6.1.4</a>)</li>

<li>added "maxspeechtimeout" property (<a href="#dml6.3.2"
shape="rect">6.3.2</a>)</li>

<li>Platform support for the completetimeout property is
optional. However, a platform which does not support this
property must use the maximum of the completetimeout and
incompletetimeout values as the value for the incompletetimeout,
and must document it (<a href="#dml6.3.2"
shape="rect">6.3.2</a>)</li>

<li>added "bargeintype" property (<a href="#dml6.3.4"
shape="rect">6.3.4</a>)</li>

<li>added "fetchaudiodelay" and "fetchaudiominimum" to fetch
properties (<a href="#dml6.3.5" shape="rect">6.3.5</a>)</li>

<li>added "maxnbest" session property (<a href="#dml6.3.6"
shape="rect">6.3.6</a>)</li>

<li>added "universals" property (with default "none") (<a
href="#dml6.3.6" shape="rect">6.3.6</a>).</li>

<li>Added defaults for fetching attributes, as well as "maxage"
and "maxstale" fetching attributes to: &lt;choice&gt;,
&lt;subdialog&gt;, &lt;object&gt;, &lt;link&gt;, &lt;grammar&gt;,
&lt;audio&gt;, &lt;goto&gt;, &lt;submit&gt; and
&lt;script&gt;</li>
</ul>

<h3 id="Clarificat"><a id="dmlAChangesClarify"
name="dmlAChangesClarify" shape="rect">Clarifications</a></h3>

<ul>
<li>Clarification how grammar results are mapped into VoiceXML
including: notion of "input items" for form input which accept
input; only input items can be filled as a result of a form-level
grammar match; field-level grammar matches cannot fill input
items other than the current field; clarified that &lt;object&gt;
could be filled and trigger filled actions; added a design
principle for semantic mapping and effects on lastresult$, shadow
variables and process phase in the FIA (<a href="#dml1.2.4"
shape="rect">1.2.4</a>, <a href="#dml2.1.4"
shape="rect">2.1.4</a>, <a href="#dml2.1.5"
shape="rect">2.1.5</a>, <a href="#dml2.1.6.2.3"
shape="rect">2.1.6.2.3</a>, <a href="#dml2.2"
shape="rect">2.2</a>, <a href="#dml2.3.1" shape="rect">2.3.1</a>,
<a href="#dml2.3.1.3" shape="rect">2.3.1.3</a>, <a
href="#dml2.3.5" shape="rect">2.3.5</a>, <a href="#dml2.3.6"
shape="rect">2.3.6</a>, <a href="#dml2.3.7.2"
shape="rect">2.3.7.2</a>, <a href="#dml2.4" shape="rect">2.4</a>,
<a href="#dml2.5" shape="rect">2.5</a>, <a href="#dml3.1.1"
shape="rect">3.1.1</a>, <a href="#dml3.1.6"
shape="rect">3.1.6</a>, <a href="#dml3.1.6.1"
shape="rect">3.1.6.1</a>, <a href="#dml3.1.6.2"
shape="rect">3.1.6.2</a>, <a href="#dml3.1.6.3"
shape="rect">3.1.6.3</a>, <a href="#dml3.1.6.4"
shape="rect">3.1.6.4</a>, <a href="#dmlAFIA"
shape="rect">Appendix C</a>).</li>

<li>if no audio input or output resource is available, an
error.noresource must be thrown (<a href="#dml1.2.5"
shape="rect">1.2.5</a>, <a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>Replaced misleading term 'field' item with 'form' or 'input'
item as appropriate (<a shape="rect" href="#dml1.3.1">1.3.1</a>,
<a shape="rect" href="#dml2.1.6.2.2">2.1.6.2.2</a>, <a
shape="rect" href="#dml2.3">2.3</a>, <a shape="rect"
href="#dml2.3.3">2.3.3</a>, <a shape="rect"
href="#dml2.3.5">2.3.5</a>, <a shape="rect"
href="#dml3.1.6.1">3.1.6.1</a>, <a shape="rect"
href="#dml4.1.3">4.1.3</a>, <a shape="rect"
href="#dml5.1.1">5.1.1</a>, <a shape="rect"
href="#dml5.1.3">5.1.3</a>, <a shape="rect"
href="#dml6.3">6.3</a>)</li>

<li>Clarified that application-level grammars may remain active
for the duration of the application subject to the grammar
activation rules in <a href="#dml3.1.4" shape="rect">Section
3.1.4</a> (<a href="#dml1.3.3" shape="rect">1.3.3</a>)</li>

<li>definitions of, and transitions between, root and leaf
document (<a href="#dml1.5.2" shape="rect">1.5.2</a>).</li>

<li>referencing application root document and its grammars (<a
href="#dml1.5.2" shape="rect">1.5.2</a>).</li>

<li>When a subdialog is invoked with only a fragment identifier,
the root and leaf pages remain unchanged and these pages are used
to initialize root and leaf contexts (<a href="#dml1.5.2"
shape="rect">1.5.2</a>)</li>

<li>In a root to root transition, root context initialization is
determined by the caching policy even when the current and target
applications have the same name (<a href="#dml1.5.2"
shape="rect">1.5.2</a>)</li>

<li>Clarification of URI transitions, especially fragment
identifiers, in relation to RFC2396 (<a href="#dml1.5.2"
shape="rect">1.5.2</a>, <a href="#dml2.3.4"
shape="rect">2.3.4</a>, <a href="#dml5.3.7"
shape="rect">5.3.7</a>, <a href="#dml5.3.8"
shape="rect">5.3.8</a>, <a href="#dml6.1.1"
shape="rect">6.1.1</a>)</li>

<li>Clarification of how root documents are treated in
multi-document applications and the benefits of using root
documents (<a href="#dml1.5.2" shape="rect">1.5.2</a>)</li>

<li>An error.badfetch is thrown when a document references a
non-existent root document, and that an error.semantic is thrown
if it references a root document which itself references a root
document (<a href="#dml1.5.2" shape="rect">1.5.2</a>)</li>

<li>&lt;subdialog&gt; transferring control to another
&lt;subdialog&gt; and to another dialog via &lt;goto&gt; (<a
href="#dml1.5.3" shape="rect">1.5.3</a>).</li>

<li>Added section describing final processing state when there is
no longer a connection between the interpreter and the user.
Removed description of final processing in &lt;catch&gt;. (<a
href="#dml1.5.4" shape="rect">1.5.4</a>, <a href="#dml5.2.2"
shape="rect">5.2.2</a>)</li>

<li>scope specified on individual form grammars takes precedence
over the default grammar scope in a &lt;form&gt; (<a
href="#dml2.1" shape="rect">2.1</a>).</li>

<li>behaviour when executing unsupported &lt;object&gt; instances
(<a href="#dml2.1.2.1" shape="rect">2.1.2.1</a>, <a
href="#dml2.3.5" shape="rect">2.3.5</a>).</li>

<li>In &lt;object&gt;, when a platform does not support a
particular object, an error.unsupported.objectname event is
thrown where 'objectname' is a fixed string and is <b>not</b>
substituted with the name of the particular object. In general,
the substitutable components of an event name are indicated by
italics (e.g. <i>object</i> in error.unsupported.<i>object</i>)
(<a shape="rect" href="#dml2.1.2.1">2.1.2.1</a>, <a shape="rect"
href="#dml2.3.5">2.3.5</a>, <a shape="rect"
href="#dml5.2.6">5.2.6</a> )</li>

<li>If a platform does not support a specific &lt;object&gt;,
then error.unsupported.objectname is thrown (<a
href="#dml2.1.2" shape="rect">2.1.2</a>)</li>

<li>Multiple prompts in a field do not need to have count
attributes. One or more prompts in a field are queued for
playback according to the prompt selection algorithm in Section
4.1.6 (<a href="#dml2.1.4" shape="rect">2.1.4</a>)</li>

<li>effect of &lt;goto nextitem&gt; on form item (<a
href="#dml2.1.5" shape="rect">2.1.5</a>).</li>

<li>no variables, conditions or counters are reset when using
&lt; goto nextitem&gt; (<a href="#dml2.1.5"
shape="rect">2.1.5</a>).</li>

<li>Clarified that mixed initiative dialogs require forms with
form-level grammars and that there are many authoring styles for
mixed initiative including using &lt;initial&gt; and cond
attributes on &lt;field&gt; elements (<a href="#dml2.1.5"
shape="rect">2.1.5</a>)</li>

<li>&lt;goto nextitem&gt; forces an immediate transfer to the
specified form item, even if any cond attribute present on the
form item evaluates to "false". (<a shape="rect"
href="#dml2.1.5.1">2.1.5.1</a>)</li>

<li>behaviour of &lt;transfer&gt;, &lt;subdialog&gt; and
&lt;object&gt; with audio playback in collect phase (<a
href="#dml2.1.6" shape="rect">2.1.6</a>).</li>

<li>Event handler selection in FIA process phase and
&lt;filled&gt; (<a href="#dml2.1.6.2"
shape="rect">2.1.6.2</a>).</li>

<li>Clarified that when errors raised in the select or collect
phases of the FIA result in an event being thrown, the FIA moves
directly to the process phase (<a href="#dml2.1.6.2"
shape="rect">2.1.6.2</a>, <a href="#dml2.1.6.2.1"
shape="rect">2.1.6.2.1</a>, <a href="#dml2.1.6.2.3"
shape="rect">2.1.6.2.3</a>)</li>

<li>When an error is thrown in executable content, no subsequent
executable elements in the procedural block are executed and, if
there is no explicit transfer of control, an implicit
&lt;exit&gt; is performed (<a href="#dml2.1.6.2.1"
shape="rect">2.1.6.2.1</a>, <a href="#dml5.3"
shape="rect">5.3</a>)</li>

<li>enumerated executable context elements which cause execution
to terminate (<a href="#dml2.1.6.2.3"
shape="rect">2.1.6.2.3</a>).</li>

<li>&lt;reprompt&gt; does not terminate the FIA (<a
href="#dml2.1.6.2.3" shape="rect">2.1.6.2.3</a>).</li>

<li>Clarified that 'false' is the default value of the dtmf
attribute of &lt;menu&gt; (<a href="#dml2.2.1"
shape="rect">2.2.1</a>)</li>

<li>Clarified specification and behavior of mutually exclusive
attributes and child content ( <a href="#dml2.2.2"
shape="rect">2.2.2</a>, <a href="#dml2.3.4"
shape="rect">2.3.4</a>, <a href="#dml2.3.7"
shape="rect">2.3.7</a>, <a href="#dml2.5" shape="rect">2.5</a>,
<a href="#dml3.1.1.4" shape="rect">3.1.1.4</a>, <a
href="#dml4.1.3" shape="rect">4.1.3</a>, <a href="#dml5.2.1"
shape="rect">5.2.1</a>, <a href="#dml5.3.7"
shape="rect">5.3.7</a>, <a href="#dml5.3.8"
shape="rect">5.3.8</a>, <a href="#dml5.3.9"
shape="rect">5.3.9</a>, <a href="#dml5.3.10"
shape="rect">5.3.10</a>, <a href="#dml5.3.12"
shape="rect">5.3.12</a>, <a href="#dml6.4" shape="rect">6.4</a>
)</li>

<li>In &lt;menu&gt; it is a semantic error if dtmf="true" but
&lt;choice&gt;s have explicitly specified dtmf other than 0,* and
#. If more than 9 choices without specified dtmf, then no dtmf is
automatically assigned (no dtmf input can match the choice) but
no error is generated (<a href="#dml2.2.3"
shape="rect">2.2.3</a>)</li>

<li>use of &lt;enumerate&gt; (<a href="#dml2.2.4"
shape="rect">2.2.4</a>, <a href="#dml2.3.1"
shape="rect">2.3.1</a>)</li>

<li>&lt;grammar&gt; overrides automatically generated grammars in
&lt;choice&gt; (<a href="#dml2.2.2" shape="rect">2.2.2</a>).</li>

<li>&lt;choice&gt; expr evaluates to URI to transition to (<a
href="#dml2.2.2" shape="rect">2.2.2</a>).</li>

<li>&lt;choice&gt; event handler without control transition,
causes menu to be re-executed (<a href="#dml2.2.2"
shape="rect">2.2.2</a>).</li>

<li>DTMF sequences specified in the dtmf attributes in
&lt;choice&gt;, &lt;option&gt; and &lt;link&gt; are equivalent to
simple DTMF grammars where DTMF properties apply to recognition
of the sequence. However, unlike grammars, whitespace is optional
in DTMF sequences (<a href="#dml2.2.2" shape="rect">2.2.2</a>, <a
href="#dml2.3.1.3" shape="rect">2.3.1.3</a>, <a href="#dml2.5"
shape="rect">2.5</a>)</li>

<li>Clarified that DTMF and speech grammars, but not grammar
fragments, are allowed in &lt;choice&gt; (<a href="#dml2.2.2"
shape="rect">2.2.2</a>)</li>

<li>For &lt;enumerate&gt;, if no DTMF sequence is assigned to the
choice element, or if a &lt;grammar&gt; element is specified in
&lt;choice&gt;, then the _dtmf variable is assigned the
ECMAScript undefined value (<a shape="rect"
href="#dml2.2.4">2.2.4</a>)</li>

<li>For &lt;enumerate&gt;, the value of _dtmf is a normalized
representation of the dtmf sequence (i.e. single whitespace
between DTMF tokens) (<a shape="rect"
href="#dml2.2.4">2.2.4</a>)</li>

<li>Specification of approximate grammar generation in
&lt;menu&gt; and &lt;choice&gt; (<a href="#dml2.2.5"
shape="rect">2.2.5</a>)</li>

<li>A form item is executed if it is not filled and its cond
attribute is not specified or evaluates to true (<a
href="#dml2.3" shape="rect">2.3</a>, <a href="#dml2.3.1"
shape="rect">2.3.1</a>)</li>

<li>Reorganized overview of form items to clarify which
characteristics apply to which form items. Also indicated that
the &lt;initial&gt; form item can contain &lt;property&gt; and
&lt;catch&gt; elements (<a href="#dml2.3"
shape="rect">2.3</a>)</li>

<li>Evaluation of an 'cond' expression takes place after
conversion to boolean. This affects the 'cond' attribute in form
items &lt;field&gt;, &lt;block&gt;, &lt;initial&gt;,
&lt;subdialog&gt;, &lt;object&gt;, &lt;record&gt;, and
&lt;transfer&gt; (<a href="#dml2.3" shape="rect">2.3</a>);
&lt;prompt&gt; (<a href="#dml4.1" shape="rect">4.1</a>); and
&lt;catch&gt; (<a href="#dml5.2.2" shape="rect">5.2.2</a>, <a
href="#dml5.2.4" shape="rect">5.2.4</a>)</li>

<li>Clarified that shadow variables are writeable and can be
modified by the application. Changed 'application.lastresult$' so
that it is also writeable and can be modified by the application
(<a href="#dml2.3" shape="rect">2.3</a>, <a href="#dml5.1.5"
shape="rect">5.1.5</a> )</li>

<li>assignment of field variable when DTMF attribute defined (<a
href="#dml2.3.1" shape="rect">2.3.1</a>).</li>

<li>The name of a field must be unique amongst form item names in
its form. Variables declared in a &lt;script&gt; element are
declared in the scope of the containing element of the
&lt;script&gt; element (<a href="#dml2.3.1"
shape="rect">2.3.1</a>, <a href="#dml5.3.12"
shape="rect">5.3.12</a>)</li>

<li>form item variable names must respect ECMAScript variable
naming conventions (<a href="#dml2.3.1" shape="rect">2.3.1</a>,
<a href="#dml5.1" shape="rect">5.1</a>).</li>

<li>If a specified builtin type of &lt;field&gt; is not supported
by the platform, an error.unsupported.builtin event is thrown. If
a platform does support builtin types, then it must support all
the builtin types in a given language (<a href="#dml2.3.1"
shape="rect">2.3.1</a>, <a href="#dml5.2.6"
shape="rect">5.2.6</a>, <a href="#dmlABuiltins"
shape="rect">Appendix P</a>)</li>

<li>use of DTMF and speech grammars with "builtin:" URI scheme
(<a href="#dml2.3.1.2" shape="rect">2.3.1.2</a>).</li>

<li>string returned when DTMF input when no "value" or CDATA
specified in &lt;option&gt; (<a href="#dml2.3.1.3"
shape="rect">2.3.1.3</a>).</li>

<li>&lt;option&gt; and &lt;grammar&gt; can be used simultaneously
to specify grammars in a &lt;field&gt; (<a href="#dml2.3.1.3"
shape="rect">2.3.1.3</a>).</li>

<li>In an &lt;option&gt;, if neither CDATA content nor a dtmf
sequence is specified, then the default assignment for the value
attribute is undefined and the field's form item variable is not
filled (<a shape="rect" href="#dml2.3.1.3">2.3.1.3</a>)</li>

<li>In an &lt;option&gt;, the dtmf attribute is optional. if no
value is specified for the dtmf attribute, then no DTMF sequence
is associated with the option and hence it cannot be matched by
DTMF input (<a shape="rect" href="#dml2.3.1.3">2.3.1.3</a>)</li>

<li>Normal grammar scoping rules apply when visiting
&lt;initial&gt;; in particular, no input item grammars are
active (<a href="#dml2.3.3" shape="rect">2.3.3</a>)</li>

<li>Clarified that a form allows multiple &lt;initial&gt;
elements, and how they are selected for execution (<a
href="#dml2.3.3" shape="rect">2.3.3</a>, <a href="#dmlAFIA"
shape="rect">Appendix C</a>)</li>

<li>scope of variables in &lt;subdialog&gt; (<a href="#dml2.3.4"
shape="rect">2.3.4</a>).</li>

<li>&lt;subdialog&gt; context is independent of its calling
context (variable instances are not shared) but its context
follows normal scoping rules for grammars, events, and variables
(<a href="#dml2.3.4" shape="rect">2.3.4</a>).</li>

<li>in &lt;subdialog&gt; use "expr" attribute to set variable if
no corresponding &lt;param&gt; specified (<a href="#dml2.3.4"
shape="rect">2.3.4</a>).</li>

<li>clarified description of subdialog's execution context (<a
href="#dml2.3.4" shape="rect">2.3.4</a>)</li>

<li>Clarification of how &lt;return&gt; passes data to its
calling dialog in &lt;subdialog&gt; (<a href="#dml2.3.4"
shape="rect">2.3.4</a>, <a href="#dml5.3.10"
shape="rect">5.3.10</a>)</li>

<li>Variables in subdialogs are matched to parameters by name and
in document order; parameter values are evaluated in the context
of the &lt;param&gt; element (<a href="#dml2.3.4"
shape="rect">2.3.4</a>)</li>

<li>An error.badfetch is thrown when an invalid transition is
attempted in &lt;subdialog&gt;, &lt;goto&gt; and &lt;submit&gt; .
The scope in which errors are handled during transitions is
platform-dependent (<a href="#dml2.3.4" shape="rect">2.3.4</a>,
<a href="#dml5.3.7" shape="rect">5.3.7</a>, <a href="#dml5.3.8"
shape="rect">5.3.8</a>)</li>

<li>Clarified that a &lt;subdialog&gt; without a &lt;return&gt;
continues until it encounters a &lt;exit&gt; or until no form
items remain eligible for the FIA to select (equivalent to an
&lt;exit&gt;) (<a href="#dml2.3.4" shape="rect">2.3.4</a>)</li>

<li>Clarified that a standalone query string is not a valid URI:
no special handling of them is therefore required in transitional
URIs specified in &lt;subdialog&gt; and &lt;goto&gt; (<a
href="#dml2.3.4" shape="rect">2.3.4</a>, <a href="#dml5.3.7"
shape="rect">5.3.7</a>, <a href="#dml6.1.1"
shape="rect">6.1.1</a>)</li>

<li>If the namelist attribute in &lt;subdialog&gt;,
&lt;submit&gt;, &lt;clear&gt;, &lt;exit&gt; or &lt;return&gt;
references an undeclared variable, then an error.semantic event
is thrown ( <a href="#dml2.3.4" shape="rect">2.3.4</a>, <a
href="#dml5.3.3" shape="rect">5.3.3</a>, <a href="#dml5.3.8"
shape="rect">5.3.8</a>, <a href="#dml5.3.9"
shape="rect">5.3.9</a>, <a href="#dml5.3.10"
shape="rect">5.3.10</a> )</li>

<li>In a &lt;subdialog&gt;, parameters must be declared as
&lt;var&gt; elements in the form executed as the subdialog or an
error.semantic will be thrown. (<a shape="rect"
href="#dml2.3.4">2.3.4</a>, <a shape="rect"
href="#dml6.4">6.4</a>)</li>

<li>Clarified that an &lt;object&gt; itself is responsible for
determining whether a parameter name or value it receives is
invalid. If so, an error is thrown (it may be a standard error or
an object-specific error) (<a href="#dml2.3.5"
shape="rect">2.3.5</a>)</li>

<li>user hangup during recording terminates recording normally;
data recorded prior to hangup can be returned to server (<a
href="#dml2.3.6" shape="rect">2.3.6</a>).</li>

<li>interpretation of grammars in &lt;record&gt; (<a
href="#dml2.3.6" shape="rect">2.3.6</a>).</li>

<li>field variable in &lt;record&gt; is a reference to recorded
audio. When submitting recorded data to a server, the "enctype"
of &lt;submit&gt; should be set to "multipart/form-data" (<a
href="#dml2.3.6" shape="rect">2.3.6</a>, <a href="#dml5.3.8"
shape="rect">5.3.8</a>).</li>

<li>Clarification of behavior when &lt;record&gt; dtmfterm
attribute set to false and DTMF input received (<a
href="#dml2.3.6" shape="rect">2.3.6</a>)</li>

<li>Clarification of when recording starts and behavior when
recording terminated before any audio data is collected (<a
href="#dml2.3.6" shape="rect">2.3.6</a>)</li>

<li>Clarified that how the &lt;record&gt; variable is implemented
may differ between platforms (although all platforms must support
its specified behavior in &lt;audio&gt; and &lt;submit&gt; (<a
href="#dml2.3.6" shape="rect">2.3.6</a>)</li>

<li>Clarified that the finalsilence and maxtime attributes of
&lt;record&gt; default to platform-specific values (<a
href="#dml2.3.6" shape="rect">2.3.6</a>)</li>

<li>During execution of the &lt;record&gt; element, if no audio
is collected before the user terminates recording with DTMF input
matching a local DTMF grammar (or when the dtmfterm attribute is
set to true), then the record variable is not filled (so shadow
variables are not set), and the FIA applies as normal without a
noinput event being thrown. However, information about the input
may be available in these situations via application.lastresult$
as described in Section 5.1.5. (<a href="#dml2.3.6"
shape="rect">2.3.6</a>)</li>

<li>In the &lt;record&gt; element, the dtmfterm attribute has
priority over specified local DTMF grammars (<a shape="rect"
href="#dml2.3.6">2.3.6</a>)</li>

<li>In &lt;record&gt;, no audio may be collected if DTMF or
speech input is received during prompt playback or <i>before</i>
the timeout interval <i>expires</i> (<a shape="rect"
href="#dml2.3.6">2.3.6</a>)</li>

<li>termination of &lt;transfer&gt; by speech or DTMF returns
near_end_disconnect status (<a href="#dml2.3.7"
shape="rect">2.3.7</a>).</li>

<li>value of "dest" attribute on &lt;transfer&gt; (<a
href="#dml2.3.7" shape="rect">2.3.7</a>).</li>

<li>the form item variable of &lt;transfer&gt; is undefined for
blind transfer (<a href="#dml2.3.7" shape="rect">2.3.7</a>).</li>

<li>Revision of &lt;transfer&gt; including: error events when
platform unable to handle 'dest'/'destexpr' URI; clarification
that platform is disconnected immediately when blind transfer
takes place; specification of events to be thrown if platform
cannot perform blind or bridged transfer; clarification that the
connection status is not available for blind transfer (although
some error conditions may be reported) ; transferaudio is ignored
for blind transfer; clarification of audio playback before and
during bridged transfer, including situation where transferaudio
ends before connection established and that queued audio is
flushed before starting transfer; clarification of timings for
listening for input and playback of audio; added name$.inputmode
and name$.utterance shadow variables; clarified that platform
support for listening for input during transfer is optional; (<a
href="#dml2.3.7" shape="rect">2.3.7</a>, <a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>The bargeintype on bridged &lt;transfer&gt; is fixed to
"hotword" for the duration of the outgoing call (<a
href="#dml2.3.7" shape="rect">2.3.7</a>)</li>

<li>Platforms supporting either blind or bridged &lt;transfer&gt;
may support bargein input modes of DTMF, speech, or both, during
the call transfer to drop the far-end. In both blind and bridged
transfer, if the transfer was not terminated by a grammar match,
the shadow variable <i>name</i>$.inputmode is undefined. Blind
transfer attempts can only be cancelled up to the point the
outgoing call begins. In blind transfer, the format of
platform-specific error conditions should follow the naming
convention of other transfer form item variable values. The
caller can cancel a blind transfer attempt before the outgoing
call begins by barging in with a speech or DTMF command that
matches an active grammar during the playback of any queued
audio; in this case the form item variable is set, its shadow
variables are set as is application.lastresult$. If the caller
disconnects by hanging up during a blind transfer attempt before
the connection to the callee begins, a
connection.disconnect.hangup event will be thrown, and dialog
execution will transition to a handler for the hangup event. The
form item variable, and thus shadow variables, will not be set.
If the caller cancels the blind transfer attempt via a DTMF or
voice command before the outgoing call begins (during playback of
queued audio), the form item variable is set to
'near_end_disconnect'. In bridged transfer, the caller can cancel
the transfer attempt before the outgoing call begins by barging
in with a speech or DTMF command that matches an active grammar
during the playback of any queued audio. (<a shape="rect"
href="#dml2.3.7">2.3.7</a>)</li>

<li>Clarified that &lt;transfer&gt; variable and shadow variables
are not set if caller hangs up during call transfer or a call
transfer attempt. If a call is terminated by the caller with a
voice or DTMF command prior to the call being answered, the
duration shadow variable is set to 0 (<a href="#dml2.3.7.2.2"
shape="rect">2.3.7.2.2</a>)</li>

<li>Clarified that &lt;transfer&gt; utterance shadow variable is
set to the DTMF result if the transfer was terminated by DTMF
input (<a href="#dml2.3.7.2.2" shape="rect">2.3.7.2.2</a>)</li>

<li>Addressed situation in a bridged transfer where caller forces
callee to disconnect via DTMF or voice command before the
connection is established: (<a href="#dml2.3.7.2.2"
shape="rect">2.3.7.2.2</a>)</li>

<li>In &lt;transfer&gt;, the shadow variable name$.inputmode is
undefined if the transfer was not terminated by a grammar match.
(<a shape="rect" href="#dml2.3.7.2.2">2.3.7.2.2</a>)</li>

<li>Upon encountering a document containing a &lt;filled&gt;
element specifying either a 'mode' or 'namelist' attribute as a
child of an input item, then an error.badfetch is thrown by the
platform. In addition, an error.badfetch is thrown when the
document contains a &lt;filled&gt; element with a namelist
attribute referencing a control item variable (<a shape="rect"
href="#dml2.4">2.4</a>)</li>

<li>&lt;link&gt;s have zero or more grammars (<a href="#dml2.5"
shape="rect">2.5</a>).</li>

<li>events throw by a &lt;link&gt; are handled by the best
qualified &lt;catch&gt; in active scope (<a href="#dml2.5"
shape="rect">2.5</a>).</li>

<li>&lt;link&gt; can be a child of the form items &lt;field&gt;
and &lt;initial&gt; only (<a href="#dml2.5"
shape="rect">2.5</a>)</li>

<li>Clarified that a "scope" attribute on the element containing
a &lt;link&gt; element has no effect on the scope of the
&lt;link&gt;s grammars (<a href="#dml2.5"
shape="rect">2.5</a>)</li>

<li>Clarified that in &lt;link&gt;, any URIs in its content (e.g.
&lt;grammar&gt;s) are evaluated/resolved where the &lt;link&gt;
is defined, while any URIs and ECMAScript expressions in its
attributes are evaluated/resolved in the active dialog scope and
context (<a href="#dml2.5" shape="rect">2.5</a>)</li>

<li>In a &lt;link&gt;, grammars are not allowed to specify scope
as described in <a shape="rect" href="#dml3.1.3">3.1.3</a> (<a
shape="rect" href="#dml2.5">2.5</a>)</li>

<li>If execution is in a modal form item, then link grammars at
the application level are not active (<a shape="rect"
href="#dml2.5">2.5</a>)</li>

<li>"xml:lang" attribute in &lt;grammar&gt; does not require
multi-lingual support from platform (<a href="#dml3.1"
shape="rect">3.1</a>)</li>

<li>unsupported grammar language results in
error.unsupported.language event being thrown (<a
href="#dml3.1.1" shape="rect">3.1.1</a>)</li>

<li>unsupported language can be indicated in the message variable
of a &lt;throw&gt; (<a href="#dml3.1.1"
shape="rect">3.1.1</a>).</li>

<li>'number' results as a string which ECMAScript will
automatically convert to a number in a numerical expression;
string must not use a leading zero (<a href="#dml3.1.1"
shape="rect">3.1.1</a>)</li>

<li>Clarified that the SRGS &lt;grammar&gt; element is extended
in VoiceXML 2.0 to allow PCDATA for inline grammar formats
besides the XML format of SRGS ( <a href="#dml3.1.1"
shape="rect">3.1.1</a>, <a href="#dml3.1.1.4"
shape="rect">3.1.1.4</a> )</li>

<li>implicit grammars (such as options) do not support weights
(<a href="#dml3.1.1.3" shape="rect">3.1.1.3</a>).</li>

<li>The type attribute in &lt;grammar&gt; takes precedence over
other possible source of media type; if specified, and in
conflict with the type of the grammar, then an error is thrown
(<a href="#dml3.1.1.2" shape="rect">3.1.1.2</a>, <a
href="#dml3.1.1.4" shape="rect">3.1.1.4</a>)</li>

<li>Clarified the use and interpretation of &lt;grammar&gt;
attributes inherited from SRGS (version, xml:lang, mode, root,
tag-format, xml:base). Inline XML SRGS grammars follow the
behavior specified in SRGS. For inline ABNF SRGS grammars as well
as external ABNF and XML SRGS grammars the platform must ignore
these attributes. For all other grammar types, the use and
interpretation of these attributes is platform-dependent (<a
href="#dml3.1.1.4" shape="rect">3.1.1.4</a>)</li>

<li>Clarified that the root rule in SRGS grammars does not have
to be a public rule (<a href="#dml3.1.1.4"
shape="rect">3.1.1.4</a>)</li>

<li>The forms of rule reference defined by SRGS that are not
supported in VoiceXML 2.0 only apply when referencing external
grammars using 'src' attribute (<a shape="rect"
href="#dml3.1.1.4">3.1.1.4</a>)</li>

<li>Clarified the distinction between form-level and field-level
grammars (<a href="#dml3.1.6" shape="rect">3.1.6</a>, <a
href="#dml3.1.6.1" shape="rect">3.1.6.1</a>, <a
href="#dml3.1.6.2" shape="rect">3.1.6.2</a> )</li>

<li>"slot" can select properties at arbitrary levels of nesting
using dot-separated list; removed text suggesting that array
indexing expressions (e.g. "pizza.toppings[3]") are supported (<a
href="#dml3.1.6.1" shape="rect">3.1.6.1</a>)</li>

<li>Clarified that matching form-level grammars can override
existing values in input items and that &lt;filled&gt; processing
of these items takes place as described <a href="#dml2.4"
shape="rect">Section 2.4</a> and <a href="#dmlAFIA"
shape="rect">Appendix C</a> (<a href="#dml3.1.6.1"
shape="rect">3.1.6.1</a>)</li>

<li>Aligned description of DTMF grammar with that of speech
grammars: DTMF grammars can return a set of attribute-value pairs
as well as a string value (<a href="#dml3.1.2"
shape="rect">3.1.2</a>)</li>

<li>If a document contains a grammar specifying a scope and that
grammar is contained a field, in a &lt;link&gt; or in a menu
&lt;choice&gt;, then error.badfetch is thrown (<a
href="#dml3.1.3" shape="rect">3.1.3</a>)</li>

<li>If no grammars are active when input is expected in a
&lt;form&gt; or &lt;menu&gt;, an error.semantic event is thrown
(<a href="#dml3.1.4" shape="rect">3.1.4</a>)</li>

<li>The inputmodes property does not affect grammar activation
(<a href="#dml3.1.4" shape="rect">3.1.4</a>, <a href="#dml6.3.6"
shape="rect">6.3.6</a>)</li>

<li>If the input matches more than one active grammar with the
same precedence, then the first grammar in document order has
highest priority. (<a shape="rect"
href="#dml3.1.4">3.1.4</a>)</li>

<li>ongoing work on semantic attachments within &lt;grammar&gt;
(<a href="#dml3.1.5" shape="rect">3.1.5</a>)</li>

<li>Input item variables can be set by semantic results from
other input items (<a shape="rect"
href="#dml3.1.6">3.1.6</a>)</li>

<li>The default values for a &lt;prompt&gt;'s "bargein" and
"bargeintype" attributes are determined by the "bargein" and
"bargeintype" properties (<a href="#dml4.1"
shape="rect">4.1</a>)</li>

<li>Clarified that a time designator is a non-negative number
which must be followed by ms or s. Clarified that the following
attributes take time designators as their value: &lt;prompt&gt; -
timeout; &lt;transfer&gt; - maxtime (NB: default is now "0s"),
connecttimeout; &lt;record&gt; - maxtime, finalsilence. Clarified
that the following properties have time designator values:
fetchtimeout, completetimeout, incompletetimeout,
maxspeechtimeout, interdigittimeout, termtimeout, timeout,
fetchaudiodelay, fetchaudiominimum, fetchtimeout ( <a
href="#dml4.1" shape="rect">4.1</a>, <a href="#dml2.3.6"
shape="rect">2.3.6</a>, <a href="#dml2.3.7"
shape="rect">2.3.7</a>, <a href="#dml6.1.1"
shape="rect">6.1.1</a>, <a href="#dml6.3"
shape="rect">6.3</a>)</li>

<li>"xml:lang" attribute in &lt;prompt&gt; does not require
multi-lingual support from platform (<a href="#dml4.1.1"
shape="rect">4.1.1</a>)</li>

<li>unsupported synthesis language results in
error.unsupported.language event being thrown (<a
href="#dml4.1.1" shape="rect">4.1.1</a>).</li>

<li>enclosing &lt;prompt&gt; required if text contains speech
synthesis markup (<a href="#dml4.1.2"
shape="rect">4.1.2</a>).</li>

<li>When prompt content is specified without an explicit
&lt;prompt&gt; element then the prompt attributes are defined as
specified in the table in Section 4.1 (<a shape="rect"
href="#dml4.1.2">4.1.2</a>)</li>

<li>'alternate content' in &lt;audio&gt; (<a href="#dml4.1.3"
shape="rect">4.1.3</a>).</li>

<li>When &lt;audio&gt; 'expr' evaluates to ECMAScript undefined,
the content of the element ignored. If it evaluates to an invalid
URI, or the format is unsupported, etc, then the fallback
strategy is invoked (<a href="#dml4.1.3"
shape="rect">4.1.3</a>)</li>

<li>It is a platform optimization to stream audio in
&lt;audio&gt; (<a href="#dml4.1.3" shape="rect">4.1.3</a>)</li>

<li>Clarified that the expr attribute of &lt;audio&gt; is an
ECMAScript expression which references a previously
&lt;record&gt;ed audio, or evaluates to the URI of an audio
resource to fetch (<a href="#dml4.1.3"
shape="rect">4.1.3</a>)</li>

<li>stand-alone &lt;value&gt; element is legal outside
&lt;prompt&gt; (<a href="#dml4.1.4" shape="rect">4.1.4</a>).</li>

<li>Simplified evaluation of expr in &lt;audio&gt; so that it is
not treated specially: it is CDATA where XML special characters
do not need to be escaped. It is not treated as an SSML document,
or a document fragment. (<a href="#dml4.1.4"
shape="rect">4.1.4</a>)</li>

<li>buffered DTMF input is deleted when "bargein" is false on
&lt;prompt&gt; (<a href="#dml4.1.5" shape="rect">4.1.5</a>).</li>

<li>Clarified behavior when bargein occurs during a sequence of
prompts (<a href="#dml4.1.5" shape="rect">4.1.5</a>)</li>

<li>Clarified that when a prompt's "bargein" attribute is false,
no input is buffered while the prompt is playing (any DTMF
already buffered is discarded) (<a href="#dml4.1.5"
shape="rect">4.1.5</a>)</li>

<li>The "bargeintype" attribute of &lt;prompt&gt; applies to DTMF
input as well as speech input (<a href="#dml4.1.5.1"
shape="rect">4.1.5.1</a>)</li>

<li>When the bargeintype is speech, the prompt is stopped
irrespective of which grammars are active (<a shape="rect"
href="#dml4.1.5.1">4.1.5.1</a>)</li>

<li>With the hotword bargeintype, input not matching a grammar is
ignored even during the timeout period (<a shape="rect"
href="#dml4.1.5.1">4.1.5.1</a>)</li>

<li>Prompt counter are also maintained for &lt;initial&gt; items
in a form (<a href="#dml4.1.6" shape="rect">4.1.6</a>)</li>

<li>In prompt selection, whenever the system selects a given
input item in the select phase of FIA and the FIA performs normal
selection and queuing of prompts, the input item's associated
prompt counter is incremented (<a shape="rect"
href="#dml4.1.6">4.1.6</a>)</li>

<li>Clarified that each &lt;prompt&gt; has its own timeout value
and that a &lt;prompt&gt;'s timeout attribute defaults to the
timeout property when the prompt is queued (<a href="#dml4.1.7"
shape="rect">4.1.7</a>)</li>

<li>relationship between prompt queueing and input collection (<a
href="#dml4.1.8" shape="rect">4.1.8</a>).</li>

<li>Asychronous events unrelated to transition execution (e.g.
disconnect) are buffered until waiting state before being thrown
(<a href="#dml4.1.8" shape="rect">4.1.8</a>)</li>

<li>Clarified mapping between interpreter states and FIA; and
that activation of grammars and waiting for input occur
simultaneously with playback of prompts (<a href="#dml4.1.8"
shape="rect">4.1.8</a>)</li>

<li>Clarified that when a prompt bargein attribute is false,
input is not collected and DTMF buffered in the transition state
is deleted as described in 4.1.5 (<a href="#dml4.1.8"
shape="rect">4.1.8</a>)</li>

<li>Platforms may differ in whether or not they discard buffered
non-matching DTMF when an ASR grammar matches input (<a
href="#dml4.1.8" shape="rect">4.1.8</a>)</li>

<li>VoiceXML and ECMAScript variables are part of the same
variable space;variables declared in ECMAScript can be used
directly in VoiceXML (<a href="#dml5.1"
shape="rect">5.1</a>).</li>

<li>VoiceXML variable names, including field names, must follow
ECMAScript naming rules; variable name declarations cannot
contain a dot; the field name "a.b" is illegal (<a href="#dml5.1"
shape="rect">5.1</a>).</li>

<li>VoiceXML variables and variable scoping follows ECMAScript
scope chains; as a consequence, references to undeclared
ECMAScript variables result in error.semantic being thrown (<a
href="#dml5.1.1" shape="rect">5.1.1</a>, <a href="#dml5.1.2"
shape="rect">5.1.2</a>)</li>

<li>scope of variables (<a href="#dml5.1.2"
shape="rect">5.1.2</a>).</li>

<li>Clarified application and document scoping of variables in
application root documents (<a href="#dml5.1.2"
shape="rect">5.1.2</a>)</li>

<li>Dialog scope contains form item variables, not the variables
defined within each form item (<a href="#dml5.1.2"
shape="rect">5.1.2</a>)</li>

<li>only some cond operators need to be escaped (<a
href="#dml5.1.3" shape="rect">5.1.3</a>).</li>

<li>Clarified that a document with a variable x but without a
specified application root, then the variable can be referenced
as application.x and document.x (<a href="#dml5.1.3"
shape="rect">5.1.3</a>)</li>

<li>Clarified that "application.lastresult$" is an ECMAScript
array (<a href="#dml5.1.5" shape="rect">5.1.5</a>)</li>

<li>Clarification on persistence of lastresult application
variable. (<a href="#dml5.1.5" shape="rect">5.1.5</a>)</li>

<li>Interpretations in lastresult are ordered first by
confidence, and then by scope precedence of grammars (<a
href="#dml5.1.5" shape="rect">5.1.5</a>, <a href="#dml2.3.1"
shape="rect">2.3.1</a>, <a href="#dml3.1.4"
shape="rect">3.1.4</a>)</li>

<li>When a DTMF grammar is matched, the interpretation variable
of application.lastresult contains the matched digit string. (<a
href="#dml5.1.5" shape="rect">5.1.5</a>)</li>

<li>After a &lt;nomatch&gt;, application.lastresult$ is be set
but the values are platform-dependent (<a shape="rect"
href="#dml5.1.5">5.1.5</a>)</li>

<li>evaluation of relative URIs against active document (<a
href="#dml5.2" shape="rect">5.2</a>).</li>

<li>Clarified that catch elements use the innermost property of
the element where the event originated, not where the catch is
defined (<a href="#dml5.2" shape="rect">5.2</a>)</li>

<li>VoiceXML does not generally specify when events are thrown
(<a href="#dml5.2.1" shape="rect">5.2.1</a>).</li>

<li>Event counters associated with &lt;catch&gt;s are incremented
when an event occurs with same full or prefix matching name; this
affects selection of the catch handler with the
'correct count' in Section 5.2.4 (<a href="#dml5.2.2"
shape="rect">5.2.2</a>)</li>

<li>definition of "event" and "count" attributes of &lt;catch&gt;
(<a href="#dml5.2.2" shape="rect">5.2.2</a>).</li>

<li>no inherent limitations on &lt;catch&gt; in, for example,
case of user hangup (<a href="#dml5.2.2"
shape="rect">5.2.2</a>).</li>

<li>&lt;catch&gt;'s event may be the string "." indicating that
all events are to be caught (<a href="#dml5.2.2"
shape="rect">5.2.2</a>).</li>

<li>&lt;catch&gt; without a specified event attribute is
equivalent to one with event="." (<a href="#dml5.2.2"
shape="rect">5.2.2</a>, <a href="#dml5.2.4"
shape="rect">5.2.4</a>)</li>

<li>Clarified when form event counters are incremented and reset
(<a href="#dml5.2.2" shape="rect">5.2.2</a>)</li>

<li>&lt;catch&gt; applies to form items except for blocks (<a
shape="rect" href="#dml5.2.2">5.2.2</a>)</li>

<li>"as if by copy" catch inheritance (<a href="#dml5.2"
shape="rect">5.2</a>, <a href="#dml5.2.4"
shape="rect">5.2.4</a>).</li>

<li>catch element selection algorithm (<a href="#dml5.2.4"
shape="rect">5.2.4</a>).</li>

<li>defined prefix match as token match rather than string match
(<a href="#dml5.2.4" shape="rect">5.2.4</a>).</li>

<li>In the &lt;catch&gt; element, an event attribute with an
empty string value is syntactically invalid. To catch all events,
the event attribute can be omitted, or specified as "." to prefix
match all events (<a href="#dml5.2.4"
shape="rect">5.2.4</a>)</li>

<li>"error.badfetch" pre-defined error type (<a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>error.badfetch is thrown until the document is ready for
execution; whether variable initiation is part of execution is
platform-dependent (<a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>Clarification of situations in which 'error.badfetch' is
thrown. A conforming browser may also throw events whose name
extends pre-defined events (<a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>Application-specific and platform-specific event types should
use the reversed Internet domain name convention to avoid naming
conflicts (<a href="#dml5.2.6" shape="rect">5.2.6</a>)</li>

<li>HTTPS is not the same protocol as HTTP (<a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>Errors raised in the first document in a session, and errors
raised before entering the FIA in subsequent loaded documents are
handled in a platform-specific manner (<a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>Removed 'divide by 0' as a run-time error which results in
error.semantic being thrown (ECMAScript does not report an error)
(<a href="#dml5.2.6" shape="rect">5.2.6</a>)</li>

<li>Clarified that the event error.noauthorization is thrown in
more circumstances than just connection authorization failures
(<a href="#dml5.2.6" shape="rect">5.2.6</a>)</li>

<li>Clarified that the event error.unsupport.<i>element</i> is
only thrown for VoiceXML 2.0 elements (<a href="#dml5.2.6"
shape="rect">5.2.6</a>)</li>

<li>The name attribute of a &lt;var&gt; element specifies a
variable without a scope prefix. If it specifies a variable with
a scope prefix, then an error.semantic event is thrown (<a
shape="rect" href="#dml5.3.1">5.3.1</a>)</li>

<li>Clarified that an error.semantic event is thrown if an
attempt is made to assign to an undeclared variable. Properties
of ECMAScript objects, e.g. o.foo, can be assigned directly;
attempting to declare them results in an error.semantic event
being thrown (<a href="#dml5.3.2" shape="rect">5.3.2</a>)</li>

<li>The name attribute of an &lt;assign&gt; element must
reference a variable which has been previously declared otherwise
an error.semantic event is thrown. By default, the scope in which
the variable is resolved is the closest enclosing scope of the
currently active element. To remove ambiguity, the variable name
may be prefixed with a scope name (<a shape="rect"
href="#dml5.3.2">5.3.2</a>)</li>

<li>The namelist of &lt;clear&gt; may specify variables other
than form item variables which are to be reset (<a
href="#dml5.3.3" shape="rect">5.3.3</a>)</li>

<li>The variable references in &lt;clear&gt;'s namelist are
resolved relative to the current scope according to Section 5.1.3
(<a href="#dml5.3.3" shape="rect">5.3.3</a>)</li>

<li>effect of &lt;reprompt&gt; in catch elements (<a
href="#dml5.3.6" shape="rect">5.3.6</a>)</li>

<li>behaviour of &lt;reprompt&gt; when in &lt;catch&gt; with
final &lt;goto&gt; (<a href="#dml5.3.6"
shape="rect">5.3.6</a>)</li>

<li>FIA performs normal prompt queueing after the execution of
catch elements when they end with a &lt;submit&gt; or
&lt;return&gt; as well as &lt;goto&gt; (<a href="#dml5.3.6"
shape="rect">5.3.6</a>, <a href="#dmlAFIA" shape="rect">Appendix
C</a>)</li>

<li>Clarified that a &lt;reprompt&gt; element has no effect
outside of a catch (<a href="#dml5.3.6"
shape="rect">5.3.6</a>)</li>

<li>effect of URI in &lt;goto&gt; on document variables (<a
href="#dml5.3.7" shape="rect">5.3.7</a>)</li>

<li>Clarified for &lt;goto&gt; that errors which occur during
form item transition, the event is handled in the dialog scope
(<a href="#dml5.3.7" shape="rect">5.3.7</a>)</li>

<li>When nextitem or expritem in &lt;goto&gt; reference an
non-existent form item, an error.badfetch event is thrown (<a
href="#dml5.3.7" shape="rect">5.3.7</a>)</li>

<li>variables declared in VoiceXML or ECMAScript can be submitted
(<a href="#dml5.3.8" shape="rect">5.3.8</a>).</li>

<li>Clarified some of the circumstances in which &lt;submit&gt;
can be satisfied by intermediate caches (<a href="#dml5.3.8"
shape="rect">5.3.8</a>)</li>

<li>In the &lt;submit&gt; element, the enctype attribute is only
relevant for when the method attribute is set to "post" (<a
shape="rect" href="#dml5.3.8">5.3.8</a>)</li>

<li>&lt;exit&gt; does not throw an "exit" event (<a
href="#dml5.3.9" shape="rect">5.3.9</a>)</li>

<li>The value of the 'expr' attribute of &lt;exit&gt; is an
ECMAScript expression (<a href="#dml5.3.9"
shape="rect">5.3.9</a>)</li>

<li>Executing &lt;disconnect/&gt; causes the interpreter to (a)
enter the final processing state and (b) flush the prompt queue
(<a shape="rect" href="#dml5.3.11">5.3.11</a>)</li>

<li>no "type" attribute of &lt;script&gt; (<a href="#dml5.3.12"
shape="rect">5.3.12</a>).</li>

<li>&lt;script&gt; evaluated along with &lt;var&gt; elements and
form item variables in &lt;form&gt; (<a href="#dml5.3.12"
shape="rect">5.3.12</a>)</li>

<li>definition of "charset" in &lt;script&gt; (<a
href="#dml5.3.12" shape="rect">5.3.12</a>)</li>

<li>Handling of &lt;log&gt; is platform-dependent (<a
href="#dml5.3.13" shape="rect">5.3.13</a>)</li>

<li>The label and expr attributes of the &lt;log&gt; element are
optional. (<a shape="rect" href="#dml5.3.13">5.3.13</a>)</li>

<li>revised prefetch (<a href="#dml6.1"
shape="rect">6.1</a>)</li>

<li>effect of "fetchhint" attribute (<a href="#dml6.1.1"
shape="rect">6.1.1</a>)</li>

<li>caching policy selection (<a href="#dml6.1.2"
shape="rect">6.1.2</a>)</li>

<li>caching follows HTTP 1.1 cache correctness rules (<a
href="#dml6.1.2" shape="rect">6.1.2</a>)</li>

<li>Clarified that there is no markup mechanism to control the
caching of application root documents (<a href="#dml6.1.2.1"
shape="rect">6.1.2.1</a>)</li>

<li>Clarified that first type of &lt;meta&gt; is expressed by the
attributes name and content, and the second type by http-equiv
and content (<a href="#dml6.2.1" shape="rect">6.2.1</a>)</li>

<li>When different values for a &lt;property&gt; are specified at
the same level, the last one in document order applies (<a
href="#dml6.3" shape="rect">6.3</a>)</li>

<li>Properties can be set in field input items but not control
items (<a href="#dml6.3" shape="rect">6.3</a>)</li>

<li>Clarified that if a platform detects a property has illegal
value, then it should throw an error.semantic (<a href="#dml6.3"
shape="rect">6.3</a>)</li>

<li>format of platform-specific properties (<a href="#dml6.3.1"
shape="rect">6.3.1</a>)</li>

<li>definitions of "completetimeout" and "incompletetimeout"
speech recognizer properties (<a href="#dml6.3.2"
shape="rect">6.3.2</a>)</li>

<li>Universal commands grammars are always active except in the
case of modal input items (<a href="#dml6.3.6"
shape="rect">6.3.6</a>)</li>

<li>Parameter values passed to &lt;subdialog&gt;s are always data
(<a href="#dml6.4" shape="rect">6.4</a>)</li>

<li>definition of time designation values (<a href="#dml6.5"
shape="rect">6.5</a>)</li>

<li>Clarified that the number format is that used in CSS2, and
that the value of the ASR properties confidencelevel,
sensitivity, and speedvsaccuracy are in this format (<a
href="#dml6.5" shape="rect">6.5</a>, <a href="#dml6.3.2"
shape="rect">6.3.2</a>)</li>

<li>Restricted field names, name attribute in &lt;var&gt; and
nextitem attribute in &lt;goto&gt; to NMTOKEN; extended name
attribute in &lt;assign&gt; to be like NMTOKEN but also allow '$'
(for shadow variable assignments); restricted namelist attribute
in &lt;filled&gt; to NMTOKENS; extended namelist attribute in
&lt;exit&gt;, &lt;submit&gt;, &lt;clear&gt;, and &lt;return&gt;
to be like NMTOKENS but allow '$' (for shadow variable
submissions) (<a href="#dmlADTD" shape="rect">Appendix B</a>, <a
href="#dmlASchema" shape="rect">Appendix O</a>)</li>

<li>Restricted the content model of &lt;choice&gt; to PCDATA and
&lt;grammar&gt; elements; clarified that &lt;enumerate&gt; cannot
occur inside another &lt;enumerate&gt; (<a href="#dmlADTD"
shape="rect">Appendix B</a>, <a href="#dmlASchema"
shape="rect">Appendix O</a>, <a href="#dml2.2.4"
shape="rect">2.2.4</a>)</li>

<li>Clarified that the DTD (unlike the schema) cannot correctly
express that the &lt;metadata&gt; element can contain elements
from other XML namespaces (<a href="#dmlADTD"
shape="rect">Appendix B</a>)</li>

<li>The DTD specifies the xmlns attribute of &lt;vxml&gt; as
FIXED and has the default value 'http://www.w3.org/2001/vxml' (<a
shape="rect" href="#dmlADTD">Appendix B</a>)</li>

<li>Aligned DTD and schema with text so that accept attribute on
&lt;choice&gt; does not default to 'exact' if unspecified (<a
shape="rect" href="#dmlADTD">Appendix B</a>, <a shape="rect"
href="#dmlASchema">Appendix O</a>)</li>

<li>FIA clarified that application.lastresult$ assignment happens
after every successful recognition (<a href="#dmlAFIA"
shape="rect">Appendix C</a>)</li>

<li>FIA clarified for matching &lt;link&gt; grammars inside the
current form or menu and for matching menu &lt;choice&gt;
grammars outside the current form or menu (<a href="#dmlAFIA"
shape="rect">Appendix C</a>)</li>

<li>FIA corrected that collection of active grammars does not
include grammars from elements in the &lt;subdialog&gt;'s call
chain (<a href="#dmlAFIA" shape="rect">Appendix C</a>)</li>

<li>FIA's Initialization Phase clarified for initialization of
&lt;script&gt; elements and form items (<a href="#dmlAFIA"
shape="rect">Appendix C</a>)</li>

<li>Clarified that events may be generated at several points
during FIA execution, and that how they are handled depends upon
which FIA phase is active (<a href="#dmlAFIA"
shape="rect">Appendix C</a>)</li>

<li>Clarified that in the FIA collect phase, only prompts from
input items and &lt;initial&gt; are selected and their prompt
counter incremented. The queueing of prompts in a &lt;block&gt;
takes place when the form item is executed (<a href="#dmlAFIA"
shape="rect">Appendix C</a>)</li>

<li>In the process phase of the FIA, &lt;filled&gt; actions are
not only triggered by utterance input - for example, they can
also be triggered when maxtime is reached during a &lt;record&gt;
execution (<a shape="rect" href="#dmlAFIA">Appendix C</a>)</li>

<li>Clarified the use of various timeouts for DTMF input (<a
href="#dmlATiming" shape="rect">Appendix D</a>)</li>

<li>If a Conforming processor cannot process a non-standard
VoiceXML element or attribute, then it must throw an
error.badfetch error (<a href="#dmlAConformance"
shape="rect">Appendix F</a>)</li>

<li>explanatory notes on portable use of builtins and expected
platform dependence (<a href="#dmlABuiltins"
shape="rect">Appendix P</a>)</li>

<li>parameterization of builtin DTMF and speech grammars (<a
href="#dmlABuiltins" shape="rect">Appendix P</a>).</li>

<li>handling of contradictory parameters to digits builtin (<a
href="#dmlABuiltins" shape="rect">Appendix P</a>).</li>

<li>result value returned from "number" builtin type (<a
href="#dmlABuiltins" shape="rect">Appendix P</a>).</li>

<li>Currency code not specified if not spoken (<a
href="#dmlABuiltins" shape="rect">Appendix P</a>).</li>

<li>Only the digit and boolean grammars can be parameterized (<a
href="#dmlABuiltins" shape="rect">Appendix P</a>)</li>

<li>Description of rendering builtin values using &lt;say-as&gt;
(<a href="#dmlABuiltins" shape="rect">Appendix P</a>)</li>

<li>Speech or DTMF &lt;grammar&gt;s in a &lt;field&gt; with a
specified builtin type are in addition to the builtin grammars;
they do not override them (<a href="#dmlABuiltins"
shape="rect">Appendix P</a>)</li>
</ul>

<h3 id="Miscellane"><a id="dmlAChangesMisc"
name="dmlAChangesMisc" shape="rect">Miscellaneous</a></h3>

<ul>
<li>Updated examples with XML encoding attribute, recommended
schema attributes, and escaped illegal XML characters (&lt;,
&gt;, &amp;, etc...)</li>

<li>Using tentative media types (e.g. "application/srgs+xml")
submitted to IETF for approval</li>

<li>Added section describing the origins of VoiceXML and how it
relates to other work in the area (<a href="#dml1"
shape="rect">1</a>)</li>

<li>Specified set of required audio formats for &lt;audio&gt; and
&lt;record&gt; (<a href="#dml1.2.4" shape="rect">1.2.4</a>).</li>

<li>capabilities of conforming VoiceXML platform with respect to
speech and dtmf grammars, audio, TTS, record, and transfer
support (<a href="#dml1.2.5" shape="rect">1.2.5</a>).</li>

<li>platforms should identify themselves with User-Agent HTTP
header (<a href="#dml1.2.5" shape="rect">1.2.5</a>).</li>

<li>Builtin types and fundamental grammars are informative not
normative (<a href="#dml2.3.1" shape="rect">2.3.1</a>, <a
href="#dml2.3.1.1" shape="rect">2.3.1.1</a>, <a
href="#dml2.3.1.2" shape="rect">2.3.1.2</a>, <a
href="#dmlABuiltins" shape="rect">Appendix P</a> )</li>

<li>Updated section to match SRGS 1.0 specification (<a
href="#dml3" shape="rect">3</a>)</li>

<li>description of how semantic interpretations are mapped to
form variables (<a href="#dml3.1.6" shape="rect">3.1.6</a>).</li>

<li>Updated section to match SSML 1.0 specification (<a
href="#dml4" shape="rect">4</a>)</li>

<li>reserved the variable namespace "_$" for internal use (<a
href="#dml5.1" shape="rect">5.1</a>).</li>

<li>use of variables and form items with names "session",
"application", "document", and "dialog" not recommended (<a
href="#dml5.1.2" shape="rect">5.1.2</a>).</li>

<li>Added Recommendation that metadata information is expressed
in &lt;metadata&gt; rather than &lt;meta&gt;; removed recommended
metadata information using &lt;meta&gt;; added recommended
metadata information using RDF schema and Dublin Core properties
(<a href="#dml6.2" shape="rect">6.2</a>)</li>

<li>Changed conformance behavior when interpreter encounters
properties it cannot process: it must (rather than should) not
thrown an error.unsupported.property and must (rather than
should) ignore the property (<a href="#dml6.3.1"
shape="rect">6.3.1</a>)</li>

<li>DTD is now Informative rather than Normative (<a
href="#dmlADTD" shape="rect">Appendix B</a>)</li>

<li>set of required audio formats (<a href="#dmlAAudioFormats"
shape="rect">Appendix E</a>).</li>

<li>Replaced "audio/wav" with "audio/x-wav" in examples, and
added note that the media type "audio/wav" will be adopted when
officially registered with the IETF (<a href="#dmlAAudioFormats"
shape="rect">Appendix E</a>)</li>

<li>revised definition of Conforming VoiceXML Processor,
including requirement to support syntax and semantics of all
elements described in this document (<a href="#dmlAConformance"
shape="rect">Appendix F</a>).</li>

<li>Conforming document section references schema rather DTD
constraints (<a href="#dmlAConformance" shape="rect">Appendix
F</a>)</li>

<li>Conformance statement reflect that DTD is informative but
schema is normative. A conforming document must specify the
voiceXML namespace on the root element. The version="2.0"
attribute must also be present. It is recommended to provide
"xsi:schemaLocation" to indicate the location of the VoiceXML
schema. The DOCTYPE declaration is optional. The behavior of a
VoiceXML processor is undefined when encountering documents with
non-VoiceXML designated root elements (<a href="#dmlAConformance"
shape="rect">Appendix F</a>)</li>

<li>Revised description of how VoiceXML can address accessibility
requirements and issues (<a href="#dmlAAccessibility"
shape="rect">Appendix H</a>)</li>

<li>reusability appendix (<a href="#dmlAReusability"
shape="rect">Appendix K</a>).</li>

<li>Added references appendix (<a href="#dmlAReferences"
shape="rect">Appendix M</a>)</li>

<li>Added appendix describing VoiceXML media type and file suffix
including link to IETF memo for registration of VoiceXML Media
type (<a href="#dmlAMediaType" shape="rect">Appendix N</a>)</li>

<li>Definition of normative schema for VoiceXML. This uses
various other schema to adapt definitions from core schemas in
the grammar and synthesis specifications (<a href="#dmlASchema"
shape="rect">Appendix O</a>)</li>

<li>Verified schema with XML Spy 4.4, XSV (June 2002 version) and
Xerces 2 (Java and C++ versions) (<a href="#dmlASchema"
shape="rect">Appendix O</a>)</li>

<li>Added link to complete set of schema required for VoiceXML
2.0 (<a href="#dmlASchema" shape="rect">Appendix O</a>)</li>
</ul>

<h2 id="Appendix10"><a id="dmlAReusability"
name="dmlAReusability" shape="rect">Appendix K &#8212;
Reusability</a></h2>

<h3 id="L10470">K.1 Reusable dialog components</h3>

<p><i>Definition</i>: A packaged application fragment designed to
be invoked by arbitrary applications or other Reusable Dialog
Components. A Reusable Dialog Component (RDC) encapsulates the
code for an interaction with the caller.</p>

<p>Reusable dialog components provide pre-packaged functionality
"out-of-the-box" that enables developers to quickly build
applications by providing standard default settings and behavior.
They shield developers from having to worry about many of the
intricacies associated with building a robust speech dialog,
e.g., confidence score interpretation, error recovery mechanisms,
prompting, etc. This behavior can be customized by a developer if
necessary to provide application-specific prompts, vocabulary,
retry settings, etc.</p>

<p>In this version of VoiceXML, the only authentic reusable
component calling mechanisms are &lt;subdialog&gt; and
&lt;object&gt;. Components called this way follow a model similar
to subroutines in programming languages: the component is
configured by a well-defined set of parameters passed to the
component, the component has a relatively constrained interaction
with the calling application, the component returns a
well-defined result, and control returns automatically to the
point from which the component was called. This has all the
significant advantages of modularity, reentrancy, and easy reuse
provided by subroutines. Of the two kinds of components, only
&lt;subdialog&gt; components are guaranteed to be as portable as
VoiceXML itself. On the other hand, &lt;object&gt; components may
be able to package advanced, reusable functionality that has not
yet been introduced into the standard.</p>

<h3 id="L10480">K.2 Templates and samples</h3>

<p>Although reusable dialog components have the advantages of
modularity, reentrancy, and easy reuse as described above, the
disadvantage of such components is that they must be designed
very carefully with an eye to reuse, and even with the most
careful of designs it is possible that the application developer
will encounter situations for which the component cannot be
easily configured to handle the application requirements. In
addition, while the constrained interaction of a component with
its calling environment makes it possible for the component
designer to create a component that works predictably in
disparate environments, it also may make the user's interaction
with the component seem disconnected from the rest of the
application.</p>

<p>In such situations the application developer may wish to reuse
VoiceXML source code in the form of samples and templates -
samples designed for easy customizability. Such code is more
easily tailored for and integrated into a particular application,
at the expense of modularity and rentrancy.</p>

<p>Such templates and samples can be created by separating
interesting VoiceXML code from a main dialog and then
distributing that code by copy for use in other dialogs. This
form of reusability allows the user of the copied VoiceXML code
to modify it as necessary and continue to use their modified
version indefinitely.</p>

<p>VoiceXML facilitates this form of reusability by preserving
the separation of state between form elements. In this regard,
VoiceXML and <a href="#ref_HTML" shape="rect">[HTML]</a> are
similar. An HTML table can be copied from one HTML page to
another because the table can be displayed regardless of the
context before or after the table element.</p>

<p>Although parameterizability, modularity, and maintainability
may be sacrificed with this approach, it has the advantage of
being simple, quick, and eminently customizable.</p>

<h2 id="Appendix1l"><a id="dmlAAcknowledge"
name="dmlAAcknowledge" shape="rect">Appendix L
&#8212;Acknowledgements</a></h2>

<p>This W3C specification is based upon VoiceXML 1.0 submitted by
the VoiceXML Forum in May 2000. The VoiceXML Forum authors were:
Linda Boyer, IBM; Peter Danielsen, Lucent Technologies; Jim
Ferrans, Motorola; Gerald Karam, AT&amp;T; David Ladd, Motorola;
Bruce Lucas, IBM; Kenneth Rehor, Lucent Technologies.</p>

<p>This version was written by the participants in the W3C Voice
Browser Working Group. The following have significantly
contributed to writing this specification:</p>

<ul>
<li>Paolo Baggia, Loquendo</li>

<li>Daniel C. Burnett, Nuance Communications</li>

<li>Emily Candell, Comverse</li>

<li>Jerry Carter, Invited Expert</li>

<li>Deborah Dahl, Invited Expert</li>

<li>Peter Danielsen, Lucent (until October 2002)</li>

<li>Martin Dragomirecky, Cisco</li>

<li>Jim Ferrans, Motorola</li>

<li>Andrew Hunt, ScanSoft</li>

<li>Gerald Karam, AT&amp;T</li>

<li>Dave Ladd, Dynamicsoft</li>

<li>Paul Lamere, Sun Microsystems</li>

<li>Bruce Lucas, IBM</li>

<li>Scott McGlashan, HP</li>

<li>Mitsuru Oshima, General Magic</li>

<li>Brad Porter, Tellme</li>

<li>Gavriel Raanan, NMS Communications</li>

<li>Ken Rehor, Vocalocity</li>

<li>Steph Tryphonas, Tellme</li>
</ul>

<p>The Working Group would like to thank Dave Raggett and Jim
Larson for their invaluable management support.</p>

<h2 id="Appendix1m"><a id="dmlAReferences" name="dmlAReferences"
shape="rect">Appendix M &#8212;References</a></h2>

<h2><a id="s_norm-refs" shape="rect">M.1.</a> Normative
References</h2>

<dl>
<dt><a id="ref_CSS2" class="ref" shape="rect">[CSS2]</a></dt>

<dd>" <cite><a href="http://www.w3.org/TR/REC-CSS2/"
shape="rect">Cascading Style Sheets, level 2, CSS2
Specification</a></cite> ", Bos et al. W3C Recommendation, May
1998<br />
 See http://www.w3.org/TR/REC-CSS2/</dd>

<dt><a id="ref_ECMASCRIPT" class="ref"
shape="rect">[ECMASCRIPT]</a></dt>

<dd>" <cite><a
href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"
 shape="rect">Standard ECMA-262 ECMAScript Language
Specification</a></cite> ", Standard ECMA-262, December 1999.<br
clear="none" />
See
http://www.ecma-international.org/publications/standards/Ecma-262.htm</dd>

<dt><a id="ref_RFC1521" class="ref"
shape="rect">[RFC1521]</a></dt>

<dd>" <cite><a href="http://www.ietf.org/rfc/rfc1521.txt"
shape="rect">MIME (Multipurpose Internet Mail Extensions) Part
One: Mechanisms for Specifying and Describing the Format of
Internet Message Bodies</a></cite> ", IETF RFC 1521, 1993<br
clear="none" />
See http://www.ietf.org/rfc/rfc1521.txt</dd>

<dt><a id="ref_RFC2396" class="ref"
shape="rect">[RFC2396]</a></dt>

<dd>" <cite><a href="http://www.ietf.org/rfc/rfc2396.txt"
shape="rect">Uniform Resource Identifiers (URI): Generic
Syntax</a></cite> ", IETF RFC 2396, 1998.<br />
See http://www.ietf.org/rfc/rfc2396.txt</dd>

<dt><a id="ref_RFC2616" class="ref"
shape="rect">[RFC2616]</a></dt>

<dd>" <cite><a href="http://www.ietf.org/rfc/rfc2616.txt"
shape="rect">Hypertext Transfer Protocol -- HTTP/1.1</a></cite>
", IETF RFC 2616, 1999.<br />
See http://www.ietf.org/rfc/rfc2616.txt</dd>

<dt><a id="ref_RFC2806" class="ref"
shape="rect">[RFC2806]</a></dt>

<dd>" <cite><a href="http://www.ietf.org/rfc/rfc2806.txt"
shape="rect">URLs for Telephone Calls</a></cite> ", IETF RFC
2806, 2000.<br />
See http://www.ietf.org/rfc/rfc2806.txt</dd>

<dt><a id="ref_RFC3066" class="ref"
shape="rect">[RFC3066]</a></dt>

<dd>" <cite><a href="http://www.ietf.org/rfc/rfc3066.txt"
shape="rect">Tags for the Identification of Languages</a></cite>
", IETF RFC 3066, 2001.<br />
 <i>Note that <a href="#ref_XML" shape="rect">[XML]</a> adopted
RFC3066 through an <a
href="http://www.w3.org/XML/xml-V10-2e-errata#E11"
shape="rect">errata</a> as of 2001-02-22. RFC3066 obsoletes <a
href="#ref_RFC1766" shape="rect">[RFC1766]</a></i> .<br
clear="none" />
See http://www.ietf.org/rfc/rfc3066.txt</dd>

<dt>[<a id="ref_SCHEMA1" shape="rect">SCHEMA1</a>]</dt>

<dd>" <cite><a
href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/"
shape="rect">XML Schema Part 1: Structures</a></cite> ". Thompson
et al. W3C Recommendation, May 2001.<br />
See http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/</dd>

<dt>[<a id="ref_SRGS" shape="rect">SRGS</a>]</dt>

<dd>" <cite><a
href="http://www.w3.org/TR/2003/PR-speech-grammar-20031218/"
shape="rect">Speech Recognition Grammar Specification Version
1.0</a></cite> ". Hunt and McGlashan. W3C Proposed Recommendation,
December 2003.<br />
 See http://www.w3.org/TR/2003/PR-speech-grammar-20031218/</dd>

<dt>[<a id="ref_SSML" shape="rect">SSML</a>]</dt>

<dd>" <cite><a
href="http://www.w3.org/TR/2003/CR-speech-synthesis-20031218/"
shape="rect">Speech Synthesis Markup Language Version
1.0</a></cite> ". Burnett, Walker and Hunt. W3C Candidate
Recommendation, December 2003.<br />
See http://www.w3.org/TR/2003/CR-speech-synthesis-20031218/</dd>

<dt>[<a id="ref_UNICODE" shape="rect">UNICODE</a>]</dt>

<dd>" <cite><a
href="http://www.unicode.org/unicode/standard/standard.html"
shape="rect">The Unicode Standard</a></cite> ". The Unicode
Consortium.<br />
 See http://www.unicode.org/unicode/standard/standard.html</dd>

<dt>[<a id="ref_XML" shape="rect">XML</a>]</dt>

<dd>" <cite><a href="http://www.w3.org/TR/2000/REC-xml-20001006"
shape="rect">Extensible Markup Language (XML) 1.0</a></cite> ".
Bray et al. W3C Recommendation.<br />
See http://www.w3.org/TR/2000/REC-xml-20001006</dd>

<dt>[<a id="ref_XML-BASE" shape="rect">XML-BASE</a>]</dt>

<dd>" <cite><a
href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/"
shape="rect">XML Base</a></cite> ", J. Marsh, editor, W3C
Recommendation, June 2001.<br />
See http://www.w3.org/TR/2001/REC-xmlbase-20010627/.</dd>

<dt>[<a id="ref_XMLNAMES" shape="rect">XMLNAMES</a>]</dt>

<dd>" <cite><a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/"
shape="rect">Namespaces in XML</a></cite> ". Bray et al. W3C
Recommendation, January 1999.<br />
 See http://www.w3.org/TR/1999/REC-xml-names-19990114/</dd>
</dl>

<h2><a id="s_other-refs" shape="rect">M.2.</a> Informative
References</h2>

<dl>
<dt><a id="ref_ATAGIO" class="ref" shape="rect">[ATAGIO]</a></dt>

<dd>" <cite><a
href="http://www.w3.org/TR/2000/REC-ATAG10-20000203/"
shape="rect">Authoring Tool Accessibility Guidelines
1.0</a></cite> ", Treviranus et al. W3C Recommendation, February
2000.<br />
See http://www.w3.org/TR/2000/REC-ATAG10-20000203/</dd>

<dt><a id="ref_DC" class="ref" shape="rect">[DC]</a></dt>

<dd><cite><a href="http://dublincore.org" shape="rect">"Dublin Core
Metadata Initiative</a></cite> ", a Simple Content Description
Model for Electronic Resources.<br />
 See http://dublincore.org/</dd>

<dt><a id="ref_HTML" class="ref" shape="rect">[HTML]</a></dt>

<dd><cite><a
href="http://www.w3.org/TR/1999/REC-html401-19991224/"
shape="rect">"HTML 4.01 Specification</a></cite> ", Dave Raggett
et al. W3C Recommendation, December 1999.<br />
 See http://www.w3.org/TR/1999/REC-html401-19991224/</dd>

<dt><a id="ref_IANA" class="ref" shape="rect">[IANA]</a></dt>

<dd>" <cite><a
href="http://www.iana.org/assignments/character-sets"
shape="rect">IANA Character Sets</a></cite> ", IANA.<br
clear="none" />
See http://www.iana.org/assignments/character-sets</dd>

<dt><a id="ref_ISO4217" class="ref"
shape="rect">[ISO4217]</a></dt>

<dd>" <cite><a href="http://www.iso.ch/" shape="rect">ISO
4217:2001 Codes for the representation of currencies and
funds</a></cite> ", ISO, 2001<br />
 See http://www.iso.ch/</dd>

<dt><a id="ref_JSAPI" class="ref" shape="rect">[JSAPI]</a></dt>

<dd>" <cite><a
href="http://java.sun.com/products/java-media/speech/index.jsp"
 shape="rect">Java Speech API</a></cite> ", Sun Microsystems,
Inc.<br />
See
http://java.sun.com/products/java-media/speech/index.jsp</dd>

<dt><a id="ref_JSGF" class="ref" shape="rect">[JSGF]</a></dt>

<dd>" <cite><a
href="http://www.w3.org/TR/2000/NOTE-jsgf-20000605/"
shape="rect">JSpeech Grammar Format</a></cite> ", Andrew Hunt,
W3C Note, June 2000.<br />
See http://www.w3.org/TR/2000/NOTE-jsgf-20000605/</dd>

<dt><a id="ref_NLSML" class="ref" shape="rect">[NLSML]</a></dt>

<dd>" <cite><a
href="http://www.w3.org/TR/2000/WD-nl-spec-20001120/"
shape="rect">Natural Language Semantics Markup Language for the
Speech Interface Framework</a></cite> ", Deborah A. Dahl. W3C
Working Draft, November 2000<br />
See http://www.w3.org/TR/2000/WD-nl-spec-20001120/</dd>

<dt><a id="ref_RDF-SYNTAX" class="ref"
shape="rect">[RDF-SYNTAX]</a></dt>

<dd><cite><a href="http://www.w3.org/TR/REC-rdf-syntax/"
shape="rect">"Resource Description Framework (RDF) Model and
Syntax Specification</a></cite> ", Ora Lassila and Ralph R.
Swick. W3C Recommendation, February 1999.<br />
 See http://www.w3.org/TR/REC-rdf-syntax/</dd>

<dt><a id="ref_RDF-SCHEMA" class="ref"
shape="rect">[RDF-SCHEMA]</a></dt>

<dd><cite><a
href="http://www.w3.org/TR/2000/CR-rdf-schema-20000327/"
shape="rect">"Resource Description Framework (RDF) Schema
Specification 1.0</a></cite> ", Dan Brickley and R.V. Guha. W3C
Candidate Recommendation, March 2000.<br />
 See http://www.w3.org/TR/2000/CR-rdf-schema-20000327/</dd>

<dt><a id="ref_RFC1766" class="ref"
shape="rect">[RFC1766]</a></dt>

<dd>" <cite><a href="http://www.ietf.org/rfc/rfc1766.txt"
shape="rect">Tags for the Identification of Languages</a></cite>
", IETF RFC 1766, 1995<br />
 <i>Note that <a href="#ref_XML" shape="rect">[XML]</a> adopted
RFC3066 through an <a
href="http://www.w3.org/XML/xml-V10-2e-errata#E11"
shape="rect">errata</a> as of 2001-02-22. <a href="#ref_RFC3066"
shape="rect">[RFC3066]</a> obsoletes RFC1766</i>.<br
clear="none" />
See http://www.ietf.org/rfc/rfc1766.txt</dd>

<dt><a id="ref_RFC2119" class="ref"
shape="rect">[RFC2119]</a></dt>

<dd>" <cite><a href="http://www.ietf.org/rfc/rfc2119.txt"
shape="rect">Key words for use in RFCs to Indicate Requirement
Levels</a></cite> ", IETF RFC 2119, 1997.<br />
See http://www.ietf.org/rfc/rfc2119.txt</dd>

<dt><a id="ref_RFC2361" class="ref"
shape="rect">[RFC2361]</a></dt>

<dd>" <cite><a href="http://www.ietf.org/rfc/rfc2361.txt"
shape="rect">WAVE and AVI Codec Registries</a></cite> ", IETF RFC
2361, 1998.<br />
See http://www.ietf.org/rfc/rfc2361.txt</dd>

<dt><a id="ref_SISR" class="ref" shape="rect">[SISR]</a></dt>

<dd>" <cite><a
href="http://www.w3.org/TR/2003/WD-semantic-interpretation-20030401/"
 shape="rect">Semantic Interpretation for Speech
Recognition</a></cite> ", Luc Van Tichelen. W3C Working Draft,
April 2003.<br />
See
http://www.w3.org/TR/2003/WD-semantic-interpretation-20030401/</dd>

<dt><a id="ref_UAAGIO" class="ref" shape="rect">[UAAGIO]</a></dt>

<dd>" <cite><a
href="http://www.w3.org/TR/2002/PR-UAAG10-20021016/"
shape="rect">User Agent Accessibility Guidelines 1.0</a></cite>
", Jacobs et al. W3C Proposed Recommendation, October 2002.<br
clear="none" />
See http://www.w3.org/TR/2002/PR-UAAG10-20021016/</dd>

<dt><a id="ref_VOICEXML-1.0" class="ref"
shape="rect">[VOICEXML-1.0]</a></dt>

<dd>" <cite><a
href="http://www.w3.org/TR/2000/NOTE-voicexml-20000505/"
shape="rect">Voice eXtensible Markup Language 1.0</a></cite> ",
Boyer et al, W3C Note, May 2000.<br />
See http://www.w3.org/TR/2000/NOTE-voicexml-20000505/</dd>

<dt><a id="ref_WAI-WEBCONTENT" class="ref"
shape="rect">[WAI-WEBCONTENT]</a></dt>

<dd>" <cite><a href="http://www.w3.org/TR/WAI-WEBCONTENT/"
shape="rect">Web Content Accessibility Guidelines 1.0</a></cite>
", Chisholm et al. W3C Recommendation, May 1999<br
clear="none" />
See http://www.w3.org/TR/WAI-WEBCONTENT/</dd>

<dt><a id="ref_XAG" class="ref" shape="rect">[XAG]</a></dt>

<dd>" <cite><a href="http://www.w3.org/TR/xag.html"
shape="rect">XML Accessibility Guidelines</a></cite> ",
Dardailler et al. W3C Working Draft, October 2002<br
clear="none" />
See http://www.w3.org/TR/xag.html</dd>
</dl>

<h2 id="Appendix1n"><a id="dmlAMediaType" name="dmlAMediaType"
shape="rect">Appendix N &#8212;Media Type and File
Suffix</a></h2>

<p>The W3C Voice Browser Working Group has applied to IETF to
register a media type for VoiceXML. The requested media type is
<i>application/voicexml+xml</i>.</p>

<p>The W3C Voice Browser Working Group has adopted the convention
of using the ".vxml" filename suffix for VoiceXML documents.</p>

<h2 id="Appendix1schema1"><a id="dmlASchema" name="dmlASchema"
shape="rect">Appendix O &#8212;VoiceXML XML Schema Definition</a></h2>

<p><strong>This section is Normative.</strong></p>

<p>The XML Schema definition for VoiceXML is located at <a href="./vxml.xsd"
shape="rect">http://www.w3.org/TR/voicexml20/vxml.xsd</a>.</p>

<p>The VoiceXML schema depends upon other schemas defined in the
VoiceXML namespace:</p>

<ul>
<li><a href="./vxml-datatypes.xsd"
shape="rect">vxml-datatypes.xsd</a> : definition of datatypes
used in the VoiceXML schema</li>

<li><a href="./vxml-attribs.xsd"
shape="rect">vxml-attribs.xsd</a> : definition of attributes and
attribute groups used in the VoiceXML schema</li>

<li><a href="./vxml-grammar-restriction.xsd"
shape="rect">vxml-grammar-restriction.xsd</a>: this schema
references the no-namespace schema of the Speech Recognition
Grammar Specification 1.0 <a href="#ref_SRGS"
shape="rect">[SRGS]</a> and restricts some of its definitions for
embedding in the VoiceXML namespace.</li>

<li><a href="./vxml-grammar-extension.xsd"
shape="rect">vxml-grammar-extension.xsd</a>: this schema
references vxml-grammar-restriction.xsd and extends some of its
definitions for VoiceXML.</li>

<li><a href="./vxml-synthesis-restriction.xsd"
shape="rect">vxml-synthesis-restriction.xsd</a>: this schema
references the no-namespace schema of the Speech Synthesis Markup
Language 1.0 <a href="#ref_SSML" shape="rect">[SSML]</a> and
extends as well as restricts some of its definitions for
embedding in the VoiceXML namespace.</li>

<li><a href="./vxml-synthesis-extension.xsd"
shape="rect">vxml-synthesis-extension.xsd</a>: this schema
references vxml-synthesis-restriction.xsd and extends some of its
definitions for VoiceXML.</li>
</ul>

<p>The complete set of Speech Interface Framework schema required
for VoiceXML 2.0 is available <a href="./vxml-schema.zip"
shape="rect">here</a>.</p>

<h2 id="Appendixbuiltins"><a id="dmlABuiltins"
name="dmlABuiltins" shape="rect">Appendix P &#8212; Builtin
Grammar Types</a></h2>

<p>The &lt;field&gt; type attribute in <a href="#dml2.3.1"
shape="rect">Section 2.3.1</a> is used to specify a builtin
grammar for one of the fundamental types. Platform support for
fundamental builtin grammars is optional. If a platform does
support builtin types, then it must follow the description given
in this appendix as closely as possible, including all the
builtins for a given language.</p>

<p>Each builtin type has a convention for the format of the value
returned. These are independent of language and of the
implementation. The return type for builtin fields is a string
except for the boolean field type. To access the actual
recognition result, the author can reference the &lt;field&gt;
shadow variable <i>name</i>$.utterance. Alternatively, the
developer can access application.lastresult$, where
application.lastresult$.interpretation has the same string value
as application.lastresult$.utterance.</p>

<p>The builtin types are defined in such a way that a VoiceXML
application developer can assume some consistency of user input
across implementations. This permits help messages and other
prompts to be independent of platform in many instances. For
example, the boolean type's grammar should minimally allow
"yes" and "no" responses in English, but each implementation is
free to add other choices, such as "yeah" and "nope".</p>

<p>In cases where an application requires specific behavior or
different behavior than defined for a builtin, it should use an
explicit field grammar. The following are circumstances in which
an application must provide an explicit field grammar in order to
ensure portability of the application with a consistent user
interface:</p>

<ul>
<li>
<p>A platform is not required to implement a grammar that accepts
all possible values that might be returned by a builtin. For
instance, the currency builtin defines the return value
formatting for a very broad range of currencies (<a
href="#ref_ISO4217" shape="rect">[ISO4217]</a>). The platform is
not required to support spoken input that includes any of the
world's currencies since that can negatively impact recognition
accuracy. Similarly, the number builtin can return positive or
negative floating point numbers but the grammar is not required
to support all possible spoken floating point numbers.</p>
</li>

<li>
<p>Builtins are also limited in their ability to handle
underspecified spoken input. For instance, "20 peso" cannot be
resolved to a specific <a href="#ref_ISO4217"
shape="rect">[ISO4217]</a> currency code because the "peso" is
the name of the currency of numerous nations. In such cases the
platform may return a specific currency code according to the
language or may omit the currency code.</p>
</li>
</ul>

<p>All builtin types must support both voice and DTMF entry.</p>

<p>The set of accepted spoken input for each builtin type is
platform dependent and will vary by language.</p>

<p>The value returned by a builtin type can be read out using the
&lt;say-as&gt; element. VoiceXML extends &lt;say-as&gt; in
<a href="#ref_SSML" shape="rect">[SSML]</a> by adding
'interpret-as' values corresponding to each builtin type.
These values take the form "vxml:<i>&lt;type&gt;</i>" where
<i>type</i> is a builtin type. The precise rendering of builtin
types is platform-specific and will vary by language.</p>

<p>The builtin types are:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 66: builtin types">
<caption align="bottom">Table 66: Builtin Types</caption>

<tbody>
<tr>
<th>boolean</th>
<td>Inputs include affirmative and
negative phrases appropriate to the current language. DTMF 1 is
affirmative and 2 is negative. The result is ECMAScript true for
affirmative or false for negative. The value will be submitted as
the string "true" or the string "false". If the field value is
subsequently used in &lt;say-as&gt; with the interpret-as value
"vxml:boolean", it will be spoken as an affirmative or negative
phrase appropriate to the current language.</td>
</tr>

<tr>
<th>date</th>
<td>Valid spoken inputs include phrases
that specify a date, including a month day and year. DTMF inputs
are: four digits for the year, followed by two digits for the
month, and two digits for the day. The result is a fixed-length
date string with format yyyymmdd, e.g. "20000704". If the year is
not specified, yyyy is returned as "????"; if the month is not
specified mm is returned as "??"; and if the day is not specified
dd is returned as "??". If the value is subsequently used in
&lt;say-as&gt; with the interpret-as value "vxml:date", it will
be spoken as date phrase appropriate to the current language.</td>
</tr>

<tr>
<th>digits</th>
<td>Valid spoken or DTMF inputs include
one or more digits, 0 through 9. The result is a string of
digits. If the result is subsequently used in &lt;say-as&gt; with
the interpret-as value "vxml:digits", it will be spoken as a
sequence of digits appropriate to the current language. A user
can say for example "two one two seven", but not "twenty one
hundred and twenty-seven". A platform may support constructs
such as "two double-five eight".</td>
</tr>

<tr>
<th>currency</th>
<td>Valid spoken inputs include phrases
that specify a currency amount. For DTMF input, the "*" key will
act as the decimal point. The result is a string with the format
UUUmm.nn, where UUU is the three character currency indicator
according to ISO standard 4217 <a href="#ref_ISO4217"
shape="rect">[ISO4217]</a>, or mm.nn if the currency is not
spoken by the user or if the currency cannot be reliably
determined (e.g. "dollar" and "peso" are ambiguous). If the field
is subsequently used in &lt;say-as&gt; with the
interpret-as value "vxml:currency", it will be spoken as a
currency amount appropriate to the current language.</td>
</tr>

<tr>
<th>number</th>
<td>Valid spoken inputs include phrases
that specify numbers, such as "one hundred twenty-three", or
"five point three". Valid DTMF input includes positive numbers
entered using digits and "*" to represent a decimal point. The
result is a string of digits from 0 to 9 and may optionally
include a decimal point (".") and/or a plus or minus sign.
ECMAScript automatically converts result strings to numerical
values when used in numerical expressions. The result must not
use a leading zero (which would cause ECMAScript to interpret as
an octal number). If the field is subsequently used in
&lt;say-as&gt; with the interpret-as value "vxml:number", it
will be spoken as a number appropriate to the current
language.</td>
</tr>

<tr>
<th>phone</th>
<td>Valid spoken inputs include phrases
that specify a phone number. DTMF asterisk "*" represents "x".
The result is a string containing a telephone number consisting
of a string of digits and optionally containing the character "x"
to indicate a phone number with an extension. For North America,
a result could be "8005551234x789". If the field is subsequently
used in &lt;say-as&gt; with the interpret-as value "vxml:phone",
it will be spoken as a phone number appropriate to the current
language.</td>
</tr>

<tr>
<th>time</th>
<td>Valid spoken inputs include phrases
that specify a time, including hours and minutes. The result is a
five character string in the format hhmmx, where x is one of "a"
for AM, "p" for PM, "h" to indicate a time specified using 24
hour clock, or "?" to indicate an ambiguous time. Input can be
via DTMF. Because there is no DTMF convention for specifying
AM/PM, in the case of DTMF input, the result will always end with
"h" or "?". If the field is subsequently used in &lt;say-as&gt;
with the interpret-as value "vxml:time", it will be spoken as
a time appropriate to the current language.</td>
</tr>
</tbody>
</table>

<p>An example of a &lt;field&gt; element with a builtin grammar
type:</p>

<pre class="example" xml:space="preserve">
&lt;field name="lo_fat_meal" type="boolean"&gt;

  &lt;prompt&gt;
    Do you want a low fat meal on this flight?
  &lt;/prompt&gt;
  &lt;help&gt;
    Low fat means less than 10 grams of fat, and under
    250 calories.
  &lt;/help&gt;
  &lt;filled&gt;
    &lt;prompt&gt;
      I heard &lt;emphasis&gt;&lt;say-as interpret-as="vxml:boolean"&gt;
      &lt;value expr="lo_fat_meal"/&gt;&lt;/say-as&gt;&lt;/emphasis&gt;.
    &lt;/prompt&gt;
  &lt;/filled&gt;
&lt;/field&gt;
</pre>

<p>In this example, the boolean type indicates that inputs are
various forms of true and false. The value actually put into the
field is either true or false. The field would be read out using
the appropriate affirmative or negative response in prompts.</p>

<p>In the next example, digits indicates that input will be
spoken or keyed digits. The result is stored as a string, and
rendered as digits using the &lt;say-as&gt; with
"vxml:digits" as the value for the interpret-as attribute, i.e., 
"one-two-three", not "one hundred twenty-three". The
&lt;filled&gt; action tests the field to see if it has 12 digits.
If not, the user hears the error message.</p>

<pre class="example" xml:space="preserve">
&lt;field name="ticket_num" type="digits"&gt;
  &lt;prompt&gt;
     Read the 12 digit number from your ticket.
  &lt;/prompt&gt;
  &lt;help&gt;The 12 digit number is to the lower left.&lt;/help&gt;
  &lt;filled&gt;
     &lt;if cond="ticket_num.length != 12"&gt;
       &lt;prompt&gt;
         Sorry, I didn't hear exactly 12 digits.
       &lt;/prompt&gt;
       &lt;assign name="ticket_num" expr="undefined"/&gt;
     &lt;else/&gt;
       &lt;prompt&gt;I heard &lt;say-as interpret-as="vxml:digits"&gt; 
         &lt;value expr="ticket_num"/&gt;&lt;/say-as&gt;
       &lt;/prompt&gt;
     &lt;/if&gt;
  &lt;/filled&gt;
&lt;/field&gt;
</pre>

<p>The builtin boolean grammar and builtin digits grammar can be
parameterized. This is done by explicitly referring to builtin
grammars using a platform-specific builtin URI scheme and using a
URI-style query syntax of the form
<i>type</i>?<i>param</i>=<i>value</i> in the src attribute of a
&lt;grammar&gt; element, or in the type attribute of a field, for
example:</p>

<pre class="example" xml:space="preserve">
&lt;grammar src="builtin:dtmf/boolean?y=7;n=9"/&gt;

&lt;field type="boolean?y=7;n=9"&gt;
   &lt;prompt&gt;
     If this is correct say yes or press seven, if not, say no or press nine.
  &lt;/prompt&gt;
&lt;/field&gt;

&lt;field type="digits?minlength=3;maxlength=5"&gt;
   &lt;prompt&gt;Please enter your passcode&lt;/prompt&gt;
&lt;/field&gt;
</pre>

<p>Where the &lt;grammar&gt; parameterizes the builtin DTMF
grammar, the first &lt;field&gt; parameterizes the builtin DTMF
grammar (the speech grammar will be activated as normal) and the
second &lt;field&gt; parameterizes both builtin DTMF and speech
grammars. Parameters which are undefined for a given grammar type
will be ignored; for example, "builtin:grammar/boolean?y=7".</p>

<p>The digits and boolean grammars can be parameterized as
follows:</p>

<table cellspacing="0" cellpadding="5" width="80%" border="1"
summary="Table 67: digit and boolean grammar parameterization">
<caption align="bottom">Table 67: Digit and Boolean Grammar
Parameterization</caption>

<tbody>
<tr>
<th>digits?minlength=<i>n</i> </th>
<td>A string of at least <i>n</i> digits.
Applicable to speech and DTMF grammars. If minlength conflicts
with either the length or maxlength attributes then a
error.badfetch event is thrown.</td>
</tr>

<tr>
<th>digits?maxlength=<i>n</i> </th>
<td>A string of at most <i>n</i> digits.
Applicable to speech and DTMF grammars. If maxlength conflicts
with either the length or minlength attributes then a
error.badfetch event is thrown.</td>
</tr>

<tr>
<th>digits?length=<i>n</i> </th>
<td>A string of exactly <i>n</i> digits.
Applicable to speech and DTMF grammars. If length conflicts with
either the minlength or maxlength attributes then a
error.badfetch event is thrown.</td>
</tr>

<tr>
<th>boolean?y=<i>d</i> </th>
<td>A grammar that treats the keypress
<i>d</i> as an affirmative answer. Applicable only to the DTMF
grammar.</td>
</tr>

<tr>
<th>boolean?n=<i>d</i> </th>
<td>A grammar that treats the keypress
<i>d</i> as a negative answer. Applicable only to the DTMF
grammar.</td>
</tr>
</tbody>
</table>

<p>Note that more than one parameter may be specified separated
by ";" as illustrated above. When a &lt;grammar&gt; element with
the mode set to "voice" (the default value) is specified in a
&lt;field&gt;, it is in addition to the default speech grammar
mplied by the type attribute of the field. Likewise, when a
&lt;grammar&gt; element with the mode set to "dtmf" is specified
in a &lt;field&gt;, it is in addition to the default DTMF
grammar.</p>

<!--- APPENDICES: END =-->
<div class="navbar">
<hr />
<a href="#toc" shape="rect">table of contents</a></div>
</body>
</html>