|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.n3.nanoxml.NonValidator
public class NonValidator
NonValidator processes the DTD and handles entity definitions. It does not do any validation itself.
Field Summary | |
---|---|
protected java.util.Hashtable<java.lang.String,java.util.Properties> |
attributeDefaultValues
Contains the default values for attributes for the different element types. |
protected java.util.Stack<java.util.Properties> |
currentElements
The stack of elements to be processed. |
private static char[] |
END_OF_CONDSECTION
Delimiter for CDATA sections. |
protected IXMLEntityResolver |
parameterEntityResolver
The parameter entity resolver. |
protected int |
peLevel
The parameter entity level. |
Constructor Summary | |
---|---|
NonValidator()
Creates the "validator". |
Method Summary | |
---|---|
void |
attributeAdded(java.lang.String key,
java.lang.String nsPrefix,
java.lang.String nsSystemId,
java.lang.String value,
java.lang.String systemId,
int lineNr)
Indicates that an attribute has been added to the current element. |
void |
elementAttributesProcessed(java.lang.String name,
java.lang.String nsPrefix,
java.lang.String nsSystemId,
java.util.Properties extraAttributes,
java.lang.String systemId,
int lineNr)
This method is called when the attributes of an XML element have been processed. |
void |
elementEnded(java.lang.String name,
java.lang.String nsPrefix,
java.lang.String nsSystemId,
java.lang.String systemId,
int lineNr)
Indicates that the current element has ended. |
void |
elementStarted(java.lang.String name,
java.lang.String nsPrefix,
java.lang.String nsSystemId,
java.lang.String systemId,
int lineNr)
Indicates that an element has been started. |
protected void |
finalize()
Cleans up the object when it's destroyed. |
IXMLEntityResolver |
getParameterEntityResolver()
Returns the parameter entity resolver. |
void |
parseDTD(java.lang.String publicID,
IXMLReader reader,
IXMLEntityResolver entityResolver,
boolean external)
Parses the DTD. |
void |
PCDataAdded(java.lang.String systemId,
int lineNr)
Indicates that a new #PCDATA element has been encountered. |
protected void |
processAttList(IXMLReader reader,
IXMLEntityResolver entityResolver)
Processes an ATTLIST element. |
protected void |
processConditionalSection(IXMLReader reader,
IXMLEntityResolver entityResolver)
Processes a conditional section. |
protected void |
processElement(IXMLReader reader,
IXMLEntityResolver entityResolver)
Processes an element in the DTD. |
protected void |
processEntity(IXMLReader reader,
IXMLEntityResolver entityResolver)
Processes an ENTITY element. |
protected void |
processIgnoreSection(IXMLReader reader,
IXMLEntityResolver entityResolver)
Processes an ignore section. |
void |
setParameterEntityResolver(IXMLEntityResolver resolver)
Sets the parameter entity resolver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final char[] END_OF_CONDSECTION
protected IXMLEntityResolver parameterEntityResolver
protected int peLevel
protected java.util.Hashtable<java.lang.String,java.util.Properties> attributeDefaultValues
protected java.util.Stack<java.util.Properties> currentElements
Constructor Detail |
---|
public NonValidator()
Method Detail |
---|
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void setParameterEntityResolver(IXMLEntityResolver resolver)
setParameterEntityResolver
in interface IXMLValidator
resolver
- the entity resolver.public IXMLEntityResolver getParameterEntityResolver()
getParameterEntityResolver
in interface IXMLValidator
public void parseDTD(java.lang.String publicID, IXMLReader reader, IXMLEntityResolver entityResolver, boolean external) throws java.lang.Exception
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.
java.lang.Exception
- if something went wrong.protected void processElement(IXMLReader reader, IXMLEntityResolver entityResolver) throws java.lang.Exception
reader
- the reader to read data fromentityResolver
- the entity resolver
java.lang.Exception
- if something went wrong.protected void processConditionalSection(IXMLReader reader, IXMLEntityResolver entityResolver) throws java.lang.Exception
reader
- the reader to read data fromentityResolver
- the entity resolver
java.lang.Exception
- if something went wrong.protected void processIgnoreSection(IXMLReader reader, IXMLEntityResolver entityResolver) throws java.lang.Exception
reader
- the reader to read data fromentityResolver
- the entity resolver
java.lang.Exception
- if something went wrong.protected void processAttList(IXMLReader reader, IXMLEntityResolver entityResolver) throws java.lang.Exception
reader
- the reader to read data fromentityResolver
- the entity resolver
java.lang.Exception
- if something went wrong.protected void processEntity(IXMLReader reader, IXMLEntityResolver entityResolver) throws java.lang.Exception
reader
- the reader to read data fromentityResolver
- the entity resolver
java.lang.Exception
- if something went wrong.public void elementStarted(java.lang.String name, java.lang.String nsPrefix, java.lang.String nsSystemId, java.lang.String systemId, int lineNr)
elementStarted
in interface IXMLValidator
name
- the name of the element.nsPrefix
- the prefix used to identify the namespacensSystemId
- the system ID associated with the namespacesystemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.public void elementEnded(java.lang.String name, java.lang.String nsPrefix, java.lang.String nsSystemId, java.lang.String systemId, int lineNr)
elementEnded
in interface IXMLValidator
name
- the name of the element.nsPrefix
- the prefix used to identify the namespacensSystemId
- the system ID associated with the namespacesystemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.public void elementAttributesProcessed(java.lang.String name, java.lang.String nsPrefix, java.lang.String nsSystemId, java.util.Properties extraAttributes, java.lang.String systemId, int lineNr)
elementAttributesProcessed
in interface IXMLValidator
name
- the name of the element.nsPrefix
- the prefix used to identify the namespacensSystemId
- the system ID associated with the namespaceextraAttributes
- 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.public void attributeAdded(java.lang.String key, java.lang.String nsPrefix, java.lang.String nsSystemId, java.lang.String value, java.lang.String systemId, int lineNr)
attributeAdded
in interface IXMLValidator
key
- the name of the attribute.nsPrefix
- the prefix used to identify the namespacensSystemId
- the system ID associated with the namespacevalue
- 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.public void PCDataAdded(java.lang.String systemId, int lineNr)
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |