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

Re: Using copy to change a node, whilst retaining the

Subject: Re: Using copy to change a node, whilst retaining the attributes
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Mon, 04 Aug 2003 20:42:35 +0200
Re:  Using copy to change a node
John Reid wrote:
I would like to go from A to B, preferably
with code that copys across all attributes and does not copy across the
text node for <yes> but creates a new text node for <yes>
...
    <yes ID="20030722" WE="Tu">A</yes>
    <yes ID="20030729" WE="Tu">A</yes>
    <yes ID="20030805" WE="Tu">A</yes>
    <yes ID="20030809" WE="Sa">D</yes>
...
  <dates>
    <yes ID="20030722" WE="Tu">A</yes>
    <yes ID="20030729" WE="Tu">A</yes>
    <yes ID="20030805" WE="Tu">A</yes>
    <yes ID="20030809" WE="Sa">C</yes>

Try <xsl:template match="yes"> <xsl:copy> <xsl:copy-of select="@*"/> <!-- your logic for the text here --> </xsl:copy> </xsl:template>

Did you look into the FAQ?

J.Pietschmann


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.