Class NsDeclaration

java.lang.Object
com.fasterxml.aalto.in.NsDeclaration

public final class NsDeclaration extends Object
This class encapsulates information about a namespace binding declaration, associated with start elements. Declarations are stored as a linked list, to minimize fixed allocations, and since they only need to be accessed directly when dealing with START_ELEMENT and END_ELEMENT, not when binding element or attribute names.
  • Constructor Details

    • NsDeclaration

      public NsDeclaration(com.fasterxml.aalto.in.NsBinding binding, String newURI, NsDeclaration prevDecl, int level)
  • Method Details

    • getLevel

      public int getLevel()
    • getPrev

      public NsDeclaration getPrev()
    • getBinding

      public com.fasterxml.aalto.in.NsBinding getBinding()
    • getPrefix

      public String getPrefix()
    • getCurrNsURI

      public String getCurrNsURI()
    • hasPrefix

      public boolean hasPrefix(String prefix)
    • hasNsURI

      public boolean hasNsURI(String uri)
    • unbind

      public NsDeclaration unbind()
      Method called after END_ELEMENT is processed, to unbind declaration that now goes out of scope
    • alreadyDeclared

      public boolean alreadyDeclared(String prefix, int level)
    • countDeclsOnLevel

      public int countDeclsOnLevel(int level)
    • toString

      public String toString()
      Overrides:
      toString in class Object