Re: Ref XSCH-QL-018: Example of pblm with serialization-based validation

On Thu, 16 Sep 2004 12:35:33 -0400, Norman Walsh <Norman.Walsh@Sun.COM>  
wrote:
> / ht@inf.ed.ac.uk (Henry S. Thompson) was heard to say:
> | Consider the following schema document and instance:
> |
> | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> |  <xs:element name="root">
> |   <xs:simpleType>
> |    <xs:restriction base="xs:decimal">
> |     <xs:annotation>
> |      <xs:documentation>Always two signif. digits</xs:documentation>
> |     </xs:annotation>
> |     <xs:pattern value=".*\..."/>
> |    </xs:restriction>
> |   </xs:simpleType>
> |  </xs:element>
> | </xs:schema>
> |
> | <root>3.00</root>
> |
> | The instance is valid per the schema corresponding to the schema  
> document.
> |
> | A query which attempted to construct an element including this one
> | would however fail, as I read the spec., because the serialization
> | would include <root>3.0</root>, which is invalid per the type.
>
> The XSL/XML Query WGs have considered this problem and can offer no
> general solution to the problem.
>
> Query/transformation authors will have to use format-number to deal
> with this sort of problem. The pattern facet is simply not reversable
> in the general case.
>
> The WGs decline to make any changes on the basis of this comment.
>

The Schema WG accepts your position, although with regret. String-based
implementations can correctly handle such cases, and we do not believe
they should not be forbidden from doing so.

On behalf of the Schema WG,

//Mary.Holstege@marklogic.com

Received on Tuesday, 14 December 2004 00:03:41 UTC