|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.framework.XMLParser
This is the base class of all standard parsers.
Inner classes inherited from class org.apache.xerces.readers.XMLEntityHandler |
XMLEntityHandler.CharBuffer,
XMLEntityHandler.EntityReader |
Field Summary | |
protected int |
fCurrentElementEntity
|
protected int |
fCurrentElementType
|
protected DTDValidator |
fDTDValidator
|
protected int |
fElementDepth
|
protected XMLEntityHandler |
fEntityHandler
|
protected XMLErrorReporter |
fErrorReporter
|
protected boolean |
fInElementContent
|
protected boolean |
fNamespacesEnabled
|
protected java.lang.String |
fNamespaceSep
|
protected boolean |
fParseInProgress
|
protected XMLEntityReaderFactory |
fReaderFactory
|
protected XMLDocumentScanner |
fScanner
|
protected XSchemaValidator |
fSchemaValidator
|
protected StringPool |
fStringPool
|
protected XMLValidator |
fValidator
|
protected static java.lang.String |
SAX2_FEATURES_PREFIX
SAX2 features prefix (http://xml.org/sax/features/). |
protected static java.lang.String |
SAX2_PROPERTIES_PREFIX
SAX2 properties prefix (http://xml.org/sax/properties/). |
protected static java.lang.String |
XERCES_FEATURES_PREFIX
Xerces features prefix (http://apache.org/xml/features/). |
protected static java.lang.String |
XERCES_PROPERTIES_PREFIX
Xerces properties prefix (http://apache.org/xml/properties/). |
Fields inherited from interface org.apache.xerces.framework.XMLErrorReporter |
ERRORTYPE_FATAL_ERROR,
ERRORTYPE_RECOVERABLE_ERROR,
ERRORTYPE_WARNING |
Constructor Summary | |
protected |
XMLParser()
Constructor |
Method Summary | |
void |
addRecognizer(XMLDeclRecognizer recognizer)
Adds a recognizer. |
abstract void |
attlistDecl(int elementType,
int attrName,
int attType,
java.lang.String enumString,
int attDefaultType,
int attDefaultValue)
callback for an attribute list declaration. |
void |
callCharacters(int ch)
Call the characters callback. |
void |
callComment(int comment)
Call the comment callback. |
void |
callEndDocument()
Call the end document callback. |
boolean |
callEndElement(int readerId)
Call the end element callback. |
void |
callProcessingInstruction(int target,
int data)
Call the processing instruction callback. |
void |
callStartDocument(int version,
int encoding,
int standalone)
Call the start document callback. |
void |
callStartElement(int elementType)
Call the start element callback. |
XMLEntityHandler.EntityReader |
changeReaders()
This method is called by the reader subclasses at the end of input, and also by the scanner directly to force a reader change during error recovery. |
abstract void |
characters(char[] ch,
int start,
int length)
callback for characters. |
abstract void |
characters(int data)
callback for characters (string pool form). |
abstract void |
comment(int comment)
callback for comment. |
void |
commentInDTD(int comment)
Callback for comment in DTD. |
abstract void |
elementDecl(int elementType,
XMLValidator.ContentSpec contentSpec)
callback for an element declaration. |
abstract void |
endCDATA()
callback for end of CDATA section. |
abstract void |
endDocument()
callback for the end of document. |
abstract void |
endDTD()
callback for the end of the DTD This function will be called at the end of the DTD. |
abstract void |
endElement(int elementType)
callback for end of element. |
void |
endEntityDecl()
end an entity declaration |
abstract void |
endEntityReference(int entityName,
int entityType,
int entityContext)
callback for end of entity reference. |
abstract void |
endNamespaceDeclScope(int prefix)
callback for the end a namespace declaration scope. |
java.lang.String |
expandSystemId(java.lang.String systemId)
Expands a system id and returns the system id as a URL, if it can be expanded. |
abstract void |
externalEntityDecl(int entityName,
int publicId,
int systemId)
callback for external general entity declaration. |
abstract void |
externalPEDecl(int entityName,
int publicId,
int systemId)
callback for an external parameter entity declaration. |
protected boolean |
getAllowJavaEncodings()
Returns true if Java encoding names are allowed in the XML document. |
int |
getColumnNumber()
Return the column number of the current position within the document that we are processing. |
protected boolean |
getContinueAfterFatalError()
Returns true if the parser continues after a fatal error. |
XMLEntityHandler.EntityReader |
getEntityReader()
get the Entity reader. |
EntityResolver |
getEntityResolver()
Return the current entity resolver. |
ErrorHandler |
getErrorHandler()
Return the current error handler. |
protected boolean |
getExternalGeneralEntities()
Note: This feature is always true. |
protected boolean |
getExternalParameterEntities()
Note: This feature is always true. |
boolean |
getFeature(java.lang.String featureId)
Query the state of a feature. |
java.lang.String[] |
getFeaturesRecognized()
Returns a list of features that this parser recognizes. |
int |
getLineNumber()
Return the line number of the current position within the document that we are processing. |
Locator |
getLocator()
return the locator being used by the parser |
protected boolean |
getNamespaces()
Returns true if the parser preprocesses namespaces. |
java.lang.String[] |
getPropertiesRecognized()
Returns a list of properties that this parser recognizes. |
java.lang.Object |
getProperty(java.lang.String propertyId)
Query the value of a property. |
java.lang.String |
getPublicId()
Return the public identifier of the InputSource that we are processing. |
int |
getReaderDepth()
This method is provided for scanner implementations. |
int |
getReaderId()
This method is provided for scanner implementations. |
protected XSchemaValidator |
getSchemaValidator()
Returns the XML Schema validator. |
java.lang.String |
getSystemId()
Return the system identifier of the InputSource that we are processing. |
protected boolean |
getValidation()
Returns true if validation is turned on. |
protected boolean |
getValidationDynamic()
Returns true if validation is based on whether a document contains a grammar. |
protected boolean |
getValidationWarnOnDuplicateAttdef()
Returns true if an error is emitted when an attribute is redefined in the grammar. |
protected boolean |
getValidationWarnOnUndeclaredElemdef()
Returns true if the parser emits an error when an undeclared element is referenced in the grammar. |
abstract void |
ignorableWhitespace(char[] ch,
int start,
int length)
callback for ignorable whitespace. |
abstract void |
ignorableWhitespace(int data)
callback for ignorable whitespace. |
abstract void |
internalEntityDecl(int entityName,
int entityValue)
callback for internal general entity declaration. |
abstract void |
internalPEDecl(int entityName,
int entityValue)
callback for an internal parameter entity declaration. |
abstract void |
internalSubset(int internalSubset)
Supports DOM Level 2 internalSubset additions. |
boolean |
isFeatureRecognized(java.lang.String featureId)
Returns true if the specified feature is recognized. |
boolean |
isPropertyRecognized(java.lang.String propertyId)
Returns true if the specified property is recognized. |
abstract void |
notationDecl(int notationName,
int publicId,
int systemId)
callback for a notation declaration. |
void |
parse(InputSource source)
Parses the specified input source. |
void |
parse(java.lang.String systemId)
Parses the input source specified by the given system identifier. |
boolean |
parseSome()
Application-driven parsing. |
boolean |
parseSomeSetup(InputSource source)
Setup for application-driven parsing. |
void |
processCharacters(char[] chars,
int offset,
int length)
Character data. |
void |
processCharacters(int data)
Character data. |
abstract void |
processingInstruction(int target,
int data)
callback for processing instruction. |
void |
processingInstructionInDTD(int target,
int data)
Callback for processing instruction in DTD. |
void |
processWhitespace(char[] chars,
int offset,
int length)
White space. |
void |
processWhitespace(int data)
White space. |
void |
reportError(Locator locator,
java.lang.String errorDomain,
int majorCode,
int minorCode,
java.lang.Object[] args,
int errorType)
Report an error. |
void |
reset()
Reset parser instance so that it can be reused. |
protected void |
resetOrCopy()
Reset or copy parser Allows parser instance reuse |
int |
scanAttributeName(XMLEntityHandler.EntityReader entityReader,
int elementType)
Scans an attribute name. |
int |
scanAttValue(int elementType,
int attrName)
Scan an attribute value. |
void |
scanDoctypeDecl(boolean standalone)
Scan doctype decl. |
int |
scanElementType(XMLEntityHandler.EntityReader entityReader,
char fastchar)
Scans an element type. |
boolean |
scanExpectedElementType(XMLEntityHandler.EntityReader entityReader,
char fastchar)
Scans an expected element type. |
protected void |
setAllowJavaEncodings(boolean allow)
Allows the use of Java encoding names in the XMLDecl and TextDecl lines in an XML document. |
protected void |
setContinueAfterFatalError(boolean continueAfterFatalError)
Allows the parser to continue after a fatal error. |
void |
setEntityResolver(EntityResolver resolver)
Sets the resolver used to resolve external entities. |
void |
setErrorHandler(ErrorHandler handler)
Sets the error handler. |
protected void |
setExternalGeneralEntities(boolean expand)
Note: Currently, this parser always expands external general entities. Setting this feature to false will throw a SAXNotSupportedException. |
protected void |
setExternalParameterEntities(boolean expand)
Note: Currently, this parser always expands external parameter entities. Setting this feature to false will throw a SAXNotSupportedException. |
void |
setFeature(java.lang.String featureId,
boolean state)
Set the state of a feature. |
void |
setLocale(java.util.Locale locale)
Set the locale to use for messages. |
void |
setLocator(Locator locator)
Sets the locator. |
protected void |
setNamespaces(boolean process)
Sets whether the parser preprocesses namespaces. |
void |
setProperty(java.lang.String propertyId,
java.lang.Object value)
Set the value of a property. |
void |
setReaderDepth(int depth)
This method is provided for scanner implementations. |
void |
setReaderFactory(XMLEntityReaderFactory readerFactory)
Set the reader factory. |
protected void |
setSendCharDataAsCharArray(boolean flag)
Set char data processing preference. |
void |
setValidating(boolean flag)
Tell the parser that we are validating |
protected void |
setValidation(boolean validate)
Sets whether the parser validates. |
protected void |
setValidationDynamic(boolean dynamic)
Allows the parser to validate a document only when it contains a grammar. |
protected void |
setValidationWarnOnDuplicateAttdef(boolean warn)
Sets whether an error is emitted when an attribute is redefined in the grammar. |
protected void |
setValidationWarnOnUndeclaredElemdef(boolean warn)
Sets whether the parser emits an error when an element's content model references an element by name that is not declared in the grammar. |
abstract void |
startCDATA()
callback for start of CDATA section. |
abstract void |
startDocument(int version,
int encoding,
int standAlone)
Callback for start of document If the there is no version info, encoding info, or standalone info, the corresponding argument will be set to -1. |
abstract void |
startDTD(int rootElementType,
int publicId,
int systemId)
callback for the start of the DTD This function will be called when a <!DOCTYPE...> declaration is encountered. |
abstract void |
startElement(int elementType,
XMLAttrList attrList,
int attrListHandle)
callback for the start of element. |
boolean |
startEntityDecl(boolean isPE,
int entityName)
start an entity declaration |
abstract void |
startEntityReference(int entityName,
int entityType,
int entityContext)
callback for start of entity reference. |
abstract void |
startNamespaceDeclScope(int prefix,
int uri)
callback for the start of a namespace declaration scope. |
boolean |
startReadingFromDocument(InputSource source)
set up the reader stack to read from the document entity |
boolean |
startReadingFromEntity(int entityName,
int readerDepth,
int context)
start reading from an external entity |
void |
startReadingFromExternalSubset(java.lang.String publicId,
java.lang.String systemId,
int readerDepth)
start reading from an external DTD subset |
void |
stopReadingFromExternalSubset()
stop reading from an external DTD subset |
abstract void |
unparsedEntityDecl(int entityName,
int publicId,
int systemId,
int notationName)
callback for an unparsed entity declaration. |
boolean |
validEncName(java.lang.String encoding)
Returns true if the specified encoding is valid. |
boolean |
validVersionNum(java.lang.String version)
Returns true if the specified version is valid. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final java.lang.String SAX2_FEATURES_PREFIX
protected static final java.lang.String SAX2_PROPERTIES_PREFIX
protected static final java.lang.String XERCES_FEATURES_PREFIX
protected static final java.lang.String XERCES_PROPERTIES_PREFIX
protected boolean fParseInProgress
protected java.lang.String fNamespaceSep
protected XMLValidator fValidator
protected DTDValidator fDTDValidator
protected XSchemaValidator fSchemaValidator
protected boolean fNamespacesEnabled
protected XMLDocumentScanner fScanner
protected StringPool fStringPool
protected XMLErrorReporter fErrorReporter
protected XMLEntityHandler fEntityHandler
protected XMLEntityReaderFactory fReaderFactory
protected int fElementDepth
protected int fCurrentElementType
protected int fCurrentElementEntity
protected boolean fInElementContent
Constructor Detail |
protected XMLParser()
Method Detail |
public java.lang.String[] getFeaturesRecognized()
isFeatureRecognized(java.lang.String)
,
setFeature(java.lang.String, boolean)
,
getFeature(java.lang.String)
public boolean isFeatureRecognized(java.lang.String featureId)
getFeaturesRecognized()
,
setFeature(java.lang.String, boolean)
,
getFeature(java.lang.String)
public java.lang.String[] getPropertiesRecognized()
isPropertyRecognized(java.lang.String)
,
setProperty(java.lang.String, java.lang.Object)
,
getProperty(java.lang.String)
public boolean isPropertyRecognized(java.lang.String propertyId)
getPropertiesRecognized()
,
setProperty(java.lang.String, java.lang.Object)
,
getProperty(java.lang.String)
public boolean parseSomeSetup(InputSource source) throws java.lang.Exception
source
- the input source to be parsed.parseSome()
public boolean parseSome() throws java.lang.Exception
parseSomeSetup(org.xml.sax.InputSource)
public void reset() throws java.lang.Exception
public void setLocator(Locator locator)
locator
- The new locator.public final Locator getLocator()
public void setReaderFactory(XMLEntityReaderFactory readerFactory)
public void processingInstructionInDTD(int target, int data) throws java.lang.Exception
target
- the string pool index of the PI's targetdata
- the string pool index of the PI's datapublic void commentInDTD(int comment) throws java.lang.Exception
comment
- the string pool index of the comment textpublic abstract void startDocument(int version, int encoding, int standAlone) throws java.lang.Exception
version
- string pool index of the version attribute's valueencoding
- string pool index of the encoding attribute's valuestandAlone
- string pool index of the standalone attribute's valuepublic abstract void endDocument() throws java.lang.Exception
public abstract void startNamespaceDeclScope(int prefix, int uri) throws java.lang.Exception
prefix
- string pool index of the namespace prefix being declareduri
- string pool index of the namespace uri begin boundjava.lang.Exception
- public abstract void endNamespaceDeclScope(int prefix) throws java.lang.Exception
prefix
- string pool index of the namespace prefix being declaredpublic abstract void internalSubset(int internalSubset)
public abstract void startElement(int elementType, XMLAttrList attrList, int attrListHandle) throws java.lang.Exception
elementType
- element handle for the element being scannedattrList
- attrList containing the attributes of the elementattrListHandle
- handle into attrList. Allows attributes to be retreived.public abstract void endElement(int elementType) throws java.lang.Exception
elementType
- element handle for the element being scannedpublic abstract void startEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
entityName
- string pool index of the entity nameentityType
- the XMLEntityHandler.ENTITYTYPE_* typeentityContext
- the XMLEntityHandler.CONTEXT_* type for where
the entity reference appearsXMLEntityHandler
,
XMLEntityHandler
public abstract void endEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
entityName
- string pool index of the entity anementityType
- the XMLEntityHandler.ENTITYTYPE_* typeentityContext
- the XMLEntityHandler.CONTEXT_* type for where
the entity reference appearsXMLEntityHandler
,
XMLEntityHandler
public abstract void startCDATA() throws java.lang.Exception
public abstract void endCDATA() throws java.lang.Exception
public abstract void processingInstruction(int target, int data) throws java.lang.Exception
target
- string pool index of the PI targetdata
- string pool index of the PI datapublic abstract void comment(int comment) throws java.lang.Exception
comment
- string pool index of the comment textpublic abstract void characters(int data) throws java.lang.Exception
data
- string pool index of the characters that were scannedpublic abstract void characters(char[] ch, int start, int length) throws java.lang.Exception
ch
- character array containing the characters that were scannedstart
- offset in ch where scanned characters beginlength
- length of scanned characters in chpublic abstract void ignorableWhitespace(int data) throws java.lang.Exception
data
- string pool index of ignorable whitespacepublic abstract void ignorableWhitespace(char[] ch, int start, int length) throws java.lang.Exception
ch
- character array containing the whitespace that was scannedstart
- offset in ch where scanned whitespace beginslength
- length of scanned whitespace in chpublic abstract void startDTD(int rootElementType, int publicId, int systemId) throws java.lang.Exception
rootElementType
- element handle for the root element of the documentpublicId
- string pool index of the DTD's public IDsystemId
- string pool index of the DTD's system IDpublic abstract void endDTD() throws java.lang.Exception
public abstract void elementDecl(int elementType, XMLValidator.ContentSpec contentSpec) throws java.lang.Exception
elementType
- element handle of the element being declaredcontentSpec
- contentSpec for the element being declaredXMLValidator.ContentSpec
public abstract void attlistDecl(int elementType, int attrName, int attType, java.lang.String enumString, int attDefaultType, int attDefaultValue) throws java.lang.Exception
elementType
- element handle for the attribute's elementattrName
- string pool index of the attribute nameattType
- type of attributeenumString
- 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 valueattDefaultValue
- string pool index of this attribute's default value
or -1 if there is no defaultvaluepublic abstract void internalPEDecl(int entityName, int entityValue) throws java.lang.Exception
entityName
- string pool index of the entity nameentityValue
- string pool index of the entity replacement textpublic abstract void externalPEDecl(int entityName, int publicId, int systemId) throws java.lang.Exception
entityName
- string pool index of the entity namepublicId
- string pool index of the entity's public id.systemId
- string pool index of the entity's system id.public abstract void internalEntityDecl(int entityName, int entityValue) throws java.lang.Exception
entityName
- string pool index of the entity nameentityValue
- string pool index of the entity replacement textpublic abstract void externalEntityDecl(int entityName, int publicId, int systemId) throws java.lang.Exception
entityName
- string pool index of the entity namepublicId
- string pool index of the entity's public id.systemId
- string pool index of the entity's system id.public abstract void unparsedEntityDecl(int entityName, int publicId, int systemId, int notationName) throws java.lang.Exception
entityName
- string pool index of the entity namepublicId
- string pool index of the entity's public id.systemId
- string pool index of the entity's system id.notationName
- string pool index of the notation name.public abstract void notationDecl(int notationName, int publicId, int systemId) throws java.lang.Exception
notationName
- string pool index of the notation namepublicId
- string pool index of the notation's public id.systemId
- string pool index of the notation's system id.protected void setValidation(boolean validate) throws SAXNotRecognizedException, SAXNotSupportedException
This method is the equivalent to the feature:
http://xml.org/sax/features/validation
validate
- True to validate; false to not validate.getValidation()
,
setFeature(java.lang.String, boolean)
protected boolean getValidation() throws SAXNotRecognizedException, SAXNotSupportedException
setValidation(boolean)
protected void setExternalGeneralEntities(boolean expand) throws SAXNotRecognizedException, SAXNotSupportedException
Sets whether external general entities are expanded.
This method is the equivalent to the feature:
http://xml.org/sax/features/external-general-entities
expand
- True to expand external general entities; false
to not expand.getExternalGeneralEntities()
,
setFeature(java.lang.String, boolean)
protected boolean getExternalGeneralEntities() throws SAXNotRecognizedException, SAXNotSupportedException
Returns true if external general entities are expanded.
setExternalGeneralEntities(boolean)
protected void setExternalParameterEntities(boolean expand) throws SAXNotRecognizedException, SAXNotSupportedException
Sets whether external parameter entities are expanded.
This method is the equivalent to the feature:
http://xml.org/sax/features/external-parameter-entities
expand
- True to expand external parameter entities; false
to not expand.getExternalParameterEntities()
,
setFeature(java.lang.String, boolean)
protected boolean getExternalParameterEntities() throws SAXNotRecognizedException, SAXNotSupportedException
Returns true if external parameter entities are expanded.
setExternalParameterEntities(boolean)
protected void setNamespaces(boolean process) throws SAXNotRecognizedException, SAXNotSupportedException
This method is the equivalent to the feature:
http://xml.org/sax/features/namespaces
process
- True to process namespaces; false to not process.getNamespaces()
,
setFeature(java.lang.String, boolean)
protected boolean getNamespaces() throws SAXNotRecognizedException, SAXNotSupportedException
setNamespaces(boolean)
protected void setValidationDynamic(boolean dynamic) throws SAXNotRecognizedException, SAXNotSupportedException
This method is the equivalent to the feature:
http://apache.org/xml/features/validation/dynamic
dynamic
- True to dynamically validate documents; false to
validate based on the validation feature.getValidationDynamic()
,
setFeature(java.lang.String, boolean)
protected boolean getValidationDynamic() throws SAXNotRecognizedException, SAXNotSupportedException
setValidationDynamic(boolean)
protected void setValidationWarnOnDuplicateAttdef(boolean warn) throws SAXNotRecognizedException, SAXNotSupportedException
This method is the equivalent to the feature:
http://apache.org/xml/features/validation/warn-on-duplicate-attdef
warn
- True to warn; false to not warn.getValidationWarnOnDuplicateAttdef()
,
setFeature(java.lang.String, boolean)
protected boolean getValidationWarnOnDuplicateAttdef() throws SAXNotRecognizedException, SAXNotSupportedException
setValidationWarnOnDuplicateAttdef(boolean)
protected void setValidationWarnOnUndeclaredElemdef(boolean warn) throws SAXNotRecognizedException, SAXNotSupportedException
This method is the equivalent to the feature:
http://apache.org/xml/features/validation/warn-on-undeclared-elemdef
warn
- True to warn; false to not warn.getValidationWarnOnUndeclaredElemdef()
,
setFeature(java.lang.String, boolean)
protected boolean getValidationWarnOnUndeclaredElemdef() throws SAXNotRecognizedException, SAXNotSupportedException
setValidationWarnOnUndeclaredElemdef(boolean)
protected void setAllowJavaEncodings(boolean allow) throws SAXNotRecognizedException, SAXNotSupportedException
This method is the equivalent to the feature:
http://apache.org/xml/features/allow-java-encodings
allow
- True to allow Java encoding names; false to disallow.getAllowJavaEncodings()
,
setFeature(java.lang.String, boolean)
protected boolean getAllowJavaEncodings() throws SAXNotRecognizedException, SAXNotSupportedException
setAllowJavaEncodings(boolean)
protected void setContinueAfterFatalError(boolean continueAfterFatalError) throws SAXNotRecognizedException, SAXNotSupportedException
This method is the equivalent to the feature:
http://apache.org/xml/features/continue-after-fatal-error
continueAfterFatalError
- True to continue; false to stop on
fatal error.getContinueAfterFatalError()
,
setFeature(java.lang.String, boolean)
protected boolean getContinueAfterFatalError() throws SAXNotRecognizedException, SAXNotSupportedException
setContinueAfterFatalError(boolean)
protected void resetOrCopy() throws java.lang.Exception
protected XSchemaValidator getSchemaValidator()
protected void setSendCharDataAsCharArray(boolean flag)
public void setEntityResolver(EntityResolver resolver)
resolver
- The new entity resolver. Passing a null value will
uninstall the currently installed resolver.public EntityResolver getEntityResolver()
setEntityResolver(org.xml.sax.EntityResolver)
public void setErrorHandler(ErrorHandler handler)
handler
- The new error handler.public ErrorHandler getErrorHandler()
setErrorHandler(org.xml.sax.ErrorHandler)
public void parse(InputSource source) throws SAXException, java.io.IOException
source
- The input source.public void parse(java.lang.String systemId) throws SAXException, java.io.IOException
This method is equivalent to the following:
parse(new InputSource(systemId));
source
- The input source.public void setLocale(java.util.Locale locale) throws SAXException
locale
- The locale object to use for localization of messages.Parser
public void reportError(Locator locator, java.lang.String errorDomain, int majorCode, int minorCode, java.lang.Object[] args, int errorType) throws java.lang.Exception
locator
- Location of error.errorDomain
- The error domain.majorCode
- The major code of the error.minorCode
- The minor code of the error.args
- Arguments for replacement text.errorType
- The type of the error.XMLErrorReporter.ERRORTYPE_WARNING
,
XMLErrorReporter.ERRORTYPE_FATAL_ERROR
public void setFeature(java.lang.String featureId, boolean state) throws SAXNotRecognizedException, SAXNotSupportedException
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).public boolean getFeature(java.lang.String featureId) throws SAXNotRecognizedException, SAXNotSupportedException
featureId
- The unique identifier (URI) of the feature
being set.public void setProperty(java.lang.String propertyId, java.lang.Object value) throws SAXNotRecognizedException, SAXNotSupportedException
propertyId
- The unique identifier (URI) of the property
being set.Object
- The value to which the property is being set.public java.lang.Object getProperty(java.lang.String propertyId) throws SAXNotRecognizedException, SAXNotSupportedException
propertyId
- The unique identifier (URI) of the property
being set.org.xml.sax.Configurable#getProperty
public boolean validVersionNum(java.lang.String version)
version
- a string representing an XML version numberpublic boolean validEncName(java.lang.String encoding)
encoding
- a string containing an encoding naempublic void callStartDocument(int version, int encoding, int standalone) throws java.lang.Exception
version
- the handle in the string pool for the version numberencoding
- the handle in the string pool for the encodingstandalong
- the handle in the string pool for the standalone valuepublic void callEndDocument() throws java.lang.Exception
public void callStartElement(int elementType) throws java.lang.Exception
elementType
- handle to the elementType being scannedpublic boolean callEndElement(int readerId) throws java.lang.Exception
readerId
- the Id of the reader being used to scan the end tag.public void callProcessingInstruction(int target, int data) throws java.lang.Exception
piTarget
- the handle in the string pool of the processing instruction targepiData
- the handle in the string pool of the processing instruction datapublic void callComment(int comment) throws java.lang.Exception
data
- the handle in the string pool of the comment textpublic void callCharacters(int ch) throws java.lang.Exception
ch
- the handle in the string pool of the character data that was scannedpublic int scanAttValue(int elementType, int attrName) throws java.lang.Exception
elementType
- attrName
- public int scanElementType(XMLEntityHandler.EntityReader entityReader, char fastchar) throws java.lang.Exception
entityReader
- The entity reader.fastchar
- A likely non-name character that might terminate the element type.public boolean scanExpectedElementType(XMLEntityHandler.EntityReader entityReader, char fastchar) throws java.lang.Exception
entityReader
- The entity reader.fastchar
- A likely non-name character that might terminate the element type.true
if we scanned the expected element type; otherwise
false
if we were not able to scan an element type at the
current location, or if that element type was not the one we expected to
find.public int scanAttributeName(XMLEntityHandler.EntityReader entityReader, int elementType) throws java.lang.Exception
entityReader
- The entity reader.elementType
- The element type for this attribute.public void scanDoctypeDecl(boolean standalone) throws java.lang.Exception
standalone
- true if there was a standalone document declaration in
the XMLDeclpublic void setValidating(boolean flag) throws java.lang.Exception
flag
- true if validation is occuringpublic void processCharacters(char[] chars, int offset, int length) throws java.lang.Exception
chars
- character buffer to be processedoffset
- offset in buffer where the data startslength
- length of characters to be processedpublic void processCharacters(int data) throws java.lang.Exception
stringHandle
- StringPool
handle to the character datapublic void processWhitespace(char[] chars, int offset, int length) throws java.lang.Exception
chars
- character buffer to be processedoffset
- offset in buffer where the data startslength
- length of whitespace to be processedpublic void processWhitespace(int data) throws java.lang.Exception
stringHandle
- StringPool
handle to the whitespacepublic XMLEntityHandler.EntityReader getEntityReader()
public void addRecognizer(XMLDeclRecognizer recognizer)
recognizer
- The XML recognizer to add.public java.lang.String expandSystemId(java.lang.String systemId)
systemId
- The systemId to be expanded.public boolean startReadingFromDocument(InputSource source) throws java.lang.Exception
source
- The input source for the document to process.true
if we were able to open the document source;
false
otherwise.public void startReadingFromExternalSubset(java.lang.String publicId, java.lang.String systemId, int readerDepth) throws java.lang.Exception
publicId
- The public identifier for the external subset.systemId
- The system identifier for the external subset.readerDepth
- The depth to associate with the reader for the external subset.public void stopReadingFromExternalSubset() throws java.lang.Exception
public boolean startReadingFromEntity(int entityName, int readerDepth, int context) throws java.lang.Exception
entityName
- The entity name handle in the string pool.readerDepth
- The depth to associate with the reader for this entity.context
- The context of the entity reference; see CONTEXT_IN_*.true
if the entity might start with a TextDecl;
false
otherwise.public boolean startEntityDecl(boolean isPE, int entityName) throws java.lang.Exception
true
on success; otherwise
false
if the entity declaration is recursive.public void endEntityDecl() throws java.lang.Exception
public int getReaderId()
public void setReaderDepth(int depth)
public int getReaderDepth()
public java.lang.String getPublicId()
InputSource
that we are processing.public java.lang.String getSystemId()
InputSource
that we are processing.public int getLineNumber()
public int getColumnNumber()
public XMLEntityHandler.EntityReader changeReaders() throws java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |