Re: [xsl] Is it possible to rewrite part of an attribute value with XSL?

Subject: Re: [xsl] Is it possible to rewrite part of an attribute value with XSL?
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 03 Jul 2009 19:18:28 +0200
Hermann Stamm-Wilbrandt wrote:

And with XSLT 1.0 processor supporting
  xmlns:regexp="http://exslt.org/regular-expressions";

you can do:
  <xsl:attribute name="style" select="regexp:replace(@style,
'fill:none;stroke:black;', 'g', '')"/>

Not quite I think as there is no select attribute for xsl:attribute in XSLT 1.0. But you can of course do
<xsl:attribute name="style">
<xsl:value-of select="regexp:replace(@style,
'fill:none;stroke:black;', 'g', '')"/>
</xsl:attribute>


--

	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread