|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.adaptx.xpath.XPathContext
org.exolab.adaptx.xslt.ProcessorState
public class ProcessorState
The current RuleProcessor environment.
Field Summary | |
---|---|
static java.lang.String |
ECMASCRIPT
|
static java.lang.String |
JPYTHON
|
Method Summary | |
---|---|
void |
associateNamespace(java.lang.String nsPrefix,
java.lang.String nsURI)
Associates a namespace with the given prefix, |
java.lang.String |
generateId(XPathNode node)
Creates a unique identifier for the given node |
AttributeValueTemplate |
getAttributeValueTemplate(java.lang.String avtString)
Returns the value of the given String as an AttributeValueTemplate |
XPathNode |
getCurrentNode()
Returns the "current" node The current node, is different than the context node, as the context node may change during the evaluation of an xpath expression, the current node does not. |
int[] |
getDocumentOrder(XPathNode node)
Returns the document order of the given node. |
java.lang.String |
getDocumentURI(XPathNode node)
Returns the document URI of the given XPathNode, or null if it's not found |
XPathNode |
getElementById(XPathNode root,
java.lang.String id)
Returns the element associated with the given identifier. |
ErrorObserver |
getErrorObserver()
Returns the ErrorObserver to report errors to |
XPathFunction |
getFunction(java.lang.String name)
Returns the XPathFunction with the given name and belonging to the given namespace. |
XPathFunction |
getFunction(java.lang.String namespace,
java.lang.String name)
Returns the XPathFunction with the given name and belonging to the given namespace. |
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Returns the namespace associated with the given prefix. |
XPathNode |
getNode()
Returns the context node of this XPathContext |
NodeSet |
getNodeSet()
Returns the current context node-set. |
java.lang.String |
getParameter(java.lang.String name)
Returns the parameter value associated with the given name. |
ScopedVariableSet |
getParameters()
|
int |
getPosition()
Returns the position of the context node. |
java.lang.String |
getProperty(java.lang.String name)
Returns the Property value associated with the given name. |
int |
getSize()
Returns the size of the context. |
URILocation |
getStylesheetLocation()
|
URIResolver |
getURIResolver()
Returns the URIResolver for resolving all URIs. |
XPathResult |
getVariable(java.lang.String name)
Returns the XPath result bound to the given variable name. |
QuickStack |
getXMLSpaceModes()
Returns the stack of XML space modes |
boolean |
isFunctionAvailable(java.lang.String name,
java.lang.String namespace)
Returns true if a function with the given name exists within the given namespace. |
boolean |
isXSLTNamespace(java.lang.String prefixOrURI)
Determines if the given prefix or URI maps to the XSLT namespace |
XPathNode |
popCurrentNode()
Removes the current node from the top of the stack The current node, is different than the context node, as the context node may change during the evaluation of an xpath expression, the current node does not. |
ResultHandler |
popHandler()
Removes and returns the ResultHandler from the top of the ResultHandler stack. |
NodeSet |
popNodeSet()
Removes and returns the current NodeSet from the context stack |
void |
pushCurrentNode(XPathNode node)
Adds the given node to the top of the "current" node Stack. |
void |
pushHandler(ResultHandler handler)
Pushes a new ResultHandler to the top of the ResultHandler stack. |
void |
pushNodeSet(NodeSet nodeSet)
Pushes the given nodeSet onto the context stack |
void |
setNodeSet(NodeSet nodeSet,
int position)
Sets the given node-set as the context node-set for this XPathContext |
void |
setPosition(int position)
Sets the position of the context node within the context node-set |
Methods inherited from class org.exolab.adaptx.xpath.XPathContext |
---|
addNamespaceBinding, newContext, newContext, newNodeSet, newNodeSet, newNodeSet |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ECMASCRIPT
public static final java.lang.String JPYTHON
Method Detail |
---|
public void associateNamespace(java.lang.String nsPrefix, java.lang.String nsURI)
nsPrefix
- the namespace prefixnsURI
- the namespace URI to associatepublic java.lang.String generateId(XPathNode node)
public XPathNode getCurrentNode()
popCurrentNode
,
pushCurrentNode
public ErrorObserver getErrorObserver()
public URILocation getStylesheetLocation()
public java.lang.String getParameter(java.lang.String name)
name
- the name of the parameter to retrieve the value of
public java.lang.String getProperty(java.lang.String name)
name
- the name of the property to get the value of
public QuickStack getXMLSpaceModes()
public java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI
in class XPathContext
prefix
- the prefix of the namespace to return
public URIResolver getURIResolver()
public boolean isFunctionAvailable(java.lang.String name, java.lang.String namespace)
public boolean isXSLTNamespace(java.lang.String prefixOrURI)
prefixOrURI
- the prefix or URI to compare with the
XSLT namespace
public ResultHandler popHandler()
public void pushHandler(ResultHandler handler)
handler
- the ResultHandler to push to the top of the stack.public XPathNode popCurrentNode()
pushCurrentNode
,
getCurrentNode
public void pushCurrentNode(XPathNode node)
node
- the new current nodepopCurrentNode
,
getCurrentNode
public void pushNodeSet(NodeSet nodeSet)
nodeSet
- the nodeSet ot push onto the stackpublic NodeSet popNodeSet()
public AttributeValueTemplate getAttributeValueTemplate(java.lang.String avtString) throws XPathException
InvalidExprException
- when the String argument is not a valid
AttrubueValueTemplate
XPathException
public XPathFunction getFunction(java.lang.String name)
namespace
- the namespace of the functionname
- the name of the function
public ScopedVariableSet getParameters()
public XPathNode getNode()
getNode
in class XPathContext
public int getPosition()
getPosition
in class XPathContext
getSize()
public int getSize()
getSize
in class XPathContext
public NodeSet getNodeSet()
getNodeSet
in class XPathContext
public void setNodeSet(NodeSet nodeSet, int position)
setNodeSet
in class XPathContext
nodeSet
- the node-set to use as the context node-set.position
- the position of the context nodepublic java.lang.String getDocumentURI(XPathNode node)
public int[] getDocumentOrder(XPathNode node)
getDocumentOrder
in class XPathContext
public XPathNode getElementById(XPathNode root, java.lang.String id)
getElementById
in class XPathContext
root
- The root nodeid
- The element's identifier
public XPathResult getVariable(java.lang.String name)
getVariable
in class XPathContext
name
- The variable name
public XPathFunction getFunction(java.lang.String namespace, java.lang.String name)
getFunction
in class XPathContext
namespace
- the namespace of the functionname
- the name of the function
public void setPosition(int position)
setPosition
in class XPathContext
the
- position of the context node within the
context node-set
java.lang.IndexOutOfBoundsException
- when the position
is not within the bounds of the context node-set.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |