if ("".equals(attr.value) && !input.xml11) error("illegal use of 1.1-style prefix unbinding in 1.0 document");
  private boolean addNamespace(Attribute attr)    throws XMLStreamException  {    if ("xmlns".equals(attr.name))      {        LinkedHashMap ctx = (LinkedHashMap) namespaces.getFirst();        if (ctx.get(XMLConstants.DEFAULT_NS_PREFIX) != null)          error("Duplicate default namespace declaration");        if (XMLConstants.XML_NS_URI.equals(attr.value))          error("can't bind XML namespace");        if ("".equals(attr.value) && !input.xml11)          error("illegal use of 1.1-style prefix unbinding in 1.0 document");        ctx.put(XMLConstants.DEFAULT_NS_PREFIX, attr.value);        return true;      }    else if ("xmlns".equals(attr.prefix))      {        LinkedHashMap ctx = (LinkedHashMap) namespaces.getFirst();        if (ctx.get(attr.localName) != null)          error("Duplicate namespace declaration for prefix",                attr.localName);        if (XMLConstants.XML_NS_PREFIX.equals(attr.localName))          {            if (!XMLConstants.XML_NS_URI.equals(attr.value))              error("can't redeclare xml prefix");            else              return false; // treat as attribute          }        if (XMLConstants.XML_NS_URI.equals(attr.value))          error("can't bind non-xml prefix to XML namespace");        if (XMLConstants.XMLNS_ATTRIBUTE.equals(attr.localName))          error("can't redeclare xmlns prefix");        if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(attr.value))          error("can't bind non-xmlns prefix to XML Namespace namespace");        if ("".equals(attr.value) && !input.xml11)          error("illegal use of 1.1-style prefix unbinding in 1.0 document");        ctx.put(attr.localName, attr.value);        return true;      }    return false;  }