Re: add-attribute test case

I concur : that's the expected behavior

Xmlizer

On Mon, Aug 8, 2011 at 9:25 AM, <vojtech.toman@emc.com> wrote:

> I must admit it took me a moment to spot the error. When I ran the pipeline
> with Calumet, I got the following result:****
>
> ** **
>
> <root>****
>
>   <div _11:a="3" xmlns:_11="foo" xmlns:_1="bar">****
>
>     <div _11:a="3" xmlns:_2="bar">****
>
>       <div _11:a="3" xmlns:_3="bar">****
>
>       </div>      ****
>
>     </div>  ****
>
>   </div>****
>
> </root>****
>
> ** **
>
> So what Calumet does is that if it detects that the prefix (as specified in
> “attribute-prefix”) cannot be used, it manufactures a new one. I believe
> that is the expected behavior as “attribute-prefix”, according to the
> specification, is used “to suggest a prefix for the attribute name”.****
>
> ** **
>
> Vojtech****
>
> ** **
>
> ** **
>
> --****
>
> Vojtech Toman****
>
> Consultant Software Engineer****
>
> EMC | Information Intelligence Group****
>
> vojtech.toman@emc.com****
>
> http://developer.emc.com/xmltech****
>
> ** **
>
> *From:* xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] *On
> Behalf Of *mozer
> *Sent:* Saturday, August 06, 2011 11:44 PM
> *To:* XProc Dev
> *Subject:* add-attribute test case****
>
> ** **
>
> Dear all,****
>
> ** **
>
> I came across an interesting case about p:add-attribute****
>
> ** **
>
> Here is the pipeline****
>
> ** **
>
> <?xml version="1.0" encoding="UTF-8"?>
> <p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
>    version="1.0">
>   <p:add-attribute match="div" attribute-name="a" attribute-namespace=
> "foo" attribute-prefix="_1" attribute-value="3"/>
> </p:pipeline>****
>
> ** **
>
> And here is the input file****
>
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
>   <div xmlns:_1="bar">
>     <div xmlns:_2="bar">
>       <div xmlns:_3="bar">
>       </div>
>     </div>
>   </div>
> </root>****
>
> ** **
>
> Calabash gives the following result****
>
> ** **
>
> <root>
>   <div xmlns:_1="bar" _1:a="3">
>       <div xmlns:_2="bar" _1:a="3">
>          <div xmlns:_3="bar" _1:a="3">
>       </div>
>       </div>
>   </div>
> </root>****
>
> ** **
>
> Best regards,****
>
> ** **
>
> Xmlizer****
>

Received on Monday, 8 August 2011 08:05:08 UTC