[Home] [By Thread] [By Date] [Recent Entries]
Hi List,
Thanks in advance for the help. Not sure why I'm having such a tough time with this one, but here it goes. I'm using Saxon and XSLT 2.0. Basically I have a named template I'm calling that inserts a node into a bunch of small xml documents. Hoewever I'm not sure how to do this as the param comming in is out of scope if I was to apply-templates: so if I started with: file:///c:/test.xml <root> <foo> <bar>of the foo variety</bar> <insert>insert the text after this</insert> <foo> <bar>A deeper bar who is foo</bar> </foo> </foo> </root> and wanted file:///c:/test_new.xml <root> <foo> <bar>of the foo variety</bar> <insert>insert the text after this</insert> the new insert <foo> <bar>A deeper bar who is foo</bar> </foo> </foo> </root> and had the template:
<xsl:result-document href="{$myResultsFile}">
<!-- Here I'm not sure what to do with $inDoc, apply-templates with
a mode makes me lose $myNode and a for-each doesn't keep my original
structure -->
</xsl:result-document>
</xsl:template>an called my template with
What would be the best way to do this. Thanks, Spencer
|

Cart



