Daniel Jackson wrote:
> 
> 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?
> 

I just tried this and got a RuntimeException, predictably since it tried
loading the other schemas from the in-memory one and failed because the
schemaLocation value didn't point to the correct physical path. This is why
I said I can't rely on the schemaLocation attribute. I want to handle the
resolving of entities during the validation (here resolveEntity comes along)
and if I try loading using loadGrammar it simply tries on it's own. Maybe
there's a way to make loadGrammar call resolveEntity when it parses the
grammar? But I can get a similar behaviour if I don't use loadGrammar,
instead I just use setExternalSchemaLocation with "<the namespace of the
in-memory schema> <some dummy string>" and then the parser calls
resolveEntity several times and everything is fine.

-- 
View this message in context: 
http://www.nabble.com/setExternalSchemaLocation-and-xs%3Aimport-tp15532404p15799982.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