W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2004

RE: type and xsd:string confusion

From: Zafar Abbas <zafara@microsoft.com>
Date: Sat, 24 Jan 2004 17:21:10 -0800
Message-ID: <563BD3496D37BB4B9F4E8F896A58F2B3CFC405@RED-MSG-50.redmond.corp.microsoft.com>
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
have at least 1 character) :-

	<s:element name="CRN">
			<s:restriction base="s:string">
				<s:minLength value="1"/>

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

Is there a way of maintaining the minLength facet and allowing run-time
assertion like this ?


Tired of 56k? Get a FREE BT Broadband connection 
Received on Saturday, 24 January 2004 20:20:52 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:04 UTC