[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Import and variables

Subject: Import and variables
From: "Joeri Belis" <joeri.belis@xxxxxxxxxxxx>
Date: Wed, 8 Jan 2003 16:52:22 +0100
xsl import override
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.