code: protected void recordLocalNSDecl(Node node) {
          NamedNodeMap atts = ((Element) node).getAttributes();
          int length = atts.getLength();
  
          for (int i = 0; i < length; i++) {
              Node attr = atts.item(i);
  
              String localName = attr.getLocalName();
              String attrPrefix = attr.getPrefix();
              String attrValue = attr.getNodeValue();
              String attrNS = attr.getNamespaceURI();
  
              localName =
                  localName == null
                      || XMLNS_PREFIX.equals(localName) ? "" : localName;
              attrPrefix = attrPrefix == null ? "" : attrPrefix;
              attrValue = attrValue == null ? "" : attrValue;
              attrNS = attrNS == null ? "" : attrNS;
  
              // check if attribute is a namespace decl
              if (XMLNS_URI.equals(attrNS)) {
  
                  // No prefix may be bound to http://www.w3.org/2000/xmlns/.
                  if (XMLNS_URI.equals(attrValue)) {
                      String msg =
                          Utils.messages.createMessage(
                              MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
                              new Object[] { attrPrefix, XMLNS_URI });
  
                      if (fErrorHandler != null) {
                          fErrorHandler.handleError(
                              new DOMErrorImpl(
                                  DOMError.SEVERITY_ERROR,
                                  msg,
                                  MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND,
                                  null,
                                  null,
                                  null));
                      }
                  } else {
                      // store the namespace-declaration
                  	if (XMLNS_PREFIX.equals(attrPrefix) ) {
                          // record valid decl
                          if (attrValue.length() != 0) {
                              fNSBinder.declarePrefix(localName, attrValue);
                          } else {
                              // Error; xmlns:prefix=""
                          }
                      } else { // xmlns
                          // empty prefix is always bound ("" or some string)
                          fNSBinder.declarePrefix("", attrValue);
                      }
                  }
                  
              }
          }
      }
docs: Records local namespace declarations, to be used for normalization later
  
  @param Node, The element node, whose namespace declarations are to be recorded