Class DOM2DTMdefaultNamespaceDeclarationNode
java.lang.Object
org.htmlunit.xpath.xml.dtm.ref.dom2dtm.DOM2DTMdefaultNamespaceDeclarationNode
This is a kluge to let us shove a declaration for xml: into the DOM2DTM model. Basically, it
creates a proxy node in DOM space to carry the additional information. This is _NOT_ a full DOM
implementation, and shouldn't be one since it sits alongside the DOM rather than becoming part of
the DOM model.
(This used to be an internal class within DOM2DTM. Moved out because I need to perform an instanceof operation on it to support a temporary workaround in DTMManagerDefault.)
%REVIEW% What if the DOM2DTM was built around a DocumentFragment and there isn't a single root element? I think this fails that case...
%REVIEW% An alternative solution would be to create the node _only_ in DTM space, but given how DOM2DTM is currently written I think this is simplest.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final String
(package private) static final String
(package private) final String
(package private) final Element
(package private) final String
Fields inherited from interface org.w3c.dom.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, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Fields inherited from interface org.w3c.dom.TypeInfo
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION
-
Constructor Summary
ConstructorsConstructorDescriptionDOM2DTMdefaultNamespaceDeclarationNode
(Element pseudoparent, String prefix, String uri) -
Method Summary
Modifier and TypeMethodDescriptionappendChild
(Node a) cloneNode
(boolean deep) short
compareDocumentPosition
(Node other) getFeature
(String feature, String version) getName()
short
boolean
getUserData
(String key) getValue()
boolean
boolean
insertBefore
(Node a, Node b) boolean
isDefaultNamespace
(String namespaceURI) boolean
isDerivedFrom
(String ns, String localName, int derivationMethod) boolean
isEqualNode
(Node arg) boolean
isId()
boolean
isSameNode
(Node other) boolean
isSupported
(String feature, String version) lookupNamespaceURI
(String specifiedPrefix) lookupPrefix
(String namespaceURI) void
removeChild
(Node a) replaceChild
(Node a, Node b) void
setNodeValue
(String value) void
void
setTextContent
(String textContent) setUserData
(String key, Object data, UserDataHandler handler) void
-
Field Details
-
NOT_SUPPORTED_ERR
- See Also:
-
pseudoparent
-
prefix
-
uri
-
nodename
-
-
Constructor Details
-
DOM2DTMdefaultNamespaceDeclarationNode
-
-
Method Details
-
getNodeName
- Specified by:
getNodeName
in interfaceNode
-
getName
-
getNamespaceURI
- Specified by:
getNamespaceURI
in interfaceNode
-
getPrefix
-
getLocalName
- Specified by:
getLocalName
in interfaceNode
-
getNodeValue
- Specified by:
getNodeValue
in interfaceNode
-
getValue
-
getOwnerElement
- Specified by:
getOwnerElement
in interfaceAttr
-
isSupported
- Specified by:
isSupported
in interfaceNode
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodes
in interfaceNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributes
in interfaceNode
-
getParentNode
- Specified by:
getParentNode
in interfaceNode
-
getFirstChild
- Specified by:
getFirstChild
in interfaceNode
-
getLastChild
- Specified by:
getLastChild
in interfaceNode
-
getPreviousSibling
- Specified by:
getPreviousSibling
in interfaceNode
-
getNextSibling
- Specified by:
getNextSibling
in interfaceNode
-
getSpecified
public boolean getSpecified()- Specified by:
getSpecified
in interfaceAttr
-
normalize
public void normalize() -
getChildNodes
- Specified by:
getChildNodes
in interfaceNode
-
getAttributes
- Specified by:
getAttributes
in interfaceNode
-
getNodeType
public short getNodeType()- Specified by:
getNodeType
in interfaceNode
-
setNodeValue
- Specified by:
setNodeValue
in interfaceNode
-
setValue
-
setPrefix
-
insertBefore
- Specified by:
insertBefore
in interfaceNode
-
replaceChild
- Specified by:
replaceChild
in interfaceNode
-
appendChild
- Specified by:
appendChild
in interfaceNode
-
removeChild
- Specified by:
removeChild
in interfaceNode
-
getOwnerDocument
- Specified by:
getOwnerDocument
in interfaceNode
-
cloneNode
-
getTypeName
- Specified by:
getTypeName
in interfaceTypeInfo
-
getTypeNamespace
- Specified by:
getTypeNamespace
in interfaceTypeInfo
-
isDerivedFrom
- Specified by:
isDerivedFrom
in interfaceTypeInfo
-
getSchemaTypeInfo
- Specified by:
getSchemaTypeInfo
in interfaceAttr
-
isId
public boolean isId() -
setUserData
- Specified by:
setUserData
in interfaceNode
-
getUserData
- Specified by:
getUserData
in interfaceNode
-
getFeature
- Specified by:
getFeature
in interfaceNode
-
isEqualNode
- Specified by:
isEqualNode
in interfaceNode
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURI
in interfaceNode
-
isDefaultNamespace
- Specified by:
isDefaultNamespace
in interfaceNode
-
lookupPrefix
- Specified by:
lookupPrefix
in interfaceNode
-
isSameNode
- Specified by:
isSameNode
in interfaceNode
-
setTextContent
- Specified by:
setTextContent
in interfaceNode
- Throws:
DOMException
-
getTextContent
- Specified by:
getTextContent
in interfaceNode
- Throws:
DOMException
-
compareDocumentPosition
- Specified by:
compareDocumentPosition
in interfaceNode
- Throws:
DOMException
-
getBaseURI
- Specified by:
getBaseURI
in interfaceNode
-