Subject:Deploying an xquery file with more than one XML source document Author:Dominic Vieira Date:04 Jun 2007 11:59 AM
When generating XQuery file from Stylus Studio, Stylus Studio IDE allows the
xquery select/associate from/to multiple XML sources.
The problem is when the java code generated from xquery file, it only
selecting from the first xml file that the xquery file referenced. The
problem seen happening to both Saxon processor and DataDirect processor.
Subject:Deploying an xquery file with more than one XML source document Author:Minollo I. Date:04 Jun 2007 12:45 PM
What Stylus Studio version are you using? (Help > About) If it's not v2007 Release 2, I would suggest that you upgrade to it (www.stylusstudio.com/download), as code generation has been improved there, and the DataDirect XQuery version included in Release 2 also supports the default input context.
How does your XQuery reference multiple inputs? If it references them through the default input context and through doc() functions, then you'll see only one of them in the generated code, as only one is dynamically bound to the default input context. If you want to be able to control all the inputs through the Java code, you should change the inputs to be defined as external variables rather than using the doc() function directly (if you are using Mapper, just right click on a source, and select "Associate with... > Global variable").
If the problems persist, can you please attach the XQuery you are using? (or email it to stylus-field-report@progress.com)