|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.utils.UnImplNode org.apache.xalan.templates.ElemTemplateElement org.apache.xalan.templates.ElemVariable
public class ElemVariable
Implement xsl:variable.
Field Summary | |
---|---|
(package private) int |
m_frameSize
The stack frame size for this variable if it is a global variable that declares an RTF, which is equal to the maximum number of variables that can be declared in the variable at one time. |
protected int |
m_index
This is the index into the stack frame. |
private boolean |
m_isTopLevel
Tells if this is a top-level variable or param, or not. |
protected QName |
m_qname
The value of the "name" attribute. |
private XPath |
m_selectPattern
The value of the "select" attribute. |
(package private) static long |
serialVersionUID
|
Fields inherited from class org.apache.xalan.templates.ElemTemplateElement |
---|
m_docOrderNumber, m_firstChild, m_hasVariableDecl, m_nextSibling, m_parentNode |
Fields inherited from class org.apache.xml.utils.UnImplNode |
---|
actualEncoding, fDocumentURI |
Fields inherited from interface org.w3c.dom.Node |
---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Fields inherited from interface org.w3c.dom.Node |
---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Fields inherited from interface org.w3c.dom.Node |
---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
---|---|
ElemVariable()
Constructor ElemVariable |
|
ElemVariable(ElemVariable param)
Copy constructor. |
Method Summary | |
---|---|
protected boolean |
accept(XSLTVisitor visitor)
Accept a visitor and call the appropriate method for this class. |
ElemTemplateElement |
appendChild(ElemTemplateElement elem)
Add a child to the child list. |
protected void |
callChildVisitors(XSLTVisitor visitor,
boolean callAttrs)
Call the children visitors. |
void |
compose(StylesheetRoot sroot)
This function is called after everything else has been recomposed, and allows the template to set remaining values that may be based on some other property that depends on recomposition. |
void |
endCompose(StylesheetRoot sroot)
This after the template's children have been composed. |
void |
execute(TransformerImpl transformer)
Execute a variable declaration and push it onto the variable stack. |
int |
getIndex()
If this element is not at the top-level, get the relative position of the variable into the stack frame. |
boolean |
getIsTopLevel()
Get if this is a top-level variable or param, or not. |
QName |
getName()
Get the "name" attribute. |
java.lang.String |
getNodeName()
Return the node name. |
XPath |
getSelect()
Get the "select" attribute. |
XObject |
getValue(TransformerImpl transformer,
int sourceNode)
Get the XObject representation of the variable. |
int |
getXSLToken()
Get an integer representation of the element type. |
boolean |
isPsuedoVar()
Tell if this is a psuedo variable reference, declared by Xalan instead of by the user. |
void |
recompose(StylesheetRoot root)
This function is called during recomposition to control how this element is composed. |
(package private) static XPath |
rewriteChildToExpression(ElemTemplateElement varElem)
If the children of a variable is a single xsl:value-of or text literal, it is cheaper to evaluate this as an expression, so try and adapt the child an an expression. |
void |
setIndex(int index)
Sets the relative position of this variable within the stack frame (if local) or the global area (if global). |
void |
setIsTopLevel(boolean v)
Set if this is a top-level variable or param, or not. |
void |
setName(QName v)
Set the "name" attribute. |
void |
setParentElem(ElemTemplateElement p)
Set the parent as an ElemTemplateElement. |
void |
setSelect(XPath v)
Set the "select" attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
protected int m_index
int m_frameSize
private XPath m_selectPattern
protected QName m_qname
private boolean m_isTopLevel
Constructor Detail |
---|
public ElemVariable()
public ElemVariable(ElemVariable param) throws javax.xml.transform.TransformerException
param
- An element created from an xsl:variable
javax.xml.transform.TransformerException
Method Detail |
---|
public void setIndex(int index)
public int getIndex()
public void setSelect(XPath v)
v
- Value to set for the "select" attribute.public XPath getSelect()
public void setName(QName v)
v
- Value to set for the "name" attribute.public QName getName()
public void setIsTopLevel(boolean v)
v
- Boolean indicating whether this is a top-level variable
or param, or not.public boolean getIsTopLevel()
public int getXSLToken()
getXSLToken
in class ElemTemplateElement
Constants
public java.lang.String getNodeName()
getNodeName
in interface org.w3c.dom.Node
getNodeName
in class ElemTemplateElement
public void execute(TransformerImpl transformer) throws javax.xml.transform.TransformerException
execute
in class ElemTemplateElement
transformer
- non-null reference to the the current transform-time state.
javax.xml.transform.TransformerException
public XObject getValue(TransformerImpl transformer, int sourceNode) throws javax.xml.transform.TransformerException
transformer
- non-null reference to the the current transform-time state.sourceNode
- non-null reference to the current source node.
javax.xml.transform.TransformerException
public void compose(StylesheetRoot sroot) throws javax.xml.transform.TransformerException
compose
in class ElemTemplateElement
javax.xml.transform.TransformerException
public void endCompose(StylesheetRoot sroot) throws javax.xml.transform.TransformerException
endCompose
in class ElemTemplateElement
javax.xml.transform.TransformerException
static XPath rewriteChildToExpression(ElemTemplateElement varElem) throws javax.xml.transform.TransformerException
varElem
- Should be a ElemParam, ElemVariable, or ElemWithParam.
javax.xml.transform.TransformerException
public void recompose(StylesheetRoot root)
recompose
in class ElemTemplateElement
root
- The root stylesheet for this transformation.public void setParentElem(ElemTemplateElement p)
setParentElem
in class ElemTemplateElement
p
- This node's parent as an ElemTemplateElementprotected boolean accept(XSLTVisitor visitor)
accept
in class ElemTemplateElement
visitor
- The visitor whose appropriate method will be called.
protected void callChildVisitors(XSLTVisitor visitor, boolean callAttrs)
callChildVisitors
in class ElemTemplateElement
visitor
- The visitor whose appropriate method will be called.public boolean isPsuedoVar()
public ElemTemplateElement appendChild(ElemTemplateElement elem)
appendChild
in class ElemTemplateElement
elem
- New element to append to this element's children list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |