Class EmptyNamespaceContext

  • All Implemented Interfaces:
    javax.xml.namespace.NamespaceContext

    public final class EmptyNamespaceContext
    extends BaseNsContext
    Dummy NamespaceContext (and BaseNsContext) implementation that is usually used in non-namespace-aware mode.

    Note: differs from Stax2 reference implementation's version slightly, since it needs to support Woodstox specific extensions for efficient namespace declaration serialization.

    • Constructor Detail

      • EmptyNamespaceContext

        private EmptyNamespaceContext()
    • Method Detail

      • getNamespaces

        public java.util.Iterator<javax.xml.stream.events.Namespace> getNamespaces()
        Specified by:
        getNamespaces in class BaseNsContext
      • outputNamespaceDeclarations

        public void outputNamespaceDeclarations​(java.io.Writer w)
        Method called by the matching start element class to output all namespace declarations active in current namespace scope, if any.
        Specified by:
        outputNamespaceDeclarations in class BaseNsContext
      • doGetPrefix

        public java.lang.String doGetPrefix​(java.lang.String nsURI)
        Specified by:
        doGetPrefix in class BaseNsContext
      • doGetPrefixes

        public java.util.Iterator<java.lang.String> doGetPrefixes​(java.lang.String nsURI)
        Specified by:
        doGetPrefixes in class BaseNsContext