Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

“restriction” takes precedence over “nillable”?

$
0
0

Given the following XML and related xsd schema, why will XML fail validation if UniqueID is null?  Is there a technical reference that explains this?

XML:

<Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><UniqueID xsi:nil="true"/></Data>

Partial Schema:
...<xs:element name="UniqueID" maxOccurs="1" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:token"><xs:pattern value="[0-9]{10}" /></xs:restriction></xs:simpleType></xs:element>
....


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>