|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
XML Schema (XSD) and ADO.net DataSet - limitations mapping between themReadXMLSchema 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> in 1.0 and 1.1, DataSet does not support named simple types.
DataSet 2.0 Beta 1, processes below provided schema. Thanks -- Show quoteThis posting is provided "AS IS", with no warranties, and confers no rights. Please do not send email directly to this alias. This alias is for newsgroup purposes only. "David Laub" <dl***@wheels.com> wrote in message news:OKCqNqsNFHA.580@TK2MSFTNGP15.phx.gbl... > 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> > > |
|||||||||||||||||||||||