index.html 121 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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="EN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Voice Extensible Markup Language (VoiceXML) 2.1</title><style type="text/css">
code           { font-family: monospace; }

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

ol.enumar      { list-style-type: decimal; }
ol.enumla      { list-style-type: lower-alpha; }
ol.enumlr      { list-style-type: lower-roman; }
ol.enumua      { list-style-type: upper-alpha; }
ol.enumur      { list-style-type: upper-roman; }


div.exampleInner pre { margin-left: 1em;
                       margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
                  margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
                   border-top-width: 4px;
                   border-top-style: double;
                   border-top-color: #d3d3d3;
                   border-bottom-width: 4px;
                   border-bottom-style: double;
                   border-bottom-color: #d3d3d3;
                   padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
                    margin: 4px}

.optional {text-decoration: line-through; display: none;}
dt.fm {font-weight: normal; margin-top: 5px;}
.ecma-block {   border: 1px solid black;  color: black;  background-color: #dfdfdf; }
</style><link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-REC.css"></head><body><div class="head"><p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a></p>
<h1><a name="title" id="title"></a>Voice Extensible Markup Language (VoiceXML) 2.1</h1>
<h2><a name="w3c-doctype" id="w3c-doctype"></a>W3C Recommendation 19 June 2007</h2><dl><dt>This version:</dt><dd> 
    <a href="http://www.w3.org/TR/2007/REC-voicexml21-20070619/">http://www.w3.org/TR/2007/REC-voicexml21-20070619/</a> 
    </dd><dt>Latest version:</dt><dd><a href="http://www.w3.org/TR/voicexml21/">http://www.w3.org/TR/voicexml21/</a></dd><dt>Previous version:</dt><dd>
       <a href="http://www.w3.org/TR/2007/PR-voicexml21-20070425/">http://www.w3.org/TR/2007/PR-voicexml21-20070425/</a>
   </dd><dt>Editors:</dt><dd>Matt Oshry, Tellme Networks (<i>Editor-in-Chief</i>) </dd><dd>RJ Auburn, Voxeo Corporation</dd><dd>Paolo Baggia, Loquendo</dd><dd>Michael Bodell, Tellme Networks</dd><dd>David Burke, Voxpilot Ltd.</dd><dd>Daniel C. Burnett, Nuance Communications</dd><dd>Emily Candell, Comverse</dd><dd>Jerry Carter, Nuance Communications</dd><dd>Scott McGlashan, Hewlett-Packard</dd><dd>Alex Lee, Genesys</dd><dd>Brad Porter, Tellme Networks</dd><dd>Ken Rehor, Invited Expert</dd></dl>

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

<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2007 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p></div><hr><div>
<h2><a name="abstract" id="abstract"></a>Abstract</h2><p><em>VoiceXML 2.1</em> 
        specifies a set of 
        features commonly implemented by Voice Extensible Markup Language platforms.         
        This specification is designed to be fully
        backwards-compatible with VoiceXML 2.0 <a href="#ref_VXML2">[VXML2]</a>.
        <span>
        This specification describes only the set of additional features.
        </span>
        </p></div><div>
<h2><a name="status" id="status"></a>Status of this Document</h2><p>
        <em>This section describes the status of this document at the time
        of its publication. Other documents may supersede this document.
        A list of current W3C publications and the latest revision of
        this technical report can be found in the
        <a href="http://www.w3.org/TR/">W3C technical reports
        index</a> at http://www.w3.org/TR/.</em>
      </p>

    <p>
    This is the <a href=
    "http://www.w3.org/2005/10/Process-20051014/tr.html#RecsW3C">Recommendation</a>
    of
    Voice Extensible Markup Language (VoiceXML) 2.1
    specification.

    It has been produced by the
    <a href="http://www.w3.org/Voice/">Voice Browser Working Group</a>,
    which is part of the
    <a href="http://www.w3.org/Voice/Activity.html">Voice Browser Activity</a>.
    </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 design of VoiceXML 2.1 has been widely reviewed (see the <a
    href="http://www.w3.org/TR/2007/PR-voicexml21-20070425/voicexml21-disp.html">
    disposition of comments</a>) and satisfies the Working Group's
    technical requirements.  A list of implementations is included in
    the <a href="http://www.w3.org/Voice/2007/voicexml21-ir/">
    VoiceXML 2.1 Implementation Report</a>, along with the associated test
    suite.

    The Working Group made an editorial change to the
    <a href="http://www.w3.org/TR/2007/PR-voicexml21-20070425/">
    25 April 2007 Proposed Recommendation</a> 
    to update the [<a href="#ref_XMLNAMES">XMLNAMES</a>] reference
    in response to comments.
    </p>

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

    <p>This document was produced by a group operating under the
    <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">
    5 February 2004 W3C Patent Policy</a>.

    W3C maintains a
    <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/34665/status">
    public list of any patent disclosures</a> made in connection with the
    deliverables of the group; that page also includes instructions
    for disclosing a patent.

    An individual who has actual knowledge of a patent which the
    individual believes contains Essential Claim(s) must disclose the
    information in accordance with
    <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
    section 6 of the W3C Patent Policy</a>.</p>

        <p>
          <span>
            The sections in the main body of this document are normative unless otherwise specified.
            The appendices in this document are informative unless otherwise indicated explicitly.
          </span>
        </p></div><div class="toc">
<h2><a name="contents" id="contents"></a>Table of Contents</h2><p class="toc">1 <a href="#sec-intro">Introduction</a><br>
    1.1 <a href="#sec-terminology">Terminology</a><br>
    1.2 <a href="#sec-intro-elements">Elements Introduced or Enhanced in VoiceXML 2.1</a><br>
2 <a href="#sec-grammar_expr">Referencing Grammars Dynamically</a><br>
3 <a href="#sec-script_expr">Referencing Scripts Dynamically</a><br>
4 <a href="#sec-mark">Using &lt;mark&gt; to Detect Barge-in During Prompt Playback</a><br>
5 <a href="#sec-data">Using &lt;data&gt; to Fetch XML Without Requiring a Dialog Transition</a><br>
    5.1 <a href="#sec-data-fetching-props">&lt;data&gt; Fetching Properties</a><br>
6 <a href="#sec-foreach">
  Using &lt;foreach&gt; to Concatenate Prompts and Loop through Executable Content
  </a><br>
7 <a href="#sec-reco_reco">Recording User Utterances While Attempting Recognition</a><br>
    7.1 <a href="#sec-reco_reco-type">Specifying the Media Format of Utterance Recordings</a><br>
8 <a href="#sec-disconnect">Adding namelist to &lt;disconnect&gt;</a><br>
9 <a href="#sec-transfer">Adding type to &lt;transfer&gt;</a><br>
    9.1 <a href="#sec-xfer-consultation">Consultation Transfer</a><br>
    9.2 <a href="#sec-xfer-consultation-err-evt">Consultation Transfer Errors and Events</a><br>
    9.3 <a href="#sec-xfer-consultation-ex">Example of a Consultation Transfer</a><br>
</p>
<h3><a name="appendices" id="appendices"></a>Appendices</h3><p class="toc">A <a href="#sec-dtd">VoiceXML Document Type Definition</a><br>
B <a href="#sec-schema">VoiceXML Schema</a><br>
C <a href="#sec-conform">Conformance</a><br>
    C.1 <a href="#sec-conform-doc">Conforming VoiceXML 2.1 Document</a><br>
    C.2 <a href="#id133371">Using VoiceXML with other namespaces</a><br>
    C.3 <a href="#sec-conform-processor">Conforming VoiceXML 2.1 Processors</a><br>
D <a href="#sec-data-dom">ECMAScript Language Binding for DOM</a><br>
E <a href="#sec-mediatype">VoiceXML Media Type</a><br>
F <a href="#sec-bibliography">References</a><br>
    F.1 <a href="#sec-existing-stds">Normative References</a><br>
    F.2 <a href="#sec-refs-other">Informative References</a><br>
    F.3 <a href="#sec-acks">Acknowledgements</a><br>
G <a href="#sec-changes">Change Summary</a><br>
    G.1 <a href="#sec-changes-wd">Summary of changes since the Last Call Working Draft</a><br>
    G.2 <a href="#sec-changes-cr">Summary of changes since the Candidate Recommendation</a><br>
    G.3 <a href="#sec-changes-wd2">Summary of changes since the second Last Call Working Draft</a><br>
</p></div><hr><div class="body"><div class="div1">
<h2><a name="sec-intro" id="sec-intro"></a>1 Introduction</h2><p>
The popularity of VoiceXML 2.0 <a href="#ref_VXML2">[VXML2]</a> spurred the development of numerous voice browser implementations
early in the specification process. 
<a href="#ref_VXML2">[VXML2]</a> has been phenomenally successful 
in enabling the rapid deployment of voice applications that handle
millions of phone calls every day. This success has led to the development of additional, innovative features 
that help developers build even more powerful voice-activated services.
While it was too late to incorporate these additional features into <a href="#ref_VXML2">[VXML2]</a>,
the purpose of VoiceXML 2.1 is to formally specify the most common features to ensure their portability
between platforms and at the same time maintain complete backwards-compatibility with <a href="#ref_VXML2">[VXML2]</a>.
</p><p>This document defines a set of 8 commonly implemented

  additional features to VoiceXML 2.0 <a href="#ref_VXML2">[VXML2]</a>.</p><div class="div2">
<h3><a name="sec-terminology" id="sec-terminology"></a>1.1 Terminology</h3><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">RFC2119</a>] and indicate requirement levels for 
compliant VoiceXML implementations.
</p></div><div class="div2">
<h3><a name="sec-intro-elements" id="sec-intro-elements"></a>1.2 Elements Introduced or Enhanced in VoiceXML 2.1</h3><p>The following table lists the elements that have been introduced or enhanced in VoiceXML 2.1.
  </p><table border="1" summary="Table 1: Elements Introduced or Enhanced in VoiceXML 2.1"><caption align="bottom">Table 1: Elements Introduced or Enhanced in VoiceXML 2.1</caption><tbody><tr><th>Element</th><th>Purpose</th><th>Section</th><th>New/Enhanced</th></tr><tr><td>&lt;data&gt;</td><td>Fetches arbitrary XML data from a document server.</td><td><a href="#sec-data">5</a></td><td>New</td></tr><tr><td>&lt;disconnect&gt;</td><td>Disconnects a session.</td><td><a href="#sec-disconnect">8</a></td><td>Enhanced</td></tr><tr><td>&lt;grammar&gt;</td><td>References a speech recognition or DTMF grammar.</td><td><a href="#sec-grammar_expr">2</a></td><td>Enhanced</td></tr><tr><td>&lt;foreach&gt;</td><td>Iterates through an ECMAScript array.</td><td><a href="#sec-foreach">6</a></td><td>New</td></tr><tr><td>&lt;mark&gt;</td><td>Declares a bookmark in a sequence of prompts.</td><td><a href="#sec-mark">4</a></td><td>Enhanced</td></tr><tr><td>&lt;property&gt;</td><td>Controls platform settings.</td><td><a href="#sec-data-fetching-props">5.1</a>, <a href="#sec-reco_reco">7</a></td><td>Enhanced</td></tr><tr><td>&lt;script&gt;</td><td>References a document containing client-side ECMAScript.</td><td><a href="#sec-script_expr">3</a></td><td>Enhanced</td></tr><tr><td>&lt;transfer&gt;</td><td>Transfers the user to another destination.</td><td><a href="#sec-transfer">9</a></td><td>Enhanced</td></tr></tbody></table></div></div><div class="div1">
<h2><a name="sec-grammar_expr" id="sec-grammar_expr"></a>2 Referencing Grammars Dynamically</h2><p>
As described in section 
<a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml3.1">3.1</a> of <a href="#ref_VXML2">[VXML2]</a>, 
the &lt;grammar&gt; element allows the specification of a speech recognition or DTMF grammar.
VoiceXML 2.1 extends the &lt;grammar&gt; element to support the following additional attribute:
</p><table border="1" summary="Table 1: grammar attributes"><caption align="bottom">Table 1: &lt;grammar&gt; Attributes</caption><tbody><tr><th>srcexpr</th><td>
Equivalent to src, except that the URI is dynamically determined by evaluating the given ECMAScript expression
<span>in the current scope (e.g. the current form item)</span>. 
The expression must be evaluated each time the grammar needs to be activated.
If srcexpr cannot be evaluated, an <em>error.semantic</em> event is thrown.
</td></tr></tbody></table><p>
Exactly one of "src", "srcexpr", or an inline grammar must be specified; 
otherwise, an <em>error.badfetch</em> event is thrown.
</p><p>
The following example demonstrates capturing a street address.
The first field requests a country, the second field requests a city,
and the third field requests a street.
The grammar for the second field is selected dynamically using the result of the country field.
The grammar for the third field is selected dynamically using the result of the city field.
</p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
  version="2.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
  http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd"&gt;

  &lt;form id="get_address"&gt;
    &lt;field name="country"&gt;
      &lt;grammar type="application/srgs+xml" src="country.grxml"/&gt;
      &lt;prompt&gt;Say a country.&lt;/prompt&gt;
    &lt;/field&gt;

    &lt;field name="city"&gt;
      &lt;grammar type="application/srgs+xml" srcexpr="country + '/cities.grxml'"/&gt;
      &lt;prompt&gt;What city in &lt;value expr="country"/&gt;.&lt;/prompt&gt;
    &lt;/field&gt;

    &lt;field name="street"&gt;
      &lt;grammar type="application/srgs+xml" srcexpr="country + '/' + city + '/streets.grxml'"/&gt;
      &lt;prompt&gt; What street in &lt;value expr="city"/&gt; are you looking for? &lt;/prompt&gt;
    &lt;/field&gt;

    &lt;filled&gt;
      &lt;prompt&gt; 
       You chose 
       &lt;value expr="street"/&gt; 
       in 
       &lt;value expr="city"/&gt; 
       &lt;value expr="country"/&gt;
      &lt;/prompt&gt;
      &lt;exit/&gt;
    &lt;/filled&gt;
  &lt;/form&gt;
&lt;/vxml&gt;</pre></div></div><div class="div1">
<h2><a name="sec-script_expr" id="sec-script_expr"></a>3 Referencing Scripts Dynamically</h2><p>
As described in section 
<a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml5.3.12">5.3.12</a> of <a href="#ref_VXML2">[VXML2]</a>, 
the &lt;script&gt; element allows the specification of a block of
ECMAScript [<a href="#ref_ECMA">ECMA</a>] client-side scripting language code, 
and is analogous to the <a href="#ref_HTML">[HTML4]</a> &lt;SCRIPT&gt; element.
VoiceXML 2.1 extends the &lt;script&gt; element to support the following additional attribute:
</p><table border="1" summary="Table 2: script attributes"><caption align="bottom">Table 2: &lt;script&gt; Attributes</caption><tbody><tr><th>srcexpr</th><td>
Equivalent to src, except that the URI is dynamically determined by evaluating the given ECMAScript expression. 
The expression must be evaluated each time the script needs to be executed.
If srcexpr cannot be evaluated, an <em>error.semantic</em> event is thrown.
</td></tr></tbody></table><p>
Exactly one of "src", "srcexpr", or an inline script must be specified; 
otherwise, an <em>error.badfetch</em> event is thrown.
</p><p>
The following example retrieves a script from a URI that is composed at run-time 
using the variable <em>scripts_baseuri</em>.</p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
  version="2.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
  http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd"&gt;

  &lt;var name="scripts_baseuri" expr="'http://www.example.org/'"/&gt;

  &lt;form&gt;
    &lt;script srcexpr="scripts_baseuri + 'lib/util.js'"/&gt;
  &lt;/form&gt;
&lt;/vxml&gt;</pre></div></div><div class="div1">
<h2><a name="sec-mark" id="sec-mark"></a>4 Using &lt;mark&gt; to Detect Barge-in During Prompt Playback</h2><p>
As described in section <a href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#S3.3.2">3.3.2</a>
of <a href="#ref_SSML">[SSML]</a>, the &lt;mark&gt; element
places a marker into the text/tag sequence. An SSML processor must either allow the 
VoiceXML interpreter to retrieve or must inform the interpreter when a &lt;mark&gt; is 
executed during audio output.
</p><p><a href="#ref_SSML">[SSML]</a> defines a single attribute, "name", on the &lt;mark&gt; element, allowing the 
programmer to name the mark.
VoiceXML 2.1 extends the &lt;mark&gt; element to support the following additional attribute:
</p><table border="1" summary="Table 3: mark attributes"><caption align="bottom">Table 3: &lt;mark&gt; Attributes</caption><tbody><tr><th>nameexpr</th><td>An ECMAScript expression which evaluates to the name of the mark 
<span> when the prompt is queued</span>.
If nameexpr cannot be evaluated, an <em>error.semantic</em> event is thrown.
</td></tr></tbody></table><p>
Exactly one of "name" and "nameexpr" must be specified; otherwise, an <em>error.badfetch</em> event is thrown.
</p><p>
As described in section <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml4.1.1">4.1.1</a>
of <a href="#ref_VXML2">[VXML2]</a>, the &lt;mark&gt; element is permitted 
in conforming VoiceXML documents, but 
<a href="#ref_VXML2">[VXML2]</a> does not specify a standard way for VoiceXML processors 
to access &lt;mark&gt; element information.
Processors of conforming VoiceXML 2.1 documents 
must set the following two properties on
the application.lastresult$ object whenever the application.lastresult$
object is assigned (e.g. a &lt;link&gt; is matched) and a &lt;mark&gt; has been executed.
</p><table border="1" summary="Table 4: mark-related application.lastresult$ properties"><caption align="bottom">Table 4: &lt;mark&gt;-related application.lastresult$ properties</caption><tbody><tr><th>markname</th><td>
The name of the mark last executed
by the SSML processor before barge-in occurred or 
the end of audio playback occurred. 
If no mark was executed, this variable is undefined.
</td></tr><tr><th>marktime</th><td>
The number of milliseconds that elapsed since the last mark was 
executed by the SSML processor
until barge-in occurred or the end of audio playback occurred. 
If no mark was executed, this variable is undefined.</td></tr></tbody></table><p>
When these properties are set on the application.lastresult$ object, if an 
input item (as defined in section <a href="http://www.w3.org/TR/voicexml20/#dml2.3">2.3</a> 
of <a href="#ref_VXML2">[VXML2]</a>) has also been filled and has its shadow 
variables assigned, the interpreter must also assign <em>markname</em> and <em>marktime</em> shadow 
variables, the values of which equal the corresponding properties of the application.lastresult$ object.
</p><p>
When a &lt;mark&gt; is executed during the flushing of the prompt queue as a result of encountering a fetchaudio, 
the application.lastresult$ object should not be modified and no shadow variables should be assigned.
</p><p>
The following example establishes marks at the beginning and at the end of an advertisement. 
In the &lt;filled&gt;, the code checks which mark, if any, was last 
executed when bargein occurred. 
If the "ad_start" mark is executed but "ad_end" is not, 
the code checks that at least 5 seconds of the advertisement has been played 
and sets the played_ad variable appropriately.
</p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
  version="2.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
  http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd"&gt;

  &lt;var name="played_ad" expr="false"/&gt;

  &lt;form&gt;   
    &lt;field name="team"&gt;
      &lt;prompt&gt;
        &lt;mark name="ad_start"/&gt;
        Baseball scores brought to you by Elephant Peanuts.
        There's nothing like the taste of fresh roasted peanuts.
        Elephant Peanuts. Ask for them by name.
        &lt;mark name="ad_end"/&gt;
        &lt;break time="500ms"/&gt;
        Say the name of a team. For example, say Boston Red Sox.
      &lt;/prompt&gt;
  
      &lt;grammar type="application/srgs+xml" src="teams.grxml"/&gt;
  
      &lt;filled&gt;
        &lt;if cond="typeof(team$.markname) == 'string' &amp;amp;&amp;amp;
           (team$.markname=='ad_end' || 
           (team$.markname=='ad_start' &amp;amp;&amp;amp;
              team$.marktime &amp;gt;= 5000))"&gt;
          &lt;assign name="played_ad" expr="true"/&gt;
        &lt;else/&gt;
          &lt;assign name="played_ad" expr="false"/&gt;
        &lt;/if&gt;
      &lt;/filled&gt;
  
    &lt;/field&gt;
  &lt;/form&gt;   

&lt;/vxml&gt;</pre></div></div><div class="div1">
<h2><a name="sec-data" id="sec-data"></a>5 Using &lt;data&gt; to Fetch XML Without Requiring a Dialog Transition</h2><p>
The &lt;data&gt; element allows a VoiceXML application to fetch arbitrary XML data from 
a document server without transitioning to a new VoiceXML document. 
The XML data fetched by the &lt;data&gt; element is bound to ECMAScript 
through the named variable that exposes a read-only subset of
the W3C Document Object Model [<a href="#ref_DOM2">DOM</a>].
</p><p>Attributes of &lt;data&gt; are:</p><table border="1" summary="Table 5: data attributes"><caption align="bottom">Table 5: &lt;data&gt; Attributes</caption><tbody><tr><th>src</th><td>The URI specifying the location of the XML data to retrieve.</td></tr><tr><th>name</th><td>The name of the variable that exposes the DOM.</td></tr><tr><th>srcexpr</th><td>Like src, except that the URI is dynamically determined 
  by evaluating the given ECMAScript expression when the data needs to be fetched.
  If srcexpr cannot be evaluated, an <em>error.semantic</em> event is thrown.
</td></tr><tr><th>method</th><td>The request method: get (the default) or post.</td></tr><tr><th>namelist</th><td>
  The list of variables to submit. 
   
 By default, no 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.
  </td></tr><tr><th>enctype</th><td>The media encoding type of the submitted document. 
  The default is application/x-www-form-urlencoded. 
  Interpreters must also support multipart/form-data [<a href="#ref_RFC2388">RFC2388</a>] and may support additional encoding types.</td></tr><tr><th>fetchaudio</th><td>See <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml6.1">Section 6.1</a> of 
    <a href="#ref_VXML2">[VXML2]</a>.
      <span> This defaults to the fetchaudio property 
      described in <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml6.3.5">Section 6.3.5</a>
      of [<a href="#ref_VXML2">VXML2</a>].
      </span>
    </td></tr><tr><th>fetchhint</th><td>
        See <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml6.1">Section 6.1</a> of 
    <a href="#ref_VXML2">[VXML2]</a>.
  <span>
  This defaults to the datafetchhint property described in <a href="#sec-data-fetching-props">Section 5.1</a>.
    </span>
    </td></tr><tr><th>fetchtimeout</th><td>See <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml6.1">Section 6.1</a> of 
    <a href="#ref_VXML2">[VXML2]</a>.
      <span> This defaults to the fetchtimeout property
      described in <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml6.3.5">Section 6.3.5</a>
      of [<a href="#ref_VXML2">VXML2</a>].
      </span>
    </td></tr><tr><th>maxage</th><td>
  See <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml6.1">Section 6.1</a> of 
    <a href="#ref_VXML2">[VXML2]</a>.
  <span>
  This defaults to the datamaxage property described in <a href="#sec-data-fetching-props">Section 5.1</a>.
    </span>

    </td></tr><tr><th>maxstale</th><td>
  See <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml6.1">Section 6.1</a> of 
    <a href="#ref_VXML2">[VXML2]</a>.
  <span>
  This defaults to the datamaxstale property described in <a href="#sec-data-fetching-props">Section 5.1</a>.
    </span>
    </td></tr></tbody></table><p>Exactly one of "src" or "srcexpr" must be specified; 
otherwise, an <em>error.badfetch</em> event is thrown.
If the content cannot be retrieved, the
interpreter throws an error
as specified for fetch failures in <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml5.2.6">Section 5.2.6</a>
of <a href="#ref_VXML2">[VXML2]</a>. 

</p><p>Platforms should support parsing XML data into a DOM. 
If an implementation does not support DOM, the name attribute must not be set, 
and any retrieved content must be ignored by the interpreter. 
If the name attribute is present, these implementations will throw <em>error.unsupported.data.name</em>.
</p><p>
If the name attribute is present, and the returned document is XML 
<span>as identified by [<a href="#ref_RFC3023">RFC3023</a>]</span>, 
the VoiceXML interpreter must expose the retrieved content via a read-only subset of the DOM as specified 
in <a href="#sec-data-dom">Appendix D</a>.
An interpreter may support additional data formats by recognizing additional media types.
If an interpreter receives a document in a data format that it does not understand, or the data is not well-formed 
as defined by the specification of that format, the interpreter throws <em>error.badfetch</em>.
If the media type of the retrieved content is 
<span> one of those defined in [<a href="#ref_RFC3023">RFC3023</a>]</span>
but the content is not well-formed XML, the interpreter throws <em>error.badfetch</em>.
</p><p>
Like the &lt;var&gt; element, the &lt;data&gt; element can occur in executable content or as a child of 
&lt;form&gt; or &lt;vxml&gt;. In addition, it shares the same scoping rules as the &lt;var&gt; element.
If a &lt;data&gt; element has the same name as a variable already declared in the same scope, 
the variable is assigned a reference to the DOM exposed by the &lt;data&gt; element.</p><p> 
If use of the DOM causes a DOMException to be thrown, but the DOMException is not caught by an ECMAScript 
exception handler, the VoiceXML interpreter throws <em>error.semantic</em>.
</p><p>
Like the &lt;submit&gt; element, 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. 
If a &lt;data&gt; element's namelist contains a variable which references recorded audio 
but does not contain an <em>enctype</em> of multipart/form-data [<a href="#ref_RFC2388">RFC2388</a>], 
the behavior is not specified. It is probably inappropriate to attempt to URL-encode large quantities of data.
</p><p>
If the value of the <em>src</em> or <em>srcexpr</em> attribute includes a fragment identifier, 
the processing of that fragment identifier is platform-specific.
</p><p>In the examples that follow, the XML document fetched by the &lt;data&gt; element is in the following format:</p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;quote xmlns="http://www.example.org"&gt;
  &lt;ticker&gt;F&lt;/ticker&gt;
  &lt;name&gt;Ford Motor Company&lt;/name&gt;
  &lt;change&gt;1.00&lt;/change&gt;
  &lt;last&gt;30.00&lt;/last&gt;
&lt;/quote&gt;</pre></div><p>The following example assigns the value of the "last" element to the ECMAScript variable "price":</p><div class="exampleInner"><pre>&lt;data name="quote" src="quote.xml"/&gt; 
&lt;script&gt;&lt;![CDATA[
  var price = quote.documentElement.getElementsByTagNameNS("http://www.example.org", "last").item(0).firstChild.data;
]]&gt;&lt;/script&gt;</pre></div><p>The data is fetched when the &lt;data&gt; element is executed according to the caching rules
established in <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml6.1">Section 6.1</a> 
of <a href="#ref_VXML2">[VXML2]</a>.
</p><p>
Before exposing the data in an XML document referenced by the &lt;data&gt; element via the DOM, 
the interpreter should check that the referring document is allowed to access the data. 
If access is denied the interpreter must throw <em>error.noauthorization</em>. 

</p><div class="note"><p class="prefix"><b>Note:</b></p>
One strategy commonly implemented in voice browsers to control
access to data is the "access-control" processing instruction
described in the WG Note: 
Authorizing Read Access to XML Content Using the &lt;?access-control?&gt; Processing Instruction 1.0
[<a href="#ref_DATA_AUTH">DATA_AUTH</a>].
</div><p>The following example retrieves a stock quote in one dialog, caches the DOM in a variable at document scope, 
and uses the DOM to playback the quote in another dialog.</p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
  version="2.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
  http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd"&gt;
  &lt;var name="quote"/&gt;
  &lt;var name="ticker" expr="'f'"/&gt;

  &lt;form id="get_quote"&gt;
     &lt;block&gt;
        &lt;data name="quote" srcexpr="'http://www.example.org/getquote?ticker=' + ticker"/&gt;
        &lt;assign name="document.quote" expr="quote.documentElement"/&gt;
        &lt;goto next="#play_quote"/&gt;         
     &lt;/block&gt;
  &lt;/form&gt;

  &lt;form id="play_quote"&gt;

     &lt;script&gt;&lt;![CDATA[
     // retrieve the value contained in the node t from the DOM exposed by d
     function GetData(d, ns, t, nodata)
     {
        try {
           return d.getElementsByTagNameNS(ns, t).item(0).firstChild.data;
        }
        catch(e)
        {
           // the value could not be retrieved, so return this instead
           return nodata;
        }
     }
     ]]&gt;&lt;/script&gt;

     &lt;block&gt;
        &lt;!-- retrieve the change in the stock's value --&gt;
        &lt;var name="change" expr="GetData(quote, 'http://www.example.org', 'change', 0)"/&gt;
        &lt;var name="last" expr="GetData(quote, 'http://www.example.org', 'last', 0)"/&gt;
        &lt;var name="last_parts" expr="last.split('.')"/&gt;

        &lt;!--play the company name --&gt;
        &lt;audio expr="ticker + '.wav'"&gt;&lt;value expr="GetData(quote, 'http://www.example.org', 'name', 'unknown')"/&gt;&lt;/audio&gt;
        &lt;!-- play 'unchanged, 'up', or 'down' based on zero, positive, or negative change --&gt;
        &lt;if cond="change == 0"&gt;
           &lt;audio src="unchanged_at.wav"/&gt;
        &lt;else/&gt;
           &lt;if cond="change &amp;gt; 0"&gt;
              &lt;audio src="up.wav"/&gt;
           &lt;else/&gt; &lt;!-- negative --&gt;
              &lt;audio src="down.wav"/&gt;
           &lt;/if&gt;
           &lt;audio src="by.wav"/&gt;
           &lt;!-- play change in value as positive number --&gt;
           &lt;audio expr="Math.abs(change) + '.wav'"&gt;&lt;value expr="Math.abs(change)"/&gt;&lt;/audio&gt;
           &lt;audio src="to.wav"/&gt;
        &lt;/if&gt;
        &lt;!-- play the current price per share --&gt;
        &lt;audio expr="last_parts[0] + '.wav'"&gt;&lt;value expr="last_parts[0]"/&gt;&lt;/audio&gt;
        &lt;if cond="Number(last_parts[1]) &amp;gt; 0"&gt;
           &lt;audio src="point.wav"/&gt;
           &lt;audio expr="last_parts[1] + '.wav'"&gt;&lt;value expr="last_parts[1]"/&gt;&lt;/audio&gt;
        &lt;/if&gt;
     &lt;/block&gt;
  &lt;/form&gt;
&lt;/vxml&gt;</pre></div><div class="div2">
<h3><a name="sec-data-fetching-props" id="sec-data-fetching-props"></a>5.1 &lt;data&gt; Fetching Properties</h3><p>These properties pertain to documents fetched by the &lt;data&gt; element.</p><table border="1" summary="Table 6: data Fetching Properties"><caption align="bottom">Table 6: &lt;data&gt; Fetching Properties</caption><tbody><tr><th>datafetchhint</th><td>
  Tells the platform whether or not data documents may be pre-fetched. The value is either prefetch (the default), or safe.
  </td></tr><tr><th>datamaxage</th><td>
  Tells the platform the maximum acceptable age, in seconds, of cached documents. The default is platform-specific.
  </td></tr><tr><th>datamaxstale</th><td>
  Tells the platform the maximum acceptable staleness, in seconds, of expired cached data documents. The default is platform-specific.
  </td></tr></tbody></table></div></div><div class="div1">
<h2><a name="sec-foreach" id="sec-foreach"></a>6 
  Using &lt;foreach&gt; to Concatenate Prompts and Loop through Executable Content
  </h2><p>
The &lt;foreach&gt; element 
allows a VoiceXML application to iterate through an ECMAScript array
and to execute the content contained within the &lt;foreach&gt;
element for each item in the array.

<span>
The &lt;foreach&gt; element may appear within executable content and within &lt;prompt&gt; elements. 
Within executable content, except within a &lt;prompt&gt;, the &lt;foreach&gt; element may contain 
any elements of executable content; this introduces basic looping functionality 
by which executable content may be repeated for each element of an array. 
When &lt;foreach&gt; appears within a &lt;prompt&gt; element, 
it may contain only those elements valid within &lt;enumerate&gt; 
(i.e. the same elements allowed within &lt;prompt&gt; less &lt;meta&gt;, &lt;metadata&gt;, and &lt;lexicon&gt;); 
this allows for sophisticated concatenation of prompts as illustrated in this section.
</span>
</p><p>Attributes of &lt;foreach&gt; are:</p><table border="1" summary="Table 7: foreach attributes"><caption align="bottom">Table 7: &lt;foreach&gt; Attributes</caption><tbody><tr><th>array</th><td>
    An ECMAScript expression that must evaluate to an ECMAScript array
    (i.e. the result of the expression must satisfy instanceof(Array) in ECMAScript);
    otherwise, an <em>error.semantic</em> event is thrown.
    Note that the &lt;foreach&gt; element operates on a shallow copy of the array specified by the array attribute.
    </td></tr><tr><th>item</th><td>The variable that stores each array item upon each iteration
    of the loop.  A new variable will be declared if it is not already
    defined within the parent's scope.</td></tr></tbody></table><p>
Both "array" and "item" must be specified; otherwise, an <em>error.badfetch</em> event is thrown.
</p><p>
The iteration process starts from an index of 0 and increments by one 
to an index of array_name.length - 1, where array_name is the name of the shallow copied array 
operated on by the &lt;foreach&gt; element.
For each index, a shallow copy or reference to the corresponding array element is assigned 
to the item variable (i.e. &lt;foreach&gt; assignment is equivalent 
to item = array_name[index] in ECMAScript); 
the assigned value could be undefined for a sparse array. 
VoiceXML 2.1 does not provide break functionality to interrupt a &lt;foreach&gt;.
</p><p>The following example calls a user-defined function GetMovieList
that returns an ECMAScript array. The array is assigned to the variable named 'prompts'.
Upon entering the &lt;field&gt;, if a <em>noinput</em> or a <em>nomatch</em> event occurs, the VoiceXML interpreter reprompts the user
by executing the second &lt;prompt&gt;. The second &lt;prompt&gt; executes the 
&lt;foreach&gt; element
by iterating through the ECMAScript array 'prompts' and assigning each array element to the 
variable 'thePrompt'.
Upon each iteration of the &lt;foreach&gt;, the interpreter executes the contained &lt;audio&gt; and &lt;break&gt;
elements.
</p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml"
  version="2.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
  http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd"&gt;

  &lt;script src="movies.js"/&gt;

  &lt;form id="pick_movie"&gt;
  
    &lt;!-- 
    GetMovieList returns an array of objects
      with properties audio and tts.
      The size of the array is undetermined until runtime.
    --&gt;  
    &lt;var name="prompts" expr="GetMovieList()"/&gt;

    &lt;field name="movie"&gt;
      &lt;grammar type="application/srgs+xml" src="movie_names.grxml"/&gt;
  
      &lt;prompt&gt;Say the name of the movie you want.&lt;/prompt&gt;
  
      &lt;prompt count="2"&gt;
        &lt;audio src="prelist.wav"&gt;When you hear the name of the movie you want, just say it.&lt;/audio&gt;
        &lt;foreach item="thePrompt" array="prompts"&gt;
          &lt;audio expr="thePrompt.audio"&gt;&lt;value expr="thePrompt.tts"/&gt;&lt;/audio&gt;
          &lt;break time="300ms"/&gt;
        &lt;/foreach&gt;
      &lt;/prompt&gt;
  
      &lt;noinput&gt;
        I'm sorry. I didn't hear you.
        &lt;reprompt/&gt;
      &lt;/noinput&gt;
  
      &lt;nomatch&gt;
        I'm sorry. I didn't get that.
        &lt;reprompt/&gt;
      &lt;/nomatch&gt;
  
    &lt;/field&gt;
  &lt;/form&gt;
&lt;/vxml&gt;</pre></div><p>The following is a contrived implementation of the user-defined GetMovieList function:</p><div class="exampleInner"><pre>function GetMovieList()
{
  var movies = new Array(3);
  movies[0] = new Object();
  movies[0].audio = "godfather.wav"; movies[0].tts = "the godfather";
  movies[1] = new Object();
  movies[1].audio = "high_fidelity.wav"; movies[1].tts = "high fidelity";
  movies[2] = new Object();
  movies[2].audio = "raiders.wav"; movies[2].tts = "raiders of the lost ark";
  
  return movies;
}</pre></div><p>When the interpreter queues the second &lt;prompt&gt;, 
it expands the &lt;foreach&gt; element 
in the previous example to the following:</p><div class="exampleInner"><pre>&lt;audio src="godfather.wav"&gt;the godfather&lt;/audio&gt;
&lt;break time="300ms"/&gt;
&lt;audio src="high_fidelity.wav"&gt;high fidelity&lt;/audio&gt;
&lt;break time="300ms"/&gt;
&lt;audio src="raiders.wav"&gt;raiders of the lost ark&lt;/audio&gt;
&lt;break time="300ms"/&gt;</pre></div><p>
The following example combines the use of the &lt;mark&gt; and 
&lt;foreach&gt; elements
to more precisely identify which item in a list of movies the user has selected.
During each iteration of the &lt;foreach&gt;, the interpreter 
stores the current item in the array to the variable <em>movie</em>.
Upon execution of the &lt;mark&gt; element, the name of the &lt;mark&gt; 
is set to the current value of the variable movie_idx which is incremented during each iteration of the loop.</p><p>In the &lt;filled&gt;, if the form item variable <em>mov</em> is set to the value 
"more", indicating the user's desire to hear more detail about the movie name that was played when the user barged in, 
the code retrieves the index of the desired movie in the <em>movies</em> array
from <em>mov$.markname</em>. If barge-in occurred within twenty milliseconds
of the mark's execution, the code retrieves the index of the preceding movie under the assumption that the user was slow to react.
</p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml"
  version="2.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
  http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd"&gt;

  &lt;script src="movies.js"/&gt;

  &lt;form id="list_movies"&gt;
    &lt;!-- fetch the current list of movies, and transform them into an array --&gt;
    &lt;data name="domMovies" src="getmovies.cgi"/&gt;
    &lt;var name="movies" expr="GetMovieList(domMovies)"/&gt;
    &lt;var name="movie_idx" expr="0"/&gt;
    &lt;var name="movie_id"/&gt;
  
    &lt;field name="mov"&gt;
      &lt;prompt&gt;
        Say the name of the movie.
      &lt;/prompt&gt;
  
      &lt;prompt count="2"&gt;
        Here's the list of movies. 
        To hear more about a movie, say 'tell me more'.
        &lt;break time="500ms"/&gt;
        &lt;foreach item="movie" array="movies"&gt;
          &lt;mark nameexpr="movie_idx++"/&gt;
          &lt;audio expr="movie.audio"&gt;&lt;value expr="movie.tts"/&gt;&lt;/audio&gt;
          &lt;break time="500ms"/&gt;
        &lt;/foreach&gt;
      &lt;/prompt&gt;
  
      &lt;grammar type="application/srgs+xml" src="more.grxml"/&gt;
      &lt;grammar type="application/srgs+xml" src="movies.grxml"/&gt;
  
      &lt;catch event="nomatch"&gt;
        Sorry. I didn't get that.
        &lt;reprompt/&gt;
      &lt;/catch&gt;
  
      &lt;catch event="noinput"&gt;
        &lt;reprompt/&gt;
      &lt;/catch&gt;
  
      &lt;filled&gt;
        &lt;if cond="'more' == mov"&gt;
          &lt;!-- user wants more detail --&gt;
          &lt;!-- assume no mark was executed --&gt;
          &lt;assign name="movie_idx" expr="0"/&gt;
          &lt;if cond="mov$.markname != undefined"&gt;
            &lt;!-- alas, a mark was executed, so adjust movie_idx --&gt;
            &lt;if cond="mov$.marktime &amp;lt;= 20"&gt;
              &lt;!-- returns the id of the previous movie (or the first) --&gt;
              &lt;assign name="movie_idx" 
                expr="(mov$.markname &amp;lt;= 1 ? 0 : mov$.markname-1)"/&gt;
            &lt;else/&gt;
              &lt;assign name="movie_idx" expr="mov$.markname"/&gt;
            &lt;/if&gt;
          &lt;/if&gt;          
          &lt;assign name="movie_id" expr="movies[movie_idx].id"/&gt;
        &lt;else/&gt;
          &lt;!-- user said a specific movie --&gt;
          &lt;assign name="movie_id" expr="mov"/&gt;
        &lt;/if&gt;
      &lt;/filled&gt;    
    &lt;/field&gt;

    &lt;!-- 
     Given a movie id, fetch detail, and play it back.
     detail could be in a single wav file or in multiple files.
    --&gt;  
    &lt;block name="play_detail"&gt;
      &lt;!-- GetMovieDetail returns an array of objects with properties audio and tts. --&gt;
      &lt;var name="details" expr="GetMovieDetail(domMovies, movie_id)"/&gt;
      &lt;foreach item="chunk" array="details"&gt;
        &lt;audio expr="chunk.audio"&gt;&lt;value expr="chunk.tts"/&gt;&lt;/audio&gt;
      &lt;/foreach&gt;
    &lt;/block&gt;
  
  &lt;/form&gt;
&lt;/vxml&gt;</pre></div><p>The following is a contrived XML document returned by getmovies.cgi.
The user-defined GetMovieList and GetMovieDetail functions below are implemented
to manipulate the DOM representation of its structure.</p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;movies xmlns="http://www.example.org"&gt;
  &lt;movie id="m0010"&gt;
    &lt;title&gt;
      &lt;tts&gt;the godfather&lt;/tts&gt;
      &lt;wav&gt;godfather.wav&lt;/wav&gt;
    &lt;/title&gt;
    &lt;details&gt;
    &lt;detail&gt;
      &lt;wav&gt;directors/directed_by.wav&lt;/wav&gt;
      &lt;tts&gt;directed by&lt;/tts&gt;
    &lt;/detail&gt;
    &lt;detail&gt;
      &lt;wav&gt;directors/coppola.wav&lt;/wav&gt;
      &lt;tts&gt;francis ford coppola&lt;/tts&gt;
    &lt;/detail&gt;
    &lt;detail&gt;
      &lt;wav&gt;ratings/rated.wav&lt;/wav&gt;
      &lt;tts&gt;rated&lt;/tts&gt;
    &lt;/detail&gt;
    &lt;detail&gt;
      &lt;wav&gt;ratings/r.wav&lt;/wav&gt;
      &lt;tts&gt;r&lt;/tts&gt;&lt;/detail&gt;
    &lt;detail&gt;
      &lt;wav&gt;pauses/300.wav&lt;/wav&gt;
      &lt;tts/&gt;
    &lt;/detail&gt;
    &lt;detail&gt;
      &lt;wav&gt;synopsis/m0010.wav&lt;/wav&gt;
      &lt;tts&gt;a coming of age story about a nice italian boy&lt;/tts&gt;
    &lt;/detail&gt;
    &lt;/details&gt;
  &lt;/movie&gt;
  
  &lt;movie id="m0052"&gt;
    &lt;title&gt;
      &lt;tts&gt;high fidelity&lt;/tts&gt;
      &lt;wav&gt;high_fidelity.wav&lt;/wav&gt;
    &lt;/title&gt;
    &lt;details&gt;
      &lt;!-- details omitted for the sake of brevity --&gt;
    &lt;/details&gt;
  &lt;/movie&gt;
  
  &lt;movie id="m0027"&gt;
   &lt;title&gt;
     &lt;tts&gt;raiders of the lost ark&lt;/tts&gt;
     &lt;wav&gt;raiders.wav&lt;/wav&gt;
   &lt;/title&gt;
    &lt;details&gt;
      &lt;!-- details omitted for the sake of brevity --&gt;
    &lt;/details&gt;
  &lt;/movie&gt;
&lt;/movies&gt;</pre></div><p>The following is an implementation of the user-defined GetMovieList function:</p><div class="exampleInner"><pre>// return an array of user-defined movie objects retrieved from the DOM
function GetMovieList(domMovies) {
  var movies = new Array();
  try {
    var nodeRoot = domMovies.documentElement;
    for (var i = 0; i &lt; nodeRoot.childNodes.length; i++) {
      var nodeChild = nodeRoot.childNodes.item(i);
      if ("movie" != nodeChild.nodeName) {
        continue;
      }
      else {
        var objMovie = new Object(); 
        objMovie.id = nodeChild.getAttributeNS("http://www.example.org" "id");
        var nodeTitle = GetTitle(nodeChild);
        objMovie.audio = GetWav(nodeTitle);
        objMovie.tts = GetTTS(nodeTitle);
        movies.push(objMovie);
      }
    }
  }
  catch(e) {
    // unable to build movie list
    var objError = new Object();
    objError.audio = "nomovies.wav";
    objError.tts = "sorry. no movies are available."
    details.push(objError);
  }
  return movies;
}

function GetTitle(nodeMovie) {
  return GetChild(nodeMovie, "title");
}

function GetTTS(node) {
  return GetInnerText(GetChild(node, "tts"));
}

function GetWav(node) {
  return GetInnerText(GetChild(node, "wav"));
}

// perform a shallow traversal of the node referenced by parent 
// looking for the named node
function GetChild(parent, name)
{
  var target = null;
  for (var i = 0; i &lt; parent.childNodes.length; i++) {
    var child = parent.childNodes.item(i);
    if (child.nodeName == name) {
      target = child;
      break;
    }
  }
  return target;
}

// Given a node, dig the text nodes out and return them as a string
function GetInnerText(node) {
  var s = "";
  if (null == node) {
    return s;
  }

  for (var i = 0; i &lt; node.childNodes.length; i++) {
    var child = node.childNodes.item(i);
    if (Node.TEXT_NODE == child.nodeType || Node.CDATA_SECTION_NODE == child.nodeType) {
      s += child.data;
    }
    else if (Node.ELEMENT_NODE == child.nodeType) {
      s += GetInnerText(child);
    }
  }
  return s;
}</pre></div><p>The following is an implementation of the user-defined GetMovieDetail function:</p><div class="exampleInner"><pre>// get the details about the movie specified by id
function GetMovieDetail(domMovies, id) {
  var details = new Array();
  try {
    var nodeMovie = domMovies.getElementById(id);
    var nodeTitle = GetTitle(nodeMovie);
    var objTitle = new Object();
    objTitle.audio = GetWav(nodeTitle);
    objTitle.tts = GetTTS(nodeTitle);
    details.push(objTitle);
    var nodeDetails = GetChild(nodeMovie, "details");
    for (var i = 0; i &lt; nodeDetails.childNodes.length; i++) {
      var nodeChild = nodeDetails.childNodes.item(i);
      if ("detail" == nodeChild.nodeName) {
        var objDetail = new Object();
        objDetail.audio = GetWav(nodeChild);
        objDetail.tts = GetTTS(nodeChild);
        details.push(objDetail);
      }
    }
  }
  catch(e) {
    // couldn't get movie details
    var objError = new Object();
    objError.audio = "nomovie.wav";
    objError.tts = "sorry. details for that movie are unavailable."
    details.push(objError);
  }

  return details;
}</pre></div><p>When the interpreter queues the second &lt;prompt&gt; in the field named "mov", 
it expands the &lt;foreach&gt; element to the following:</p><div class="exampleInner"><pre>&lt;mark name="0"/&gt;
&lt;audio src="godfather.wav"&gt;the godfather&lt;/audio&gt;
&lt;break time="300ms"/&gt;
&lt;mark name="1"/&gt;
&lt;audio src="high_fidelity.wav"&gt;high fidelity&lt;/audio&gt;
&lt;break time="300ms"/&gt;
&lt;mark name="2"/&gt;
&lt;audio src="raiders.wav"&gt;raiders of the lost ark&lt;/audio&gt;
&lt;break time="300ms"/&gt;</pre></div><p>If the user chooses "The Godfather", 
when the interpreter executes the "play_detail" &lt;block&gt;, it expands the &lt;foreach&gt; element to the following:</p><div class="exampleInner"><pre>&lt;audio src="directors/directed_by.wav"&gt;directed by&lt;/audio&gt;
&lt;audio src="directors/coppola.wav"&gt;francis ford coppola&lt;/audio&gt;
&lt;audio src="ratings/rated.wav"&gt;rated&lt;/audio&gt;
&lt;audio src="ratings/r.wav"&gt;r&lt;/audio&gt;
&lt;audio src="pauses/300.wav"/&gt;
&lt;audio src="synopsis/m0010.wav"&gt;a coming of age story about a nice italian boy&lt;/audio&gt;</pre></div></div><div class="div1">
<h2><a name="sec-reco_reco" id="sec-reco_reco"></a>7 Recording User Utterances While Attempting Recognition</h2><p>
Several elements defined in <a href="#ref_VXML2">[VXML2]</a> can instruct the interpreter to accept user input during execution. 
These elements include &lt;field&gt;, &lt;initial&gt;, &lt;link&gt;, &lt;menu&gt;, &lt;record&gt;, and &lt;transfer&gt;.
VoiceXML 2.1 extends these elements to allow the interpreter to conditionally 
enable recording while simultaneously gathering input from the user.
</p><p>To enable recording during recognition, set the value of the <em>recordutterance</em> property to true.
If the <em>recordutterance</em> property is set to true in the current scope, the following three shadow variables 
are set on the 
<span> application.lastresult$ object whenever the application.lastresult$ object is assigned (e.g. when a &lt;link&gt; is matched):</span>
</p><table border="1" summary="Table 8: recordutterance-related shadow variables"><caption align="bottom">Table 8: recordutterance-related shadow variables </caption><tbody><tr><th>recording</th><td>
The variable that stores a reference to the recording, or undefined if no audio is collected.

<span>
Like the input item variable associated with a &lt;record&gt; element 
as described in section <a href="http://www.w3.org/TR/voicexml20/#dml2.3.6">2.3.6</a> of
<a href="#ref_VXML2">[VXML2]</a>, the implementation of this variable may vary between platforms.

</span>
</td></tr><tr><th>recordingsize</th><td>
The size of the recording in bytes, or undefined if no audio is collected.
</td></tr><tr><th>recordingduration</th><td>
The duration of the recording in milliseconds, or undefined if no audio is collected.
</td></tr></tbody></table><p>
When these properties are set on the application.lastresult$ object, if an 
input item (as defined in section <a href="http://www.w3.org/TR/voicexml20/#dml2.3">2.3</a> 
of <a href="#ref_VXML2">[VXML2]</a>) has also been filled and has its shadow 
variables assigned, the interpreter must also assign <em>recording</em>, <em>recordingsize</em>, and <em>recordingduration</em> shadow 
variables for these input items, the values of which equal the 
corresponding properties of the application.lastresult$ object.  For example, in the 
case of &lt;link&gt; and &lt;menu&gt;, since no input item has its 
shadow variables set, the interpreter only sets the application.lastresult$ 
properties.
</p><p>
Support for this feature is optional on &lt;record&gt;, and &lt;transfer&gt;.
Platforms that support it set the aforementioned shadow variables on the associated form item variable
and the corresponding properties on the application.lastresult$ object
when the <em>recordutterance</em> property is set to true in an encompassing scope.
</p><p>
Like recordings created using the &lt;record&gt; tag, utterance recordings can be played back 
using the expr attribute on &lt;audio&gt;.
</p><p>
Like recordings created using the &lt;record&gt; tag, utterance recordings can be submitted to a document server 
via HTTP POST using the namelist attribute of the &lt;submit&gt;<span>, &lt;data&gt;, </span> and &lt;subdialog&gt; elements. 
The enctype attribute must be set to "multipart/form-data" [<a href="#ref_RFC2388">RFC2388</a>], 
and the method attribute must be set to "post".
To provide flexibility in the naming of the variable that is submitted to the document server,
the interpreter must allow the utterance recording to be assigned to and posted via any valid ECMAScript variable.
</p><p>
In the following example, the dialog requests a city and state from the user.
On the third recognition failure, the recording of the user's utterance is submitted to a document server.
</p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml xmlns="http://www.w3.org/2001/vxml" 
  version="2.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.w3.org/2001/vxml 
  http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd"&gt;
  &lt;form&gt;
    &lt;property name="recordutterance" value="true"/&gt;

    &lt;field name="city_state"&gt;
     &lt;prompt&gt;
      Say a city and state.
     &lt;/prompt&gt;

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

     &lt;nomatch&gt;
      I'm sorry. I didn't get that.
      &lt;reprompt/&gt;
     &lt;/nomatch&gt;

     &lt;nomatch count="3"&gt;
        &lt;var name="the_recording" 
          expr="application.lastresult$.recording"/&gt;
        &lt;submit method="post" 
          enctype="multipart/form-data" 
          next="upload.cgi"
          namelist="the_recording"/&gt;
     &lt;/nomatch&gt;
    &lt;/field&gt;  
  &lt;/form&gt;
&lt;/vxml&gt;</pre></div><div class="div2">
<h3><a name="sec-reco_reco-type" id="sec-reco_reco-type"></a>7.1 Specifying the Media Format of Utterance Recordings</h3><p>To specify the media format of the resulting recording, set the <em>recordutterancetype</em> property. 
Platforms must support the audio file formats specified in Appendix E of [<a href="#ref_VXML2">VXML2</a>]. 
Other formats may also be supported. The <em>recordutterancetype</em> property defaults to a platform-specific 
format which should be one of the required formats. 
If an unsupported media format is encountered during recognition, the platform throws an <em>error.unsupported.format</em> event 
which specifies the unsupported media format in its message variable.
Note that the <em>recordutterancetype</em> property does not affect the &lt;record&gt; element.</p></div></div><div class="div1">
<h2><a name="sec-disconnect" id="sec-disconnect"></a>8 Adding namelist to &lt;disconnect&gt;</h2><p>
As described in section 
<a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml5.3.11">5.3.11</a> of <a href="#ref_VXML2">[VXML2]</a>, 
the &lt;disconnect&gt; element causes the interpreter context to disconnect from the user.
VoiceXML 2.1 extends the &lt;disconnect&gt; element to support the following attribute:
</p><table border="1" summary="Table 9: disconnect attributes"><caption align="bottom">Table 9: &lt;disconnect&gt; Attributes</caption><tbody><tr><th>namelist</th><td>
Variable names to be returned to the 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 <em>error.semantic</em> is thrown 
(<a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml5.1.1">5.1.1</a> of <a href="#ref_VXML2">[VXML2]</a>).
</td></tr></tbody></table><p>
The &lt;disconnect&gt; namelist and the &lt;exit&gt; namelist are processed independently.

<span>
If the interpreter executes both a &lt;disconnect&gt; namelist and an &lt;exit&gt; namelist, 
both sets of variables are available to the interpreter context.
The precise mechanism by which these variables are made available to the interpreter context is platform specific.
</span>
</p></div><div class="div1">
<h2><a name="sec-transfer" id="sec-transfer"></a>9 Adding type to &lt;transfer&gt;</h2><p>
As described in section 
<a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml2.3.7">2.3.7</a> of <a href="#ref_VXML2">[VXML2]</a>, 
the &lt;transfer&gt; element directs the interpreter to connect the caller to another entity.

VoiceXML 2.1 extends the &lt;transfer&gt; element to support the following additional attribute:
</p><table border="1" summary="Table 10: transfer attributes"><caption align="bottom">Table 10: &lt;transfer&gt; Attributes</caption><tbody><tr><th>type</th><td>
The type of transfer. The value can be "bridge", "blind", or "consultation".
</td></tr></tbody></table><p>Exactly one of the "bridge" or "type" attributes may be specified; otherwise an <em>error.badfetch</em> event is thrown.
</p><p>As specified in 
<a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml2.3.7">2.3.7</a> of <a href="#ref_VXML2">[VXML2]</a>,
the &lt;transfer&gt; element is optional, though platforms should support it. 
Platforms that support &lt;transfer&gt; may support any combination of bridge, blind, 
or consultation transfer types.
Platforms supporting consultation transfer may optionally support bargein input modes of 
DTMF, speech recognition, or both, to cancel the call transfer attempt before the outgoing call is connected; 
bargein properties apply as normal. In addition, platforms supporting consultation transfer 
may optionally support the transferaudio attribute to specify the URI of an audio source to play 
while the transfer attempt is in progress and before far-end answer 
If the transferaudio attribute is not supported the behavior is the same as if it were not specified.
</p><p>If the value of the type attribute is set to "bridge", the interpreter's behavior must be identical to its behavior
when the value of the bridge attribute is set to "true".
If the value of the type attribute is set to "blind", the interpreter's behavior must be identical to its behavior
when the bridge attribute is set to "false". The behavior of the bridge attribute is fully specified in 
section <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml2.3.7">2.3.7</a> of <a href="#ref_VXML2">[VXML2]</a>.
If the type attribute is specified and the bridge attribute is absent,
the value of the type attribute takes precedence over the default value of the bridge attribute.
</p><p>
The bridge attribute is maintained for backwards compatibility with <a href="#ref_VXML2">[VXML2]</a>.
Since all of the functionality of the bridge attribute has been incorporated into the type attribute,
developers are encouraged to use the type attribute on platforms that implement it.
</p><p>The connecttimeout attribute of &lt;transfer&gt; applies if the type attribute is set to "bridge" or 
"consultation".</p><p>The maxtime attribute of &lt;transfer&gt; applies if the type attribute is set to "bridge".</p><div class="div2">
<h3><a name="sec-xfer-consultation" id="sec-xfer-consultation"></a>9.1 Consultation Transfer</h3><p>
The consultation transfer is similar 
to a blind transfer except that the outcome of the transfer call setup 
is known and the caller is not dropped as a result of an unsuccessful transfer attempt.
When performing a consultation transfer, 
the platform monitors the progress of the transfer until the connection
is established between caller and callee.
If the connection cannot be established (e.g. no answer, line busy, etc.),
the session remains active and returns control to the application. 
As in the case of a blind transfer, if the connection is established, 
the interpreter disconnects from the session, connection.disconnect.transfer is thrown, 
and document interpretation continues normally.
Any connection between the caller and the callee remains in place regardless of document execution.
<span>
For additional information on call transfers with consultation-like functionality see 
"AT&amp;T Toll Free Transfer Connect" [<a href="#ref_ATT_50075">ATT_50075</a>], 
"MCI Enhanced Call Routing" [<a href="#ref_MCI_ECR">MCI_ECR</a>], 
"ETSI Explicit Call Transfer" [<a href="#ref_ETSI300_369">ETSI300_369</a>], and 
"SIP Attended Transfer" [<a href="#ref_SIP_EX">SIP_EX</a>].
</span>
</p><table><caption align="bottom">Figure 1: Audio Connections during a consultation transfer: &lt;transfer type="consultation"/&gt;</caption><tbody><tr><td><img src="image001.gif" alt="The VoiceXML implementation platform is not part of the audio connection between the caller and callee after a succesfully established consultation transfer."></td></tr></tbody></table><p>The possible outcomes for a consultation transfer before the connection to the callee is established are:</p><table border="1" summary="Table 11: Consultation Transfer Outcomes Prior to Connection Being Established"><caption align="bottom">Table 11: Consultation Transfer Outcomes Prior to Connection Being Established</caption><tbody><tr><th>Action</th><th>Value of form item variable</th><th>Event</th><th>Reason</th></tr><tr><td>caller disconnects</td><td> </td><td>connection.disconnect.hangup</td><td>The caller hung up.</td></tr><tr><td>caller cancels transfer before outgoing call begins</td><td>near_end_disconnect</td><td></td><td>The caller canceled the transfer attempt via a DTMF or voice command 
before the outgoing call begins (during playback of queued audio).</td></tr><tr><td>callee busy</td><td>busy</td><td> </td><td>The callee was busy. </td></tr><tr><td>network busy</td><td>network_busy</td><td> </td><td>An intermediate network refused the call.</td></tr><tr><td>callee does not answer</td><td>noanswer</td><td> </td><td>There was no answer within the time specified by the connecttimeout attribute. </td></tr><tr><td>---</td><td>unknown</td><td> </td><td>The transfer ended but the reason is not known.</td></tr></tbody></table><p>The possible outcomes for a consultation transfer once the connection to the callee is established are:</p><table border="1" summary="Table 12: Consultation Transfer Outcome After Connection Has Been Established"><caption align="bottom">Table 12: Consultation Transfer Outcome After Connection Has Been Established</caption><tbody><tr><th>Action</th><th>Value of form item variable</th><th>Event</th><th>Reason</th></tr><tr><th>transfer begins</th><td>undefined</td><td>connection.disconnect.transfer</td><td>The caller was transferred to another line and will not return.</td></tr></tbody></table></div><div class="div2">
<h3><a name="sec-xfer-consultation-err-evt" id="sec-xfer-consultation-err-evt"></a>9.2 Consultation Transfer Errors and Events</h3><p>One of the following events may be thrown during a consultation transfer:</p><table border="1" summary="Table 13: Events thrown during consultation transfer"><caption align="bottom">Table 13: Events thrown during consultation transfer</caption><tbody><tr><th>Event</th><th>Reason</th></tr><tr><th>connection.disconnect.hangup</th><td>The caller hung up.</td></tr><tr><th>connection.disconnect.transfer</th><td>The caller was transferred to another line and will not return.</td></tr></tbody></table><p>If a consultation transfer could not be made, 
one of the following errors will be thrown:</p><table border="1" summary="Table 14: Consultation transfer attempt error events"><caption align="bottom">Table 14: Consultation transfer attempt error events</caption><tbody><tr><th>Error</th><th>Reason</th></tr><tr><th>error.connection.noauthorization</th><td>The caller is not allowed to call the destination.</td></tr><tr><th>error.connection.baddestination </th><td>The destination URI is malformed.</td></tr><tr><th>error.connection.noroute </th><td>The platform is not able to place a call to the destination.</td></tr><tr><th>error.connection.noresource </th><td>The platform cannot allocate resources to place the call.</td></tr><tr><th>error.connection.<em>protocol</em>.<em>nnn</em></th><td>The protocol stack for this connection raised an exception 
that does not correspond to one of the other error.connection events.</td></tr><tr><th>error.unsupported.transfer.consultation</th><td>The platform does not support consultation transfer.</td></tr><tr><th>error.unsupported.uri</th><td>
The platform does not support the URI format used. 
The special variable _message 
(section <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml5.2.2">5.2.2</a> of <a href="#ref_VXML2">[VXML2]</a>) 
will contain the string "The URI x is not a supported URI format" 
where x is the URI from the dest or destexpr &lt;transfer&gt; attributes.
</td></tr></tbody></table></div><div class="div2">
<h3><a name="sec-xfer-consultation-ex" id="sec-xfer-consultation-ex"></a>9.3 Example of a Consultation Transfer</h3><p>The following example attempts to perform a consultation transfer of the caller to a another party. 
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 prompt queue is flushed, the outgoing call is initiated.
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><table><caption align="bottom">Figure 2: Sequence and timing during an example of a consultation transfer</caption><tbody><tr><td><img src="image002.gif" alt="Sequence and timing diagram during a consultation transfer."></td></tr></tbody></table><p></p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml version="2.1" 
  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/2007/REC-voicexml21-20070619/vxml.xsd"&gt;
&lt;catch event="connection.disconnect.transfer"&gt;
   &lt;!-- far-end answered --&gt;
   &lt;log&gt; Connection with the callee established: transfer executed.&lt;/log&gt;
&lt;/catch&gt;

&lt;form id="consultation_xfer"&gt;
   &lt;block&gt;
     &lt;!-- queued and played before starting the transfer --&gt;
     &lt;prompt&gt;
        Calling Riley.
     &lt;/prompt&gt;
   &lt;/block&gt;
   &lt;!-- Play music while attempting to connect to far-end --&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" type="consultation"&gt;
     &lt;!-- queued and played before starting the transfer --&gt;
     &lt;prompt&gt;
        Please wait...
     &lt;/prompt&gt;
     &lt;filled&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" next="/cgi-bin/report"/&gt;
   &lt;/block&gt;
&lt;/form&gt;
&lt;/vxml&gt;</pre></div></div></div></div><div class="back"><div class="div1">
<h2><a name="sec-dtd" id="sec-dtd"></a>A VoiceXML Document Type Definition</h2><p>
The latest version of the VoiceXML DTD is available at 
<a href="http://www.w3.org/TR/voicexml21/vxml.dtd">http://www.w3.org/TR/voicexml21/vxml.dtd</a>.
For stability it is recommended that you use the dated URI available at 
<a href="http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.dtd">http://www.w3.org/TR/2007/REC-voicexml21-20070619/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><div class="note"><p class="prefix"><b>Note:</b></p>The VoiceXML DTD includes modified elements 
from the DTDs of the Speech Recognition Grammar Specification 1.0 [<a href="#ref_SRGS">SRGS</a>] 
and the Speech Synthesis Markup Language 1.0 [<a href="#ref_SSML">SSML</a>]. 
</div></div><div class="div1">
<h2><a name="sec-schema" id="sec-schema"></a>B VoiceXML Schema</h2><p>This section is normative.</p><p>
The latest version of the VoiceXML schema is available at 
<a href="http://www.w3.org/TR/voicexml21/vxml.xsd">http://www.w3.org/TR/voicexml21/vxml.xsd</a>.
For stability it is recommended that you use the dated URI available at 
<a href="http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd">http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd</a>
as demonstrated throughout the examples in this document.
</p><p>The VoiceXML schema depends upon other schema defined in the VoiceXML namespace:</p><ul><li><a href="vxml-datatypes.xsd">vxml-datatypes.xsd</a>: 
  definition of datatypes used in VoiceXML schema</li><li><a href="vxml-attribs.xsd">vxml-attribs.xsd</a>: 
  definition of attributes and attribute groups used in VoiceXML schema </li><li><a href="vxml-grammar-restriction.xsd">vxml-grammar-restriction.xsd</a>: 
  this schema references the no-namespace schema of the Speech Recognition Grammar Specification 1.0 [<a href="#ref_SRGS">SRGS</a>] and restricts some of its definitions for embedding in the VoiceXML namespace. </li><li><a href="vxml-grammar-extension.xsd">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">vxml-synthesis-restriction.xsd</a>: 
  this schema references the no-namespace schema of the Speech Synthesis Markup Language 1.0 [SSML] and extends as well as restricts some of its definitions for embedding in the VoiceXML namespace. </li><li><a href="vxml-synthesis-extension.xsd">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.1 is available 
<a href="vxml-schema.zip">here</a>.
</p><div class="note"><p class="prefix"><b>Note:</b></p>
In order to accommodate the addition of the nameexpr attribute, 
the name attribute is optional on the &lt;mark&gt; element within VoiceXML 2.1.
It is mandatory in <a href="#ref_SSML">[SSML]</a> and <a href="#ref_VXML2">[VXML2]</a>.
</div></div><div class="div1">
<h2><a name="sec-conform" id="sec-conform"></a>C Conformance</h2><p>This section is normative.</p><div class="div2">
<h3><a name="sec-conform-doc" id="sec-conform-doc"></a>C.1 Conforming VoiceXML 2.1 Document</h3><p>
A VoiceXML 2.1 document is a conforming VoiceXML 2.1 document if it adheres to the specification 
described in this document (Voice Extensible Markup Language (VoiceXML) 2.1 Specification) 
including VoiceXML 2.1's schema (see <a href="#sec-schema">VoiceXML Schema</a>). 
A conforming VoiceXML 2.1 document must meet all of the following criteria:
</p><ol class="enumar"><li>The root element of the document must be the &lt;vxml&gt; element.</li><li>The &lt;vxml&gt; element must include a "version" attribute with the value "2.1".</li><li>The &lt;vxml&gt; element must designate the VoiceXML namespace using the "xmlns" attribute 
[<a href="#ref_XMLNAMES">XMLNAMES</a>]. 
The namespace for VoiceXML is defined to be http://www.w3.org/2001/vxml.</li><li>The document must conform to the constraints expressed in the 
<a href="#sec-schema">VoiceXML 2.1 Schema</a>.
</li><li><span>The </span>&lt;vxml&gt; element 
<span> may </span>also include "xmlns:xsi" and "xsi:schemaLocation" 
attributes to indicate the location of the schema for the VoiceXML namespace. 
If the "xsi:schemaLocation" attribute is present, it must include a reference to the VoiceXML 2.1 Schema:

<div class="exampleInner"><pre>xsi:schemaLocation="http://www.w3.org/2001/vxml 
  http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd"</pre></div><span>
A document is a conforming VoiceXML 2.1 document if it satisfies the requirements of this specification 
(Voice Extensible Markup Language (VoiceXML) 2.1 Specification) and is valid per the 
normative schema identified by 
</span><div class="exampleInner"><pre>http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd</pre></div></li><li>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 <a href="#sec-dtd">VoiceXML 2.1 DTD</a> 
using its Formal Public Identifier. 

<div class="exampleInner"><pre>&lt;!DOCTYPE vxml 
  PUBLIC "-//W3C//DTD VOICEXML 2.1//EN" 
  "http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.dtd"&gt;</pre></div>

The system identifier may be modified appropriately.

<span>
If a document contains this declaration, it must be a valid XML document.

Since the DTD for a document consists of both the external and internal
subset, a document conforming to this specification must not include an internal subset when
referencing the VoiceXML 2.1 DTD.
</span></li></ol><p>Here is an example of a Conforming VoiceXML 2.1 document:</p><div class="exampleInner"><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml version="2.1" 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/2007/REC-voicexml21-20070619/vxml.xsd"&gt;

  &lt;form&gt;
    &lt;block&gt;hello&lt;/block&gt;
  &lt;/form&gt;

&lt;/vxml&gt;</pre></div><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 2.1 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></div><div class="div2">
<h3><a name="id133371" id="id133371"></a>C.2 Using VoiceXML with other namespaces</h3><p>The VoiceXML namespace may be used with other XML namespaces as per [<a href="#ref_XMLNAMES">XMLNAMES</a>], 
although such documents are not strictly conforming VoiceXML 2.1 documents as defined above. 
Future work by W3C will address ways to specify conformance for documents involving multiple namespaces.
</p></div><div class="div2">
<h3><a name="sec-conform-processor" id="sec-conform-processor"></a>C.3 Conforming VoiceXML 2.1 Processors</h3><p>A VoiceXML 2.1 processor is a user agent that can parse and process Conforming VoiceXML 2.1 documents.</p><p>In a Conforming VoiceXML 2.1 Processor, the XML parser must be able to parse and process all well-formed XML 
constructs defined within [<a href="#ref_XML">XML</a>] and [<a href="#ref_XMLNAMES">XMLNAMES</a>]. 
It is not required that a Conforming VoiceXML 2.1 processor use a validating parser.
</p><p>A Conforming VoiceXML 2.1 Processor must be a Conforming Speech Synthesis Markup Language Processor 
[<a href="#ref_SSML">SSML</a>] and a Conforming XML Grammar Processor [<a href="#ref_SRGS">SRGS</a>] 
except for differences described in this document. 
If a syntax error is detected while processing a grammar document, then an <em>error.badfetch</em> event must be thrown.</p><p>A Conforming VoiceXML 2.1 Processor must support the syntax and semantics of all VoiceXML elements as described 
in this document and in [<a href="#ref_VXML2">VXML2</a>]. Consequently, a Conforming VoiceXML 2.1 Processor 
must not throw an <em>error.unsupported.&lt;element&gt;</em> for any VoiceXML element which must be supported 
when processing a Conforming VoiceXML 2.1 Document.
</p><p>When a Conforming VoiceXML 2.1 Processor encounters a Conforming VoiceXML 2.1 Document with non-VoiceXML 
elements or attributes which are proprietary, defined only in versions of VoiceXML earlier than [<a href="#ref_VXML2">VXML2</a>], 
or defined in a non-VoiceXML namespace, and which cannot be processed, then it must throw an <em>error.badfetch</em> event.
</p><p>When a Conforming VoiceXML 2.1 Processor encounters a document with a root element designating a namespace 
other than VoiceXML, its behavior is undefined.</p><p>
When a conforming VoiceXML 2.1 Processor encounters a document 
with a root element of &lt;vxml&gt; with a version attribute with a value other than 2.0 or 2.1, 
its behavior is undefined.
</p><p>There is, however, no conformance requirement with respect to performance characteristics of the VoiceXML 2.1 Processor.</p><p>While the features of VoiceXML 2.1 are orthogonal additions to [<a href="#ref_VXML2">VXML2</a>], 
a VoiceXML application should not
<span>reference </span>
documents of both types.  
The handling of a single application that 
<span> references both</span>
VoiceXML 2.0 and VoiceXML 2.1 
<span>documents </span>
is platform-specific.
Reasonable behavior in this case ranges the gamut from successful execution to the throwing of an error. 
</p><p>
Interpreters that support both VoiceXML 2.0 <span> documents </span> and 
VoiceXML 2.1 <span> documents </span> must support the ability to transition from 
an application of one version to an application of another version.
</p><div class="note"><p class="prefix"><b>Note:</b></p>
The xsd:anyURI type and thus URI references in VoiceXML documents may contain a wide array of international characters. 
Implementers should reference [<a href="#ref_RFC_3987">RFC 3987</a>] and the 
[<a href="#ref_CHARMODEL">CHARMODEL</a>]
in order to provide appropriate support for these characters in VoiceXML documents and when processing 
values of this type or mapping them to URIs.
</div></div></div><div class="div1">
<h2><a name="sec-data-dom" id="sec-data-dom"></a>D ECMAScript Language Binding for DOM</h2><p>This appendix contains the ECMAScript binding for the subset of Level 2 of the <a href="#ref_DOM2">Document Object Model</a>
exposed by the &lt;data&gt; element.</p><div class="ecma-block"><dl><dt>Prototype Object <b>DOMException</b></dt><dd><dl><dt class="fm">The <b>DOMException</b> class has the following constants:</dt><dd><dl><dt><b>DOMException.INDEX_SIZE_ERR</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>1</b>.
          </dd><dt><b>DOMException.DOMSTRING_SIZE_ERR</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>2</b>.
          </dd><dt class="optional"><b>DOMException.HIERARCHY_REQUEST_ERR</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>3</b>.
          </dd><dt class="optional"><b>DOMException.WRONG_DOCUMENT_ERR</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>4</b>.
          </dd><dt class="optional"><b>DOMException.INVALID_CHARACTER_ERR</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>5</b>.
          </dd><dt class="optional"><b>DOMException.NO_DATA_ALLOWED_ERR</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>6</b>.
          </dd><dt><b>DOMException.NO_MODIFICATION_ALLOWED_ERR</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>7</b>.
          </dd><dt><b>DOMException.NOT_FOUND_ERR</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>8</b>.
          </dd><dt><b>DOMException.NOT_SUPPORTED_ERR</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>9</b>.
          </dd><dt class="optional"><b>DOMException.INUSE_ATTRIBUTE_ERR</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>10</b>.
          </dd><dt><b>DOMException.INVALID_STATE_ERR</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>11</b>.
          </dd><dt class="optional"><b>DOMException.SYNTAX_ERR</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>12</b>.
          </dd><dt class="optional"><b>DOMException.INVALID_MODIFICATION_ERR</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>13</b>.
          </dd><dt class="optional"><b>DOMException.NAMESPACE_ERR</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>14</b>.
          </dd><dt class="optional"><b>DOMException.INVALID_ACCESS_ERR</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>15</b>.
          </dd></dl></dd></dl><dl><dt class="fm">The <b>DOMException</b> object has the following properties:</dt><dd><dl><dt><b>code</b></dt><dd>
    This property is 
     of type <b>Number</b>.
    </dd></dl></dd></dl></dd></dl></div><br><div class="optional"><dl><dt>Object <b>DOMImplementation</b></dt><dd><dl><dt class="fm">The <b>DOMImplementation</b> object has the following methods:</dt><dd><dl><dt><b>hasFeature(feature, version)</b></dt><dd>
        This method returns a <b>Boolean</b>.<br>
        The <b>feature</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>version</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt class="optional"><b>createDocumentType(qualifiedName, publicId, systemId)</b></dt><dd class="optional">
        This method returns a <b>DocumentType</b> object.<br>
        The <b>qualifiedName</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>publicId</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>systemId</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>createDocument(namespaceURI, qualifiedName, doctype)</b></dt><dd class="optional">
        This method returns a <b>Document</b> object.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>qualifiedName</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>doctype</b> parameter is 
        a <b>DocumentType</b> object
        .<br>This method can raise a <b>DOMException</b> object.</dd></dl></dd></dl></dd></dl></div><br class="optional"><div class="optional"><dl><dt>Object <b>DocumentFragment</b></dt><dd><dl><dt class="fm"><b>DocumentFragment</b> has all the properties and methods
of the <b>Node</b> object
.</dt></dl></dd></dl></div><br class="optional"><div class="ecma-block"><dl><dt>Object <b>Document</b></dt><dd><dl><dt class="fm"><b>Document</b> has all the properties and methods
of the <b>Node</b> object
 as well as the properties and methods defined below.</dt></dl><dl><dt class="fm">The <b>Document</b> object has the following properties:</dt><dd><dl><dt class="optional"><b>doctype</b></dt><dd class="optional">
    This read-only property is 
     a <b>DocumentType</b> object.
    </dd><dt class="optional"><b>implementation</b></dt><dd class="optional">
    This read-only property is 
     a <b>DOMImplementation</b> object.
    </dd><dt><b>documentElement</b></dt><dd>
    This read-only property is 
     a <b>Element</b> object.
    </dd></dl></dd></dl><dl><dt class="fm">The <b>Document</b> object has the following methods:</dt><dd><dl><dt class="optional"><b>createElement(tagName)</b></dt><dd class="optional">
        This method returns a <b>Element</b> object.<br>
        The <b>tagName</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>createDocumentFragment()</b></dt><dd class="optional">
        This method returns a <b>DocumentFragment</b> object.<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>createTextNode(data)</b></dt><dd class="optional">
        This method returns a <b>Text</b> object.<br>
        The <b>data</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt class="optional"><b>createComment(data)</b></dt><dd class="optional">
        This method returns a <b>Comment</b> object.<br>
        The <b>data</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt class="optional"><b>createCDATASection(data)</b></dt><dd class="optional">
        This method returns a <b>CDATASection</b> object.<br>
        The <b>data</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>createProcessingInstruction(target, data)</b></dt><dd class="optional">
        This method returns a <b>ProcessingInstruction</b> object.<br>
        The <b>target</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>data</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>createAttribute(name)</b></dt><dd class="optional">
        This method returns a <b>Attr</b> object.<br>
        The <b>name</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>createEntityReference(name)</b></dt><dd class="optional">
        This method returns a <b>EntityReference</b> object.<br>
        The <b>name</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt><b>getElementsByTagName(tagname)</b></dt><dd>
        This method returns a <b>NodeList</b> object.<br>
        The <b>tagname</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt class="optional"><b>importNode(importedNode, deep)</b></dt><dd class="optional">
        This method returns a <b>Node</b> object.<br>
        The <b>importedNode</b> parameter is 
        a <b>Node</b> object
        .<br>
        The <b>deep</b> parameter is 
        of type <b>Boolean</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>createElementNS(namespaceURI, qualifiedName)</b></dt><dd class="optional">
        This method returns a <b>Element</b> object.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>qualifiedName</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>createAttributeNS(namespaceURI, qualifiedName)</b></dt><dd class="optional">
        This method returns a <b>Attr</b> object.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>qualifiedName</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt><b>getElementsByTagNameNS(namespaceURI, localName)</b></dt><dd>
        This method returns a <b>NodeList</b> object.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>localName</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt><b>getElementById(elementId)</b></dt><dd>
        This method returns a <b>Element</b> object.<br>
        The <b>elementId</b> parameter is 
        of type <b>String</b>
        .<br></dd></dl></dd></dl></dd></dl></div><br><div class="ecma-block"><dl><dt>Prototype Object <b>Node</b></dt><dd><dl><dt class="fm">The <b>Node</b> class has the following constants:</dt><dd><dl><dt><b>Node.ELEMENT_NODE</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>1</b>.
          </dd><dt><b>Node.ATTRIBUTE_NODE</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>2</b>.
          </dd><dt><b>Node.TEXT_NODE</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>3</b>.
          </dd><dt><b>Node.CDATA_SECTION_NODE</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>4</b>.
          </dd><dt><b>Node.ENTITY_REFERENCE_NODE</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>5</b>.
          </dd><dt class="optional"><b>Node.ENTITY_NODE</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>6</b>.
          </dd><dt><b>Node.PROCESSING_INSTRUCTION_NODE</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>7</b>.
          </dd><dt><b>Node.COMMENT_NODE</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>8</b>.
          </dd><dt><b>Node.DOCUMENT_NODE</b></dt><dd>
          This constant is of type <b>Number</b> and its value is <b>9</b>.
          </dd><dt class="optional"><b>Node.DOCUMENT_TYPE_NODE</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>10</b>.
          </dd><dt class="optional"><b>Node.DOCUMENT_FRAGMENT_NODE</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>11</b>.
          </dd><dt class="optional"><b>Node.NOTATION_NODE</b></dt><dd class="optional">
          This constant is of type <b>Number</b> and its value is <b>12</b>.
          </dd></dl></dd></dl><dl><dt class="fm">The <b>Node</b> object has the following properties:</dt><dd><dl><dt><b>nodeName</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd><dt><b>nodeValue</b></dt><dd>
    This property is 
     of type <b>String</b>.
    This property can raise a <b>DOMException</b> object on retrieval.</dd><dt><b>nodeType</b></dt><dd>
    This read-only property is 
     of type <b>Number</b>.
    </dd><dt><b>parentNode</b></dt><dd>
    This read-only property is 
     a <b>Node</b> object.
    </dd><dt><b>childNodes</b></dt><dd>
    This read-only property is 
     a <b>NodeList</b> object.
    </dd><dt><b>firstChild</b></dt><dd>
    This read-only property is 
     a <b>Node</b> object.
    </dd><dt><b>lastChild</b></dt><dd>
    This read-only property is 
     a <b>Node</b> object.
    </dd><dt><b>previousSibling</b></dt><dd>
    This read-only property is 
     a <b>Node</b> object.
    </dd><dt><b>nextSibling</b></dt><dd>
    This read-only property is 
     a <b>Node</b> object.
    </dd><dt><b>attributes</b></dt><dd>
    This read-only property is 
     a <b>NamedNodeMap</b> object.
    </dd><dt><b>ownerDocument</b></dt><dd>
    This read-only property is 
     a <b>Document</b> object.
    </dd><dt><b>namespaceURI</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd><dt><b>prefix</b></dt><dd>
    This property is 
     of type <b>String</b>.
    </dd><dt><b>localName</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd></dl></dd></dl><dl><dt class="fm">The <b>Node</b> object has the following methods:</dt><dd><dl><dt class="optional"><b>insertBefore(newChild, refChild)</b></dt><dd class="optional">
        This method returns a <b>Node</b> object.<br>
        The <b>newChild</b> parameter is 
        a <b>Node</b> object
        .<br>
        The <b>refChild</b> parameter is 
        a <b>Node</b> object
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>replaceChild(newChild, oldChild)</b></dt><dd class="optional">
        This method returns a <b>Node</b> object.<br>
        The <b>newChild</b> parameter is 
        a <b>Node</b> object
        .<br>
        The <b>oldChild</b> parameter is 
        a <b>Node</b> object
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>removeChild(oldChild)</b></dt><dd class="optional">
        This method returns a <b>Node</b> object.<br>
        The <b>oldChild</b> parameter is 
        a <b>Node</b> object
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>appendChild(newChild)</b></dt><dd class="optional">
        This method returns a <b>Node</b> object.<br>
        The <b>newChild</b> parameter is 
        a <b>Node</b> object
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt><b>hasChildNodes()</b></dt><dd>
        This method returns a <b>Boolean</b>.<br></dd><dt class="optional"><b>cloneNode(deep)</b></dt><dd class="optional">
        This method returns a <b>Node</b> object.<br>
        The <b>deep</b> parameter is 
        of type <b>Boolean</b>
        .<br></dd><dt class="optional"><b>normalize()</b></dt><dd class="optional">This method has no return value.<br></dd><dt class="optional"><b>isSupported(feature, version)</b></dt><dd class="optional">
        This method returns a <b>Boolean</b>.<br>
        The <b>feature</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>version</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt><b>hasAttributes()</b></dt><dd>
        This method returns a <b>Boolean</b>.<br></dd></dl></dd></dl></dd></dl></div><br><div class="ecma-block"><dl><dt>Object <b>NodeList</b></dt><dd><dl><dt class="fm">The <b>NodeList</b> object has the following properties:</dt><dd><dl><dt><b>length</b></dt><dd>
    This read-only property is 
     of type <b>Number</b>.
    </dd></dl></dd></dl><dl><dt class="fm">The <b>NodeList</b> object has the following methods:</dt><dd><dl><dt><b>item(index)</b></dt><dd>
        This method returns a <b>Node</b> object.<br>
        The <b>index</b> parameter is 
        of type <b>Number</b>
        .<br></dd></dl></dd></dl></dd></dl></div><br><div class="ecma-block"><dl><dt>Object <b>NamedNodeMap</b></dt><dd><dl><dt class="fm">The <b>NamedNodeMap</b> object has the following properties:</dt><dd><dl><dt><b>length</b></dt><dd>
    This read-only property is 
     of type <b>Number</b>.
    </dd></dl></dd></dl><dl><dt class="fm">The <b>NamedNodeMap</b> object has the following methods:</dt><dd><dl><dt><b>getNamedItem(name)</b></dt><dd>
        This method returns a <b>Node</b> object.<br>
        The <b>name</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt class="optional"><b>setNamedItem(arg)</b></dt><dd class="optional">
        This method returns a <b>Node</b> object.<br>
        The <b>arg</b> parameter is 
        a <b>Node</b> object
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>removeNamedItem(name)</b></dt><dd class="optional">
        This method returns a <b>Node</b> object.<br>
        The <b>name</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt><b>item(index)</b></dt><dd>
        This method returns a <b>Node</b> object.<br>
        The <b>index</b> parameter is 
        of type <b>Number</b>
        .<br></dd><dt><b>getNamedItemNS(namespaceURI, localName)</b></dt><dd>
        This method returns a <b>Node</b> object.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>localName</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt class="optional"><b>setNamedItemNS(arg)</b></dt><dd class="optional">
        This method returns a <b>Node</b> object.<br>
        The <b>arg</b> parameter is 
        a <b>Node</b> object
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>removeNamedItemNS(namespaceURI, localName)</b></dt><dd class="optional">
        This method returns a <b>Node</b> object.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>localName</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd></dl></dd></dl></dd></dl></div><br><div class="ecma-block"><dl><dt>Object <b>CharacterData</b></dt><dd><dl><dt class="fm"><b>CharacterData</b> has all the properties and methods
of the <b>Node</b> object
 as well as the properties and methods defined below.</dt></dl><dl><dt class="fm">The <b>CharacterData</b> object has the following properties:</dt><dd><dl><dt><b>data</b></dt><dd>
    This property is 
     of type <b>String</b>.
    This property can raise a <b>DOMException</b> object on retrieval.</dd><dt><b>length</b></dt><dd>
    This read-only property is 
     of type <b>Number</b>.
    </dd></dl></dd></dl><dl><dt class="fm">The <b>CharacterData</b> object has the following methods:</dt><dd><dl><dt><b>substringData(offset, count)</b></dt><dd>
        This method returns a <b>String</b>.<br>
        The <b>offset</b> parameter is 
        of type <b>Number</b>
        .<br>
        The <b>count</b> parameter is 
        of type <b>Number</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>appendData(arg)</b></dt><dd class="optional">This method has no return value.<br>
        The <b>arg</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>insertData(offset, arg)</b></dt><dd class="optional">This method has no return value.<br>
        The <b>offset</b> parameter is 
        of type <b>Number</b>
        .<br>
        The <b>arg</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>deleteData(offset, count)</b></dt><dd class="optional">This method has no return value.<br>
        The <b>offset</b> parameter is 
        of type <b>Number</b>
        .<br>
        The <b>count</b> parameter is 
        of type <b>Number</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>replaceData(offset, count, arg)</b></dt><dd class="optional">This method has no return value.<br>
        The <b>offset</b> parameter is 
        of type <b>Number</b>
        .<br>
        The <b>count</b> parameter is 
        of type <b>Number</b>
        .<br>
        The <b>arg</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd></dl></dd></dl></dd></dl></div><br><div class="ecma-block"><dl><dt>Object <b>Attr</b></dt><dd><dl><dt class="fm"><b>Attr</b> has all the properties and methods
of the <b>Node</b> object
 as well as the properties and methods defined below.</dt></dl><dl><dt class="fm">The <b>Attr</b> object has the following properties:</dt><dd><dl><dt><b>name</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd><dt><b>specified</b></dt><dd>
    This read-only property is 
     of type <b>Boolean</b>.
    </dd><dt><b>value</b></dt><dd>
    This property is 
     of type <b>String</b>.
    </dd><dt><b>ownerElement</b></dt><dd>
    This read-only property is 
     a <b>Element</b> object.
    </dd></dl></dd></dl></dd></dl></div><br><div class="ecma-block"><dl><dt>Object <b>Element</b></dt><dd><dl><dt class="fm"><b>Element</b> has all the properties and methods
of the <b>Node</b> object
 as well as the properties and methods defined below.</dt></dl><dl><dt class="fm">The <b>Element</b> object has the following properties:</dt><dd><dl><dt><b>tagName</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd></dl></dd></dl><dl><dt class="fm">The <b>Element</b> object has the following methods:</dt><dd><dl><dt><b>getAttribute(name)</b></dt><dd>
        This method returns a <b>String</b>.<br>
        The <b>name</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt class="optional"><b>setAttribute(name, value)</b></dt><dd class="optional">This method has no return value.<br>
        The <b>name</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>value</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>removeAttribute(name)</b></dt><dd class="optional">This method has no return value.<br>
        The <b>name</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt><b>getAttributeNode(name)</b></dt><dd>
        This method returns a <b>Attr</b> object.<br>
        The <b>name</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt class="optional"><b>setAttributeNode(newAttr)</b></dt><dd class="optional">
        This method returns a <b>Attr</b> object.<br>
        The <b>newAttr</b> parameter is 
        a <b>Attr</b> object
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>removeAttributeNode(oldAttr)</b></dt><dd class="optional">
        This method returns a <b>Attr</b> object.<br>
        The <b>oldAttr</b> parameter is 
        a <b>Attr</b> object
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt><b>getElementsByTagName(name)</b></dt><dd>
        This method returns a <b>NodeList</b> object.<br>
        The <b>name</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt><b>getAttributeNS(namespaceURI, localName)</b></dt><dd>
        This method returns a <b>String</b>.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>localName</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt class="optional"><b>setAttributeNS(namespaceURI, qualifiedName, value)</b></dt><dd class="optional">This method has no return value.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>qualifiedName</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>value</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt class="optional"><b>removeAttributeNS(namespaceURI, localName)</b></dt><dd class="optional">This method has no return value.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>localName</b> parameter is 
        of type <b>String</b>
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt><b>getAttributeNodeNS(namespaceURI, localName)</b></dt><dd>
        This method returns a <b>Attr</b> object.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>localName</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt class="optional"><b>setAttributeNodeNS(newAttr)</b></dt><dd class="optional">
        This method returns a <b>Attr</b> object.<br>
        The <b>newAttr</b> parameter is 
        a <b>Attr</b> object
        .<br>This method can raise a <b>DOMException</b> object.</dd><dt><b>getElementsByTagNameNS(namespaceURI, localName)</b></dt><dd>
        This method returns a <b>NodeList</b> object.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>localName</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt><b>hasAttribute(name)</b></dt><dd>
        This method returns a <b>Boolean</b>.<br>
        The <b>name</b> parameter is 
        of type <b>String</b>
        .<br></dd><dt><b>hasAttributeNS(namespaceURI, localName)</b></dt><dd>
        This method returns a <b>Boolean</b>.<br>
        The <b>namespaceURI</b> parameter is 
        of type <b>String</b>
        .<br>
        The <b>localName</b> parameter is 
        of type <b>String</b>
        .<br></dd></dl></dd></dl></dd></dl></div><br><div class="ecma-block"><dl><dt>Object <b>Text</b></dt><dd><dl><dt class="fm"><b>Text</b> has all the properties and methods
of the <b>CharacterData</b> object
.</dt></dl></dd></dl></div><br><div class="ecma-block"><dl><dt>Object <b>Comment</b></dt><dd><dl><dt class="fm"><b>Comment</b> has all the properties and methods
of the <b>CharacterData</b> object
.</dt></dl></dd></dl></div><br><div class="ecma-block"><dl><dt>Object <b>CDATASection</b></dt><dd><dl><dt class="fm"><b>CDATASection</b> has all the properties and methods
of the <b>Text</b> object
.</dt></dl></dd></dl></div><br><div class="optional"><dl><dt>Object <b>DocumentType</b></dt><dd><dl><dt class="fm"><b>DocumentType</b> has all the properties and methods
of the <b>Node</b> object
 as well as the properties and methods defined below.</dt></dl><dl><dt class="fm">The <b>DocumentType</b> object has the following properties:</dt><dd><dl><dt><b>name</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd><dt><b>entities</b></dt><dd>
    This read-only property is 
     a <b>NamedNodeMap</b> object.
    </dd><dt><b>notations</b></dt><dd>
    This read-only property is 
     a <b>NamedNodeMap</b> object.
    </dd><dt><b>publicId</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd><dt><b>systemId</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd><dt><b>internalSubset</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd></dl></dd></dl></dd></dl></div><br class="optional"><div class="optional"><dl><dt>Object <b>Notation</b></dt><dd><dl><dt class="fm"><b>Notation</b> has all the properties and methods
of the <b>Node</b> object
 as well as the properties and methods defined below.</dt></dl><dl><dt class="fm">The <b>Notation</b> object has the following properties:</dt><dd><dl><dt><b>publicId</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd><dt><b>systemId</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd></dl></dd></dl></dd></dl></div><br class="optional"><div class="optional"><dl><dt>Object <b>Entity</b></dt><dd><dl><dt class="fm"><b>Entity</b> has all the properties and methods
of the <b>Node</b> object
 as well as the properties and methods defined below.</dt></dl><dl><dt class="fm">The <b>Entity</b> object has the following properties:</dt><dd><dl><dt><b>publicId</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd><dt><b>systemId</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd><dt><b>notationName</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd></dl></dd></dl></dd></dl></div><br class="optional"><div class="ecma-block"><dl><dt>Object <b>EntityReference</b></dt><dd><dl><dt class="fm"><b>EntityReference</b> has all the properties and methods
of the <b>Node</b> object
.</dt></dl></dd></dl></div><br><div class="ecma-block"><dl><dt>Object <b>ProcessingInstruction</b></dt><dd><dl><dt class="fm"><b>ProcessingInstruction</b> has all the properties and methods
of the <b>Node</b> object
 as well as the properties and methods defined below.</dt></dl><dl><dt class="fm">The <b>ProcessingInstruction</b> object has the following properties:</dt><dd><dl><dt><b>target</b></dt><dd>
    This read-only property is 
     of type <b>String</b>.
    </dd><dt><b>data</b></dt><dd>
    This property is 
     of type <b>String</b>.
    </dd></dl></dd></dl></dd></dl></div><br></div><div class="div1">
<h2><a name="sec-mediatype" id="sec-mediatype"></a>E VoiceXML Media Type</h2><p>This section is Normative.</p><p>
The media type for VoiceXML is "application/voicexml+xml" as specified in <a href="#ref_RFC4267">[RFC4267]</a>.
</p></div><div class="div1">
<h2><a name="sec-bibliography" id="sec-bibliography"></a>F References</h2><div class="div2">
<h3><a name="sec-existing-stds" id="sec-existing-stds"></a>F.1 Normative References</h3><dl><dt class="label"><a name="ref_DOM2" id="ref_DOM2"></a>DOM2</dt><dd><a href="http://www.w3.org/TR/DOM-Level-2-Core/">DOM Level 2</a>,
ed. Arnaud Le Hors et al. W3C Recommendation, November 2000.
See <a href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a>.
</dd><dt class="label"><a name="ref_ECMA" id="ref_ECMA"></a>ECMA</dt><dd>
<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">Standard ECMA-262 ECMAScript Language Specification</a>, December 1999.
See <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a>.
</dd><dt class="label"><a name="ref_SRGS" id="ref_SRGS"></a>SRGS</dt><dd><a href="http://www.w3.org/TR/2004/REC-speech-grammar-20040316/">Speech Recognition Grammar Specification Version 1.0</a>,
ed. Andrew Hunt and Scott McGlashan  W3C Recommendation, March 2004.
See <a href="http://www.w3.org/TR/2004/REC-speech-grammar-20040316/">http://www.w3.org/TR/2004/REC-speech-grammar-20040316/</a>.
</dd><dt class="label"><a name="ref_SSML" id="ref_SSML"></a>SSML</dt><dd><a href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/">Speech Synthesis Markup Language</a>,
ed. Daniel C. Burnett et al. W3C Recommendation, September 2004.
See <a href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/">http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/</a>.
</dd><dt class="label"><a name="ref_RFC2119" id="ref_RFC2119"></a>RFC2119</dt><dd><a href="http://www.ietf.org/rfc/rfc2119.txt">Key words for use in RFCs to Indicate Requirement Levels</a>,
ed. S. Bradner, March 1997.
See <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>.
</dd><dt class="label"><a name="ref_RFC2388" id="ref_RFC2388"></a>RFC2388</dt><dd><a href="http://www.ietf.org/rfc/rfc2388.txt">Returning Values from Forms:  multipart/form-data</a>,
ed. L. Masinter, August 1998.
See <a href="http://www.ietf.org/rfc/rfc2388.txt">http://www.ietf.org/rfc/rfc2388.txt</a>.
</dd><dt class="label"><a name="ref_RFC2616" id="ref_RFC2616"></a>RFC2616</dt><dd><a href="http://www.ietf.org/rfc/rfc2616.txt">Hypertext Transfer Protocol -- HTTP/1.1</a>,
ed. R. Fielding et al. IETF RFC 2616, June 1999.
See <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a>.
</dd><dt class="label"><a name="ref_RFC3023" id="ref_RFC3023"></a>RFC3023</dt><dd><a href="http://www.ietf.org/rfc/rfc3023.txt">XML Media Types</a>,
ed. M. Murata et al. IETF RFC 3023, January 2001.
See <a href="http://www.ietf.org/rfc/rfc3023.txt">http://www.ietf.org/rfc/rfc3023.txt</a>.
</dd><dt class="label"><a name="ref_RFC4267" id="ref_RFC4267"></a>RFC4267</dt><dd><a href="http://www.ietf.org/rfc/rfc4267.txt">The W3C Speech Interface Framework Media Types</a>,
ed. M. Froumentin. IETF RFC 4267, November 2005.
See <a href="http://www.ietf.org/rfc/rfc4267.txt">http://www.ietf.org/rfc/rfc4267.txt</a>.
</dd><dt class="label"><a name="ref_VXML2" id="ref_VXML2"></a>VXML2</dt><dd><a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/">VoiceXML 2.0</a>,
ed. Scott McGlashan et al. W3C Recommendation, March 2004.
See <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/">http://www.w3.org/TR/2004/REC-voicexml20-20040316/</a>.
</dd><dt class="label"><a name="ref_XML" id="ref_XML"></a>XML</dt><dd>
<a href="http://www.w3.org/TR/2004/REC-xml-20040204/">Extensible Markup Language (XML) 1.0</a>,
ed. Tim Bray et al. W3C Recommendation, February 2004.
See <a href="http://www.w3.org/TR/2004/REC-xml-20040204/">http://www.w3.org/TR/2004/REC-xml-20040204/</a>.
</dd><dt class="label"><a name="ref_XMLNAMES" id="ref_XMLNAMES"></a>XMLNAMES</dt><dd>
<cite><a
href="http://www.w3.org/TR/2006/REC-xml-names-20060816/">Namespaces in
XML 1.0 (Second Edition)</a></cite>, T. Bray, D. Hollander, A. Layman,
R. Tobin, Editors, W3C Recommendation, 16 August 2006,
http://www.w3.org/TR/2006/REC-xml-names-20060816/ . <a href="http://www.w3.org/TR/xml-names/" title="Namespaces in XML">Latest version</a> available at
    http://www.w3.org/TR/xml-names/ .
</dd></dl></div><div class="div2">
<h3><a name="sec-refs-other" id="sec-refs-other"></a>F.2 Informative References</h3><dl><dt class="label"><a name="ref_ATT_50075" id="ref_ATT_50075"></a>ATT_50075</dt><dd><a href="http://www.att.com/cpetesting/pdf/tr50075.pdf">AT&amp;T Toll Free Transfer Connect (TR 50075)</a>,
September 1999.
See <a href="http://www.att.com/cpetesting/pdf/tr50075.pdf">http://www.att.com/cpetesting/pdf/tr50075.pdf</a>.
</dd><dt class="label"><a name="ref_CHARMODEL" id="ref_CHARMODEL"></a>CHARMODEL</dt><dd>
<a href="http://www.w3.org/TR/2004/CR-charmod-resid-20041122/">Character Model for the World Wide Web 1.0: Resource Identifiers</a>,
ed. Martin Duerst et al. W3C Candidate Recommendation, November 2004.
See <a href="http://www.w3.org/TR/2004/CR-charmod-resid-20041122/">http://www.w3.org/TR/2004/CR-charmod-resid-20041122/</a>.
</dd><dt class="label"><a name="ref_DATA_AUTH" id="ref_DATA_AUTH"></a>DATA_AUTH</dt><dd>
<a href="http://www.w3.org/TR/2005/NOTE-access-control-20050613/">Authorizing Read Access to XML Content Using the &lt;?access-control?&gt; Processing Instruction</a>,
ed. Matt Oshry et al. W3C Note, June 2005.
See <a href="http://www.w3.org/TR/2005/NOTE-access-control-20050613/">http://www.w3.org/TR/2005/NOTE-access-control-20050613/</a>.
</dd><dt class="label"><a name="ref_ETSI300_369" id="ref_ETSI300_369"></a>ETSI300_369</dt><dd><a href="http://www.etsi.org/">ETS 300 369-1: Integrated Services Digital Network (ISDN);Explicit Call Transfer (ECT) supplementary service;Digital Subscriber Signalling System No. one (DSS1) protocol;Part 1: Protocol specification</a>,
May 1995.
See <a href="http://www.etsi.org/">http://www.etsi.org/</a>.
</dd><dt class="label"><a name="ref_HTML" id="ref_HTML"></a>HTML4</dt><dd><a href="http://www.w3.org/TR/1999/REC-html401-19991224/">HTML 4.01</a>,
ed. Dave Raggett et al. W3C Recommendation, December 1999.
See <a href="http://www.w3.org/TR/1999/REC-html401-19991224/">http://www.w3.org/TR/1999/REC-html401-19991224/</a>.
</dd><dt class="label"><a name="ref_MCI_ECR" id="ref_MCI_ECR"></a>MCI_ECR</dt><dd><a href="http://global.mci.com/wholesale/us/voice/enhancedcallrouting/">MCI Enhanced Call Routing</a>,
See <a href="http://global.mci.com/wholesale/us/voice/enhancedcallrouting/">http://global.mci.com/wholesale/us/voice/enhancedcallrouting/</a>.
</dd><dt class="label"><a name="ref_RFC_3987" id="ref_RFC_3987"></a>RFC3987</dt><dd><a href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource Identifiers (IRIs)</a>,
ed. M. Duerst, January 2005.
See <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a>.
</dd><dt class="label"><a name="ref_SIP_EX" id="ref_SIP_EX"></a>SIP_EX</dt><dd>
<a href="http://www.softfront.co.jp/tech/ietfdoc/org/draft-ietf-sipping-service-examples-10.txt">Session Initiation Protocol Service Examples</a>,
ed. A. Johnston et al. Internet-Draft, March 2006.
See <a href="http://www.softfront.co.jp/tech/ietfdoc/org/draft-ietf-sipping-service-examples-10.txt">http://www.softfront.co.jp/tech/ietfdoc/org/draft-ietf-sipping-service-examples-10.txt</a>.
</dd></dl></div><div class="div2">
<h3><a name="sec-acks" id="sec-acks"></a>F.3 Acknowledgements</h3><p>
VoiceXML 2.1 was written by the participants in the W3C Voice Browser Working Group. 
The following have significantly contributed to writing this specification:
</p><ul><li>Matt Oshry, Tellme Networks</li><li>RJ Auburn, Voxeo Corporation</li><li>Paolo Baggia, Loquendo</li><li>Michael Bodell, Tellme Networks</li><li>David Burke, Voxpilot Ltd.</li><li>Daniel C. Burnett, Invited Expert</li><li>Emily Candell, Comverse</li><li>Ken Davies, HeyAnita</li><li>Jim Ferrans, Motorola</li><li>Jeff Haynie, Vocalocity</li><li>Matt Henry, Voxeo Corporation</li><li>Hakan Kilic, Scansoft</li><li>Scott McGlashan, Hewlett-Packard</li><li>Brien Muschett, IBM</li><li>Rob Marchand, VoiceGenie</li><li>Jeff Kusnitz, IBM</li><li>Brad Porter, Tellme Networks</li><li>Ken Rehor, Invited Expert</li><li>Laura Ricotti, Loquendo</li><li>Davide Tosello, Loquendo</li><li>Milan Young, Nuance</li></ul></div></div><div class="div1">
<h2><a name="sec-changes" id="sec-changes"></a>G Change Summary</h2><div class="div2">
<h3><a name="sec-changes-wd" id="sec-changes-wd"></a>G.1 Summary of changes since the Last Call Working Draft</h3><p>
The following is a summary of the major changes since the Last Call Working Draft was published.
</p><ul><li> Added informative references to transfer specifications similar to consultation type transfer.</li><li> Moved description of mechanism for securing access to XML data (access-control PI) to W3C NOTE.</li><li> Made HTML4 ref informative.</li><li> Added normative reference to RFC 2119 and described usage of 'must', 'may', 'should' in Status</li><li> Added Elements table.</li><li> Added datafetchhint, datamaxstale, and datamaxage properties and specified defaults
  for fetchtimeout, fetchaudio, fetchhint, maxstale, and maxage properties of &lt;data&gt;.</li><li> Clarified lastresult$ and shadow variable assignment behavior with respect to utterance recordings.</li><li> Clarified relationship between fetchaudio and mark-related lastresult$ properties and shadow variables.</li><li> Clarified interaction between interpreter and interpreter context when both disconnect namelist and exit namelist occur.</li><li> Clarified scope in which grammar srcexpr expression is evaluated.</li><li>Replaced script srcexpr example.</li><li>Replaced grammar srcexpr example2.</li><li>The schema and DTD were updated to reflect that the name attribute on data is optional.</li><li>Added note to schema and Appendix C.3 regarding support for international characters in URIs.</li></ul></div><div class="div2">
<h3><a name="sec-changes-cr" id="sec-changes-cr"></a>G.2 Summary of changes since the Candidate Recommendation</h3><p>
The following is a summary of the major changes since the Candidate Recommendation was published.
</p><ul><li>Updated RestrictedVariableName.datatype in vxml-datatypes.xsd to allow range of characters as described in ECMA-262.</li><li>Added terminology section.</li><li>Clarified that mark's nameexpr is evaluated when the containing prompt is queued.</li><li>Clarified that the MIME type of the document reference by &lt;data&gt; is defined in RFC 3023.</li><li>Processing of fragment identifiers on URIs referenced by the &lt;data&gt; element is platform-specific.</li><li>Support for bargein and transferaudio during setup of a consultation transfer is optional.</li><li>Miscellaneous conformance clarifications.</li><li>Added reference to the W3C Speech Interface Framework Media Types which includes official VoiceXML media type.</li><li>Modified &lt;foreach&gt; content model and clarified ECMAScript functionality.</li></ul></div><div class="div2">
<h3><a name="sec-changes-wd2" id="sec-changes-wd2"></a>G.3 Summary of changes since the second Last Call Working Draft</h3><p>
The following is a summary of the major changes since the second Last Call Working Draft was published.
</p><ul><li>
  Schema update: 'foreach-not-in-prompt.type' (formerly 'foreach-full.type') was modified to allow executable content only.
</li><li>
  Schema update: 'foreach-in-prompt.type' (formerly 'foreach-restricted.type') was added to the definition of &lt;enumerate&gt;.
</li><li>
  Schema update: 'foreach-in-prompt.type' was added as a child of 'foreach-in-prompt.type' to allow nesting
  of the &lt;foreach&gt; element within a &lt;prompt&gt;.
</li></ul></div></div></div></body></html>