|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Altering specific value then outputing tree.
> I want to be able to output the above piece of XML in my > output document, and I > can do this fine by doing an <xsl:copy-of select="//person"/> > but I want to be > able to change the value of the member_number tag before > outputing the above so > that it contains a number. I am going to get the value for > the member_number > from elsewhere within my XML document. Is there an easy way > of doing this > rather than a <xsl:copy-of..> of each individual element > within the above > tree?? Write an identity template rule for most elements: <xsl:template match="*"> <xsl:copy-of select="*"/> <xsl:copy><xsl:apply-templates/></xsl:copy> </xsl:template> and override it with a special rule for member_number <xsl:template match="member_number"> <member_number><xsl:value-of select="..."/></member_number> </xsl:template> Mike Kay Software AG XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








