Class DTMNodeProxy

java.lang.Object
org.apache.xml.dtm.ref.DTMNodeProxy
All Implemented Interfaces:
Attr, CharacterData, Comment, Document, DocumentFragment, Element, Node, ProcessingInstruction, Text

public class DTMNodeProxy extends Object implements Node, Document, Text, Element, Attr, ProcessingInstruction, Comment, DocumentFragment
DTMNodeProxy presents a DOM Node API front-end to the DTM model.

It does _not_ attempt to address the "node identity" question; no effort is made to prevent the creation of multiple proxies referring to a single DTM node. Users can create a mechanism for managing this, or relinquish the use of "==" and use the .sameNodeAs() mechanism, which is under consideration for future versions of the DOM.

DTMNodeProxy may be subclassed further to present specific DOM node types.

See Also:
  • Field Details

    • dtm

      public DTM dtm
      The DTM for this node.
  • Constructor Details

    • DTMNodeProxy

      public DTMNodeProxy(DTM dtm, int node)
      Create a DTMNodeProxy Node representing a specific Node in a DTM
      Parameters:
      dtm - The DTM Reference, must be non-null.
      node - The DTM node handle.
  • Method Details

    • getDTM

      public final DTM getDTM()
      NON-DOM: Return the DTM model
      Returns:
      The DTM that this proxy is a representative for.
    • getDTMNodeNumber

      public final int getDTMNodeNumber()
      NON-DOM: Return the DTM node number
      Returns:
      The DTM node handle.
    • equals

      public final boolean equals(Node node)
      Test for equality based on node number.
      Parameters:
      node - A DTM node proxy reference.
      Returns:
      true if the given node has the same handle as this node.
    • equals

      public final boolean equals(Object node)
      Test for equality based on node number.
      Overrides:
      equals in class Object
      Parameters:
      node - A DTM node proxy reference.
      Returns:
      true if the given node has the same handle as this node.
    • sameNodeAs

      public final boolean sameNodeAs(Node other)
      FUTURE DOM: Test node identity, in lieu of Node==Node
      Parameters:
      other -
      Returns:
      true if the given node has the same handle as this node.
    • getNodeName

      public final String getNodeName()
      Specified by:
      getNodeName in interface Node
      See Also:
    • getTarget

      public final String getTarget()
      A PI's "target" states what processor channel the PI's data should be directed to. It is defined differently in HTML and XML.

      In XML, a PI's "target" is the first (whitespace-delimited) token following the "invalid input: '<'?" token that begins the PI.

      In HTML, target is always null.

      Note that getNodeName is aliased to getTarget.

      Specified by:
      getTarget in interface ProcessingInstruction
    • getLocalName

      public final String getLocalName()
      Specified by:
      getLocalName in interface Node
      See Also:
    • getPrefix

      public final String getPrefix()
      Specified by:
      getPrefix in interface Node
      Returns:
      The prefix for this node.
      See Also:
    • setPrefix

      public final void setPrefix(String prefix) throws DOMException
      Specified by:
      setPrefix in interface Node
      Parameters:
      prefix -
      Throws:
      DOMException
      See Also:
    • getNamespaceURI

      public final String getNamespaceURI()
      Specified by:
      getNamespaceURI in interface Node
      See Also:
    • supports

      public final boolean supports(String feature, String version)
      Ask whether we support a given DOM feature. In fact, we do not _fully_ support any DOM feature -- we're a read-only subset -- so arguably we should always return false. Or we could say that we support DOM Core Level 2 but all nodes are read-only. Unclear which answer is least misleading. NON-DOM method. This was present in early drafts of DOM Level 2, but was renamed isSupported. It's present here only because it's cheap, harmless, and might help some poor fool who is still trying to use an early Working Draft of the DOM.
      Parameters:
      feature -
      version -
      Returns:
      false
    • isSupported

      public final boolean isSupported(String feature, String version)
      Ask whether we support a given DOM feature. In fact, we do not _fully_ support any DOM feature -- we're a read-only subset -- so arguably we should always return false.
      Specified by:
      isSupported in interface Node
      Parameters:
      feature -
      version -
      Returns:
      false
      See Also:
    • getNodeValue

      public final String getNodeValue() throws DOMException
      Specified by:
      getNodeValue in interface Node
      Throws:
      DOMException
      See Also:
    • getStringValue

      public final String getStringValue() throws DOMException
      Returns:
      The string value of the node
      Throws:
      DOMException
    • setNodeValue

      public final void setNodeValue(String nodeValue) throws DOMException
      Specified by:
      setNodeValue in interface Node
      Parameters:
      nodeValue -
      Throws:
      DOMException
      See Also:
    • getNodeType

      public final short getNodeType()
      Specified by:
      getNodeType in interface Node
      See Also:
    • getParentNode

      public final Node getParentNode()
      Specified by:
      getParentNode in interface Node
      See Also:
    • getOwnerNode

      public final Node getOwnerNode()
      See Also:
    • getChildNodes

      public final NodeList getChildNodes()
      Specified by:
      getChildNodes in interface Node
      See Also:
    • getFirstChild

      public final Node getFirstChild()
      Specified by:
      getFirstChild in interface Node
      See Also:
    • getLastChild

      public final Node getLastChild()
      Specified by:
      getLastChild in interface Node
      See Also:
    • getPreviousSibling

      public final Node getPreviousSibling()
      Specified by:
      getPreviousSibling in interface Node
      See Also:
    • getNextSibling

      public final Node getNextSibling()
      Specified by:
      getNextSibling in interface Node
      See Also:
    • getAttributes

      public final NamedNodeMap getAttributes()
      Specified by:
      getAttributes in interface Node
      See Also:
    • hasAttribute

      public boolean hasAttribute(String name)
      Method hasAttribute
      Specified by:
      hasAttribute in interface Element
      Parameters:
      name -
    • hasAttributeNS

      public boolean hasAttributeNS(String namespaceURI, String localName)
      Method hasAttributeNS
      Specified by:
      hasAttributeNS in interface Element
      Parameters:
      namespaceURI -
      localName -
    • getOwnerDocument

      public final Document getOwnerDocument()
      Specified by:
      getOwnerDocument in interface Node
      See Also:
    • insertBefore

      public final Node insertBefore(Node newChild, Node refChild) throws DOMException
      Specified by:
      insertBefore in interface Node
      Parameters:
      newChild -
      refChild -
      Throws:
      DOMException
      See Also:
    • replaceChild

      public final Node replaceChild(Node newChild, Node oldChild) throws DOMException
      Specified by:
      replaceChild in interface Node
      Parameters:
      newChild -
      oldChild -
      Throws:
      DOMException
      See Also:
    • removeChild

      public final Node removeChild(Node oldChild) throws DOMException
      Specified by:
      removeChild in interface Node
      Parameters:
      oldChild -
      Throws:
      DOMException
      See Also:
    • appendChild

      public final Node appendChild(Node newChild) throws DOMException
      Specified by:
      appendChild in interface Node
      Parameters:
      newChild -
      Throws:
      DOMException
      See Also:
    • hasChildNodes

      public final boolean hasChildNodes()
      Specified by:
      hasChildNodes in interface Node
      See Also:
    • cloneNode

      public final Node cloneNode(boolean deep)
      Specified by:
      cloneNode in interface Node
      Parameters:
      deep -
      See Also:
    • getDoctype

      public final DocumentType getDoctype()
      Specified by:
      getDoctype in interface Document
      See Also:
    • getImplementation

      public final DOMImplementation getImplementation()
      Specified by:
      getImplementation in interface Document
      See Also:
    • getDocumentElement

      public final Element getDocumentElement()
      This is a bit of a problem in DTM, since a DTM may be a Document Fragment and hence not have a clear-cut Document Element. We can make it work in the well-formed cases but would that be confusing for others?
      Specified by:
      getDocumentElement in interface Document
      See Also:
    • createElement

      public final Element createElement(String tagName) throws DOMException
      Specified by:
      createElement in interface Document
      Parameters:
      tagName -
      Throws:
      DOMException
      See Also:
    • createDocumentFragment

      public final DocumentFragment createDocumentFragment()
      Specified by:
      createDocumentFragment in interface Document
      See Also:
    • createTextNode

      public final Text createTextNode(String data)
      Specified by:
      createTextNode in interface Document
      Parameters:
      data -
      See Also:
    • createComment

      public final Comment createComment(String data)
      Specified by:
      createComment in interface Document
      Parameters:
      data -
      See Also:
    • createCDATASection

      public final CDATASection createCDATASection(String data) throws DOMException
      Specified by:
      createCDATASection in interface Document
      Parameters:
      data -
      Throws:
      DOMException
      See Also:
    • createProcessingInstruction

      public final ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
      Specified by:
      createProcessingInstruction in interface Document
      Parameters:
      target -
      data -
      Throws:
      DOMException
      See Also:
    • createAttribute

      public final Attr createAttribute(String name) throws DOMException
      Specified by:
      createAttribute in interface Document
      Parameters:
      name -
      Throws:
      DOMException
      See Also:
    • createEntityReference

      public final EntityReference createEntityReference(String name) throws DOMException
      Specified by:
      createEntityReference in interface Document
      Parameters:
      name -
      Throws:
      DOMException
      See Also:
    • getElementsByTagName

      public final NodeList getElementsByTagName(String tagname)
      Specified by:
      getElementsByTagName in interface Document
      Specified by:
      getElementsByTagName in interface Element
      Parameters:
      tagname -
      See Also:
    • importNode

      public final Node importNode(Node importedNode, boolean deep) throws DOMException
      Specified by:
      importNode in interface Document
      Parameters:
      importedNode -
      deep -
      Throws:
      DOMException
      See Also:
    • createElementNS

      public final Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
      Specified by:
      createElementNS in interface Document
      Parameters:
      namespaceURI -
      qualifiedName -
      Throws:
      DOMException
      See Also:
    • createAttributeNS

      public final Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
      Specified by:
      createAttributeNS in interface Document
      Parameters:
      namespaceURI -
      qualifiedName -
      Throws:
      DOMException
      See Also:
    • getElementsByTagNameNS

      public final NodeList getElementsByTagNameNS(String namespaceURI, String localName)
      Specified by:
      getElementsByTagNameNS in interface Document
      Specified by:
      getElementsByTagNameNS in interface Element
      Parameters:
      namespaceURI -
      localName -
      See Also:
    • getElementById

      public final Element getElementById(String elementId)
      Specified by:
      getElementById in interface Document
      Parameters:
      elementId -
      See Also:
    • splitText

      public final Text splitText(int offset) throws DOMException
      Specified by:
      splitText in interface Text
      Parameters:
      offset -
      Throws:
      DOMException
      See Also:
    • getData

      public final String getData() throws DOMException
      Specified by:
      getData in interface CharacterData
      Specified by:
      getData in interface ProcessingInstruction
      Throws:
      DOMException
      See Also:
    • setData

      public final void setData(String data) throws DOMException
      Specified by:
      setData in interface CharacterData
      Specified by:
      setData in interface ProcessingInstruction
      Parameters:
      data -
      Throws:
      DOMException
      See Also:
    • getLength

      public final int getLength()
      Specified by:
      getLength in interface CharacterData
      See Also:
    • substringData

      public final String substringData(int offset, int count) throws DOMException
      Specified by:
      substringData in interface CharacterData
      Parameters:
      offset -
      count -
      Throws:
      DOMException
      See Also:
    • appendData

      public final void appendData(String arg) throws DOMException
      Specified by:
      appendData in interface CharacterData
      Parameters:
      arg -
      Throws:
      DOMException
      See Also:
    • insertData

      public final void insertData(int offset, String arg) throws DOMException
      Specified by:
      insertData in interface CharacterData
      Parameters:
      offset -
      arg -
      Throws:
      DOMException
      See Also:
    • deleteData

      public final void deleteData(int offset, int count) throws DOMException
      Specified by:
      deleteData in interface CharacterData
      Parameters:
      offset -
      count -
      Throws:
      DOMException
      See Also:
    • replaceData

      public final void replaceData(int offset, int count, String arg) throws DOMException
      Specified by:
      replaceData in interface CharacterData
      Parameters:
      offset -
      count -
      arg -
      Throws:
      DOMException
      See Also:
    • getTagName

      public final String getTagName()
      Specified by:
      getTagName in interface Element
      See Also:
    • getAttribute

      public final String getAttribute(String name)
      Specified by:
      getAttribute in interface Element
      Parameters:
      name -
      See Also:
    • setAttribute

      public final void setAttribute(String name, String value) throws DOMException
      Specified by:
      setAttribute in interface Element
      Parameters:
      name -
      value -
      Throws:
      DOMException
      See Also:
    • removeAttribute

      public final void removeAttribute(String name) throws DOMException
      Specified by:
      removeAttribute in interface Element
      Parameters:
      name -
      Throws:
      DOMException
      See Also:
    • getAttributeNode

      public final Attr getAttributeNode(String name)
      Specified by:
      getAttributeNode in interface Element
      Parameters:
      name -
      See Also:
    • setAttributeNode

      public final Attr setAttributeNode(Attr newAttr) throws DOMException
      Specified by:
      setAttributeNode in interface Element
      Parameters:
      newAttr -
      Throws:
      DOMException
      See Also:
    • removeAttributeNode

      public final Attr removeAttributeNode(Attr oldAttr) throws DOMException
      Specified by:
      removeAttributeNode in interface Element
      Parameters:
      oldAttr -
      Throws:
      DOMException
      See Also:
    • hasAttributes

      public boolean hasAttributes()
      Introduced in DOM Level 2.
      Specified by:
      hasAttributes in interface Node
    • normalize

      public final void normalize()
      Specified by:
      normalize in interface Node
      See Also:
    • getAttributeNS

      public final String getAttributeNS(String namespaceURI, String localName)
      Specified by:
      getAttributeNS in interface Element
      Parameters:
      namespaceURI -
      localName -
      See Also:
    • setAttributeNS

      public final void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
      Specified by:
      setAttributeNS in interface Element
      Parameters:
      namespaceURI -
      qualifiedName -
      value -
      Throws:
      DOMException
      See Also:
    • removeAttributeNS

      public final void removeAttributeNS(String namespaceURI, String localName) throws DOMException
      Specified by:
      removeAttributeNS in interface Element
      Parameters:
      namespaceURI -
      localName -
      Throws:
      DOMException
      See Also:
    • getAttributeNodeNS

      public final Attr getAttributeNodeNS(String namespaceURI, String localName)
      Specified by:
      getAttributeNodeNS in interface Element
      Parameters:
      namespaceURI -
      localName -
      See Also:
    • setAttributeNodeNS

      public final Attr setAttributeNodeNS(Attr newAttr) throws DOMException
      Specified by:
      setAttributeNodeNS in interface Element
      Parameters:
      newAttr -
      Throws:
      DOMException
      See Also:
    • getName

      public final String getName()
      Specified by:
      getName in interface Attr
      See Also:
    • getSpecified

      public final boolean getSpecified()
      Specified by:
      getSpecified in interface Attr
      See Also:
    • getValue

      public final String getValue()
      Specified by:
      getValue in interface Attr
      See Also:
    • setValue

      public final void setValue(String value)
      Specified by:
      setValue in interface Attr
      Parameters:
      value -
      See Also:
    • getOwnerElement

      public final Element getOwnerElement()
      Get the owner element of an attribute.
      Specified by:
      getOwnerElement in interface Attr
      See Also:
    • adoptNode

      public Node adoptNode(Node source) throws DOMException
      NEEDSDOC Method adoptNode NEEDSDOC @param source
      Specified by:
      adoptNode in interface Document
      Throws:
      DOMException
    • getInputEncoding

      public String getInputEncoding()

      Based on the Document Object Model (DOM) Level 3 Core Specification of 07 April 2004..

      An attribute specifying, as part of the XML declaration, the encoding of this document. This is null when unspecified.

      Specified by:
      getInputEncoding in interface Document
      Since:
      DOM Level 3
    • getStrictErrorChecking

      public boolean getStrictErrorChecking()

      Based on the Document Object Model (DOM) Level 3 Core Specification of 07 April 2004..

      An attribute specifying whether errors checking is enforced or not. When set to false, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise any DOMException. In case of error, the behavior is undefined. This attribute is true by defaults.

      Specified by:
      getStrictErrorChecking in interface Document
      Since:
      DOM Level 3
    • setStrictErrorChecking

      public void setStrictErrorChecking(boolean strictErrorChecking)

      Based on the Document Object Model (DOM) Level 3 Core Specification of 07 April 2004..

      An attribute specifying whether errors checking is enforced or not. When set to false, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise any DOMException. In case of error, the behavior is undefined. This attribute is true by defaults.

      Specified by:
      setStrictErrorChecking in interface Document
      Since:
      DOM Level 3 NEEDSDOC @param strictErrorChecking
    • setUserData

      public Object setUserData(String key, Object data, UserDataHandler handler)
      Specified by:
      setUserData in interface Node
    • getUserData

      public Object getUserData(String key)
      Retrieves the object associated to a key on a this node. The object must first have been set to this node by calling setUserData with the same key.
      Specified by:
      getUserData in interface Node
      Parameters:
      key - The key the object is associated to.
      Returns:
      Returns the DOMObject associated to the given key on this node, or null if there was none.
      Since:
      DOM Level 3
    • getFeature

      public Object getFeature(String feature, String version)
      This method returns a specialized object which implements the specialized APIs of the specified feature and version. The specialized object may also be obtained by using binding-specific casting methods but is not necessarily expected to, as discussed in Mixed DOM implementations.
      Specified by:
      getFeature in interface Node
      Parameters:
      feature - The name of the feature requested (case-insensitive).
      version - This is the version number of the feature to test. If the version is null or the empty string, supporting any version of the feature will cause the method to return an object that supports at least one version of the feature.
      Returns:
      Returns an object which implements the specialized APIs of the specified feature and version, if any, or null if there is no object which implements interfaces associated with that feature. If the DOMObject returned by this method implements the Node interface, it must delegate to the primary core Node and not return results inconsistent with the primary core Node such as attributes, childNodes, etc.
      Since:
      DOM Level 3
    • isEqualNode

      public boolean isEqualNode(Node arg)
      Tests whether two nodes are equal.
      This method tests for equality of nodes, not sameness (i.e., whether the two nodes are references to the same object) which can be tested with Node.isSameNode. All nodes that are the same will also be equal, though the reverse may not be true.
      Two nodes are equal if and only if the following conditions are satisfied: The two nodes are of the same type.The following string attributes are equal: nodeName, localName, namespaceURI, prefix, nodeValue , baseURI. This is: they are both null, or they have the same length and are character for character identical. The attributes NamedNodeMaps are equal. This is: they are both null, or they have the same length and for each node that exists in one map there is a node that exists in the other map and is equal, although not necessarily at the same index.The childNodes NodeLists are equal. This is: they are both null, or they have the same length and contain equal nodes at the same index. This is true for Attr nodes as for any other type of node. Note that normalization can affect equality; to avoid this, nodes should be normalized before being compared.
      For two DocumentType nodes to be equal, the following conditions must also be satisfied: The following string attributes are equal: publicId, systemId, internalSubset.The entities NamedNodeMaps are equal.The notations NamedNodeMaps are equal.
      On the other hand, the following do not affect equality: the ownerDocument attribute, the specified attribute for Attr nodes, the isWhitespaceInElementContent attribute for Text nodes, as well as any user data or event listeners registered on the nodes.
      Specified by:
      isEqualNode in interface Node
      Parameters:
      arg - The node to compare equality with.
      deep - If true, recursively compare the subtrees; if false, compare only the nodes themselves (and its attributes, if it is an Element).
      Returns:
      If the nodes, and possibly subtrees are equal, true otherwise false.
      Since:
      DOM Level 3
    • lookupNamespaceURI

      public String lookupNamespaceURI(String specifiedPrefix)
      DOM Level 3: Look up the namespace URI associated to the given prefix, starting from this node. Use lookupNamespaceURI(null) to lookup the default namespace
      Specified by:
      lookupNamespaceURI in interface Node
      Parameters:
      namespaceURI -
      Returns:
      th URI for the namespace
      Since:
      DOM Level 3
    • isDefaultNamespace

      public boolean isDefaultNamespace(String namespaceURI)
      DOM Level 3: This method checks if the specified namespaceURI is the default namespace or not.
      Specified by:
      isDefaultNamespace in interface Node
      Parameters:
      namespaceURI - The namespace URI to look for.
      Returns:
      true if the specified namespaceURI is the default namespace, false otherwise.
      Since:
      DOM Level 3
    • lookupPrefix

      public String lookupPrefix(String namespaceURI)
      DOM Level 3: Look up the prefix associated to the given namespace URI, starting from this node.
      Specified by:
      lookupPrefix in interface Node
      Parameters:
      namespaceURI -
      Returns:
      the prefix for the namespace
    • isSameNode

      public boolean isSameNode(Node other)
      Returns whether this node is the same node as the given one.
      This method provides a way to determine whether two Node references returned by the implementation reference the same object. When two Node references are references to the same object, even if through a proxy, the references may be used completely interchangably, such that all attributes have the same values and calling the same DOM method on either reference always has exactly the same effect.
      Specified by:
      isSameNode in interface Node
      Parameters:
      other - The node to test against.
      Returns:
      Returns true if the nodes are the same, false otherwise.
      Since:
      DOM Level 3
    • setTextContent

      public void setTextContent(String textContent) throws DOMException
      This attribute returns the text content of this node and its descendants. When it is defined to be null, setting it has no effect. When set, any possible children this node may have are removed and replaced by a single Text node containing the string this attribute is set to. On getting, no serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed, the returned string does not contain the element content whitespaces . Similarly, on setting, no parsing is performed either, the input string is taken as pure textual content.
      The string returned is made of the text content of this node depending on its type, as defined below:
      Node type Content
      ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE concatenation of the textContent attribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes
      ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE nodeValue
      DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE null
      Specified by:
      setTextContent in interface Node
      Throws:
      DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
      DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.
      Since:
      DOM Level 3
    • getTextContent

      public String getTextContent() throws DOMException
      This attribute returns the text content of this node and its descendants. When it is defined to be null, setting it has no effect. When set, any possible children this node may have are removed and replaced by a single Text node containing the string this attribute is set to. On getting, no serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed, the returned string does not contain the element content whitespaces . Similarly, on setting, no parsing is performed either, the input string is taken as pure textual content.
      The string returned is made of the text content of this node depending on its type, as defined below:
      Node type Content
      ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE concatenation of the textContent attribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes
      ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE nodeValue
      DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE null
      Specified by:
      getTextContent in interface Node
      Throws:
      DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
      DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.
      Since:
      DOM Level 3
    • compareDocumentPosition

      public short compareDocumentPosition(Node other) throws DOMException
      Compares a node with this node with regard to their position in the document.
      Specified by:
      compareDocumentPosition in interface Node
      Parameters:
      other - The node to compare against this node.
      Returns:
      Returns how the given node is positioned relatively to this node.
      Throws:
      DOMException
      Since:
      DOM Level 3
    • getBaseURI

      public String getBaseURI()
      The absolute base URI of this node or null if undefined. This value is computed according to . However, when the Document supports the feature "HTML" , the base URI is computed using first the value of the href attribute of the HTML BASE element if any, and the value of the documentURI attribute from the Document interface otherwise.
      When the node is an Element, a Document or a a ProcessingInstruction, this attribute represents the properties [base URI] defined in . When the node is a Notation, an Entity, or an EntityReference, this attribute represents the properties [declaration base URI] in the . How will this be affected by resolution of relative namespace URIs issue?It's not.Should this only be on Document, Element, ProcessingInstruction, Entity, and Notation nodes, according to the infoset? If not, what is it equal to on other nodes? Null? An empty string? I think it should be the parent's.No.Should this be read-only and computed or and actual read-write attribute?Read-only and computed (F2F 19 Jun 2000 and teleconference 30 May 2001).If the base HTML element is not yet attached to a document, does the insert change the Document.baseURI? Yes. (F2F 26 Sep 2001)
      Specified by:
      getBaseURI in interface Node
      Since:
      DOM Level 3
    • renameNode

      public Node renameNode(Node n, String namespaceURI, String name) throws DOMException
      DOM Level 3 Renaming node
      Specified by:
      renameNode in interface Document
      Throws:
      DOMException
    • normalizeDocument

      public void normalizeDocument()
      DOM Level 3 Normalize document.
      Specified by:
      normalizeDocument in interface Document
    • getDomConfig

      public DOMConfiguration getDomConfig()
      The configuration used when Document.normalizeDocument is invoked.
      Specified by:
      getDomConfig in interface Document
      Since:
      DOM Level 3
    • setDocumentURI

      public void setDocumentURI(String documentURI)
      DOM Level 3
      Specified by:
      setDocumentURI in interface Document
    • getDocumentURI

      public String getDocumentURI()
      DOM Level 3 The location of the document or null if undefined.
      Beware that when the Document supports the feature "HTML" , the href attribute of the HTML BASE element takes precedence over this attribute.
      Specified by:
      getDocumentURI in interface Document
      Since:
      DOM Level 3
    • getActualEncoding

      public String getActualEncoding()
      DOM Level 3 An attribute specifying the actual encoding of this document. This is null otherwise.
      This attribute represents the property [character encoding scheme] defined in .
      Since:
      DOM Level 3
    • setActualEncoding

      public void setActualEncoding(String value)
      DOM Level 3 An attribute specifying the actual encoding of this document. This is null otherwise.
      This attribute represents the property [character encoding scheme] defined in .
      Since:
      DOM Level 3
    • replaceWholeText

      public Text replaceWholeText(String content) throws DOMException
      DOM Level 3
      Specified by:
      replaceWholeText in interface Text
      Throws:
      DOMException
    • getWholeText

      public String getWholeText()
      DOM Level 3 Returns all text of Text nodes logically-adjacent text nodes to this node, concatenated in document order.
      Specified by:
      getWholeText in interface Text
      Since:
      DOM Level 3
    • isElementContentWhitespace

      public boolean isElementContentWhitespace()
      DOM Level 3 Returns whether this text node contains whitespace in element content, often abusively called "ignorable whitespace".
      Specified by:
      isElementContentWhitespace in interface Text
    • setIdAttribute

      public void setIdAttribute(boolean id)
      NON-DOM: set the type of this attribute to be ID type.
      Parameters:
      id -
    • setIdAttribute

      public void setIdAttribute(String name, boolean makeId)
      DOM Level 3: register the given attribute node as an ID attribute
      Specified by:
      setIdAttribute in interface Element
    • setIdAttributeNode

      public void setIdAttributeNode(Attr at, boolean makeId)
      DOM Level 3: register the given attribute node as an ID attribute
      Specified by:
      setIdAttributeNode in interface Element
    • setIdAttributeNS

      public void setIdAttributeNS(String namespaceURI, String localName, boolean makeId)
      DOM Level 3: register the given attribute node as an ID attribute
      Specified by:
      setIdAttributeNS in interface Element
    • getSchemaTypeInfo

      public TypeInfo getSchemaTypeInfo()
      Specified by:
      getSchemaTypeInfo in interface Attr
      Specified by:
      getSchemaTypeInfo in interface Element
    • isId

      public boolean isId()
      Specified by:
      isId in interface Attr
    • getXmlEncoding

      public String getXmlEncoding()
      Specified by:
      getXmlEncoding in interface Document
    • setXmlEncoding

      public void setXmlEncoding(String xmlEncoding)
    • getXmlStandalone

      public boolean getXmlStandalone()
      Specified by:
      getXmlStandalone in interface Document
    • setXmlStandalone

      public void setXmlStandalone(boolean xmlStandalone) throws DOMException
      Specified by:
      setXmlStandalone in interface Document
      Throws:
      DOMException
    • getXmlVersion

      public String getXmlVersion()
      Specified by:
      getXmlVersion in interface Document
    • setXmlVersion

      public void setXmlVersion(String xmlVersion) throws DOMException
      Specified by:
      setXmlVersion in interface Document
      Throws:
      DOMException