Hi Jo,

Your example doesn't contain any schemaLocation attributes. If your 
document really looks like that I wouldn't expect your EntityResolver [1] 
to be called. There's no schema location to report to it. If you were 
expecting to resolve the schema documents based on their target namespace 
you should use an API which has a resolver that will pass that information 
(see the JAXP 1.3 Validation API [2] and LSResourceResolver [3]) to you.

Thanks.

[1] 
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/EntityResolver.html
[2] 
http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/package-summary.html
[3] 
http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSResourceResolver.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

"Jo Vandermeeren" <[EMAIL PROTECTED]> wrote on 01/29/2007 04:21:29 
AM:

> Hi fellow xerces users,
> 
> The project I'm working on uses XML as transport wrapper for data, 
> much like a SOAP wrapper that contains XML content.
> I want to parse and validate the entire message in 1 run, and need 
> to use 2 XSD schemas. 
> The XSD's used for validation are packaged inside our application 
> and need to be resolved locally.. I can attach an EntityResolver on 
> the parser, but
> only one call is issued to resolve the first encountered 
> schemaLocation or noNamespaceSchemaLocation. 
> It doesn't prompt me for the second one. Any ideas?
> 
> Is a resolver available to resolve each encountered 
> xmlns/schemaLocation attribute?
> 
> Here's a little example of how the message structure  looks like: 
> 
> <root xmlns="http://www.example.com/root";> 
>   <inrootnamespace/> 
>   <child xmlns="http://www.example.com/child";> 
>     <inchildnamespace/> 
>   </child> 
> </root> 
> 
> 
> Cheers
> Jo

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

Reply via email to