code: public void validate(Document doc) {
      	try {
      		doValidate(doc);
      	}
          catch (Exception e) {
              throw new PluginException("Error validating document: " + e, e);
          }
      }
docs: Validate the given xmlDocument, using any schemas specified in the document itself.
  
  @throws PluginException for any validation or IO errors.