You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Henry Zongaro <zo...@ca.ibm.com> on 2005/05/09 15:52:47 UTC

Re: Some more questions about the xalan source

Hi, Daniel.

     I just realized that I composed but never sent this response to your 
question about variable "fix-up" in Xalan-J.

Daniel Migowski <Mi...@artis.uni-oldenburg.de> wrote on 2005-04-28 
09:39:09 AM:
> I have some more questions while trying to understand the source code.
> 
> In org.apache.xalan.xpath:
> Q1: What means "fixup variables"?

     Variables that are declared by a template are stored in a stack frame 
(org.apache.xpath.VariableStack) at run-time.  The fix-up process finds 
the integer index into the stack frame for each variable reference in an 
XPath expression.  When an expression is evaluated, the expression 
evaluation for a variable reference uses the index to look up the value in 
the stack frame, instead of looking up the value by name.

     I hope that helps.

Thanks,

Henry
------------------------------------------------------------------
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   T/L 969-6044;  Phone +1 905 413-6044
mailto:zongaro@ca.ibm.com



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


Re[2]: Some more questions about the xalan source

Posted by Daniel Migowski <Mi...@artis.uni-oldenburg.de>.
Hallo Henry,

HZ>      Variables that are declared by a template are stored in a stack frame
HZ> (org.apache.xpath.VariableStack) at run-time.  The fix-up process finds
HZ> the integer index into the stack frame for each variable reference in an
HZ> XPath expression.  When an expression is evaluated, the expression
HZ> evaluation for a variable reference uses the index to look up the value in
HZ> the stack frame, instead of looking up the value by name.

HZ>      I hope that helps.

Yes, thank you! The use indexes seems to be a very popular concept in the XalanJ world.

Greetings,
Daniel