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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'LIKE' search in XSL

Status
Not open for further replies.

Torp23

Programmer
Jun 13, 2002
32
0
0
US
I have an XSL file that filters a recordset to send back to the calling code. The page works fine, but I can't get it to do a 'LIKE' search or 'wildcard' search. Here is the active line that I am trying to change:

<xsl:for-each select=&quot;root/pd_peopleview[@fname=($fname)]&quot;>

I am trying to return all the names that begin with &quot;S&quot; in the 'fname' field if the variable 'fname' has a value of &quot;S&quot;. Does anyone know how to add a wildcard character or a 'LIKE' search in this line? The whole code from the page follows in case it is helpful.

Scott

------------------------------------------------------
<xsl:template match=&quot;/&quot;>

<root>
<xsl:for-each select=&quot;root/pd_peopleview[@fname=($fname)]&quot; >
<xsl:sort select=&quot;@lname&quot; order=&quot;ascending&quot; />
<pd_peopleview>
<xsl:for-each select=&quot;@*&quot; >
<xsl:attribute name='{name()}'> <xsl:value-of select=&quot;.&quot;/></xsl:attribute>
</xsl:for-each>
</pd_peopleview>
</xsl:for-each>
</root>

</xsl:template>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top