Quantcast

Can i use OASIS XML Catalogs in Xerces (commandline)?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can i use OASIS XML Catalogs in Xerces (commandline)?

Gerben
Hi,

I use command [java -cp "xercesImpl.jar;xercesSamples.jar;xml-apis.jar;" sax.Counter] to validate an xml file against a dtd. How can i specify that xerces should use a specific OASIS XML Catalog? Can i use resolver.jar?

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can i use OASIS XML Catalogs in Xerces (commandline)?

Michael Glavassevich-3
Hi,

That's not currently possible with sax.Counter or any of Xerces' samples.
You would need to modify the source code (which is available in the binary
distribution) to add this capability.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [hidden email]
E-mail: [hidden email]

Gerben <[hidden email]> wrote on 06/25/2007 10:32:15 AM:

> Hi,
>
> I use command [java -cp "xercesImpl.jar;xercesSamples.jar;xml-apis.jar;"
> sax.Counter] to validate an xml file against a dtd. How can i specify
that
> xerces should use a specific OASIS XML Catalog? Can i use resolver.jar?
>
> Thanks.
> --
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can i use OASIS XML Catalogs in Xerces (commandline)?

Gerben
What changes would i have to make in the source code?

Is this enough?

    parser = XMLReaderFactory.createXMLReader(parserName);

    EntityResolver resolver = new CatalogResolver(); <-- extra code
    parser.setEntityResolver(resolver); <-- extra code
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can i use OASIS XML Catalogs in Xerces (commandline)?

Michael Glavassevich-3
Looks okay. Have you tried it?

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [hidden email]
E-mail: [hidden email]

Gerben <[hidden email]> wrote on 07/19/2007 02:20:20 AM:

> What changes would i have to make in the source code?
>
> Is this enough?
>
>     parser = XMLReaderFactory.createXMLReader(parserName);
>
>     EntityResolver resolver = new CatalogResolver(); <-- extra code
>     parser.setEntityResolver(resolver); <-- extra code
>
> --
> View this message in context: http://www.nabble.com/Can-i-use-OASIS-
> XML-Catalogs-in-Xerces-%28commandline%29--tf3976738.html#a11683042
> Sent from the Xerces - J - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...