Package org.apache.xerces.parsers
Class StandardParserConfiguration
- java.lang.Object
-
- org.apache.xerces.util.ParserConfigurationSettings
-
- org.apache.xerces.parsers.BasicParserConfiguration
-
- org.apache.xerces.parsers.DTDConfiguration
-
- org.apache.xerces.parsers.StandardParserConfiguration
-
- All Implemented Interfaces:
org.apache.xerces.xni.parser.XMLComponentManager,org.apache.xerces.xni.parser.XMLParserConfiguration,org.apache.xerces.xni.parser.XMLPullParserConfiguration
- Direct Known Subclasses:
IntegratedParserConfiguration
public class StandardParserConfiguration extends DTDConfiguration
This is the "standard" parser configuration. It extends the DTD configuration with the standard set of parser components. The standard set of parser components include those needed to parse and validate with DTD's, and those needed for XML Schema.In addition to the features and properties recognized by the base parser configuration, this class recognizes these additional features and properties:
- Features
- http://apache.org/xml/features/validation/schema
- http://apache.org/xml/features/validation/schema-full-checking
- http://apache.org/xml/features/validation/schema/normalized-value
- http://apache.org/xml/features/validation/schema/element-default
- Properties
- http://apache.org/xml/properties/internal/error-reporter
- http://apache.org/xml/properties/internal/entity-manager
- http://apache.org/xml/properties/internal/document-scanner
- http://apache.org/xml/properties/internal/dtd-scanner
- http://apache.org/xml/properties/internal/grammar-pool
- http://apache.org/xml/properties/internal/validator/dtd
- http://apache.org/xml/properties/internal/datatype-validator-factory
- Version:
- $Id: StandardParserConfiguration.java 805582 2009-08-18 21:13:20Z sandygao $
- Author:
- Arnaud Le Hors, IBM, Andy Clark, IBM
-
-
Field Summary
Fields Modifier and Type Field Description protected XMLSchemaValidatorfSchemaValidatorXML Schema Validator.protected static java.lang.StringGENERATE_SYNTHETIC_ANNOTATIONSFeature: generate synthetic annotationsprotected static java.lang.StringHONOUR_ALL_SCHEMALOCATIONSFeature identifier: honour all schemaLocationsprotected static java.lang.StringID_IDREF_CHECKINGFeature identifier: whether to ignore ID/IDREF errorsprotected static java.lang.StringIDENTITY_CONSTRAINT_CHECKINGFeature identifier: whether to ignore identity constraint errorsprotected static java.lang.StringIGNORE_XSI_TYPEFeature identifier: whether to ignore xsi:type attributes until a global element declaration is encounteredprotected static java.lang.StringNAMESPACE_GROWTHFeature identifier: namespace growthprotected static java.lang.StringNORMALIZE_DATAFeature identifier: expose schema normalized valueprotected static java.lang.StringROOT_ELEMENT_DECLProperty identifier: root element declaration.protected static java.lang.StringROOT_TYPE_DEFProperty identifier: root type definition.protected static java.lang.StringSCHEMA_AUGMENT_PSVIFeature identifier: augment PSVIprotected static java.lang.StringSCHEMA_DV_FACTORYProperty identifier: Schema DV Factoryprotected static java.lang.StringSCHEMA_ELEMENT_DEFAULTFeature identifier: send element default value via characters()protected static java.lang.StringSCHEMA_LOCATIONProperty identifier: schema location.protected static java.lang.StringSCHEMA_NONS_LOCATIONProperty identifier: no namespace schema location.protected static java.lang.StringSCHEMA_VALIDATORProperty identifier: XML Schema validator.protected static java.lang.StringTOLERATE_DUPLICATESFeature identifier: tolerate duplicatesprotected static java.lang.StringUNPARSED_ENTITY_CHECKINGFeature identifier: whether to ignore unparsed entity errorsprotected static java.lang.StringVALIDATE_ANNOTATIONSFeature identifier: validate annotationsprotected static java.lang.StringXMLSCHEMA_FULL_CHECKINGfeature identifier: XML Schema validation -- full checkingprotected static java.lang.StringXMLSCHEMA_VALIDATIONfeature identifier: XML Schema validation-
Fields inherited from class org.apache.xerces.parsers.DTDConfiguration
ALLOW_JAVA_ENCODINGS, CONTINUE_AFTER_FATAL_ERROR, DATATYPE_VALIDATOR_FACTORY, DOCUMENT_SCANNER, DTD_PROCESSOR, DTD_SCANNER, DTD_VALIDATOR, ENTITY_MANAGER, ERROR_REPORTER, fDatatypeValidatorFactory, fDTDProcessor, fDTDScanner, fDTDValidator, fEntityManager, fErrorReporter, fGrammarPool, fInputSource, fLocator, fNamespaceBinder, fParseInProgress, fScanner, fValidationManager, JAXP_SCHEMA_LANGUAGE, JAXP_SCHEMA_SOURCE, LOAD_EXTERNAL_DTD, LOCALE, NAMESPACE_BINDER, NOTIFY_BUILTIN_REFS, NOTIFY_CHAR_REFS, PRINT_EXCEPTION_STACK_TRACE, VALIDATION_MANAGER, WARN_ON_DUPLICATE_ATTDEF, WARN_ON_DUPLICATE_ENTITYDEF, WARN_ON_UNDECLARED_ELEMDEF, XMLGRAMMAR_POOL
-
Fields inherited from class org.apache.xerces.parsers.BasicParserConfiguration
ENTITY_RESOLVER, ERROR_HANDLER, EXTERNAL_GENERAL_ENTITIES, EXTERNAL_PARAMETER_ENTITIES, fComponents, fDocumentHandler, fDTDContentModelHandler, fDTDHandler, fLastComponent, fLocale, fSymbolTable, NAMESPACES, SYMBOL_TABLE, VALIDATION, XML_STRING
-
Fields inherited from class org.apache.xerces.util.ParserConfigurationSettings
fFeatures, fParentSettings, fProperties, fRecognizedFeatures, fRecognizedProperties, PARSER_SETTINGS
-
-
Constructor Summary
Constructors Constructor Description StandardParserConfiguration()Default constructor.StandardParserConfiguration(SymbolTable symbolTable)Constructs a parser configuration using the specified symbol table.StandardParserConfiguration(SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)Constructs a parser configuration using the specified symbol table and grammar pool.StandardParserConfiguration(SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool, org.apache.xerces.xni.parser.XMLComponentManager parentSettings)Constructs a parser configuration using the specified symbol table, grammar pool, and parent settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckFeature(java.lang.String featureId)Check a feature.protected voidcheckProperty(java.lang.String propertyId)Check a property.protected voidconfigurePipeline()Configures the pipeline.-
Methods inherited from class org.apache.xerces.parsers.DTDConfiguration
cleanup, configureDTDPipeline, createDatatypeValidatorFactory, createDocumentScanner, createDTDProcessor, createDTDScanner, createDTDValidator, createEntityManager, createErrorReporter, createNamespaceBinder, createValidationManager, getProperty, parse, parse, reset, setInputSource, setLocale, setProperty
-
Methods inherited from class org.apache.xerces.parsers.BasicParserConfiguration
addComponent, getDocumentHandler, getDTDContentModelHandler, getDTDHandler, getEntityResolver, getErrorHandler, getLocale, setDocumentHandler, setDTDContentModelHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature
-
Methods inherited from class org.apache.xerces.util.ParserConfigurationSettings
addRecognizedFeatures, addRecognizedProperties, getFeature
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.xerces.xni.parser.XMLParserConfiguration
addRecognizedFeatures, addRecognizedProperties, getDocumentHandler, getDTDContentModelHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getLocale, setDocumentHandler, setDTDContentModelHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature
-
-
-
-
Field Detail
-
NORMALIZE_DATA
protected static final java.lang.String NORMALIZE_DATA
Feature identifier: expose schema normalized value- See Also:
- Constant Field Values
-
SCHEMA_ELEMENT_DEFAULT
protected static final java.lang.String SCHEMA_ELEMENT_DEFAULT
Feature identifier: send element default value via characters()- See Also:
- Constant Field Values
-
SCHEMA_AUGMENT_PSVI
protected static final java.lang.String SCHEMA_AUGMENT_PSVI
Feature identifier: augment PSVI- See Also:
- Constant Field Values
-
XMLSCHEMA_VALIDATION
protected static final java.lang.String XMLSCHEMA_VALIDATION
feature identifier: XML Schema validation- See Also:
- Constant Field Values
-
XMLSCHEMA_FULL_CHECKING
protected static final java.lang.String XMLSCHEMA_FULL_CHECKING
feature identifier: XML Schema validation -- full checking- See Also:
- Constant Field Values
-
GENERATE_SYNTHETIC_ANNOTATIONS
protected static final java.lang.String GENERATE_SYNTHETIC_ANNOTATIONS
Feature: generate synthetic annotations- See Also:
- Constant Field Values
-
VALIDATE_ANNOTATIONS
protected static final java.lang.String VALIDATE_ANNOTATIONS
Feature identifier: validate annotations- See Also:
- Constant Field Values
-
HONOUR_ALL_SCHEMALOCATIONS
protected static final java.lang.String HONOUR_ALL_SCHEMALOCATIONS
Feature identifier: honour all schemaLocations- See Also:
- Constant Field Values
-
NAMESPACE_GROWTH
protected static final java.lang.String NAMESPACE_GROWTH
Feature identifier: namespace growth- See Also:
- Constant Field Values
-
TOLERATE_DUPLICATES
protected static final java.lang.String TOLERATE_DUPLICATES
Feature identifier: tolerate duplicates- See Also:
- Constant Field Values
-
IGNORE_XSI_TYPE
protected static final java.lang.String IGNORE_XSI_TYPE
Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered- See Also:
- Constant Field Values
-
ID_IDREF_CHECKING
protected static final java.lang.String ID_IDREF_CHECKING
Feature identifier: whether to ignore ID/IDREF errors- See Also:
- Constant Field Values
-
UNPARSED_ENTITY_CHECKING
protected static final java.lang.String UNPARSED_ENTITY_CHECKING
Feature identifier: whether to ignore unparsed entity errors- See Also:
- Constant Field Values
-
IDENTITY_CONSTRAINT_CHECKING
protected static final java.lang.String IDENTITY_CONSTRAINT_CHECKING
Feature identifier: whether to ignore identity constraint errors- See Also:
- Constant Field Values
-
SCHEMA_VALIDATOR
protected static final java.lang.String SCHEMA_VALIDATOR
Property identifier: XML Schema validator.- See Also:
- Constant Field Values
-
SCHEMA_LOCATION
protected static final java.lang.String SCHEMA_LOCATION
Property identifier: schema location.- See Also:
- Constant Field Values
-
SCHEMA_NONS_LOCATION
protected static final java.lang.String SCHEMA_NONS_LOCATION
Property identifier: no namespace schema location.- See Also:
- Constant Field Values
-
ROOT_TYPE_DEF
protected static final java.lang.String ROOT_TYPE_DEF
Property identifier: root type definition.- See Also:
- Constant Field Values
-
ROOT_ELEMENT_DECL
protected static final java.lang.String ROOT_ELEMENT_DECL
Property identifier: root element declaration.- See Also:
- Constant Field Values
-
SCHEMA_DV_FACTORY
protected static final java.lang.String SCHEMA_DV_FACTORY
Property identifier: Schema DV Factory- See Also:
- Constant Field Values
-
fSchemaValidator
protected XMLSchemaValidator fSchemaValidator
XML Schema Validator.
-
-
Constructor Detail
-
StandardParserConfiguration
public StandardParserConfiguration()
Default constructor.
-
StandardParserConfiguration
public StandardParserConfiguration(SymbolTable symbolTable)
Constructs a parser configuration using the specified symbol table.- Parameters:
symbolTable- The symbol table to use.
-
StandardParserConfiguration
public StandardParserConfiguration(SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a parser configuration using the specified symbol table and grammar pool.REVISIT: Grammar pool will be updated when the new validation engine is implemented.
- Parameters:
symbolTable- The symbol table to use.grammarPool- The grammar pool to use.
-
StandardParserConfiguration
public StandardParserConfiguration(SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool, org.apache.xerces.xni.parser.XMLComponentManager parentSettings)
Constructs a parser configuration using the specified symbol table, grammar pool, and parent settings.REVISIT: Grammar pool will be updated when the new validation engine is implemented.
- Parameters:
symbolTable- The symbol table to use.grammarPool- The grammar pool to use.parentSettings- The parent settings.
-
-
Method Detail
-
configurePipeline
protected void configurePipeline()
Configures the pipeline.- Overrides:
configurePipelinein classDTDConfiguration
-
checkFeature
protected void checkFeature(java.lang.String featureId) throws org.apache.xerces.xni.parser.XMLConfigurationExceptionCheck a feature. If feature is know and supported, this method simply returns. Otherwise, the appropriate exception is thrown.- Overrides:
checkFeaturein classDTDConfiguration- Parameters:
featureId- The unique identifier (URI) of the feature.- Throws:
org.apache.xerces.xni.parser.XMLConfigurationException- Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
-
checkProperty
protected void checkProperty(java.lang.String propertyId) throws org.apache.xerces.xni.parser.XMLConfigurationExceptionCheck a property. If the property is know and supported, this method simply returns. Otherwise, the appropriate exception is thrown.- Overrides:
checkPropertyin classDTDConfiguration- Parameters:
propertyId- The unique identifier (URI) of the property being set.- Throws:
org.apache.xerces.xni.parser.XMLConfigurationException- Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
-
-