Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SEARCH FOR NON-LITERAL STRINGS!!!

Status
Not open for further replies.

jonrubio

Programmer
Jul 22, 2002
1
ES
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=&quot;1.0&quot; encoding=&quot;ISO-8859-15&quot;?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;./locales2.xslt&quot;?>
<persons>
<person name=&quot;John&quot; />
<person name=&quot;Johnatan&quot; />
<person name=&quot;Peter&quot; />
</persons>

<xsl:stylesheet ...>
<xsl:param name=&quot;strSearch&quot; select=&quot;'John'&quot;/>
<xsl:if test=&quot;@name = $strSearch&quot;>
...
</xsl:if>
</xsl:stylesheet>

Thank for your help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top