[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Testing attribute name and replacing them with oth
Hi,
Tempore 17:11:04, die 09/05/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Thomas Winkler <thomasm003@xxxxxxxx>: I want to find some attributes by name and then replacing them with other attributes (actually doing language transformation) : This is a typical job for an identity transformation: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*" /> </xsl:copy> </xsl:template> <xsl:template match="@size"> <xsl:attribute name="lC$nge"><xsl:value-of select="."/></xsl:attribute> </xsl:template> <xsl:template match="@brand"> <xsl:attribute name="marke"><xsl:value-of select="."/></xsl:attribute> </xsl:template> <xsl:template match="@price"> <xsl:attribute name="preis"><xsl:value-of select="."/></xsl:attribute> </xsl:template> </xsl:stylesheet> But perhaps the language-string mapping is already done in some XML file. In that case, you load that in the XSLT. regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) B+Error, keyboard not foundb press F1 to continueB; , BIOS
|
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
|