public class NamespaceFilter extends org.xml.sax.helpers.XMLFilterImpl
This is particularly useful for JCR exports, as we don't want to pollute bootstrap files,
which could in turn pollute the namespace registries of other instances, or cause conflicts there.
Magnolia's JCR export typically white-lists only sv
and xsi
namespaces.
Constructor and Description |
---|
NamespaceFilter(String... whitelistedNamespaces) |
Modifier and Type | Method and Description |
---|---|
void |
endPrefixMapping(String prefix) |
void |
startPrefixMapping(String prefix,
String uri) |
characters, endDocument, endElement, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startElement, unparsedEntityDecl, warning
public NamespaceFilter(String... whitelistedNamespaces)
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class org.xml.sax.helpers.XMLFilterImpl
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class org.xml.sax.helpers.XMLFilterImpl
SAXException
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.