Monday, July 6, 2009

MarkLogic, cq and Namespaces

If you import an XQuery library in cq and declare the namespace, cq gets fussy if you then try to declare your own functions. I know there are clear reasons for this, but here's what I do so I can use my own functions during testing.

xquery version "1.0-ml";

import module namespace search = ""
at "/MarkLogic/appservices/search/search.xqy";

declare namespace my="";

declare variable $options-title :=
<options xmlns="">
<transform-results apply="snippet">

declare function my:do-search()
search:search("food", $options-title, (), 25)


No comments: