W3C home > Mailing lists > Public > www-voice@w3.org > July to September 2007

<foreach> tests in IR

From: Andrew Hunt <andrew.hunt@holly.com.au>
Date: Mon, 17 Sep 2007 02:27:52 -0700
Message-ID: <14F99AAB26DBE04E87B64C252587948203FED461@ehost005-2.exch005intermedia.net>
To: <www-voice@w3.org>
Cc: "Dmitri Kozlov" <dmitri@holly-connects.com>, "David Scarratt" <dscarratt@holly.com.au>
Hi VBWG,
 
We have encountered a couple of issues with tests for <foreach> in the
VoiceXML 2.1 Implementation Report and a request for a clarification of
<foreach> in the Recommendation.  We would appreciate clarification from
the Voice Browser Working Group.
 
1. Implementation Report tests [90] - Illegal Executable Content

 
We suspect that Implementation Report test number 90 is incorrectly
defined.
  http://www.w3.org/Voice/2007/voicexml21-ir/90/AssertID90.txml
 
Assertion 90 contains <if> and <throw> elements inside <foreach> element
which is in turn included in <prompt> element. This is invalid according
to VXML 2.1 Recommendation Section 6 (Using <foreach> to concatenate
prompts).  That section states that <prompt> can't contain executable
content, hence it can't contain <if> element.  The VXML generated from
the txml for these tests does not pass Schema validation.  (Note that
tests 155 and 156 verify that such documents must be rejected)  
 
Recommendation: the <if> and <throw> should be removed from within
<foreach> in test case 90.  (Alternatively, close and reopen the
<prompt> element before and after the <foreach>)
 
2. Implementation Report tests [155, 156] - error.badfetch
 
Assertions 155 and 156 verify that error.badfetch is thrown if an
executable content is included in <prompt> element. We agree that the
required behaviour of throwing an error.badfetch is correct according to
VXML 2.1 Sec 6.
  http://www.w3.org/Voice/2007/voicexml21-ir/155/foreach5bp.txml
  http://www.w3.org/Voice/2007/voicexml21-ir/156/foreach5p.txml
 
However, the single test document includes <catch> element to catch
error.badfetch implying that handling of the error is done in the
context of the test document.  According to VXML 2.0 Rec Section 2.3.4,
the scope to handle fetch errors is platform specific. If a VXML
implementation invalidates the document on the stage of checking it
against VXML schema then it is not possible to handle error.badfetch in
the scope of the invalid document and the error would be raised in the
referring document.
 
Recommendation: we suggest that the test be modified to include an
initial referring page and including the badfetch handler in both the
referring page and also as-is in the document with <foreach>.  Catching
a badfetch in either document would constitute a pass.
 
3. Clarification: <foreach> as Implicit Prompts
 
VXML 2.0 Section 4.1.2 says that you can leave out the <prompt> ...
</prompt> if the prompt consists entirely of PCDATA (contains no speech
markups) or consists of just an <audio> or <value> element.  
 
Since <foreach> has prompt-like behaviours we were asked whether it was
an Implicit Prompt (ala <audio>, <value>, PCDATA).  We are assuming that
because the VXML 2.1 Rec does not directly state that <foreach> is an
implicit prompt, it is NOT an implicit prompt.  So wherever <foreach>
occurs it is executable content and not an implicit prompt (excepting
within <prompt> which has specific behaviour definition)
 
Q: is it correct to assume that <foreach> is never an implicit prompt?
 
Thanks,
Andrew
 
---
Andrew Hunt
VP Engineering
Holly Connects
 
Received on Monday, 17 September 2007 09:27:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 17 September 2007 09:27:27 GMT