net.sf.joost.stx
Class Context

java.lang.Object
  extended by net.sf.joost.stx.Context
All Implemented Interfaces:
Cloneable

public final class Context
extends Object
implements Cloneable

Instances of this class provide context information while processing an input document.

Version:
$Revision: 2.21 $ $Date: 2008/12/07 19:10:40 $
Author:
Oliver Becker

Field Summary
 Stack ancestorStack
          The current ancestor stack
 GroupBase currentGroup
          The group, the current template is a child of
 NodeBase currentInstruction
          The currently processed statement in the transformation sheet
 Processor currentProcessor
          The Processor object (needed by stx:process-buffer)
 TransformerHandlerResolverImpl defaultTransformerHandlerResolver
          The default TransformerHandlerResolver
 Emitter emitter
          The emitter object for the transformation
 ErrorHandlerImpl errorHandler
          An ErrorHandler for reporting errors and warnings
 Hashtable globalParameters
          External parameters passed to the transformation
 Hashtable groupVars
          Hashtable for Stacks of group variables (key=group instance, value=Stack of Hashtables).
 Hashtable localVars
          Local defined variables of a template.
 Locator locator
          The locator object for the input stream
 StxEmitter messageEmitter
          The message emitter for stx:message, either explicitely set by Processor.setMessageEmitter(net.sf.joost.emitter.StxEmitter) or automatically created in the first MessageFactory.Instance.process(net.sf.joost.stx.Context) invocation.
 OutputURIResolver outputUriResolver
          The OutputURIResolver for stx:result-document
 Hashtable passedParameters
          Parameters passed to the next template
 long position
          The position of the current node.
 PSiblingsFactory.Instance psiblings
          Encountered stx:process-siblings instruction
 GroupBase targetGroup
          The target group, set by stx:process-xxx instructions
 TransformerHandler targetHandler
          The target handler, set by stx:process-xxx instructions
 URIResolver uriResolver
          The URIResolver for stx:process-document
 
Constructor Summary
Context()
           
 
Method Summary
 StxEmitter popEmitter()
          Restore previous emitter after finishing a result event stream
 void pushEmitter(Emitter anEmitter)
          re-use a previous emitter for the event stream
 void pushEmitter(StxEmitter stxEmitter)
          Instantiate a new emitter object for a new result event stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locator

public Locator locator
The locator object for the input stream


emitter

public Emitter emitter
The emitter object for the transformation


ancestorStack

public Stack ancestorStack
The current ancestor stack


position

public long position
The position of the current node.


currentInstruction

public NodeBase currentInstruction
The currently processed statement in the transformation sheet


currentGroup

public GroupBase currentGroup
The group, the current template is a child of


currentProcessor

public Processor currentProcessor
The Processor object (needed by stx:process-buffer)


targetGroup

public GroupBase targetGroup
The target group, set by stx:process-xxx instructions


psiblings

public PSiblingsFactory.Instance psiblings
Encountered stx:process-siblings instruction


groupVars

public Hashtable groupVars
Hashtable for Stacks of group variables (key=group instance, value=Stack of Hashtables).


localVars

public Hashtable localVars
Local defined variables of a template.


globalParameters

public Hashtable globalParameters
External parameters passed to the transformation


passedParameters

public Hashtable passedParameters
Parameters passed to the next template


errorHandler

public ErrorHandlerImpl errorHandler
An ErrorHandler for reporting errors and warnings


defaultTransformerHandlerResolver

public TransformerHandlerResolverImpl defaultTransformerHandlerResolver
The default TransformerHandlerResolver


targetHandler

public TransformerHandler targetHandler
The target handler, set by stx:process-xxx instructions


uriResolver

public URIResolver uriResolver
The URIResolver for stx:process-document


outputUriResolver

public OutputURIResolver outputUriResolver
The OutputURIResolver for stx:result-document


messageEmitter

public StxEmitter messageEmitter
The message emitter for stx:message, either explicitely set by Processor.setMessageEmitter(net.sf.joost.emitter.StxEmitter) or automatically created in the first MessageFactory.Instance.process(net.sf.joost.stx.Context) invocation.

Constructor Detail

Context

public Context()
Method Detail

pushEmitter

public void pushEmitter(StxEmitter stxEmitter)
Instantiate a new emitter object for a new result event stream


pushEmitter

public void pushEmitter(Emitter anEmitter)
re-use a previous emitter for the event stream


popEmitter

public StxEmitter popEmitter()
Restore previous emitter after finishing a result event stream