[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Copying-Replacing Elements

Subject: Copying-Replacing Elements
From: "Emerson, Matt" <Matt.Emerson@xxxxxxx>
Date: Thu, 1 Sep 2005 17:43:44 -0400
replacing elements in a list
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.