Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 5th, 2004, 05:55 AM
Registered User
 
Join Date: Sep 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Fuzzy string comparison (2)

Hi there,

I'm still looking for an algorithm, implemented in XSLT, for fuzzy string comparison. There must be someone out there who has had do deal with that...

Kobus


 
Old October 9th, 2004, 02:40 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

What's fuzzy string comparison?
You can do the string comparison in XSLT as you do normally like numbers
TypeCast the value before you compare like string(nodename)=string('ss')

 
Old October 11th, 2004, 07:28 AM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe you should take such an algorithm from a programming language you know very well and try then to translate it step-by-step to xslt.
Like:
if = xsl:if
if-then-else = xsl:choose/when/otherwise
....and so on, most of the time you will have to make workarounds and this is going to be a damn big xslt-stylesheet.
Or you look for an Java-function on the net wich does that and take that to build an extended:xslt-function, but i dont know much about that.

Best thing is probably to do that in another prg.language. xslt just isn't build for something like that.






Similar Threads
Thread Thread Starter Forum Replies Last Post
JSTL String comparison probem! Plzzz help !! shimmeringtrinkets JSP Basics 0 February 26th, 2008 10:05 AM
String comparison arnabghosh Classic ASP Professional 1 June 29th, 2006 06:01 AM
fuzzy string comparison kobus XSLT 0 September 22nd, 2004 05:47 AM
Please Help - Tricky String Comparison ank2go SQL Server 2000 1 February 6th, 2004 09:57 PM
String Comparison rylemer Pro VB 6 9 July 29th, 2003 06:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.