Re: [xep-support] XML catalogs in XEP

From: Werner Donné <werner.donne@re.be>
Date: Tue Aug 30 2005 - 03:21:19 PDT

Marc,

If you use the Apache resolver, as Alexander has indicated, then you
have to put it in the CatalogManager.properties file. You can also
use the system property "xml.catalog.files", which expects a semicolon-
delimeted list of catalog files.

The approach I started about is for embedding XEP in an application,
which is not your case.

Regards,

Werner.

Marc Baaden wrote:
> Werner,
>
> thanks a lot for your tip, but unfortunately I am not enough XML or Java
> savvy to quite understand it. However - by some trial and error - it seems
> like somehow xep does "magically" read my xml catalog file without my
> interference.
>
> Some few things are still taken from the net (which I can verify by not
> defining the proxy), but I haven't yet found a switch to check that.
>
> Still I would like to understand how to use the Sax entity resolver. So
> in case it is only a line of code or so and you don't mind, here is what
> I use and I would like to tell it to use eg catalog file
> /etc/xml/test/catalog.xml. How would I do that ?
>
> My command is:
>
> CP=$JAVA_HOME/lib/tools.jar:$XEP_HOME/lib/xep384_client_academic.jar:$XEP_HOME/lib/cryptix32.jar:$XEP_HOME/lib/cryptix32-pgp.jar:$XEP_HOME/lib/saxon.jar:$XEP_HOME/lib/xt.jar:$XEP_HOME/lib/xep.jar
>
> $JAVA_HOME/bin/java -classpath $CP \
> -Dcom.renderx.xep.ROOT=$XEP_HOME be.re.tools.XEP \
> -fo $FNAME.fo -pdf $FNAME.pdf
>
> Thanks in advance,
> Marc
>
>
>
>>>>=?ISO-8859-1?Q?Werner_Donn=E9?= said:
>
> >> Marc,
> >>
> >> You should implement the org.xml.sax.EntityResolver interface.
> >> It has only one method "resolveEntity", which takes two arguments:
> >> "publicId" and "systemId". For either one of them you can look up
> >> the file in your catalog.xml and return a org.xml.sax.InputSource.
> >>
> >> Try a look-up with publicId if it is different from null. If there
> >> is no result, try systemId if it is different from null. If there
> >> still is no result you should return null. The parser will then try
> >> to fall back on a default value.
> >>
> >> This entity resolver must be set on the org.xml.sax.XMLReader you
> >> use for parsing the XSL-FO document or another input document if
> >> you have filters between the parser and the formatter.
> >>
> >> Regards,
> >>
> >> Werner.
>

-- 
Werner Donné  --  Re BVBA
Engelbeekstraat 8
B-3300 Tienen
tel: (+32) 486 425803	e-mail: werner.donne@re.be
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Tue Aug 30 03:45:26 2005

This archive was generated by hypermail 2.1.8 : Tue Aug 30 2005 - 03:45:26 PDT