- From: <bugzilla@jessica.w3.org>
- Date: Tue, 19 Aug 2014 08:39:26 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26606
Bug ID: 26606
Summary: XT3TS: bug-1701
Product: XPath / XQuery / XSLT
Version: Recommendation
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P2
Component: XSLT 3.0 Test Suite
Assignee: abel.online@xs4all.nl
Reporter: tim@cbcl.co.uk
QA Contact: public-qt-comments@w3.org
The result of this test depends on the order of evaluation.
e.g. in
<xsl:variable name="won"
select="count($matches[team=$this][number(team[.=$this]/@score)
> number(team[.!=$this]/@score)])"/>
A processor is free to reorder the predicates. Doing so can result in a type
check error in the call to number().
Quoting XPath 3.0:
"The expression in the following example cannot raise a casting error if it is
evaluated exactly as written (i.e., left to right). Since neither predicate
depends on the context position, an implementation might choose to reorder the
predicates to achieve better performance (for example, by taking advantage of
an index). This reordering could cause the expression to raise an error.
$N[@x castable as xs:date][xs:date(@x) gt xs:date("2000-01-01")]
To avoid unexpected errors caused by expression rewrite, tests that are
designed to prevent dynamic errors should be expressed using conditional
expressions. For example, the above expression can be written as follows:
$N[if (@x castable as xs:date)
then xs:date(@x) gt xs:date("2000-01-01")
else false()]"
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 19 August 2014 08:39:28 UTC