code: public void checkAttrWrite(String nsURI, String localName)
          throws XMLStreamException
      {
          AttrName an = new AttrName(nsURI, localName);
          if (mAttrSet == null) {
              /* 13-Dec-2005, TSa: Should use a more efficient Set/Map value
               *   for this in future -- specifically one that could use
               *   ns/local-name pairs without intermediate objects
               */
              mAttrSet = new HashSet<AttrName>();
          }
          if (!mAttrSet.add(an)) {
              throw new XMLStreamException("Duplicate attribute write for attribute '"+an+"'");
          }
      }
docs: /*
  /////////////////////////////////////////////////////////////////////
  Public API, ns binding, checking
  /////////////////////////////////////////////////////////////////////