Hello:
I have a problem with a XSLT code I am working on. I have to compare two strings, but I don't want to compare them as a whole. I need a kind of SQL's 'LIKE' comparer. If I search 'John' name y need to find names like 'John' or 'Johnatan' too, and actualy I only get 'John' as search result.
My actualy code:
<?xml version="1.0" encoding="ISO-8859-15"?>
<?xml-stylesheet type="text/xsl" href="./locales2.xslt"?>
<persons>
<person name="John" />
<person name="Johnatan" />
<person name="Peter" />
</persons>
<xsl:stylesheet ...>
<xsl
aram name="strSearch" select="'John'"/>
<xsl:if test="@name = $strSearch">
...
</xsl:if>
</xsl:stylesheet>
Thank for your help.
I have a problem with a XSLT code I am working on. I have to compare two strings, but I don't want to compare them as a whole. I need a kind of SQL's 'LIKE' comparer. If I search 'John' name y need to find names like 'John' or 'Johnatan' too, and actualy I only get 'John' as search result.
My actualy code:
<?xml version="1.0" encoding="ISO-8859-15"?>
<?xml-stylesheet type="text/xsl" href="./locales2.xslt"?>
<persons>
<person name="John" />
<person name="Johnatan" />
<person name="Peter" />
</persons>
<xsl:stylesheet ...>
<xsl
<xsl:if test="@name = $strSearch">
...
</xsl:if>
</xsl:stylesheet>
Thank for your help.