XML for Java 2.0.15

com.ibm.xml.parsers
Class NonValidatingTXDOMParser

java.lang.Object
  |
  +--com.ibm.xml.framework.XMLParser
        |
        +--com.ibm.xml.parsers.NonValidatingTXDOMParser
Direct Known Subclasses:
TXDOMParser

public class NonValidatingTXDOMParser
extends XMLParser

Version:
Revision: 53 1.24 src/com/ibm/xml/parsers/NonValidatingTXDOMParser.java, parser, xml4j2, xml4j2_0_15

Field Summary
static boolean DEBUG
           
protected  Node fCurrentNode
           
protected  Node fCurrentParent
           
protected  com.ibm.xml.parser.TXDocument fDocument
           
protected  java.lang.String fDocumentClass
           
protected  com.ibm.xml.parser.DTD fDocumentType
           
protected  com.ibm.xml.parser.EntityPool fEntityPool
           
protected  boolean fExpandEntityReferences
           
protected  java.util.Stack fNodeStack
           
protected  boolean fNormalizeTextNodes
           
protected  int fRootElementName
           
protected  boolean fWithinElement
           
 
Fields inherited from class com.ibm.xml.framework.XMLParser
fLocale, fNeedReset, fParseInProgress, fResourceBundle, fScanner
 
Constructor Summary
NonValidatingTXDOMParser()
           
 
Method Summary
 void attlistDecl(int elementIndex, int attDefIndex)
          This function builds a TX-style AttList and AttDef and add as child to the DTD.
protected  com.ibm.xml.parser.CMNode buildCMNode(int elementIndex, int contentSpecIndex)
          This function builds the TX-style CMNodes for an ElementDecl and returns the top level com.ibm.xml.parser.CMNode.
 void characters(char[] ch, int start, int length, boolean cdataSection)
          Not called.
 void characters(int dataIndex, boolean cdataSection)
           
protected  void checkHandlers()
           
 void comment(int dataIndex)
           
 void doctypeDecl(int rootElementNameIndex)
          This function will be called when a <!DOCTYPE...> declaration is encountered.
 void elementDecl(int elementIndex)
          Build the TX-style CMNodes and ElementDecl and attatch to the fDocumentType (DTD)
 void endDocument()
           
 void endElement(int elementNameIndex)
           
 void endEntityReference(int entityIndex)
           
 void endExternalSubset()
          This function will be called at the end of the "external subset" of a doctype declaration.
 void endInternalSubset()
          This function will be called at the end of the "internal subset" of a doctype declaration.
 void externalEntityDecl(int entityIndex)
          Append an external EntityDecl as a Child to the DTD.
 Document getDocument()
           
 boolean getExpandEntityReferences()
          Return a boolean which says whether EntityReference Nodes are expanded (replaced) by this parser.
 void ignorableWhitespace(char[] ch, int start, int length, boolean cdataSection)
          Not called.
 void ignorableWhitespace(int dataIndex, boolean cdataSection)
           
protected  void init()
           
 void internalEntityDecl(int entityIndex)
          Append an internal EntityDecl as a Child to the DTD.
 void notationDecl(int notationIndex)
          Append an TXNotation as a Child to the DTD.
 void parameterEntityDecl(int entityIndex)
          workaround for TX: getParameterEntityEnumeration()
 void processingInstruction(int targetIndex, int dataIndex)
           
 void reset()
           
protected  void resetOrCopy()
           
 void setDocumentClass(java.lang.String documentClass)
           
 void setExpandEntityReferences(boolean expand)
          Sets whether EntityReference Nodes are expanded (replaced) by this parser.
 void setNormalizeTextNodes(boolean normalize)
           
 void startDocument(int versionIndex, int encodingIndex, int standAloneIndex)
           
 void startElement(int elementNameIndex, int attrListIndex)
           
 void startEntityReference(int entityIndex)
           
 void startExternalSubset(int publicIdStringIndex, int systemIdStringIndex)
          This function will be called at the start of the "external subset" of a doctype declaration.
 void startInternalSubset()
          This function will be called at the start of the "internal subset" of a doctype declaration.
 void unparsedEntityDecl(int entityIndex)
          Append an unparsed external EntityDecl as a Child to the DTD.
 
Methods inherited from class com.ibm.xml.framework.XMLParser
error, error1, error2, error3, error4, errorHandlingEnabled, getAllowJavaEncodingName, getCheckNamespace, getContinueAfterFatalError, getDocumentHandler, getDocumentTypeHandler, getEntityHandler, getErrorHandler, getErrorMsgString, getLocator, getParserState, getScanner, getValidationHandler, getWarningOnDuplicateAttDef, handleError, isFatal, isWarning, loadCatalog, parse, parse, sendCharDataAsCharArray, setAllowJavaEncodingName, setCheckNamespace, setContinueAfterFatalError, setDocumentHandler, setDocumentHandler, setDocumentTypeHandler, setDTDHandler, setEntityHandler, setEntityResolver, setErrorHandler, setLocale, setValidationHandler, setWarningOnDuplicateAttDef, useDefaultValidationHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG

fDocumentClass

protected java.lang.String fDocumentClass

fRootElementName

protected int fRootElementName

fDocument

protected com.ibm.xml.parser.TXDocument fDocument

fDocumentType

protected com.ibm.xml.parser.DTD fDocumentType

fEntityPool

protected com.ibm.xml.parser.EntityPool fEntityPool

fCurrentParent

protected Node fCurrentParent

fCurrentNode

protected Node fCurrentNode

fNodeStack

protected java.util.Stack fNodeStack

fWithinElement

protected boolean fWithinElement

fNormalizeTextNodes

protected boolean fNormalizeTextNodes

fExpandEntityReferences

protected boolean fExpandEntityReferences
Constructor Detail

NonValidatingTXDOMParser

public NonValidatingTXDOMParser()
Method Detail

reset

public void reset()
Overrides:
reset in class XMLParser

resetOrCopy

protected void resetOrCopy()
Overrides:
resetOrCopy in class XMLParser

init

protected void init()

checkHandlers

protected void checkHandlers()
                      throws java.lang.Exception
Overrides:
checkHandlers in class XMLParser

setNormalizeTextNodes

public void setNormalizeTextNodes(boolean normalize)

setExpandEntityReferences

public void setExpandEntityReferences(boolean expand)
Sets whether EntityReference Nodes are expanded (replaced) by this parser. Expanded means that the children of the EntityReference Node replace it.

The default value is false, EntityReference Nodes are kept.

Parameters:
keep - =true means expanding entity references; =false means maintain entity references.
See Also:
EntityReference, GeneralReference

getExpandEntityReferences

public boolean getExpandEntityReferences()
Return a boolean which says whether EntityReference Nodes are expanded (replaced) by this parser. Expanded means that the children of the EntityReference Node replace it.

The default value is false, EntityReference Nodes are kept.

Parameters:
keep - =true means expanding entity references; =false means maintain entity references.
See Also:
EntityReference, GeneralReference

doctypeDecl

public void doctypeDecl(int rootElementNameIndex)
                 throws java.lang.Exception
This function will be called when a <!DOCTYPE...> declaration is encountered.

startInternalSubset

public void startInternalSubset()
                         throws java.lang.Exception
This function will be called at the start of the "internal subset" of a doctype declaration.

endInternalSubset

public void endInternalSubset()
                       throws java.lang.Exception
This function will be called at the end of the "internal subset" of a doctype declaration.

startExternalSubset

public void startExternalSubset(int publicIdStringIndex,
                                int systemIdStringIndex)
                         throws java.lang.Exception
This function will be called at the start of the "external subset" of a doctype declaration.

endExternalSubset

public void endExternalSubset()
                       throws java.lang.Exception
This function will be called at the end of the "external subset" of a doctype declaration.

elementDecl

public void elementDecl(int elementIndex)
                 throws java.lang.Exception
Build the TX-style CMNodes and ElementDecl and attatch to the fDocumentType (DTD)

buildCMNode

protected com.ibm.xml.parser.CMNode buildCMNode(int elementIndex,
                                                int contentSpecIndex)
This function builds the TX-style CMNodes for an ElementDecl and returns the top level com.ibm.xml.parser.CMNode.

attlistDecl

public void attlistDecl(int elementIndex,
                        int attDefIndex)
                 throws java.lang.Exception
This function builds a TX-style AttList and AttDef and add as child to the DTD.

internalEntityDecl

public void internalEntityDecl(int entityIndex)
                        throws java.lang.Exception
Append an internal EntityDecl as a Child to the DTD.

externalEntityDecl

public void externalEntityDecl(int entityIndex)
                        throws java.lang.Exception
Append an external EntityDecl as a Child to the DTD.

unparsedEntityDecl

public void unparsedEntityDecl(int entityIndex)
                        throws java.lang.Exception
Append an unparsed external EntityDecl as a Child to the DTD.

parameterEntityDecl

public void parameterEntityDecl(int entityIndex)
workaround for TX: getParameterEntityEnumeration()

notationDecl

public void notationDecl(int notationIndex)
                  throws java.lang.Exception
Append an TXNotation as a Child to the DTD.

setDocumentClass

public void setDocumentClass(java.lang.String documentClass)

getDocument

public Document getDocument()

startDocument

public void startDocument(int versionIndex,
                          int encodingIndex,
                          int standAloneIndex)
                   throws java.lang.Exception

endDocument

public void endDocument()
                 throws java.lang.Exception

startElement

public void startElement(int elementNameIndex,
                         int attrListIndex)
                  throws java.lang.Exception

endElement

public void endElement(int elementNameIndex)
                throws java.lang.Exception

startEntityReference

public void startEntityReference(int entityIndex)
                          throws java.lang.Exception

endEntityReference

public void endEntityReference(int entityIndex)
                        throws java.lang.Exception

characters

public void characters(int dataIndex,
                       boolean cdataSection)
                throws java.lang.Exception

ignorableWhitespace

public void ignorableWhitespace(int dataIndex,
                                boolean cdataSection)
                         throws java.lang.Exception

processingInstruction

public void processingInstruction(int targetIndex,
                                  int dataIndex)
                           throws java.lang.Exception

comment

public void comment(int dataIndex)
             throws java.lang.Exception

characters

public void characters(char[] ch,
                       int start,
                       int length,
                       boolean cdataSection)
                throws java.lang.Exception
Not called.

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length,
                                boolean cdataSection)
                         throws java.lang.Exception
Not called.

XML for Java 2.0.15