- From: Zafar Abbas <zafara@microsoft.com>
- Date: Sat, 24 Jan 2004 17:21:10 -0800
- To: "Fraser Goffin" <goffinf@hotmail.com>, <xmlschema-dev@w3.org>
That would be because the asserted type should be validly derived from the original type which, in this case, is not true. -----Original Message----- From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On Behalf Of Fraser Goffin Sent: Saturday, January 24, 2004 10:58 AM To: xmlschema-dev@w3.org Subject: xsi:type and xsd:string confusion If I define a simple type thus (a string constrained only in that it must have at least 1 character) :- <s:element name="CRN"> <s:simpleType> <s:restriction base="s:string"> <s:minLength value="1"/> </s:restriction> </s:simpleType> </s:element> why is it that my validating parser reports that the following fragment which asserts the string type is invalid :- <CRN xsi:type='xsd:string'>10165451</CRN> the message output is :- Use of type '{http://www.w3.org/2001/XMLSchema}string' is blocked on element '{http://www.xxx}CRN' Is there a way of maintaining the minLength facet and allowing run-time type assertion like this ? Fraser. _________________________________________________________________ Tired of 56k? Get a FREE BT Broadband connection http://www.msn.co.uk/specials/btbroadband
Received on Saturday, 24 January 2004 20:20:52 UTC