@Override
  public final Object getParentNode(Object contextNode) throws UnsupportedAxisException {
    if (contextNode instanceof Document) {
      return null;
    }
    if (contextNode instanceof NamespaceContainer) {
      return ((NamespaceContainer)contextNode).getParentElement();
    }
    if (contextNode instanceof Content) {
      return ((Content)contextNode).getParent();
    }
    if (contextNode instanceof Attribute) {
      return ((Attribute)contextNode).getParent();
    }
    return null;
  }
@Override
  public final Object getParentNode(Object contextNode)