Package org.apache.xalan.transformer
Class XalanTransformState
java.lang.Object
org.apache.xalan.transformer.XalanTransformState
- All Implemented Interfaces:
TransformState,TransformStateSetter
public class XalanTransformState extends Object implements TransformState
Before the serializer merge, the TransformState interface was
implemented by ResultTreeHandler.
-
Constructor Summary
Constructors Constructor Description XalanTransformState() -
Method Summary
Modifier and Type Method Description NodeIteratorgetContextNodeList()Get the current context node list.ElemTemplateElementgetCurrentElement()Retrieves the stylesheet element that produced the SAX event.NodegetCurrentNode()This method retrieves the current context node in the source tree.ElemTemplategetCurrentTemplate()This method retrieves the xsl:template that is in effect, which may be a matched template or a named template.NodegetMatchedNode()Retrieves the node in the source tree that matched the template obtained via getMatchedTemplate().ElemTemplategetMatchedTemplate()This method retrieves the xsl:template that was matched.TransformergetTransformer()Get the TrAX Transformer object in effect.voidresetState(Transformer transformer)Reset the state on the given transformer object.voidsetCurrentNode(Node n)Set the current node.
-
Constructor Details
-
XalanTransformState
public XalanTransformState()
-
-
Method Details
-
setCurrentNode
Description copied from interface:TransformStateSetterSet the current node.- Specified by:
setCurrentNodein interfaceTransformStateSetter- Parameters:
n- The current node.- See Also:
TransformStateSetter.setCurrentNode(Node)
-
resetState
Description copied from interface:TransformStateSetterReset the state on the given transformer object.- Specified by:
resetStatein interfaceTransformStateSetter- See Also:
TransformStateSetter.resetState(Transformer)
-
getCurrentElement
Description copied from interface:TransformStateRetrieves 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:
getCurrentElementin interfaceTransformState- Returns:
- the stylesheet element that produced the SAX event.
- See Also:
TransformState.getCurrentElement()
-
getCurrentNode
Description copied from interface:TransformStateThis method retrieves the current context node in the source tree.- Specified by:
getCurrentNodein interfaceTransformState- Returns:
- the current context node in the source tree.
- See Also:
TransformState.getCurrentNode()
-
getCurrentTemplate
Description copied from interface:TransformStateThis 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:
getCurrentTemplatein interfaceTransformState- Returns:
- the xsl:template that is in effect
- See Also:
TransformState.getCurrentTemplate()
-
getMatchedTemplate
Description copied from interface:TransformStateThis 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:
getMatchedTemplatein interfaceTransformState- Returns:
- the xsl:template that was matched.
- See Also:
TransformState.getMatchedTemplate()
-
getMatchedNode
Description copied from interface:TransformStateRetrieves the node in the source tree that matched the template obtained via getMatchedTemplate().- Specified by:
getMatchedNodein interfaceTransformState- Returns:
- the node in the source tree that matched the template obtained via getMatchedTemplate().
- See Also:
TransformState.getMatchedNode()
-
getContextNodeList
Description copied from interface:TransformStateGet the current context node list.- Specified by:
getContextNodeListin interfaceTransformState- Returns:
- the current context node list.
- See Also:
TransformState.getContextNodeList()
-
getTransformer
Description copied from interface:TransformStateGet the TrAX Transformer object in effect.- Specified by:
getTransformerin interfaceTransformState- Returns:
- the TrAX Transformer object in effect.
- See Also:
TransformState.getTransformer()
-