XString.prototype.lessthanorequal = function(r) {
    if (Utilities.instance_of(r, XNodeSet)) {
        return r.compareWithNumber(this.number(), Operators.greaterthan);
    }
    return this.number().lessthanorequal(r.number());