Hi MarkLogic folks!

I'd like to pass an XML element as an external variable to my query using
MarkLogic XCC/J and have it be recognized as type element() when it arrives
in XQuery.

I set my-variable to "<foo/>" (or "<?xml version=\"1.0\"
encoding=\"UTF-8\"?><foo></foo>", no difference) using setNewVariable on
the Request, with "element()" for the ValueType. Then:

xquery version \"1.0-ml\";
> declare variable $my-variable as element() external;
> xdmp:type(xdmp:unquote($my-variable))


This returns "untypedAtomic". Is this expected behavior? I'd like to see it
come through typed as an element(). Is there a better way, either in XQuery
or in the Request, to set the type of an external variable?

Thanks in advance,
Dave Liepmann
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to