The "1.0" version of the query doesn't run or the debugger is indicating an 
issue? If the query is not executing than it may be a bug in the version of ML 
you are using. In ML version 5.0-3.3 I'm able to run the following in qconsole 
just fine:

xquery version "1.0";

declare namespace xdmp = "http://marklogic.com/xdmp";;
declare namespace cts = "http://marklogic.com/cts";;

xdmp:unquote('<test/>','http://developer.envisn.com/xmlns/envisn/netvisn/p')

If the issue you are having is with the debugger, I don't know how to help you 
there, unfortunately.

-Ryan Dew


On Sep 14, 2012, at 7:08 AM, "Gary Larsen" <[email protected]> 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

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to