code: public BaseNsContext createNonTransientNsContext(Location loc)
      {
          // Have an instance we can reuse? Great!
          if (mLastNsContext != null) {
              return mLastNsContext;
          }
  
          // No namespaces declared at this point? Easy, as well:
          int totalNsSize = mNamespaces.size();
          if (totalNsSize < 1) {
              return (mLastNsContext = EmptyNamespaceContext.getInstance());
          }
  
          // Otherwise, we need to create a new non-empty context:
          int localCount = getCurrentNsCount() << 1;
          BaseNsContext nsCtxt = new CompactNsContext
              (loc, /*getDefaultNsURI(),*/
               mNamespaces.asArray(), totalNsSize,
               totalNsSize - localCount);
          /* And it can be shared if there are no new ('local', ie. included
           * within this start element) bindings -- if there are, underlying
           * array might be shareable, but offsets wouldn't be)
           */
          if (localCount == 0) {
              mLastNsContext = nsCtxt;
          }
          return nsCtxt;
  }
docs: Method called to construct a non-transient NamespaceContext instance;
  generally needed when creating events to return from event-based
  iterators.