1 57 58 package com.sun.org.apache.xerces.internal.impl.dv.dtd; 59 60 import com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory; 61 import com.sun.org.apache.xerces.internal.impl.dv.DatatypeValidator; 62 import java.util.Hashtable ; 63 64 71 public class DTDDVFactoryImpl extends DTDDVFactory { 72 73 static Hashtable fBuiltInTypes = new Hashtable (); 74 static { 75 createBuiltInTypes(); 76 } 77 78 84 public DatatypeValidator getBuiltInDV(String name) { 85 return (DatatypeValidator)fBuiltInTypes.get(name); 86 } 87 88 93 public Hashtable getBuiltInTypes() { 94 return (Hashtable )fBuiltInTypes.clone(); 95 } 96 97 static void createBuiltInTypes() { 99 100 DatatypeValidator dvTemp; 101 102 fBuiltInTypes.put("string", new StringDatatypeValidator()); 103 fBuiltInTypes.put("ID", new IDDatatypeValidator()); 104 dvTemp = new IDREFDatatypeValidator(); 105 fBuiltInTypes.put("IDREF", dvTemp); 106 fBuiltInTypes.put("IDREFS", new ListDatatypeValidator(dvTemp)); 107 dvTemp = new ENTITYDatatypeValidator(); 108 fBuiltInTypes.put("ENTITY", new ENTITYDatatypeValidator()); 109 fBuiltInTypes.put("ENTITIES", new ListDatatypeValidator(dvTemp)); 110 fBuiltInTypes.put("NOTATION", new NOTATIONDatatypeValidator()); 111 dvTemp = new NMTOKENDatatypeValidator(); 112 fBuiltInTypes.put("NMTOKEN", dvTemp); 113 fBuiltInTypes.put("NMTOKENS", new ListDatatypeValidator(dvTemp)); 114 115 } 117 } 119 | Popular Tags |