Hi,
is it possible to get the result tree and work on it?

I am able to do the transformation on my own via executeChildTemplates. But I have not found a way to process the result.

<xalan:component prefix="my" elements="countwords">
   <xalan:script lang="javascript">
       function countwords(context, elem){
           transf = context.getTransformer();
           transf.executeChildTemplates(elem,true);
           return "";
       }
   </xalan:script>
</xalan:component>

<xsl:template match="/">
   <my:countwords>
       <text>
           some words
           <xsl:value-of select="."/>
       </text>
   </my:countwords>
</xsl:template>

my xml file:

<root>
   some more words
</root>

What i am trying to do is to add an attribute count to the text output.

<text count="5">
    some words
    some more words
</text>

Any idea how to do this?
Cheers
Jan

Reply via email to