public class DAXValidator
extends org.xml.sax.helpers.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 org.xml.sax.Locator |
m_location
Keep the location within the document.
|
private org.xml.sax.XMLReader |
m_reader
Holds the instance of a
XMLReader class. |
private java.lang.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 java.lang.String |
SCHEMA_NAMESPACE
URI namespace for DAX schema.
|
protected static java.lang.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(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName) |
void |
error(org.xml.sax.SAXParseException ex) |
void |
fatalError(org.xml.sax.SAXParseException ex) |
private java.lang.String |
full_where() |
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
static void |
main(java.lang.String[] args) |
void |
parse(java.lang.String filename) |
private boolean |
prop(java.lang.String uri,
java.lang.Object value)
Sets a SAX property while capturing failed features right here.
|
private boolean |
set(java.lang.String uri,
boolean flag)
Sets a feature while capturing failed features right here.
|
void |
setDocumentLocator(org.xml.sax.Locator locator) |
void |
startDocument() |
void |
startElement(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs) |
boolean |
statistics()
Show how many warnings, errors and fatals were shown.
|
void |
warning(org.xml.sax.SAXParseException ex) |
private java.lang.String |
where() |
protected static final java.lang.String vendorParserClass
public static final java.lang.String SCHEMA_NAMESPACE
private java.lang.String m_schemafile
private org.xml.sax.XMLReader m_reader
XMLReader class.private org.xml.sax.Locator m_location
protected boolean m_verbose
protected int m_warnings
protected int m_errors
protected int m_fatals
public DAXValidator(boolean verbose)
throws java.lang.Exception
java.lang.Exceptionprivate boolean set(java.lang.String uri,
boolean flag)
uri - is the feature's URI to modifyflag - is the new value to set.private boolean prop(java.lang.String uri,
java.lang.Object value)
uri - is the property's URI to modifyvalue - is the new value to set.public void warning(org.xml.sax.SAXParseException ex)
throws org.xml.sax.SAXException
warning in interface org.xml.sax.ErrorHandlerwarning in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void error(org.xml.sax.SAXParseException ex)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlererror in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void fatalError(org.xml.sax.SAXParseException ex)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.ContentHandlersetDocumentLocator in class org.xml.sax.helpers.DefaultHandlerprivate java.lang.String full_where()
private java.lang.String where()
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void endDocument()
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerpublic void startElement(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void endElement(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.ContentHandlerignorableWhitespace in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void parse(java.lang.String filename)
throws java.lang.Exception
java.lang.Exceptionpublic boolean statistics()
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception