@Override
  public final Iterator<?> getNamespaceAxisIterator(final Object contextNode) throws UnsupportedAxisException {
    //The namespace axis applies to Elements only in XPath.
    if (!isElement(contextNode)) {
      return JaxenConstants.EMPTY_ITERATOR;
    }
    NamespaceContainer[] ret = emtnsmap.get(contextNode);
    if (ret == null) {
      List<Namespace> nsl = ((Element)contextNode).getNamespacesInScope();
      ret = new NamespaceContainer[nsl.size()];
      int i = 0;
      for (Namespace ns : nsl) {
        ret[i++] = new NamespaceContainer(ns, (Element)contextNode);
      }
      emtnsmap.put((Element)contextNode, ret);
    }

    return Arrays.asList(ret).iterator();
  }
@Override
  public final Iterator<?> getNamespaceAxisIterator(final Object contextNode)