code: public synchronized ValidationMessage[] validate(
              int type, String prefix, String uri, PageData page) {
          try {
              this.tlvType = type;
              this.uri = uri;
              // initialize
              messageVector = new Vector();
  
              // save the prefix
              this.prefix = prefix;
  
              // parse parameters if necessary
              try {
                  if (config == null) {
                      configure((String) getInitParameters().get(EXP_ATT_PARAM));
                  }
              } catch (NoSuchElementException ex) {
                  // parsing error
                  return vmFromString(
                          Resources.getMessage("TLV_PARAMETER_ERROR",
                                  EXP_ATT_PARAM));
              }
  
              // get a handler
              DefaultHandler h = getHandler();
  
              // parse the page
              XMLReader xmlReader = XmlUtil.newXMLReader(null);
              xmlReader.setContentHandler(h);
              InputStream inputStream = page.getInputStream();
              try {
                  xmlReader.parse(new InputSource(inputStream));
              } finally {
                  try {
                      inputStream.close();
                  } catch (IOException e) {
                      // Suppressed.
                  }
              }
  
              if (messageVector.size() == 0) {
                  return null;
              } else {
                  return vmFromVector(messageVector);
              }
  
          } catch (SAXException ex) {
              return vmFromString(ex.toString());
          } catch (IOException ex) {
              return vmFromString(ex.toString());
          } catch (ParserConfigurationException ex) {
              return vmFromString(ex.toString());
          }
      }
docs: do the validation.