This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Matching and changing attributes.
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Matching and changing attributes.
- From: Thorbjørn Ravn Andersen <Thorbjoern dot Ravn dot Andersen at mobilix dot dk>
- Date: Wed, 30 May 2001 20:47:55 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
[Note also it's easy to enhance this. So the test
<xsl:when test=".='badvalue'">
<xsl:value-of select="local-name(..)"/>
</xsl:when>
Is that something like what you want? The basic trick is to make sure you
are applying templates on the attribute axis (something that doesn't happen
by default), and then to match="@class" and create the replacement
attribute the way you want it in that template.
The above was exactly what I was looking for (along with the xsl:text way of
putting new text in it), and it is very concise. Thank you very much for
answering so promptly and correct.
--
Thorbjørn Ravn Andersen
Systemkonsulent - Value Added Services
Media Development Group
# MOBILIX - Prags Boulevard 80 - DK-2300 København S
+45 82 33 62 87
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list