code: public final XPath lenient(final boolean lenient) {
          if (lenient == isLenient()) {
              return this;
          } else if (!lenient) {
              return new StrictXPath(this.support);
          } else {
              return new LenientXPath(this.support);
          }
      }
docs: Returns a lenient / not lenient version of this {@code XPath} expression.
  
  @param lenient
  the requested lenient mode
  @return an {@code XPath} expression with the same xpath string of this expression but the
  requested lenient mode; note that this {@code XPath} instance is returned in case
  the requested lenient mode matches the mode of this expression