private static Type mapType(int type) {
      switch (type) {
        case com.icl.saxon.expr.Value.BOOLEAN:
          return XPathType.BOOLEAN;
        case com.icl.saxon.expr.Value.NODESET:
          return XPathType.NODESET;
        case com.icl.saxon.expr.Value.NUMBER:
          return XPathType.NUMBER;
        case com.icl.saxon.expr.Value.STRING:
          return XPathType.STRING;
        case com.icl.saxon.expr.Value.OBJECT:
          return XPathType.OBJECT;
        default:
          return XPathType.UNKNOWN;
      }
    }
private static Type mapType(int type)