|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xalan.xpath.XPathSupportDefault
Default class for execution context when XPath is used by itself. Many of the functions in this class need to be overridden in order to perform correct execution of the XPath (for instance, variable execution). This class will likely eventually replace XMLParserLiaisons.
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
Constructor Summary | |
XPathSupportDefault()
|
Method Summary | |
void |
addExtensionNamespace(java.lang.String uri,
ExtensionFunctionHandler extNS)
Register an extension namespace handler. |
void |
associateXLocatorToNode(org.w3c.dom.Node node,
XLocator xlocator)
Associate an XLocator provider to a node. |
void |
beginConstruction(KeyDeclaration kd)
|
XLocator |
createXLocatorHandler()
getXLocatorHandler. |
void |
deassociateXLocatorToNode(org.w3c.dom.Node node)
Deassociate an XLocator provider to a node based on the root of the tree that the node is parented by. |
void |
decrementContextNodePosition()
Decrement the current context node position. |
boolean |
elementAvailable(java.lang.String namespace,
java.lang.String extensionName)
Execute the element-available() function. |
void |
endConstruction(KeyDeclaration kd)
|
java.lang.Object |
extFunction(java.lang.String namespace,
java.lang.String extensionName,
java.util.Vector argVec,
java.lang.Object methodKey)
Handle an extension function. |
java.lang.String |
findURIFromDoc(org.w3c.dom.Document owner)
Given a DOM Document, tell what URI was used to parse it. |
boolean |
functionAvailable(java.lang.String namespace,
java.lang.String extensionName)
Execute the function-available() function. |
NodeCallback |
getCallback()
Get the callback that may be called by XPath as nodes are located. |
java.lang.Object |
getCallbackInfo()
Get the object that will be passed to the processLocatedNode method. |
org.w3c.dom.NodeList |
getContextNodeList()
Get the current context node list. |
int |
getContextNodePosition()
Get the current position in the context node list. |
org.w3c.dom.Node |
getCurrentNode()
Get the current context node. |
org.w3c.dom.Document |
getDOMFactory()
Get a DOM document, primarily for creating result tree fragments. |
org.w3c.dom.Element |
getElementByID(java.lang.String id,
org.w3c.dom.Document doc)
Get an element from an ID. |
org.xml.sax.ErrorHandler |
getErrorHandler()
Get the current error handler, if there is one. |
boolean |
getInConstruction(KeyDeclaration kd)
|
java.lang.String |
getLocalNameOfNode(org.w3c.dom.Node n)
Returns the local name of the given node. |
PrefixResolver |
getNamespaceContext()
Get the current namespace context for the xpath. |
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix,
org.w3c.dom.Element namespaceContext)
Given a namespace, get the corresponding prefix. |
java.lang.String |
getNamespaceOfNode(org.w3c.dom.Node n)
Returns the namespace of the given node. |
int |
getNodeNumber(org.w3c.dom.Node n)
|
org.w3c.dom.NodeList |
getNodeSetByKey(org.w3c.dom.Node doc,
java.lang.String name,
java.lang.String ref,
PrefixResolver nscontext)
Given a valid element key, return the corresponding node list. |
org.w3c.dom.Node |
getParentOfNode(org.w3c.dom.Node node)
This function has to be implemented, because the DOM WG decided that attributes don't have parents. |
boolean |
getProcessNamespaces()
Tells if namespaces should be supported. |
org.w3c.dom.Node |
getRoot(org.w3c.dom.Node node)
Get the first unparented node in the ancestor chain. |
java.util.Hashtable |
getSourceDocsTable()
Get table of source tree documents. |
boolean |
getThrowFoundIndex()
ThrowFoundIndex tells if FoundIndex should be thrown if index is found. |
java.lang.String |
getUnparsedEntityURI(java.lang.String name,
org.w3c.dom.Document doc)
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)
Take a user string and try and parse XML, and also return the url. |
XObject |
getVariable(QName name)
Variables don't work when executing an XPath by itself. |
XLocator |
getXLocatorFromNode(org.w3c.dom.Node node)
Get an XLocator provider keyed by node. |
void |
incrementContextNodePosition(org.w3c.dom.Node node)
Increment the current context node position. |
boolean |
isIgnorableWhitespace(org.w3c.dom.Text node)
Deprecated. |
org.w3c.dom.Document |
parseXML(java.lang.String urlString,
java.lang.String base)
Deprecated. |
org.w3c.dom.Document |
parseXML(java.net.URL url,
org.xml.sax.DocumentHandler docHandler,
org.w3c.dom.Document styleDoc)
Take a user string and try and parse XML, and also return the url. |
void |
popContextNodeList()
Pop the current context node list. |
void |
popContextNodePosition()
Pop the current context node position. |
void |
popXPathContext()
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)
Function that is called when a problem event occurs. |
void |
pushContextNodeList(org.w3c.dom.NodeList nl)
Set the current context node list. |
void |
pushContextNodePosition()
Push the current context node position. |
void |
pushDummyXPathContext()
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)
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)
Reexecute the last xpath context after the specified one. |
void |
setCallback(NodeCallback callback,
java.lang.Object callbackInfo)
Set a callback that may be called by XPath as nodes are located. |
void |
setContextNodePosition(int newNodePos)
Set the current context node position. |
void |
setCurrentNode(org.w3c.dom.Node n)
Set the current context node. |
void |
setDOMFactory(org.w3c.dom.Document domFactory)
Get the factory object required to create DOM nodes in the result tree. |
void |
setNamespaceContext(PrefixResolver pr)
Get the current namespace context for the xpath. |
void |
setProcessNamespaces(boolean processNamespaces)
Set whether or not the liaison attempts to expand namespaces. |
void |
setThrowFoundIndex(boolean b)
ThrowFoundIndex tells if FoundIndex should be thrown if index is found. |
boolean |
shouldStripSourceNode(org.w3c.dom.Node textNode)
Tells, through the combination of the default-space attribute on xsl:stylesheet, xsl:strip-space, xsl:preserve-space, and the xml:space attribute, whether or not extra whitespace should be stripped from the node. |
boolean |
supportsNodeNumber(org.w3c.dom.Node n)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public XPathSupportDefault()
Method Detail |
public void pushXPathContext(XPath xpath, XPathSupport execContext, org.w3c.dom.Node contextNode, PrefixResolver namespaceContext)
public void popXPathContext()
public void pushDummyXPathContext()
public XObject reExecuteXPathContext(XPath path, XPathSupport execContext, org.w3c.dom.Node context) throws org.xml.sax.SAXException
public int getContextNodePosition()
public void setContextNodePosition(int newNodePos)
public void incrementContextNodePosition(org.w3c.dom.Node node)
public void decrementContextNodePosition()
public void pushContextNodePosition()
public void popContextNodePosition()
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 boolean getThrowFoundIndex()
public void setThrowFoundIndex(boolean b)
public org.w3c.dom.Node getCurrentNode()
public void setCurrentNode(org.w3c.dom.Node n)
public PrefixResolver getNamespaceContext()
public void setNamespaceContext(PrefixResolver pr)
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 XObject getVariable(QName name) throws org.xml.sax.SAXException
public boolean isIgnorableWhitespace(org.w3c.dom.Text node)
public org.w3c.dom.NodeList getNodeSetByKey(org.w3c.dom.Node doc, java.lang.String name, java.lang.String ref, PrefixResolver nscontext) throws org.xml.sax.SAXException
public java.util.Hashtable getSourceDocsTable()
public java.lang.String findURIFromDoc(org.w3c.dom.Document owner)
public org.w3c.dom.Document parseXML(java.lang.String urlString, java.lang.String base)
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 setDOMFactory(org.w3c.dom.Document domFactory)
public org.w3c.dom.Document getDOMFactory()
public boolean getInConstruction(KeyDeclaration kd)
public void beginConstruction(KeyDeclaration kd)
public void endConstruction(KeyDeclaration kd)
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.public boolean functionAvailable(java.lang.String namespace, java.lang.String extensionName)
public boolean elementAvailable(java.lang.String namespace, java.lang.String extensionName)
public java.lang.Object extFunction(java.lang.String namespace, java.lang.String extensionName, java.util.Vector argVec, java.lang.Object methodKey) throws org.xml.sax.SAXException
public org.w3c.dom.Node getRoot(org.w3c.dom.Node node)
public void associateXLocatorToNode(org.w3c.dom.Node node, XLocator xlocator)
public void deassociateXLocatorToNode(org.w3c.dom.Node node)
public XLocator getXLocatorFromNode(org.w3c.dom.Node node)
public void setProcessNamespaces(boolean processNamespaces)
public boolean getProcessNamespaces()
public boolean shouldStripSourceNode(org.w3c.dom.Node textNode) throws org.xml.sax.SAXException
textNode
- A text node from the source tree.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 void addExtensionNamespace(java.lang.String uri, ExtensionFunctionHandler extNS)
uri
- the URI for the extension.extNS
- the extension handler.public void setCallback(NodeCallback callback, java.lang.Object callbackInfo)
callback
- Interface that implements the processLocatedNode method.callbackInfo
- Object that will be passed to the processLocatedNode method.public NodeCallback getCallback()
public java.lang.Object getCallbackInfo()
public org.xml.sax.ErrorHandler getErrorHandler()
public XLocator createXLocatorHandler()
public boolean supportsNodeNumber(org.w3c.dom.Node n)
public int getNodeNumber(org.w3c.dom.Node n)
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs60 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |