[closed] Re: base URI after select= in p:input, p:identity

"David A. Lee" <dlee@calldei.com> writes:
> 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.

Yes. We say that explicitly for p:viewport inputs but not more generally.
I've added it to the description of select on p:input.

> 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.

That is explicit in section 7:

  When a step in this library produces an output document, the base
  URI of the output is the base URI of the step's primary input
  document unless the step's process explicitly sets an xml:base
  attribute or the step's description explicitly states how the base
  URI is constructed.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Simplification good! Oversimplification
http://nwalsh.com/            | bad!--Larry Wall

Received on Wednesday, 22 April 2009 11:56:11 UTC