NonValidator is a concrete implementation of IXMLValidator which processes
the DTD and handles entity definitions. It does not do any validation
itself.
PCDataAdded
public void PCDataAdded(String systemId,
int lineNr)
Indicates that a new #PCDATA element has been encountered.
- PCDataAdded in interface IXMLValidator
systemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.
attributeAdded
public void attributeAdded(String key,
String value,
String systemId,
int lineNr)
Indicates that an attribute has been added to the current element.
- attributeAdded in interface IXMLValidator
key
- the name of the attribute.value
- the value of the attribute.systemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.
elementAttributesProcessed
public void elementAttributesProcessed(String name,
Properties extraAttributes,
String systemId,
int lineNr)
This method is called when the attributes of an XML element have been
processed.
If there are attributes with a default value which have not been
specified yet, they have to be put into extraAttributes.
- elementAttributesProcessed in interface IXMLValidator
name
- the name of the element.extraAttributes
- where to put extra attributes.systemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.
elementEnded
public void elementEnded(String name,
String systemId,
int lineNr)
Indicates that the current element has ended.
- elementEnded in interface IXMLValidator
name
- the name of the element.systemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.
elementStarted
public void elementStarted(String name,
String systemId,
int lineNr)
Indicates that an element has been started.
- elementStarted in interface IXMLValidator
name
- the name of the element.systemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.
finalize
protected void finalize()
throws Throwable
Cleans up the object when it's destroyed.
parseDTD
public void parseDTD(String publicID,
IXMLReader reader,
IXMLEntityResolver entityResolver,
boolean external)
throws Exception
Parses the DTD. The validator object is responsible for reading the
full DTD.
- parseDTD in interface IXMLValidator
publicID
- the public ID, which may be null.reader
- the reader to read the DTD from.entityResolver
- the entity resolver.external
- true if the DTD is external.
processAttList
protected void processAttList(IXMLReader reader,
IXMLEntityResolver entityResolver)
throws Exception
Processes an ATTLIST element.
reader
- the reader to read data from.entityResolver
- the entity resolver.
processConditionalSection
protected void processConditionalSection(IXMLReader reader,
IXMLEntityResolver entityResolver)
throws Exception
Processes a conditional section.
reader
- the reader to read data from.entityResolver
- the entity resolver.
processElement
protected void processElement(IXMLReader reader,
IXMLEntityResolver entityResolver)
throws Exception
Processes an element in the DTD.
reader
- the reader to read data from.entityResolver
- the entity resolver.
processEntity
protected void processEntity(IXMLReader reader,
IXMLEntityResolver entityResolver)
throws Exception
Processes an ENTITY element.
reader
- the reader to read data from.entityResolver
- the entity resolver.
processIgnoreSection
protected void processIgnoreSection(IXMLReader reader,
IXMLEntityResolver entityResolver)
throws Exception
Processes an ignore section.
reader
- the reader to read data from.entityResolver
- the entity resolver.