com.icl.saxon.tinytree
Class TinyElementImpl
- DOMLocator, Element, Node, NodeInfo, Source, SourceLocator
(package private) final class TinyElementImpl
implements Element
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
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(String uri, String localName) - Find the value of a given attribute of this node.
|
String | getAttributeValue(int fingerprint) - Get 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.
|
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 |
appendChild , appendData , cloneNode , compareDocumentPosition , compareOrder , copyStringValue , createAttribute , createAttributeNS , createCDATASection , createComment , createDocumentFragment , createElement , createElementNS , createEntityReference , createProcessingInstruction , createTextNode , deleteData , disallowUpdate , generateId , getAttribute , getAttributeNS , getAttributeNode , getAttributeNodeNS , getAttributeValue , getAttributeValue , getAttributes , getBaseURI , getChildNodes , getColumnNumber , getData , getDisplayName , getDoctype , getDocumentElement , getDocumentRoot , getElementById , getElementsByTagName , getElementsByTagNameNS , getEnumeration , getFeature , getFingerprint , getFirstChild , getImplementation , getLastChild , getLength , getLineNumber , getLocalName , getName , getNameCode , getNamespaceURI , getNextSibling , getNodeName , getNodeValue , getOriginatingNode , getOwnerDocument , getOwnerElement , getParent , getParentNode , getPrefix , getPreviousSibling , getPublicId , getSchemaTypeInfo , getSpecified , getSystemId , getTagName , getTextContent , getURI , getUserData , getValue , getWholeText , hasAttribute , hasAttributeNS , hasAttributes , hasChildNodes , importNode , insertBefore , insertData , isDefaultNamespace , isElementContentWhitespace , isEqualNode , isId , isSameNode , isSameNodeInfo , isSupported , lookupNamespaceURI , lookupPrefix , normalize , outputNamespaceNodes , removeAttribute , removeAttributeNS , removeAttributeNode , removeChild , replaceChild , replaceData , replaceWholeText , setAttributeNS , setAttributeNode , setAttributeNodeNS , setData , setIdAttribute , setIdAttributeNS , setIdAttributeNode , setNodeValue , setPrefix , setTextContent , setUserData , setValue , splitText , substringData , supports |
TinyElementImpl
public TinyElementImpl(TinyDocumentImpl doc,
int nodeNr)
Constructor
copy
public void copy(Outputter out)
throws TransformerException
Copy this node to a given outputter (supporting xsl:copy-of)
- copy in interface NodeInfo
copy
public void copy(Outputter out,
boolean allNamespaces)
throws TransformerException
Copy this node to a given outputter
allNamespaces
- true if all namespace nodes must be copied; false
if namespace nodes for the parent element are already on the result tree
getAttributeValue
public String getAttributeValue(String uri,
String localName)
Find the value of a given attribute of this node.
This method is defined on all nodes to meet XSL requirements, but for nodes
other than elements it will always return null.
- getAttributeValue in interface NodeInfo
- getAttributeValue in interface TinyNodeImpl
uri
- the namespace uri of an attributelocalName
- the local name of an attribute
- the value of the attribute, if it exists, otherwise null
getAttributeValue
public String getAttributeValue(int fingerprint)
Get the value of a given attribute of this node
- getAttributeValue in interface NodeInfo
- getAttributeValue in interface TinyNodeImpl
fingerprint
- The fingerprint of the attribute name
- the attribute value if it exists or null if not
getBaseURI
public String getBaseURI()
Get the base URI of this element node. This will be the same as the System ID unless
xml:base has been used.
- getBaseURI in interface NodeInfo
- getBaseURI in interface TinyNodeImpl
getNodeType
public final short getNodeType()
Return the type of node.
- getNodeType in interface NodeInfo
hasAttributes
public boolean hasAttributes()
Returns whether this node (if it is an element) has any attributes.
- hasAttributes in interface TinyNodeImpl
true
if this node has any attributes,
false
otherwise.
makeAttributeNode
public TinyAttributeImpl makeAttributeNode(int index)
Make an attribute node for a given attribute of this element
index
- The relative position of the attribute, counting from zero. This
is trusted to be in range.
outputNamespaceNodes
public void outputNamespaceNodes(Outputter out,
boolean includeAncestors)
throws TransformerException
Output all namespace nodes associated with this element.
- outputNamespaceNodes in interface NodeInfo
- outputNamespaceNodes in interface 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.
setAttribute
public void setAttribute(String name,
String value)
throws DOMException
Set the value of an attribute on the current element. This affects subsequent calls
of getAttribute() for that 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.