code: boolean allowsValue(String str, ValidationContext vc) {
      try {
        getValue(str, vc);
        return true;
      }
      catch (DatatypeException e) {
        return false;
      }
    }
docs: Requires lexicallyAllows to be true