@Override
    public void addAttribute(String key, String nsPrefix, String nsURI, String value, String type) throws Exception {
        if (myState == State.POSSIBLY) {
            if ("version".equals(key) && (nsURI == null || nsURI.length() == 0)) {
                checkVersion(value, State.YES);
                NanoXmlBuilder.stop();
            }
        } else if (myState == State.POSSIBLY_SIMPLIFIED_SYNTAX) {
            if ("version".equals(key) && XsltSupport.XSLT_NS.equals(nsURI)) {
                checkVersion(value, State.SIMPLIFIED);
                NanoXmlBuilder.stop();
            }
        }
    }
@Override
    public void addAttribute(String key, String nsPrefix, String nsURI, String value, String type)