public abstract class

AbstractSAXParser

extends AbstractXMLDocumentParser
implements PSVIProvider Parser XMLReader
java.lang.Object
   ↳ org.apache.xerces.parsers.XMLParser
     ↳ org.apache.xerces.parsers.AbstractXMLDocumentParser
       ↳ org.apache.xerces.parsers.AbstractSAXParser
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This is the base class of all SAX parsers. It implements both the SAX1 and SAX2 parser functionality, while the actual pipeline is defined in the parser configuration.

Summary

Nested Classes
class AbstractSAXParser.AttributesProxy  
class AbstractSAXParser.LocatorProxy  
Constants
String ALLOW_UE_AND_NOTATION_EVENTS Feature identifier: allow notation and unparsed entity events to be sent out of order.
String DECLARATION_HANDLER Property id: declaration handler.
String DOM_NODE Property id: DOM node.
String LEXICAL_HANDLER Property id: lexical handler.
String NAMESPACES Feature identifier: namespaces.
String STRING_INTERNING Feature id: string interning.
[Expand]
Inherited Constants
From class org.apache.xerces.parsers.XMLParser
From interface org.apache.xerces.xni.XMLDTDContentModelHandler
From interface org.apache.xerces.xni.XMLDTDHandler
Fields
protected ContentHandler fContentHandler Content handler.
protected DTDHandler fDTDHandler DTD handler.
protected DeclHandler fDeclHandler Decl handler.
protected SymbolHash fDeclaredAttrs
protected DocumentHandler fDocumentHandler Document handler.
protected LexicalHandler fLexicalHandler Lexical handler.
protected boolean fLexicalHandlerParameterEntities Lexical handler parameter entities.
protected NamespaceContext fNamespaceContext Namespace context
protected boolean fNamespacePrefixes Namespace prefixes.
protected boolean fNamespaces Namespaces.
protected boolean fParseInProgress True if a parse is in progress.
protected QName fQName
protected boolean fResolveDTDURIs Resolve DTD URIs.
protected boolean fStandalone Standalone document declaration.
protected boolean fUseEntityResolver2 Use EntityResolver2.
protected String fVersion
protected boolean fXMLNSURIs XMLNS URIs: Namespace declarations in the http://www.w3.org/2000/xmlns/ namespace.
[Expand]
Inherited Fields
From class org.apache.xerces.parsers.AbstractXMLDocumentParser
From class org.apache.xerces.parsers.XMLParser
Protected Constructors
AbstractSAXParser(XMLParserConfiguration config)
Default constructor.
Public Methods
void attributeDecl(String elementName, String attributeName, String type, String[] enumeration, String defaultType, XMLString defaultValue, XMLString nonNormalizedDefaultValue, Augmentations augs)
An attribute declaration.
void characters(XMLString text, Augmentations augs)
Character content.
void comment(XMLString text, Augmentations augs)
A comment.
void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs)
Notifies of the presence of the DOCTYPE line in the document.
void elementDecl(String name, String contentModel, Augmentations augs)
An element declaration.
void endCDATA(Augmentations augs)
The end of a CDATA section.
void endDTD(Augmentations augs)
The end of the DTD.
void endDocument(Augmentations augs)
The end of the document.
void endElement(QName element, Augmentations augs)
The end of an element.
void endExternalSubset(Augmentations augs)
The end of the DTD external subset.
void endGeneralEntity(String name, Augmentations augs)
This method notifies the end of an entity.
void endParameterEntity(String name, Augmentations augs)
This method notifies the end of an entity.
void externalEntityDecl(String name, XMLResourceIdentifier identifier, Augmentations augs)
An external entity declaration.
AttributePSVI getAttributePSVI(int index)
Provides AttributePSVI given the index of an attribute information item in the current element's attribute list.
AttributePSVI getAttributePSVIByName(String uri, String localname)
Provides AttributePSVI given the namespace name and the local name of an attribute information item in the current element's attribute list.
ContentHandler getContentHandler()
Return the current content handler.
DTDHandler getDTDHandler()
Return the current DTD handler.
ElementPSVI getElementPSVI()
Provides the post schema validation item for the current element information item.
EntityResolver getEntityResolver()
Return the current entity resolver.
ErrorHandler getErrorHandler()
Return the current error handler.
boolean getFeature(String featureId)
Query the state of a feature.
Object getProperty(String propertyId)
Query the value of a property.
void ignorableWhitespace(XMLString text, Augmentations augs)
Ignorable whitespace.
void internalEntityDecl(String name, XMLString text, XMLString nonNormalizedText, Augmentations augs)
An internal entity declaration.
void notationDecl(String name, XMLResourceIdentifier identifier, Augmentations augs)
A notation declaration
void parse(String systemId)
Parses the input source specified by the given system identifier.
void parse(InputSource inputSource)
parse
void processingInstruction(String target, XMLString data, Augmentations augs)
A processing instruction.
void reset()
Reset all components before parsing.
void setContentHandler(ContentHandler contentHandler)
Allow an application to register a content event handler.
void setDTDHandler(DTDHandler dtdHandler)
Allow an application to register a DTD event handler.
void setDocumentHandler(DocumentHandler documentHandler)
Allow an application to register a document event handler.
void setEntityResolver(EntityResolver resolver)
Sets the resolver used to resolve external entities.
void setErrorHandler(ErrorHandler errorHandler)
Allow an application to register an error event handler.
void setFeature(String featureId, boolean state)
Set the state of any feature in a SAX2 parser.
void setLocale(Locale locale)
Set the locale to use for messages.
void setProperty(String propertyId, Object value)
Set the value of any property in a SAX2 parser.
void startCDATA(Augmentations augs)
The start of a CDATA section.
void startDocument(XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs)
The start of the document.
void startElement(QName element, XMLAttributes attributes, Augmentations augs)
The start of an element.
void startExternalSubset(XMLResourceIdentifier identifier, Augmentations augs)
The start of the DTD external subset.
void startGeneralEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs)
This method notifies of the start of an entity.
void startParameterEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs)
This method notifies of the start of parameter entity.
void unparsedEntityDecl(String name, XMLResourceIdentifier identifier, String notation, Augmentations augs)
An unparsed entity declaration.
void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
Notifies of the presence of an XMLDecl line in the document.
Protected Methods
final void endNamespaceMapping()
Send endPrefixMapping events
DeclHandler getDeclHandler()
Returns the DTD declaration event handler.
LexicalHandler getLexicalHandler()
Returns the lexical handler.
void setDeclHandler(DeclHandler handler)
Set the DTD declaration event handler.
void setLexicalHandler(LexicalHandler handler)
Set the lexical event handler.
final void startNamespaceMapping()
Send startPrefixMapping events
[Expand]
Inherited Methods
From class org.apache.xerces.parsers.AbstractXMLDocumentParser
From class org.apache.xerces.parsers.XMLParser
From class java.lang.Object
From interface org.apache.xerces.xni.XMLDTDContentModelHandler
From interface org.apache.xerces.xni.XMLDTDHandler
From interface org.apache.xerces.xni.XMLDocumentHandler
From interface org.apache.xerces.xs.PSVIProvider
From interface org.xml.sax.Parser
From interface org.xml.sax.XMLReader

Constants

protected static final String ALLOW_UE_AND_NOTATION_EVENTS

Feature identifier: allow notation and unparsed entity events to be sent out of order.

Constant Value: "http://xml.org/sax/features/allow-dtd-events-after-endDTD"

protected static final String DECLARATION_HANDLER

Property id: declaration handler.

Constant Value: "http://xml.org/sax/properties/declaration-handler"

protected static final String DOM_NODE

Property id: DOM node.

Constant Value: "http://xml.org/sax/properties/dom-node"

protected static final String LEXICAL_HANDLER

Property id: lexical handler.

Constant Value: "http://xml.org/sax/properties/lexical-handler"

protected static final String NAMESPACES

Feature identifier: namespaces.

Constant Value: "http://xml.org/sax/features/namespaces"

protected static final String STRING_INTERNING

Feature id: string interning.

Constant Value: "http://xml.org/sax/features/string-interning"

Fields

protected ContentHandler fContentHandler

Content handler.

protected DTDHandler fDTDHandler

DTD handler.

protected DeclHandler fDeclHandler

Decl handler.

protected SymbolHash fDeclaredAttrs

protected DocumentHandler fDocumentHandler

Document handler.

protected LexicalHandler fLexicalHandler

Lexical handler.

protected boolean fLexicalHandlerParameterEntities

Lexical handler parameter entities.

protected NamespaceContext fNamespaceContext

Namespace context

protected boolean fNamespacePrefixes

Namespace prefixes.

protected boolean fNamespaces

Namespaces.

protected boolean fParseInProgress

True if a parse is in progress. This state is needed because some features/properties cannot be set while parsing (e.g. validation and namespaces).

protected QName fQName

protected boolean fResolveDTDURIs

Resolve DTD URIs.

protected boolean fStandalone

Standalone document declaration.

protected boolean fUseEntityResolver2

Use EntityResolver2.

protected String fVersion

protected boolean fXMLNSURIs

XMLNS URIs: Namespace declarations in the http://www.w3.org/2000/xmlns/ namespace.

Protected Constructors

protected AbstractSAXParser (XMLParserConfiguration config)

Default constructor.

Public Methods

public void attributeDecl (String elementName, String attributeName, String type, String[] enumeration, String defaultType, XMLString defaultValue, XMLString nonNormalizedDefaultValue, Augmentations augs)

An attribute declaration.

Parameters
elementName The name of the element that this attribute is associated with.
attributeName The name of the attribute.
type The attribute type. This value will be one of the following: "CDATA", "ENTITY", "ENTITIES", "ENUMERATION", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", or "NOTATION".
enumeration If the type has the value "ENUMERATION" or "NOTATION", this array holds the allowed attribute values; otherwise, this array is null.
defaultType The attribute default type. This value will be one of the following: "#FIXED", "#IMPLIED", "#REQUIRED", or null.
defaultValue The attribute default value, or null if no default value is specified.
nonNormalizedDefaultValue The attribute default value with no normalization performed, or null if no default value is specified.
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public void characters (XMLString text, Augmentations augs)

Character content.

Parameters
text The content.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void comment (XMLString text, Augmentations augs)

A comment.

Parameters
text The text in the comment.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by application to signal an error.

public void doctypeDecl (String rootElement, String publicId, String systemId, Augmentations augs)

Notifies of the presence of the DOCTYPE line in the document.

Parameters
rootElement The name of the root element.
publicId The public identifier if an external DTD or null if the external DTD is specified using SYSTEM.
systemId The system identifier if an external DTD, null otherwise.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void elementDecl (String name, String contentModel, Augmentations augs)

An element declaration.

Parameters
name The name of the element.
contentModel The element content model.
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public void endCDATA (Augmentations augs)

The end of a CDATA section.

Parameters
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void endDTD (Augmentations augs)

The end of the DTD.

Parameters
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public void endDocument (Augmentations augs)

The end of the document.

Parameters
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void endElement (QName element, Augmentations augs)

The end of an element.

Parameters
element The name of the element.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void endExternalSubset (Augmentations augs)

The end of the DTD external subset.

Parameters
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public void endGeneralEntity (String name, Augmentations augs)

This method notifies the end of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entity names are just the entity name.

Note: Since the document is an entity, the handler will be notified of the end of the document entity by calling the endEntity method with the entity name "[xml]" after calling the endDocument method. When exposing entity boundaries through the SAX API, the document entity is never reported, however.

Note: This method is not called for entity references appearing as part of attribute values.

Parameters
name The name of the entity.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void endParameterEntity (String name, Augmentations augs)

This method notifies the end of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entity names are just the entity name.

Note: Since the document is an entity, the handler will be notified of the end of the document entity by calling the endEntity method with the entity name "[xml]" after calling the endDocument method. When exposing entity boundaries through the SAX API, the document entity is never reported, however.

Note: This method is not called for entity references appearing as part of attribute values.

Parameters
name The name of the parameter entity.
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public void externalEntityDecl (String name, XMLResourceIdentifier identifier, Augmentations augs)

An external entity declaration.

Parameters
name The name of the entity. Parameter entity names start with '%', whereas the name of a general entity is just the entity name.
identifier An object containing all location information pertinent to this entity.
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public AttributePSVI getAttributePSVI (int index)

Provides AttributePSVI given the index of an attribute information item in the current element's attribute list. The method must be called by an application while in the scope of the methods which report the start and end of an element at a point where the attribute list is available. For example, for SAX the method must be called while in the scope of the document handler's startElement call. If the method is called outside of the specified scope, the return value is undefined.

Parameters
index The attribute index.
Returns
  • The post schema validation properties of the attribute.

public AttributePSVI getAttributePSVIByName (String uri, String localname)

Provides AttributePSVI given the namespace name and the local name of an attribute information item in the current element's attribute list. The method must be called by an application while in the scope of the methods which report the start and end of an element at a point where the attribute list is available. For example, for SAX the method must be called while in the scope of the document handler's startElement call. If the method is called outside of the specified scope, the return value is undefined.

Parameters
uri The namespace name of an attribute.
localname The local name of an attribute.
Returns
  • The post schema validation properties of the attribute.

public ContentHandler getContentHandler ()

Return the current content handler.

Returns
  • The current content handler, or null if none has been registered.

public DTDHandler getDTDHandler ()

Return the current DTD handler.

Returns
  • The current DTD handler, or null if none has been registered.

public ElementPSVI getElementPSVI ()

Provides the post schema validation item for the current element information item. The method must be called by an application while in the scope of the methods which report the start and end of an element. For example, for SAX the method must be called within the scope of the document handler's startElement or endElement call. If the method is called outside of the specified scope, the return value is undefined.

Returns
  • The post schema validation infoset for the current element. If an element information item is valid, then in the post-schema-validation infoset the following properties must be available for the element information item: The following properties are available in the scope of the method that reports the start of an element: {element declaration}, {validation context}, {notation}. The {schema information} property is available for the validation root. The {error codes} property is available if any errors occured during validation. The following properties are available in the scope of the method that reports the end of an element: {nil}, {schema specified}, {normalized value},{ member type definition}, {validity}, {validation attempted} . If the declaration has a value constraint, the property {schema default} is available. The {error codes} property is available if any errors occured during validation. Note: some processors may choose to provide all the PSVI properties in the scope of the method that reports the end of an element.

public EntityResolver getEntityResolver ()

Return the current entity resolver.

Returns
  • The current entity resolver, or null if none has been registered.

public ErrorHandler getErrorHandler ()

Return the current error handler.

Returns
  • The current error handler, or null if none has been registered.

public boolean getFeature (String featureId)

Query the state of a feature. Query the current state of any feature in a SAX2 parser. The parser might not recognize the feature.

Parameters
featureId The unique identifier (URI) of the feature being set.
Returns
  • The current state of the feature.
Throws
SAXNotRecognizedException If the requested feature is not known.
SAXNotSupportedException If the requested feature is known but not supported.

public Object getProperty (String propertyId)

Query the value of a property. Return the current value of a property in a SAX2 parser. The parser might not recognize the property.

Parameters
propertyId The unique identifier (URI) of the property being set.
Returns
  • The current value of the property.
Throws
SAXNotRecognizedException If the requested property is not known.
SAXNotSupportedException If the requested property is known but not supported.

public void ignorableWhitespace (XMLString text, Augmentations augs)

Ignorable whitespace. For this method to be called, the document source must have some way of determining that the text containing only whitespace characters should be considered ignorable. For example, the validator can determine if a length of whitespace characters in the document are ignorable based on the element content model.

Parameters
text The ignorable whitespace.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void internalEntityDecl (String name, XMLString text, XMLString nonNormalizedText, Augmentations augs)

An internal entity declaration.

Parameters
name The name of the entity. Parameter entity names start with '%', whereas the name of a general entity is just the entity name.
text The value of the entity.
nonNormalizedText The non-normalized value of the entity. This value contains the same sequence of characters that was in the internal entity declaration, without any entity references expanded.
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public void notationDecl (String name, XMLResourceIdentifier identifier, Augmentations augs)

A notation declaration

Parameters
name The name of the notation.
identifier An object containing all location information pertinent to this notation.
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public void parse (String systemId)

Parses the input source specified by the given system identifier.

This method is equivalent to the following:

     parse(new InputSource(systemId));
 

Parameters
systemId The system identifier (URI).
Throws
SAXException Throws exception on SAX error.
IOException Throws exception on i/o error.

public void parse (InputSource inputSource)

parse

Throws
org.xml.sax.SAXException
IOException
SAXException

public void processingInstruction (String target, XMLString data, Augmentations augs)

A processing instruction. Processing instructions consist of a target name and, optionally, text data. The data is only meaningful to the application.

Typically, a processing instruction's data will contain a series of pseudo-attributes. These pseudo-attributes follow the form of element attributes but are not parsed or presented to the application as anything other than text. The application is responsible for parsing the data.

Parameters
target The target.
data The data or null if none specified.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void reset ()

Reset all components before parsing.

Throws
XNIException Thrown if an error occurs during initialization.

public void setContentHandler (ContentHandler contentHandler)

Allow an application to register a content event handler.

If the application does not register a content handler, all content events reported by the SAX parser will be silently ignored.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters
contentHandler The content handler.

public void setDTDHandler (DTDHandler dtdHandler)

Allow an application to register a DTD event handler.

If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters
dtdHandler The DTD handler.
See Also

public void setDocumentHandler (DocumentHandler documentHandler)

Allow an application to register a document event handler.

If the application does not register a document handler, all document events reported by the SAX parser will be silently ignored (this is the default behaviour implemented by HandlerBase).

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters
documentHandler The document handler.

public void setEntityResolver (EntityResolver resolver)

Sets the resolver used to resolve external entities. The EntityResolver interface supports resolution of public and system identifiers.

Parameters
resolver The new entity resolver. Passing a null value will uninstall the currently installed resolver.

public void setErrorHandler (ErrorHandler errorHandler)

Allow an application to register an error event handler.

If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue. It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters
errorHandler The error handler.

public void setFeature (String featureId, boolean state)

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
SAXNotRecognizedException If the requested feature is not known.
SAXNotSupportedException If the requested feature is known, but the requested state is not supported.

public void setLocale (Locale locale)

Set the locale to use for messages.

Parameters
locale The locale object to use for localization of messages.
Throws
SAXException An exception thrown if the parser does not support the specified locale.
See Also
  • org.xml.sax.Parser

public void setProperty (String propertyId, Object value)

Set the value of any property in a SAX2 parser. The parser might not recognize the property, and if it does recognize it, it might not support the requested value.

Parameters
propertyId The unique identifier (URI) of the property being set.
value The value to which the property is being set.
Throws
SAXNotRecognizedException If the requested property is not known.
SAXNotSupportedException If the requested property is known, but the requested value is not supported.

public void startCDATA (Augmentations augs)

The start of a CDATA section.

Parameters
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void startDocument (XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs)

The start of the document.

Parameters
locator The document locator, or null if the document location cannot be reported during the parsing of this document. However, it is strongly recommended that a locator be supplied that can at least report the system identifier of the document.
encoding The auto-detected IANA encoding name of the entity stream. This value will be null in those situations where the entity encoding is not auto-detected (e.g. internal entities or a document entity that is parsed from a java.io.Reader).
namespaceContext The namespace context in effect at the start of this document. This object represents the current context. Implementors of this class are responsible for copying the namespace bindings from the the current context (and its parent contexts) if that information is important.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void startElement (QName element, XMLAttributes attributes, Augmentations augs)

The start of an element. If the document specifies the start element by using an empty tag, then the startElement method will immediately be followed by the endElement method, with no intervening methods.

Parameters
element The name of the element.
attributes The element attributes.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void startExternalSubset (XMLResourceIdentifier identifier, Augmentations augs)

The start of the DTD external subset.

Parameters
identifier The resource identifier.
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public void startGeneralEntity (String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs)

This method notifies of the start of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entity names are just the entity name.

Note: Since the document is an entity, the handler will be notified of the start of the document entity by calling the startEntity method with the entity name "[xml]" before calling the startDocument method. When exposing entity boundaries through the SAX API, the document entity is never reported, however.

Note: This method is not called for entity references appearing as part of attribute values.

Parameters
name The name of the entity.
identifier The resource identifier.
encoding The auto-detected IANA encoding name of the entity stream. This value will be null in those situations where the entity encoding is not auto-detected (e.g. internal parameter entities).
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

public void startParameterEntity (String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs)

This method notifies of the start of parameter entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entity names are just the entity name.

Note: Since the document is an entity, the handler will be notified of the start of the document entity by calling the startEntity method with the entity name "[xml]" before calling the startDocument method. When exposing entity boundaries through the SAX API, the document entity is never reported, however.

Note: This method is not called for entity references appearing as part of attribute values.

Parameters
name The name of the parameter entity.
identifier The resource identifier.
encoding The auto-detected IANA encoding name of the entity stream. This value will be null in those situations where the entity encoding is not auto-detected (e.g. internal parameter entities).
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public void unparsedEntityDecl (String name, XMLResourceIdentifier identifier, String notation, Augmentations augs)

An unparsed entity declaration.

Parameters
name The name of the entity.
identifier An object containing all location information pertinent to this entity.
notation The name of the notation.
augs Additional information that may include infoset augmentations.
Throws
XNIException Thrown by handler to signal an error.

public void xmlDecl (String version, String encoding, String standalone, Augmentations augs)

Notifies of the presence of an XMLDecl line in the document. If present, this method will be called immediately following the startDocument call.

Parameters
version The XML version.
encoding The IANA encoding name of the document, or null if not specified.
standalone The standalone value, or null if not specified.
augs Additional information that may include infoset augmentations
Throws
XNIException Thrown by handler to signal an error.

Protected Methods

protected final void endNamespaceMapping ()

Send endPrefixMapping events

Throws
SAXException

protected DeclHandler getDeclHandler ()

Returns the DTD declaration event handler.

Throws
SAXNotRecognizedException
SAXNotSupportedException

protected LexicalHandler getLexicalHandler ()

Returns the lexical handler.

Throws
SAXNotRecognizedException
SAXNotSupportedException

protected void setDeclHandler (DeclHandler handler)

Set the DTD declaration event handler.

This method is the equivalent to the property:

 http://xml.org/sax/properties/declaration-handler
 

Parameters
handler The new handler.
Throws
SAXNotRecognizedException
SAXNotSupportedException

protected void setLexicalHandler (LexicalHandler handler)

Set the lexical event handler.

This method is the equivalent to the property:

 http://xml.org/sax/properties/lexical-handler
 

Parameters
handler lexical event handler
Throws
SAXNotRecognizedException
SAXNotSupportedException

protected final void startNamespaceMapping ()

Send startPrefixMapping events

Throws
SAXException