1 57 58 package com.sun.org.apache.xerces.internal.impl.dtd; 59 60 import com.sun.org.apache.xerces.internal.impl.Constants; 61 import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; 62 63 70 public class XML11DTDValidator extends XMLDTDValidator { 71 72 76 protected final static String DTD_VALIDATOR_PROPERTY = 77 Constants.XERCES_PROPERTY_PREFIX+Constants.DTD_VALIDATOR_PROPERTY; 78 79 83 84 public XML11DTDValidator() { 85 86 super(); 87 } 89 public void reset(XMLComponentManager manager) { 93 XMLDTDValidator curr = null; 94 if((curr = (XMLDTDValidator)manager.getProperty(DTD_VALIDATOR_PROPERTY)) != null && 95 curr != this) { 96 fGrammarBucket = curr.getGrammarBucket(); 97 } 98 super.reset(manager); 99 } 101 protected void init() { 102 if(fValidation || fDynamicValidation) { 103 super.init(); 104 106 try { 107 fValID = fDatatypeValidatorFactory.getBuiltInDV("XML11ID"); 108 fValIDRef = fDatatypeValidatorFactory.getBuiltInDV("XML11IDREF"); 109 fValIDRefs = fDatatypeValidatorFactory.getBuiltInDV("XML11IDREFS"); 110 fValNMTOKEN = fDatatypeValidatorFactory.getBuiltInDV("XML11NMTOKEN"); 111 fValNMTOKENS = fDatatypeValidatorFactory.getBuiltInDV("XML11NMTOKENS"); 112 113 } 114 catch (Exception e) { 115 e.printStackTrace(System.err); 117 } 118 } 119 } 121 } | Popular Tags |