You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2002/03/27 23:11:32 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/templates ElemApplyTemplates.java
sboag 02/03/27 14:11:32
Modified: java/src/org/apache/xalan/templates ElemApplyTemplates.java
Log:
Fix Frank Weiss bug, which has to do with the currentFrameBottom not being
restored properly when inside a with-param.
Fix Cristina bug where the traceEnd event was being passed the wrong template.
Fix problem with RTF pruning where push/popRTFContext wasn't being called
for xsl:apply-templates.
Revision Changes Path
1.22 +25 -2 xml-xalan/java/src/org/apache/xalan/templates/ElemApplyTemplates.java
Index: ElemApplyTemplates.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemApplyTemplates.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ElemApplyTemplates.java 24 Mar 2002 00:57:52 -0000 1.21
+++ ElemApplyTemplates.java 27 Mar 2002 22:11:32 -0000 1.22
@@ -370,8 +370,11 @@
transformer.pushPairCurrentMatched(template, child);
+ int currentFrameBottom; // See comment with unlink, below
if(template.m_frameSize > 0)
{
+ xctxt.pushRTFContext();
+ currentFrameBottom = vars.getStackFrame(); // See comment with unlink, below
vars.link(template.m_frameSize);
// You can't do the check for nParams here, otherwise the
// xsl:params might not be nulled.
@@ -406,6 +409,8 @@
}
}
+ else
+ currentFrameBottom = 0;
// if (check)
// guard.push(this, child);
@@ -426,10 +431,28 @@
}
if (TransformerImpl.S_DEBUG)
- transformer.getTraceManager().fireTraceEndEvent(this);
+ transformer.getTraceManager().fireTraceEndEvent(template);
if(template.m_frameSize > 0)
- vars.unlink();
+ {
+ // See Frank Weiss bug around 03/19/2002 (no Bugzilla report yet).
+ // While unlink will restore to the proper place, the real position
+ // may have been changed for xsl:with-param, so that variables
+ // can be accessed.
+ // of right now.
+ // More:
+ // When we entered this function, the current
+ // frame buffer (cfb) index in the variable stack may
+ // have been manually set. If we just call
+ // unlink(), however, it will restore the cfb to the
+ // previous link index from the link stack, rather than
+ // the manually set cfb. So,
+ // the only safe solution is to restore it back
+ // to the same position it was on entry, since we're
+ // really not working in a stack context here. (Bug4218)
+ vars.unlink(currentFrameBottom);
+ xctxt.popRTFContext();
+ }
transformer.popCurrentMatched();
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org