W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2002

Re: nil="true" and xsi:type="xsd:string"

From: Stanley Guan <stanley.guan@oracle.com>
Date: Fri, 01 Mar 2002 09:35:34 -0800
Message-ID: <3C7FBBE6.80DFCAF5@oracle.com>
CC: Schema XML <xmlschema-dev@w3.org>, schema-ig w3c <w3c-xml-schema-ig@w3.org>
Tom,

If you follow the following link and look the row for elemZ001, you can find the
expected result:
  http://www.w3.org/XML/2001/05/xmlschema-test-collection/result-ms-element.htm
which is invalid!

As I recall, Henry has posted that:
   * xs:string is not a valid restriction of xs:anySimpleType.  (ht)


Thx,

-Stanley

Tom Preston wrote:

> For me it validated with strict validation in XSV and it validated with
> xerces 144 and xerces 200.  Doesn't seem to be invalid.
>
> Tom
>
> -----Original Message-----
> From: Stanley Guan [mailto:stanley.guan@oracle.com]
> Sent: Thursday, February 28, 2002 6:23 PM
> To: Schema XML; schema-ig w3c
> Subject: xsi:nil="true" and xsi:type="xsd:string"
>
> Hi,
>
> Can someone shed some light on why elemZ001.xml is invalid?
> (see
> http://www.w3.org/XML/2001/05/xmlschema-test-collection/result-ms-element.ht
> m)
>
> Thx,
>
> -Stanley
>
> elemZ001.xsd
> ----------------
> <?xml version="1.0"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:element name="root">
>   <xsd:complexType>
>    <xsd:sequence>
>     <xsd:element ref="uid" maxOccurs="unbounded"/>
>    </xsd:sequence>
>   </xsd:complexType>
>  </xsd:element>
>  <xsd:element name="uid" nillable="true"/>
> </xsd:schema>
>
> elemZ001.xml
> ----------------
> <?xml version="1.0"?>
> <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xsi:noNamespaceSchemaLocation="elemZ001.xsd">
>  <uid xsi:nil="true" xsi:type="xsd:string"/>
>  <uid xsi:nil="true"/>
> </root>
Received on Friday, 1 March 2002 12:35:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:29 GMT