|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Change of Attribute Value
Hi fabrice, This is just a very quick solution from the top of my head. Not tested, and I am a little sure of the copy-of on the remaining attributes - the test for not choosing the name. Another one might help you out here. <xsl:template match="node"> <xsl:copy> <xsl:attribute name="name">concat((ancestor::node)[2]/@name,@name"</xsl:attribute> <xsl:copy-of select="@*[not(self::@name)]"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="*[not(self::node)]"> <xsl:copy-of select="."/> </xsl:template> Regards, Ragulf Pickaxe :-) > so basically, i want to skip the first level of element <node>, and then > pick up the attribute @name value of the second level and concat it to all > sublevel attributes @name > > I'm sure this is possible using some kind of recusion. > Any help, would be much appreciated. > > Thanks in advance. > fabrice
|
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
|






