|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.icl.saxon.Context
This class represents a context in which an expression is evaluated or a template is executed (as defined in the XSLT specification). It also provides a range of services to node handlers, for example access to the outputter and bindery, and the applyTemplates() function.
Field Summary | |
static int |
ALL_DEPENDENCIES
|
static int |
CONTEXT_DOCUMENT
|
static int |
CONTEXT_NODE
|
static int |
CONTROLLER
|
static int |
CURRENT_NODE
|
static int |
LAST
|
static int |
NO_DEPENDENCIES
|
static int |
POSITION
|
static int |
VARIABLES
|
static int |
XSLT_CONTEXT
|
Constructor Summary | |
Context()
The default constructor is not used within Saxon itself, but is available to applications (and is used in some samples). |
|
Context(Controller c)
Constructor should only be called by the Controller, which acts as a Context factory. |
Method Summary | |
Bindery |
getBindery()
Get the Bindery used by this Context |
org.w3c.dom.Node |
getContextNode()
Get the context node, provided it is a DOM Node |
NodeInfo |
getContextNodeInfo()
Get the context node |
int |
getContextPosition()
Get the context position (the position of the context node in the context node list) |
int |
getContextSize()
Get the context size (the position of the last item in the current node list). |
Controller |
getController()
Get the controller for this Context |
org.w3c.dom.Node |
getCurrentNode()
Get the current node,provided it is a DOM Node. |
NodeInfo |
getCurrentNodeInfo()
Get the current node. |
XSLTemplate |
getCurrentTemplate()
Get the current template. |
XPathException |
getException()
Get the saved exception value. |
java.util.Stack |
getGroupActivationStack()
Get the saxon:group activation stack |
int |
getLast()
Get the context size (the position of the last item in the current node list) |
int |
getLastPosition()
Get the last position, to be used only when the context object is being used as the last position finder |
Mode |
getMode()
Get the current mode (for use by the built-in handlers) |
Outputter |
getOutputter()
Get the current Outputter. |
org.w3c.dom.Document |
getOwnerDocument()
Get owner Document (enabling extension functions to create new Nodes) |
int |
getRememberedNumber(NodeInfo node)
Get the number of a node if it is the last remembered one. |
Value |
getReturnValue()
Get the return value from function |
StaticContext |
getStaticContext()
Get the static context. |
ParameterSet |
getTailRecursion()
Get tail recursion parameters |
boolean |
isAtLast()
Determine whether the context position is the same as the context size that is, whether position()=last() |
Context |
newContext()
Construct a new context as a copy of another |
void |
setContextNode(NodeInfo node)
Set the context node. |
void |
setController(Controller c)
Set the controller for this Context |
void |
setCurrentNode(NodeInfo node)
Set the current node. |
void |
setCurrentTemplate(XSLTemplate template)
Set the current template. |
void |
setException(XPathException err)
Set an exception value. |
void |
setLast(int last)
Set the context size; this also makes the Context object responisble for returning the last() position. |
void |
setLastPositionFinder(LastPositionFinder finder)
Set the LastPositionFinder, another object that will do the work of returning the last() position |
void |
setMode(Mode mode)
Set the mode (for use by the built-in handlers) |
void |
setPosition(int pos)
Set the context position |
void |
setRememberedNumber(NodeInfo node,
int number)
Set the last remembered node, for node numbering purposes |
void |
setReturnValue(Value value)
Set return value from function |
void |
setStaticContext(StaticContext sc)
Set the static context |
void |
setTailRecursion(ParameterSet p)
Set tail recursion parameters |
java.lang.String |
stringValue(org.w3c.dom.Node n)
Return the String value of a node |
java.lang.Object |
systemProperty(java.lang.String namespaceURI,
java.lang.String localName)
Get the value of a system property |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int VARIABLES
public static final int CURRENT_NODE
public static final int CONTEXT_NODE
public static final int POSITION
public static final int LAST
public static final int CONTROLLER
public static final int CONTEXT_DOCUMENT
public static final int NO_DEPENDENCIES
public static final int ALL_DEPENDENCIES
public static final int XSLT_CONTEXT
Constructor Detail |
public Context()
public Context(Controller c)
Method Detail |
public Context newContext()
public void setController(Controller c)
public Controller getController()
public Bindery getBindery()
public Outputter getOutputter()
public void setMode(Mode mode)
public Mode getMode()
public void setContextNode(NodeInfo node)
node
- the node that is to be the context node.public NodeInfo getContextNodeInfo()
public org.w3c.dom.Node getContextNode()
getContextNode
in interface XSLTContext
public void setPosition(int pos)
public int getContextPosition()
getContextPosition
in interface XSLTContext
public void setLast(int last)
public void setLastPositionFinder(LastPositionFinder finder)
public int getLast() throws XPathException
XPathException
public boolean isAtLast() throws XPathException
XPathException
public int getContextSize()
getContextSize
in interface XSLTContext
public int getLastPosition()
getLastPosition
in interface LastPositionFinder
public void setCurrentNode(NodeInfo node)
public NodeInfo getCurrentNodeInfo()
public org.w3c.dom.Node getCurrentNode()
getCurrentNode
in interface XSLTContext
public void setCurrentTemplate(XSLTemplate template)
public XSLTemplate getCurrentTemplate()
public org.w3c.dom.Document getOwnerDocument()
getOwnerDocument
in interface XSLTContext
public java.lang.Object systemProperty(java.lang.String namespaceURI, java.lang.String localName)
systemProperty
in interface XSLTContext
public java.lang.String stringValue(org.w3c.dom.Node n)
stringValue
in interface XSLTContext
java.lang.IllegalArgumentException
- if it is not a Saxon nodepublic void setStaticContext(StaticContext sc)
public StaticContext getStaticContext()
public void setException(XPathException err)
public XPathException getException()
public java.util.Stack getGroupActivationStack()
public void setRememberedNumber(NodeInfo node, int number)
public int getRememberedNumber(NodeInfo node)
public void setTailRecursion(ParameterSet p)
public ParameterSet getTailRecursion()
public void setReturnValue(Value value) throws TransformerException
TransformerException
public Value getReturnValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |