W3C home > Mailing lists > Public > xproc-dev@w3.org > December 2008

RE: add-attribute adding namespace declarations.

From: <Toman_Vojtech@emc.com>
Date: Wed, 17 Dec 2008 10:47:06 -0500
Message-ID: <6E216CCE0679B5489A61125D0EFEC7870DDFC284@CORPUSMX10A.corp.emc.com>
To: <xproc-dev@w3.org>

> I'm a little confused about add-attribute.
> 
> In
> 7.1.1 p:add-attribute
> 
> it says ...
> "This step cannot be used to add namespace declarations."
> 
> But in the required test
>     add-attribute-002.xml
> 
> The input document is:
> 
> <document>
> 
> <title>Some Title</title>
> 
> <para>Some paragraph.</para>
> 
> </document>
> 
> 
> 
> and the output after 2 add-attributes is supposed to be '
> 
> <document>
> 
> <title xmlns:test2="http://test.com" test2:foo="bar">Some 
> Title</title>
> 
> <para>Some paragraph.</para>
> 
> </document>
> 
> ---
> 
> Which clearly has had a namespace declaration added to the xml.
> 
> That seems useful, but in clear contridiction to the spec.
> 
> So which is correct ?

p:add-attribute *can* add namespace declarations as the result of adding
attributes that are in a namespace. But you can't use p:add-attribute if
you want to create only namespace declarations.

Regards,
Vojtech
Received on Wednesday, 17 December 2008 15:48:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 17 December 2008 15:48:07 GMT