Claude --
It sounds like you'll need to just execute
TransformerImpl.executeChildTemplates. See the Redirect extension for
an example of how this works. You'll need to create a ContentHandler.
See the makeFormatterListener method of Redirect for some ideas.
Basically, you'll create a ContentHandler based on a
ByteArrayOutputStream. Then, you'll be able to look at the byte array,
or create a String from it, and do your thing.
If you return a String, it will be inserted into the transformation
result tree.
After looking at Redirect, if you still have questions, please come back
and ask. I can give you pretty detailed help but I'd need more info on
the application and I thought you'd like to discover the stuff for
yourself. :)
Gary
Claude Warren wrote:
>
> I am trying to implement an encryption extension using the Cryptix
> libraries. The problem I have is that I can not figure out how to
> capture the result of the tranformation of enclosed elements.
>
> As an example assume the xml document:
> ---- A.xml ----
>
> <doc>
> <data>
> <foo>
> Now is the time for all good men to come to the aid of their country.
> </foo>
> </data>
> </doc>
>
> ---- end A.xml ----
>
> Is processed with the style sheet
>
> ---- A.xsl ----
>
> <xsl:template match="data">
> Encrypted Data:
> <encrypt:cipher algorithm="Blowfish" provider="Cryptix" key="foobar">
> <xsl:apply-templates/>
> </encrypt:cipher>
> </xsl:template>
>
> <xsl:template match="foo">
> <!-- do someother processing here -->
> </xsl:template>
>
> ---- end A.xsl ----
>
> Inside the encrypt:cipher processing I want to execute the
> "<xsl:apply-templates/>" to process the <foo> element in A.xml and pass
> that result into the ecnryption algorithm. If I can capture the output I
> can do the rest. Any ideas how to do that?
>
> Claude Warren