net.sf.joost.instruction
Class AbstractInstruction

java.lang.Object
  extended bynet.sf.joost.instruction.AbstractInstruction
Direct Known Subclasses:
NodeBase, NodeBase.End

public abstract class AbstractInstruction
extends Object

Abstract base class for all nodes in an STX transformation sheet. Actually nodes will be represented similar to tags. For an element from the transformation sheet two objects (derived from AbstractInstruction) will be created: the first to be processed at the beginning of the element, the second to be processed at the end (see NodeBase).

Version:
$Revision: 2.2 $ $Date: 2004/01/21 11:22:14 $
Author:
Oliver Becker

Field Summary
 int colNo
          The column number of this instruction in the transformation sheet.
 int lineNo
          The line number of this instruction in the transformation sheet.
 AbstractInstruction next
          The next instruction in the chain.
 
Constructor Summary
AbstractInstruction()
           
 
Method Summary
abstract  NodeBase getNode()
           
abstract  short process(Context context)
          The method that does the actual processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

next

public AbstractInstruction next
The next instruction in the chain. The subtree of nodes in a template or procedure will be represented as a linked list.


lineNo

public int lineNo
The line number of this instruction in the transformation sheet. Normally this corresponds to the position of a start tag or an end tag resp.


colNo

public int colNo
The column number of this instruction in the transformation sheet. Normally this corresponds to the position of a start tag or an end tag resp.

Constructor Detail

AbstractInstruction

public AbstractInstruction()
Method Detail

getNode

public abstract NodeBase getNode()
Returns:
the node this instruction belongs to

process

public abstract short process(Context context)
                       throws SAXException
The method that does the actual processing. This method will be called while traversing the list of nodes.

Parameters:
context - the current context
Returns:
Constants.PR_CONTINUE, when the processing should continue with the next node; otherwise when the processing should be suspended due to an stx:process-xxx instruction. This in turn means that only the implementations for these stx:process-xxx instructions must return a value other than PR_CONTINUE. (Exception from the rule: non-recoverable errors)
Throws:
SAXException