On 29/02/2012 21:39, Paul M wrote:

Class XsltTransformer
has this function

public void setParameter(QName name,
                         XdmValue value)

Is it possible to pass an element? I do not follow this if it is possible.
An XdmNode is a (subclass of) XdmValue, so this method will accept an XdmNode.

I see XdmValue : XdmValue(Iterable<XdmItem> items)

But I do not see how to go from XdmNode to be used in setParameter...

Any basic examples taking  say <a>a</a> and passing it as parameter...Link to example?
If you're starting with lexical XML contained in a string, first create a StreamSource by wrapping the string in a StringReader and the StringReader in a StreamSource. Then calling DocumentBuilder.build() will convert this to an XdmNode.

Michael Kay