|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.tinytree.TinyNodeImpl
net.sf.saxon.tinytree.TinyAttributeImpl
final class TinyAttributeImpl
A node in the XML parse tree representing an attribute. Note that this is generated only "on demand", when the attribute is selected by a select pattern.
| Field Summary |
|---|
| Fields inherited from class net.sf.saxon.tinytree.TinyNodeImpl |
|---|
NODE_LETTER, nodeNr, parent, tree |
| Fields inherited from interface net.sf.saxon.om.NodeInfo |
|---|
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES |
| Fields inherited from interface net.sf.saxon.om.ValueRepresentation |
|---|
EMPTY_VALUE_ARRAY |
| Constructor Summary | |
|---|---|
TinyAttributeImpl(TinyTree tree,
int nodeNr)
|
|
| Method Summary | |
|---|---|
Value |
atomize()
Get the typed value. |
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
Copy this node to a given outputter |
void |
generateId(FastStringBuffer buffer)
Generate id. |
int |
getColumnNumber()
Get the column number of the node within its source document entity |
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 |
getLocalPart()
Get the local name of this node. |
int |
getNameCode()
Get the name code of the node, used for finding names in the name pool |
int |
getNodeKind()
Return the type of node. |
NodeInfo |
getParent()
Get the parent node |
String |
getPrefix()
Get the prefix part of the name of this node. |
NodeInfo |
getRoot()
Get the root node of the tree (not necessarily a document node) |
protected long |
getSequenceNumber()
Get the node sequence number (in document order). |
String |
getStringValue()
Return the string value of the node. |
CharSequence |
getStringValueCS()
Return the string value of the node. |
int |
getTypeAnnotation()
Get the type annotation of this node, if any The bit NodeInfo.IS_DTD_TYPE (1<<30) will be set in the case of an attribute node if the type annotation
is one of ID, IDREF, or IDREFS and this is derived from DTD rather than schema validation. |
SequenceIterator |
getTypedValue()
Get the typed value of the item. |
String |
getURI()
Get the URI part of the name of this node. |
boolean |
isId()
Determine whether this node has the is-id property |
boolean |
isIdref()
Determine whether this node has the is-idref property |
boolean |
isNilled()
Determine whether the node has the is-nilled property |
void |
setSystemId(String uri)
Set the system id of this node. |
| Methods inherited from class net.sf.saxon.tinytree.TinyNodeImpl |
|---|
compareOrder, equals, getAttributeValue, getBaseURI, getConfiguration, getDeclaredNamespaces, getDocumentNumber, getDocumentRoot, getNamePool, getNodeNumber, getParentNodeNr, getPublicId, getSystemId, getTree, hasChildNodes, hashCode, isAncestorOrSelf, isSameNodeInfo, iterateAxis, iterateAxis, setParentNode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TinyAttributeImpl(TinyTree tree,
int nodeNr)
| Method Detail |
|---|
public void setSystemId(String uri)
TinyNodeImpl
setSystemId in interface SourcesetSystemId in class TinyNodeImplpublic NodeInfo getParent()
getParent in interface NodeInfogetParent in class TinyNodeImplpublic NodeInfo getRoot()
getRoot in interface NodeInfogetRoot in class TinyNodeImplprotected long getSequenceNumber()
getSequenceNumber in class TinyNodeImplpublic final int getNodeKind()
Typepublic CharSequence getStringValueCS()
getStringValueCS in interface ItemgetStringValueCS in interface ValueRepresentationgetStringValueCS in class TinyNodeImplItem.getStringValue()public String getStringValue()
Item.getStringValueCS()public int getFingerprint()
getFingerprint in interface NodeInfogetFingerprint in class TinyNodeImplpublic int getNameCode()
getNameCode in interface NodeInfogetNameCode in class TinyNodeImplallocate,
getFingerprintpublic String getPrefix()
getPrefix in interface NodeInfogetPrefix in class TinyNodeImplpublic String getDisplayName()
getDisplayName in interface NodeInfogetDisplayName in class TinyNodeImplpublic String getLocalPart()
getLocalPart in interface NodeInfogetLocalPart in class TinyNodeImplpublic final String getURI()
getURI in interface NodeInfogetURI in class TinyNodeImplpublic int getTypeAnnotation()
NodeInfo.IS_DTD_TYPE (1<<30) will be set in the case of an attribute node if the type annotation
is one of ID, IDREF, or IDREFS and this is derived from DTD rather than schema validation.
Returns UNTYPED_ATOMIC if there is no type annotation
getTypeAnnotation in interface NodeInfogetTypeAnnotation in class TinyNodeImplFor elements and attributes, this is the type annotation as defined in XDM. For document nodes, it should be one of XS_UNTYPED if the document has not been validated, or XS_ANY_TYPE if validation has taken place (that is, if any node in the document has an annotation other than Untyped or UntypedAtomic).
public Value atomize()
throws XPathException
Item.getTypedValue(). However, this method is often more convenient and may be
more efficient, especially in the common case where the value is expected to be a singleton.
XPathException
public SequenceIterator getTypedValue()
throws XPathException
XPathException - where no typed value is available, for example in the case of
an element with complex contentpublic void generateId(FastStringBuffer buffer)
generateId in interface NodeInfogenerateId in class TinyNodeImplbuffer - Buffer to contain the generated ID value
public void copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
throws XPathException
out - the Receiver to which the node should be copied. It is the caller's
responsibility to ensure that this Receiver is open before the method is called
(or that it is self-opening), and that it is closed after use.whichNamespaces - in the case of an element, controls
which namespace nodes should be copied. Values are NodeInfo.NO_NAMESPACES,
NodeInfo.LOCAL_NAMESPACES, NodeInfo.ALL_NAMESPACEScopyAnnotations - indicates whether the type annotations
of element and attribute nodes should be copiedlocationId - If non-zero, identifies the location of the instruction
that requested this copy. If zero, indicates that the location information
for the original node is to be copied; in this case the Receiver must be
a LocationCopier
XPathExceptionpublic int getLineNumber()
getLineNumber in interface SourceLocatorgetLineNumber in interface NodeInfogetLineNumber in class TinyNodeImplpublic int getColumnNumber()
getColumnNumber in interface SourceLocatorgetColumnNumber in interface NodeInfogetColumnNumber in class TinyNodeImplpublic boolean isNilled()
isNilled in interface NodeInfoisNilled in class TinyNodeImplpublic boolean isId()
isId in interface NodeInfoisId in class TinyNodeImplpublic boolean isIdref()
isIdref in interface NodeInfoisIdref in class TinyNodeImpl
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||