public Value eval(String expr) throws Debugger.EvaluationException {
    assert isValid();

    try {
      final DTMIterator context = myTransformer.getContextNodeList();

      final int ctx;
      final DTM dtm = context.getDTM(myCurrentNode);
      if (dtm.getDocumentRoot(myCurrentNode) == myCurrentNode) {
        ctx = dtm.getFirstChild(myCurrentNode);
      } else {
        ctx = myCurrentNode;
      }

      final DTMNodeProxy c = new DTMNodeProxy(dtm, ctx);
      final PrefixResolver prefixResolver = new PrefixResolverDefault(c) {
        @Override
        public String getNamespaceForPrefix(String prefix, Node context) {
          if (context instanceof DTMNodeProxy) {
            final DTMNodeProxy proxy = (DTMNodeProxy)context;
            final DTM dtm = proxy.getDTM();
            int p = proxy.getDTMNodeNumber();
            while (p != DTM.NULL) {
              int nsNode = dtm.getFirstNamespaceNode(p, true);
              while (nsNode != DTM.NULL) {
                final String s = dtm.getLocalName(nsNode);
                if (s.equals(prefix)) {
                  return dtm.getNodeValue(nsNode);
                }
                nsNode = dtm.getNextNamespaceNode(p, nsNode, true);
              }
              p = dtm.getParent(p);
            }
          }
          return super.getNamespaceForPrefix(prefix, context);
        }
      };

      final XPath xPath = new XPath(expr, myCurrentElement, prefixResolver, XPath.SELECT, myTransformer.getErrorListener());
      return new XObjectValue(xPath.execute(myContext, myCurrentNode, myCurrentElement));
    } catch (Exception e) {
      debug(e);
      final String message = e.getMessage();
      throw new Debugger.EvaluationException(message != null ? message : e.getClass().getSimpleName());
    }
  }
public Value eval(String expr)