|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xerces.impl.XMLScanner org.apache.xerces.impl.XMLDTDScannerImpl
public class XMLDTDScannerImpl
This class is responsible for scanning the declarations found in the internal and external subsets of a DTD in an XML document. The scanner acts as the sources for the DTD information which is communicated to the DTD handlers.
This component requires the following features and properties from the component manager that uses it:
Constructor Summary | |
---|---|
XMLDTDScannerImpl()
Default constructor. |
|
XMLDTDScannerImpl(SymbolTable symbolTable,
XMLErrorReporter errorReporter,
XMLEntityManager entityManager)
Constructor for he use of non-XMLComponentManagers. |
Method Summary | |
---|---|
void |
endEntity(java.lang.String name,
Augmentations augs)
This method notifies the end of an entity. |
XMLDTDContentModelHandler |
getDTDContentModelHandler()
getDTDContentModelHandler |
XMLDTDHandler |
getDTDHandler()
getDTDHandler |
java.lang.Boolean |
getFeatureDefault(java.lang.String featureId)
Returns the default state for a feature, or null if this component does not want to report a default value for this feature. |
java.lang.Object |
getPropertyDefault(java.lang.String propertyId)
Returns the default state for a property, or null if this component does not want to report a default value for this property. |
java.lang.String[] |
getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by this component. |
java.lang.String[] |
getRecognizedProperties()
Returns a list of property identifiers that are recognized by this component. |
void |
reset()
|
void |
reset(XMLComponentManager componentManager)
reset |
boolean |
scanDTDExternalSubset(boolean complete)
Scans the external subset of the document. |
boolean |
scanDTDInternalSubset(boolean complete,
boolean standalone,
boolean hasExternalSubset)
Scans the internal subset of the document. |
void |
setDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler)
setDTDContentModelHandler |
void |
setDTDHandler(XMLDTDHandler dtdHandler)
setDTDHandler |
void |
setInputSource(XMLInputSource inputSource)
Sets the input source. |
void |
startEntity(java.lang.String name,
XMLResourceIdentifier identifier,
java.lang.String encoding,
Augmentations augs)
This method notifies of the start of an entity. |
Methods inherited from class org.apache.xerces.impl.XMLScanner |
---|
getFeature, scanPseudoAttribute, setFeature, setProperty |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.xerces.xni.parser.XMLComponent |
---|
setFeature, setProperty |
Constructor Detail |
---|
public XMLDTDScannerImpl()
public XMLDTDScannerImpl(SymbolTable symbolTable, XMLErrorReporter errorReporter, XMLEntityManager entityManager)
Method Detail |
---|
public void setInputSource(XMLInputSource inputSource) throws java.io.IOException
setInputSource
in interface XMLDTDScanner
inputSource
- The input source or null.
java.io.IOException
- Thrown on i/o error.public boolean scanDTDExternalSubset(boolean complete) throws java.io.IOException, XNIException
scanDTDExternalSubset
in interface XMLDTDScanner
complete
- True if the scanner should scan the document
completely, pushing all events to the registered
document handler. A value of false indicates that
that the scanner should only scan the next portion
of the document and return. A scanner instance is
permitted to completely scan a document if it does
not support this "pull" scanning model.
java.io.IOException
XNIException
public boolean scanDTDInternalSubset(boolean complete, boolean standalone, boolean hasExternalSubset) throws java.io.IOException, XNIException
scanDTDInternalSubset
in interface XMLDTDScanner
complete
- True if the scanner should scan the document
completely, pushing all events to the registered
document handler. A value of false indicates that
that the scanner should only scan the next portion
of the document and return. A scanner instance is
permitted to completely scan a document if it does
not support this "pull" scanning model.standalone
- True if the document was specified as standalone.
This value is important for verifying certain
well-formedness constraints.hasExternalSubset
- True if the document has an external DTD.
This allows the scanner to properly notify
the handler of the end of the DTD in the
absence of an external subset.
java.io.IOException
XNIException
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException
reset
in interface XMLComponent
reset
in class XMLScanner
componentManager
-
XMLConfigurationException
public void reset()
public java.lang.String[] getRecognizedFeatures()
getRecognizedFeatures
in interface XMLComponent
public java.lang.String[] getRecognizedProperties()
getRecognizedProperties
in interface XMLComponent
public java.lang.Boolean getFeatureDefault(java.lang.String featureId)
getFeatureDefault
in interface XMLComponent
featureId
- The feature identifier.public java.lang.Object getPropertyDefault(java.lang.String propertyId)
getPropertyDefault
in interface XMLComponent
propertyId
- The property identifier.public void setDTDHandler(XMLDTDHandler dtdHandler)
setDTDHandler
in interface XMLDTDSource
dtdHandler
- public XMLDTDHandler getDTDHandler()
getDTDHandler
in interface XMLDTDSource
public void setDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler)
setDTDContentModelHandler
in interface XMLDTDContentModelSource
dtdContentModelHandler
- public XMLDTDContentModelHandler getDTDContentModelHandler()
getDTDContentModelHandler
in interface XMLDTDContentModelSource
public void startEntity(java.lang.String name, XMLResourceIdentifier identifier, java.lang.String encoding, Augmentations augs) throws XNIException
startEntity
in interface XMLEntityHandler
startEntity
in class XMLScanner
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 entities or a document entity that is
parsed from a java.io.Reader).augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by handler to signal an error.public void endEntity(java.lang.String name, Augmentations augs) throws XNIException
endEntity
in interface XMLEntityHandler
endEntity
in class XMLScanner
name
- The name of the entity.augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by handler to signal an error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |