Class CompactNsContext

java.lang.Object
com.ctc.wstx.util.BaseNsContext
com.ctc.wstx.sr.CompactNsContext
All Implemented Interfaces:
NamespaceContext

public final class CompactNsContext extends BaseNsContext
Simple implementation of separate non-transient namespace context object. Created for start-element event by transient namespace instance updated by stream reader.

Note about implementation: Location information is only needed (and only needs to passed) if access is made via extended interface; one that can return information about actual Namespace event objects.

  • Field Details

    • mLocation

      final Location mLocation
    • mNamespaces

      final String[] mNamespaces
      Array that contains 2 Strings for each declared default namespace (including default namespace declarations); first is the prefix, second URI.
    • mNsLength

      final int mNsLength
      Number of entries in mNamespaces (which is twice the number of bindings)
    • mFirstLocalNs

      final int mFirstLocalNs
      Index of first namespace pair in mNamespaces that is declared in scope of element for which this context was constructed. May be equal to mNsLength (which indicates there are no local bindings).
    • mNsList

      transient ArrayList<Namespace> mNsList
      List only needed to support List accessor from start-element event; created lazily if/as needed.
  • Constructor Details

    • CompactNsContext

      public CompactNsContext(Location loc, String[] namespaces, int nsLen, int firstLocal)
  • Method Details