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 Saturday, 6 August 2011 21:44:20 UTC