docs: private AttributesImpl validateReference(final String attrName, final Attributes atts, final AttributesImpl modified) {
          AttributesImpl res = modified;
          final String href = atts.getValue(attrName);
          if (href != null) {
              try {
                  new URI(href);
              } catch (final URISyntaxException e) {
                  switch (processingMode) {
                  case STRICT:
                      throw new RuntimeException(MessageUtils.getMessage("DOTJ054E", attrName, href).setLocation(locator) + ": " + e.getMessage(), e);
                  case SKIP:
                      logger.error(MessageUtils.getMessage("DOTJ054E", attrName, href).setLocation(locator) + ", using invalid value.");
                      break;
                  case LAX:
                      try {
                          final URI uri = new URI(URLUtils.clean(href.trim()));
                          if (res == null) {
                              res = new AttributesImpl(atts);
                          }
                          res.setValue(res.getIndex(attrName), uri.toASCIIString());
                          logger.error(MessageUtils.getMessage("DOTJ054E", attrName, href).setLocation(locator) + ", using '" + uri.toASCIIString() + "'.");
                      } catch (final URISyntaxException e1) {
                          logger.error(MessageUtils.getMessage("DOTJ054E", attrName, href).setLocation(locator) + ", using invalid value.");
                      }
                      break;
                  }
              }
          }
          return res;
      }