1 16 package org.apache.cocoon.components.validation; 17 18 import java.io.IOException ; 19 20 import org.apache.excalibur.source.Source; 21 import org.xml.sax.ErrorHandler ; 22 import org.xml.sax.SAXException ; 23 24 54 public interface Validator { 55 56 57 public static final String ROLE = Validator.class.getName(); 58 59 60 public static final String GRAMMAR_ISO_SCHEMATRON = "http://purl.oclc.org/dsdl/schematron"; 61 62 public static final String GRAMMAR_RELAX_NG = "http://relaxng.org/ns/structure/1.0"; 63 64 public static final String GRAMMAR_RELAX_CORE = "http://www.xml.gr.jp/xmlns/relaxCore"; 65 66 public static final String GRAMMAR_RELAX_NS = "http://www.xml.gr.jp/xmlns/relaxNamespace"; 67 68 public static final String GRAMMAR_SCHEMATRON = "http://www.ascc.net/xml/schematron"; 69 70 public static final String GRAMMAR_TREX = "http://www.thaiopensource.com/trex"; 71 72 public static final String GRAMMAR_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema"; 73 74 public static final String GRAMMAR_XML_DTD = "http://www.w3.org/TR/REC-xml"; 75 76 95 public ValidationHandler getValidationHandler(String uri) 96 throws IOException , SAXException , ValidatorException; 97 98 115 public ValidationHandler getValidationHandler(String uri, String grammar) 116 throws IOException , SAXException , ValidatorException; 117 118 138 public ValidationHandler getValidationHandler(String uri, ErrorHandler errorHandler) 139 throws IOException , SAXException , ValidatorException; 140 141 160 public ValidationHandler getValidationHandler(String uri, String grammar, 161 ErrorHandler errorHandler) 162 throws IOException , SAXException , ValidatorException; 163 164 183 public ValidationHandler getValidationHandler(Source source) 184 throws IOException , SAXException , ValidatorException; 185 186 203 public ValidationHandler getValidationHandler(Source source, String grammar) 204 throws IOException , SAXException , ValidatorException; 205 206 226 public ValidationHandler getValidationHandler(Source source, 227 ErrorHandler errorHandler) 228 throws IOException , SAXException , ValidatorException; 229 230 249 public ValidationHandler getValidationHandler(Source source, String grammar, 250 ErrorHandler errorHandler) 251 throws IOException , SAXException , ValidatorException; 252 253 } 254 | Popular Tags |