org.apache.xalan.extensions

Class XSLProcessorContext

public class XSLProcessorContext extends Object

Provides transformer context to be passed to an extension element.

Author: Sanjiva Weerawarana (sanjiva@watson.ibm.com)

UNKNOWN: general

Constructor Summary
XSLProcessorContext(TransformerImpl transformer, Stylesheet stylesheetTree)
Create a processor context to be passed to an extension.
Method Summary
NodegetContextNode()
Get the current context node.
QNamegetMode()
Get the current mode being executed.
NodegetSourceTree()
Get the root of the source tree being executed.
StylesheetgetStylesheet()
Get the Stylesheet being executed.
TransformerImplgetTransformer()
Get the transformer.
voidoutputToResultTree(Stylesheet stylesheetTree, Object obj)
Output an object to the result tree by doing the right conversions.

Constructor Detail

XSLProcessorContext

public XSLProcessorContext(TransformerImpl transformer, Stylesheet stylesheetTree)
Create a processor context to be passed to an extension. (Notice it is a package-only constructor).

Parameters: transformer non-null transformer instance stylesheetTree The owning stylesheet

Method Detail

getContextNode

public Node getContextNode()
Get the current context node.

Returns: the current context node.

getMode

public QName getMode()
Get the current mode being executed.

Returns: the current mode being executed.

getSourceTree

public Node getSourceTree()
Get the root of the source tree being executed.

Returns: the root of the source tree being executed.

getStylesheet

public Stylesheet getStylesheet()
Get the Stylesheet being executed.

Returns: the Stylesheet being executed.

getTransformer

public TransformerImpl getTransformer()
Get the transformer.

Returns: the transformer instance for this context

outputToResultTree

public void outputToResultTree(Stylesheet stylesheetTree, Object obj)
Output an object to the result tree by doing the right conversions. This is public for access by extensions.

Parameters: stylesheetTree The owning stylesheet obj the Java object to output. If its of an X type then that conversion is done first and then sent out.

Throws: TransformerException java.io.FileNotFoundException java.io.IOException java.net.MalformedURLException

Copyright © 2005 Apache XML Project. All Rights Reserved.