W3C home > Mailing lists > Public > xproc-dev@w3.org > August 2011

add-attribute test case

From: mozer <xmlizer@gmail.com>
Date: Sat, 6 Aug 2011 23:43:53 +0200
Message-ID: <CAKdwC_OyGtWVqHWa9G35L9kBv7+8a1wBqa64sZAkWLojGgK=_w@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 6 August 2011 21:44:20 GMT