473,569 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataSet ReadXmlSchema fails on a schema with (xsd:)imported schema

Hi,

When I try to assign a schema to a dataset using the ReadXmlSchema method,
that schema does not import any schemas included with xs:import. Both
schema's are stored in the assembly as embedded resources (in the same
namespace).:
The Code:
templateDocumen t = new XmlDataDocument ();
Assembly classLibrary = Assembly.GetExe cutingAssembly( );
Stream schemaStream =
classLibrary.Ge tManifestResour ceStream("My.Na mespace.Schema. xsd");
templateDocumen t.DataSet.ReadX mlSchema(schema Stream);
The Schema:
<?xml version="1.0" encoding="utf-8" ?>

<xs:schema id="template" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
xmlns:import="u rn-dummy-state">

<!--ATTENTION: This schema contains references to other imported schemas-->

<xs:import namespace="urn-dummy-state" schemaLocation= "import.xsd " />

<xs:element name="template" msdata:IsDataSe t="true" msdata:Locale=" nl-NL"
msdata:EnforceC onstraints="Fal se">

<xs:complexType >

<xs:choice maxOccurs="unbo unded">

<xs:element name="random">

<xs:complexType >

<xs:sequence>

<xs:element name="li" nillable="true" minOccurs="0" maxOccurs="unbo unded">

<xs:complexType >

<xs:simpleConte nt msdata:ColumnNa me="li_Text" msdata:Ordinal= "1">

<xs:extension base="xs:string ">

<xs:attribute ref="import:con dition" />

</xs:extension>

</xs:simpleConten t>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:choice>

</xs:complexType>

</xs:element>

</xs:schema>
What do I do wrong (if any)?

Thx in adv.

Eric
Nov 12 '05 #1
0 1487

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

Similar topics

1
6062
by: Scott M. | last post by:
I have created a strongly typed dataset and populated it with data in my data layer. I have confirmed that the DataSet does, in fact contain my data and that there is a schema governing this data (obviously, since it is a strongly typed DataSet). I used the drag & drop method to create the .xsd file. I have created 2 methods in my data...
0
1133
by: wayne | last post by:
Hello, I'm reading an xsd schema into a DataSet using the ReadXmlSchema() method. The schema has a sequence of elements one of which is of type xs:integer and has a default value of '40':
1
1624
by: RS | last post by:
I have a dataset that i read schema from the XSD file in to. After, i populate it with some values from the flat file. Fileds lend in to the right columns in the table however when i tell Dataset to write XML it come out in the different order as it is in the schema. Is this somethng that could be changed? How could i make sure that XML coming...
7
6213
by: Sharon | last post by:
I have successfully loaded a DataSet object with a XML schema (XSD). Now I wish to populate the tables that was created in the DataSet. I have an XML file/string that contain all the needed data in the same format as the XSD (the XML file/string was created using this same schema). The XML file/string may contain data for a single table or...
3
5617
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?...
0
1280
by: Joey Lee | last post by:
Hi, I have created a dataset schema(*.xsd) which contain two element "InvoiceHeader" and "InvoiceDetail". I set the primary key of both the element. for example "InvoiceHeader" -> id and "InvoiceDetail" -> "id, date" Then I created a relationship between both these item using the key "id". This create the one-to-many relationship.
0
957
by: RS | last post by:
I have a dataset that i read schema from the XSD file in to. After, i populate it with some values from the flat file. Fileds lend in to the right columns in the table however when i tell Dataset to write XML it come out in the different order as it is in the schema. Is this somethng that could be changed? How could i make sure that XML coming...
0
1262
by: # Cyrille37 # | last post by:
Hello, Printing a Dataset Schema Designer view is painfull. I got only bad result. I would like to know if there are applications that can open Dataset Schema Designer 's files ? Or is there some converter of that files to open them in another tool ? For example, do you know a XSLT to convert XSD to "DB Designer 4" xml format ?
9
2938
by: PeterWellington | last post by:
I have a column in a data table that stores enum values and assigns a default value: Dim dc As New DataColumn("TestEnumField", GetType(DayOfWeek)) dc.DefaultValue = DayOfWeek.Thursday When I try to serialize/deserialize dataset schema, I get the error below during deserialization: "System.ArgumentException: The DefaultValue for column...
0
7930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
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...
0
7983
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...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
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...
0
5228
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...
0
3662
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...
1
2118
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
1
1229
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.