code: @Override
      public String validate(DTDValidatorBase v, char[] cbuf, int start, int end, boolean normalize)
          throws XMLStreamException
      {
          while (start < end && WstxInputData.isSpaceChar(cbuf[start])) {
              ++start;
          }
  
          // Empty value?
          if (start >= end) {
              return reportValidationProblem(v, "Empty ENTITY value");
          }
          --end; // so that it now points to the last char
          while (end > start  && WstxInputData.isSpaceChar(cbuf[end])) {
              --end;
          }
  
          // Ok, need to check char validity, and also calc hash code:
          char c = cbuf[start];
          if (!WstxInputData.isNameStartChar(c, mCfgNsAware, mCfgXml11) && c != ':') {
              return reportInvalidChar(v, c, "not valid as the first ID character");
          }
          for (int i = start+1; i <= end; ++i) {
              c = cbuf[i];
              if (!WstxInputData.isNameChar(c, mCfgNsAware, mCfgXml11)) {
                  return reportInvalidChar(v, c, "not valid as an ID character");
              }
          }
  
          EntityDecl ent = findEntityDecl(v, cbuf, start, (end - start + 1));
          // only returns if it succeeded...
  
          return normalize ? ent.getName() : null;
      }
docs: Method called by the {@link DTDValidatorBase}
  to let the attribute do necessary normalization and/or validation
  for the value.