Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
com.icl.saxon.om.AbstractNode
com.icl.saxon.tinytree.TinyNodeImpl
com.icl.saxon.tinytree.TinyAttributeImpl
Field Summary |
Fields inherited from class com.icl.saxon.tinytree.TinyNodeImpl | |
document , nodeNr , parent |
Fields inherited from class com.icl.saxon.om.AbstractNode | |
NODE_LETTER |
Fields inherited from interface com.icl.saxon.om.NodeInfo | |
ATTRIBUTE , COMMENT , ELEMENT , NAMESPACE , NODE , NONE , NUMBER_OF_TYPES , PI , ROOT , TEXT |
Constructor Summary | |
|
Method Summary | |
void | |
String |
|
String |
|
int |
|
int |
|
String |
|
int |
|
short |
|
NodeInfo |
|
String |
|
org.w3c.dom.TypeInfo |
|
protected long |
|
String |
|
String |
|
boolean |
|
Methods inherited from class com.icl.saxon.tinytree.TinyNodeImpl | |
compareOrder , generateId , getAttributeValue , getAttributeValue , getBaseURI , getDisplayName , getDocumentRoot , getEnumeration , getFingerprint , getLineNumber , getLocalName , getNameCode , getOriginatingNode , getParent , getPrefix , getSequenceNumber , getSystemId , getURI , hasAttributes , hasChildNodes , isSameNodeInfo , outputNamespaceNodes , setLineNumber , setParentNode , setSystemId |
public String generateId()
Generate id. Returns key of owning element with the attribute name as a suffix
- Specified by:
- generateId in interface NodeInfo
- Overrides:
- generateId in interface TinyNodeImpl
public String getDisplayName()
Get the display name of this node. For elements and attributes this is [prefix:]localname. For unnamed nodes, it is an empty string.
- Specified by:
- getDisplayName in interface NodeInfo
- Overrides:
- getDisplayName in interface TinyNodeImpl
- Returns:
- The display name of this node. For a node with no name, return an empty string.
public int getFingerprint()
Get the fingerprint of the node, used for matching names
- Specified by:
- getFingerprint in interface NodeInfo
- Overrides:
- getFingerprint in interface TinyNodeImpl
public int getLineNumber()
Get the line number of the node within its source document entity
- Specified by:
- getLineNumber in interface NodeInfo
- Overrides:
- getLineNumber in interface TinyNodeImpl
public String getLocalName()
Get the local name of this node.
- Specified by:
- getLocalName in interface NodeInfo
- Overrides:
- getLocalName in interface TinyNodeImpl
- Returns:
- The local name of this node. For a node with no name, return an empty string.
public int getNameCode()
Get the name code of the node, used for finding names in the name pool
- Specified by:
- getNameCode in interface NodeInfo
- Overrides:
- getNameCode in interface TinyNodeImpl
public final short getNodeType()
Return the type of node.
- Specified by:
- getNodeType in interface NodeInfo
- Returns:
- Node.ATTRIBUTE
public NodeInfo getParent()
Get the parent node
- Overrides:
- getParent in interface TinyNodeImpl
public String getPrefix()
Get the prefix part of the name of this node. This is the name before the ":" if any.
- Overrides:
- getPrefix in interface TinyNodeImpl
- Returns:
- the prefix part of the name. For an unnamed node, return null.
public org.w3c.dom.TypeInfo getSchemaTypeInfo()
The type information associated with this attribute. While the type information contained in this attribute is guarantee to be correct after loading the document or invokingDocument.normalizeDocument()
,schemaTypeInfo
may not be reliable if the node was moved.
- Overrides:
- getSchemaTypeInfo in interface AbstractNode
- Since:
- DOM Level 3
protected long getSequenceNumber()
Get the node sequence number (in document order). Sequence numbers are monotonic but not consecutive. In the current implementation, parent nodes (elements and roots) have a zero least-significant word, while namespaces, attributes, text nodes, comments, and PIs have the top word the same as their owner and the bottom half reflecting their relative position.
- Overrides:
- getSequenceNumber in interface TinyNodeImpl
public String getStringValue()
Return the character value of the node.
- Specified by:
- getStringValue in interface NodeInfo
- Returns:
- the attribute value
public final String getURI()
Get the URI part of the name of this node.
- Overrides:
- getURI in interface TinyNodeImpl
- Returns:
- The URI of the namespace of this node. For the default namespace, return an empty string
public boolean isId()
Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not. When it is and its value is unique, theownerElement
of this attribute can be retrieved using the methodDocument.getElementById
. The implementation could use several ways to determine if an attribute node is known to contain an identifier:
- If validation occurred using an XML Schema [XML Schema Part 1] while loading the document or while invoking
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] .- If validation occurred using a DTD while loading the document or while invoking
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] .- from the use of the methods
Element.setIdAttribute()
,Element.setIdAttributeNS()
, orElement.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.- using mechanisms that are outside the scope of this specification, it is then an externally-determined ID attribute. This includes using schema languages different from XML schema and DTD.
If validation occurred while invokingDocument.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 theAttr.schemaTypeInfo
attribute contains an ID type,isId
will always return true.
- Overrides:
- isId in interface AbstractNode
- Since:
- DOM Level 3