org.apache.xml.dtm.ref.dom2dtm
Class DOM2DTMdefaultNamespaceDeclarationNode
java.lang.Object
org.apache.xml.dtm.ref.dom2dtm.DOM2DTMdefaultNamespaceDeclarationNode
- All Implemented Interfaces:
- org.w3c.dom.Attr, org.w3c.dom.Node
- public class DOM2DTMdefaultNamespaceDeclarationNode
- extends Object
- implements org.w3c.dom.Attr
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.
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOT_SUPPORTED_ERR
final String NOT_SUPPORTED_ERR
- See Also:
- Constant Field Values
pseudoparent
org.w3c.dom.Element pseudoparent
prefix
String prefix
uri
String uri
nodename
String nodename
handle
int handle
DOM2DTMdefaultNamespaceDeclarationNode
DOM2DTMdefaultNamespaceDeclarationNode(org.w3c.dom.Element pseudoparent,
String prefix,
String uri,
int handle)
getNodeName
public String getNodeName()
- Specified by:
getNodeName
in interface org.w3c.dom.Node
getName
public String getName()
- Specified by:
getName
in interface org.w3c.dom.Attr
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURI
in interface org.w3c.dom.Node
getPrefix
public String getPrefix()
- Specified by:
getPrefix
in interface org.w3c.dom.Node
getLocalName
public String getLocalName()
- Specified by:
getLocalName
in interface org.w3c.dom.Node
getNodeValue
public String getNodeValue()
- Specified by:
getNodeValue
in interface org.w3c.dom.Node
getValue
public String getValue()
- Specified by:
getValue
in interface org.w3c.dom.Attr
getOwnerElement
public org.w3c.dom.Element getOwnerElement()
- Specified by:
getOwnerElement
in interface org.w3c.dom.Attr
isSupported
public boolean isSupported(String feature,
String version)
- Specified by:
isSupported
in interface org.w3c.dom.Node
hasChildNodes
public boolean hasChildNodes()
- Specified by:
hasChildNodes
in interface org.w3c.dom.Node
hasAttributes
public boolean hasAttributes()
- Specified by:
hasAttributes
in interface org.w3c.dom.Node
getParentNode
public org.w3c.dom.Node getParentNode()
- Specified by:
getParentNode
in interface org.w3c.dom.Node
getFirstChild
public org.w3c.dom.Node getFirstChild()
- Specified by:
getFirstChild
in interface org.w3c.dom.Node
getLastChild
public org.w3c.dom.Node getLastChild()
- Specified by:
getLastChild
in interface org.w3c.dom.Node
getPreviousSibling
public org.w3c.dom.Node getPreviousSibling()
- Specified by:
getPreviousSibling
in interface org.w3c.dom.Node
getNextSibling
public org.w3c.dom.Node getNextSibling()
- Specified by:
getNextSibling
in interface org.w3c.dom.Node
getSpecified
public boolean getSpecified()
- Specified by:
getSpecified
in interface org.w3c.dom.Attr
normalize
public void normalize()
- Specified by:
normalize
in interface org.w3c.dom.Node
getChildNodes
public org.w3c.dom.NodeList getChildNodes()
- Specified by:
getChildNodes
in interface org.w3c.dom.Node
getAttributes
public org.w3c.dom.NamedNodeMap getAttributes()
- Specified by:
getAttributes
in interface org.w3c.dom.Node
getNodeType
public short getNodeType()
- Specified by:
getNodeType
in interface org.w3c.dom.Node
setNodeValue
public void setNodeValue(String value)
- Specified by:
setNodeValue
in interface org.w3c.dom.Node
setValue
public void setValue(String value)
- Specified by:
setValue
in interface org.w3c.dom.Attr
setPrefix
public void setPrefix(String value)
- Specified by:
setPrefix
in interface org.w3c.dom.Node
insertBefore
public org.w3c.dom.Node insertBefore(org.w3c.dom.Node a,
org.w3c.dom.Node b)
- Specified by:
insertBefore
in interface org.w3c.dom.Node
replaceChild
public org.w3c.dom.Node replaceChild(org.w3c.dom.Node a,
org.w3c.dom.Node b)
- Specified by:
replaceChild
in interface org.w3c.dom.Node
appendChild
public org.w3c.dom.Node appendChild(org.w3c.dom.Node a)
- Specified by:
appendChild
in interface org.w3c.dom.Node
removeChild
public org.w3c.dom.Node removeChild(org.w3c.dom.Node a)
- Specified by:
removeChild
in interface org.w3c.dom.Node
getOwnerDocument
public org.w3c.dom.Document getOwnerDocument()
- Specified by:
getOwnerDocument
in interface org.w3c.dom.Node
cloneNode
public org.w3c.dom.Node cloneNode(boolean deep)
- Specified by:
cloneNode
in interface org.w3c.dom.Node
getHandleOfNode
public int getHandleOfNode()
- Non-DOM method, part of the temporary kluge
%REVIEW% This would be a pruning problem, but since it will always be
added to the root element and we prune on elements, we shouldn't have
to worry.