Re: [xep-support] xml catalog doesn't work

From: Robert Wenner <robert.wenner@atsec.com>
Date: Tue Jun 20 2006 - 10:09:00 PDT

Hi,

On Saturday 17 June 2006 18:43, Andreas Eigenmann wrote:
> background-image="url(http://docbook.sourceforge.net/release/images/dra
>ft.png)" ... still needs internet connection.

I have a similar problem.
My XSL file reads an XML file with
         select="document($bibref)/bibref/item[@id=$ref]"
That file has a DTD associated:
        <!DOCTYPE bibref SYSTEM "http://w3.atsec/xml/bibref.dtd">

I have a catalog in place as described in the XEP reference, i.e., in an
ant script I use
    <target name="report">
        <java
            fork="true"
            classname="com.renderx.xep.XSLDriver"
            classpathref="xep.classpath">
            <arg value="-xml"/>
            <arg value="report.xml"/>
            <arg value="-param"/>
            <arg value="prjdir=${prjdir}"/>
            <arg value="-xsl"/>
            <arg value="${xmldir}/SERfo.xsl"/>
            <sysproperty key="com.renderx.xep.CONFIG"
                value="${xepdir}/xep.xml"/>
            <sysproperty key="com.renderx.sax.entityresolver"
                value="org.apache.xml.resolver.tools.CatalogResolver"/>
            <sysproperty key="com.renderx.jaxp.uriresolver"
                value="org.apache.xml.resolver.tools.CatalogResolver"/>
            <sysproperty key="xml.catalog.files"
                value="${xmldir}/catalog.xml"/>
        </java>
    </target>

This works fine if the that bibref.xml file does not have a DOCTYPE or the
identifier for that DTD is a real path to the DTD.
It fails when it should use a catalog:

java.io.FileNotFoundException: http://w3.atsec/xml/bibref.dtd; SystemID:
file:/home/robert/xml/SERfo.xsl; Line#: 1993; Column#: -1

Obviously, the system ID in bibref.xml could not be resolved.
Other programs work fine with that bibref.xml file, i.e. the catalog is
used and URIs are resolved to paths on my machine.

I understand that catalogs may not work on the XSLT document() function,
however, once that file is read, catalogs should IMHO be used to resolve
public and system identifiers.

I also found that if I use catalogs, I need to pass in the XSL stylesheet
as an argument to XEP (i.e., use -xsl SERfo.xsl) instead of placing it in
the XML input document (with
<?xml-stylesheet type="text/xsl" href="http://w3.atsec/xml/SERfo.xsl"?>)
and have the catalog resolver do the trick.

What am I missing here?
Can somebody confirm that XEP uses the Entity Resolver in a wrong way,
i.e. does not use it in combination with XSLT's document()?

Thanks,

Robert
-------------------
(*) 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 Jun 20 10:42:27 2006

This archive was generated by hypermail 2.1.8 : Tue Jun 20 2006 - 10:42:28 PDT