D
David Laub
The following valid XSD schema can NOT be successfully read by the
ReadXMLSchema method of the DataSet object - it errors out with a
"NonEmptyString not defined" error. This schema is more complex than a
plain vanilla schema, but doesn't strike me as obscenely complex.
Are there general rules for what can an can not be mapped between any XSD
schema & a .net DataSet?
Thanks
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Wheels Inc
(Wheels Inc) -->
<!--W3C Schema generated by XMLSpy v2005 rel. 3 U (http://www.altova.com)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="CollisionTemplateA1">
<xs:complexType>
<xs:sequence>
<xs:element ref="FullName"/>
<xs:element ref="Hometown"/>
<xs:element ref="Province"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FullName">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="NonEmptyString">
<xs:attribute name="from" fixed="/LR/Deeper/IsDriverInsane"/>
<xs:attribute name="conditional" fixed="yes"/>
<xs:attribute name="source1" fixed="/LR/Deeper/Name"/>
<xs:attribute name="source2" fixed="/LR/Name"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="Hometown">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="NonEmptyString">
<xs:attribute name="from" type="xs:string" fixed="/LR/City"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="Province">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="NonEmptyString">
<xs:attribute name="from" type="xs:string" fixed="/LR/State"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:simpleType name="NonEmptyString">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
ReadXMLSchema method of the DataSet object - it errors out with a
"NonEmptyString not defined" error. This schema is more complex than a
plain vanilla schema, but doesn't strike me as obscenely complex.
Are there general rules for what can an can not be mapped between any XSD
schema & a .net DataSet?
Thanks
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Wheels Inc
(Wheels Inc) -->
<!--W3C Schema generated by XMLSpy v2005 rel. 3 U (http://www.altova.com)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="CollisionTemplateA1">
<xs:complexType>
<xs:sequence>
<xs:element ref="FullName"/>
<xs:element ref="Hometown"/>
<xs:element ref="Province"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FullName">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="NonEmptyString">
<xs:attribute name="from" fixed="/LR/Deeper/IsDriverInsane"/>
<xs:attribute name="conditional" fixed="yes"/>
<xs:attribute name="source1" fixed="/LR/Deeper/Name"/>
<xs:attribute name="source2" fixed="/LR/Name"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="Hometown">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="NonEmptyString">
<xs:attribute name="from" type="xs:string" fixed="/LR/City"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="Province">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="NonEmptyString">
<xs:attribute name="from" type="xs:string" fixed="/LR/State"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:simpleType name="NonEmptyString">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>