XML-STX

 view release on metacpan or  search on metacpan

test/cdata-group2.stx  view on Meta::CPAN

<stx:transform version="1.0" 
  xmlns:stx="http://stx.sourceforge.net/2002/ns"
  recognize-cdata="no"
  strip-space="yes">

  <stx:template match="root">
    <stx:process-children group="g1"/>
  </stx:template>

  <stx:group name="g1" recognize-cdata="yes">

    <stx:template match="text()[name(..)='root']">
      [<stx:copy/>]
    </stx:template>

  </stx:group>

</stx:transform>



( run in 0.642 second using v1.01-cache-2.11-cpan-39bf76dae61 )