Pattern Matching with XSLT

Posted by genesis11 on Stack Overflow See other posts from Stack Overflow or by genesis11
Published on 2010-06-08T20:24:34Z Indexed on 2010/06/09 11:22 UTC
Read the original article Hit count: 298

Filed under:
|
|
|

I'm trying to match a pattern into a string in XSLT/XPath using the matches function, as follows:

<xsl:when test="matches('awesome','awe')">
   ...
</xsl:when>

However, in both Firefox 3.5.9 and IE8, it doesn't show up. IE8 tells me that "'matches' is not a valid XSLT or XPath function." Is this due to XSLT 2.0 not being supported, and is there a way around this?

© Stack Overflow or respective owner

Related posts about xslt

Related posts about xpath