Class NamespaceEmitter

  • All Implemented Interfaces:
    Result

    public class NamespaceEmitter
    extends ProxyEmitter
    NamespaceEmitter is a ProxyEmitter responsible for removing duplicate namespace declarations. It also ensures that an xmlns="" undeclaration is output when necessary.
    • Field Detail

      • nscodeXML

        protected int nscodeXML
      • nscodeNull

        protected int nscodeNull
    • Constructor Detail

      • NamespaceEmitter

        public NamespaceEmitter()
    • Method Detail

      • startElement

        public void startElement​(int nameCode,
                                 Attributes attList,
                                 int[] namespaceCodes,
                                 int nrOfCodes)
                          throws TransformerException
        startElement. This call removes redundant namespace declarations, and possibly adds an xmlns="" undeclaration.
        Overrides:
        startElement in class ProxyEmitter
        namespaceCodes - Array of namespace codes identifying the namespace prefix/uri pairs associated with this element
        nrOfCodes - Number of significant entries within namespaces array
        Throws:
        TransformerException