|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.icl.saxon.om.AbstractNode
com.icl.saxon.tinytree.TinyNodeImpl
com.icl.saxon.tinytree.TinyParentNodeImpl
com.icl.saxon.tinytree.TinyElementImpl
final class TinyElementImpl
A node in the XML parse tree representing an XML element.
This class is an implementation of NodeInfo and also implements the DOM Element interface
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 | |
---|---|
TinyElementImpl(TinyDocumentImpl doc,
int nodeNr)
Constructor |
Method Summary | |
---|---|
void |
copy(Outputter out)
Copy this node to a given outputter (supporting xsl:copy-of) |
void |
copy(Outputter out,
boolean allNamespaces)
Copy this node to a given outputter |
String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
String |
getAttributeValue(String uri,
String localName)
Find the value of a given attribute of this node. |
String |
getBaseURI()
Get the base URI of this element node. |
short |
getNodeType()
Return the type of node. |
boolean |
hasAttributes()
Returns whether this node (if it is an element) has any attributes. |
TinyAttributeImpl |
makeAttributeNode(int index)
Make an attribute node for a given attribute of this element |
void |
outputNamespaceNodes(Outputter out,
boolean includeAncestors)
Output all namespace nodes associated with this element. |
void |
setAttribute(String name,
String value)
Set the value of an attribute on the current element. |
Methods inherited from class com.icl.saxon.tinytree.TinyParentNodeImpl |
---|
copyStringValue, getStringValue, hasChildNodes |
Methods inherited from class com.icl.saxon.tinytree.TinyNodeImpl |
---|
compareOrder, generateId, getDisplayName, getDocumentRoot, getEnumeration, getFingerprint, getLineNumber, getLocalName, getNameCode, getOriginatingNode, getParent, getPrefix, getSequenceNumber, getSystemId, getURI, isSameNodeInfo, setLineNumber, setParentNode, setSystemId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Element |
---|
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Constructor Detail |
---|
public TinyElementImpl(TinyDocumentImpl doc, int nodeNr)
Method Detail |
---|
public final short getNodeType()
getNodeType
in interface NodeInfo
getNodeType
in interface Node
public String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in interface Node
getBaseURI
in class TinyNodeImpl
public void outputNamespaceNodes(Outputter out, boolean includeAncestors) throws TransformerException
outputNamespaceNodes
in interface NodeInfo
outputNamespaceNodes
in class TinyNodeImpl
out
- The relevant outputterincludeAncestors
- True if namespaces associated with ancestor
elements must also be output; false if these are already known to be
on the result tree.
TransformerException
public boolean hasAttributes()
hasAttributes
in interface Node
hasAttributes
in class TinyNodeImpl
true
if this node has any attributes,
false
otherwise.public String getAttributeValue(String uri, String localName)
getAttributeValue
in interface NodeInfo
getAttributeValue
in class TinyNodeImpl
uri
- the namespace uri of an attributelocalName
- the local name of an attribute
public String getAttributeValue(int fingerprint)
getAttributeValue
in interface NodeInfo
getAttributeValue
in class TinyNodeImpl
fingerprint
- The fingerprint of the attribute name
public TinyAttributeImpl makeAttributeNode(int index)
index
- The relative position of the attribute, counting from zero. This
is trusted to be in range.public void setAttribute(String name, String value) throws DOMException
setAttribute
in interface Element
name
- The name of the attribute to be set. Any prefix is interpreted relative
to the namespaces defined for this element.value
- The new value of the attribute. Set this to null to remove the attribute.
DOMException
public void copy(Outputter out) throws TransformerException
copy
in interface NodeInfo
TransformerException
public void copy(Outputter out, boolean allNamespaces) throws TransformerException
allNamespaces
- true if all namespace nodes must be copied; false
if namespace nodes for the parent element are already on the result tree
TransformerException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |