com.icl.saxon.om
Interface DocumentInfo

All Superinterfaces:
org.w3c.dom.Node, NodeInfo
All Known Implementing Classes:
DocumentImpl

public interface DocumentInfo
extends NodeInfo

The root node of an XPath tree. (Or equivalently, the tree itself).

This class should have been named Root; it is used not only for the root of a document, but also for the root of a result tree fragment, which is not constrained to contain a single top-level element.


Fields inherited from interface com.icl.saxon.om.NodeInfo
ATTRIBUTE, COMMENT, DOCUMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, 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
 
Method Summary
 java.lang.String[] getAssociatedStylesheets(java.lang.String media, java.lang.String title)
          Get the URIs of the stylesheets associated with this document by means of an xml-stylesheet processing instruction.
 int getDocumentNumber()
          Get a unique number identifying this document
 PreparedStyleSheet getEmbeddedStylesheet(java.lang.String id)
          Prepare an embedded stylesheet within this document
 java.util.Hashtable getKeyIndex(KeyManager keymanager, java.lang.String absname)
          Get the index for a given key
 java.lang.String getUnparsedEntity(java.lang.String name)
          Get the unparsed entity with a given name
 ElementInfo selectID(java.lang.String id)
          Get the element with a given ID, if any
 void setKeyIndex(KeyManager keymanager, java.lang.String absname, java.lang.Object index)
          Set the index for a given key
 
Methods inherited from interface com.icl.saxon.om.NodeInfo
copy, copyStringValue, defaultAction, getAbsoluteName, getAllChildNodes, getAncestor, getAncestor, getAttributeValue, getAttributeValue, getDisplayName, getDocumentElement, getDocumentRoot, getExpandedName, getFirstChild, getIndex, getLastChild, getLineNumber, getLocalName, getNextInDocument, getNextSibling, getNodeName, getNodeType, getNumberAny, getNumberMulti, getNumberOfChildren, getNumberSimple, getNumberSimple, getNumberSingle, getPath, getPrefix, getPreviousInDocument, getPreviousInDocument, getPreviousSibling, getSequenceNumber, getSequentialKey, getSystemId, getURI, getValue, hasName, isa, isAncestor, isDocumentElement, isSameNode
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Method Detail

selectID

public ElementInfo selectID(java.lang.String id)
                     throws org.xml.sax.SAXException
Get the element with a given ID, if any
Parameters:
id - the required ID value
Returns:
the element with the given ID, or null if there is no such ID present (or if the parser has not notified attributes as being of type ID)

getKeyIndex

public java.util.Hashtable getKeyIndex(KeyManager keymanager,
                                       java.lang.String absname)
                                throws org.xml.sax.SAXException
Get the index for a given key
Parameters:
keymanager - The key manager managing this key
absname - The absolute name of the key (unique with the key manager)
Returns:
The index, if one has been built, in the form of a Hashtable that maps the key value to a Vector of nodes having that key value. If no index has been built, returns null.
Throws:
SAXExcetpion - If the index is under construction, throws an exception, as this implies a key defined in terms of itself.

setKeyIndex

public void setKeyIndex(KeyManager keymanager,
                        java.lang.String absname,
                        java.lang.Object index)
                 throws org.xml.sax.SAXException
Set the index for a given key
Parameters:
keymanager - The key manager managing this key
absname - The absolute name of the key (unique with the key manager)
index - 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" to indicate that the index is under construction.

getDocumentNumber

public int getDocumentNumber()
Get a unique number identifying this document

getUnparsedEntity

public java.lang.String getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given name
Parameters:
name - the name of the entity
Returns:
the URI of the entity if there is one, or null if not

getAssociatedStylesheets

public java.lang.String[] getAssociatedStylesheets(java.lang.String media,
                                                   java.lang.String title)
                                            throws org.xml.sax.SAXException
Get the URIs of the stylesheets associated with this document by means of an xml-stylesheet processing instruction.
Parameters:
media - The required medium, or null to match any medium
title - The required title, or null to match the preferred stylesheet
Returns:
null if there is no such processing instruction
Throws:
org.xml.sax.SAXException - if there is such a processing instruction and it is invalid

getEmbeddedStylesheet

public PreparedStyleSheet getEmbeddedStylesheet(java.lang.String id)
                                         throws org.xml.sax.SAXException
Prepare an embedded stylesheet within this document
Parameters:
id - The id of the required embedded stylesheet
Returns:
the prepared Stylesheet if there is one, or null.