[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Keep previous attributes, while adding a new one
> -----Original Message----- > From: Naomi Gronson [mailto:naomi_gronson@xxxxxxxxx] > > Is there any way that I can retain the > <programlisting>'s attributes while adding the new > @format value. I could list them out manually, but we > are constantly adding new attributes and I don't want > to have to update the xsl everytime a new one is > added. Any ideas? Thanks. > Yup! Try: <xsl:template match="programlisting[ancestor::para]"> <xsl:copy> <xsl:copy-of select="@*" /> <xsl:attribute name="format">bling</xsl:attribute> <xsl:apply-templates /> </xsl:copy> </xsl:template> Cheers, Andreas
|
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
|