code: private void addError(short severity, SAXParseException spex) {
          if (spex.getLineNumber() > 0) {
              buf.append("Line " + spex.getLineNumber() + " - ");
          }
          buf.append(spex.getMessage() + "\n");
          ValidationError error = new ValidationError(severity, buf.toString());
          errors.add(error);
          buf.setLength(0);
      }
docs: Adds a validation error based on a <code>SAXParseException</code>.
  
  @param severity
  the severity of the error
  @param spex
  the <code>SAXParseException</code> raised while validating the
  XML source