You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xml-commons-dev@xerces.apache.org by "Adam C. Hobaugh" <Ad...@ansys.com> on 2008/12/04 19:46:52 UTC

using catalog files with xerces from the command line

Howdy,

 

I am working on setting up my companies documentation repository to use
catalog files for all of our docbook source since the writers can
checkout anywhere in the file hierarchy. We use xerces for our xml
validation so it needs to be able to resolve urls using a catalog file.
Before the transition to catalog files we used the following command to
verify the xml files.

 

java -Xms200000000 -Xmx1400000000 -classpath
"D:\sandbox\docbook\resources\xerces.jar;D:\sandbox\docbook\resources\xe
rcesSamples.jar " sax.SAXCount -v
D:\sandbox\docbook\src\releasenotes.xml

 

Now we have the following catalog file and I need to know how to tell
xerces to use it since it says that "The XML Commons Resolver 1.2 is
included with the binary distribution of Xerces."
http://xerces.apache.org/xerces2-j/faq-xcatalogs.html. However it shows
how to use the resolver programming wise but not command line wise.

 

<?xml version="1.0"?>

<!DOCTYPE catalog

   PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"

   "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"

> 

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">

  <group prefer="public">

    <rewriteSystem

                                systemIdStartString="file:/sandbox/"

                                rewritePrefix="file:///D:/asdf/" />

    <rewriteURI

                                uriStartString="file:/sandbox/"

                                rewritePrefix="file:///D:/asdf/" />

    <rewriteSystem

                                systemIdStartString="file:///sandbox/"

                                rewritePrefix="file:///D:/asdf/" />

    <rewriteURI

                                uriStartString="file:///sandbox/"

                                rewritePrefix="file:///D:/asdf/" />

  </group>

</catalog>

 

Thank you in advance for any information you may be able to give.

 

Adam C. Hobaugh

Software Engineer Co-op

adam.hobaugh@ansys.com


Re: using catalog files with xerces from the command line

Posted by Earl Hood <ea...@earlhood.com>.
On Thu, Dec 4, 2008 at 12:46 PM, Adam C. Hobaugh <Ad...@ansys.com> wrote:

> java -Xms200000000 -Xmx1400000000 -classpath
> "D:\sandbox\docbook\resources\xerces.jar;D:\sandbox\docbook\resources\xercesSamples.jar
> " sax.SAXCount -v D:\sandbox\docbook\src\releasenotes.xml
>

See
<http://xml.apache.org/commons/components/resolver/resolver-article.html#ctrlresolver>.

--ewh