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

/ 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.

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM / XML Standards Architect / Sun Microsystems, Inc.
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Received on Thursday, 16 September 2004 16:35:59 UTC