Thx! I think I am mixing command line jar vs java. Because it works from Java app fine...


From: Michael Kay <>
Sent: Wednesday, February 29, 2012 4:52 PM
Subject: Re: [saxon] XsltTransformer and parameters

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 will convert this to an XdmNode.

Michael Kay

Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
saxon-help mailing list archived at