using contains() in XSLT (XPATH)
Posted: Fri Dec 05, 2003 5:14 am
I am trying to check if a nodes text ends in either .gif or .jpg I have tried several different ways and still not working. (I have been using the XPATH contains() method so far without any luck).
I know that from an XML stream that
barceloDS_responses/response/establishment/characteristics/room_photo
will either hold either a gif a jpg or neither. Thing is I cant check the node to see if its empty because if there is no picture available then the text in the node comes back as http://barcelobl/blah/blah (which changes from node to node).
So my question basically is how the heck do I check to see if the nodes text ends with jpg or gif? If it ends with something else i.e a '/' mark or something then I just wont display the picture. I have already tried concat and it didnt work....the xslt so far looks like <xsl:value-of select="format-number(amount * 1.25, '#.00','euro')" />.

Cheers for the help.....this is a biggy :S
I know that from an XML stream that
barceloDS_responses/response/establishment/characteristics/room_photo
will either hold either a gif a jpg or neither. Thing is I cant check the node to see if its empty because if there is no picture available then the text in the node comes back as http://barcelobl/blah/blah (which changes from node to node).
So my question basically is how the heck do I check to see if the nodes text ends with jpg or gif? If it ends with something else i.e a '/' mark or something then I just wont display the picture. I have already tried concat and it didnt work....the xslt so far looks like <xsl:value-of select="format-number(amount * 1.25, '#.00','euro')" />.
Cheers for the help.....this is a biggy :S