Hi..!

Can some one tell me whats wrong with this Query

try
{
xdmp:document-load("/abc.xml")
}
catch  ($e)
{
<span>Problem loading </span>
}

When I run it in cq it works fine. When I create test_trycatch.xqy
file with the same
query and invoke it using xdmp: invoke I get the following error

[1.0] XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error,
unexpected Lbrace_, expecting $end

test_trycatch.xqy content
--------------------------------------------------------------------------------------------
xquery version "1.0";
declare namespace xdmp="http://marklogic.com/xdmp";;

try
{
xdmp:document-load("/abc.xml")
}
catch  ($e)
{
<span>Problem loading </span>
}
--------------------------------------------------------------------------------------------
Invoking from cq as follows

xquery version "1.0";
declare namespace xdmp="http://marklogic.com/xdmp";;
xdmp:invoke("test_trycatch.xqy")
--------------------------------------------------------------------------------------------

Thanks in advance

Pradeep Maddireddy
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to