|
|||||||||
| Home >> All >> org >> apache >> xerces >> [ tree overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.xerces.tree
Interface DtdEventListener

- All Superinterfaces:
- org.xml.sax.DTDHandler
- All Known Implementing Classes:
- XmlDocumentBuilder.DtdListener
- public interface DtdEventListener
- extends org.xml.sax.DTDHandler
When parsing XML documents, DTD related events are signaled through this interface. Examples include the beginning and end of the DTD, entity declarations, and parts of the <!DOCTYPE...> declaration. This interface supports:
- SAX 1.0 DtdHandler callbacks, which suffice to interpret element attributes whose values name notations or unparsed entities.
- DOM Level 1, which additionally requires information about parsed entity declarations, as well as the ability to tell which processing instructions are within the DTD.
- XML namespaces, which places requirements on names of all entities and notations (they may not contain colons.)
- Recreating the <!DOCTYPE ...> declaration when storing modified documents, including the unnamed external parameter entity as well as the full text of the internal DTD subset.
- Layered validation of element content models and attribute content restrictions, by exposing these declarations for applications to record and use.
Events signaled through the DTDHandler interface will only signaled after at startDtd event and before an endDtd event.
Other than the support to recreate the DOCTYPE declaration, parameter entities are not exposed.
- Version:
- $Revision: 1.1.1.1 $
| Method Summary | |
void |
attributeDecl(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String attributeType,
java.lang.String[] options,
java.lang.String defaultValue,
boolean isFixed,
boolean isRequired)
Reports an attribute declaration found within the DTD. |
void |
elementDecl(java.lang.String elementName,
java.lang.String contentModel)
Reports an element declaration found within the DTD. |
void |
endDtd()
Receive notification of the end of a DTD. |
void |
externalDtdDecl(java.lang.String publicId,
java.lang.String systemId)
Reports the optional unnamed parameter entity which is processed after the internal DTD subset. |
void |
externalEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Receive notification of an external parsed entity declaration event. |
void |
internalDtdDecl(java.lang.String internalSubset)
Reports the internal DTD subset, as unparsed markup declarations. |
void |
internalEntityDecl(java.lang.String name,
java.lang.String value)
Receive notification of a internal parsed entity declaration event. |
void |
startDtd(java.lang.String rootName)
Receive notification of the beginning of a Document Type Declaration (DTD). |
| Methods inherited from interface org.xml.sax.DTDHandler |
notationDecl, unparsedEntityDecl |
| Method Detail |
startDtd
public void startDtd(java.lang.String rootName) throws org.xml.sax.SAXException
- Receive notification of the beginning of a Document Type
Declaration (DTD). The parser will invoke this method only
once, before any other methods in this interface.
externalDtdDecl
public void externalDtdDecl(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
- Reports the optional unnamed parameter entity which is processed
after the internal DTD subset. This commonly provides the entire
external DTD subset, in case where the internal DTD subset does
not define and use external parameter entities. The parser will
invoke this method at most once.
internalDtdDecl
public void internalDtdDecl(java.lang.String internalSubset) throws org.xml.sax.SAXException
- Reports the internal DTD subset, as unparsed markup declarations.
This may also contain comments and processing instructions, if they
are found in the document source. Applications should treat this
string as opaque, only using it when recreating a
<!DOCTYPE ...> declaration. The parser will invoke
this method at most once.
internalEntityDecl
public void internalEntityDecl(java.lang.String name, java.lang.String value) throws org.xml.sax.SAXException
- Receive notification of a internal parsed entity declaration event.
externalEntityDecl
public void externalEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
- Receive notification of an external parsed entity declaration event.
If a system identifier is present, and it is a relative URL, the parser will have resolved it fully before passing it through this method to a listener.
elementDecl
public void elementDecl(java.lang.String elementName, java.lang.String contentModel) throws org.xml.sax.SAXException
- Reports an element declaration found within the DTD. The content
model will be a string such as "ANY", "EMPTY", "(#PCDATA|foo)*",
or "(caption?,tr*)".
attributeDecl
public void attributeDecl(java.lang.String elementName, java.lang.String attributeName, java.lang.String attributeType, java.lang.String[] options, java.lang.String defaultValue, boolean isFixed, boolean isRequired) throws org.xml.sax.SAXException
- Reports an attribute declaration found within the DTD.
endDtd
public void endDtd()
throws org.xml.sax.SAXException
- Receive notification of the end of a DTD. The parser will invoke
this method only once.
|
|||||||||
| Home >> All >> org >> apache >> xerces >> [ tree overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC