@Override
  public void addAttribute(String key, String nsPrefix, String nsURI, String value, String type) throws Exception {
    String fullName = key;
    if (nsPrefix != null) {
      fullName = nsPrefix + ':' + key;
    }
    IXMLElement top = stack.peek();
    if (top.hasAttribute(fullName)) {
      throw new XMLParseException(top.getSystemID(), top.getLineNr(), "Duplicate attribute: " + key);
    }
    if (nsPrefix != null) {
      top.setAttribute(fullName, nsURI, value);
    }
    else {
      top.setAttribute(fullName, value);
    }
  }
@Override
  public void addAttribute(String key, String nsPrefix, String nsURI, String value, String type)