![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - >Thread Next - Re: [xsl] Copying-Replacing Elements [xsl] Copying-Replacing ElementsTo: Date: 9/1/2005 9:44:00 PM Hello, When I encounter a node that specifies some criteria in a document, I would like to make a few changes to it (which could include adding, deleting, and updating members) and output it and then output the original node. Could someone tell me the best of way of accomplishing this? The original node would look something like this... <data> <cell id="8" flag="false"> <name>bob</name> <member>5</member> </cell> </data> The output would like something like this... <data> <cell id="8" flag="true"> <name>matt</name> </cell> </data> <data> <cell id="8" flag="false"> <name>bob</name> <member>5</member> </cell> </data> I'm thinking the xsl would look something like this <xsl:template name="createNewSiblingMember" match="something that returns a single node"> <xsl:copy-of select="."> ...do some kind of transformations... </xsl:copy-of> <xsl:copy-of select="."/> </xsl:template> Thanks for any help that anyone could provide, Matt | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
