Class XPathNamespaceImpl
- All Implemented Interfaces:
EventTarget,ModelNode,Node,XPathNamespace
The core specification describes attributes of the Node interface that are different for different node node types but does not describe XPATH_NAMESPACE_NODE, so here is a description of those attributes for this node type. All attributes of Node not described in this section have a null or false value.
ownerDocument matches the ownerDocument of the ownerElement even if the element is later adopted.
prefix is the prefix of the namespace represented by the node.
nodeName is the same as prefix.
nodeType is equal to XPATH_NAMESPACE_NODE.
namespaceURI is the namespace URI of the namespace represented by the node.
adoptNode, cloneNode, and importNode fail on this node type by raising a DOMException with the code NOT_SUPPORTED_ERR.In future versions of the XPath specification, the definition of a namespace node may be changed incomatibly, in which case incompatible changes to field values may be required to implement versions beyond XPath 1.0.
See also the Document Object Model (DOM) Level 3 XPath Specification. This implementation wraps the DOM attribute node that contained the namespace declaration.
-
Field Summary
Fields inherited from interface org.loboevolution.html.node.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NONE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODEFields inherited from interface org.loboevolution.html.xpath.XPathNamespace
XPATH_NAMESPACE_NODE -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventListener(String type, Function listener) addEventListener.voidaddEventListener(String type, Function listener, boolean useCapture) addEventListener.appendChild(Node arg0) appendChild.voidappendChildrenToCollectionImpl(NodeFilter filter, Collection<Node> collection) cloneNode.cloneNode(boolean arg0) Returns a copy of node.shortcompareDocumentPosition(Node other) compareDocumentPosition.booleanReturns true if other is an inclusive descendant of node, and false otherwise.booleandispatchEvent(Event evt) dispatchEvent.booleandispatchEvent(Node element, Event evt) dispatchEvent.voidextractDescendentsArrayImpl(NodeFilter filter, List<Node> al, boolean nestIntoMatchingNodes) Extracts all descendents that match the filter, except those descendents of nodes that match the filter.Tries to get a UINode associated with the current node.voidgetAttributes.Returns node's node document's document base URL.Returns the children.getDocumentItem(String name) getDocumentItem.getFeature(String name, String version) Returns the first child.getFullURL(String spec) getFullURL.Returns the last child.getLocalName.getNamespaceURI.Returns the next sibling.Returns a string appropriate for the type of node.intReturns the type of node.getNodeValue.Returns the node document.The Element on which the namespace was in scope when it was requested.Returns the parent element.getParentModelNode.Returns the parent.Returns prefix.Returns the previous sibling.getPreviousTo(Node node) getRenderState.Returns node's root.getTextContent.getUserData(String key) getUserData.booleanReturns true if element has attributes, and false otherwise.booleanReturns whether node has children.insertBefore(Node arg0, Node arg1) insertBefore.booleanisDefaultNamespace(String namespaceURI) isDefaultNamespace.booleanisEqualNode(Node arg) Returns whether node and otherNode have the same properties.booleanisEqualOrDescendentOf(ModelNode otherNode) isEqualOrDescendentOf.booleanReturns true if node is connected and false otherwise.booleanisSameNode(Node other) isSameNode.booleanisSupported(String xml, String s) lookupNamespaceURI(String prefix) lookupNamespaceURI.lookupPrefix(String namespaceURI) lookupPrefix.voidRemoves empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.prepend.prependChild(Node newChild) prependChild.removeChild(Node arg0) removeChild.voidremoveEventListener(String type, Function listener) removeEventListener.voidremoveEventListener(String type, Function listener, boolean useCapture) removeEventListener.replaceChild(Node arg0, Node arg1) replaceChild.voidsetDocumentItem(String name, Object value) Sets a document item.voidsetNamespaceURI(String namespaceURI) voidsetNodeValue(String arg0) setNodeValue.voidsetOwnerDocument(Document document) setOwnerDocument.voidsetOwnerDocument(Document value, boolean deep) setOwnerDocument.voidsetParentImpl(Node parent) setParentImpl.voidsetPrefix.voidsetTextContent(String textContent) setTextContent.setUserData(String key, Object data, UserDataHandler handler) setUserData.voidvisit(NodeVisitor visitor) visit.voidwarn.
-
Method Details
-
getOwnerElement
The Element on which the namespace was in scope when it was requested. This does not change on a returned namespace node even if the document changes such that the namespace goes out of scope on that element and this node is no longer found there by XPath.- Specified by:
getOwnerElementin interfaceXPathNamespace- Returns:
- a
Nodeobject.
-
getNodeName
Returns a string appropriate for the type of node.- Specified by:
getNodeNamein interfaceNode- Returns:
- a
Stringobject.
-
getNodeValue
getNodeValue.
- Specified by:
getNodeValuein interfaceNode- Returns:
- a
Stringobject.
-
setNodeValue
setNodeValue.
- Specified by:
setNodeValuein interfaceNode- Parameters:
arg0- aStringobject.
-
getNodeType
public int getNodeType()Returns the type of node.- Specified by:
getNodeTypein interfaceNode- Returns:
- a
Integerobject.
-
getParentNode
Returns the parent.- Specified by:
getParentNodein interfaceNode- Returns:
- a
Nodeobject.
-
getChildNodes
Returns the children.- Specified by:
getChildNodesin interfaceNode- Returns:
- a
NodeListobject.
-
getFirstChild
Returns the first child.- Specified by:
getFirstChildin interfaceNode- Returns:
- a
Nodeobject.
-
getLastChild
Returns the last child.- Specified by:
getLastChildin interfaceNode- Returns:
- a
Nodeobject.
-
getPreviousSibling
Returns the previous sibling.- Specified by:
getPreviousSiblingin interfaceNode- Returns:
- a
Nodeobject.
-
getNextSibling
Returns the next sibling.- Specified by:
getNextSiblingin interfaceNode- Returns:
- a
Nodeobject.
-
getOwnerDocument
Returns the node document. Returns null for documents.- Specified by:
getOwnerDocumentin interfaceNode- Returns:
- a
Documentobject.
-
insertBefore
insertBefore.
- Specified by:
insertBeforein interfaceNode- Parameters:
arg0- aNodeobject.arg1- aNodeobject.- Returns:
- a
Nodeobject.
-
replaceChild
replaceChild.
- Specified by:
replaceChildin interfaceNode- Parameters:
arg0- aNodeobject.arg1- aNodeobject.- Returns:
- a
Nodeobject.
-
removeChild
removeChild.
- Specified by:
removeChildin interfaceNode- Parameters:
arg0- aNodeobject.- Returns:
- a
Nodeobject.
-
appendChild
appendChild.
- Specified by:
appendChildin interfaceNode- Parameters:
arg0- aNodeobject.- Returns:
- a
Nodeobject.
-
prependChild
prependChild.
- Specified by:
prependChildin interfaceNode- Parameters:
newChild- aNodeobject.- Returns:
- a
Nodeobject.
-
prepend
prepend.
-
hasChildNodes
public boolean hasChildNodes()Returns whether node has children.- Specified by:
hasChildNodesin interfaceNode- Returns:
- a boolean.
-
cloneNode
Returns a copy of node. If deep is true, the copy also includes the node's descendants. -
normalize
public void normalize()Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes. -
getNamespaceURI
getNamespaceURI.
- Specified by:
getNamespaceURIin interfaceNode- Returns:
- a
Stringobject.
-
getPrefix
Returns prefix. -
setPrefix
setPrefix.
-
getLocalName
getLocalName.
- Specified by:
getLocalNamein interfaceNode- Returns:
- a
Stringobject.
-
getBaseURI
Returns node's node document's document base URL.- Specified by:
getBaseURIin interfaceNode- Returns:
- a
Stringobject.
-
compareDocumentPosition
compareDocumentPosition.
- Specified by:
compareDocumentPositionin interfaceNode- Parameters:
other- aNodeobject.- Returns:
- a short.
-
isSupported
- Specified by:
isSupportedin interfaceNode
-
hasAttributes
public boolean hasAttributes()Description copied from interface:NodeReturns true if element has attributes, and false otherwise.- Specified by:
hasAttributesin interfaceNode- Returns:
- a boolean.
-
getFeature
- Specified by:
getFeaturein interfaceNode
-
getDocumentNode
- Specified by:
getDocumentNodein interfaceNode
-
getAttributes
Description copied from interface:NodegetAttributes.
- Specified by:
getAttributesin interfaceNode- Returns:
- a
NamedNodeMapobject.
-
getTextContent
getTextContent.
- Specified by:
getTextContentin interfaceNode- Returns:
- a
Stringobject.
-
setTextContent
setTextContent.
- Specified by:
setTextContentin interfaceNode- Parameters:
textContent- aStringobject.
-
isSameNode
isSameNode.
- Specified by:
isSameNodein interfaceNode- Parameters:
other- aNodeobject.- Returns:
- a boolean.
-
lookupPrefix
lookupPrefix.
- Specified by:
lookupPrefixin interfaceNode- Parameters:
namespaceURI- aStringobject.- Returns:
- a
Stringobject.
-
isDefaultNamespace
isDefaultNamespace.
- Specified by:
isDefaultNamespacein interfaceNode- Parameters:
namespaceURI- aStringobject.- Returns:
- a boolean.
-
lookupNamespaceURI
lookupNamespaceURI.
- Specified by:
lookupNamespaceURIin interfaceNode- Parameters:
prefix- aStringobject.- Returns:
- a
Stringobject.
-
isEqualNode
Returns whether node and otherNode have the same properties.- Specified by:
isEqualNodein interfaceNode- Parameters:
arg- aNodeobject.- Returns:
- a boolean.
-
setUserData
setUserData.
- Specified by:
setUserDatain interfaceNode- Parameters:
key- aStringobject.data- aObjectobject.handler- aUserDataHandlerobject.- Returns:
- a
Objectobject.
-
setParentImpl
Description copied from interface:NodesetParentImpl.
- Specified by:
setParentImplin interfaceNode- Parameters:
parent- aNodeobject.
-
setNamespaceURI
- Specified by:
setNamespaceURIin interfaceNode
-
getUserData
getUserData.
- Specified by:
getUserDatain interfaceNode- Parameters:
key- aStringobject.- Returns:
- a
Objectobject.
-
getPreviousTo
- Specified by:
getPreviousToin interfaceNode
-
getNextTo
-
forgetRenderState
public void forgetRenderState()- Specified by:
forgetRenderStatein interfaceNode
-
appendChildrenToCollectionImpl
- Specified by:
appendChildrenToCollectionImplin interfaceNode
-
extractDescendentsArrayImpl
public void extractDescendentsArrayImpl(NodeFilter filter, List<Node> al, boolean nestIntoMatchingNodes) Description copied from interface:NodeExtracts all descendents that match the filter, except those descendents of nodes that match the filter.- Specified by:
extractDescendentsArrayImplin interfaceNode- Parameters:
filter- aNodeFilterobject.al- aArrayListobject.
-
findUINode
Description copied from interface:NodeTries to get a UINode associated with the current node. Failing that, it tries ancestors recursively. This method will return the closest block-level renderer node, if any.- Specified by:
findUINodein interfaceNode- Returns:
- a
UINodeobject.
-
visit
Description copied from interface:Nodevisit.
- Specified by:
visitin interfaceNode- Parameters:
visitor- aNodeVisitorobject.
-
isIsConnected
public boolean isIsConnected()Returns true if node is connected and false otherwise.- Specified by:
isIsConnectedin interfaceNode- Returns:
- a boolean.
-
getParentElement
Returns the parent element.- Specified by:
getParentElementin interfaceNode- Returns:
- a
HTMLElementobject.
-
getRootNode
Returns node's root.- Specified by:
getRootNodein interfaceNode- Returns:
- a
Nodeobject.
-
cloneNode
cloneNode.
-
setOwnerDocument
Description copied from interface:NodesetOwnerDocument.
- Specified by:
setOwnerDocumentin interfaceNode- Parameters:
document- aDocumentobject.
-
setOwnerDocument
Description copied from interface:NodesetOwnerDocument.
- Specified by:
setOwnerDocumentin interfaceNode- Parameters:
value- aDocumentobject.deep- a boolean.
-
contains
Returns true if other is an inclusive descendant of node, and false otherwise. -
addEventListener
addEventListener.
- Specified by:
addEventListenerin interfaceEventTarget- Parameters:
type- aStringobject.listener- aFunctionobject.
-
addEventListener
addEventListener.
- Specified by:
addEventListenerin interfaceEventTarget- Parameters:
type- aStringobject.listener- aFunctionobject.useCapture- a boolean.
-
removeEventListener
removeEventListener.
- Specified by:
removeEventListenerin interfaceEventTarget- Parameters:
type- aStringobject.listener- aFunctionobject.
-
removeEventListener
removeEventListener.
- Specified by:
removeEventListenerin interfaceEventTarget- Parameters:
type- aStringobject.listener- aFunctionobject.useCapture- a boolean.
-
dispatchEvent
dispatchEvent.
- Specified by:
dispatchEventin interfaceEventTarget- Parameters:
element- aNodeobject.evt- aEventobject.- Returns:
- a boolean.
-
dispatchEvent
Description copied from interface:EventTargetdispatchEvent.
- Specified by:
dispatchEventin interfaceEventTarget- Parameters:
evt- aEventobject.- Returns:
- a boolean.
- Throws:
EventException- if any.
-
getDocumentItem
Description copied from interface:ModelNodegetDocumentItem.
- Specified by:
getDocumentItemin interfaceModelNode- Parameters:
name- aStringobject.- Returns:
- a
Objectobject.
-
getFullURL
Description copied from interface:ModelNodegetFullURL.
- Specified by:
getFullURLin interfaceModelNode- Parameters:
spec- aStringobject.- Returns:
- a
URLobject. - Throws:
Exception- if any.
-
getParentModelNode
Description copied from interface:ModelNodegetParentModelNode.
- Specified by:
getParentModelNodein interfaceModelNode- Returns:
- a
ModelNodeobject.
-
isEqualOrDescendentOf
Description copied from interface:ModelNodeisEqualOrDescendentOf.
- Specified by:
isEqualOrDescendentOfin interfaceModelNode- Parameters:
otherNode- aModelNodeobject.- Returns:
- a boolean.
-
getRenderState
Description copied from interface:ModelNodegetRenderState.
- Specified by:
getRenderStatein interfaceModelNode
-
setDocumentItem
Description copied from interface:ModelNodeSets a document item. A radio button, for example, can use this to set button group state.- Specified by:
setDocumentItemin interfaceModelNode- Parameters:
name- aStringobject.value- aObjectobject.
-
warn
Description copied from interface:ModelNodewarn.
-