## org.apache.xalan.xpath.dtm
Class DTM

    java.lang.Object
      |
      +--org.apache.xerces.framework.XMLParser
            |
            +--org.apache.xalan.xpath.dtm.DTM

public class DTM
extends org.apache.xerces.framework.XMLParser
implements java.lang.Runnable, org.apache.xerces.framework.XMLDocumentHandler, org.apache.xerces.framework.XMLDocumentHandler.DTDHandler

**For internal use only** `DTM` is an XML document model expressed as a table rather than an object tree. It attempts to be very compact, and to support very specifically limited multitasking: users can start reading the document while it's still being generated. (A work in progress...)

(***** The SAX handler calls, and the string-based XMLDocumentHandler methods, are known to be bad; they're included as hooks for the future.)

DTM does _not_ directly support the W3C's Document Object Model. However, it attempts to come close enough that a subset of DOM behavior can be implemented as proxy objects referencing the DTM.

See Also:
  `DTMProxy`

Field Summary
`static java.lang.String` `DEFAULT_PREFIX_STR` **For internal use only**

Constructor Summary
`DTM()` **For internal use only** Construct a DTM.
`DTM(ProblemListener listener)` **For internal use only** Construct a DTM.

Method Summary
`void` `attlistDecl(org.apache.xerces.utils.QName elementDecl, org.apache.xerces.utils.QName attributeDecl, int attType, boolean attList, java.lang.String enumString, int attDefaultType, int attDefaultValue)` **For internal use only** callback for an attribute list declaration.
`void` `characters(char[] ch, int start, int length)` **For internal use only** SAX API: Accept a chunk of characters for normalization into a Text node.
`void` `characters(char[] ch, int start, int length, boolean cdataSection)` **For internal use only** XMLDocumentHandler API: Accept a chunk of characters for normalization into a Text node.
`void` `characters(int dataIndex)` **For internal use only** XMLDocumentHandler API: Accept a chunk of characters for normalization into a Text node.
`void` `comment(int dataIndex)` **For internal use only** XMLDocumentHandler API: Create a Comment node.
`void` `display(int position)` **For internal use only** DTM development API: Given a node index, write the node's contents in extremely terse form onto Standard Output.
`void` `dump()` **For internal use only** DTM development API: display() all the nodes in the DTM.
`void` `dumpDTM()` **For internal use only**
`void` `elementDecl(org.apache.xerces.utils.QName elementDecl, int contentSpecType, int contentSpecIndex, org.apache.xerces.framework.XMLContentSpec.Provider contentSpecProvider)` **For internal use only** <!ELEMENT Name contentspec>
`void` `endCDATA()` **For internal use only** End CDATA section.
`void` `endDocument()` **For internal use only** SAX API: End of Document reached.
`void` `endDTD()` **For internal use only** This function will be called at the end of the DTD.
`void` `endElement(org.apache.xerces.utils.QName name)` **For internal use only** XMLDocumentHandler API: End-tag reached.
`void` `endEntityReference(int entityName, int entityType, int entityContext)` **For internal use only** End entity reference.
`void` `endNamespaceDeclScope(int prefix)` **For internal use only** Report the end of the scope of a namespace declaration.
`void` `externalEntityDecl(int entityName, int publicId, int systemId)` **For internal use only** <!ENTITY Name ExternalID> (external)
`void` `externalPEDecl(int entityName, int publicId, int systemId)` **For internal use only** <!ENTITY % Name ExternalID> (external)
`void` `general_characters(int index)` **For internal use only** Text-accumulator operation for the integer-index version of characters().
`boolean` `getCreateEntityReferenceNodes()` **For internal use only**
`org.w3c.dom.Document` `getDocument()` **For internal use only** Return the document proxy object.
`int` `getFirstAttribute(int position)` **For internal use only** DTM read API: Given a node index, get the index of the node's first child.
`int` `getFirstChild(int position)` **For internal use only** DTM read API: Given a node index, get the index of the node's first child.
`org.w3c.dom.Element` `getIdentifier(java.lang.String id)` **For internal use only** Get the element identified by the ID.
`int` `getLastChild(int position)` **For internal use only** DTM read API: Given a node index, advance to its last child.
`java.lang.String` `getLocalName(int position)` **For internal use only** DTM read API: Given a node index, return its DOM-style localname.
`java.lang.String` `getNamespaceURI(int position)` **For internal use only** DTM read API: Given a node index, return its DOM-style namespace URI (As defined in Namespaces, this is the declared URI which this node's prefix -- or default in lieu thereof -- was mapped to.)
`int` `getNextAttribute(int position)` **For internal use only** DTM read API: Given a node index, advance to the next attribute.
`int` `getNextDescendant(int parentPos, int position)` **For internal use only** DTM read API: Given a node index, advance to its next descendant.
`int` `getNextNode(int parentPos, int position)` **For internal use only** DTM read API: Given a node index, advance to its next sibling.
`int` `getNextPreceding(int startPos, int position)` **For internal use only** DTM read API: Given a node index, advance to the preceding node.
`int` `getNextSibling(int position)` **For internal use only** DTM read API: Given a node index, advance to its next sibling.
`DTMProxy` `getNode(int pos)` **For internal use only** Return a Node object that represents the index.
`java.lang.String` `getNodeName(int position)` **For internal use only** DTM read API: Given a node index, return its DOM-style node name.
`int` `getNodeType(int position)` **For internal use only** DTM read API: Given a node index, return its DOM-style node type.
`java.lang.String` `getNodeValue(int position)` **For internal use only** DTM read API: Given a node index, return its node value.
`int` `getParent(int position)` **For internal use only** DTM read API: Given a node index, find its parent node.
`int` `getPrecedingOrAncestorOrSelf(int position)` **For internal use only** DTM read API: Given a node index, advance to the preceding node.
`java.lang.String` `getPrefix(int position)` **For internal use only** DTM read API: Given a node index, return its DOM-style name prefix.
`int` `getPreviousSibling(int position)` **For internal use only** DTM read API: Given a node index, find its preceeding sibling.
`org.apache.xerces.utils.StringPool` `getStringPool()` **For internal use only** Make the string public.
`void` `ignorableWhitespace(char[] ch, int start, int length)` **For internal use only** SAX API: Accept a chunk of characters for normalization into an ignorable-whitespace Text node.
`void` `ignorableWhitespace(char[] ch, int start, int length, boolean cdataSection)` **For internal use only** XMLDocumentHandler API: Accept a chunk of characters for normalization into an ignorable-whitespace Text node.
`void` `ignorableWhitespace(int dataIndex)` **For internal use only** Ignorable whitespace.
`void` `ignorableWhitespace(int dataIndex, boolean cdataSection)` **For internal use only** XMLDocumentHandler API: Accept a chunk of characters for normalization into an ignorable-whitespace Text node.
`void` `internalEntityDecl(int entityName, int entityValue)` **For internal use only** <!ENTITY Name EntityValue> (internal)
`void` `internalPEDecl(int entityName, int entityValue)` **For internal use only** <!ENTITY % Name EntityValue> (internal)
`void` `internalSubset(int internalSubset)` **For internal use only** Report when the internal subset is completely scanned.
`boolean` `isIgnorableText(int position)` **For internal use only** DTM read API: Given a node index, indicate whether the parser marked it as an ignorable-whitespace text node.
`void` `notationDecl(int notationName, int publicId, int systemId)` **For internal use only** <!NOTATION Name ExternalId>
`void` `processingInstruction(int target, int data)` **For internal use only** XMLDocumentHandler API: Create a PI node.
`void` `reset()` **For internal use only** Override reset so it doesn't release the string pool.
`void` `run()` **For internal use only** Run the parse thread.
`void` `setFeature(java.lang.String featureId, boolean state)` **For internal use only** Set the state of any feature in a SAX2 parser.
`void` `setInputSource(org.xml.sax.InputSource inputSource)` **For internal use only**
`void` `setProblemListener(ProblemListener listener)` **For internal use only** Set the current problem listener.
`void` `startCDATA()` **For internal use only** Start CDATA section.
`void` `startDocument()` **For internal use only** XMLDocumentHandler API: Start-of-document recieved.
`void` `startDocument(int versionIndex, int encodingIndex, int standAloneIndex)` **For internal use only** XMLDocumentHandler API: Start-of-document recieved.
`void` `startDTD(int rootElementType, int publicId, int systemId)` **For internal use only** This function will be called when a <!DOCTYPE...> declaration is encountered.
`void` `startDTD(org.apache.xerces.utils.QName rootElement, int publicId, int systemId)` **For internal use only** callback for the start of the DTD This function will be called when a <!DOCTYPE...> declaration is encountered.
`void` `startElement(org.apache.xerces.utils.QName qname, org.apache.xerces.framework.XMLAttrList xmlAttrList, int attrListIndex)` **For internal use only** XMLDocumentHandler API: Process element start-tag and its attributes.
`void` `startEntityReference(int entityName, int entityType, int entityContext)` **For internal use only** Start entity reference.
`void` `startNamespaceDeclScope(int prefix, int uri)` **For internal use only** Report the start of the scope of a namespace declaration.
`void` `textDecl(int version, int encoding)` **For internal use only** Signal the Text declaration of an external entity.
`void` `unparsedEntityDecl(int entityName, int publicId, int systemId, int notationName)` **For internal use only** <!ENTITY Name ExternalID NDataDecl> (unparsed)
`void` `xmlDecl(int version, int encoding, int standalone)` **For internal use only** Signal the XML declaration of a document

Methods inherited from class org.apache.xerces.framework.XMLParser
`addRecognizer, getEntityResolver, getErrorHandler, getFeature, getFeaturesRecognized, getLocator, getPropertiesRecognized, getProperty, isFeatureRecognized, isPropertyRecognized, parse, parse, parseSome, parseSomeSetup, reportError, setEntityResolver, setErrorHandler, setLocale, setProperty, setReaderFactory`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_PREFIX_STR

    public static final java.lang.String DEFAULT_PREFIX_STR

Constructor Detail

### DTM

    public DTM()

  **For internal use only** Construct a DTM. This is the only constructor currently working.
  Parameters:
    `parser` - HookedXMLParser Input event-stream source.

### DTM

    public DTM(ProblemListener listener)

  **For internal use only** Construct a DTM. This is the only constructor currently working.
  Parameters:
    `parser` - HookedXMLParser Input event-stream source.

Method Detail

### getStringPool

    public org.apache.xerces.utils.StringPool getStringPool()

  **For internal use only** Make the string public.

### setInputSource

    public void setInputSource(org.xml.sax.InputSource inputSource)

### setProblemListener

    public void setProblemListener(ProblemListener listener)

  **For internal use only** Set the current problem listener.

### reset

    public void reset()
               throws java.lang.Exception

  **For internal use only** Override reset so it doesn't release the string pool. DTM parsers are not reuseable (because the DTM is the same object as the parser).
  Overrides:
    reset in class org.apache.xerces.framework.XMLParser

### run

    public void run()

  **For internal use only** Run the parse thread.
  Specified by:
    run in interface java.lang.Runnable

### getNode

    public final DTMProxy getNode(int pos)

  **For internal use only** Return a Node object that represents the index.

### startDocument

    public final void startDocument()

  **For internal use only** XMLDocumentHandler API: Start-of-document recieved. Much like the SAX startDocument() and setDocumentLocator() calls, but also has the side effect of switching DTM into its XML4J-aware mode.
  Specified by:
    startDocument in interface org.apache.xerces.framework.XMLDocumentHandler

### startDocument

    public final void startDocument(int versionIndex,
                                    int encodingIndex,
                                    int standAloneIndex)

  **For internal use only** XMLDocumentHandler API: Start-of-document recieved. Much like the SAX startDocument() and setDocumentLocator() calls, but also has the side effect of switching DTM into its XML4J-aware mode.

### endDocument

    public final void endDocument()
                           throws org.xml.sax.SAXException

  **For internal use only** SAX API: End of Document reached. Finalize the DTM: close out the sibling chain, mark the document as no-more-nodes-expected, and wake up anyone who is waiting.
  Specified by:
    endDocument in interface org.apache.xerces.framework.XMLDocumentHandler
  Throws:
    org.xml.sax.SAXException - Not used.

### startElement

    public final void startElement(org.apache.xerces.utils.QName qname,
                                   org.apache.xerces.framework.XMLAttrList xmlAttrList,
                                   int attrListIndex)

  **For internal use only** XMLDocumentHandler API: Process element start-tag and its attributes. This includes pushing a new namespace context (with any namespaces declared on this element), creating the Element node, making it the new parent, and creating child Attribute nodes as needed. Namespace declarations _do_ appear as attributes. Attributes are expressed as the leading children of the Element, and are separated out later, which is different from DOM's behavior.

  The mapping from namespace prefixes to namespace URIs is also performed at this time.

  Specified by:
    startElement in interface org.apache.xerces.framework.XMLDocumentHandler
  Parameters:
    `elementNameIndex` - int Index of element's qualified name in symbol table.
    `attrListIndex` - int Starting index of this element's attributes in the parser's attribute table, or -1 to indicate no attributes.

### endElement

    public final void endElement(org.apache.xerces.utils.QName name)

  **For internal use only** XMLDocumentHandler API: End-tag reached. Pop the parentage context, along with any namespaces this element defined. Make sure that the sibling chain has been properly terminated.
  Specified by:
    endElement in interface org.apache.xerces.framework.XMLDocumentHandler
  Parameters:
    `name` - int Index of element name in XML4J's symbol table

### characters

    public final void characters(char[] ch,
                                 int start,
                                 int length)
                          throws org.xml.sax.SAXException

  **For internal use only** SAX API: Accept a chunk of characters for normalization into a Text node. Note that since SAX may reuse its input buffers, we may need to either extract the string now or cache a copy of the buffer. It is unclear which approach is preferable
  Specified by:
    characters in interface org.apache.xerces.framework.XMLDocumentHandler
  Parameters:
    `ch` - char[] Input buffer in which string can be found.
    `start` - int Offset to start of string, 0-based.
    `length` - int Length of string
  Throws:
    org.xml.sax.SAXException - Required by API, not thrown as far as I know.

### startDTD

    public void startDTD(org.apache.xerces.utils.QName rootElement,
                         int publicId,
                         int systemId)
                  throws java.lang.Exception

  **For internal use only** callback for the start of the DTD This function will be called when a <!DOCTYPE...> declaration is encountered.
  Specified by:
    startDTD in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Parameters:
    `rootElementType` - element handle for the root element of the document
    `publicId` - string pool index of the DTD's public ID
    `systemId` - string pool index of the DTD's system ID
  Throws:
    java.lang.Exception -
  Overrides:
    startDTD in class org.apache.xerces.framework.XMLParser

### characters

    public final void characters(char[] ch,
                                 int start,
                                 int length,
                                 boolean cdataSection)
                          throws org.xml.sax.SAXException

  **For internal use only** XMLDocumentHandler API: Accept a chunk of characters for normalization into a Text node. This is an "enhanced SAX" flavor of the call, adding the flag for CDATA sections, and is not currently used.

  Note that since XML4J may reuse its input buffers, we may need to either extract the string now or cache a copy of the buffer. It is unclear which approach is preferable

  Parameters:
    `ch` - char[] Input buffer in which string can be found.
    `start` - int Offset to start of string, 0-based.
    `length` - int Length of string
    `cdataSection` - boolean True iff text was enclosed in
  Throws:
    org.xml.sax.SAXException - Required by API, not thrown as far as I know.

### characters

    public final void characters(int dataIndex)
                          throws org.xml.sax.SAXException

  **For internal use only** XMLDocumentHandler API: Accept a chunk of characters for normalization into a Text node. This is the "late binding" version of the call, which we currently rely upon.
  Specified by:
    characters in interface org.apache.xerces.framework.XMLDocumentHandler
  Parameters:
    `dataIndex` - int Index of this string in XML4J's symbol tables
    `cdataSection` - boolean True iff text was enclosed in
  Throws:
    org.xml.sax.SAXException - Required by API, not thrown as far as I know.

### startCDATA

    public final void startCDATA()
                          throws java.lang.Exception

  **For internal use only** Start CDATA section.
  Specified by:
    startCDATA in interface org.apache.xerces.framework.XMLDocumentHandler

### endCDATA

    public final void endCDATA()
                        throws java.lang.Exception

  **For internal use only** End CDATA section.
  Specified by:
    endCDATA in interface org.apache.xerces.framework.XMLDocumentHandler

### ignorableWhitespace

    public final void ignorableWhitespace(int dataIndex)
                                   throws java.lang.Exception

  **For internal use only** Ignorable whitespace.
  Specified by:
    ignorableWhitespace in interface org.apache.xerces.framework.XMLDocumentHandler

### ignorableWhitespace

    public final void ignorableWhitespace(char[] ch,
                                          int start,
                                          int length)
                                   throws org.xml.sax.SAXException

  **For internal use only** SAX API: Accept a chunk of characters for normalization into an ignorable-whitespace Text node. Note that since SAX may reuse its input buffers, we may need to either extract the string now or cache a copy of the buffer. It is unclear which approach is preferable
  Specified by:
    ignorableWhitespace in interface org.apache.xerces.framework.XMLDocumentHandler
  Parameters:
    `ch` - char[] Input buffer in which string can be found.
    `start` - int Offset to start of string, 0-based.
    `length` - int Length of string
  Throws:
    org.xml.sax.SAXException - Required by API, not thrown as far as I know.

### ignorableWhitespace

    public final void ignorableWhitespace(char[] ch,
                                          int start,
                                          int length,
                                          boolean cdataSection)
                                   throws org.xml.sax.SAXException

  **For internal use only** XMLDocumentHandler API: Accept a chunk of characters for normalization into an ignorable-whitespace Text node. This is an "enhanced SAX" flavor of the call, adding the flag for CDATA sections, and is not currently used.

  Note that since XML4J may reuse its input buffers, we may need to either extract the string now or cache a copy of the buffer. It is unclear which approach is preferable

  Parameters:
    `ch` - char[] Input buffer in which string can be found.
    `start` - int Offset to start of string, 0-based.
    `length` - int Length of string
    `cdataSection` - boolean True iff text was enclosed in
  Throws:
    org.xml.sax.SAXException - Required by API, not thrown as far as I know.

### ignorableWhitespace

    public final void ignorableWhitespace(int dataIndex,
                                          boolean cdataSection)
                                   throws org.xml.sax.SAXException

  **For internal use only** XMLDocumentHandler API: Accept a chunk of characters for normalization into an ignorable-whitespace Text node. This is the "late binding" version of the call, which we currently rely upon.
  Parameters:
    `dataIndex` - int Index of this string in XML4J's symbol tables
    `cdataSection` - boolean True iff text was enclosed in
  Throws:
    org.xml.sax.SAXException - Required by API, not thrown as far as I know.

### general_characters

    public final void general_characters(int index)

  **For internal use only** Text-accumulator operation for the integer-index version of characters(). Obviously far simpler, since we are assured that (unlike the parse buffers) the XML4J symbol table will persist.
  Parameters:
    `index` - int Index of this string in XML4J's symbol tables.

    Note: Even though we are using XML4J's internal events rather than SAX, we must be prepared to normalize successive blocks of characters():

    - when text runs over the end of a parse buffer (may not arise in this parser),
    - when text and CDATA sections are intermixed (with intervening start/end CDATA events),
    - and when text and entity references are intermixed (with intervening start/end Entity Reference events).
    The simplest way to handle this is to record the data, but defer creating the Text node until we get an event indicating that no further text will arrive. This logic was present in early versions of DTM, but was lost during an overagressive optimization; we're restoring it now.

    Note: Yes, the charChunks array grows monotonically during parsing, and does not shrink back down when the chunks are concatenated later in processing. Tough. I'm assuming that this is cheaper than allocating a separate array for every multichunk string, despite the block-copying that occurs when the array is grown.

    KNOWN LIMITATION: DOESN'T PRESERVE CDATA FLAG. Since XSLT doesn't care about that flag, this is not a problem for our target application. It may be an issue if you try to reuse DTM elsewhere.

  See Also:
    `appendAccumulatedText`

### comment

    public final void comment(int dataIndex)

  **For internal use only** XMLDocumentHandler API: Create a Comment node. Available only in the late-binding form, and not supported in SAX 1.0 at all.
  Specified by:
    comment in interface org.apache.xerces.framework.XMLDocumentHandler
  Parameters:
    `dataIndex` - int Index of comment's contents in XML4J's symbol table
  Overrides:
    comment in class org.apache.xerces.framework.XMLParser

### processingInstruction

    public final void processingInstruction(int target,
                                            int data)

  **For internal use only** XMLDocumentHandler API: Create a PI node.
  Specified by:
    processingInstruction in interface org.apache.xerces.framework.XMLDocumentHandler
  Parameters:
    `target` - int target processor name index
    `data` - int Index of PI parameters to be passed to that processor
  Overrides:
    processingInstruction in class org.apache.xerces.framework.XMLParser

### startNamespaceDeclScope

    public final void startNamespaceDeclScope(int prefix,
                                              int uri)
                                       throws java.lang.Exception

  **For internal use only** Report the start of the scope of a namespace declaration.
  Specified by:
    startNamespaceDeclScope in interface org.apache.xerces.framework.XMLDocumentHandler

### endNamespaceDeclScope

    public final void endNamespaceDeclScope(int prefix)
                                     throws java.lang.Exception

  **For internal use only** Report the end of the scope of a namespace declaration.
  Specified by:
    endNamespaceDeclScope in interface org.apache.xerces.framework.XMLDocumentHandler

### internalSubset

    public final void internalSubset(int internalSubset)

  **For internal use only** Report when the internal subset is completely scanned.
  Specified by:
    internalSubset in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Overrides:
    internalSubset in class org.apache.xerces.framework.XMLParser

### startEntityReference

    public final void startEntityReference(int entityName,
                                           int entityType,
                                           int entityContext)
                                    throws java.lang.Exception

  **For internal use only** Start entity reference.
  Specified by:
    startEntityReference in interface org.apache.xerces.framework.XMLDocumentHandler

### endEntityReference

    public final void endEntityReference(int entityName,
                                         int entityType,
                                         int entityContext)
                                  throws java.lang.Exception

  **For internal use only** End entity reference.
  Specified by:
    endEntityReference in interface org.apache.xerces.framework.XMLDocumentHandler

### setFeature

    public void setFeature(java.lang.String featureId,
                           boolean state)
                    throws org.xml.sax.SAXNotRecognizedException,
                           org.xml.sax.SAXNotSupportedException

  **For internal use only** Set the state of any feature in a SAX2 parser. The parser might not recognize the feature, and if it does recognize it, it might not be able to fulfill the request.
  Parameters:
    `featureId` - The unique identifier (URI) of the feature.
    `state` - The requested state of the feature (true or false).
  Throws:
    org.xml.sax.SAXNotRecognizedException - If the requested feature is not known.
    org.xml.sax.SAXNotSupportedException - If the requested feature is known, but the requested state is not supported.
    org.xml.sax.SAXException - If there is any other problem fulfilling the request.
  Overrides:
    setFeature in class org.apache.xerces.framework.XMLParser

### xmlDecl

    public void xmlDecl(int version,
                        int encoding,
                        int standalone)
                 throws java.lang.Exception

  **For internal use only** Signal the XML declaration of a document
  Specified by:
    xmlDecl in interface org.apache.xerces.framework.XMLDocumentHandler
  Parameters:
    `version` - the handle in the string pool for the version number
    `encoding` - the handle in the string pool for the encoding
    `standalong` - the handle in the string pool for the standalone value
  Throws:
    java.lang.Exception -

### textDecl

    public void textDecl(int version,
                         int encoding)
                  throws java.lang.Exception

  **For internal use only** Signal the Text declaration of an external entity.
  Specified by:
    textDecl in interface org.apache.xerces.framework.XMLDocumentHandler
  Throws:
    java.lang.Exception -
  Overrides:
    textDecl in class org.apache.xerces.framework.XMLParser

### startDTD

    public final void startDTD(int rootElementType,
                               int publicId,
                               int systemId)
                        throws java.lang.Exception

  **For internal use only** This function will be called when a <!DOCTYPE...> declaration is encountered.

### endDTD

    public final void endDTD()
                      throws java.lang.Exception

  **For internal use only** This function will be called at the end of the DTD.
  Specified by:
    endDTD in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Overrides:
    endDTD in class org.apache.xerces.framework.XMLParser

### elementDecl

    public void elementDecl(org.apache.xerces.utils.QName elementDecl,
                            int contentSpecType,
                            int contentSpecIndex,
                            org.apache.xerces.framework.XMLContentSpec.Provider contentSpecProvider)
                     throws java.lang.Exception

  **For internal use only** <!ELEMENT Name contentspec>
  Specified by:
    elementDecl in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Overrides:
    elementDecl in class org.apache.xerces.framework.XMLParser

### attlistDecl

    public void attlistDecl(org.apache.xerces.utils.QName elementDecl,
                            org.apache.xerces.utils.QName attributeDecl,
                            int attType,
                            boolean attList,
                            java.lang.String enumString,
                            int attDefaultType,
                            int attDefaultValue)
                     throws java.lang.Exception

  **For internal use only** callback for an attribute list declaration.
  Specified by:
    attlistDecl in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Parameters:
    `elementType` - element handle for the attribute's element
    `attrName` - string pool index of the attribute name
    `attType` - type of attribute
    `enumString` - String representing the values of the enumeration, if the attribute is of enumerated type, or null if it is not.
    `attDefaultType` - an integer value denoting the DefaultDecl value
    `attDefaultValue` - string pool index of this attribute's default value or -1 if there is no defaultvalue
  Throws:
    java.lang.Exception -
  Overrides:
    attlistDecl in class org.apache.xerces.framework.XMLParser

### getIdentifier

    public final org.w3c.dom.Element getIdentifier(java.lang.String id)

  **For internal use only** Get the element identified by the ID.

### internalPEDecl

    public final void internalPEDecl(int entityName,
                                     int entityValue)
                              throws java.lang.Exception

  **For internal use only** <!ENTITY % Name EntityValue> (internal)
  Specified by:
    internalPEDecl in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Overrides:
    internalPEDecl in class org.apache.xerces.framework.XMLParser

### externalPEDecl

    public final void externalPEDecl(int entityName,
                                     int publicId,
                                     int systemId)
                              throws java.lang.Exception

  **For internal use only** <!ENTITY % Name ExternalID> (external)
  Specified by:
    externalPEDecl in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Overrides:
    externalPEDecl in class org.apache.xerces.framework.XMLParser

### internalEntityDecl

    public final void internalEntityDecl(int entityName,
                                         int entityValue)
                                  throws java.lang.Exception

  **For internal use only** <!ENTITY Name EntityValue> (internal)
  Specified by:
    internalEntityDecl in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Overrides:
    internalEntityDecl in class org.apache.xerces.framework.XMLParser

### externalEntityDecl

    public final void externalEntityDecl(int entityName,
                                         int publicId,
                                         int systemId)
                                  throws java.lang.Exception

  **For internal use only** <!ENTITY Name ExternalID> (external)
  Specified by:
    externalEntityDecl in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Overrides:
    externalEntityDecl in class org.apache.xerces.framework.XMLParser

### unparsedEntityDecl

    public final void unparsedEntityDecl(int entityName,
                                         int publicId,
                                         int systemId,
                                         int notationName)
                                  throws java.lang.Exception

  **For internal use only** <!ENTITY Name ExternalID NDataDecl> (unparsed)
  Specified by:
    unparsedEntityDecl in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Overrides:
    unparsedEntityDecl in class org.apache.xerces.framework.XMLParser

### notationDecl

    public final void notationDecl(int notationName,
                                   int publicId,
                                   int systemId)
                            throws java.lang.Exception

  **For internal use only** <!NOTATION Name ExternalId>
  Specified by:
    notationDecl in interface org.apache.xerces.framework.XMLDocumentHandler.DTDHandler
  Overrides:
    notationDecl in class org.apache.xerces.framework.XMLParser

### getDocument

    public final org.w3c.dom.Document getDocument()

  **For internal use only** Return the document proxy object.

### getFirstChild

    public final int getFirstChild(int position)

  **For internal use only** DTM read API: Given a node index, get the index of the node's first child. If not yet resolved, waits for more nodes to be added to the document and tries again
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    int DTM node-number of first child, or -1 to indicate none exists.

### getFirstAttribute

    public final int getFirstAttribute(int position)

  **For internal use only** DTM read API: Given a node index, get the index of the node's first child. If not yet resolved, waits for more nodes to be added to the document and tries again
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    int DTM node-number of first child, or -1 to indicate none exists.

### getNextAttribute

    public final int getNextAttribute(int position)

  **For internal use only** DTM read API: Given a node index, advance to the next attribute. If an element, we advance to its first attribute; if an attr, we advance to the next attr on the same node. If not yet resolved, waits for more nodes to be added to the document and tries again.
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    int DTM node-number of the resolved attr, or -1 to indicate none exists.

### getLastChild

    public final int getLastChild(int position)

  **For internal use only** DTM read API: Given a node index, advance to its last child. If not yet resolved, waits for more nodes to be added to the document and tries again. WARNING: DTM is asymmetric; this operation is resolved by search, and is relatively expensive.
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    int Node-number of last child, or -1 to indicate none exists.

### getNextSibling

    public final int getNextSibling(int position)

  **For internal use only** DTM read API: Given a node index, advance to its next sibling. If not yet resolved, waits for more nodes to be added to the document and tries again.
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    int Node-number of next sibling, or -1 to indicate none exists.

### getNextDescendant

    public final int getNextDescendant(int parentPos,
                                       int position)

  **For internal use only** DTM read API: Given a node index, advance to its next descendant. If not yet resolved, waits for more nodes to be added to the document and tries again.
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    int Node-number of next descendant, or -1 to indicate none exists.

### getNextNode

    public final int getNextNode(int parentPos,
                                 int position)

  **For internal use only** DTM read API: Given a node index, advance to its next sibling. If not yet resolved, waits for more nodes to be added to the document and tries again.
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    int Node-number of next sibling, or -1 to indicate none exists.

### getParent

    public final int getParent(int position)

  **For internal use only** DTM read API: Given a node index, find its parent node.
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    int Node-number of parent, or -1 to indicate none exists.

### getPreviousSibling

    public final int getPreviousSibling(int position)

  **For internal use only** DTM read API: Given a node index, find its preceeding sibling. WARNING: DTM is asymmetric; this operation is resolved by search, and is relatively expensive.
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    int Node-number of the previous sib, or -1 to indicate none exists.

### getNextPreceding

    public final int getNextPreceding(int startPos,
                                      int position)

  **For internal use only** DTM read API: Given a node index, advance to the preceding node. The preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes.
  Parameters:
    `startPos` - The position from where the axes is relative to.
    `postition` - int Index of this node's record.
  Returns:
    int Node-number of preceding sibling, or -1 to indicate none exists.

### getPrecedingOrAncestorOrSelf

    public final int getPrecedingOrAncestorOrSelf(int position)

  **For internal use only** DTM read API: Given a node index, advance to the preceding node. The preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes.
  Parameters:
    `startPos` - The position from where the axes is relative to.
    `postition` - int Index of this node's record.
  Returns:
    int Node-number of preceding sibling, or -1 to indicate none exists.

### getNodeName

    public final java.lang.String getNodeName(int position)

  **For internal use only** DTM read API: Given a node index, return its DOM-style node name.
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    String Name of this node.

### getLocalName

    public final java.lang.String getLocalName(int position)

  **For internal use only** DTM read API: Given a node index, return its DOM-style localname. (As defined in Namespaces, this is the portion of the name after any colon character)
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    String Local name of this node.

### getPrefix

    public final java.lang.String getPrefix(int position)

  **For internal use only** DTM read API: Given a node index, return its DOM-style name prefix. (As defined in Namespaces, this is the portion of the name before any colon character)
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    String prefix of this node's name, or null if no explicit namespace prefix was given.

### getNamespaceURI

    public final java.lang.String getNamespaceURI(int position)

  **For internal use only** DTM read API: Given a node index, return its DOM-style namespace URI (As defined in Namespaces, this is the declared URI which this node's prefix -- or default in lieu thereof -- was mapped to.)
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    String URI value of this node's namespace, or null if no namespace was resolved.

### getNodeValue

    public final java.lang.String getNodeValue(int position)

  **For internal use only** DTM read API: Given a node index, return its node value. This is mostly as defined by the DOM, but may ignore some conveniences.

  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    String Value of this node, or null if not meaningful for this node type.

### getNodeType

    public final int getNodeType(int position)

  **For internal use only** DTM read API: Given a node index, return its DOM-style node type.
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    int Node type, as per the DOM's Node._NODE constants.

### isIgnorableText

    public final boolean isIgnorableText(int position)

  **For internal use only** DTM read API: Given a node index, indicate whether the parser marked it as an ignorable-whitespace text node.
  Parameters:
    `postition` - int Index of this node's record.
  Returns:
    boolean true iff the node was created via an ignorableWhitespace event.

### display

    public final void display(int position)

  **For internal use only** DTM development API: Given a node index, write the node's contents in extremely terse form onto Standard Output.
  Parameters:
    `postition` - int Index of this node's record.

### dump

    public final void dump()

  **For internal use only** DTM development API: display() all the nodes in the DTM.
  See Also:
    `display`

### getCreateEntityReferenceNodes

    public final boolean getCreateEntityReferenceNodes()

  See Also:
    `#setCreateEntityReferenceNodes`

### dumpDTM

    public void dumpDTM()

Copyright © 2000 Apache XML Project. All Rights Reserved.