Re: [xep-support] XML catalogs in XEP

From: Marc Baaden <baaden@smplinux.de>
Date: Tue Aug 30 2005 - 02:49:40 PDT

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.

-- 
 BioMolSim meeting 2&3 Sep 2005: http://www.iecb.u-bordeaux.fr/satellite2005/
 Dr. Marc Baaden  - Institut de Biologie Physico-Chimique, Paris
 mailto:baaden@smplinux.de      -      http://www.baaden.ibpc.fr
 FAX: +33 15841 5026  -  Tel: +33 15841 5176  ou  +33 609 843217
-------------------
(*) 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:14:51 2005

This archive was generated by hypermail 2.1.8 : Tue Aug 30 2005 - 03:14:52 PDT