Class NamespaceExtractor


  • public class NamespaceExtractor
    extends java.lang.Object
    Extracts namespace mapping information from an XML file. XML file is parsed and all startPrefixMapping events are intercepted. Scoping of prefix mapping within the XML file may result in multiple namespace using the same prefix. This is handled by mangling the prefix when required. The resulting NamespaceMapping implements NamespaceResolver and can be used by tools (such as o.a.j.tools.nodetype.CompactNodeTypeDefWriter) to resolve namespaces.
    • Constructor Detail

      • NamespaceExtractor

        public NamespaceExtractor​(java.lang.String fileName,
                                  java.lang.String dpb)
                           throws NamespaceException
        Constructor
        Parameters:
        fileName -
        dpb -
        Throws:
        NamespaceException
    • Method Detail

      • getNamespaceMapping

        public NamespaceMapping getNamespaceMapping()
        getNamespaceMapping
        Returns:
        a NamespaceMapping