Subject: RE: [xsl] Altering specific value then outputing tree. From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Wed, 11 Jul 2001 17:36:28 +0100 |
> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Altering specific value then , mmackay | Thread | [xsl] Saxon and HashMap/Hashtable, William Lam |
[xsl] Altering specific value then , mmackay | Date | RE: [xsl] Where does xalan redirect, Ruggier, Mario |
Month |