Re: Speaking of in-scope namespaces...

On 9/7/07, Norman Walsh <ndw@nwalsh.com> wrote:
> I think this is another way of looking at the problem Alex has been
> describing with insert and replace. I'm not sure I think it's related
> to namespace fixup at all.
>
> Consider this pipeline:
>
> <p:pipeline>
>   <p:input port="source">
>     <p:inline>
>        <doc xmlns="nonsuri" xmlns:a="nsauri" xmlns:b="nsburi" xmlns:c="nscuri">
>          <content/>
>        </doc>
>     </p:inline>
>   </p:input>
>
>   <p:identity>
>     <p:input port="source" xmlns:xxx="nonsuri">
>              select="xxx:doc/xxx:content"/>
>   </p:identity>
> </p:pipeline>
>
> I think we all intend for the namespace bindings on the output from
> the identity step to include all of the bindings on the original
> document.
>
> But I'm not sure we say that very clearly and I wonder if we'd be
> helping things if we did.
>
> In 5.1, we say:
>
>   The select expression, if specified, applies the specified [XPath
>   1.0] select expression to the document(s) that are read. Each node
>   selected is wrapped in a document and provided to the input port. In
>   other words, ...
>
> Perhaps we should say instead:
>
>   The select expression, if specified, applies the specified [XPath
>   1.0] select expression to the document(s) that are read. Each element
>   selected is copied into a new document where it becomes the document
>   element of that document. The in-scope namespaces and base URI of the
>   original element node MUST be preserved.
>
>   In other words, ...

which means the result of the above is

<content xmlns="nonsuri" xmlns:a="nsauri" xmlns:b="nsburi"
xmlns:c="nscuri" xmlns:p="http://www.w3.org/ns/xproc"
xmlns:xxx="nonsuri"/>

Am I right ?

Mohamed

-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Friday, 7 September 2007 20:25:28 UTC