The contain plus translate function is now working. Following is the correct syntax for the equery String.
xpath = "//person[contains(translate(Name,'ABCD','abcd'),translate('"+ strName +"','ABCD','abcd'))]";
One thing I have seen is that as the definition for contains function goes, a single character given can also give a valid result. e.g.
for Mark J. Stang, if we give a single character n, it will return this as valid result. Thats right so far the contains function is related. But in practical usage this is not the desired feature(atleast for me).
I want to distinguish this feature on the basis of space character. That means that a only whole word lke mark or stang can give the desired result for Mark J. Stang. Anyway thanks to all the people who helped me in solving these problems.
From: "Mark J. Stang" <[EMAIL PROTECTED]> Reply-To: [email protected] To: [email protected] Subject: Re: Xpath problem with contain function Date: Fri, 10 May 2002 13:20:21 -0600
Have you been able to get it to work with out the translate()? Also, I think you need to do something like:
xpath = "//person/FirstName[contains(self::*, 'ang')]";
In this one, you need to translate both the node text and your search value:
xpath = "//person/FirstName[contains(translate(self::*,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 'ANG')]";
HTH,
Mark
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx
