Bug ID: 26865
Summary: CastableAs653 and CastableAs654 should expect false
instead of true
Product: XML Query Test Suite
Component: XML Query Test Suite
Assignee: [hidden email] Reporter: [hidden email] QA Contact: [hidden email]
CastableAs653 should expect false instead of true
<description>Pattern must match canonical representation (not the result
<created by="Michael Kay" on="2013-04-08"/>
<dependency type="spec" value="XQ10+"/>
<dependency type="feature" value="schemaImport"/>
import schema namespace d="http://www.w3.org/XQueryTest/derivedTypes";
12 castable as d:canonicalDecimal
"If the value does not conform to the facets defined for the target type, then
a dynamic error is raised [err:FORG0001]. See [XML Schema Part 2: Datatypes
Second Edition]. In the case of the pattern facet (which applies to the lexical
space rather than the value space), the pattern is tested against the canonical
lexical representation of the value, as defined for the source type (or the
result of casting the value to an xs:string, in the case of types that have no
canonical lexical representation defined for them).
Note that this will cause casts to fail if the pattern excludes the canonical
lexical representation of the source type. For example, if the type my:distance
is defined as a restriction of xs:decimal with a pattern that requires two
digits after the decimal point, casting of an xs:integer to my:distance will
always fail, because the canonical representation of an xs:integer does not
conform to this pattern."
You are receiving this mail because:
You are the QA Contact for the bug.
* If SV is an instance of xs:string or xs:untypedAtomic, check its value
against the pattern facet of TT, and raise a dynamic error [err:FORG0001] if
the check fails.
SV is not an instance of xs:string or xs:untypedAtomic.
* Cast the value to the primitive type of TT, as described in 18.1 Casting from
primitive types to primitive types. If TT is derived from xs:NOTATION, assume
for the purposes of this rule that casting to xs:NOTATION succeeds.