I don't use Oxygen very much, but it may be that it doesn't understand that two of xdmp:unquote's arguments are optional. Try supplying an empty sequence for the third argument, which is semantically equivalent:
xmp:unquote ($params, 'http://developer.envisn.com/xmlns/envisn/netvisn/p', ())/p:params... On Sep 14, 2012, at 2:08 PM, Gary Larsen wrote: > Thanks Ryan. That worked but now I’ve run into a function signature issue. > > In the xdmp:unquote() call below I get this syntax error in Oxygen’s debugger: > > > Cannot find a matching 2-argument function named > > {http://marklogic.com/xdmp}unquote() > > declare function console-data:param($name, $val) { > let $p := > xdmp:unquote($params,'http://developer.envisn.com/xmlns/envisn/netvisn/p')/p:params/*[local-name()=$name]/p:val > return > if(fn:count($p) gt 1 or $p ne '') then $p > else $val > }; > > > The query runs when the xquery version is “1.0.-ml” but the debugger requires > “1.0”. > > Is there a solution or alternative anyone can suggest? > > Thanks, > Gary > > From: [email protected] > [mailto:[email protected]] On Behalf Of Ryan Dew > Sent: Thursday, September 13, 2012 5:23 PM > To: MarkLogic Developer Discussion > Subject: Re: [MarkLogic Dev General] ctx and xdmp declaration > > declare namespace xdmp = "http://marklogic.com/xdmp"; > declare namespace cts = "http://marklogic.com/cts"; > > The namespaces could be found with running the following in QConsole: > > xquery version "1.0-ml"; > > fn:namespace-uri-from-QName(xs:QName('xdmp:test')), > fn:namespace-uri-from-QName(xs:QName('cts:test')) > > > -Ryan Dew > > On Thu, Sep 13, 2012 at 3:08 PM, Gary Larsen <[email protected]> wrote: > Hi, > > Trying to debug a query in Oxygen but have syntax errors: > > XQuery syntax error in #...ns/envisn/netvisn/p')/p:params#: Prefix xdmp > has not been declared > XQuery syntax error in #... cts:element-value-query#: Prefix cts has not > been declared > > What are the proper namespace declarations for these prefixes? > > Thanks, > Gary > > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general --- Ron Hitchens {mailto:[email protected]} Ronsoft Technologies +44 7879 358 212 (voice) http://www.ronsoft.com +1 707 924 3878 (fax) Bit Twiddling At Its Finest "No amount of belief establishes any fact." -Unknown _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
