Bug with p:add-xml-base?

Hi Folks,

I have a simple pipeline that uses p:add-xml-base:

-----------------------------------------------------
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">

    <p:input port="source">
        <p:document href="BookStore.xml"/>
    </p:input>

    <p:output port="result">
        <p:pipe step="store" port="result"/>
    </p:output>

    <p:add-xml-base />
    
    <p:store href="result.xml" name="store"/>

</p:declare-step>
-----------------------------------------------------


The file that is stored, result.xml, is the BookStore with xml:base added to the root element:

<BookStore xml:base="file:/C:/xproc/example/BookStore.xml">
    ...
</BookStore>


Is that value for xml:base correct? It doesn't seem correct.

I think it should be:

   file:/C:/xproc/example/


If the xml:base is:

   file:/C:/xproc/example/BookStore.xml

then I can't see how p:xinclude could work.

That is, if I put this include statement in BookStore.xml:

    <xi:include href="siddhartha/Siddhartha.xml" />

The absolute URL is the value of xml:base plus the relative URL:

    file:/C:/xproc/example/BookStore.xml/siddhartha/Siddhartha.xml

which is clearly wrong (and which explains why I get an error whenever I use p:xinclude)

What am I missing?

/Roger

Received on Saturday, 6 June 2009 15:48:02 UTC