org.apache.xalan.transformer
Class XalanTransformState

java.lang.Object
  extended by org.apache.xalan.transformer.XalanTransformState
All Implemented Interfaces:
TransformState, TransformStateSetter

public class XalanTransformState
extends java.lang.Object
implements TransformState

Before the serializer merge, the TransformState interface was implemented by ResultTreeHandler.


Field Summary
(package private)  DTMIterator m_contextNodeList
           
(package private)  ElemTemplateElement m_currentElement
           
(package private)  org.w3c.dom.Node m_currentNode
           
(package private)  int m_currentNodeHandle
           
(package private)  ElemTemplate m_currentTemplate
           
(package private)  boolean m_elemPending
           
(package private)  int m_matchedNode
           
(package private)  ElemTemplate m_matchedTemplate
           
(package private)  org.w3c.dom.Node m_node
           
(package private)  TransformerImpl m_transformer
           
 
Constructor Summary
XalanTransformState()
           
 
Method Summary
 org.w3c.dom.traversal.NodeIterator getContextNodeList()
          Get the current context node list.
 ElemTemplateElement getCurrentElement()
          Retrieves the stylesheet element that produced the SAX event.
 org.w3c.dom.Node getCurrentNode()
          This method retrieves the current context node in the source tree.
 ElemTemplate getCurrentTemplate()
          This method retrieves the xsl:template that is in effect, which may be a matched template or a named template.
 org.w3c.dom.Node getMatchedNode()
          Retrieves the node in the source tree that matched the template obtained via getMatchedTemplate().
 ElemTemplate getMatchedTemplate()
          This method retrieves the xsl:template that was matched.
 javax.xml.transform.Transformer getTransformer()
          Get the TrAX Transformer object in effect.
 void resetState(javax.xml.transform.Transformer transformer)
          Reset the state on the given transformer object.
 void setCurrentNode(org.w3c.dom.Node n)
          Set the current node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_node

org.w3c.dom.Node m_node

m_currentElement

ElemTemplateElement m_currentElement

m_currentTemplate

ElemTemplate m_currentTemplate

m_matchedTemplate

ElemTemplate m_matchedTemplate

m_currentNodeHandle

int m_currentNodeHandle

m_currentNode

org.w3c.dom.Node m_currentNode

m_matchedNode

int m_matchedNode

m_contextNodeList

DTMIterator m_contextNodeList

m_elemPending

boolean m_elemPending

m_transformer

TransformerImpl m_transformer
Constructor Detail

XalanTransformState

public XalanTransformState()
Method Detail

setCurrentNode

public void setCurrentNode(org.w3c.dom.Node n)
Description copied from interface: TransformStateSetter
Set the current node.

Specified by:
setCurrentNode in interface TransformStateSetter
Parameters:
n - The current node.
See Also:
TransformStateSetter.setCurrentNode(Node)

resetState

public void resetState(javax.xml.transform.Transformer transformer)
Description copied from interface: TransformStateSetter
Reset the state on the given transformer object.

Specified by:
resetState in interface TransformStateSetter
See Also:
TransformStateSetter.resetState(Transformer)

getCurrentElement

public ElemTemplateElement getCurrentElement()
Description copied from interface: TransformState
Retrieves the stylesheet element that produced the SAX event.

Please note that the ElemTemplateElement returned may be in a default template, and thus may not be defined in the stylesheet.

Specified by:
getCurrentElement in interface TransformState
Returns:
the stylesheet element that produced the SAX event.
See Also:
TransformState.getCurrentElement()

getCurrentNode

public org.w3c.dom.Node getCurrentNode()
Description copied from interface: TransformState
This method retrieves the current context node in the source tree.

Specified by:
getCurrentNode in interface TransformState
Returns:
the current context node in the source tree.
See Also:
TransformState.getCurrentNode()

getCurrentTemplate

public ElemTemplate getCurrentTemplate()
Description copied from interface: TransformState
This method retrieves the xsl:template that is in effect, which may be a matched template or a named template.

Please note that the ElemTemplate returned may be a default template, and thus may not have a template defined in the stylesheet.

Specified by:
getCurrentTemplate in interface TransformState
Returns:
the xsl:template that is in effect
See Also:
TransformState.getCurrentTemplate()

getMatchedTemplate

public ElemTemplate getMatchedTemplate()
Description copied from interface: TransformState
This method retrieves the xsl:template that was matched. Note that this may not be the same thing as the current template (which may be from getCurrentElement()), since a named template may be in effect.

Please note that the ElemTemplate returned may be a default template, and thus may not have a template defined in the stylesheet.

Specified by:
getMatchedTemplate in interface TransformState
Returns:
the xsl:template that was matched.
See Also:
TransformState.getMatchedTemplate()

getMatchedNode

public org.w3c.dom.Node getMatchedNode()
Description copied from interface: TransformState
Retrieves the node in the source tree that matched the template obtained via getMatchedTemplate().

Specified by:
getMatchedNode in interface TransformState
Returns:
the node in the source tree that matched the template obtained via getMatchedTemplate().
See Also:
TransformState.getMatchedNode()

getContextNodeList

public org.w3c.dom.traversal.NodeIterator getContextNodeList()
Description copied from interface: TransformState
Get the current context node list.

Specified by:
getContextNodeList in interface TransformState
Returns:
the current context node list.
See Also:
TransformState.getContextNodeList()

getTransformer

public javax.xml.transform.Transformer getTransformer()
Description copied from interface: TransformState
Get the TrAX Transformer object in effect.

Specified by:
getTransformer in interface TransformState
Returns:
the TrAX Transformer object in effect.
See Also:
TransformState.getTransformer()