base URI after select= in p:input, p:identity

Looking at the required test   base-uri-002  I see this pipeline

----------------
<p:pipeline xmlns:p="http://www.w3.org/ns/xproc" 
xmlns:t="http://xproc.org/ns/testsuite" 
xmlns:c="http://www.w3.org/ns/xproc-step" 
xmlns:err="http://www.w3.org/ns/xproc-error">
<!-- This p:identity step makes sure that we grab the root element -->
<!-- where the xml:base exists. Otherwise, we get the base uri -->
<!-- of the input document itself, and that varies by test env. -->
<p:identity>
 <p:input port="source" select="/doc"/>
</p:identity>
 <p:string-replace match="para[@class]/text()">
  <p:with-option name="replace" 
select="concat('&#34;',p:base-uri(),'&#34;')"/>
 </p:string-replace>
</p:pipeline>
------------------

This implies one or both of 2 things which I cannot find explicitly 
specified in the specs.
These seem to follow other conventions but I cant find them spelled out.


1) if you use a select in p:input then the resulting document's base URI 
becomes the base URI of the root element of the selected node.

and/or

2) The base URI of the output of Identity is the base URI of the root 
element, not the document

My *Guess* is that #1 is what's intended.
There is similar verbiage for p:viewport but not for p:input or p:identity

"The base URI of the resulting document that is passed to the subpipeline is 
the base URI of the matched element or document. "

I suggest this should be added to the p:input description, as well as other 
places where "select=" occurs that produces documents, such as in the 
bindings.   For p:identity, I think unless #2 is intended, that the 
implication is clear, that the base uri of the input document is passed to 
the output document.

-David

-----------------------------------------------------------
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org

Received on Saturday, 28 February 2009 13:51:58 UTC