Thread: if test=????
View Single Post
  #1 (permalink)  
Old August 24th, 2006, 08:08 AM
jmirickhai jmirickhai is offline
Registered User
Join Date: Aug 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default if test=????

I have a field to search and a search string. I need all the records whose field starts with the search string. Something like.

For example given the following xml file I would like to be a able to do something like:
return all cd elements whose artist's name starts with "Bo"

<?xml version="1.0" encoding="ISO-8859-1"?>

        <title>Empire Burlesque</title>
        <artist>Bob Dylan</artist>
        <title>Hide your heart</title>
        <artist>Bonnie Tyler</artist>
        <company>CBS Records</company>
        <title>Greatest Hits</title>
        <artist>Dolly Parton</artist>

Im not quite sure how to write the test for that

<xsl:for-each select="cd">
  <xsl:if test="???????? what goes here ??????">


Reply With Quote