XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
- XQuery Help and Discussion (2017)
-> + Issue with Processing Instruct... (2)
-> + problem converting json to XML... (2)
-> + Problem base64 decoding string... (3)
-> + Problems posting multipart for... (5)
-> + trouble with download of price... (2)
-> + Problem with http-post not bei... (3)
-> + path problem, xps_file:writeAl... (9)
-> + Xquery update support? (2)
-> + problem with Stylus studio try... (5)
-> + adding dtd reference to xml ou... (4)
-> + xquery escaping ambarsand when... (3)
-> + Whitespace problem when return... (5)
-> + Problem with namespace prefix ... (5)
-> - Sending via SFTP returns unexp... (1)
-> + Query and Sftp clent (4)
-> + xquery and try - catch (3)
-> + Query + ddtek:http-post optio... (5)
-> + Example files referenced in do... (3)
-> + Automatic Error Detection and ... (3)
-> + Working with result of ddtek:h... (2)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Dominic VieiraSubject: 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.

Following are some of the generated java code:


Configuration m_cfg;
StaticQueryContext m_sqc;
DynamicQueryContext m_dqc;

BasicResult m_transformResult;

. . . . .

m_sqc = new StaticQueryContext(m_cfg);
if (m_baseURI != null)
m_sqc.setBaseURI(m_baseURI);
m_dqc = new DynamicQueryContext(m_cfg);

parseParametersSaxon(m_cfg, m_paramNames, m_paramValues, m_baseURI, m_dqc);

m_queryReader = new InputStreamReader(m_scriptSource.getInputStream());

if (m_xmlSource!=null && m_xmlSource.getInputStream() != null)
m_dqc.setContextItem(m_sqc.buildDocument(m_xmlSource));


. . . . .

exp.run(m_dqc, m_transformResult, props);

Posttop
Minollo I.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)

Thanks.

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.