Re: Yet another testcase question
Jim Barnett <[email protected]> Wed, 11 May 2016 09:53:26 -0400
| Newsgroups | gmane.comp.web.voice |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------637A74866442E9D06F18DACD
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Jon,
The XPath xslt document was never fully tested out, so you are likely
right about it.
For the ecmascript tests, the question is a bit more complicated. In
general, developers are allowed to edit the xslt files to match their
environment, as long as they do not change the 'intent' of the test.
This is done on the honor system, and we don't check to determine
exactly what they did. As things stand, 3 systems reported passing
tests 557 and 561. In general people report if they edit the xslt
files, so it's likely that their ecma implementations accepted the
looser syntax, but I don't know for sure.
By the way, thank you for your comments on the tests. It's worthwhile
having these issues recorded on the mailing list, so that other
implementers can see the remarks. However, since work on SCXML has been
completed and the Voice Browser Working Group has been closed, we won't
be fixing the tests.
- Jim
On 5/10/2016 3:49 PM, Jon Kerny wrote:
> Hi,
>
> I have now almost completed the support of both ecmascript and xpath
> data models, and I have two more questions/comments.
>
> In the xpath xsl I think there is missing single quotes in the template
>
> <xsl:templatematch="//@conf:messageBodyEquals">
> <xsl:attributename="cond">
> contains($_event/raw,
> <xsl:value-ofselect="."/>
> )
> </xsl:attribute>
> </xsl:template>
>
> I think it should be
>
> <xsl:templatematch="//@conf:messageBodyEquals">
> <xsl:attributename="cond">
> contains($_event/raw,
> '<xsl:value-ofselect="."/>'
> )
> </xsl:attribute>
> </xsl:template>
>
>
> And I also have a question on the ecmascript testcases 557 and 561,
> they contain the condition
> cond="var1.getElementsByTagName('book')[0].getAttribute('title') ==
> 'title1'"
>
> I wonder if this isn't strictly following the specifications.
> Shouldn't it be
>
> cond="var1.getElementsByTagName('book').item(0).getAttribute('title')
> == 'title1'"
>
>
> I don't think the indexer is part of the specification:
>
> https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-A6C9094
> https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-536297177
> https://www.w3.org/2003/01/dom2-javadoc/org/w3c/dom/NodeList.html
> https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection
>
> That said, I think it's common in implementations. I.e. w3schools
> includes it in the examples
> http://www.w3schools.com/jsref/met_element_getelementsbytagname.asp
>
> Best regards,
>
> Jon
>
--------------637A74866442E9D06F18DACD
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Jon,</p>
<p> The XPath xslt document was never fully tested out, so you are
likely right about it. <br>
</p>
<p> For the ecmascript tests, the question is a bit more
complicated. In general, developers are allowed to edit the xslt
files to match their environment, as long as they do not change
the 'intent' of the test. This is done on the honor system, and
we don't check to determine exactly what they did. As things
stand, 3 systems reported passing tests 557 and 561. In general
people report if they edit the xslt files, so it's likely that
their ecma implementations accepted the looser syntax, but I don't
know for sure. <br>
</p>
<p>By the way, thank you for your comments on the tests. It's
worthwhile having these issues recorded on the mailing list, so
that other implementers can see the remarks. However, since work
on SCXML has been completed and the Voice Browser Working Group
has been closed, we won't be fixing the tests. <br>
</p>
<p><br>
</p>
<p>- Jim<br>
</p>
<br>
<div class="moz-cite-prefix">On 5/10/2016 3:49 PM, Jon Kerny wrote:<br>
</div>
<blockquote
cite="mid:CAC5YMgGePCgcY20too73AW98001pquMKJeJKQNBLKnXdFgUFoA@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I have now almost completed the support of both ecmascript
and xpath data models, and I have two more questions/comments.</div>
<div><br>
</div>
<div>In the xpath xsl I think there is missing single quotes in
the template</div>
<div><br>
</div>
<div>
<div class=""
style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
class=""><xsl:template<span class=""> <span class="">match</span>="<span
class="">//@<a class="moz-txt-link-freetext" href="conf:messageBodyEquals">conf:messageBodyEquals</a></span>"</span>></span></div>
<div class=""
style="margin-left:1em;color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
class=""></span>
<div class="" id="collapsible155">
<div class="">
<div class=""><span class=""
style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background:url("")"></span><span
class=""><xsl:attribute<span class=""> <span
class="">name</span>="<span class="">cond</span>"</span>></span></div>
<div class="" style="margin-left:1em"><span class="">contains($_event/raw,</span>
<div class=""><span class=""><xsl:value-of<span
class=""> <span class="">select</span>="<span
class="">.</span>"</span>/></span></div>
<span class="">)</span></div>
<div class=""><span class=""></xsl:attribute></span></div>
</div>
</div>
<span class=""></span></div>
<div class=""
style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
class=""></xsl:template></span></div>
</div>
<div class=""
style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
class=""><br>
</span></div>
<div class=""
style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
class="">I think it should be </span></div>
<div class=""
style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
class=""><br>
</span></div>
<div class=""
style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
class="">
<div class=""><span class=""><xsl:template<span class=""> <span
class="">match</span>="<span class="">//@<a class="moz-txt-link-freetext" href="conf:messageBodyEquals">conf:messageBodyEquals</a></span>"</span>></span></div>
<div class="" style="margin-left:1em"><span class=""></span>
<div class="" id="collapsible155">
<div class="">
<div class=""><span class=""
style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background:url("")"></span><span
class=""><xsl:attribute<span class=""> <span
class="">name</span>="<span class="">cond</span>"</span>></span></div>
<div class="" style="margin-left:1em"><span class="">contains($_event/raw,</span>
<div class=""><span class="">'<xsl:value-of<span
class=""> <span class="">select</span>="<span
class="">.</span>"</span>/>'</span></div>
<span class="">)</span></div>
<div class=""><span class=""></xsl:attribute></span></div>
</div>
</div>
<span class=""></span></div>
<div class=""><span class=""></xsl:template></span></div>
</span></div>
<div><br>
</div>
<div><br>
</div>
<div>And I also have a question on the ecmascript testcases 557
and 561, they contain the condition</div>
<div>cond="var1.getElementsByTagName('book')[0].getAttribute('title')
== 'title1'"<br>
</div>
<div><br>
</div>
<div>I wonder if this isn't strictly following the
specifications. Shouldn't it be</div>
<div><br>
</div>
<div>cond="var1.getElementsByTagName('book').item(0).getAttribute('title')
== 'title1'"<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I don't think the indexer is part of the specification:</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-A6C9094">https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-A6C9094</a><br>
</div>
<div><a moz-do-not-send="true"
href="https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-536297177">https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-536297177</a><br>
</div>
<div><a moz-do-not-send="true"
href="https://www.w3.org/2003/01/dom2-javadoc/org/w3c/dom/NodeList.html">https://www.w3.org/2003/01/dom2-javadoc/org/w3c/dom/NodeList.html</a><br>
</div>
<div><a moz-do-not-send="true"
href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection">https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection</a><br>
</div>
<div><br>
</div>
<div>That said, I think it's common in implementations. I.e.
w3schools includes it in the examples</div>
<div><a moz-do-not-send="true"
href="http://www.w3schools.com/jsref/met_element_getelementsbytagname.asp">http://www.w3schools.com/jsref/met_element_getelementsbytagname.asp</a><br>
</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Jon</div>
<div><br>
</div>
</div>
</blockquote>
<br>
</body>
</html>
--------------637A74866442E9D06F18DACD--