Hi Boris,

Boris Kolpackov-2 wrote:
> 
> Another alternative would simply be to pre-load all of your schemas
> with loadGrammar (this would also involve creating in-memory "includer"
> schemas for schemas with the same namespace) and then let the parser
> figure out what to use. The advantage of this approach is that you
> don't need to parse your XML documents twice.
> 

So basically if I have schema A that includes schema B (both have the same
namespace) and I create an in-memory schema that includes both of them and
has the same namespace, I could use loadGrammar to load all 3 and then the
XML file should pass validation. Is this correct?


Boris Kolpackov-2 wrote:
> 
> Well, if you can't rely on your schemas being complete/valid, then you
> probably won't be able to validate an XML document against them. This
> does not make much sense to me, though: how can you not rely on the
> schemaLocation attributes inside the schemas that presumably came with
> your application?
> 

I can rely on my schemas but I can't rely on the schemaLocation value being
the correct one. The only thing I can rely on is the file name in the
schemaLocation (not including the path etc.) and the namespace of the
including schema. That's how I can find the needed schema. I go to my map
and search for that namespace, then I should get more than one schema with
that namespace and here I have the file name that distinguishes between the
schemas. 

-- 
View this message in context: 
http://www.nabble.com/setExternalSchemaLocation-and-xs%3Aimport-tp15532404p15799964.html
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to