Is there a way to pass a sequence rather than a node or atomic value as
an external variable to xdmp:eval()?

This works, returning '9' as output:

        define variable $sequence as xs:integer* { (9) }
        xdmp:eval(
           'define variable $seq as xs:integer* external
           $seq',
           (xs:QName("seq"), $sequence)
        )

but this produces an XDMP-ARG error

        define variable $sequence as xs:integer* { (9, 11) }
        xdmp:eval(
           'define variable $seq as xs:integer* external
           $seq',
           (xs:QName("seq"), $sequence)
        )

because the second argument to xdmp:eval is parsed as

  (xs:QName("seq"), 9, 11)

when $sequence is flattened.

Is the only option in a case like this to wrap my sequence of integers
in a constructed XML element and pass that as the external variable to
xdmp:eval(), or am I missing something obvious?

-- 
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: [EMAIL PROTECTED]   Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to