| java.lang.Object net.sf.saxon.tree.NodeImpl net.sf.saxon.tree.ParentNodeImpl net.sf.saxon.tree.DocumentImpl
DocumentImpl | final public class DocumentImpl extends ParentNodeImpl implements DocumentInfo(Code) | | A node in the XML parse tree representing the Document itself (or equivalently, the root
node of the Document).
author: Michael H. Kay |
Method Summary | |
public void | copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) | public String | generateId() | AxisIterator | getAllElements(int fingerprint) | public String | getBaseURI() Get the base URI of this root node. | public Configuration | getConfiguration() | public ElementImpl | getDocumentElement() Get the root (outermost) element. | public int | getDocumentNumber() | public DocumentInfo | getDocumentRoot() | int | getLineNumber(int sequence) Get the line number for an element. | public int | getLineNumber() Get the line number of this root node. | public NamePool | getNamePool() | final public NodeInfo | getNextSibling() | final public int | getNodeKind() Return the type of node. | final public NodeInfo | getPreviousSibling() | public NodeInfo | getRoot() | public String | getSystemId() | String | getSystemId(int seq) | public String[] | getUnparsedEntity(String name) Get the unparsed entity with a given name
Parameters: name - the name of the entity if the entity exists, return an array of two Strings, the first holding the system IDof the entity, the second holding the public ID if there is one, or null if not. | public NodeInfo | selectID(String id) Get the element with a given ID. | public void | setConfiguration(Configuration config) | void | setDocumentElement(ElementImpl e) Set the top-level element of the document (variously called the root element or the
document element). | void | setLineNumber(int sequence, int line) Set the line number for an element. | public void | setLineNumbering() | public void | setSystemId(String uri) | void | setSystemId(int seq, String uri) | void | setUnparsedEntity(String name, String uri, String publicId) Set an unparsed entity URI associated with this document. |
DocumentImpl | public DocumentImpl()(Code) | | |
copy | public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException(Code) | | Copy this node to a given outputter
|
generateId | public String generateId()(Code) | | Get a character string that uniquely identifies this node
a string based on the document number |
getAllElements | AxisIterator getAllElements(int fingerprint)(Code) | | Get a list of all elements with a given name fingerprint
|
getBaseURI | public String getBaseURI()(Code) | | Get the base URI of this root node. For a root node the base URI is the same as the
System ID.
|
getConfiguration | public Configuration getConfiguration()(Code) | | Get the configuration previously set using setConfiguration
|
getDocumentElement | public ElementImpl getDocumentElement()(Code) | | Get the root (outermost) element.
the Element node for the outermost element of the document. |
getDocumentNumber | public int getDocumentNumber()(Code) | | Get the unique document number
|
getDocumentRoot | public DocumentInfo getDocumentRoot()(Code) | | Get the root (document) node
the DocumentInfo representing this document |
getLineNumber | int getLineNumber(int sequence)(Code) | | Get the line number for an element. Return -1 if line numbering is off.
|
getLineNumber | public int getLineNumber()(Code) | | Get the line number of this root node.
0 always |
getNamePool | public NamePool getNamePool()(Code) | | Get the name pool used for the names in this document
|
getNextSibling | final public NodeInfo getNextSibling()(Code) | | Get next sibling - always null
null |
getNodeKind | final public int getNodeKind()(Code) | | Return the type of node.
Type.DOCUMENT (always) |
getPreviousSibling | final public NodeInfo getPreviousSibling()(Code) | | Get previous sibling - always null
null |
getRoot | public NodeInfo getRoot()(Code) | | Get the root node
the NodeInfo representing the root of this tree |
getSystemId | public String getSystemId()(Code) | | Get the system id of this root node
|
getSystemId | String getSystemId(int seq)(Code) | | Get the system id of an element in the document
|
getUnparsedEntity | public String[] getUnparsedEntity(String name)(Code) | | Get the unparsed entity with a given name
Parameters: name - the name of the entity if the entity exists, return an array of two Strings, the first holding the system IDof the entity, the second holding the public ID if there is one, or null if not. If the entitydoes not exist, return null. * @return the URI of the entity if there is one, or empty string if not |
selectID | public NodeInfo selectID(String id)(Code) | | Get the element with a given ID.
Parameters: id - The unique ID of the required element, previously registered using registerID() The NodeInfo for the given ID if one has been registered, otherwise null. |
setConfiguration | public void setConfiguration(Configuration config)(Code) | | Set the Configuration that contains this document
|
setDocumentElement | void setDocumentElement(ElementImpl e)(Code) | | Set the top-level element of the document (variously called the root element or the
document element). Note that a DocumentImpl may represent the root of a result tree
fragment, in which case there is no document element.
Parameters: e - the top-level element |
setLineNumber | void setLineNumber(int sequence, int line)(Code) | | Set the line number for an element. Ignored if line numbering is off.
|
setLineNumbering | public void setLineNumbering()(Code) | | Set line numbering on
|
setSystemId | public void setSystemId(String uri)(Code) | | Set the system id of this node
|
setSystemId | void setSystemId(int seq, String uri)(Code) | | Set the system id of an element in the document
|
setUnparsedEntity | void setUnparsedEntity(String name, String uri, String publicId)(Code) | | Set an unparsed entity URI associated with this document. For system use only, while
building the document.
|
Fields inherited from net.sf.saxon.tree.ParentNodeImpl | protected int sequence(Code)(Java Doc)
|
|
|