@Override
    public QName getAttributeName(int index) {
        if(currentEvt != START_ELEMENT && currentEvt != ATTRIBUTE){
            throw new IllegalStateException("getAttributeCount not supported for event " + currentEvt);
        }
        
        final Attribute a = emtstack[depth].getAttributes().get(index);
        
        String ns = a.getNamespaceURI();
        if("".equals(ns))
            ns = null;
        String prefix = a.getNamespacePrefix();
        if(prefix == null || "".equals(prefix)){
            prefix = XMLConstants.DEFAULT_NS_PREFIX;
        }
        
        return new QName(ns, a.getName(), prefix);
    }