code: @Override
      protected Type getType(final int mKey1, final int mKey2) throws TTXPathException {
  
          final Type mType1 = Type.getType(mKey1).getPrimitiveBaseType();
          final Type mType2 = Type.getType(mKey2).getPrimitiveBaseType();
  
          if (XPATH_10_COMP) {
              if (mType1.isNumericType() || mType2.isNumericType()) {
                  return Type.DOUBLE;
              }
  
              if (mType1 == Type.STRING || mType2 == Type.STRING
                  || (mType1 == Type.UNTYPED_ATOMIC && mType2 == Type.UNTYPED_ATOMIC)) {
                  return Type.STRING;
              }
  
              if (mType1 == Type.UNTYPED_ATOMIC || mType2 == Type.UNTYPED_ATOMIC) {
                  return Type.UNTYPED_ATOMIC;
  
              }
  
          } else {
              if (mType1 == Type.UNTYPED_ATOMIC) {
                  switch (mType2) {
                  case UNTYPED_ATOMIC:
                  case STRING:
                      return Type.STRING;
                  case INTEGER:
                  case DECIMAL:
                  case FLOAT:
                  case DOUBLE:
                      return Type.DOUBLE;
  
                  default:
                      return mType2;
                  }
              }
  
              if (mType2 == Type.UNTYPED_ATOMIC) {
                  switch (mType1) {
                  case UNTYPED_ATOMIC:
                  case STRING:
                      return Type.STRING;
                  case INTEGER:
                  case DECIMAL:
                  case FLOAT:
                  case DOUBLE:
                      return Type.DOUBLE;
  
                  default:
                      return mType1;
                  }
              }
  
          }
  
          return Type.getLeastCommonType(mType1, mType2);
  
      }
docs: {@inheritDoc}