code: protected Attribute resolveNamespaceDecl(int index, boolean internURI)
      {
          Attribute ns = mNamespaces[index];
          String full = mNamespaceBuilder.getAllValues();
          String uri;
  
          if (mNsCount == 0) {
              uri = full;
          } else {
              ++index;
              if (index < mNsCount) { // not last
                  int endOffset = mNamespaces[index].mValueStartOffset;
                  uri = ns.getValue(full, endOffset);
              } else { // is last
                  uri = ns.getValue(full);
              }
          }
          if (internURI && uri.length() > 0) {
              uri = sInternCache.intern(uri);
          }
          ns.mNamespaceURI = uri;
          return ns;
      }
docs: Method called to resolve and initialize specified collected
  namespace declaration
  
  @return Attribute that contains specified namespace declaration