The easiest way is to define parameters ("external variables") to your query, for example
 
declare variable $doc1 as document-node() external;
declare variable $doc2 as document-node() external;
 
and you can then supply document nodes as the value of these parameters when invoking the transformation. The details of how to do this depend on which of the various APIs you are using. If you are using s9api, for example, you can construct the nodes using a DocumentBuilder and then supply them to the XQueryEvaluator using its setExternalVariable() method.
 

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay



From: sheetal_jain@hotmail.com [mailto:sheetal_jain@hotmail.com]
Sent: 16 July 2009 17:23
To: saxon-help@lists.sourceforge.net
Subject: [saxon] XQuery : Transforming multiple XMLs into one without usingfile system

Hi,
 
I wanted to transform multiple XML documents (objects) in an application to be transformed into one XML. How can I do this using SAXON without using the filesystem. Someone please provide example on how to pass these XMLs to SAXON and how Xquery map uses it.
 
Thanks in advance,
Sheetal