code: public void addAttribute(String localName, String value) {
          if ("id".equals(localName)) {
              super.addAttribute("", localName, localName, "ID", value);
          } else {
              super.addAttribute("", localName, localName, "CDATA", value);
          }
      }
docs: Adds an attribute that is not in a namespace. The infoset type
  of the attribute will be ID if the <code>localName</code> is
  "id" and CDATA otherwise.
  
  @param localName the local name of the attribute
  @param value the value of the attribute