morten 01/11/12 11:46:47
Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
Log:
This fix should take care of a regression introduced by the code that was
added on the 29.10.2001 to take care of forward referenced variables.
This little patch ensures that variables that do not have any dependencies
are kept in order.
PR: bugzilla 4779
Obtained from: n/a
Submitted by: [EMAIL PROTECTED]
Reviewed by: [EMAIL PROTECTED]
Revision Changes Path
1.31 +4 -2
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Stylesheet.java
Index: Stylesheet.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Stylesheet.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- Stylesheet.java 2001/10/31 09:19:10 1.30
+++ Stylesheet.java 2001/11/12 19:46:47 1.31
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: Stylesheet.java,v 1.30 2001/10/31 09:19:10 morten Exp $
+ * @(#)$Id: Stylesheet.java,v 1.31 2001/11/12 19:46:47 morten Exp $
*
* The Apache Software License, Version 1.1
*
@@ -676,13 +676,15 @@
private Vector resolveReferences(Vector input) {
Vector result = new Vector();
+ int zeroDep = 0;
+
while (input.size() > 0) {
boolean changed = false;
for (int i = 0; i < input.size(); ) {
final VariableBase var = (VariableBase)input.elementAt(i);
final Vector dep = var.getDependencies();
if (dep == null) {
- result.insertElementAt(var, 0);
+ result.insertElementAt(var, zeroDep++);
input.remove(i);
changed = true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]