Unfortunately the s9api interface provides no direct way to construct an XdmValue given a collection of XdmItem objects (for example, a collection of nodes). This makes it extremely difficult to pass a sequence of nodes as a a parameter to a stylesheet, except in the special case where the sequence of nodes is the result of evaluating an XPath expression.
A patch is being provided to remedy this. It introduces a new constructor as follows:
/** * Create an XdmValue as a sequence of XdmItem objects * @param items a sequence of XdmItem objects. Note that if this is supplied as a list or similar * collection, subsequent changes to the list/collection will have no effect on the XdmValue. * @since 126.96.36.199 */ public XdmValue(Iterable<XdmItem> items);
At the same time another omission will be recified: the XsltExecutable provides no "trapdoor" method to obtain access to the underlying Controller. The same patch adds a method getUnderlyingController().