MichaelF
November 17th, 2003, 01:54 PM
Hi, I'm building a simple "search" tool that allows a user to type in a term which is compared to the contents of a repeated element.
ie:
<root>
<items>
<itemname>Pencils</itemname>
<itemname>Books</itemname>
<itemname>Erasers</itemname>
</items>
</root>
I'm using the contains() function to check the text inside the elements, ie: <xsl:when test="contains(itemname, searchterm)">
If the user enters 'pencils', there is not a match due to the lowercase entry. Is there a way in XSL to ignore case or, to convert case so that the user does not need to enter capitalized words?
thanks for any ideas,
ie:
<root>
<items>
<itemname>Pencils</itemname>
<itemname>Books</itemname>
<itemname>Erasers</itemname>
</items>
</root>
I'm using the contains() function to check the text inside the elements, ie: <xsl:when test="contains(itemname, searchterm)">
If the user enters 'pencils', there is not a match due to the lowercase entry. Is there a way in XSL to ignore case or, to convert case so that the user does not need to enter capitalized words?
thanks for any ideas,