W3C home > Mailing lists > Public > xproc-dev@w3.org > June 2009

Bug with p:add-xml-base?

From: Costello, Roger L. <costello@mitre.org>
Date: Sat, 6 Jun 2009 11:47:26 -0400
To: "'xproc-dev@w3.org'" <xproc-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB5003FD40C1B4@IMCMBX3.MITRE.ORG>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 6 June 2009 15:48:03 GMT