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.
Marc Baaden wrote:
> Hi,
>
> sorry to take up a rather old message that I asked previously for
> using (at that time) SGML catalogs with XEP. Having fully switched
> to XML now, I wonder how to tell XEP to use my catalog system with
> the root catalog in /etc/xml/catalog.xml (on a Debian system).
>
> I did read the XEP user guide section about resolution of external
> entities, but did not quite grasp how you'd use it to specify a local
> catalog file. And the in-depth link to Sun's site is outdated.
>
> So thanks for any help and assistance.
>
> Marc
>
> (also, for verification purposes, is there a kind of "--nonet" switch
> like eg xsltproc has to verify that I am really only using local
> files and no stuff from the net ?)
>
>
>
>>>>Alexander Peshkov said:
>
> >> [..]
> >> The more general approach is to setup XML catalogs properly. Very
> >> helpful info about XML catalogs creation can be found here:
> >> http://wwws.sun.com/software/xml/developers/resolver/article/
> >> Note that starting from version 3.5 XEP provides support for XML
> >> catalogs (so there is no real need for extension any more). Use of
> >> XML catalogs with XEP described in section "3.5. Resolution of
> >> External Entities and URIs" of "XEP 3.5 User Guide" (userguide.pdf,
> >> included in XEP distribution).
> >> [..]
>
-- 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.htmlReceived on Tue Aug 30 02:40:48 2005
This archive was generated by hypermail 2.1.8 : Tue Aug 30 2005 - 02:40:49 PDT