RE: [xsl] Matching and changing attributes.

Subject: RE: [xsl] Matching and changing attributes.
From: Thorbjørn Ravn Andersen <Thorbjoern.Ravn.Andersen@xxxxxxxxxx>
Date: Wed, 30 May 2001 20:47:55 +0100
 [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


Current Thread