1 16 17 package org.apache.xerces.impl.dv.xs; 18 19 import org.apache.xerces.impl.Constants; 20 import org.apache.xerces.impl.dv.SchemaDVFactory; 21 import org.apache.xerces.impl.dv.XSFacets; 22 import org.apache.xerces.impl.dv.XSSimpleType; 23 import org.apache.xerces.impl.xs.XSDeclarationPool; 24 import org.apache.xerces.util.SymbolHash; 25 import org.apache.xerces.xs.XSConstants; 26 import org.apache.xerces.xs.XSObjectList; 27 28 38 public class SchemaDVFactoryImpl extends SchemaDVFactory { 39 40 static final String URI_SCHEMAFORSCHEMA = "http://www.w3.org/2001/XMLSchema"; 41 42 static SymbolHash fBuiltInTypes = new SymbolHash(); 43 static { 44 createBuiltInTypes(); 45 } 46 47 protected XSDeclarationPool fDeclPool = null; 48 49 60 public XSSimpleType getBuiltInType(String name) { 61 return (XSSimpleType)fBuiltInTypes.get(name); 62 } 63 64 70 public SymbolHash getBuiltInTypes() { 71 return (SymbolHash)fBuiltInTypes.makeClone(); 72 } 73 74 85 public XSSimpleType createTypeRestriction(String name, String targetNamespace, 86 short finalSet, XSSimpleType base, XSObjectList annotations) { 87 88 if (fDeclPool != null) { 89 XSSimpleTypeDecl st= fDeclPool.getSimpleTypeDecl(); 90 return st.setRestrictionValues((XSSimpleTypeDecl)base, name, targetNamespace, finalSet, annotations); 91 } 92 return new XSSimpleTypeDecl((XSSimpleTypeDecl)base, name, targetNamespace, finalSet, false, annotations); 93 } 94 95 106 public XSSimpleType createTypeList(String name, String targetNamespace, 107 short finalSet, XSSimpleType itemType, 108 XSObjectList annotations) { 109 if (fDeclPool != null) { 110 XSSimpleTypeDecl st= fDeclPool.getSimpleTypeDecl(); 111 return st.setListValues(name, targetNamespace, finalSet, (XSSimpleTypeDecl)itemType, annotations); 112 } 113 return new XSSimpleTypeDecl(name, targetNamespace, finalSet, (XSSimpleTypeDecl)itemType, false, annotations); 114 } 115 116 127 public XSSimpleType createTypeUnion(String name, String targetNamespace, 128 short finalSet, XSSimpleType[] memberTypes, 129 XSObjectList annotations) { 130 int typeNum = memberTypes.length; 131 XSSimpleTypeDecl[] mtypes = new XSSimpleTypeDecl[typeNum]; 132 System.arraycopy(memberTypes, 0, mtypes, 0, typeNum); 133 134 if (fDeclPool != null) { 135 XSSimpleTypeDecl st= fDeclPool.getSimpleTypeDecl(); 136 return st.setUnionValues(name, targetNamespace, finalSet, mtypes, annotations); 137 } 138 return new XSSimpleTypeDecl(name, targetNamespace, finalSet, mtypes, annotations); 139 } 140 141 static void createBuiltInTypes() { 143 final String ANYSIMPLETYPE = "anySimpleType"; 145 final String ANYATOMICTYPE = "anyAtomicType"; 146 final String ANYURI = "anyURI"; 147 final String BASE64BINARY = "base64Binary"; 148 final String BOOLEAN = "boolean"; 149 final String BYTE = "byte"; 150 final String DATE = "date"; 151 final String DATETIME = "dateTime"; 152 final String DAY = "gDay"; 153 final String DECIMAL = "decimal"; 154 final String DOUBLE = "double"; 155 final String DURATION = "duration"; 156 final String ENTITY = "ENTITY"; 157 final String ENTITIES = "ENTITIES"; 158 final String FLOAT = "float"; 159 final String HEXBINARY = "hexBinary"; 160 final String ID = "ID"; 161 final String IDREF = "IDREF"; 162 final String IDREFS = "IDREFS"; 163 final String INT = "int"; 164 final String INTEGER = "integer"; 165 final String LONG = "long"; 166 final String NAME = "Name"; 167 final String NEGATIVEINTEGER = "negativeInteger"; 168 final String MONTH = "gMonth"; 169 final String MONTHDAY = "gMonthDay"; 170 final String NCNAME = "NCName"; 171 final String NMTOKEN = "NMTOKEN"; 172 final String NMTOKENS = "NMTOKENS"; 173 final String LANGUAGE = "language"; 174 final String NONNEGATIVEINTEGER= "nonNegativeInteger"; 175 final String NONPOSITIVEINTEGER= "nonPositiveInteger"; 176 final String NORMALIZEDSTRING = "normalizedString"; 177 final String NOTATION = "NOTATION"; 178 final String POSITIVEINTEGER = "positiveInteger"; 179 final String QNAME = "QName"; 180 final String SHORT = "short"; 181 final String STRING = "string"; 182 final String TIME = "time"; 183 final String TOKEN = "token"; 184 final String UNSIGNEDBYTE = "unsignedByte"; 185 final String UNSIGNEDINT = "unsignedInt"; 186 final String UNSIGNEDLONG = "unsignedLong"; 187 final String UNSIGNEDSHORT = "unsignedShort"; 188 final String YEAR = "gYear"; 189 final String YEARMONTH = "gYearMonth"; 190 final String YEARMONTHDURATION = "yearMonthDuration"; 191 final String DAYTIMEDURATION = "dayTimeDuration"; 192 final String PRECISIONDECIMAL = "precisionDecimal"; 193 194 final XSFacets facets = new XSFacets(); 195 196 XSSimpleTypeDecl anySimpleType = XSSimpleTypeDecl.fAnySimpleType; 198 XSSimpleTypeDecl anyAtomicType = XSSimpleTypeDecl.fAnyAtomicType; 199 XSSimpleTypeDecl baseAtomicType = null; 200 201 if (Constants.SCHEMA_1_1_SUPPORT) { 202 baseAtomicType = anyAtomicType; 203 fBuiltInTypes.put(ANYATOMICTYPE, anyAtomicType); 204 } 205 else { 206 baseAtomicType = anySimpleType; 207 } 208 209 fBuiltInTypes.put(ANYSIMPLETYPE, anySimpleType); 210 XSSimpleTypeDecl stringDV = new XSSimpleTypeDecl(baseAtomicType, STRING, XSSimpleTypeDecl.DV_STRING, XSSimpleType.ORDERED_FALSE, false, false, false , true, XSConstants.STRING_DT); 211 fBuiltInTypes.put(STRING, stringDV); 212 fBuiltInTypes.put(BOOLEAN, new XSSimpleTypeDecl(baseAtomicType, BOOLEAN, XSSimpleTypeDecl.DV_BOOLEAN, XSSimpleType.ORDERED_FALSE, false, true, false, true, XSConstants.BOOLEAN_DT)); 213 XSSimpleTypeDecl decimalDV = new XSSimpleTypeDecl(baseAtomicType, DECIMAL, XSSimpleTypeDecl.DV_DECIMAL, XSSimpleType.ORDERED_TOTAL, false, false, true, true, XSConstants.DECIMAL_DT); 214 fBuiltInTypes.put(DECIMAL, decimalDV); 215 216 fBuiltInTypes.put(ANYURI, new XSSimpleTypeDecl(baseAtomicType, ANYURI, XSSimpleTypeDecl.DV_ANYURI, XSSimpleType.ORDERED_FALSE, false, false, false, true, XSConstants.ANYURI_DT)); 217 fBuiltInTypes.put(BASE64BINARY, new XSSimpleTypeDecl(baseAtomicType, BASE64BINARY, XSSimpleTypeDecl.DV_BASE64BINARY, XSSimpleType.ORDERED_FALSE, false, false, false, true, XSConstants.BASE64BINARY_DT)); 218 219 XSSimpleTypeDecl durationDV = new XSSimpleTypeDecl(baseAtomicType, DURATION, XSSimpleTypeDecl.DV_DURATION, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSConstants.DURATION_DT); 220 fBuiltInTypes.put(DURATION, durationDV); 221 222 if (Constants.SCHEMA_1_1_SUPPORT) { 223 fBuiltInTypes.put(YEARMONTHDURATION, new XSSimpleTypeDecl(durationDV, YEARMONTHDURATION, XSSimpleTypeDecl.DV_YEARMONTHDURATION, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSSimpleTypeDecl.YEARMONTHDURATION_DT)); 224 fBuiltInTypes.put(DAYTIMEDURATION, new XSSimpleTypeDecl(durationDV, DAYTIMEDURATION, XSSimpleTypeDecl.DV_DAYTIMEDURATION, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSSimpleTypeDecl.DAYTIMEDURATION_DT)); 225 fBuiltInTypes.put(PRECISIONDECIMAL, new XSSimpleTypeDecl(anySimpleType, PRECISIONDECIMAL, XSSimpleTypeDecl.DV_PRECISIONDECIMAL, XSSimpleType.ORDERED_PARTIAL, false, false, true, true, XSSimpleTypeDecl.PRECISIONDECIMAL_DT)); 226 } 227 228 fBuiltInTypes.put(DATETIME, new XSSimpleTypeDecl(baseAtomicType, DATETIME, XSSimpleTypeDecl.DV_DATETIME, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSConstants.DATETIME_DT)); 229 fBuiltInTypes.put(TIME, new XSSimpleTypeDecl(baseAtomicType, TIME, XSSimpleTypeDecl.DV_TIME, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSConstants.TIME_DT)); 230 fBuiltInTypes.put(DATE, new XSSimpleTypeDecl(baseAtomicType, DATE, XSSimpleTypeDecl.DV_DATE, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSConstants.DATE_DT)); 231 fBuiltInTypes.put(YEARMONTH, new XSSimpleTypeDecl(baseAtomicType, YEARMONTH, XSSimpleTypeDecl.DV_GYEARMONTH, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSConstants.GYEARMONTH_DT)); 232 fBuiltInTypes.put(YEAR, new XSSimpleTypeDecl(baseAtomicType, YEAR, XSSimpleTypeDecl.DV_GYEAR, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSConstants.GYEAR_DT)); 233 fBuiltInTypes.put(MONTHDAY, new XSSimpleTypeDecl(baseAtomicType, MONTHDAY, XSSimpleTypeDecl.DV_GMONTHDAY, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSConstants.GMONTHDAY_DT)); 234 fBuiltInTypes.put(DAY, new XSSimpleTypeDecl(baseAtomicType, DAY, XSSimpleTypeDecl.DV_GDAY, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSConstants.GDAY_DT)); 235 fBuiltInTypes.put(MONTH, new XSSimpleTypeDecl(baseAtomicType, MONTH, XSSimpleTypeDecl.DV_GMONTH, XSSimpleType.ORDERED_PARTIAL, false, false, false, true, XSConstants.GMONTH_DT)); 236 237 XSSimpleTypeDecl integerDV = new XSSimpleTypeDecl(decimalDV, INTEGER, XSSimpleTypeDecl.DV_INTEGER, XSSimpleType.ORDERED_TOTAL, false, false, true, true, XSConstants.INTEGER_DT); 238 fBuiltInTypes.put(INTEGER, integerDV); 239 240 facets.maxInclusive = "0"; 241 XSSimpleTypeDecl nonPositiveDV = new XSSimpleTypeDecl(integerDV, NONPOSITIVEINTEGER, URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.NONPOSITIVEINTEGER_DT); 242 nonPositiveDV.applyFacets1(facets , XSSimpleType.FACET_MAXINCLUSIVE, (short)0); 243 fBuiltInTypes.put(NONPOSITIVEINTEGER, nonPositiveDV); 244 245 facets.maxInclusive = "-1"; 246 XSSimpleTypeDecl negativeDV = new XSSimpleTypeDecl(integerDV, NEGATIVEINTEGER, URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.NEGATIVEINTEGER_DT); 247 negativeDV.applyFacets1(facets , XSSimpleType.FACET_MAXINCLUSIVE, (short)0); 248 fBuiltInTypes.put(NEGATIVEINTEGER, negativeDV); 249 250 facets.maxInclusive = "9223372036854775807"; 251 facets.minInclusive = "-9223372036854775808"; 252 XSSimpleTypeDecl longDV = new XSSimpleTypeDecl(integerDV, LONG, URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.LONG_DT); 253 longDV.applyFacets1(facets , (short)(XSSimpleType.FACET_MAXINCLUSIVE | XSSimpleType.FACET_MININCLUSIVE), (short)0 ); 254 fBuiltInTypes.put(LONG, longDV); 255 256 257 facets.maxInclusive = "2147483647"; 258 facets.minInclusive = "-2147483648"; 259 XSSimpleTypeDecl intDV = new XSSimpleTypeDecl(longDV, INT, URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.INT_DT); 260 intDV.applyFacets1(facets, (short)(XSSimpleType.FACET_MAXINCLUSIVE | XSSimpleType.FACET_MININCLUSIVE), (short)0 ); 261 fBuiltInTypes.put(INT, intDV); 262 263 facets.maxInclusive = "32767"; 264 facets.minInclusive = "-32768"; 265 XSSimpleTypeDecl shortDV = new XSSimpleTypeDecl(intDV, SHORT , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.SHORT_DT); 266 shortDV.applyFacets1(facets, (short)(XSSimpleType.FACET_MAXINCLUSIVE | XSSimpleType.FACET_MININCLUSIVE), (short)0 ); 267 fBuiltInTypes.put(SHORT, shortDV); 268 269 facets.maxInclusive = "127"; 270 facets.minInclusive = "-128"; 271 XSSimpleTypeDecl byteDV = new XSSimpleTypeDecl(shortDV, BYTE , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.BYTE_DT); 272 byteDV.applyFacets1(facets, (short)(XSSimpleType.FACET_MAXINCLUSIVE | XSSimpleType.FACET_MININCLUSIVE), (short)0 ); 273 fBuiltInTypes.put(BYTE, byteDV); 274 275 facets.minInclusive = "0" ; 276 XSSimpleTypeDecl nonNegativeDV = new XSSimpleTypeDecl(integerDV, NONNEGATIVEINTEGER , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.NONNEGATIVEINTEGER_DT); 277 nonNegativeDV.applyFacets1(facets, XSSimpleType.FACET_MININCLUSIVE, (short)0 ); 278 fBuiltInTypes.put(NONNEGATIVEINTEGER, nonNegativeDV); 279 280 facets.maxInclusive = "18446744073709551615" ; 281 XSSimpleTypeDecl unsignedLongDV = new XSSimpleTypeDecl(nonNegativeDV, UNSIGNEDLONG , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.UNSIGNEDLONG_DT); 282 unsignedLongDV.applyFacets1(facets, XSSimpleType.FACET_MAXINCLUSIVE, (short)0 ); 283 fBuiltInTypes.put(UNSIGNEDLONG, unsignedLongDV); 284 285 facets.maxInclusive = "4294967295" ; 286 XSSimpleTypeDecl unsignedIntDV = new XSSimpleTypeDecl(unsignedLongDV, UNSIGNEDINT , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.UNSIGNEDINT_DT); 287 unsignedIntDV.applyFacets1(facets, XSSimpleType.FACET_MAXINCLUSIVE, (short)0 ); 288 fBuiltInTypes.put(UNSIGNEDINT, unsignedIntDV); 289 290 facets.maxInclusive = "65535" ; 291 XSSimpleTypeDecl unsignedShortDV = new XSSimpleTypeDecl(unsignedIntDV, UNSIGNEDSHORT , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.UNSIGNEDSHORT_DT); 292 unsignedShortDV.applyFacets1(facets, XSSimpleType.FACET_MAXINCLUSIVE, (short)0 ); 293 fBuiltInTypes.put(UNSIGNEDSHORT, unsignedShortDV); 294 295 facets.maxInclusive = "255" ; 296 XSSimpleTypeDecl unsignedByteDV = new XSSimpleTypeDecl(unsignedShortDV, UNSIGNEDBYTE , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.UNSIGNEDBYTE_DT); 297 unsignedByteDV.applyFacets1(facets, XSSimpleType.FACET_MAXINCLUSIVE, (short)0 ); 298 fBuiltInTypes.put(UNSIGNEDBYTE, unsignedByteDV); 299 300 facets.minInclusive = "1" ; 301 XSSimpleTypeDecl positiveIntegerDV = new XSSimpleTypeDecl(nonNegativeDV, POSITIVEINTEGER , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.POSITIVEINTEGER_DT); 302 positiveIntegerDV.applyFacets1(facets, XSSimpleType.FACET_MININCLUSIVE, (short)0 ); 303 fBuiltInTypes.put(POSITIVEINTEGER, positiveIntegerDV); 304 305 306 fBuiltInTypes.put(FLOAT, new XSSimpleTypeDecl(baseAtomicType, FLOAT, XSSimpleTypeDecl.DV_FLOAT, XSSimpleType.ORDERED_PARTIAL, true, true, true, true, XSConstants.FLOAT_DT)); 307 fBuiltInTypes.put(DOUBLE, new XSSimpleTypeDecl(baseAtomicType, DOUBLE, XSSimpleTypeDecl.DV_DOUBLE, XSSimpleType.ORDERED_PARTIAL, true, true, true, true, XSConstants.DOUBLE_DT)); 308 fBuiltInTypes.put(HEXBINARY, new XSSimpleTypeDecl(baseAtomicType, HEXBINARY, XSSimpleTypeDecl.DV_HEXBINARY, XSSimpleType.ORDERED_FALSE, false, false, false, true, XSConstants.HEXBINARY_DT)); 309 fBuiltInTypes.put(NOTATION, new XSSimpleTypeDecl(baseAtomicType, NOTATION, XSSimpleTypeDecl.DV_NOTATION, XSSimpleType.ORDERED_FALSE, false, false, false, true, XSConstants.NOTATION_DT)); 310 311 312 facets.whiteSpace = XSSimpleType.WS_REPLACE; 313 XSSimpleTypeDecl normalizedDV = new XSSimpleTypeDecl(stringDV, NORMALIZEDSTRING , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.NORMALIZEDSTRING_DT); 314 normalizedDV.applyFacets1(facets, XSSimpleType.FACET_WHITESPACE, (short)0 ); 315 fBuiltInTypes.put(NORMALIZEDSTRING, normalizedDV); 316 317 facets.whiteSpace = XSSimpleType.WS_COLLAPSE; 318 XSSimpleTypeDecl tokenDV = new XSSimpleTypeDecl(normalizedDV, TOKEN , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.TOKEN_DT); 319 tokenDV.applyFacets1(facets, XSSimpleType.FACET_WHITESPACE, (short)0 ); 320 fBuiltInTypes.put(TOKEN, tokenDV); 321 322 facets.whiteSpace = XSSimpleType.WS_COLLAPSE; 323 facets.pattern = "([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*"; 324 XSSimpleTypeDecl languageDV = new XSSimpleTypeDecl(tokenDV, LANGUAGE , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.LANGUAGE_DT); 325 languageDV.applyFacets1(facets, (short)(XSSimpleType.FACET_WHITESPACE | XSSimpleType.FACET_PATTERN) ,(short)0); 326 fBuiltInTypes.put(LANGUAGE, languageDV); 327 328 329 facets.whiteSpace = XSSimpleType.WS_COLLAPSE; 330 XSSimpleTypeDecl nameDV = new XSSimpleTypeDecl(tokenDV, NAME , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.NAME_DT); 331 nameDV.applyFacets1(facets, XSSimpleType.FACET_WHITESPACE, (short)0, XSSimpleTypeDecl.SPECIAL_PATTERN_NAME); 332 fBuiltInTypes.put(NAME, nameDV); 333 334 facets.whiteSpace = XSSimpleType.WS_COLLAPSE; 335 XSSimpleTypeDecl ncnameDV = new XSSimpleTypeDecl(nameDV, NCNAME , URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.NCNAME_DT) ; 336 ncnameDV.applyFacets1(facets, XSSimpleType.FACET_WHITESPACE, (short)0, XSSimpleTypeDecl.SPECIAL_PATTERN_NCNAME); 337 fBuiltInTypes.put(NCNAME, ncnameDV); 338 339 fBuiltInTypes.put(QNAME, new XSSimpleTypeDecl(baseAtomicType, QNAME, XSSimpleTypeDecl.DV_QNAME, XSSimpleType.ORDERED_FALSE, false, false, false, true, XSConstants.QNAME_DT)); 340 341 fBuiltInTypes.put(ID, new XSSimpleTypeDecl(ncnameDV, ID, XSSimpleTypeDecl.DV_ID, XSSimpleType.ORDERED_FALSE, false, false, false , true, XSConstants.ID_DT)); 342 XSSimpleTypeDecl idrefDV = new XSSimpleTypeDecl(ncnameDV, IDREF , XSSimpleTypeDecl.DV_IDREF, XSSimpleType.ORDERED_FALSE, false, false, false, true, XSConstants.IDREF_DT); 343 fBuiltInTypes.put(IDREF, idrefDV); 344 345 facets.minLength = 1; 346 XSSimpleTypeDecl tempDV = new XSSimpleTypeDecl(null, URI_SCHEMAFORSCHEMA, (short)0, idrefDV, true, null); 347 XSSimpleTypeDecl idrefsDV = new XSSimpleTypeDecl(tempDV, IDREFS, URI_SCHEMAFORSCHEMA, (short)0, false, null); 348 idrefsDV.applyFacets1(facets, XSSimpleType.FACET_MINLENGTH, (short)0); 349 fBuiltInTypes.put(IDREFS, idrefsDV); 350 351 XSSimpleTypeDecl entityDV = new XSSimpleTypeDecl(ncnameDV, ENTITY , XSSimpleTypeDecl.DV_ENTITY, XSSimpleType.ORDERED_FALSE, false, false, false, true, XSConstants.ENTITY_DT); 352 fBuiltInTypes.put(ENTITY, entityDV); 353 354 facets.minLength = 1; 355 tempDV = new XSSimpleTypeDecl(null, URI_SCHEMAFORSCHEMA, (short)0, entityDV, true, null); 356 XSSimpleTypeDecl entitiesDV = new XSSimpleTypeDecl(tempDV, ENTITIES, URI_SCHEMAFORSCHEMA, (short)0, false, null); 357 entitiesDV.applyFacets1(facets, XSSimpleType.FACET_MINLENGTH, (short)0); 358 fBuiltInTypes.put(ENTITIES, entitiesDV); 359 360 361 facets.whiteSpace = XSSimpleType.WS_COLLAPSE; 362 XSSimpleTypeDecl nmtokenDV = new XSSimpleTypeDecl(tokenDV, NMTOKEN, URI_SCHEMAFORSCHEMA, (short)0, false, null, XSConstants.NMTOKEN_DT); 363 nmtokenDV.applyFacets1(facets, XSSimpleType.FACET_WHITESPACE, (short)0, XSSimpleTypeDecl.SPECIAL_PATTERN_NMTOKEN); 364 fBuiltInTypes.put(NMTOKEN, nmtokenDV); 365 366 facets.minLength = 1; 367 tempDV = new XSSimpleTypeDecl(null, URI_SCHEMAFORSCHEMA, (short)0, nmtokenDV, true, null); 368 XSSimpleTypeDecl nmtokensDV = new XSSimpleTypeDecl(tempDV, NMTOKENS, URI_SCHEMAFORSCHEMA, (short)0, false, null); 369 nmtokensDV.applyFacets1(facets, XSSimpleType.FACET_MINLENGTH, (short)0); 370 fBuiltInTypes.put(NMTOKENS, nmtokensDV); 371 } 373 public void setDeclPool (XSDeclarationPool declPool){ 374 fDeclPool = declPool; 375 } 376 377 } | Popular Tags |