RE: [xsl] XSL:IF expression

Subject: RE: [xsl] XSL:IF expression
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Thu, 8 May 2003 09:48:47 +0100
> How can I test if an attribute's name contains a special string?
> Like this: "name() like 'special_text'"
> Thanks again,
> Agnes
In XPath 2.0 you can do regular expression matching:

<xsl:if test="matches(name(), '.*special.*')">

In 1.0 you can use the functions contains() and starts-with().

Michael Kay

 XSL-List info and archive:

Current Thread