public class IncorrectNamespaceURIChecker
extends org.xml.sax.helpers.XMLFilterImpl
However, one unfortunate downside of this philosophically correct behavior is that there is no provision or safety check when an user misspelled JAXB binding customization namespace.
This checker inspects the input document and look for the use of the prefix "jaxb". If the document doesn't associate any prefix to the JAXB customization URI and if it does associate the jaxb prefix, this checker will issue a warning.
This warning can happen to completely correct schema (because nothing prevents you from using the prefix "jaxb" for other purpose while using a JAXB compiler on the same schema) but in practice this would be quite unlikely.
This justifies the use of this filter.
| Constructor | Description |
|---|---|
IncorrectNamespaceURIChecker(org.xml.sax.ErrorHandler handler) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
endDocument() |
|
void |
endPrefixMapping(java.lang.String prefix) |
|
void |
setDocumentLocator(org.xml.sax.Locator locator) |
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts) |
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcharacters, endElement, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, unparsedEntityDecl, warningpublic IncorrectNamespaceURIChecker(org.xml.sax.ErrorHandler handler)
public void endDocument()
throws org.xml.sax.SAXException
endDocument in class org.xml.sax.helpers.XMLFilterImplorg.xml.sax.SAXExceptionpublic void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
startPrefixMapping in class org.xml.sax.helpers.XMLFilterImplorg.xml.sax.SAXExceptionpublic void endPrefixMapping(java.lang.String prefix)
throws org.xml.sax.SAXException
endPrefixMapping in class org.xml.sax.helpers.XMLFilterImplorg.xml.sax.SAXExceptionpublic void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
startElement in class org.xml.sax.helpers.XMLFilterImplorg.xml.sax.SAXExceptionpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in class org.xml.sax.helpers.XMLFilterImplCopyright © 2017 Oracle Corporation. All rights reserved.