Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 6.0sp2 API Reference

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

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

public class DTM
extends XMLParser
implements java.lang.Runnable, XMLDocumentHandler, XMLDocumentHandler.DTDHandler

`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.

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.

Author:
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `DTMProxy`

Field Summary
`static java.lang.String` | `DEFAULT_PREFIX_STR`
`protected int` | `fAmpIndex`
`protected int` | `fAposIndex`
`protected int` | `fGtIndex`
`protected int` | `fLtIndex`
`protected int` | `fQuotIndex`

Fields inherited from class weblogic.apache.xerces.framework.XMLParser
`fEntityHandler, fErrorReporter, fGrammarResolver, fParseInProgress, fScanner, fStringPool, fValidator, SAX2_FEATURES_PREFIX, SAX2_PROPERTIES_PREFIX, XERCES_FEATURES_PREFIX, XERCES_PROPERTIES_PREFIX`

Constructor Summary
`DTM()` Construct a DTM.
`DTM(ProblemListener listener)` Construct a DTM.

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

Methods inherited from class weblogic.apache.xerces.framework.XMLParser
`addRecognizer, getAllowJavaEncodings, getContinueAfterFatalError, getEntityResolver, getErrorHandler, getExternalGeneralEntities, getExternalParameterEntities, getFeature, getFeaturesRecognized, getLoadDTDGrammar, getLocator, getNamespaces, getPropertiesRecognized, getProperty, getValidation, getValidationDynamic, getValidationSchema, getValidationWarnOnDuplicateAttdef, getValidationWarnOnUndeclaredElemdef, getXMLString, initHandlers, isFeatureRecognized, isPropertyRecognized, parse, parse, parseSome, parseSomeSetup, reportError, resetOrCopy, setAllowJavaEncodings, setContinueAfterFatalError, setEntityResolver, setErrorHandler, setExternalGeneralEntities, setExternalParameterEntities, setLoadDTDGrammar, setLocale, setNamespaces, setProperty, setReaderFactory, setUpFrontValidation, setValidation, setValidationDynamic, setValidationSchema, setValidationWarnOnDuplicateAttdef, setValidationWarnOnUndeclaredElemdef`

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

Field Detail

### DEFAULT_PREFIX_STR

    public static final java.lang.String DEFAULT_PREFIX_STR

### fAmpIndex

    protected int fAmpIndex

### fLtIndex

    protected int fLtIndex

### fGtIndex

    protected int fGtIndex

### fAposIndex

    protected int fAposIndex

### fQuotIndex

    protected int fQuotIndex

Constructor Detail

### DTM

    public DTM()

  Construct a DTM. This is the only constructor currently working.

  Parameters:
    `parser` - HookedXMLParser Input event-stream source.

### DTM

    public DTM(ProblemListener listener)

  Construct a DTM. This is the only constructor currently working.

  Parameters:
    `parser` - HookedXMLParser Input event-stream source.

Method Detail

### getStringPool

    public StringPool getStringPool()

  Make the string public.

### setInputSource

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

### setProblemListener

    public void setProblemListener(ProblemListener listener)

  Set the current problem listener.

### reset

    public void reset()
               throws java.lang.Exception

  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 XMLParser

### finalize

    protected void finalize()
                     throws java.lang.Throwable

  Overrides:
    finalize in class java.lang.Object

### run

    public void run()

  Run the parse thread.
  Specified by:
    run in interface java.lang.Runnable

### getNode

    public final DTMProxy getNode(int pos)

  Return a Node object that represents the index.

### startDocument

    public final void startDocument()

  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 XMLDocumentHandler

### startDocument

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

  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

  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 XMLDocumentHandler

  Throws:
    org.xml.sax.SAXException - Not used.

### startElement

    public final void startElement(QName qname,
                                   XMLAttrList xmlAttrList,
                                   int attrListIndex)

  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 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(QName name)

  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 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

  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 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(QName rootElement,
                         int publicId,
                         int systemId)
                  throws java.lang.Exception

  callback for the start of the DTD This function will be called when a <!DOCTYPE...> declaration is encountered.
  Specified by:
    startDTD in interface 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 -

### characters

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

  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

  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 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

  Start CDATA section.
  Specified by:
    startCDATA in interface XMLDocumentHandler

### endCDATA

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

  End CDATA section.
  Specified by:
    endCDATA in interface XMLDocumentHandler

### ignorableWhitespace

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

  Ignorable whitespace.
  Specified by:
    ignorableWhitespace in interface XMLDocumentHandler

### ignorableWhitespace

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

  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 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

  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

  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)

  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)

  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 XMLDocumentHandler

  Parameters:
    `dataIndex` - int Index of comment's contents in XML4J's symbol table

### processingInstruction

    public final void processingInstruction(int target,
                                            int data)

  XMLDocumentHandler API: Create a PI node.
  Specified by:
    processingInstruction in interface XMLDocumentHandler

  Parameters:
    `target` - int target processor name index
    `data` - int Index of PI parameters to be passed to that processor

### startNamespaceDeclScope

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

  Report the start of the scope of a namespace declaration.
  Specified by:
    startNamespaceDeclScope in interface XMLDocumentHandler

### endNamespaceDeclScope

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

  Report the end of the scope of a namespace declaration.
  Specified by:
    endNamespaceDeclScope in interface XMLDocumentHandler

### internalSubset

    public final void internalSubset(int internalSubset)

  Report when the internal subset is completely scanned.
  Specified by:
    internalSubset in interface XMLDocumentHandler.DTDHandler

### startEntityReference

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

  Start entity reference.
  Specified by:
    startEntityReference in interface XMLDocumentHandler

### endEntityReference

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

  End entity reference.
  Specified by:
    endEntityReference in interface XMLDocumentHandler

### setFeature

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

  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 XMLParser

### xmlDecl

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

  Signal the XML declaration of a document
  Specified by:
    xmlDecl in interface 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

  Signal the Text declaration of an external entity.
  Specified by:
    textDecl in interface XMLDocumentHandler

  Throws:
    java.lang.Exception -

### startDTD

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

  This function will be called when a <!DOCTYPE...> declaration is encountered.

### endDTD

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

  This function will be called at the end of the DTD.
  Specified by:
    endDTD in interface XMLDocumentHandler.DTDHandler

### elementDecl

    public void elementDecl(QName elementDecl,
                            int contentSpecType,
                            int contentSpecIndex,
                            XMLContentSpec.Provider contentSpecProvider)
                     throws java.lang.Exception

  <!ELEMENT Name contentspec>
  Specified by:
    elementDecl in interface XMLDocumentHandler.DTDHandler

### attlistDecl

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

  callback for an attribute list declaration.
  Specified by:
    attlistDecl in interface 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 -

### getIdentifier

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

  Get the element identified by the ID.

### internalPEDecl

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

  <!ENTITY % Name EntityValue> (internal)
  Specified by:
    internalPEDecl in interface XMLDocumentHandler.DTDHandler

### externalPEDecl

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

  <!ENTITY % Name ExternalID> (external)
  Specified by:
    externalPEDecl in interface XMLDocumentHandler.DTDHandler

### internalEntityDecl

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

  <!ENTITY Name EntityValue> (internal)
  Specified by:
    internalEntityDecl in interface XMLDocumentHandler.DTDHandler

### externalEntityDecl

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

  <!ENTITY Name ExternalID> (external)
  Specified by:
    externalEntityDecl in interface XMLDocumentHandler.DTDHandler

### unparsedEntityDecl

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

  <!ENTITY Name ExternalID NDataDecl> (unparsed)
  Specified by:
    unparsedEntityDecl in interface XMLDocumentHandler.DTDHandler

### notationDecl

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

  <!NOTATION Name ExternalId>
  Specified by:
    notationDecl in interface XMLDocumentHandler.DTDHandler

### getDocument

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

  Return the document proxy object.

### getFirstChild

    public final int getFirstChild(int position)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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()

  DTM development API: display() all the nodes in the DTM.

  See Also:
    `display`

### setCreateEntityReferenceNodes

    protected void setCreateEntityReferenceNodes(boolean create)

  This feature determines whether entity references within the document are included in the document tree as EntityReference nodes.

  Note: The children of the entity reference are always added to the document. This feature only affects whether an EntityReference node is also included as the parent of the entity reference children.

  Parameters:
    `create` - True to create entity reference nodes; false to only insert the entity reference children.
  See Also:
    `getCreateEntityReferenceNodes()`

### getCreateEntityReferenceNodes

    public final boolean getCreateEntityReferenceNodes()

  See Also:
    `setCreateEntityReferenceNodes(boolean)`

### dumpDTM

    public void dumpDTM()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs60
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD