473,325 Members | 2,712 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,325 software developers and data experts.

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:
templateDocument = new XmlDataDocument();
Assembly classLibrary = Assembly.GetExecutingAssembly();
Stream schemaStream =
classLibrary.GetManifestResourceStream("My.Namespa ce.Schema.xsd");
templateDocument.DataSet.ReadXmlSchema(schemaStrea m);
The Schema:
<?xml version="1.0" encoding="utf-8" ?>

<xs:schema id="template" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:import="urn-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:IsDataSet="true" msdata:Locale="nl-NL"
msdata:EnforceConstraints="False">

<xs:complexType>

<xs:choice maxOccurs="unbounded">

<xs:element name="random">

<xs:complexType>

<xs:sequence>

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

<xs:complexType>

<xs:simpleContent msdata:ColumnName="li_Text" msdata:Ordinal="1">

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

<xs:attribute ref="import:condition" />

</xs:extension>

</xs:simpleContent>

</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 1479

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

Similar topics

1
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...
0
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
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...
7
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...
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...
0
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...
0
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...
0
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...
9
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.