xsl-list
[Top] [All Lists]

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

2009-07-03 13:18:57
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--