2
* The Apache Software License, Version 1.1
5
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions
12
* 1. Redistributions of source code must retain the above copyright
13
* notice, this list of conditions and the following disclaimer.
15
* 2. Redistributions in binary form must reproduce the above copyright
16
* notice, this list of conditions and the following disclaimer in
17
* the documentation and/or other materials provided with the
20
* 3. The end-user documentation included with the redistribution,
21
* if any, must include the following acknowledgment:
22
* "This product includes software developed by the
23
* Apache Software Foundation (http://www.apache.org/)."
24
* Alternately, this acknowledgment may appear in the software itself,
25
* if and wherever such third-party acknowledgments normally appear.
27
* 4. The names "Xerces" and "Apache Software Foundation" must
28
* not be used to endorse or promote products derived from this
29
* software without prior written permission. For written
30
* permission, please contact apache@apache.org.
32
* 5. Products derived from this software may not be called "Apache",
33
* nor may "Apache" appear in their name, without prior written
34
* permission of the Apache Software Foundation.
36
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48
* ====================================================================
50
* This software consists of voluntary contributions made by many
51
* individuals on behalf of the Apache Software Foundation and was
52
* originally based on software copyright (c) 1999, International
53
* Business Machines, Inc., http://www.apache.org. For more
54
* information on the Apache Software Foundation, please see
55
* <http://www.apache.org/>.
2
* Copyright 2000-2006 The Apache Software Foundation.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
58
17
package org.apache.xerces.impl;
64
23
* Commonly used constants.
66
27
* @author Andy Clark, IBM
68
* @version $Id: Constants.java,v 1.37 2004/01/21 21:23:28 mrglavas Exp $
29
* @version $Id: Constants.java 371617 2006-01-23 18:41:49Z mrglavas $
70
31
public final class Constants {
76
37
public static final String NS_XMLSCHEMA = "http://www.w3.org/2001/XMLSchema".intern();
77
38
public static final String NS_DTD = "http://www.w3.org/TR/REC-xml".intern();
81
42
/** SAX feature prefix ("http://xml.org/sax/features/"). */
82
43
public static final String SAX_FEATURE_PREFIX = "http://xml.org/sax/features/";
84
45
/** Namespaces feature ("namespaces"). */
85
46
public static final String NAMESPACES_FEATURE = "namespaces";
87
48
/** Namespace prefixes feature ("namespace-prefixes"). */
88
49
public static final String NAMESPACE_PREFIXES_FEATURE = "namespace-prefixes";
90
51
/** String interning feature ("string-interning"). */
91
52
public static final String STRING_INTERNING_FEATURE = "string-interning";
93
54
/** Validation feature ("validation"). */
94
55
public static final String VALIDATION_FEATURE = "validation";
96
57
/** External general entities feature ("external-general-entities "). */
97
58
public static final String EXTERNAL_GENERAL_ENTITIES_FEATURE = "external-general-entities";
99
60
/** External parameter entities feature ("external-parameter-entities "). */
100
61
public static final String EXTERNAL_PARAMETER_ENTITIES_FEATURE = "external-parameter-entities";
63
/** Lexical handler parameter entities feature ("lexical-handler/parameter-entities"). */
64
public static final String LEXICAL_HANDLER_PARAMETER_ENTITIES_FEATURE = "lexical-handler/parameter-entities";
66
/** Is standalone feature ("is-standalone"). */
67
public static final String IS_STANDALONE_FEATURE = "is-standalone";
69
/** Resolve DTD URIs feature ("resolve-dtd-uris"). */
70
public static final String RESOLVE_DTD_URIS_FEATURE = "resolve-dtd-uris";
72
/** Use Attributes2 feature ("use-attributes2"). */
73
public static final String USE_ATTRIBUTES2_FEATURE = "use-attributes2";
75
/** Use Locator2 feature ("use-locator2"). */
76
public static final String USE_LOCATOR2_FEATURE = "use-locator2";
78
/** Use EntityResolver2 feature ("use-entity-resolver2"). */
79
public static final String USE_ENTITY_RESOLVER2_FEATURE = "use-entity-resolver2";
81
/** Unicode normalization checking feature ("unicode-normalization-checking"). */
82
public static final String UNICODE_NORMALIZATION_CHECKING_FEATURE = "unicode-normalization-checking";
84
/** xmlns URIs feature ("xmlns-uris"). */
85
public static final String XMLNS_URIS_FEATURE = "xmlns-uris";
87
/** XML 1.1 feature ("xml-1.1"). */
88
public static final String XML_11_FEATURE = "xml-1.1";
102
90
/** Allow unparsed entity and notation declaration events to be sent after the end DTD event ("allow-dtd-events-after-endDTD") */
103
91
public static final String ALLOW_DTD_EVENTS_AFTER_ENDDTD_FEATURE = "allow-dtd-events-after-endDTD";
107
95
/** SAX property prefix ("http://xml.org/sax/properties/"). */
108
96
public static final String SAX_PROPERTY_PREFIX = "http://xml.org/sax/properties/";
110
98
/** Declaration handler property ("declaration-handler"). */
111
99
public static final String DECLARATION_HANDLER_PROPERTY = "declaration-handler";
113
101
/** Lexical handler property ("lexical-handler"). */
114
102
public static final String LEXICAL_HANDLER_PROPERTY = "lexical-handler";
116
104
/** DOM node property ("dom-node"). */
117
105
public static final String DOM_NODE_PROPERTY = "dom-node";
119
107
/** XML string property ("xml-string"). */
120
108
public static final String XML_STRING_PROPERTY = "xml-string";
110
/** Document XML version property ("document-xml-version"). */
111
public static final String DOCUMENT_XML_VERSION_PROPERTY = "document-xml-version";
124
115
// JAXP properties
127
118
/** JAXP property prefix ("http://java.sun.com/xml/jaxp/properties/"). */
128
119
public static final String JAXP_PROPERTY_PREFIX =
129
"http://java.sun.com/xml/jaxp/properties/";
120
"http://java.sun.com/xml/jaxp/properties/";
131
122
/** JAXP schemaSource property: when used internally may include DTD sources (DOM) */
132
123
public static final String SCHEMA_SOURCE = "schemaSource";
134
125
/** JAXP schemaSource language: when used internally may include DTD namespace (DOM) */
135
126
public static final String SCHEMA_LANGUAGE = "schemaLanguage";
199
190
public static final String DOM_PSVI = "psvi";
202
193
// xerces features
204
195
/** Xerces features prefix ("http://apache.org/xml/features/"). */
205
196
public static final String XERCES_FEATURE_PREFIX = "http://apache.org/xml/features/";
207
198
/** Schema validation feature ("validation/schema"). */
208
199
public static final String SCHEMA_VALIDATION_FEATURE = "validation/schema";
210
201
/** Expose schema normalized values */
211
202
public static final String SCHEMA_NORMALIZED_VALUE = "validation/schema/normalized-value";
213
204
/** Send schema default value via characters() */
214
205
public static final String SCHEMA_ELEMENT_DEFAULT = "validation/schema/element-default";
216
207
/** Schema full constraint checking ("validation/schema-full-checking"). */
217
208
public static final String SCHEMA_FULL_CHECKING = "validation/schema-full-checking";
219
210
/** Augment Post-Schema-Validation-Infoset */
220
211
public static final String SCHEMA_AUGMENT_PSVI = "validation/schema/augment-psvi";
222
213
/** Dynamic validation feature ("validation/dynamic"). */
223
214
public static final String DYNAMIC_VALIDATION_FEATURE = "validation/dynamic";
225
216
/** Warn on duplicate attribute declaration feature ("validation/warn-on-duplicate-attdef"). */
226
217
public static final String WARN_ON_DUPLICATE_ATTDEF_FEATURE = "validation/warn-on-duplicate-attdef";
228
219
/** Warn on undeclared element feature ("validation/warn-on-undeclared-elemdef"). */
229
220
public static final String WARN_ON_UNDECLARED_ELEMDEF_FEATURE = "validation/warn-on-undeclared-elemdef";
231
222
/** Warn on duplicate entity declaration feature ("warn-on-duplicate-entitydef"). */
232
223
public static final String WARN_ON_DUPLICATE_ENTITYDEF_FEATURE = "warn-on-duplicate-entitydef";
234
225
/** Allow Java encoding names feature ("allow-java-encodings"). */
235
226
public static final String ALLOW_JAVA_ENCODINGS_FEATURE = "allow-java-encodings";
237
228
/** Disallow DOCTYPE declaration feature ("disallow-doctype-decl"). */
238
229
public static final String DISALLOW_DOCTYPE_DECL_FEATURE = "disallow-doctype-decl";
240
231
/** Continue after fatal error feature ("continue-after-fatal-error"). */
241
232
public static final String CONTINUE_AFTER_FATAL_ERROR_FEATURE = "continue-after-fatal-error";
243
234
/** Load dtd grammar when nonvalidating feature ("nonvalidating/load-dtd-grammar"). */
244
235
public static final String LOAD_DTD_GRAMMAR_FEATURE = "nonvalidating/load-dtd-grammar";
246
237
/** Load external dtd when nonvalidating feature ("nonvalidating/load-external-dtd"). */
247
238
public static final String LOAD_EXTERNAL_DTD_FEATURE = "nonvalidating/load-external-dtd";
249
240
/** Defer node expansion feature ("dom/defer-node-expansion"). */
250
241
public static final String DEFER_NODE_EXPANSION_FEATURE = "dom/defer-node-expansion";
252
243
/** Create entity reference nodes feature ("dom/create-entity-ref-nodes"). */
253
244
public static final String CREATE_ENTITY_REF_NODES_FEATURE = "dom/create-entity-ref-nodes";
255
246
/** Include ignorable whitespace feature ("dom/include-ignorable-whitespace"). */
256
247
public static final String INCLUDE_IGNORABLE_WHITESPACE = "dom/include-ignorable-whitespace";
258
249
/** Default attribute values feature ("validation/default-attribute-values"). */
259
250
public static final String DEFAULT_ATTRIBUTE_VALUES_FEATURE = "validation/default-attribute-values";
261
252
/** Validate content models feature ("validation/validate-content-models"). */
262
253
public static final String VALIDATE_CONTENT_MODELS_FEATURE = "validation/validate-content-models";
264
255
/** Validate datatypes feature ("validation/validate-datatypes"). */
265
256
public static final String VALIDATE_DATATYPES_FEATURE = "validation/validate-datatypes";
258
/** Balance syntax trees feature ("validation/balance-syntax-trees"). */
259
public static final String BALANCE_SYNTAX_TREES = "validation/balance-syntax-trees";
267
261
/** Notify character references feature (scanner/notify-char-refs"). */
268
262
public static final String NOTIFY_CHAR_REFS_FEATURE = "scanner/notify-char-refs";
270
264
/** Notify built-in (&amp;, etc.) references feature (scanner/notify-builtin-refs"). */
271
265
public static final String NOTIFY_BUILTIN_REFS_FEATURE = "scanner/notify-builtin-refs";
273
267
/** Standard URI conformant feature ("standard-uri-conformant"). */
274
268
public static final String STANDARD_URI_CONFORMANT_FEATURE = "standard-uri-conformant";
270
/** Generate synthetic annotations feature ("generate-synthetic-annotations"). */
271
public static final String GENERATE_SYNTHETIC_ANNOTATIONS_FEATURE = "generate-synthetic-annotations";
273
/** Validate annotations feature ("validate-annotations"). */
274
public static final String VALIDATE_ANNOTATIONS_FEATURE = "validate-annotations";
276
/** Honour all schemaLocations feature ("honour-all-schemaLocations"). */
277
public static final String HONOUR_ALL_SCHEMALOCATIONS_FEATURE = "honour-all-schemaLocations";
279
/** XInclude processing feature ("xinclude"). */
280
public static final String XINCLUDE_FEATURE = "xinclude";
282
/** XInclude fixup base URIs feature ("xinclude/fixup-base-uris"). */
283
public static final String XINCLUDE_FIXUP_BASE_URIS_FEATURE = "xinclude/fixup-base-uris";
285
/** XInclude fixup language feature ("xinclude/fixup-language"). */
286
public static final String XINCLUDE_FIXUP_LANGUAGE_FEATURE = "xinclude/fixup-language";
289
* Feature to ignore xsi:type attributes on elements during validation,
290
* until a global element declaration is found. ("validation/schema/ignore-xsi-type-until-elemdecl")
291
* If this feature is on when validating a document, then beginning at the validation root
292
* element, xsi:type attributes are ignored until a global element declaration is
293
* found for an element. Once a global element declaration has been found, xsi:type
294
* attributes will start being processed for the sub-tree beginning at the element for
295
* which the declaration was found.
297
* Suppose an element A has two element children, B and C.
299
* If a global element declaration is found for A, xsi:type attributes on A, B and C,
300
* and all of B and C's descendents, will be processed.
302
* If no global element declaration is found for A or B, but one is found for C,
303
* then xsi:type attributes will be ignored on A and B (and any descendents of B,
304
* until a global element declaration is found), but xsi:type attributes will be
305
* processed for C and all of C's descendents.
307
* Once xsi:type attributes stop being ignored for a subtree, they do not start
308
* being ignored again, even if more elements are encountered for which no global
309
* element declaration can be found.
311
public static final String IGNORE_XSI_TYPE_FEATURE = "validation/schema/ignore-xsi-type-until-elemdecl";
313
/** Perform checking of ID/IDREFs ("validation/id-idref-checking") */
314
public static final String ID_IDREF_CHECKING_FEATURE = "validation/id-idref-checking";
316
/** Feature to ignore errors caused by identity constraints ("validation/identity-constraint-checking") */
317
public static final String IDC_CHECKING_FEATURE = "validation/identity-constraint-checking";
319
/** Feature to ignore errors caused by unparsed entities ("validation/unparsed-entity-checking") */
320
public static final String UNPARSED_ENTITY_CHECKING_FEATURE = "validation/unparsed-entity-checking";
323
* Internal feature. When set to true the schema validator will only use
324
* schema components from the grammar pool provided.
326
public static final String USE_GRAMMAR_POOL_ONLY_FEATURE = "internal/validation/schema/use-grammar-pool-only";
276
328
/** Internal performance related feature:
277
329
* false - the parser settings (features/properties) have not changed between 2 parses
278
330
* true - the parser settings have changed between 2 parses
279
331
* NOTE: this feature should only be set by the parser configuration.
281
333
public static final String PARSER_SETTINGS = "internal/parser-settings";
283
335
// xerces properties
285
337
/** Xerces properties prefix ("http://apache.org/xml/properties/"). */
286
338
public static final String XERCES_PROPERTY_PREFIX = "http://apache.org/xml/properties/";
288
340
/** Current element node property ("dom/current-element-node"). */
289
341
public static final String CURRENT_ELEMENT_NODE_PROPERTY = "dom/current-element-node";
291
343
/** Document class name property ("dom/document-class-name"). */
292
344
public static final String DOCUMENT_CLASS_NAME_PROPERTY = "dom/document-class-name";
294
346
/** Symbol table property ("internal/symbol-table"). */
295
347
public static final String SYMBOL_TABLE_PROPERTY = "internal/symbol-table";
297
349
/** Error reporter property ("internal/error-reporter"). */
298
350
public static final String ERROR_REPORTER_PROPERTY = "internal/error-reporter";
300
352
/** Error handler property ("internal/error-handler"). */
301
353
public static final String ERROR_HANDLER_PROPERTY = "internal/error-handler";
303
355
/** XInclude handler property ("internal/xinclude-handler"). */
304
356
public static final String XINCLUDE_HANDLER_PROPERTY = "internal/xinclude-handler";
358
/** XPointer handler property ("internal/xpointer-handler"). */
359
public static final String XPOINTER_HANDLER_PROPERTY = "internal/xpointer-handler";
306
361
/** Entity manager property ("internal/entity-manager"). */
307
362
public static final String ENTITY_MANAGER_PROPERTY = "internal/entity-manager";
310
365
/** Input buffer size property ("input-buffer-size"). */
311
366
public static final String BUFFER_SIZE_PROPERTY = "input-buffer-size";
313
368
/** Security manager property ("security-manager"). */
314
369
public static final String SECURITY_MANAGER_PROPERTY = "security-manager";
316
371
/** Entity resolver property ("internal/entity-resolver"). */
317
372
public static final String ENTITY_RESOLVER_PROPERTY = "internal/entity-resolver";
319
374
/** Grammar pool property ("internal/grammar-pool"). */
320
375
public static final String XMLGRAMMAR_POOL_PROPERTY = "internal/grammar-pool";
322
377
/** Datatype validator factory ("internal/datatype-validator-factory"). */
323
378
public static final String DATATYPE_VALIDATOR_FACTORY_PROPERTY = "internal/datatype-validator-factory";
325
380
/** Document scanner property ("internal/document-scanner"). */
326
381
public static final String DOCUMENT_SCANNER_PROPERTY = "internal/document-scanner";
328
383
/** DTD scanner property ("internal/dtd-scanner"). */
329
384
public static final String DTD_SCANNER_PROPERTY = "internal/dtd-scanner";
331
386
/** DTD processor property ("internal/dtd-processor"). */
332
387
public static final String DTD_PROCESSOR_PROPERTY = "internal/dtd-processor";
334
389
/** Validator property ("internal/validator"). */
335
390
public static final String VALIDATOR_PROPERTY = "internal/validator";
337
392
/** Validator property ("internal/validator/dtd"). */
338
393
public static final String DTD_VALIDATOR_PROPERTY = "internal/validator/dtd";
340
395
/** Validator property ("internal/validator/schema"). */
341
396
public static final String SCHEMA_VALIDATOR_PROPERTY = "internal/validator/schema";
343
398
/** No namespace schema location property ("schema/external-schemaLocation"). */
344
399
public static final String SCHEMA_LOCATION = "schema/external-schemaLocation";
346
401
/** Schema location property ("schema/external-noNamespaceSchemaLocation"). */
347
402
public static final String SCHEMA_NONS_LOCATION = "schema/external-noNamespaceSchemaLocation";
349
404
/** Namespace binder property ("internal/namespace-binder"). */
350
405
public static final String NAMESPACE_BINDER_PROPERTY = "internal/namespace-binder";
352
407
/** Namespace context property ("internal/namespace-context"). */
353
408
public static final String NAMESPACE_CONTEXT_PROPERTY = "internal/namespace-context";
355
410
/** Validation manager property ("internal/validation-manager"). */
356
411
public static final String VALIDATION_MANAGER_PROPERTY = "internal/validation-manager";
413
/** Schema type of the root element in a document ("validation/schema/root-type-definition"). */
414
public static final String ROOT_TYPE_DEFINITION_PROPERTY = "validation/schema/root-type-definition";
358
416
// general constants
360
418
/** Element PSVI is stored in augmentations using string "ELEMENT_PSVI" */
361
419
public final static String ELEMENT_PSVI = "ELEMENT_PSVI";
363
421
/* Attribute PSVI is stored in augmentations using string "ATTRIBUTE_PSVI" */
364
422
public final static String ATTRIBUTE_PSVI = "ATTRIBUTE_PSVI";
367
425
* Boolean indicating whether an attribute is declared in the DTD is stored
368
* in augmentations using string "ATTRIBUTE_DECLARED". The absence of this
426
* in augmentations using the string "ATTRIBUTE_DECLARED". The absence of this
369
427
* augmentation indicates that the attribute was not declared in the DTD.
371
429
public final static String ATTRIBUTE_DECLARED = "ATTRIBUTE_DECLARED";
432
* Boolean indicating whether an entity referenced in the document has
433
* not been read is stored in augmentations using the string "ENTITY_SKIPPED".
434
* The absence of this augmentation indicates that the entity had a
435
* declaration and was expanded.
437
public final static String ENTITY_SKIPPED = "ENTITY_SKIPPED";
440
* Boolean indicating whether a character is a probable white space
441
* character (ch <= 0x20) that was the replacement text of a character
442
* reference is stored in augmentations using the string "CHAR_REF_PROBABLE_WS".
443
* The absence of this augmentation indicates that the character is not
444
* probable white space and/or was not included from a character reference.
446
public final static String CHAR_REF_PROBABLE_WS = "CHAR_REF_PROBABLE_WS";
373
448
// XML version constants
449
public final static short XML_VERSION_ERROR = -1;
374
450
public final static short XML_VERSION_1_0 = 1;
375
451
public final static short XML_VERSION_1_1 = 2;
453
// Constant to enable Schema 1.1 support
454
public final static boolean SCHEMA_1_1_SUPPORT = false;
379
458
/** SAX features. */
380
459
private static final String[] fgSAXFeatures = {
382
NAMESPACE_PREFIXES_FEATURE,
383
STRING_INTERNING_FEATURE,
385
EXTERNAL_GENERAL_ENTITIES_FEATURE,
386
EXTERNAL_PARAMETER_ENTITIES_FEATURE,
461
NAMESPACE_PREFIXES_FEATURE,
462
STRING_INTERNING_FEATURE,
464
EXTERNAL_GENERAL_ENTITIES_FEATURE,
465
EXTERNAL_PARAMETER_ENTITIES_FEATURE,
389
468
/** SAX properties. */
390
469
private static final String[] fgSAXProperties = {
391
DECLARATION_HANDLER_PROPERTY,
392
LEXICAL_HANDLER_PROPERTY,
470
DECLARATION_HANDLER_PROPERTY,
471
LEXICAL_HANDLER_PROPERTY,
397
476
/** Xerces features. */
398
477
private static final String[] fgXercesFeatures = {
399
SCHEMA_VALIDATION_FEATURE,
400
SCHEMA_FULL_CHECKING,
401
DYNAMIC_VALIDATION_FEATURE,
402
WARN_ON_DUPLICATE_ATTDEF_FEATURE,
403
WARN_ON_UNDECLARED_ELEMDEF_FEATURE,
404
ALLOW_JAVA_ENCODINGS_FEATURE,
405
CONTINUE_AFTER_FATAL_ERROR_FEATURE,
406
LOAD_DTD_GRAMMAR_FEATURE,
407
LOAD_EXTERNAL_DTD_FEATURE,
408
//DEFER_NODE_EXPANSION_FEATURE,
409
CREATE_ENTITY_REF_NODES_FEATURE,
410
INCLUDE_IGNORABLE_WHITESPACE,
411
//GRAMMAR_ACCESS_FEATURE,
412
DEFAULT_ATTRIBUTE_VALUES_FEATURE,
413
VALIDATE_CONTENT_MODELS_FEATURE,
414
VALIDATE_DATATYPES_FEATURE,
415
NOTIFY_CHAR_REFS_FEATURE,
416
NOTIFY_BUILTIN_REFS_FEATURE,
417
DISALLOW_DOCTYPE_DECL_FEATURE,
418
STANDARD_URI_CONFORMANT_FEATURE
478
SCHEMA_VALIDATION_FEATURE,
479
SCHEMA_FULL_CHECKING,
480
DYNAMIC_VALIDATION_FEATURE,
481
WARN_ON_DUPLICATE_ATTDEF_FEATURE,
482
WARN_ON_UNDECLARED_ELEMDEF_FEATURE,
483
ALLOW_JAVA_ENCODINGS_FEATURE,
484
CONTINUE_AFTER_FATAL_ERROR_FEATURE,
485
LOAD_DTD_GRAMMAR_FEATURE,
486
LOAD_EXTERNAL_DTD_FEATURE,
487
//DEFER_NODE_EXPANSION_FEATURE,
488
CREATE_ENTITY_REF_NODES_FEATURE,
489
INCLUDE_IGNORABLE_WHITESPACE,
490
//GRAMMAR_ACCESS_FEATURE,
491
DEFAULT_ATTRIBUTE_VALUES_FEATURE,
492
VALIDATE_CONTENT_MODELS_FEATURE,
493
VALIDATE_DATATYPES_FEATURE,
494
BALANCE_SYNTAX_TREES,
495
NOTIFY_CHAR_REFS_FEATURE,
496
NOTIFY_BUILTIN_REFS_FEATURE,
497
DISALLOW_DOCTYPE_DECL_FEATURE,
498
STANDARD_URI_CONFORMANT_FEATURE,
499
GENERATE_SYNTHETIC_ANNOTATIONS_FEATURE,
500
VALIDATE_ANNOTATIONS_FEATURE,
501
HONOUR_ALL_SCHEMALOCATIONS_FEATURE,
503
XINCLUDE_FIXUP_BASE_URIS_FEATURE,
504
XINCLUDE_FIXUP_LANGUAGE_FEATURE,
505
IGNORE_XSI_TYPE_FEATURE,
506
ID_IDREF_CHECKING_FEATURE,
507
IDC_CHECKING_FEATURE,
508
UNPARSED_ENTITY_CHECKING_FEATURE,
421
511
/** Xerces properties. */
422
512
private static final String[] fgXercesProperties = {
423
CURRENT_ELEMENT_NODE_PROPERTY,
424
DOCUMENT_CLASS_NAME_PROPERTY,
425
SYMBOL_TABLE_PROPERTY,
426
ERROR_HANDLER_PROPERTY,
427
ERROR_REPORTER_PROPERTY,
428
ENTITY_MANAGER_PROPERTY,
429
ENTITY_RESOLVER_PROPERTY,
430
XMLGRAMMAR_POOL_PROPERTY,
431
DATATYPE_VALIDATOR_FACTORY_PROPERTY,
432
DOCUMENT_SCANNER_PROPERTY,
433
DTD_SCANNER_PROPERTY,
436
SCHEMA_NONS_LOCATION,
437
VALIDATION_MANAGER_PROPERTY,
438
BUFFER_SIZE_PROPERTY,
439
SECURITY_MANAGER_PROPERTY
513
CURRENT_ELEMENT_NODE_PROPERTY,
514
DOCUMENT_CLASS_NAME_PROPERTY,
515
SYMBOL_TABLE_PROPERTY,
516
ERROR_HANDLER_PROPERTY,
517
ERROR_REPORTER_PROPERTY,
518
ENTITY_MANAGER_PROPERTY,
519
ENTITY_RESOLVER_PROPERTY,
520
XMLGRAMMAR_POOL_PROPERTY,
521
DATATYPE_VALIDATOR_FACTORY_PROPERTY,
522
DOCUMENT_SCANNER_PROPERTY,
523
DTD_SCANNER_PROPERTY,
526
SCHEMA_NONS_LOCATION,
527
VALIDATION_MANAGER_PROPERTY,
528
BUFFER_SIZE_PROPERTY,
529
SECURITY_MANAGER_PROPERTY,
530
ROOT_TYPE_DEFINITION_PROPERTY,
442
533
/** Empty enumeration. */
443
534
private static final Enumeration fgEmptyEnumeration = new ArrayEnumeration(new Object[] {});
449
540
/** This class cannot be instantiated. */
450
541
private Constants() {}
453
544
// Public methods
458
549
/** Returns an enumeration of the SAX features. */
459
550
public static Enumeration getSAXFeatures() {
460
551
return fgSAXFeatures.length > 0
461
? new ArrayEnumeration(fgSAXFeatures) : fgEmptyEnumeration;
552
? new ArrayEnumeration(fgSAXFeatures) : fgEmptyEnumeration;
462
553
} // getSAXFeatures():Enumeration
464
555
/** Returns an enumeration of the SAX properties. */
465
556
public static Enumeration getSAXProperties() {
466
557
return fgSAXProperties.length > 0
467
? new ArrayEnumeration(fgSAXProperties) : fgEmptyEnumeration;
558
? new ArrayEnumeration(fgSAXProperties) : fgEmptyEnumeration;
468
559
} // getSAXProperties():Enumeration
472
563
/** Returns an enumeration of the Xerces features. */
473
564
public static Enumeration getXercesFeatures() {
474
565
return fgXercesFeatures.length > 0
475
? new ArrayEnumeration(fgXercesFeatures) : fgEmptyEnumeration;
566
? new ArrayEnumeration(fgXercesFeatures) : fgEmptyEnumeration;
476
567
} // getXercesFeatures():Enumeration
478
569
/** Returns an enumeration of the Xerces properties. */
479
570
public static Enumeration getXercesProperties() {
480
571
return fgXercesProperties.length > 0
481
? new ArrayEnumeration(fgXercesProperties) : fgEmptyEnumeration;
572
? new ArrayEnumeration(fgXercesProperties) : fgEmptyEnumeration;
482
573
} // getXercesProperties():Enumeration
489
580
* An array enumeration.
491
582
* @author Andy Clark, IBM
493
584
static class ArrayEnumeration
494
implements Enumeration {
585
implements Enumeration {
501
592
private Object[] array;
504
595
private int index;
510
601
/** Constructs an array enumeration. */
511
602
public ArrayEnumeration(Object[] array) {
512
603
this.array = array;
513
604
} // <init>(Object[])
516
607
// Enumeration methods
520
611
* Tests if this enumeration contains more elements.