xml - XSL Contains that returns true if anything matches -


hey want below return true if of matches (for example, should return true because contains randomstuff though first part doesn't match).

contains('otherrandomstuff', 'blargrandomstuff') 

cheers

here's possible (not efficient) algorithm:

(1) find characters appear in both strings. call common subset.

(2) in both strings, find substrings consisting of characters in common subset

(3) find substrings in both sets

(4) of these, take longest

(5) report success if longer threshold.

however, i'm not going go further in terms of producing working code because suspect haven't thought requirement through fully. before writing code, want know trying achieve. also, while attempting in xslt 2.0 quite feasible, xslt 1.0 solution pretty grotesque.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -