<?xml-stylesheet type="text/xsl" href="/style/testcase.xsl"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite"
        xmlns:p="http://www.w3.org/ns/xproc"
        xmlns:c="http://www.w3.org/ns/xproc-step"
        xmlns:err="http://www.w3.org/ns/xproc-error">

  <t:title>Test labelelements #009</t:title>

  <t:description xmlns="http://www.w3.org/1999/xhtml">
    <p>Tests attribute-namespace and attribute-prefix. If you attempt
    to duplicate a prefix, make sure the namespace bindings don't
    get mangled!</p>
  </t:description>
  
  <t:input port='source'>
    <document>
      <element bar:baz="baz" xmlns:bar="http://bar.com/"/>
    </document>
  </t:input>
  
  <t:pipeline>
    <p:pipeline version='1.0'>
      
      <p:label-elements match="element"
                        attribute="foo"
                        attribute-namespace="http://bar2.com/"
                        attribute-prefix="bar"/>
      
    </p:pipeline>
  </t:pipeline>
  
  <t:output port='result'>
    <document>
      <element bar:baz="baz" bar2:foo="_1" xmlns:bar="http://bar.com/" xmlns:bar2="http://bar2.com/"/>
    </document>
  </t:output>
  
</t:test>

