Closed
Bug 92929
Opened 23 years ago
Closed 22 years ago
global variable cannot be used before it is declared
Categories
(Core :: XSLT, defect)
Core
XSLT
Tracking
()
VERIFIED
FIXED
mozilla1.2alpha
People
(Reporter: ost, Assigned: sicking)
References
Details
(Whiteboard: TX_BRIDGE_1_1_FIXED)
Attachments
(2 files)
Hi guys ! It's me again, excuse me, but I've found something wrong about global variables - they cannot be used before they are declared. Now I'll try to attach simple demo stylesheet.
Reporter | ||
Comment 1•23 years ago
|
||
Reporter | ||
Comment 2•23 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
yes, we are severly broken when it comes to global variables (and rather broken for other variables as well). We should probobly evaluate global variables lazily. That way we can also support import precedence correctly aswell. We also have to watch out for infinite recursions like: <xsl:variable name="var1" select="$var2 + 2"/> <xsl:variable name="var2" select="$var1 + 2"/> Nice testcases btw ;)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•23 years ago
|
||
This is import precedence, too. Adding a dependency. Not sure which direction, though ;-). I guess we should have a step evalutateGlobalVariables between processTopLevel and process. Axel
Assignee | ||
Comment 5•23 years ago
|
||
either that (there are a couple of other things we could do there too), or we evaluate global variables lazily. I.e. we don't do anything when finding a variable in processTopLevel other then add it in the appropriate importContainer. Then when we resolve a variable, after we've walked up the varaible-bindings stack, we look for a global variable, if one exists we set it's "evaluating" flag (to prevent infinite recursion) and then evaluate the variable.
Assignee | ||
Updated•23 years ago
|
Depends on: rewrite_variable
Assignee | ||
Comment 6•22 years ago
|
||
taking, this is fixed by my patch in bug 117658
Assignee: keith → sicking
Target Milestone: --- → mozilla1.1alpha
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Target Milestone: mozilla1.1beta → mozilla1.2alpha
Assignee | ||
Comment 8•22 years ago
|
||
fixed with the checkin from bug 117658
Whiteboard: TX_BRIDGE_1_1_FIXED
Assignee | ||
Comment 9•22 years ago
|
||
fixed with the branchlanding
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 10•22 years ago
|
||
we didn't verify for a long time. I really checked, so VERIFIED.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•