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 StringFields 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_NODEFields 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) shortcompareDocumentPosition(Node other) getFeature(String feature, String version) getName()shortbooleangetUserData(String key) getValue()booleanbooleaninsertBefore(Node a, Node b) booleanisDefaultNamespace(String namespaceURI) booleanisDerivedFrom(String ns, String localName, int derivationMethod) booleanisEqualNode(Node arg) booleanisId()booleanisSameNode(Node other) booleanisSupported(String feature, String version) lookupNamespaceURI(String specifiedPrefix) lookupPrefix(String namespaceURI) voidremoveChild(Node a) replaceChild(Node a, Node b) voidsetNodeValue(String value) voidvoidsetTextContent(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:
getNodeNamein interfaceNode
-
getName
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceNode
-
getPrefix
-
getLocalName
- Specified by:
getLocalNamein interfaceNode
-
getNodeValue
- Specified by:
getNodeValuein interfaceNode
-
getValue
-
getOwnerElement
- Specified by:
getOwnerElementin interfaceAttr
-
isSupported
- Specified by:
isSupportedin interfaceNode
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodesin interfaceNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributesin interfaceNode
-
getParentNode
- Specified by:
getParentNodein interfaceNode
-
getFirstChild
- Specified by:
getFirstChildin interfaceNode
-
getLastChild
- Specified by:
getLastChildin interfaceNode
-
getPreviousSibling
- Specified by:
getPreviousSiblingin interfaceNode
-
getNextSibling
- Specified by:
getNextSiblingin interfaceNode
-
getSpecified
public boolean getSpecified()- Specified by:
getSpecifiedin interfaceAttr
-
normalize
public void normalize() -
getChildNodes
- Specified by:
getChildNodesin interfaceNode
-
getAttributes
- Specified by:
getAttributesin interfaceNode
-
getNodeType
public short getNodeType()- Specified by:
getNodeTypein interfaceNode
-
setNodeValue
- Specified by:
setNodeValuein interfaceNode
-
setValue
-
setPrefix
-
insertBefore
- Specified by:
insertBeforein interfaceNode
-
replaceChild
- Specified by:
replaceChildin interfaceNode
-
appendChild
- Specified by:
appendChildin interfaceNode
-
removeChild
- Specified by:
removeChildin interfaceNode
-
getOwnerDocument
- Specified by:
getOwnerDocumentin interfaceNode
-
cloneNode
-
getTypeName
- Specified by:
getTypeNamein interfaceTypeInfo
-
getTypeNamespace
- Specified by:
getTypeNamespacein interfaceTypeInfo
-
isDerivedFrom
- Specified by:
isDerivedFromin interfaceTypeInfo
-
getSchemaTypeInfo
- Specified by:
getSchemaTypeInfoin interfaceAttr
-
isId
public boolean isId() -
setUserData
- Specified by:
setUserDatain interfaceNode
-
getUserData
- Specified by:
getUserDatain interfaceNode
-
getFeature
- Specified by:
getFeaturein interfaceNode
-
isEqualNode
- Specified by:
isEqualNodein interfaceNode
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURIin interfaceNode
-
isDefaultNamespace
- Specified by:
isDefaultNamespacein interfaceNode
-
lookupPrefix
- Specified by:
lookupPrefixin interfaceNode
-
isSameNode
- Specified by:
isSameNodein interfaceNode
-
setTextContent
- Specified by:
setTextContentin interfaceNode- Throws:
DOMException
-
getTextContent
- Specified by:
getTextContentin interfaceNode- Throws:
DOMException
-
compareDocumentPosition
- Specified by:
compareDocumentPositionin interfaceNode- Throws:
DOMException
-
getBaseURI
- Specified by:
getBaseURIin interfaceNode
-