1 16 package org.apache.cocoon.components.validation.impl; 17 18 import org.apache.cocoon.components.validation.ValidationHandler; 19 import org.apache.excalibur.source.SourceValidity; 20 import org.apache.excalibur.xml.sax.NOPContentHandler; 21 import org.apache.excalibur.xml.sax.NOPLexicalHandler; 22 import org.apache.excalibur.xml.sax.XMLConsumerProxy; 23 import org.xml.sax.ContentHandler ; 24 import org.xml.sax.ext.LexicalHandler ; 25 26 31 public class DefaultValidationHandler extends XMLConsumerProxy 32 implements ValidationHandler { 33 34 35 private final SourceValidity validity; 36 37 40 public DefaultValidationHandler(SourceValidity validity, 41 ContentHandler handler) { 42 this(validity, handler, null); 43 } 44 45 48 public DefaultValidationHandler(SourceValidity validity, 49 ContentHandler contentHandler, 50 LexicalHandler lexicalHandler) { 51 super(contentHandler == null? new NOPContentHandler(): contentHandler, 52 lexicalHandler == null? new NOPLexicalHandler(): lexicalHandler); 53 this.validity = validity; 54 } 55 56 64 public SourceValidity getValidity() { 65 return this.validity; 66 } 67 } 68 | Popular Tags |