|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.icl.saxon.tinytree.TinyNodeImpl | +--com.icl.saxon.tinytree.TinyParentNodeImpl | +--com.icl.saxon.tinytree.TinyDocumentImpl
A node in the XML parse tree representing the Document itself (or equivalently, the root node of the Document).
Field Summary | |
int[] |
attCode
|
int[] |
attParent
|
java.lang.String[] |
attValue
|
java.lang.StringBuffer |
charBuffer
|
java.lang.StringBuffer |
commentBuffer
|
short[] |
depth
|
protected TinyDocumentImpl |
document
|
int |
lastLevelOneNode
|
int[] |
length
|
int[] |
nameCode
|
int[] |
namespaceCode
|
int[] |
namespaceParent
|
int[] |
next
|
protected int |
nodeNr
|
byte[] |
nodeType
|
int |
numberOfAttributes
|
int |
numberOfNamespaces
|
int |
numberOfNodes
|
int[] |
offset
|
protected com.icl.saxon.tinytree.TinyNodeImpl |
parent
|
Fields inherited from interface com.icl.saxon.om.NodeInfo |
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NODE_TYPE_NAMES, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
TinyDocumentImpl(int docNr)
|
Method Summary | |
protected void |
addAttribute(int parent0,
int code0,
java.lang.String type0,
java.lang.String value0)
|
protected void |
addNamespace(int parent0,
int nscode0)
|
protected void |
addNode(short type0,
int depth0,
int offset0,
int length0,
int nameCode0)
|
void |
allocateSequenceNumbers(Sequencer seq)
Allocate global sequence numbers to the nodes. |
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild)
Adds the node newChild to the end of the list of children
of this node. |
org.w3c.dom.Node |
cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. |
void |
copy(Outputter out)
Copy this node to a given outputter |
void |
copyStringValue(Outputter out)
Copy the string-value of this node to a given outputter |
org.w3c.dom.Attr |
createAttribute(java.lang.String name)
Creates an Attr of the given name. |
org.w3c.dom.Attr |
createAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Creates an attribute of the given qualified name and namespace URI. |
org.w3c.dom.CDATASection |
createCDATASection(java.lang.String data)
Creates a CDATASection node whose value is the specified
string. |
org.w3c.dom.Comment |
createComment(java.lang.String data)
Creates a Comment node given the specified string. |
org.w3c.dom.Document |
createDocument(java.lang.String namespaceURI,
java.lang.String qualifiedName,
org.w3c.dom.DocumentType doctype)
Creates an XML Document object of the specified type with
its document element. |
org.w3c.dom.DocumentFragment |
createDocumentFragment()
Creates an empty DocumentFragment object. |
org.w3c.dom.DocumentType |
createDocumentType(java.lang.String qualifiedName,
java.lang.String publicId,
java.lang.String systemId)
Creates an empty DocumentType node. |
org.w3c.dom.Element |
createElement(java.lang.String tagName)
Creates an element of the type specified. |
org.w3c.dom.Element |
createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Creates an element of the given qualified name and namespace URI. |
org.w3c.dom.EntityReference |
createEntityReference(java.lang.String name)
Creates an EntityReference object. |
org.w3c.dom.ProcessingInstruction |
createProcessingInstruction(java.lang.String target,
java.lang.String data)
Creates a ProcessingInstruction node given the specified
name and data strings. |
org.w3c.dom.Text |
createTextNode(java.lang.String data)
Creates a Text node given the specified string. |
void |
defaultAction(Context c)
Perform default action for this kind of node (built-in template rule) |
void |
diagnosticDump()
Produce diagnostic print of main tree arrays |
protected void |
disallowUpdate()
Internal method used to indicate that update operations are not allowed |
protected void |
ensureAttributeCapacity()
|
protected void |
ensureNamespaceCapacity()
|
protected void |
ensureNodeCapacity()
|
NodeEnumeration |
enumerateChildren()
Get an enumeration of the children of this node |
NodeInfo[] |
getAllChildNodes()
Get all child nodes of the element (child elements and character nodes). |
NodeSetValue |
getAllElements(int fingerprint)
Get a list of all elements with a given name |
ElementInfo |
getAncestor(NodeTest test)
Get the nearest ancestor element with a given name |
protected com.icl.saxon.tinytree.TinyAttributeImpl |
getAttributeNode(int nr)
Make a (transient) attribute node from the array of attributes |
org.w3c.dom.NamedNodeMap |
getAttributes()
Return a NamedNodeMap containing the attributes of this node (if
it is an Element ) or null otherwise. |
java.lang.String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
java.lang.String |
getAttributeValue(java.lang.String name)
Find the value of a given attribute of this node. |
java.lang.String |
getAttributeValue(java.lang.String uri,
java.lang.String localName)
Find the value of a given attribute of this node. |
protected java.lang.String |
getBaseURI(int seq)
Get the system id of an element in the document |
org.w3c.dom.NodeList |
getChildNodes()
Return a NodeList that contains all children of this node. |
java.lang.String |
getDisplayName()
Get the display name of this node. |
org.w3c.dom.DocumentType |
getDoctype()
The Document Type Declaration (see DocumentType )
associated with this document. |
org.w3c.dom.Element |
getDocumentElement()
Get the root (outermost) element. |
int |
getDocumentNumber()
Get a unique number identifying this document |
DocumentInfo |
getDocumentRoot()
Get the root (document) node |
org.w3c.dom.Element |
getElementById(java.lang.String elementId)
Returns the Element whose ID is given by
elementId . |
org.w3c.dom.NodeList |
getElementsByTagName(java.lang.String tagname)
Returns a NodeList of all the Elements with
a given tag name in the order in which they are encountered in a
preorder traversal of the Document tree. |
org.w3c.dom.NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
Returns a NodeList of all the Elements with
a given local name and namespace URI in the order in which they are
encountered in a preorder traversal of the Document tree. |
PreparedStyleSheet |
getEmbeddedStylesheet(java.lang.String id)
Prepare an embedded stylesheet within this document |
int |
getFingerprint()
Get the fingerprint of the node, used for matching names |
org.w3c.dom.Node |
getFirstChild()
Get the first child node of the element |
org.w3c.dom.DOMImplementation |
getImplementation()
The DOMImplementation object that handles this document. |
int |
getIndex()
Get the index of this node, i.e. |
java.util.Hashtable |
getKeyIndex(KeyManager keymanager,
int fingerprint)
Get the index for a given key |
org.w3c.dom.Node |
getLastChild()
Get the last child node of the element |
int |
getLineNumber()
Get the line number of this root node. |
protected int |
getLineNumber(int sequence)
Get the line number for an element. |
java.lang.String |
getLocalName()
Get the local name of this node. |
int |
getNameCode()
Get the name code of the node, used for matching names |
NamePool |
getNamePool()
Get the name pool used for the names in this document |
protected TinyNamespaceImpl |
getNamespaceNode(int nr)
Make a (transient) namespace node from the array of namespace declarations |
java.lang.String |
getNamespaceURI()
The namespace URI of this node, or null if it is
unspecified. |
NodeInfo |
getNextInDocument(NodeInfo anchor)
Get the next node in document order |
org.w3c.dom.Node |
getNextSibling()
Get next sibling - always null |
com.icl.saxon.tinytree.TinyNodeImpl |
getNode(int nr)
|
java.lang.String |
getNodeName()
Get the name of this node, following the DOM rules |
int |
getNodeNumber()
Get node number. |
int |
getNodeNumber(Pattern pattern)
Get node number (level="single"). |
int |
getNodeNumberAny(Pattern pattern)
Get node number (level="any"). |
short |
getNodeType()
Return the type of node. |
java.lang.String |
getNodeValue()
Get the node value as defined in the DOM. |
int |
getNumberOfChildren()
Get the number of children. |
org.w3c.dom.Document |
getOwnerDocument()
Return the Document object associated with this node. |
org.w3c.dom.Node |
getParentNode()
Find the parent node of this node. |
java.lang.String |
getPath()
Generate a path to this node |
java.lang.String |
getPrefix()
Get the prefix part of the name of this node. |
NodeInfo |
getPreviousInDocument()
Get the previous node in document order |
org.w3c.dom.Node |
getPreviousSibling()
Get previous sibling - always null |
java.lang.String |
getPublicId()
Get the public identifier of the document entity containing this node. |
long |
getSequenceNumber()
Get the node sequence number (in document order). |
java.lang.String |
getSequentialKey()
Get a character string that uniquely identifies this node |
java.lang.String |
getSystemId()
Get the system id of this node |
java.lang.String |
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given name |
java.lang.String |
getURI()
Get the URI part of the name of this node. |
short |
getURICode()
Get URI code. |
java.lang.String |
getValue()
Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes. |
boolean |
hasAttributes()
Returns whether this node (if it is an element) has any attributes. |
boolean |
hasChildNodes()
Determine whether the node has any children. |
boolean |
hasFeature(java.lang.String feature,
java.lang.String version)
Test if the DOM implementation implements a specific feature. |
org.w3c.dom.Node |
importNode(org.w3c.dom.Node importedNode,
boolean deep)
Imports a node from another document to this document. |
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
Insert the node newChild before the existing child node
refChild . |
boolean |
isDocumentElement()
Determine whether this node is the outermost element. |
boolean |
isSameNode(NodeInfo other)
Determine whether this is the same node as another node |
boolean |
isSupported(java.lang.String feature,
java.lang.String version)
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node. |
protected boolean |
isUsingNamespaces()
determine whether this document uses namespaces |
void |
normalize()
Puts all Text nodes in the full depth of the sub-tree
underneath this Node , including attribute nodes, into a
"normal" form where only structure (e.g., elements, comments,
processing instructions, CDATA sections, and entity references)
separates Text nodes, i.e., there are neither adjacent
Text nodes nor empty Text nodes. |
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node oldChild)
Remove the child node indicated by oldChild from the
list of children, and returns it. |
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
Replace the child node oldChild with
newChild in the list of children, and returns the
oldChild node. |
ElementInfo |
selectID(java.lang.String id)
Get the element with a given ID. |
protected void |
setBaseURI(int seq,
java.lang.String uri)
Set the system id of an element in the document |
protected void |
setDocumentElement(ElementInfo e)
Set the top-level element of the document (variously called the root element or the document element). |
void |
setKeyIndex(KeyManager keymanager,
int fingerprint,
java.lang.Object keyindex)
Set the index for a given key. |
void |
setLineNumber(int line)
Set the line number of the node within its source document entity |
protected void |
setLineNumber(int sequence,
int line)
Set the line number for an element. |
void |
setLineNumbering()
Set line numbering on |
void |
setNamePool(NamePool pool)
Set the name pool used for all names in this document |
void |
setNodeValue(java.lang.String nodeValue)
Set the node value. |
protected void |
setParentNode(com.icl.saxon.tinytree.TinyNodeImpl parent)
Set the parent of this node |
void |
setPrefix(java.lang.String prefix)
Set the namespace prefix of this node. |
protected void |
setSystemId(java.lang.String uri)
Set the system id of this node |
protected void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri)
Set an unparsed entity URI associated with this document. |
java.lang.String |
toString()
Diagnostic string representation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.icl.saxon.om.NodeInfo |
copyStringValue, defaultAction, enumerateChildren, getAllChildNodes, getAttributeValue, getAttributeValue, getAttributeValue, getDisplayName, getFingerprint, getIndex, getLocalName, getNameCode, getNextInDocument, getNumberOfChildren, getPrefix, getPreviousInDocument, getURI, getURICode, getValue, isDocumentElement, isSameNode |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNamespaceURI, getNodeValue, getOwnerDocument, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Field Detail |
public java.lang.StringBuffer charBuffer
public java.lang.StringBuffer commentBuffer
public int numberOfNodes
public int lastLevelOneNode
public byte[] nodeType
public short[] depth
public int[] next
public int[] offset
public int[] length
public int[] nameCode
public int numberOfAttributes
public int[] attParent
public int[] attCode
public java.lang.String[] attValue
public int numberOfNamespaces
public int[] namespaceParent
public int[] namespaceCode
protected TinyDocumentImpl document
protected int nodeNr
protected com.icl.saxon.tinytree.TinyNodeImpl parent
Constructor Detail |
public TinyDocumentImpl(int docNr)
Method Detail |
public void setNamePool(NamePool pool)
setNamePool
in interface DocumentInfo
public NamePool getNamePool()
getNamePool
in interface DocumentInfo
protected void ensureNodeCapacity()
protected void ensureAttributeCapacity()
protected void ensureNamespaceCapacity()
protected void addNode(short type0, int depth0, int offset0, int length0, int nameCode0)
protected void addAttribute(int parent0, int code0, java.lang.String type0, java.lang.String value0)
protected void addNamespace(int parent0, int nscode0)
public com.icl.saxon.tinytree.TinyNodeImpl getNode(int nr)
public void allocateSequenceNumbers(Sequencer seq)
public long getSequenceNumber()
getSequenceNumber
in interface NodeInfo
getSequenceNumber
in class com.icl.saxon.tinytree.TinyNodeImpl
protected com.icl.saxon.tinytree.TinyAttributeImpl getAttributeNode(int nr)
protected boolean isUsingNamespaces()
protected TinyNamespaceImpl getNamespaceNode(int nr)
protected void setDocumentElement(ElementInfo e)
e
- the top-level elementprotected void setSystemId(java.lang.String uri)
public java.lang.String getSystemId()
getSystemId
in interface NodeInfo
getSystemId
in class com.icl.saxon.tinytree.TinyNodeImpl
com.icl.saxon.om.NodeInfo
protected void setBaseURI(int seq, java.lang.String uri)
protected java.lang.String getBaseURI(int seq)
public void setLineNumbering()
protected void setLineNumber(int sequence, int line)
protected int getLineNumber(int sequence)
public int getLineNumber()
getLineNumber
in interface NodeInfo
getLineNumber
in class com.icl.saxon.tinytree.TinyNodeImpl
public final short getNodeType()
getNodeType
in interface NodeInfo
public final java.lang.String getNodeName()
getNodeName
in interface NodeInfo
getNodeName
in class com.icl.saxon.tinytree.TinyNodeImpl
public final org.w3c.dom.Node getNextSibling()
getNextSibling
in interface org.w3c.dom.Node
getNextSibling
in class com.icl.saxon.tinytree.TinyNodeImpl
public final org.w3c.dom.Node getPreviousSibling()
getPreviousSibling
in interface org.w3c.dom.Node
getPreviousSibling
in class com.icl.saxon.tinytree.TinyNodeImpl
public org.w3c.dom.Node getParentNode()
getParentNode
in interface org.w3c.dom.Node
getParentNode
in class com.icl.saxon.tinytree.TinyNodeImpl
public org.w3c.dom.Element getDocumentElement()
getDocumentElement
in interface NodeInfo
getDocumentElement
in class com.icl.saxon.tinytree.TinyNodeImpl
public DocumentInfo getDocumentRoot()
getDocumentRoot
in interface NodeInfo
getDocumentRoot
in class com.icl.saxon.tinytree.TinyNodeImpl
public int getNodeNumber(Pattern pattern)
public int getNodeNumber()
public int getNodeNumberAny(Pattern pattern)
pattern
- a Pattern that identifies which nodes should be counted (ignored)public java.lang.String getSequentialKey()
getSequentialKey
in interface NodeInfo
getSequentialKey
in class com.icl.saxon.tinytree.TinyNodeImpl
public int getDocumentNumber()
getDocumentNumber
in interface DocumentInfo
public NodeSetValue getAllElements(int fingerprint)
getAllElements
in interface DocumentInfo
com.icl.saxon.om.DocumentInfo
fingerprint
- The fingerprint of the required namepublic ElementInfo selectID(java.lang.String id)
selectID
in interface DocumentInfo
id
- The unique ID of the required element, previously registered using registerID()public java.util.Hashtable getKeyIndex(KeyManager keymanager, int fingerprint) throws org.xml.sax.SAXException
getKeyIndex
in interface DocumentInfo
keymanager
- The key manager managing this keySAXExcetpion
- If the index is under construction, throws an
exception, as this implies a key defined in terms of itself.public void setKeyIndex(KeyManager keymanager, int fingerprint, java.lang.Object keyindex) throws org.xml.sax.SAXException
setKeyIndex
in interface DocumentInfo
keymanager
- The key manager managing this keyfingerprint
- The fingerprint of the name of the key (unique with the key manager)keyindex
- the index, in the form of a Hashtable that
maps the key value to a Vector of nodes having that key value. Or the String
"under construction", indicating that the index is being built.protected void setUnparsedEntity(java.lang.String name, java.lang.String uri)
public java.lang.String getUnparsedEntity(java.lang.String name)
getUnparsedEntity
in interface DocumentInfo
name
- the name of the entitypublic PreparedStyleSheet getEmbeddedStylesheet(java.lang.String id) throws org.xml.sax.SAXException
getEmbeddedStylesheet
in interface DocumentInfo
id
- The id of the required embedded stylesheetpublic void copy(Outputter out) throws org.xml.sax.SAXException
copy
in interface NodeInfo
public java.lang.String getPath()
getPath
in interface NodeInfo
public java.lang.String toString()
toString
in class com.icl.saxon.tinytree.TinyNodeImpl
public org.w3c.dom.DocumentType getDoctype()
DocumentType
)
associated with this document. For HTML documents as well as XML
documents without a document type declaration this returns
null
. The DOM Level 2 does not support editing the
Document Type Declaration, therefore docType
cannot be
altered in any way, including through the use of methods, such as
insertNode
or removeNode
, which are
inherited from the Node
interface.getDoctype
in interface org.w3c.dom.Document
public org.w3c.dom.DOMImplementation getImplementation()
DOMImplementation
object that handles this document.
A DOM application may use objects from multiple implementations.getImplementation
in interface org.w3c.dom.Document
public org.w3c.dom.Element createElement(java.lang.String tagName) throws org.w3c.dom.DOMException
Element
interface, so attributes
can be specified directly on the returned object.createElement
in interface org.w3c.dom.Document
public org.w3c.dom.DocumentFragment createDocumentFragment()
DocumentFragment
object.createDocumentFragment
in interface org.w3c.dom.Document
DocumentFragment
.public org.w3c.dom.Text createTextNode(java.lang.String data)
Text
node given the specified string.createTextNode
in interface org.w3c.dom.Document
data
- The data for the node.Text
object.public org.w3c.dom.Comment createComment(java.lang.String data)
Comment
node given the specified string.createComment
in interface org.w3c.dom.Document
data
- The data for the node.Comment
object.public org.w3c.dom.CDATASection createCDATASection(java.lang.String data) throws org.w3c.dom.DOMException
CDATASection
node whose value is the specified
string.createCDATASection
in interface org.w3c.dom.Document
data
- The data for the CDATASection
contents.CDATASection
object.org.w3c.dom.DOMException
- NOT_SUPPORTED_ERR: Raised if this document is an HTML document.public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data) throws org.w3c.dom.DOMException
ProcessingInstruction
node given the specified
name and data strings.createProcessingInstruction
in interface org.w3c.dom.Document
target
- The target part of the processing instruction.data
- The data for the node.ProcessingInstruction
object.org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified target contains an
illegal character.
public org.w3c.dom.Attr createAttribute(java.lang.String name) throws org.w3c.dom.DOMException
Attr
of the given name. Note that the
Attr
instance can then be set on an Element
using the setAttributeNode
method.
createAttributeNS
method.createAttribute
in interface org.w3c.dom.Document
name
- The name of the attribute.Attr
object with the nodeName
attribute set to name
, and localName
,
prefix
, and namespaceURI
set to
null
.org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.public org.w3c.dom.EntityReference createEntityReference(java.lang.String name) throws org.w3c.dom.DOMException
EntityReference
object. In addition, if the
referenced entity is known, the child list of the
EntityReference
node is made the same as that of the
corresponding Entity
node. If any descendant of the
Entity
node has an unbound namespace prefix , the
corresponding descendant of the created EntityReference
node is also unbound; (its namespaceURI
is
null
). The DOM Level 2 does not support any mechanism to
resolve namespace prefixes.createEntityReference
in interface org.w3c.dom.Document
name
- The name of the entity to reference.EntityReference
object.org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.
public org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagname)
NodeList
of all the Elements
with
a given tag name in the order in which they are encountered in a
preorder traversal of the Document
tree.getElementsByTagName
in interface org.w3c.dom.Document
tagname
- The name of the tag to match on. The special value "*"
matches all tags.NodeList
object containing all the matched
Elements
.public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode, boolean deep) throws org.w3c.dom.DOMException
importNode
in interface org.w3c.dom.Document
org.w3c.dom.DOMException
- NOT_SUPPORTED_ERR: Raised if the type of node being imported is not
supported.public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws org.w3c.dom.DOMException
createElementNS
in interface org.w3c.dom.Document
namespaceURI
- The namespace URI of the element to create.qualifiedName
- The qualified name of the element type to
instantiate.Element
object with the following
attributes: Attribute ValueNode.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted
from qualifiedName
, or null
if there is no
prefixNode.localName
local name , extracted from
qualifiedName
Element.tagName
qualifiedName
org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
qualifiedName
is
malformed, if the qualifiedName
has a prefix and the
namespaceURI
is null
or an empty string,
or if the qualifiedName
has a prefix that is "xml" and
the namespaceURI
is different from "
http://www.w3.org/XML/1998/namespace " .public org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws org.w3c.dom.DOMException
createAttributeNS
in interface org.w3c.dom.Document
namespaceURI
- The namespace URI of the attribute to create.qualifiedName
- The qualified name of the attribute to
instantiate.Attr
object with the following attributes:
Attribute ValueNode.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted from
qualifiedName
, or null
if there is no
prefixNode.localName
local name , extracted from
qualifiedName
Attr.name
qualifiedName
org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
qualifiedName
is
malformed, if the qualifiedName
has a prefix and the
namespaceURI
is null
or an empty string,
if the qualifiedName
has a prefix that is "xml" and the
namespaceURI
is different from "
http://www.w3.org/XML/1998/namespace ", or if the
qualifiedName
is "xmlns" and the
namespaceURI
is different from "
http://www.w3.org/2000/xmlns/ ".public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
NodeList
of all the Elements
with
a given local name and namespace URI in the order in which they are
encountered in a preorder traversal of the Document
tree.getElementsByTagNameNS
in interface org.w3c.dom.Document
namespaceURI
- The namespace URI of the elements to match on.
The special value "*" matches all namespaces.localName
- The local name of the elements to match on. The
special value "*" matches all local names.NodeList
object containing all the matched
Elements
.public org.w3c.dom.Element getElementById(java.lang.String elementId)
Element
whose ID
is given by
elementId
. If no such element exists, returns
null
. Behavior is not defined if more than one element
has this ID
. The DOM implementation must have
information that says which attributes are of type ID. Attributes with
the name "ID" are not of type ID unless so defined. Implementations
that do not know whether attributes are of type ID or not are expected
to return null
.getElementById
in interface org.w3c.dom.Document
elementId
- The unique id
value for an element.public boolean hasFeature(java.lang.String feature, java.lang.String version)
hasFeature
in interface org.w3c.dom.DOMImplementation
feature
- The name of the feature to test (case-insensitive).version
- This is the version number of the feature to test.true
if the feature is implemented in the
specified version, false
otherwise.public org.w3c.dom.DocumentType createDocumentType(java.lang.String qualifiedName, java.lang.String publicId, java.lang.String systemId) throws org.w3c.dom.DOMException
DocumentType
node.createDocumentType
in interface org.w3c.dom.DOMImplementation
qualifiedName
- The qualified name of the document type to be
created.publicId
- The external subset public identifier.systemId
- The external subset system identifier.DocumentType
node with
Node.ownerDocument
set to null
.org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
qualifiedName
is
malformed.public org.w3c.dom.Document createDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, org.w3c.dom.DocumentType doctype) throws org.w3c.dom.DOMException
Document
object of the specified type with
its document element.createDocument
in interface org.w3c.dom.DOMImplementation
namespaceURI
- The namespace URI of the document element to
create.qualifiedName
- The qualified name of the document element to be
created.doctype
- The type of document to be created or null
.Document
object.org.w3c.dom.DOMException
- public void diagnosticDump()
public int getNumberOfChildren()
getNumberOfChildren
in class com.icl.saxon.tinytree.TinyNodeImpl
public NodeInfo[] getAllChildNodes()
getAllChildNodes
in class com.icl.saxon.tinytree.TinyNodeImpl
public NodeEnumeration enumerateChildren()
enumerateChildren
in class com.icl.saxon.tinytree.TinyNodeImpl
public org.w3c.dom.Node getFirstChild()
getFirstChild
in class com.icl.saxon.tinytree.TinyNodeImpl
public org.w3c.dom.Node getLastChild()
getLastChild
in class com.icl.saxon.tinytree.TinyNodeImpl
public java.lang.String getValue()
public void copyStringValue(Outputter out) throws org.xml.sax.SAXException
copyStringValue
in class com.icl.saxon.tinytree.TinyNodeImpl
public void defaultAction(Context c) throws org.xml.sax.SAXException
public java.lang.String getNodeValue()
getNodeValue
in class com.icl.saxon.tinytree.TinyNodeImpl
protected void setParentNode(com.icl.saxon.tinytree.TinyNodeImpl parent)
public boolean isSameNode(NodeInfo other)
isSameNode
in interface NodeInfo
public void setLineNumber(int line)
public int getFingerprint()
getFingerprint
in interface NodeInfo
public int getNameCode()
getNameCode
in interface NodeInfo
public java.lang.String getPrefix()
getPrefix
in interface NodeInfo
public java.lang.String getURI()
getURI
in interface NodeInfo
public short getURICode()
getURICode
in interface NodeInfo
public java.lang.String getDisplayName()
getDisplayName
in interface NodeInfo
public java.lang.String getLocalName()
getLocalName
in interface NodeInfo
public java.lang.String getPublicId()
public final int getIndex()
getIndex
in interface NodeInfo
com.icl.saxon.om.NodeInfo
public boolean hasAttributes()
hasAttributes
in interface org.w3c.dom.Node
true
if this node has any attributes,
false
otherwise.public java.lang.String getAttributeValue(java.lang.String uri, java.lang.String localName)
getAttributeValue
in interface NodeInfo
uri
- the namespace uri of an attributelocalName
- the local name of an attributepublic java.lang.String getAttributeValue(java.lang.String name)
getAttributeValue
in interface NodeInfo
name
- the name of an attribute. This must be an unqualified attribute name,
i.e. one with no namespace prefix.public java.lang.String getAttributeValue(int fingerprint)
getAttributeValue
in interface NodeInfo
fingerprint
- The fingerprint of the attribute namepublic final ElementInfo getAncestor(NodeTest test)
name
- The name of the required ancestor.public boolean isDocumentElement()
isDocumentElement
in interface NodeInfo
public NodeInfo getNextInDocument(NodeInfo anchor)
getNextInDocument
in interface NodeInfo
anchor:
- the scan stops when it reaches a node that is not a descendant of the specified
anchor nodepublic NodeInfo getPreviousInDocument()
getPreviousInDocument
in interface NodeInfo
public void setNodeValue(java.lang.String nodeValue) throws org.w3c.dom.DOMException
setNodeValue
in interface org.w3c.dom.Node
public org.w3c.dom.NodeList getChildNodes()
NodeList
that contains all children of this node. If
there are no children, this is a NodeList
containing no
nodes.getChildNodes
in interface org.w3c.dom.Node
public org.w3c.dom.NamedNodeMap getAttributes()
NamedNodeMap
containing the attributes of this node (if
it is an Element
) or null
otherwise. (DOM method)getAttributes
in interface org.w3c.dom.Node
public org.w3c.dom.Document getOwnerDocument()
Document
object associated with this node. (DOM mehod)getOwnerDocument
in interface org.w3c.dom.Node
public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException
newChild
before the existing child node
refChild
. DOM method: always fails.insertBefore
in interface org.w3c.dom.Node
newChild
- The node to insert.refChild
- The reference node, i.e., the node before which the
new node must be inserted.org.w3c.dom.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Always raised.public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
oldChild
with
newChild
in the list of children, and returns the
oldChild
node. Always fails.replaceChild
in interface org.w3c.dom.Node
newChild
- The new node to put in the child list.oldChild
- The node being replaced in the list.org.w3c.dom.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Always raised.public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
oldChild
from the
list of children, and returns it. DOM method: always fails.removeChild
in interface org.w3c.dom.Node
oldChild
- The node being removed.org.w3c.dom.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Always raised.public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws org.w3c.dom.DOMException
newChild
to the end of the list of children
of this node. DOM method: always fails.appendChild
in interface org.w3c.dom.Node
newChild
- The node to add.org.w3c.dom.DOMException
- public boolean hasChildNodes()
hasChildNodes
in interface org.w3c.dom.Node
true
if the node has any children,
false
if the node has no children.public org.w3c.dom.Node cloneNode(boolean deep)
cloneNode
in interface org.w3c.dom.Node
deep
- If true
, recursively clone the subtree under
the specified node; if false
, clone only the node
itself (and its attributes, if it is an Element
).public void normalize()
Text
nodes in the full depth of the sub-tree
underneath this Node
, including attribute nodes, into a
"normal" form where only structure (e.g., elements, comments,
processing instructions, CDATA sections, and entity references)
separates Text
nodes, i.e., there are neither adjacent
Text
nodes nor empty Text
nodes.normalize
in interface org.w3c.dom.Node
public boolean isSupported(java.lang.String feature, java.lang.String version)
isSupported
in interface org.w3c.dom.Node
feature
- The name of the feature to test. This is the same name
which can be passed to the method hasFeature
on
DOMImplementation
.version
- This is the version number of the feature to test. In
Level 2, version 1, this is the string "2.0". If the version is not
specified, supporting any version of the feature will cause the
method to return true
.true
if the specified feature is supported
on this node, false
otherwise.public java.lang.String getNamespaceURI()
null
if it is
unspecified.
ELEMENT_NODE
and
ATTRIBUTE_NODE
and nodes created with a DOM Level 1
method, such as createElement
from the
Document
interface, this is always null
.
Per the Namespaces in XML Specification an attribute does not
inherit its namespace from the element it is attached to. If an
attribute is not explicitly given a namespace, it simply has no
namespace.getNamespaceURI
in interface org.w3c.dom.Node
public void setPrefix(java.lang.String prefix) throws org.w3c.dom.DOMException
setPrefix
in interface org.w3c.dom.Node
protected void disallowUpdate() throws org.w3c.dom.DOMException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |