- From: Michael Rys <mrys@microsoft.com>
- Date: Sat, 6 Mar 2004 07:28:57 -0800
- To: "Henry S. Thompson" <ht@inf.ed.ac.uk>, <public-qt-comments@w3.org>
This is a known behaviour and we have decided that this acceptable, since being able to define a pattern that restricts the value space by legislating the lexical form is only meaningful in the context of XQuery if the lexical and value space have a one-to-one correspondence. Since XML Schema allows a pattern in other cases as well, there is no round-trip guarantee. Best regards Michael (speaking for himself) > -----Original Message----- > From: public-qt-comments-request@w3.org [mailto:public-qt-comments- > request@w3.org] On Behalf Of Henry S. Thompson > Sent: Saturday, March 06, 2004 7:11 AM > To: public-qt-comments@w3.org > Subject: Ref XSCH-QL-018: Example of pblm with serialization-based > validation > > > 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. > > ht > -- > Henry S. Thompson, HCRC Language Technology Group, University of > Edinburgh > Half-time member of W3C Team > 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 > Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk > URL: http://www.ltg.ed.ac.uk/~ht/ > [mail really from me _always_ has this .sig -- mail without it is forged > spam]
Received on Saturday, 6 March 2004 10:29:38 UTC