W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > March 2009

Re: p:unescape-markup - changing the namespace URI

From: Norman Walsh <ndw@nwalsh.com>
Date: Wed, 11 Mar 2009 14:01:31 -0400
To: public-xml-processing-model-comments@w3.org
Message-ID: <m2y6vclz0k.fsf@nwalsh.com>
Toman_Vojtech@emc.com writes:
> I have a question about p:unescape-markup. Suppose I do this:
>
> <p:unescape-markup namespace="http://www.example.org/ns/">
>   <p:input port="source">
>     <p:inline><wrapper>&lt;doc
> xmlns="http://foo.com"/></wrapper></p:inline>
>   </p:input>
> </p:unescape-markup>
>
> What is the result?
>
> <wrapper><doc xmlns="http://foo.com"/></wrapper>
>
> or:
>
> <wrapper><doc xmlns="http://www.example.org/ns/"/></wrapper>
>
> In other words, does the "namespace" option change the namespace URIs of
> the elements in the wrapper, or is it only applied for elements that are
> in no namespace?
>
> The spec says that: "The namespace option specifies the default
> namespace. If it is provided, it will be declared as the default
> namespace on the document element." So this seems to imply that the
> namespace is always updated.
>
> Do I understand this right?

I don't think that's the intent. If the content contains an explicit
binding for the default namespace, I think that binding wins.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | A man is not necessarily intelligent
http://nwalsh.com/            | because he has plenty of ideas, any
                              | more than he is a good general because
                              | he has plenty of soldiers.-- Chamfort

Received on Wednesday, 11 March 2009 18:02:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 11 March 2009 18:02:13 GMT