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
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Tim CrewsSubject: Global variable not visible from included stylesheet
Author: Tim Crews
Date: 30 Jul 2007 11:58 PM
Originally Posted: 30 Jul 2007 11:54 PM
I am running an evaluation version of the Home edition of Stylus Studio.

I have an XSLT 2.0 stylesheet that includes several other stylesheets. The main stylesheet defines a variety of global variables, outside the context of any template.

I define a scenario that uses the Saxon 8.9.0.3 engine. (Independently of Stylus Studio, I have already successfully run this stylesheet using Saxon 8.9).

When I attempt to debug this collection of style sheets, the first time one of the included stylesheets references one of the global variables from the main stylesheet, an error message appears indicating that the global variable has not been declared.

Again, if I use the same version of the Saxon processor to run my stylesheet, but outside of Stylus Studio, the Saxon processor makes no such complaint.

Postnext
Ivan PedruzziSubject: Global variable not visible from included stylesheet
Author: Ivan Pedruzzi
Date: 31 Jul 2007 01:37 AM
Hi Tim,

This is a behaviour that shows only when running on Java 1.6.
The problem will be fixed in the next Stylus Studio update.
Could you please confirm that you are running JRE 1.6?

Thank you
Ivan Pedruzzi
Stylus Studio Team

Postnext
Tim CrewsSubject: Global variable not visible from included stylesheet
Author: Tim Crews
Date: 31 Jul 2007 01:51 AM
Yes, I'm on Java 1.6.

Is there a workaround for this?

Postnext
Ivan PedruzziSubject: Global variable not visible from included stylesheet
Author: Ivan Pedruzzi
Date: 31 Jul 2007 02:19 AM

The only workaround we can suggest is to install JRE 1.5.x (side by side with 1.6) and configure Stylus Studio to use it.


Ivan Pedruzzi
Stylus Studio Team

Postnext
Ivan PedruzziSubject: Global variable not visible from included stylesheet
Author: Ivan Pedruzzi
Date: 31 Jul 2007 10:51 AM

Hi Tim,

Actually there is better workaround, simply uncheck "Use Stylus Studio URI Resolver" in the scenario dialog.

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Posttop
Tim CrewsSubject: Global variable not visible from included stylesheet
Author: Tim Crews
Date: 31 Jul 2007 12:48 PM
This setting is disabled when using the Saxon 8.9.0.3 processor, which I have to use because my stylesheet is XSLT 2.0.

However, it appears that my problem had an entirely different cause. I thought (or assumed) that scenarios were attached to projects, as opposed to XSLT source files. When I created my scenarios, they were actually attached to one of the stylesheets that was included from the main stylesheet, when I should have attached the scenarios to the main stylesheet itself.

So, when I ran the scenario, only the included stylesheet was executed, and it was missing all of the declarations that would have come from the main stylesheet.

Once I defined and ran the scenario from the main stylesheet, I stopped getting the error messages about undefined variables.

Thank you for your assistance.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
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.