Donate Share

Saxon XSLT and XQuery Processor

Tracker: Bugs

7 Overriding an imported variable - ID: 440384
Last Update: Settings changed ( mhkay )

When the stylesheet contains two definitions of the
same global variable with different import precedence
(that is, when a stylesheet module overrides a global
variable defined in a module that it imports), the
following error occurs:
java.lang.IllegalArgumentException: Can't define local
variable: stack is empty

Present since 6.4
Cleared in 6.4.3

Caused by incorrect coding (and testing!) of the
change introduced in 6.4 whereby global variables that
are overridden are no longer evaluated. The process()
method in XSLVariable.java should be changed to read:

public void process(Context context) throws
TransformerException
{
Bindery b = context.getBindery();
if (global) {
if (!redundant && !b.isEvaluated(this)) {
Value value = getSelectValue(context);
b.defineGlobalVariable(this, value);
}
} else {
Value value = getSelectValue(context);
b.defineLocalVariable(this, value);
}
}


Michael Kay ( mhkay ) - 2001-07-11 12:25

7

Closed

Fixed

Michael Kay

XSLT conformance

v6.4

Public


Comments

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
close_date 2001-07-24 11:36 2001-07-24 11:37 mhkay
status_id Open 2001-07-24 11:36 mhkay
resolution_id None 2001-07-24 11:36 mhkay
close_date - 2001-07-24 11:36 mhkay