[xquery-talk] function xquery

Mohamed kharrat med_khr at yahoo.fr
Sun Nov 21 16:50:57 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 
every $tok2 in tokenize($Y, "\s") satisfies
some  $l in $count satisfies 
contains($l,$tok2)(:contains ($l,$tok):)
return true()
};

it works great but i dont want String parametres
i want use:   doc('v2.xml')//newsItem/itemMeta/title/text() as parametre not a 
String "my string"
i changed the function to : declare function local:Match($X as node() ,$Y as 
node() )
but it does't work,
i must convert doc('v2.xml')//newsItem/itemMeta/title/text() to string ? or i 
must change something else?
thank you very much


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20101121/42ab7cbf/attachment.htm


More information about the talk mailing list