public boolean checkXMLRules ( Document doc , Document instruction ) throws Exception { if ( doc == null || doc . getDocumentElement ( ) == null ) return false ; Element e = instruction . getDocumentElement ( ) ; PrintWriter logger = new PrintWriter ( System . out ) ; Document parsedDoc = parse ( doc , e , logger ) ; return ( parsedDoc != null ) ; }
A method to validate a pool of schemas outside of the request element .