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 White Shadow wrote: > Hello Everyone > > Thanks to Mark, I have been succeeded in implementing case-insensitive query > string for my dbxml project. I am now facing a problem with contain function > which I am using so that if a part of name is given for query, it can return > me that as a valid result. > > The query string I am using is: > > xpath = "//person[contains(translate( > Name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')= > translate('"+ strName + > "','ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'))]"; > > I want that for a name Mark J. Stang , if the user queries for either Mark > or Stang or J, it can return the Result for Mark J. Stang > > The above xpath string is not working. Can someone point out whats teh > mistake in it? > > Thanks > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com