I have the following snippet of XSL:
<xsl:for-each select='item'> <xsl:variable name='hhref' select='link' /> <xsl:variable name='pdate' select='pubDate' /> <xsl:if test='hhref not contains '1234''> <li> <a href='{$hhref}' title='{$pdate}'> <xsl:value-of select='title'/> </a> </li> </xsl:if> </xsl:for-each>
The if statement does not work because I haven’t been able to work out the syntax for contains. How would I correctly express that xsl:if?
Sure there is! For instance:
The syntax is:
contains(stringToSearchWithin, stringToSearchFor)