@Override
    public Iterator getAttributeAxisIterator(Object contextNode) {
        if (isElement(contextNode)) {
            return new AttributeIterator((XmlElement)contextNode);
        } else {
            return Collections.emptyIterator();
        }
    }
@Override
    public Iterator getAttributeAxisIterator(Object contextNode)