org.apache.crimson.parser
Class Parser2

java.lang.Object
  extended byorg.apache.crimson.parser.Parser2
Direct Known Subclasses:
ValidatingParser

public class Parser2
extends Object

This implements a fast non-validating SAX2 parser. This one always processes external parsed entities, strictly adheres to the XML 1.0 specification, and provides useful diagnostics. It supports an optimization allowing faster processing of valid standalone XML documents. For multi-language applications (such as web servers using XML processing to create dynamic content), a method supports choosing a locale for parser diagnostics which is both understood by the message recipient and supported by the parser.

This conforms to the XML 1.0 specification. To configure an XML processor which tests document conformance against XML Namespaces, provide a DtdEventListener which examines declarations of entities and notations, and have your document listener check other constraints such as ensuring xmlns* attribute values properly declare all namespace prefixes. (Only element and attribute names may contain colons, and even then the name prefix before the colon must be properly declared.)

SAX parsers produce a stream of parse events, which applications process to create an object model which is specific to their tasks. Applications which do not want to process event streams in that way should use an API producing a standardized object model, such as the W3C's Document Object Model (DOM). This parser supports building fully conformant DOM Document objects, through use of DtdEventListener extensions to SAX in conjunction with an appropriate implementation of a SAX DocumentHandler. In addition, it supports some features (exposing comments, CDATA sections, and entity references) which are allowed by DOM but not required to be reported by conformant XML processors. (As usual, the default handler for parsing events other than fatal errors ignores them.)

Author:
David Brownell, Rajiv Mordani, Edwin Goei
See Also:
ValidatingParser

Nested Class Summary
(package private) static class Parser2.Catalog
           
(package private)  class Parser2.DocLocator
           
(package private) static class Parser2.NameCache
           
(package private) static class Parser2.NameCacheEntry
           
private static class Parser2.NullHandler
           
 
Field Summary
private  AttributesExImpl attTmp
           
private  char[] charTmp
           
private  org.xml.sax.ContentHandler contentHandler
           
private  org.xml.sax.ext.DeclHandler declHandler
           
private static int DEFAULT_ELEMENT_ATTRIBUTE_LIMIT
           
private static int DEFAULT_ENTITY_EXPANSION_LIMIT
           
private  boolean disallowDoctypeDecl
           
private  boolean doLexicalPE
           
private  boolean donePrologue
           
private  org.xml.sax.DTDHandler dtdHandler
           
private  int elementAttributeLimit
           
private  SimpleHashtable elements
           
(package private)  SimpleHashtable entities
           
private  int entityExpansionCount
           
private  int entityExpansionLimit
           
private  org.xml.sax.ErrorHandler errHandler
           
private  boolean fastStandalone
           
private  boolean ignoreDeclarations
           
private  InputEntity in
           
private  boolean inExternalPE
           
private  boolean isInAttribute
           
private  boolean isStandalone
           
private  boolean isValidating
           
private  org.xml.sax.ext.LexicalHandler lexicalHandler
           
private  Locale locale
           
private  org.xml.sax.Locator locator
           
(package private) static Parser2.Catalog messages
           
private  Parser2.NameCache nameCache
           
private  String[] namePartsTmp
           
private  boolean namespaces
           
private  char[] nameTmp
           
(package private)  Hashtable notations
           
private  Vector nsAttTmp
          nsAttTmp holds a list of namespace attributes used to check for #REQUIRED when validating and (namespaces == true && prefixes == false)
private  org.xml.sax.helpers.NamespaceSupport nsSupport
           
private static Parser2.NullHandler nullHandler
           
private  SimpleHashtable params
           
private  boolean prefixes
           
private  String propertyDisallowDoctypeDecl
           
private  String propertyElementAttributeLimit
           
private  String propertyEntityExpansionLimit
           
private  org.xml.sax.EntityResolver resolver
           
private  String rootElementName
           
(package private) static boolean SECURITY_DEBUG
           
private  boolean seenNSDecl
           
(package private) static String strANY
           
(package private) static String strEMPTY
           
private  StringBuffer strTmp
           
private static boolean supportValidation
           
(package private) static String SYSTEM_PROPERTY_DISALLOW_DOCTYPE_DECL
           
(package private) static String SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT
           
(package private) static String SYSTEM_PROPERTY_ENTITY_EXPANSION_LIMIT
           
private static String XmlLang
           
 
Constructor Summary
Parser2()
          Construct a SAX2 parser object
 
Method Summary
(package private)  void afterDocument()
           
(package private)  void afterRoot()
           
private  void builtin(String entityName, String entityValue)
           
 Locale chooseLocale(String[] languages)
          Chooses a client locale to use for diagnostics, using the first language specified in the list that is supported by this parser.
private  void content(ElementDecl element, boolean allowEOF, ElementValidator validator)
           
private  boolean defaultAttributes(ElementDecl element)
          Provide default attributes for an element and check for #REQUIRED attributes.
(package private)  void error(String messageId, Object[] parameters)
           
private  void expandEntityInContent(ElementDecl element, String name, ElementValidator validator)
           
private  void expandEntityInLiteral(String name, SimpleHashtable table, boolean isEntityValue)
           
private  void externalParameterEntity(ExternalEntity next)
           
private  boolean externalParsedEntity(ElementDecl element, ExternalEntity next, ElementValidator validator)
           
private  void fatal(String message)
           
private  void fatal(String message, Object[] parameters)
           
private  void fatal(String messageId, Object[] parameters, Exception e)
           
private  char getc()
           
private  ContentModel getcps(String element, InputEntity start)
           
private  ContentModel getFrequency(ContentModel original)
           
 Locale getLocale()
          Returns the diagnostic locale.
private  String getMarkupDeclname(String roleId, boolean qname)
           
private  void getMixed(String element, InputEntity start)
           
private  String getMixedOrChildren(ElementDecl element)
           
private  String getNmtoken()
           
private  String getQuotedString(String type, String extra)
           
private  void init()
           
 boolean isFastStandalone()
          Returns true if standalone documents skip processing of all external DTD information.
private  boolean isXmlLang(String value)
           
private  boolean maybeAttlistDecl()
           
private  boolean maybeComment(boolean skipStart)
           
private  boolean maybeConditionalSect()
           
private  boolean maybeDoctypeDecl()
           
private  boolean maybeElement(ElementValidator validator)
           
private  boolean maybeElementDecl()
           
private  boolean maybeEntityDecl()
           
private  ExternalEntity maybeExternalID()
           
private  String maybeGetName()
           
private  Parser2.NameCacheEntry maybeGetNameCacheEntry()
           
private  boolean maybeMarkupDecl()
           
private  void maybeMisc(boolean eofOK)
           
private  boolean maybeNotationDecl()
           
private  boolean maybePEReference()
           
private  boolean maybePI(boolean skipStart)
           
private  String maybeReadAttribute(String name, boolean must)
           
private  boolean maybeReferenceInContent(ElementDecl element, ElementValidator validator)
           
private  void maybeTextDecl()
           
private  boolean maybeWhitespace()
           
private  void maybeXmlDecl()
           
private  Parser2.NameCacheEntry nameCharString(char c)
           
(package private)  ContentModel newContentModel(char type, ContentModel next)
           
(package private)  ContentModel newContentModel(String tag)
           
(package private)  ElementValidator newValidator(ElementDecl element)
          To validate, subclassers should create an object that can accept valid streams of element names, text, and terminate.
private  void nextChar(char c, String location, String near)
           
private  String normalize(boolean invalidIfNeeded)
           
 void parse(org.xml.sax.InputSource in)
          SAX: Parse a document.
private  int parseCharNumber()
           
private  void parseInternal(org.xml.sax.InputSource input)
           
private  void parseLiteral(boolean isEntityValue)
           
private  String parsePublicId()
           
private  String parseSystemId()
           
private  boolean peek(String s)
           
private  InputEntity peekDeclaration(String s)
           
private  Vector processAttributeNS(String attQName, String type, String value, String defaultValue, boolean isSpecified, boolean isDefaulting, Vector exceptions)
          Process attributes for namespace support.
private  String[] processName(String qName, boolean isAttribute, boolean useException)
          Process a qualified (prefixed) name.
 void pushInputBuffer(char[] buf, int offset, int len)
          In support of the HTML DOM model of client side <xhtml:script> tag processing, this method permits data to be spliced into the input stream.
private  void pushReader(char[] buf, String name, boolean isGeneral)
           
private  boolean pushReader(ExternalEntity next)
           
private  void readEncoding(boolean must)
           
private  void readStandalone()
           
private  void readVersion(boolean must, String versionNum)
           
private  String resolveURI(String uri)
           
(package private)  void setContentHandler(org.xml.sax.ContentHandler handler)
           
(package private)  void setDeclHandler(org.xml.sax.ext.DeclHandler handler)
           
 void setDTDHandler(org.xml.sax.DTDHandler handler)
           
(package private)  void setEntityResolver(org.xml.sax.EntityResolver resolver)
           
(package private)  void setErrorHandler(org.xml.sax.ErrorHandler handler)
           
 void setFastStandalone(boolean value)
          Setting this flag enables faster processing of valid standalone documents: external DTD information is not processed, and no attribute normalization or defaulting is done.
private  void setHandlers()
           
(package private)  void setIsValidating(boolean value)
           
(package private)  void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
           
 void setLocale(Locale l)
          SAX: Used by applications to request locale for diagnostics.
(package private)  void setNamespaceFeatures(boolean namespaces, boolean prefixes)
          Set up the namespace related features for this parser.
(package private)  void setSecurityConstraintValues()
           
private  int surrogatesToCharTmp(int ucs4)
           
private  void ungetc()
           
(package private)  void validateAttributeSyntax(AttributeDecl attr, String value)
          To validate, subclassers should at this time make sure that values are of the declared types: ID and IDREF(S) values are Names NMTOKEN(S) are Nmtokens ENUMERATION values match one of the tokens NOTATION values match a notation name ENTITIY(IES) values match an unparsed external entity Separately, make sure IDREF values match some ID provided in the document (in the afterRoot method).
private  void warning(String messageId, Object[] parameters)
           
private  void whitespace(String roleId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

private InputEntity in

attTmp

private AttributesExImpl attTmp

strTmp

private StringBuffer strTmp

nameTmp

private char[] nameTmp

nameCache

private Parser2.NameCache nameCache

charTmp

private char[] charTmp

namePartsTmp

private String[] namePartsTmp

seenNSDecl

private boolean seenNSDecl

nsSupport

private org.xml.sax.helpers.NamespaceSupport nsSupport

nsAttTmp

private Vector nsAttTmp
nsAttTmp holds a list of namespace attributes used to check for #REQUIRED when validating and (namespaces == true && prefixes == false)


isValidating

private boolean isValidating

fastStandalone

private boolean fastStandalone

isInAttribute

private boolean isInAttribute

namespaces

private boolean namespaces

prefixes

private boolean prefixes

inExternalPE

private boolean inExternalPE

doLexicalPE

private boolean doLexicalPE

donePrologue

private boolean donePrologue

isStandalone

private boolean isStandalone

rootElementName

private String rootElementName

ignoreDeclarations

private boolean ignoreDeclarations

elements

private SimpleHashtable elements

params

private SimpleHashtable params

notations

Hashtable notations

entities

SimpleHashtable entities

contentHandler

private org.xml.sax.ContentHandler contentHandler

dtdHandler

private org.xml.sax.DTDHandler dtdHandler

resolver

private org.xml.sax.EntityResolver resolver

errHandler

private org.xml.sax.ErrorHandler errHandler

locale

private Locale locale

locator

private org.xml.sax.Locator locator

declHandler

private org.xml.sax.ext.DeclHandler declHandler

lexicalHandler

private org.xml.sax.ext.LexicalHandler lexicalHandler

disallowDoctypeDecl

private boolean disallowDoctypeDecl

propertyEntityExpansionLimit

private String propertyEntityExpansionLimit

propertyDisallowDoctypeDecl

private String propertyDisallowDoctypeDecl

propertyElementAttributeLimit

private String propertyElementAttributeLimit

entityExpansionCount

private int entityExpansionCount

entityExpansionLimit

private int entityExpansionLimit

elementAttributeLimit

private int elementAttributeLimit

DEFAULT_ENTITY_EXPANSION_LIMIT

private static final int DEFAULT_ENTITY_EXPANSION_LIMIT
See Also:
Constant Field Values

DEFAULT_ELEMENT_ATTRIBUTE_LIMIT

private static final int DEFAULT_ELEMENT_ATTRIBUTE_LIMIT
See Also:
Constant Field Values

supportValidation

private static final boolean supportValidation
See Also:
Constant Field Values

strANY

static final String strANY
See Also:
Constant Field Values

strEMPTY

static final String strEMPTY
See Also:
Constant Field Values

SYSTEM_PROPERTY_ENTITY_EXPANSION_LIMIT

static final String SYSTEM_PROPERTY_ENTITY_EXPANSION_LIMIT
See Also:
Constant Field Values

SYSTEM_PROPERTY_DISALLOW_DOCTYPE_DECL

static final String SYSTEM_PROPERTY_DISALLOW_DOCTYPE_DECL
See Also:
Constant Field Values

SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT

static final String SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT
See Also:
Constant Field Values

SECURITY_DEBUG

static final boolean SECURITY_DEBUG
See Also:
Constant Field Values

nullHandler

private static final Parser2.NullHandler nullHandler

XmlLang

private static final String XmlLang
See Also:
Constant Field Values

messages

static final Parser2.Catalog messages
Constructor Detail

Parser2

public Parser2()
Construct a SAX2 parser object

Method Detail

setNamespaceFeatures

void setNamespaceFeatures(boolean namespaces,
                          boolean prefixes)
Set up the namespace related features for this parser. SAX2 specifies these are read-only during a parse, read-write otherwise.


setEntityResolver

void setEntityResolver(org.xml.sax.EntityResolver resolver)

setDTDHandler

public void setDTDHandler(org.xml.sax.DTDHandler handler)

setContentHandler

void setContentHandler(org.xml.sax.ContentHandler handler)

setErrorHandler

void setErrorHandler(org.xml.sax.ErrorHandler handler)

setLexicalHandler

void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)

setDeclHandler

void setDeclHandler(org.xml.sax.ext.DeclHandler handler)

setLocale

public void setLocale(Locale l)
               throws org.xml.sax.SAXException
SAX: Used by applications to request locale for diagnostics.

Parameters:
l - The locale to use, or null to use system defaults (which may include only message IDs).
Throws:
org.xml.sax.SAXException - If no diagnostic messages are available in that locale.

getLocale

public Locale getLocale()
Returns the diagnostic locale.


chooseLocale

public Locale chooseLocale(String[] languages)
                    throws org.xml.sax.SAXException
Chooses a client locale to use for diagnostics, using the first language specified in the list that is supported by this parser. That locale is then set using setLocale(). Such a list could be provided by a variety of user preference mechanisms, including the HTTP Accept-Language header field.

Parameters:
languages - Array of language specifiers, ordered with the most preferable one at the front. For example, "en-ca" then "fr-ca", followed by "zh_CN". Both RFC 1766 and Java styles are supported.
Returns:
The chosen locale, or null.
Throws:
org.xml.sax.SAXException
See Also:
MessageCatalog

parse

public void parse(org.xml.sax.InputSource in)
           throws org.xml.sax.SAXException,
                  IOException
SAX: Parse a document.

Throws:
org.xml.sax.SAXException
IOException

setFastStandalone

public void setFastStandalone(boolean value)
Setting this flag enables faster processing of valid standalone documents: external DTD information is not processed, and no attribute normalization or defaulting is done. This optimization is only permitted in non-validating parsers; for validating parsers, this mode is silently disabled.

For documents which are declared as standalone, but which are not valid, a fatal error may be reported for references to externally defined entities. That could happen in any nonvalidating parser which did not read externally defined entities. Also, if any attribute values need normalization or defaulting, it will not be done.


isFastStandalone

public boolean isFastStandalone()
Returns true if standalone documents skip processing of all external DTD information.


pushInputBuffer

public void pushInputBuffer(char[] buf,
                            int offset,
                            int len)
                     throws org.xml.sax.SAXException
In support of the HTML DOM model of client side <xhtml:script> tag processing, this method permits data to be spliced into the input stream. This method would normally be called from an endElement callback to put the buffered result of calls such as DOM HTMLDocument.write into the input stream.

Throws:
org.xml.sax.SAXException

setIsValidating

void setIsValidating(boolean value)

init

private void init()

setSecurityConstraintValues

void setSecurityConstraintValues()

setHandlers

private void setHandlers()

builtin

private void builtin(String entityName,
                     String entityValue)

parseInternal

private void parseInternal(org.xml.sax.InputSource input)
                    throws org.xml.sax.SAXException,
                           IOException
Throws:
org.xml.sax.SAXException
IOException

afterRoot

void afterRoot()
         throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

afterDocument

void afterDocument()

whitespace

private void whitespace(String roleId)
                 throws IOException,
                        org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeWhitespace

private boolean maybeWhitespace()
                         throws IOException,
                                org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeGetName

private String maybeGetName()
                     throws IOException,
                            org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeGetNameCacheEntry

private Parser2.NameCacheEntry maybeGetNameCacheEntry()
                                               throws IOException,
                                                      org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

getNmtoken

private String getNmtoken()
                   throws org.xml.sax.SAXException,
                          IOException
Throws:
org.xml.sax.SAXException
IOException

nameCharString

private Parser2.NameCacheEntry nameCharString(char c)
                                       throws IOException,
                                              org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

parseLiteral

private void parseLiteral(boolean isEntityValue)
                   throws IOException,
                          org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

expandEntityInLiteral

private void expandEntityInLiteral(String name,
                                   SimpleHashtable table,
                                   boolean isEntityValue)
                            throws org.xml.sax.SAXException,
                                   IOException
Throws:
org.xml.sax.SAXException
IOException

getQuotedString

private String getQuotedString(String type,
                               String extra)
                        throws IOException,
                               org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

parsePublicId

private String parsePublicId()
                      throws IOException,
                             org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeComment

private boolean maybeComment(boolean skipStart)
                      throws IOException,
                             org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybePI

private boolean maybePI(boolean skipStart)
                 throws IOException,
                        org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeXmlDecl

private void maybeXmlDecl()
                   throws IOException,
                          org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeReadAttribute

private String maybeReadAttribute(String name,
                                  boolean must)
                           throws IOException,
                                  org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

readVersion

private void readVersion(boolean must,
                         String versionNum)
                  throws IOException,
                         org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeMisc

private void maybeMisc(boolean eofOK)
                throws IOException,
                       org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

getMarkupDeclname

private String getMarkupDeclname(String roleId,
                                 boolean qname)
                          throws IOException,
                                 org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeDoctypeDecl

private boolean maybeDoctypeDecl()
                          throws IOException,
                                 org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeMarkupDecl

private boolean maybeMarkupDecl()
                         throws IOException,
                                org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

readStandalone

private void readStandalone()
                     throws IOException,
                            org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

isXmlLang

private boolean isXmlLang(String value)

maybeElement

private boolean maybeElement(ElementValidator validator)
                      throws IOException,
                             org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

processAttributeNS

private Vector processAttributeNS(String attQName,
                                  String type,
                                  String value,
                                  String defaultValue,
                                  boolean isSpecified,
                                  boolean isDefaulting,
                                  Vector exceptions)
                           throws org.xml.sax.SAXException
Process attributes for namespace support. This is mostly common code that gets called from two places and was factored out. The isDefaulting param specifies where the code is called from.

Parameters:
isDefaulting - true iff we are processing this attribute from the defaultAttributes(...) method The namespace processing code is derived from the SAX2 ParserAdapter code. This code should be kept in sync with ParserAdapter bug fixes. Note: Modifies seenNSDecl iff a xmlns attribute, ie a namespace decl, was found. Modifies attTmp and nsAttTmp.
Throws:
org.xml.sax.SAXException

processName

private String[] processName(String qName,
                             boolean isAttribute,
                             boolean useException)
                      throws org.xml.sax.SAXException
Process a qualified (prefixed) name.

If the name has an undeclared prefix, use only the qname and make an ErrorHandler.error callback in case the app is interested.

Parameters:
qName - The qualified (prefixed) name.
isAttribute - true if this is an attribute name.
Returns:
The name split into three parts.
Throws:
org.xml.sax.SAXException - The client may throw an exception if there is an error callback.

newValidator

ElementValidator newValidator(ElementDecl element)
To validate, subclassers should create an object that can accept valid streams of element names, text, and terminate.


validateAttributeSyntax

void validateAttributeSyntax(AttributeDecl attr,
                             String value)
                       throws org.xml.sax.SAXException
To validate, subclassers should at this time make sure that values are of the declared types:

Separately, make sure IDREF values match some ID provided in the document (in the afterRoot method).

Throws:
org.xml.sax.SAXException

defaultAttributes

private boolean defaultAttributes(ElementDecl element)
                           throws org.xml.sax.SAXException
Provide default attributes for an element and check for #REQUIRED attributes. Note: this method accesses attTmp and nsAttTmp

Throws:
org.xml.sax.SAXException

content

private void content(ElementDecl element,
                     boolean allowEOF,
                     ElementValidator validator)
              throws IOException,
                     org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeElementDecl

private boolean maybeElementDecl()
                          throws IOException,
                                 org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

getMixedOrChildren

private String getMixedOrChildren(ElementDecl element)
                           throws IOException,
                                  org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

newContentModel

ContentModel newContentModel(String tag)

newContentModel

ContentModel newContentModel(char type,
                             ContentModel next)

getcps

private ContentModel getcps(String element,
                            InputEntity start)
                     throws IOException,
                            org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

getFrequency

private ContentModel getFrequency(ContentModel original)
                           throws IOException,
                                  org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

getMixed

private void getMixed(String element,
                      InputEntity start)
               throws IOException,
                      org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeAttlistDecl

private boolean maybeAttlistDecl()
                          throws IOException,
                                 org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

normalize

private String normalize(boolean invalidIfNeeded)
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

maybeConditionalSect

private boolean maybeConditionalSect()
                              throws IOException,
                                     org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeReferenceInContent

private boolean maybeReferenceInContent(ElementDecl element,
                                        ElementValidator validator)
                                 throws IOException,
                                        org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

parseCharNumber

private int parseCharNumber()
                     throws org.xml.sax.SAXException,
                            IOException
Throws:
org.xml.sax.SAXException
IOException

surrogatesToCharTmp

private int surrogatesToCharTmp(int ucs4)
                         throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

expandEntityInContent

private void expandEntityInContent(ElementDecl element,
                                   String name,
                                   ElementValidator validator)
                            throws org.xml.sax.SAXException,
                                   IOException
Throws:
org.xml.sax.SAXException
IOException

maybePEReference

private boolean maybePEReference()
                          throws IOException,
                                 org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeEntityDecl

private boolean maybeEntityDecl()
                         throws IOException,
                                org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeExternalID

private ExternalEntity maybeExternalID()
                                throws IOException,
                                       org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

parseSystemId

private String parseSystemId()
                      throws IOException,
                             org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

resolveURI

private String resolveURI(String uri)
                   throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

maybeTextDecl

private void maybeTextDecl()
                    throws IOException,
                           org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

externalParsedEntity

private boolean externalParsedEntity(ElementDecl element,
                                     ExternalEntity next,
                                     ElementValidator validator)
                              throws IOException,
                                     org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

externalParameterEntity

private void externalParameterEntity(ExternalEntity next)
                              throws IOException,
                                     org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

readEncoding

private void readEncoding(boolean must)
                   throws IOException,
                          org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

maybeNotationDecl

private boolean maybeNotationDecl()
                           throws IOException,
                                  org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

getc

private char getc()
           throws IOException,
                  org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

ungetc

private void ungetc()

peek

private boolean peek(String s)
              throws IOException,
                     org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

peekDeclaration

private InputEntity peekDeclaration(String s)
                             throws IOException,
                                    org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

nextChar

private void nextChar(char c,
                      String location,
                      String near)
               throws IOException,
                      org.xml.sax.SAXException
Throws:
IOException
org.xml.sax.SAXException

pushReader

private void pushReader(char[] buf,
                        String name,
                        boolean isGeneral)
                 throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

pushReader

private boolean pushReader(ExternalEntity next)
                    throws org.xml.sax.SAXException,
                           IOException
Throws:
org.xml.sax.SAXException
IOException

warning

private void warning(String messageId,
                     Object[] parameters)
              throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

error

void error(String messageId,
           Object[] parameters)
     throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

fatal

private void fatal(String message)
            throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

fatal

private void fatal(String message,
                   Object[] parameters)
            throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

fatal

private void fatal(String messageId,
                   Object[] parameters,
                   Exception e)
            throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException