473,385 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XML Schema (XSD) and ADO.net DataSet - limitations mapping between them

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>
Nov 12 '05 #1
1 1964
in 1.0 and 1.1, DataSet does not support named simple types.
DataSet 2.0 Beta 1, processes below provided schema.

Thanks

--
This 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:OK*************@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>

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jeremy Summers | last post by:
Has anyone run into problems creating typed datasets from complex schemas? I am attempting to create a Typed Dataset in Visual Studio .Net from a .xsd schema file for a industry standard web...
0
by: Deep Purple | last post by:
I started with the following error... ------------------------------------------------------- An error occured while loading the schema with TargetNamespace 'http://www.w3.org/2001/XMLSchema'...
2
by: Json | last post by:
Ok, brand new to SQLXML 3.0 and its various issues. Heres what I'm trying to do: 1. I am trying to load xml data into an empty SQL table from my .NET console application. 2. This isn't a huge...
2
by: Frosty | last post by:
Howto make datagrid enforce rules of xml schema? Created xml schema in the designer. Constraints created there using the following <xs:simpleType name="zipcode"><xs:restriction...
3
by: MR | last post by:
Is there a way to load an XML schema into a dataset from a resource or other object? I am using ReadXmlSchema(filename) and that works fine. However, I have many XSD files that I would rather not...
12
by: Whoever | last post by:
Hi, I'm trying to return an XmlDocument or XmlNode converted from a typed dataset. public XmlNode whatever() { MyTypedDataSet ds = new MyTypedDataSet(); return new XmlDataDocument(ds); }
16
by: Brad Wood | last post by:
I'm using a 2.0 XmlReaderSettings object with setting.ValidationType set to ValdationType.Schema to validate a document against a schema. Following is a schema fragment (names altered):...
2
by: MaLec | last post by:
I’d like to use the DataSet as the container for the XML files conforming to some schema. The problem is, that the operation of reading the XML file into the DataSet having its schema and then...
0
by: rautsmita | last post by:
hello friends , i am using to jdk6 and JAXB2.0, i have geomtry.xsd file i am trying to compile this file using jaxb but i got some error i.e.The particle of the type is not a valid restriction of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.