|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
**For advanced use only** Provides basic support for independent use of XPath. This interface is used in order that there may be loose coupling between the XPath package and the support services, such as the variable store, parser services, DOM implementation, etc. Most if all implementations of this should derive from XPathSupportDefault (hence, it should probably be an abstract class instead of an interface).
Field Summary | |
static short |
DATASOURCE
**For advanced use only** |
static short |
ERROR
**For advanced use only** |
static short |
WARNING
**For advanced use only** |
static short |
XMLPARSER
**For advanced use only** |
static short |
XPATHPARSER
**For advanced use only** |
static short |
XPATHPROCESSOR
**For advanced use only** |
static short |
XSLTPROCESSOR
**For advanced use only** |
Method Summary | |
void |
addExtensionNamespace(java.lang.String uri,
ExtensionFunctionHandler extNS)
**For advanced use only** Register an extension namespace handler. |
XLocator |
createXLocatorHandler()
**For advanced use only** getXLocatorHandler. |
void |
decrementContextNodePosition()
**Experimental** Decrement the current context node position. |
org.w3c.dom.NodeList |
getContextNodeList()
**For advanced use only** Get the current context node list. |
int |
getContextNodePosition()
**Experimental** Get the current position in the context node list. |
org.w3c.dom.Node |
getCurrentNode()
**For advanced use only** Get the current context node. |
org.w3c.dom.Element |
getElementByID(java.lang.String id,
org.w3c.dom.Document doc)
**For advanced use only** Get an element from an ID. |
org.xml.sax.ErrorHandler |
getErrorHandler()
**For advanced use only** Get the current error handler, if there is one. |
java.lang.String |
getLocalNameOfNode(org.w3c.dom.Node n)
**For advanced use only** Returns the local name of the given node. |
PrefixResolver |
getNamespaceContext()
**For advanced use only** Get the current namespace context for the xpath. |
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix,
org.w3c.dom.Element namespaceContext)
**For advanced use only** Given a namespace, get the corresponding prefix. |
java.lang.String |
getNamespaceOfNode(org.w3c.dom.Node n)
**For advanced use only** Returns the namespace of the given node. |
org.w3c.dom.Node |
getParentOfNode(org.w3c.dom.Node node)
**For advanced use only** This function has to be implemented, because the DOM WG decided that attributes don't have parents. |
boolean |
getProcessNamespaces()
Deprecated. |
boolean |
getThrowFoundIndex()
**For internal use only** ThrowFoundIndex tells if FoundIndex should be thrown if index is found. |
java.lang.String |
getUnparsedEntityURI(java.lang.String name,
org.w3c.dom.Document doc)
**For advanced use only** The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in the same document as the context node (see [3.3 Unparsed Entities]). |
java.net.URL |
getURLFromString(java.lang.String urlString,
java.lang.String base)
**For advanced use only** Take a user string and try and parse XML, and also return the url. |
void |
incrementContextNodePosition(org.w3c.dom.Node node)
**Experimental** Increment the current context node position. |
boolean |
isIgnorableWhitespace(org.w3c.dom.Text node)
Deprecated. |
org.w3c.dom.Document |
parseXML(java.net.URL url,
org.xml.sax.DocumentHandler docHandler,
org.w3c.dom.Document styleDoc)
Deprecated. |
void |
popContextNodeList()
**For internal use only** Pop the current context node list. |
void |
popContextNodePosition()
**Experimental** Pop the current context node position. |
void |
popXPathContext()
**Experimental** Pop the current XPathContext. |
boolean |
problem(short where,
short classification,
org.w3c.dom.Node styleNode,
org.w3c.dom.Node sourceNode,
java.lang.String msg,
int lineNo,
int charOffset)
**For advanced use only** Function that is called when a problem event occurs. |
void |
pushContextNodeList(org.w3c.dom.NodeList nl)
**For internal use only** Set the current context node list. |
void |
pushContextNodePosition()
**Experimental** Push the current context node position. |
void |
pushDummyXPathContext()
**Experimental** Push a dummy XPathContext so we can tell that the top-level xpath isn't in effect. |
void |
pushXPathContext(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node contextNode,
PrefixResolver namespaceContext)
**Experimental** Push the current XPath selection, needed for support of the last() function in depth-first execution. |
XObject |
reExecuteXPathContext(XPath path,
XPathSupport execContext,
org.w3c.dom.Node context)
**Experimental** Reexecute the last xpath context after the specified one. |
void |
setContextNodePosition(int newNodePos)
**Experimental** Set the current context node position. |
void |
setCurrentNode(org.w3c.dom.Node n)
**For internal use only** Set the current context node. |
void |
setNamespaceContext(PrefixResolver pr)
**For advanced use only** Get the current namespace context for the xpath. |
void |
setProcessNamespaces(boolean processNamespaces)
Deprecated. |
void |
setThrowFoundIndex(boolean b)
**For internal use only** ThrowFoundIndex tells if FoundIndex should be thrown if index is found. |
Methods inherited from interface org.apache.xalan.xpath.XPathEnvSupport |
associateXLocatorToNode,
elementAvailable,
extFunction,
findURIFromDoc,
functionAvailable,
getDOMFactory,
getNodeSetByKey,
getSourceDocsTable,
getVariable,
getXLocatorFromNode,
setDOMFactory,
shouldStripSourceNode |
Field Detail |
public static final short WARNING
public static final short ERROR
public static final short XMLPARSER
public static final short XSLTPROCESSOR
public static final short XPATHPARSER
public static final short XPATHPROCESSOR
public static final short DATASOURCE
Method Detail |
public org.w3c.dom.NodeList getContextNodeList()
public void pushContextNodeList(org.w3c.dom.NodeList nl)
A
- nodelist that represents the current context
list as defined by XPath.public void popContextNodeList()
public int getContextNodePosition()
public void incrementContextNodePosition(org.w3c.dom.Node node)
public void setContextNodePosition(int newNodePos)
public void decrementContextNodePosition()
public void pushContextNodePosition()
public void popContextNodePosition()
public org.w3c.dom.Node getCurrentNode()
public void setCurrentNode(org.w3c.dom.Node n)
n
- The current context node as defined by the XPath recommendation.public void pushXPathContext(XPath xpath, XPathSupport execContext, org.w3c.dom.Node contextNode, PrefixResolver namespaceContext)
public void popXPathContext()
public XObject reExecuteXPathContext(XPath path, XPathSupport execContext, org.w3c.dom.Node context) throws org.xml.sax.SAXException
public void pushDummyXPathContext()
public PrefixResolver getNamespaceContext()
public void setNamespaceContext(PrefixResolver pr)
pr
- An object that can resolve XPath prefixes to namespaces.public java.lang.String getNamespaceForPrefix(java.lang.String prefix, org.w3c.dom.Element namespaceContext)
prefix
- A namespace prefix that is valid in the namespaceContext.namespaceContext
- An element from which to evaluate the prefix resolution.public java.lang.String getNamespaceOfNode(org.w3c.dom.Node n)
n
- The node in question.public java.lang.String getLocalNameOfNode(org.w3c.dom.Node n)
n
- The node in question.public org.w3c.dom.Node getParentOfNode(org.w3c.dom.Node node)
n
- The node in question.public boolean isIgnorableWhitespace(org.w3c.dom.Text node)
public org.w3c.dom.Document parseXML(java.net.URL url, org.xml.sax.DocumentHandler docHandler, org.w3c.dom.Document styleDoc) throws org.xml.sax.SAXException
public java.net.URL getURLFromString(java.lang.String urlString, java.lang.String base) throws org.xml.sax.SAXException
public org.w3c.dom.Element getElementByID(java.lang.String id, org.w3c.dom.Document doc)
public java.lang.String getUnparsedEntityURI(java.lang.String name, org.w3c.dom.Document doc)
public void setProcessNamespaces(boolean processNamespaces)
public boolean getProcessNamespaces()
public void addExtensionNamespace(java.lang.String uri, ExtensionFunctionHandler extNS)
uri
- the URI for the extension.extNS
- the extension handler.public boolean getThrowFoundIndex()
public void setThrowFoundIndex(boolean b)
public org.xml.sax.ErrorHandler getErrorHandler()
public XLocator createXLocatorHandler()
public boolean problem(short where, short classification, org.w3c.dom.Node styleNode, org.w3c.dom.Node sourceNode, java.lang.String msg, int lineNo, int charOffset)
where
- Either and XMLPARSER, XSLPROCESSOR, or QUERYENGINE.classification
- Either ERROR or WARNING.styleNode
- The style tree node where the problem
occurred. May be null.sourceNode
- The source tree node where the problem
occurred. May be null.msg
- A string message explaining the problem.lineNo
- The line number where the problem occurred,
if it is known. May be zero.charOffset
- The character offset where the problem,
occurred if it is known. May be zero.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |