I'm trying to create a SEQUENCE in XCC to pass to an ad-hoc xquery.

I want a sequence of xs:string 

 

I create a linked-list of XdmValue using this :

 

 

List<XdmValue> dirs = new LinkedList<XdmValue>();

...

 

XdmValue xdm = ValueFactory.newValue(ValueType.XS_STRING, uri);

dirs.add(xdm);

 

Then call this

 

request.setNewVariable("dirs", 

     ValueType.SEQUENCE, 

     ValueFactory.newSequence(dirs.toArray(new XdmValue[dirs.size()])));

 

I get this exception :

 

java.lang.IllegalArgumentException: Value must be array of XdmValue

 

 

Inspecting dirs I find each entry is of type XsStringImpl which is
implements XdmValue (indirectly)

So I dont see where my problem is ...

 

Any suggestions on making a sequence of strings to pass through XCC ?

 

 

 

----------------------------------------

David A. Lee

Senior Principal Software Engineer

Epocrates, Inc.

[email protected] <mailto:[email protected]> 

812-482-5224

 

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

Reply via email to