1 29 30 package com.caucho.relaxng; 31 32 import org.xml.sax.ErrorHandler ; 33 import org.xml.sax.SAXException ; 34 import org.xml.sax.SAXParseException ; 35 36 39 public class VerifierImpl extends Verifier { 40 private SchemaImpl _schema; 41 private ErrorHandler _errorHandler; 42 43 VerifierImpl(SchemaImpl schema) 44 { 45 _schema = schema; 46 } 47 48 51 public void setErrorHandler(ErrorHandler handler) 52 { 53 _errorHandler = handler; 54 } 55 56 59 public VerifierHandler getVerifierHandler() 60 { 61 return new VerifierHandlerImpl(_schema, this); 62 } 63 64 67 public void error(SAXParseException e) 68 throws SAXException 69 { 70 ErrorHandler handler = _errorHandler; 71 72 if (handler != null) 73 handler.error(e); 74 else 75 throw e; 76 } 77 } 78 | Popular Tags |