This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In CastAsNamespaceSensitiveType-2 and 5, there are mismatched ')' at the end of each test.
Bug in test case CastAsNamespaceSensitiveType-2 has been fixed by Michael Dyck. However, I Cannot see a problem with CastAsNamespaceSensitiveType-4 and CastAsNamespaceSensitiveType-5
CastAsNamespaceSensitiveType-2 is fixed. Thanks. CastAsNamespaceSensitiveType-4 has a type check error: declare function local:clarkname($q as xs:NOTATION) as xs:string { $q }; local:clarkname(xs:untypedAtomic("xs:integer")) $q is declared as an xs:NOTATION. The return type of the function is xs:string. Function conversion rules cannot convert an xs:NOTATION into an xs:string. Thus this test should expect XPTY0004, since this condition can be detected statically. CastAsNamespaceSensitiveType-5 has a similar problem.
I suspect that changing the function definition to: declare function local:clarkname($q as xs:NOTATION) as xs:string { $q cast as xs:NOTATION }; will solve the problem.
(In reply to comment #2) > Thus this test should expect XPTY0004, since this condition can be detected > statically. According to the spec in Section 3.16: In addition, the target type cannot be xs:NOTATION xs:anySimpleType, or xs:anyAtomicType [err:XPST0080] Therefore, should the error code be XPST0090 instead of XPTY0004
I suspect the intended change to the function definition should be: declare function local:clarkname($q as xs:NOTATION) as xs:string { $q cast as xs:string }; I have made the change to CastAsNamespaceSensitiveType-4 and CastAsNamespaceSensitiveType-5
*** Bug 19480 has been marked as a duplicate of this bug. ***
Confirmed fixed. Thanks.