all groups > dotnet xml > april 2007 >
You're in the

dotnet xml

group:

.NET and XMLSchemaSet



.NET and XMLSchemaSet Christopher
4/19/2007 6:54:01 AM
dotnet xml: 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.

RE: .NET and XMLSchemaSet Helena Kotas [MSFT]
4/25/2007 12:22:03 PM
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

[quoted text, click to view]
AddThis Social Bookmark Button