org.apache.xalan.templates
Class StylesheetRoot.ComposeState

java.lang.Object
  extended byorg.apache.xalan.templates.StylesheetRoot.ComposeState
Enclosing class:
StylesheetRoot

class StylesheetRoot.ComposeState
extends Object

Class to track state global state during the compose() operation.


Field Summary
private  ExpandedNameTable m_ent
           
(package private)  IntStack m_marks
           
private  int m_maxStackFrameSize
           
private  Vector m_variableNames
          A Vector of the current params and QNames within the current template.
 
Constructor Summary
(package private) StylesheetRoot.ComposeState()
           
 
Method Summary
(package private)  int addVariableName(QName qname)
          Add the name of a qualified name within the template.
(package private)  int getCurrentStackFrameSize()
          Get the current size of the stack frame.
(package private)  int getFrameSize()
           
(package private)  int getGlobalsSize()
           
 int getQNameID(QName qname)
          Given a qualified name, return an integer ID that can be quickly compared.
(package private)  Vector getVariableNames()
          Get the Vector of the current params and QNames to be collected within the current template.
(package private)  void popStackMark()
           
(package private)  void pushStackMark()
           
(package private)  void resetStackFrameSize()
           
(package private)  void setCurrentStackFrameSize(int sz)
          Set the current size of the stack frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_ent

private ExpandedNameTable m_ent

m_variableNames

private Vector m_variableNames
A Vector of the current params and QNames within the current template. Set by ElemTemplate and used by ProcessorVariable.


m_marks

IntStack m_marks

m_maxStackFrameSize

private int m_maxStackFrameSize
Constructor Detail

StylesheetRoot.ComposeState

StylesheetRoot.ComposeState()
Method Detail

getQNameID

public int getQNameID(QName qname)
Given a qualified name, return an integer ID that can be quickly compared.

Parameters:
qname - a qualified name object, must not be null.
Returns:
the expanded-name id of the qualified name.

addVariableName

int addVariableName(QName qname)
Add the name of a qualified name within the template. The position in the vector is its ID.

Parameters:
qname - A qualified name of a param or variable, should be non-null.
Returns:
the index where the variable was added.

resetStackFrameSize

void resetStackFrameSize()

getFrameSize

int getFrameSize()

getCurrentStackFrameSize

int getCurrentStackFrameSize()
Get the current size of the stack frame. Use this to record the position in a template element at startElement, so that it can be popped at endElement.


setCurrentStackFrameSize

void setCurrentStackFrameSize(int sz)
Set the current size of the stack frame.


getGlobalsSize

int getGlobalsSize()

pushStackMark

void pushStackMark()

popStackMark

void popStackMark()

getVariableNames

Vector getVariableNames()
Get the Vector of the current params and QNames to be collected within the current template.

Returns:
A reference to the vector of variable names. The reference returned is owned by this class, and so should not really be mutated, or stored anywhere.