public class DAXValidator extends DefaultHandler
Modifier and Type | Field and Description |
---|---|
protected int |
m_errors
Counts the number of errors.
|
protected int |
m_fatals
Counts the number of fatal errors.
|
private Locator |
m_location
Keep the location within the document.
|
private XMLReader |
m_reader
Holds the instance of a
XMLReader class. |
private String |
m_schemafile
what is the name of the schema file in the filename hint?
|
protected boolean |
m_verbose
How verbose should we be?
|
protected int |
m_warnings
Counts the number of warnings.
|
static String |
SCHEMA_NAMESPACE
URI namespace for DAX schema.
|
protected static String |
vendorParserClass
Default parser is the Xerces parser.
|
Constructor and Description |
---|
DAXValidator(boolean verbose)
default c'tor
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endDocument() |
void |
endElement(String nsURI,
String localName,
String qName) |
void |
error(SAXParseException ex) |
void |
fatalError(SAXParseException ex) |
private String |
full_where() |
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
static void |
main(String[] args) |
void |
parse(String filename) |
private boolean |
prop(String uri,
Object value)
Sets a SAX property while capturing failed features right here.
|
private boolean |
set(String uri,
boolean flag)
Sets a feature while capturing failed features right here.
|
void |
setDocumentLocator(Locator locator) |
void |
startDocument() |
void |
startElement(String nsURI,
String localName,
String qName,
Attributes attrs) |
boolean |
statistics()
Show how many warnings, errors and fatals were shown.
|
void |
warning(SAXParseException ex) |
private String |
where() |
endPrefixMapping, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl
protected static final String vendorParserClass
public static final String SCHEMA_NAMESPACE
private String m_schemafile
private Locator m_location
protected boolean m_verbose
protected int m_warnings
protected int m_errors
protected int m_fatals
private boolean set(String uri, boolean flag)
uri
- is the feature's URI to modifyflag
- is the new value to set.private boolean prop(String uri, Object value)
uri
- is the property's URI to modifyvalue
- is the new value to set.public void warning(SAXParseException ex) throws SAXException
warning
in interface ErrorHandler
warning
in class DefaultHandler
SAXException
public void error(SAXParseException ex) throws SAXException
error
in interface ErrorHandler
error
in class DefaultHandler
SAXException
public void fatalError(SAXParseException ex) throws SAXException
fatalError
in interface ErrorHandler
fatalError
in class DefaultHandler
SAXException
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
setDocumentLocator
in class DefaultHandler
private String full_where()
private String where()
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
SAXException
public void endDocument()
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
public void startElement(String nsURI, String localName, String qName, Attributes attrs) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
public void endElement(String nsURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
ignorableWhitespace
in class DefaultHandler
SAXException
public boolean statistics()