public abstract class AbstractExtensionBindingChecker extends SubtreeCutter
DTDExtensionBindingChecker
and ExtensionBindingChecker
.Modifier and Type | Field and Description |
---|---|
protected boolean |
allowExtensions
If false, any use of extensions is reported as an error.
|
protected Set<String> |
enabledExtensions
Set of namespace URIs that designates enabled extensions.
|
protected NamespaceSupport |
nsSupport
Remembers in-scope namespace bindings.
|
protected String |
schemaLanguage
Namespace URI of the target schema language.
|
Constructor and Description |
---|
AbstractExtensionBindingChecker(String schemaLanguage,
Options options,
ErrorHandler handler) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkAndEnable(String uri)
Verify that the given URI is indeed a valid extension namespace URI,
and if so enable it.
|
void |
endPrefixMapping(String prefix) |
protected SAXParseException |
error(String msg)
Reports an error and returns the created SAXParseException
|
protected boolean |
isRecognizableExtension(String namespaceUri)
Checks if the given namespace URI can be potentially recognized
by this XJC.
|
protected boolean |
isSupportedExtension(String namespaceUri)
Checks if the given namespace URI is supported as the extension
bindings.
|
void |
setDocumentLocator(Locator locator) |
void |
startDocument() |
void |
startPrefixMapping(String prefix,
String uri) |
protected void |
verifyTagName(String namespaceURI,
String localName,
String qName)
If the tag name belongs to a plugin namespace-wise, check its local name
to make sure it's correct.
|
protected void |
warning(String msg)
Reports a warning.
|
endElement, isCutting, setContentHandler, startCutting, startElement
characters, endDocument, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, unparsedEntityDecl, warning
protected final NamespaceSupport nsSupport
protected final Set<String> enabledExtensions
protected final String schemaLanguage
protected final boolean allowExtensions
public AbstractExtensionBindingChecker(String schemaLanguage, Options options, ErrorHandler handler)
handler
- This error handler will receive detected errors.protected final void checkAndEnable(String uri) throws SAXException
This method does all the error handling.
SAXException
protected final void verifyTagName(String namespaceURI, String localName, String qName) throws SAXException
SAXException
protected final boolean isSupportedExtension(String namespaceUri)
protected final boolean isRecognizableExtension(String namespaceUri)
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
setDocumentLocator
in class XMLFilterImpl
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
startDocument
in class SubtreeCutter
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class XMLFilterImpl
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class XMLFilterImpl
SAXException
protected final SAXParseException error(String msg) throws SAXException
SAXException
protected final void warning(String msg) throws SAXException
SAXException
Copyright © 2021 JBoss by Red Hat. All rights reserved.