public class IncorrectNamespaceURIChecker extends 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 and Description |
|---|
IncorrectNamespaceURIChecker(ErrorHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
void |
endDocument() |
void |
endPrefixMapping(String prefix) |
void |
setDocumentLocator(Locator locator) |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts) |
void |
startPrefixMapping(String prefix,
String uri) |
characters, 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(ErrorHandler handler)
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerendDocument in class XMLFilterImplSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class XMLFilterImplSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerendPrefixMapping in class XMLFilterImplSAXExceptionpublic void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerstartElement in class XMLFilterImplSAXExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlersetDocumentLocator in class XMLFilterImplCopyright © 2018 JBoss by Red Hat. All rights reserved.