[xquery-talk] about function

Mohamed kharrat med_khr at yahoo.fr
Mon Nov 29 14:19:48 PST 2010


dear all,
i have this function:
 declare function local:Match($X as xs:string*,$Y as xs:string*)
{

 let $count:=tokenize($X, "\s") 
 where 
some $l in $count satisfies 
some $tok2 in tokenize($Y, "\s") satisfies
contains($l,$tok2)
return true()
}


it's ok , it return true where $X exist in $Y
but the problem is: supposing i have:
$string1='an '
$string2= 'the xquery is a language for xml'

this function will return  true because 'an' exist in the word 'language'
but i want to know how to return true only if the word 'an' exit alone , not in 
other word of $string2

i hope you understand me.
thank you



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20101129/0a3aabb2/attachment.htm


More information about the talk mailing list