PC Review


Reply
Thread Tools Rate Thread

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

 
 
Eric van Wijk
Guest
Posts: n/a
 
      27th Jul 2004
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.Namespace.Schema.xsd");
templateDocument.DataSet.ReadXmlSchema(schemaStream);
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a schema to word document to be imported to Exel Seragram Microsoft Word Document Management 1 20th May 2009 11:48 PM
Can I sync a typed dataset schema with database schema easily? John Microsoft Dot NET 1 2nd Jan 2008 10:37 AM
can't create schema using .adp (or transfertext method renderred useless without schema) kreplech@gmail.com Microsoft Access 1 23rd Jun 2006 09:49 PM
Schema Library - Update Schema Button =?Utf-8?B?R29vd2E=?= Microsoft Word Document Management 4 24th Jan 2006 07:10 PM
2000 Schema - 2003 Schema >> Sunday Ryan Rinehart Microsoft Windows 2000 Active Directory 0 15th Aug 2003 07:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:02 AM.