This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29456 - initial-function-100a et seq: param/@as in test catalog
Summary: initial-function-100a et seq: param/@as in test catalog
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Abel Braaksma
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-14 14:57 UTC by Michael Kay
Modified: 2016-10-19 19:16 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2016-02-14 14:57:34 UTC
In the sequence of tests starting initial-function-100a, we see things like

<param select="'sometoken'" as="xs:token"/>

Now, the semantics of the param/@as attribute are not actually described in the test catalog documentation, but I would have expected them to follow similar principles to the XSLT rules. Under those rules the above is an error: the function conversion rules will not convert an xs:string to an xs:token. If we want the casting rules to apply, we should say so. However, I think it would be a lot simpler to write

<param select="xs:token('sometoken')"/>

rather than relying on the test driver to do something as complex as applying the function conversion rules.

We have 3 choices for the semantics:

(a) the as attribute is merely an assertion about the type
(b) use function conversion rules
(c) use a cast

The last option would not actually work for all existing cases, e.g. where we have as="xs:string*". I would be inclined to go for (a).
Comment 1 Michael Kay 2016-02-17 11:11:53 UTC
Decided that the "as" attribute, if present, is an assertion that the value of the "select" attribute is an instance of the relevant type; it does not trigger any conversion. (If the assertion is incorrect, then the test is incorrect, something which the test driver may or may not detect.)

Abel will fix the metadata schema to say this.
Comment 2 Michael Kay 2016-10-19 19:16:51 UTC
The changes to test suite documentation appear to have been made.