Package net.sf.saxon.dom
Class AttrOverNodeInfo
- java.lang.Object
-
- net.sf.saxon.dom.NodeOverNodeInfo
-
- net.sf.saxon.dom.AttrOverNodeInfo
-
- All Implemented Interfaces:
org.w3c.dom.Attr,org.w3c.dom.Node
public class AttrOverNodeInfo extends NodeOverNodeInfo implements org.w3c.dom.Attr
This class is an implementation of the DOM Attr class that wraps a Saxon NodeInfo representation of an attribute or namespace node.
-
-
Field Summary
-
Fields inherited from class net.sf.saxon.dom.NodeOverNodeInfo
node
-
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
-
-
Constructor Summary
Constructors Constructor Description AttrOverNodeInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.NodeListgetChildNodes()Return aNodeListthat contains all children of this node.org.w3c.dom.NodegetFirstChild()Get first childorg.w3c.dom.NodegetLastChild()Get last childjava.lang.StringgetName()Get the name of an attribute node (the lexical QName) (DOM method)org.w3c.dom.ElementgetOwnerElement()TheElementnode this attribute is attached to ornullif this attribute is not in use.org.w3c.dom.TypeInfogetSchemaTypeInfo()Get the schema type information for this node.booleangetSpecified()If this attribute was explicitly given a value in the original document, this istrue; otherwise, it isfalse.java.lang.StringgetValue()Return the character value of an attribute node (DOM method)booleanhasChildNodes()Determine whether the node has any children.booleanisId()Determine whether this (attribute) node is an ID.voidsetValue(java.lang.String value)Set the value of an attribute node.-
Methods inherited from class net.sf.saxon.dom.NodeOverNodeInfo
appendChild, cloneNode, compareDocumentPosition, disallowUpdate, equals, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUnderlyingNodeInfo, getUserData, hasAttributes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData, wrap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name of an attribute node (the lexical QName) (DOM method)- Specified by:
getNamein interfaceorg.w3c.dom.Attr
-
getValue
public java.lang.String getValue()
Return the character value of an attribute node (DOM method)- Specified by:
getValuein interfaceorg.w3c.dom.Attr- Returns:
- the attribute value
-
hasChildNodes
public boolean hasChildNodes()
Determine whether the node has any children.- Specified by:
hasChildNodesin interfaceorg.w3c.dom.Node- Overrides:
hasChildNodesin classNodeOverNodeInfo- Returns:
true: a DOM Attribute has a text node as a child.
-
getFirstChild
public org.w3c.dom.Node getFirstChild()
Get first child- Specified by:
getFirstChildin interfaceorg.w3c.dom.Node- Overrides:
getFirstChildin classNodeOverNodeInfo- Returns:
- the first child node of this node. In this model an attribute node always has a single text node as its child.
-
getLastChild
public org.w3c.dom.Node getLastChild()
Get last child- Specified by:
getLastChildin interfaceorg.w3c.dom.Node- Overrides:
getLastChildin classNodeOverNodeInfo- Returns:
- last child of this node, or null if it has no children
-
getChildNodes
public org.w3c.dom.NodeList getChildNodes()
Return aNodeListthat contains all children of this node. If there are no children, this is aNodeListcontaining no nodes.- Specified by:
getChildNodesin interfaceorg.w3c.dom.Node- Overrides:
getChildNodesin classNodeOverNodeInfo
-
getSpecified
public boolean getSpecified()
If this attribute was explicitly given a value in the original document, this istrue; otherwise, it isfalse. (DOM method)- Specified by:
getSpecifiedin interfaceorg.w3c.dom.Attr- Returns:
- Always true in this implementation.
-
setValue
public void setValue(java.lang.String value) throws org.w3c.dom.DOMExceptionSet the value of an attribute node. (DOM method). Always fails (because tree is readonly)- Specified by:
setValuein interfaceorg.w3c.dom.Attr- Throws:
org.w3c.dom.DOMException- always, to indicate that update is not supported in this DOM implementation
-
isId
public boolean isId()
Determine whether this (attribute) node is an ID. This method is introduced in DOM Level 3.- Specified by:
isIdin interfaceorg.w3c.dom.Attr
-
getOwnerElement
public org.w3c.dom.Element getOwnerElement()
TheElementnode this attribute is attached to ornullif this attribute is not in use.- Specified by:
getOwnerElementin interfaceorg.w3c.dom.Attr- Since:
- DOM Level 2
-
getSchemaTypeInfo
public org.w3c.dom.TypeInfo getSchemaTypeInfo()
Get the schema type information for this node. Returns null for an untyped node.- Specified by:
getSchemaTypeInfoin interfaceorg.w3c.dom.Attr
-
-