p:http-request and XML Catalogs

I can't get p:http-request, as opposed to p:load, to use the URI Resolver.

I've reduced the problem to the pipeline given below with three test
cases. The tests are best run offline, as then it becomes clear that only
p:load uses the catalog to resolve the URL to the DTD.

My setup is Calabash 0.9.30 (same happens with 0.9.29) in Ubuntu, with
TagSoup 1.2 and Apache Commons XML Resolver 1.1 added to the classpath of
Calabash.

Test #1: p:load
Test #2: p:http-request with override-content-type="text/plain;
charset=utf-8"
Test #3: p:http-request with override-content-type="application/xml;
charset=utf-8"

To run this test I use this command:
export
_JAVA_OPTIONS="-Dxml.catalog.files=/home/jostein/Skrivebord/catalogtest/catalog.xml
-Dxml.catalog.verbosity=9" \
&& calabash -D -E org.apache.xml.resolver.tools.CatalogResolver -U
org.apache.xml.resolver.tools.CatalogResolver test.xpl


---- test.xpl start ----
<?xml version="1.0" encoding="UTF-8"?>
<p:pipeline xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="
http://www.w3.org/ns/xproc-step"
    version="1.0">

    <!-- test #1 -->
    <!--p:load>
        <p:with-option name="href" select="'test.smil'"/>
    </p:load-->

    <!-- test #2 -->
    <!--p:http-request>
        <p:input port="source">
            <p:inline>
                <c:request method="GET" override-content-type="text/plain;
charset=utf-8"
                    href="test.smil"/>
            </p:inline>
        </p:input>
    </p:http-request-->

    <!-- test #3 -->
    <p:http-request>
        <p:input port="source">
            <p:inline>
                <c:request method="GET"
override-content-type="application/xml; charset=utf-8"
                    href="test.smil"/>
            </p:inline>
        </p:input>
    </p:http-request>

</p:pipeline>
---- test.xpl end ----


---- test.smil start (yes, invalid, but I'm not validating so this will do
for a test) ----
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 1.0//EN" "
http://www.w3.org/TR/REC-SMIL/SMIL10.dtd">
<smil/>
---- test.smil end ----


---- catalog.xml start ----
<?xml version="1.0"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
prefer="public">
    <uri
            name="http://www.w3.org/TR/REC-SMIL/SMIL10.dtd"
            uri="file:////home/jostein/Skrivebord/catalogtest/SMIL10.dtd"/>
    <public
            publicId="-//W3C//DTD SMIL 1.0//EN"
            uri="file:////home/jostein/Skrivebord/catalogtest/SMIL10.dtd"/>
    <system
            systemId="http://www.w3.org/TR/REC-SMIL/SMIL10.dtd"
            uri="file:////home/jostein/Skrivebord/catalogtest/SMIL10.dtd"/>
    <system
            systemId="SMIL10.dtd"
            uri="file:////home/jostein/Skrivebord/catalogtest/SMIL10.dtd"/>
</catalog>
---- catalog.xml end ----


And SMIL10.dtd as given here: http://www.w3.org/TR/REC-smil/SMIL10.dtd


Regards
Jostein

Received on Tuesday, 18 January 2011 15:25:36 UTC