final class TinyAttributeImpl extends TinyNodeImpl implements Attr
document, nodeNr, parent
NODE_LETTER
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 and Description |
---|
TinyAttributeImpl(TinyDocumentImpl doc,
int nodeNr) |
Modifier and Type | Method and Description |
---|---|
void |
copy(Outputter out)
Copy this node to a given outputter
|
String |
generateId()
Generate id.
|
String |
getDisplayName()
Get the display name of this node.
|
int |
getFingerprint()
Get the fingerprint of the node, used for matching names
|
int |
getLineNumber()
Get the line number of the node within its source document entity
|
String |
getLocalName()
Get the local name of this node.
|
int |
getNameCode()
Get the name code of the node, used for finding names in the name pool
|
short |
getNodeType()
Return the type of node.
|
NodeInfo |
getParent()
Get the parent node
|
String |
getPrefix()
Get the prefix part of the name of this node.
|
TypeInfo |
getSchemaTypeInfo()
The type information associated with this attribute.
|
protected long |
getSequenceNumber()
Get the node sequence number (in document order).
|
String |
getStringValue()
Return the character value of the node.
|
String |
getURI()
Get the URI part of the name of this node.
|
boolean |
isId()
Returns whether this attribute is known to be of type ID (i.e.
|
compareOrder, getAttributeValue, getAttributeValue, getBaseURI, getDocumentRoot, getEnumeration, getOriginatingNode, getSystemId, hasAttributes, hasChildNodes, isSameNodeInfo, outputNamespaceNodes, setLineNumber, setParentNode, setSystemId
appendChild, appendData, cloneNode, compareDocumentPosition, copyStringValue, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, disallowUpdate, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getChildNodes, getColumnNumber, getData, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getFirstChild, getImplementation, getLastChild, getLength, getName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getOwnerElement, getParentNode, getPreviousSibling, getPublicId, getSpecified, getTagName, getTextContent, getUserData, getValue, getWholeText, hasAttribute, hasAttributeNS, importNode, insertBefore, insertData, isDefaultNamespace, isElementContentWhitespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, replaceData, replaceWholeText, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setUserData, setValue, splitText, substringData, supports
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getOwnerElement, getSpecified, getValue, setValue
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public TinyAttributeImpl(TinyDocumentImpl doc, int nodeNr)
public NodeInfo getParent()
getParent
in interface NodeInfo
getParent
in class TinyNodeImpl
protected long getSequenceNumber()
getSequenceNumber
in class TinyNodeImpl
public final short getNodeType()
getNodeType
in interface NodeInfo
getNodeType
in interface Node
public String getStringValue()
getStringValue
in interface NodeInfo
public int getFingerprint()
getFingerprint
in interface NodeInfo
getFingerprint
in class TinyNodeImpl
public int getNameCode()
getNameCode
in interface NodeInfo
getNameCode
in class TinyNodeImpl
allocate
,
getFingerprint
public String getPrefix()
public String getDisplayName()
getDisplayName
in interface NodeInfo
getDisplayName
in class TinyNodeImpl
public String getLocalName()
getLocalName
in interface NodeInfo
getLocalName
in interface Node
getLocalName
in class TinyNodeImpl
public final String getURI()
getURI
in interface NodeInfo
getURI
in class TinyNodeImpl
public String generateId()
generateId
in interface NodeInfo
generateId
in class TinyNodeImpl
public void copy(Outputter out) throws TransformerException
copy
in interface NodeInfo
TransformerException
public int getLineNumber()
getLineNumber
in interface NodeInfo
getLineNumber
in interface SourceLocator
getLineNumber
in class TinyNodeImpl
public TypeInfo getSchemaTypeInfo()
Document.normalizeDocument()
, schemaTypeInfo
may not be reliable if the node was moved.getSchemaTypeInfo
in interface Attr
getSchemaTypeInfo
in class AbstractNode
public boolean isId()
ownerElement
of this attribute
can be retrieved using the method Document.getElementById
. The implementation could use several ways to determine if an
attribute node is known to contain an identifier:
Document.normalizeDocument()
, the post-schema-validation
infoset contributions (PSVI contributions) values are used to
determine if this attribute is a schema-determined ID attribute using
the
schema-determined ID definition in [XPointer]
.
Document.normalizeDocument()
, the infoset [type definition] value is used to determine if this attribute is a DTD-determined ID
attribute using the
DTD-determined ID definition in [XPointer]
.
Element.setIdAttribute()
,
Element.setIdAttributeNS()
, or
Element.setIdAttributeNode()
, i.e. it is an
user-determined ID attribute;
Note: XPointer framework (see section 3.2 in [XPointer] ) consider the DOM user-determined ID attribute as being part of the XPointer externally-determined ID definition.
Document.normalizeDocument()
, all user-determined ID
attributes are reset and all attribute nodes ID information are then
reevaluated in accordance to the schema used. As a consequence, if
the Attr.schemaTypeInfo
attribute contains an ID type,
isId
will always return true.isId
in interface Attr
isId
in class AbstractNode