Hi everybody,

I need your help. When I go to //http://userpages.umbc.edu/~jpak3/ifsm651_lab/samples/java/QueryAPIExamples.java   and down load the source code, I have a question. If we need to get data from two .xml files, like get data from two table in RDBMS, how should we do?

The Key code is like fellows:


import net.sf.saxon.Configuration; 
....



final Configuration config = new Configuration();
final StaticQueryContext sqc = new StaticQueryContext(config);
final XQueryExpression exp = sqc.compileQuery("MyXquery"); 
final DynamicQueryContext dynamicContext = new DynamicQueryContext(config);
dynamicContext.setContextItem(sqc.buildDocument(new StreamSource("MyFirst.xml")));  // If I have a second file MySecond.xml, how should we do?

final Properties props = new Properties();
props.setProperty(OutputKeys.METHOD, "xml");

Simon Wang
Trane Asian Sourcing & Design Center  
Tel: 86-21-5359 9566 ext. 663
Fax: 86-21-6352 9006
E-mail: swang@trane.com