xsl-list
[Top] [All Lists]

RE: Import and variables

2003-01-08 11:50:30
This is bug 440384 [1], which was cleared in Saxon 6.4.3, released in
July 2001.

The current version is 6.5.2, please upgrade.

Saxon problem reports should be submitted to the saxon-help list at
saxon.sf.net.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 

[1]
http://sourceforge.net/tracker/index.php?func=detail&aid=440384&group_id
=29872&atid=397617

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Joeri Belis
Sent: 08 January 2003 15:52
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Import and variables


I have 2 xsl files.

<!-- testvar.xsl -->
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml" indent="no"/>
<xsl:strip-space elements="*"/>
<xsl:variable name="rowbreak" select="0"/>
<xsl:variable name="size_header" select="0"/>
<xsl:variable name="size_footer" select="0"/>
</xsl:stylesheet>

and

<!-- testvar.xsl -->
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<!-- ********************************************* --> 
<xsl:import href="testvar.xsl"/>
<!-- ********************************************* -->
<!-- These variables should override the ones in testvar.xsl 
<xsl:variable name="size_header" select="19"/> <xsl:variable 
name="size_footer" select="6"/> <xsl:variable name="rowbreak" 
select="32"/>
<!-- ********************************************* --> 
</xsl:stylesheet>

I define some variables in the imported xslt file that need 
to be changed by variables in my new main xslt This is 
offcourse a test. In my real program, testvar will test if 
size_header <> 0 and process accordingly. Sometimes 
testvar2.xsl will have these variables and other times not. 
But testvar.xsl does tests on them so they need to be there.

Running this gives an error in saxon
C:\temp\INSTAN~1>saxon phonelist.xml testvar2.xsl
java.lang.IllegalArgumentException: Can't define local 
variable: stack is empty
        at com/icl/saxon/Bindery.defineLocalVariable
        at com/icl/saxon/style/XSLVariable.process
        at com/icl/saxon/style/XSLStyleSheet.process
        at com/icl/saxon/Controller.transformDocument
        at com/icl/saxon/Controller.transform
        at com/icl/saxon/StyleSheet.processFile
        at com/icl/saxon/StyleSheet.doMain
        at com/icl/saxon/WinStyleSheet.main

How can i make import and override variables work?
Joeri



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>