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 21882 - FOTS test case function-literal-494 should raise an error instead of returning result.
Summary: FOTS test case function-literal-494 should raise an error instead of returnin...
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-30 19:11 UTC by Markos Zaharioudakis
Modified: 2013-05-01 08:21 UTC (History)
1 user (show)

See Also:


Attachments

Description Markos Zaharioudakis 2013-04-30 19:11:46 UTC
The string given as argiment to the xs:normalizedString() function does not conform to the facets of xs:normalizedString, and as a result, the test should raise FORG0001, according to http://www.w3.org/TR/xpath-functions-30/#casting-within-branch
Comment 1 Markos Zaharioudakis 2013-04-30 19:13:12 UTC
This applies to test case fn-function-lookup-494 as well.
Comment 2 Michael Kay 2013-04-30 20:25:35 UTC
The relevant rules are in F+O section 18.2. To quote:

The supplied string is mapped to a typed value of the target type as defined in [XML Schema Part 2: Datatypes Second Edition]. Whitespace normalization is applied as indicated by the whiteSpace facet for the datatype. The resulting whitespace-normalized string must be a valid lexical form for the datatype. The semantics of casting follow the rules of XML Schema validation.

I think you have overlooked the rule about whitespace normalization. The whitespace facet for xs:normalizedString is "replace". This means that the first thing casting does is x09, x0A, and x0C by x20; after this replacement the value is within the lexical space of xs:normalizedSpace and casting therefore succeeds.

The rules in 18.2 take precedence over those in 18.3.3 by virtue of the fifth paragraph of section 18 which states: "When casting from xs:string or xs:untypedAtomic the semantics in 18.2 Casting from xs:string and xs:untypedAtomic apply, regardless of target type."

I am therefore closing this as invalid.
Comment 3 Markos Zaharioudakis 2013-04-30 23:45:16 UTC
Thanks for the clarification.