W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > April 2010

Re: p:namespaces on p:variable?

From: Innovimax W3C <innovimax+w3c@gmail.com>
Date: Thu, 22 Apr 2010 14:12:06 +0200
Message-ID: <p2k546c6c1c1004220512tddde23bu7d536990077741ba@mail.gmail.com>
To: Norman Walsh <ndw@nwalsh.com>
Cc: public-xml-processing-model-wg@w3.org
Interesting question

The key point is here
[[
If the select attribute was used to specify the value and it consisted of a
single VariableReference (per [XPath 1.0 <#xpath>] or [XPath 2.0 <#xpath2>],
as appropriate), then the namespace bindings from the referenced option or
variable are used.
]]

It looks like it means that

[[

<p:pipeline type="ex:delete-in-div"
            version="1.0"
            xmlns:p="http://www.w3.org/ns/xproc"
            xmlns:ex="http://example.org/ns/ex"
            xmlns:h="http://www.w3.org/1999/xhtml">
<p:option name="divchild" required="true"/>


<p:delete>
  <p:with-option name="match" select="concat('h:div/',$divchild)">
    <p:namespaces xmlns:html="http://www.w3.org/1999/xhtml"/>
  </p:with-option>
</p:delete>

</p:pipeline>

]]

is equivalent to
[[

<p:pipeline type="ex:delete-in-div"
            version="1.0"
            xmlns:p="http://www.w3.org/ns/xproc"
            xmlns:ex="http://example.org/ns/ex"
            xmlns:h="http://www.w3.org/1999/xhtml">
<p:option name="divchild" required="true"/>

<p:variable name="match" select="concat('h:div/',$divchild)">

   <p:namespaces xmlns:html="http://www.w3.org/1999/xhtml"/>

</p:variable>


<p:delete>
  <p:with-option name="match" select="$match"/>
</p:delete>

</p:pipeline>

]]

Of course it's the dummy example, but am I right here ?

Mohamed
On Thu, Apr 22, 2010 at 1:46 PM, Norman Walsh <ndw@nwalsh.com> wrote:

> I don't actually propose that we do anything about it if the answer is
> "no", but can anyone think of any case where you'd actually need
> p:namespaces on p:variable?
>
>                                        Be seeing you,
>                                          norm
>
> --
> Norman Walsh <ndw@nwalsh.com> | It is said that power corrupts, but
> http://nwalsh.com/            | actually it's more true that power
>                              | attracts the corruptible. The sane are
>                              | usually attracted by other things than
>                              | power.--David Brin
>



-- 
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 Thursday, 22 April 2010 12:12:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 April 2010 12:12:41 GMT