473,385 Members | 1,780 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.

.NET and XMLSchemaSet

Hello,
Using .NET 2.0 and the System.XML.Schema.XMLSchema class. I am adding some
schemas into the XMLSchemaSet object using XmlSchemaSet.Add.
The schemas I am adding have circular imports, and therefore I have
implimented a custom XMLResolver class to help filter out duplicate schemas.
Now my questions:
1. If a schema I add has other schema imports they are sent to the
ResolveUri Override function. If any of these schemas already exist I return
Nothing (vb.net) otherwise I return the MyBase.ResolveUri. A Schema Warning
is raised noting that the 'schemalocation' is undefined. This appears to me
to have the effect of cancelling the adding of the Base Scema. Is this
correct?

2. Whilst debugging in the watch window I noticed the XmlSchema object has
an "ImportedSchemas" property of type Collections.ArrayList. I can't find
this property in the doco or the Object Browser. How may I get to this
property?

Sorry for being long winded but this is giving me the willies.

Cheers, Chris
Apr 19 '07 #1
1 4169
Hello Christophe,

Have you tried using the XmlSchemaSet object without the custom resolver?
The XmlSchemaSet object should be able to handle circular references just
fine (as opposed to the odl XmlSchemaCollection).

Thanks,
-Helena Kotas, MSFT

"Christopher" wrote:
Hello,
Using .NET 2.0 and the System.XML.Schema.XMLSchema class. I am adding some
schemas into the XMLSchemaSet object using XmlSchemaSet.Add.
The schemas I am adding have circular imports, and therefore I have
implimented a custom XMLResolver class to help filter out duplicate schemas.
Now my questions:
1. If a schema I add has other schema imports they are sent to the
ResolveUri Override function. If any of these schemas already exist I return
Nothing (vb.net) otherwise I return the MyBase.ResolveUri. A Schema Warning
is raised noting that the 'schemalocation' is undefined. This appears to me
to have the effect of cancelling the adding of the Base Scema. Is this
correct?

2. Whilst debugging in the watch window I noticed the XmlSchema object has
an "ImportedSchemas" property of type Collections.ArrayList. I can't find
this property in the doco or the Object Browser. How may I get to this
property?

Sorry for being long winded but this is giving me the willies.

Cheers, Chris
Apr 25 '07 #2

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

Similar topics

2
by: Alex Shirshov | last post by:
Hello, All! It seems the bug (http://groups.google.com/groups?hl=ru&lr=&ie=UTF-8&threadm=a53b01c28a00%242 08bc860%2439ef2ecf%40TKMSFTNGXA08&rnum=8&prev=/groups%3Fq%3DschemaLocation%2...
2
by: Steve at Pixelda | last post by:
I accidentally put this on another group - this is the more likley home... The first code fragment creates the simplest of XML Schemas is code. After the “Compile()” method is called on the...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
7
by: SparkPlug | last post by:
Does anyone know why I might be getting an XmlSchemaException in App.config configured as below to use the UIP Application Block? I get the following error for every element, sub-element and...
3
by: sachinvyas | last post by:
Hi, I have following schema saved in new.xsd <?xml version="1.0" encoding="utf-8"?> <xs:schema targetNamespace="http://www.smpte-ra.org/schemas/429.7/2006/CPL"...
1
by: dlutz | last post by:
Hello to all -- I am familiar with Xml in general and NET 1.1 Xml, but I am new to the ..NET 2.0 changes in System.Xml. I am trying to validate an XML document that is based on a schema that...
1
by: Angel \Java\ Lopez | last post by:
Hi people! I'm running a Visual Studio 2005, Professional, on Windows XP Professional. I've found a little big problem, reading a DataSet. If I try: ds.ReadXml("c:\data.xml") it raises...
1
by: Ryan | last post by:
Hello Xml Gurus, I'm trying to build an XML schema in memory using the System.Xml.XmlSchema namespace objects, validate it, and then write it to a file. The problem I'm facing is that...
7
by: =?Utf-8?B?Q29kZVJhem9y?= | last post by:
I wrote a method to validate and xml file against a schema. If the file does not conform to the schema, it throws an error. It works fine except for one curious thing. If I try to validate an...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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...
0
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,...
0
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...

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.