RNGValidatorpublic class RNGValidator extends Object
Methods Summary |
---|
private org.iso_relax.verifier.Verifier | getVerifier(org.xml.sax.InputSource schema, org.xml.sax.ErrorHandler eh)
return getVerifier(schema, null, eh);
| private org.iso_relax.verifier.Verifier | getVerifier(org.xml.sax.InputSource schema, org.xml.sax.EntityResolver er, org.xml.sax.ErrorHandler eh)
// As of the 20030108 release of jarv this method doesn't
// work. The new release added a class loader and that
// seems to screw things up.
// final VerifierFactory f =
// VerifierFactory.newInstance("http://relaxng.org/ns/structure/1.0");
final VerifierFactory f = new com.sun.msv.verifier.jarv.TheFactoryImpl();
final Verifier verifier = f.newVerifier(schema);
verifier.setErrorHandler(eh);
verifier.setEntityResolver(er);
return verifier;
| void | validate(org.xml.sax.InputSource schema, org.xml.sax.InputSource src, java.io.Writer w)
validate(schema, src, new MyErrorHandler(w));
| void | validate(org.xml.sax.InputSource schema, org.xml.sax.InputSource src, org.xml.sax.XMLReader rdr, java.io.Writer w)
validate(schema, src, rdr, new MyErrorHandler(w) );
| void | validate(org.xml.sax.InputSource schema, org.xml.sax.InputSource src, org.xml.sax.ErrorHandler eh)
getVerifier(schema, eh).verify(src);
| void | validate(org.xml.sax.InputSource schema, org.xml.sax.InputSource src, org.xml.sax.XMLReader rdr, org.xml.sax.ErrorHandler errorHandler)Validate the given source against the given schema, using
the given reader to parser the source, handling errors
using the given {@link ErrorHandler}
rdr.setContentHandler(getVerifier(schema, rdr.getEntityResolver(), errorHandler).getVerifierHandler());
rdr.parse(src);
|
|