[MarkLogic Dev General] Sequences in XCC
Ron Hitchens
ron.hitchens at marklogic.com
Fri Mar 23 08:55:47 PST 2007
I can guarantee you didn't have this working
a month ago. XCC does not support sending external
variables that are nodes or sequences (nor does XDBC).
We realize this would be a desirable feature
but there are some technical issues that most be
overcome to make it possible.
The XCC API anticipates this, but as you've
discovered it's not functional yet. We decided
to go that way because using the same types for
sending and receiving would be needed eventually
for an XQJ implementation and we wanted to be
consistent. And hiding the capability would be
a bigger hack than throwing an exception.
Setting nodes and sequences as external variables
is definitely on our list of improvements for
future releases. Unfortunately I can't make any
predictions or promises about which future release
they might be in.
For sending nodes, you can workaround it by
sending serialized XML as xs:string and then calling
xdmp:unquote on it to produce a node. Sequences are
a little tougher. If the values are all atomics,
as opposed to nodes, you could build a string with
the values separated by commas and then tokenize
the string on the server side. You could also build
a node with the values as child nodes of the root,
serialize that, send it across, xdmp:unquote it and
then extract the values with XPath.
On Mar 23, 2007, at 9:02 AM, Jacob Meushaw wrote:
> Hello all!
>
> I'm trying to use sequences with XCC but I'm getting a
> "com.marklogic.xcc.exceptions.UnimplementedFeatureException:
> Setting variables that are sequences is not supported". Is this
> true? Is there any way around it?
>
> The psuedocode for what I'm doing is:
>
> create array of XdmValue
> create XdmSequence using ValueFactory.newSequence
> Request.setNewVariable of type ValueType.SEQUENCE
>
> I could have sworn I had this working about a month ago. Is it
> possible that this is a side effect of upgrading the server from
> 3.1-4 to 3.1-5 and not updating our XCC libraries?
>
> Thanks,
> Jacob
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
---
Ron Hitchens {ron.hitchens at marklogic.com} 650-655-2351
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2435 bytes
Desc: not available
Url : http://xqzone.marklogic.com/pipermail/general/attachments/20070323/88db708d/smime.bin
More information about the General
mailing list