Oh yes I see. Sorry about that. I am just loosing my head trying to make
this stuff working.
I defined my XMLCatalogResolver:
XMLCatalogResolver catalog1 = new XMLCatalogResolver();
I have added to it to catalog using setCatalogList() method.
I have tested to resolveURI to see if it really took into account my
catalog:
System.out.println(catalog1.resolveURI("http://my.uri.com/GRIPP/jmsPrope
rties"));
This test works fine. I got as output the location of my xsd file.
I have added the catalogResolver to my parser:
builder.setEntityResolver(catalog1);
BUT when parsing and validating my XML file, I got:
cvc-elt.1: Cannot find the declaration of element 'JMSProperties'.
XMLCatalogResolver uses target namespace to resolve location. So in my
xsd, I do not need to have the schemaLocation tag, right?
It should use: xmlns="http://my.uri.com/GRIPP/jmsProperties", right? The
JMSProperties is the root tag:
<JMSProperties xmlns="http://my.uri.com/GRIPP/jmsProperties"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
....
</JMSProperties>
Lydie.
-----Original Message-----
From: Michael Glavassevich [mailto:[EMAIL PROTECTED]
Sent: Monday, September 25, 2006 19:15
To: [email protected]
Subject: RE: Trying to validate XML files using several XSD
"Decoker, Lydie \(Lydie\)" <[EMAIL PROTECTED]> wrote on 09/25/2006
10:51:59 AM:
>
> I should have missed something because even if I used the
> CatalogResolver, it's like it's not using it. I have set (via
> setProperty) the debug level + the catalog list, and it's still using
> the schemaLocation declaration from my XML file to find the associated
> schema (not DTD).
>
> Same if I use the XMLCatalogResolver (using the setCatalogList to set
> the catalog lists).
>
> I am just wondering which key is used for the resolution when you use
> a schema and not a DTD.
You asked a similar question several e-mails ago which I answered. See
http://marc.theaimsgroup.com/?l=xerces-j-dev&m=115912689224930&w=2.
> Lydie.
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]