1 16 17 package org.apache.xerces.impl.dtd; 18 19 import org.apache.xerces.impl.Constants; 20 import org.apache.xerces.xni.parser.XMLComponentManager; 21 22 31 public class XML11DTDValidator extends XMLDTDValidator { 32 33 37 protected final static String DTD_VALIDATOR_PROPERTY = 38 Constants.XERCES_PROPERTY_PREFIX+Constants.DTD_VALIDATOR_PROPERTY; 39 40 44 45 public XML11DTDValidator() { 46 47 super(); 48 } 50 public void reset(XMLComponentManager manager) { 54 XMLDTDValidator curr = null; 55 if((curr = (XMLDTDValidator)manager.getProperty(DTD_VALIDATOR_PROPERTY)) != null && 56 curr != this) { 57 fGrammarBucket = curr.getGrammarBucket(); 58 } 59 super.reset(manager); 60 } 62 protected void init() { 63 if(fValidation || fDynamicValidation) { 64 super.init(); 65 67 try { 68 fValID = fDatatypeValidatorFactory.getBuiltInDV("XML11ID"); 69 fValIDRef = fDatatypeValidatorFactory.getBuiltInDV("XML11IDREF"); 70 fValIDRefs = fDatatypeValidatorFactory.getBuiltInDV("XML11IDREFS"); 71 fValNMTOKEN = fDatatypeValidatorFactory.getBuiltInDV("XML11NMTOKEN"); 72 fValNMTOKENS = fDatatypeValidatorFactory.getBuiltInDV("XML11NMTOKENS"); 73 74 } 75 catch (Exception e) { 76 e.printStackTrace(System.err); 78 } 79 } 80 } 82 } | Popular Tags |