","The data is fetched when the element is executed according to the caching rules\r\nestablished in Section 6.1 \r\nof [VXML2].\r\n","\r\nBefore exposing the data in an XML document referenced by the element via the DOM, \r\nthe interpreter should check that the referring document is allowed to access the data. \r\nIf access is denied the interpreter must throw error.noauthorization. \r\n\r\n","Note:","\r\nOne strategy commonly implemented in voice browsers to control\r\naccess to data is the \"access-control\" processing instruction\r\ndescribed in the WG Note: \r\nAuthorizing Read Access to XML Content Using the Processing Instruction 1.0\r\n[","DATA_AUTH","].\r\n","The following example retrieves a stock quote in one dialog, caches the DOM in a variable at document scope, \r\nand uses the DOM to playback the quote in another dialog.","\r\n\r\n \r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
","5.1 Fetching Properties","These properties pertain to documents fetched by the element.","Table 6: Fetching Properties","datafetchhint","\r\n Tells the platform whether or not data documents may be pre-fetched. The value is either prefetch (the default), or safe.\r\n ","datamaxage","\r\n Tells the platform the maximum acceptable age, in seconds, of cached documents. The default is platform-specific.\r\n ","datamaxstale","\r\n Tells the platform the maximum acceptable staleness, in seconds, of expired cached data documents. The default is platform-specific.\r\n ","6 \r\n Using to Concatenate Prompts and Loop through Executable Content\r\n ","\r\nThe element \r\nallows a VoiceXML application to iterate through an ECMAScript array\r\nand to execute the content contained within the \r\nelement for each item in the array.\r\n\r\n\r\nThe element may appear within executable content and within elements. \r\nWithin executable content, except within a , the element may contain \r\nany elements of executable content; this introduces basic looping functionality \r\nby which executable content may be repeated for each element of an array. \r\nWhen appears within a element, \r\nit may contain only those elements valid within \r\n(i.e. the same elements allowed within less , , and ); \r\nthis allows for sophisticated concatenation of prompts as illustrated in this section.\r\n\r\n","Attributes of are:","Table 7: Attributes","array","\r\n An ECMAScript expression that must evaluate to an ECMAScript array\r\n (i.e. the result of the expression must satisfy instanceof(Array) in ECMAScript);\r\n otherwise, an error.semantic event is thrown.\r\n Note that the element operates on a shallow copy of the array specified by the array attribute.\r\n ","item","The variable that stores each array item upon each iteration\r\n of the loop. A new variable will be declared if it is not already\r\n defined within the parent's scope.","\r\nBoth \"array\" and \"item\" must be specified; otherwise, an error.badfetch event is thrown.\r\n","\r\nThe iteration process starts from an index of 0 and increments by one \r\nto an index of array_name.length - 1, where array_name is the name of the shallow copied array \r\noperated on by the element.\r\nFor each index, a shallow copy or reference to the corresponding array element is assigned \r\nto the item variable (i.e. assignment is equivalent \r\nto item = array_name[index] in ECMAScript); \r\nthe assigned value could be undefined for a sparse array. \r\nVoiceXML 2.1 does not provide break functionality to interrupt a .\r\n","The following example calls a user-defined function GetMovieList\r\nthat returns an ECMAScript array. The array is assigned to the variable named 'prompts'.\r\nUpon entering the , if a noinput or a nomatch event occurs, the VoiceXML interpreter reprompts the user\r\nby executing the second . The second executes the \r\n element\r\nby iterating through the ECMAScript array 'prompts' and assigning each array element to the \r\nvariable 'thePrompt'.\r\nUpon each iteration of the , the interpreter executes the contained