473,796 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
"NonEmptySt ring 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"
elementFormDefa ult="qualified" >

<xs:element name="Collision TemplateA1">

<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:simpleConte nt>

<xs:extension base="NonEmptyS tring">

<xs:attribute name="from" fixed="/LR/Deeper/IsDriverInsane"/>

<xs:attribute name="condition al" fixed="yes"/>

<xs:attribute name="source1" fixed="/LR/Deeper/Name"/>

<xs:attribute name="source2" fixed="/LR/Name"/>

</xs:extension>

</xs:simpleConten t>

</xs:complexType>

</xs:element>

<xs:element name="Hometown" >

<xs:complexType >

<xs:simpleConte nt>

<xs:extension base="NonEmptyS tring">

<xs:attribute name="from" type="xs:string " fixed="/LR/City"/>

</xs:extension>

</xs:simpleConten t>

</xs:complexType>

</xs:element>

<xs:element name="Province" >

<xs:complexType >

<xs:simpleConte nt>

<xs:extension base="NonEmptyS tring">

<xs:attribute name="from" type="xs:string " fixed="/LR/State"/>

</xs:extension>

</xs:simpleConten t>

</xs:complexType>

</xs:element>

<xs:simpleTyp e name="NonEmptyS tring">

<xs:restricti on base="xs:string ">

<xs:minLength value="1"/>

</xs:restriction>

</xs:simpleType>

</xs:schema>
Nov 12 '05 #1
1 1991
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.c om> wrote in message
news:OK******** *****@TK2MSFTNG P15.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
"NonEmptySt ring 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"
elementFormDefa ult="qualified" >

<xs:element name="Collision TemplateA1">

<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:simpleConte nt>

<xs:extension base="NonEmptyS tring">

<xs:attribute name="from" fixed="/LR/Deeper/IsDriverInsane"/>

<xs:attribute name="condition al" fixed="yes"/>

<xs:attribute name="source1" fixed="/LR/Deeper/Name"/>

<xs:attribute name="source2" fixed="/LR/Name"/>

</xs:extension>

</xs:simpleConten t>

</xs:complexType>

</xs:element>

<xs:element name="Hometown" >

<xs:complexType >

<xs:simpleConte nt>

<xs:extension base="NonEmptyS tring">

<xs:attribute name="from" type="xs:string " fixed="/LR/City"/>

</xs:extension>

</xs:simpleConten t>

</xs:complexType>

</xs:element>

<xs:element name="Province" >

<xs:complexType >

<xs:simpleConte nt>

<xs:extension base="NonEmptyS tring">

<xs:attribute name="from" type="xs:string " fixed="/LR/State"/>

</xs:extension>

</xs:simpleConten t>

</xs:complexType>

</xs:element>

<xs:simpleTyp e name="NonEmptyS tring">

<xs:restricti on 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
2430
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 service. I have run the schema through XML Spy and validated it with no errors, but when attempting to generate a dataset, I keeping getting a 'undefined data type' error. The schema is quite large so I don't know if that is causing the problem or...
0
1577
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' referenced in this document. The value for the 'base' attribute is invalid - 'xsd:string' is an invalid value for the 'base' attribute. An error occured at the file:///C:Program Files/Microsoft Visual Studio .NET 2003...
2
7564
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 amount of data so I'm not interested in BulkXMLLoad (or whatever its called). 3. I have the xml and xml schema ready to go, with (I hope) the proper sql annotations.
2
2254
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 base="xs:string"><xs:pattern value="\d{5}" /></xs:restriction></xs:simpleType Datagrid does not enforce this rule, even though dataGrid1_Validating() is called. dataset.WriteXml() saves withouth any warning, but
3
5623
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 have to distribute with the application. I would like to be able to use a typed dataset since the schema is defined in advance. Is this possible? thanks
12
5317
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
6017
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): <xsd:element name="Stuff"> <xsd:complexType> <xsd:sequence> <xsd:element ref="RequiredSimpleThing1"/> <xsd:element ref="RequiredSimpleThing2"/> <xsd:element name="OptionalSimpleThing1" type="OptionalType"
2
1699
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 writing it back to the file makes it invalid, not obeying rules of this schema. Here is the simple test program performing this operation. __________________________________________________ using System; using System.Data; namespace DataSetTest
0
2633
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 the particle of the base this xsd file is valid as per w3c standard i am also providing error in detail and geometry.xsd file geometry.xsd <?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://www.opengis.net/gml"...
0
9527
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10172
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.