W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2014

[Bug 26865] New: CastableAs653 and CastableAs654 should expect false instead of true

From: <bugzilla@jessica.w3.org>
Date: Fri, 19 Sep 2014 19:21:17 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-26865-523@http.www.w3.org/Bugs/Public/>

            Bug ID: 26865
           Summary: CastableAs653 and CastableAs654 should expect false
                    instead of true
           Product: XML Query Test Suite
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XML Query Test Suite
          Assignee: benjie.nguyen@gmail.com
          Reporter: josh.spiegel@oracle.com
        QA Contact: public-qt-comments@w3.org

CastableAs653 should expect false instead of true

<test-case name="CastableAs653"
      <description>Pattern must match canonical representation (not the result
of string())</description>
      <created by="Michael Kay" on="2013-04-08"/>
      <environment ref="derived"/>
      <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


  <xs:simpleType name="canonicalDecimal">
    <xs:restriction base="xs:decimal">
      <xs:pattern value="-?[0-9]+\.[0-9]+"/>

We think the result of this query should be false.


"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.
Received on Friday, 19 September 2014 19:21:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:48 UTC