W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2016

[Bug 30016] New: [xslt30ts] Tests cvt-015 and cvt-016

From: <bugzilla@jessica.w3.org>
Date: Sat, 19 Nov 2016 23:08:26 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-30016-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=30016

            Bug ID: 30016
           Summary: [xslt30ts] Tests cvt-015 and cvt-016
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0 Test Suite
          Assignee: abel.online@xs4all.nl
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

I think these two tests can legitimately throw a type error.

The tests were introduced to test bug 20874 concerning the use of curly braces
in a value template. cvt-016 has:

<out>{if ($d gt 1000) then 4 else function($x, $y){$x + $y}}</out>

The "else" branch never executes, of course, but I think a type error can be
reported statically here, because functions can never be atomized.

The rules here are expressed somewhat informally:

an implementation may signal a type error during the analysis phase in the same
way as a static error, even if it occurs in part of the stylesheet that is
never evaluated, provided it can establish that execution of a particular
construct would never succeed

There's room for debate here about whether the stylesheet contains a construct
whose evaluation would never succeed. However, I think it's within the spirit
of the rules to raise a compile-time error here: if the else branch were
executed, then evaluation of the value template would fail with a type error.

Allowing a type error here would not compromise the purpose of the test, which
is to check that this construct can be parsed. But the purpose of the test
would be better satisfied (at least with XP 3.1) with an array constructor,
where there is no type error because atomization can succeed.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Saturday, 19 November 2016 23:08:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:03 UTC