org.apache.xerces.parsers

Class StandardParserConfiguration

Implemented Interfaces:
org.apache.xerces.xni.parser.XMLComponentManager, org.apache.xerces.xni.parser.XMLParserConfiguration, org.apache.xerces.xni.parser.XMLPullParserConfiguration
Known Direct 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:

  • Properties
  • Version:
    $Id: StandardParserConfiguration.java 371617 2006-01-23 18:41:49Z mrglavas $
    Authors:
    Arnaud Le Hors, IBM
    Andy Clark, IBM

    Field Summary

    protected static String
    GENERATE_SYNTHETIC_ANNOTATIONS
    Feature: generate synthetic annotations
    protected static String
    HONOUR_ALL_SCHEMALOCATIONS
    Feature identifier: honour all schemaLocations
    protected static String
    IDENTITY_CONSTRAINT_CHECKING
    Feature identifier: whether to ignore identity constraint errors
    protected static String
    ID_IDREF_CHECKING
    Feature identifier: whether to ignore ID/IDREF errors
    protected static String
    IGNORE_XSI_TYPE
    Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered
    protected static String
    NORMALIZE_DATA
    Feature identifier: expose schema normalized value
    protected static String
    ROOT_TYPE_DEF
    Property identifier: root type definition.
    protected static String
    SCHEMA_AUGMENT_PSVI
    Feature identifier: augment PSVI
    protected static String
    SCHEMA_ELEMENT_DEFAULT
    Feature identifier: send element default value via characters()
    protected static String
    SCHEMA_LOCATION
    Property identifier: schema location.
    protected static String
    SCHEMA_NONS_LOCATION
    Property identifier: no namespace schema location.
    protected static String
    SCHEMA_VALIDATOR
    Property identifier: XML Schema validator.
    protected static String
    UNPARSED_ENTITY_CHECKING
    Feature identifier: whether to ignore unparsed entity errors
    protected static String
    VALIDATE_ANNOTATIONS
    Feature identifier: validate annotations
    protected static String
    XMLSCHEMA_FULL_CHECKING
    feature identifier: XML Schema validation -- full checking
    protected static String
    XMLSCHEMA_VALIDATION
    feature identifier: XML Schema validation
    protected XMLSchemaValidator
    fSchemaValidator
    XML Schema Validator.

    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, JAXP_SCHEMA_LANGUAGE, JAXP_SCHEMA_SOURCE, LOAD_EXTERNAL_DTD, 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, fDTDProcessor, fDTDScanner, fDTDValidator, fDatatypeValidatorFactory, fEntityManager, fErrorReporter, fGrammarPool, fInputSource, fLocator, fNamespaceBinder, fParseInProgress, fScanner, fValidationManager

    Fields inherited from class org.apache.xerces.parsers.BasicParserConfiguration

    ENTITY_RESOLVER, ERROR_HANDLER, EXTERNAL_GENERAL_ENTITIES, EXTERNAL_PARAMETER_ENTITIES, NAMESPACES, SYMBOL_TABLE, VALIDATION, XML_STRING, fComponents, fDTDContentModelHandler, fDTDHandler, fDocumentHandler, fLastComponent, fLocale, fSymbolTable

    Fields inherited from class org.apache.xerces.util.ParserConfigurationSettings

    PARSER_SETTINGS, fFeatures, fParentSettings, fProperties, fRecognizedFeatures, fRecognizedProperties

    Constructor Summary

    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

    protected void
    checkFeature(String featureId)
    Check a feature.
    protected void
    checkProperty(String propertyId)
    Check a property.
    protected void
    configurePipeline()
    Configures the pipeline.

    Methods inherited from class org.apache.xerces.parsers.DTDConfiguration

    checkFeature, checkProperty, cleanup, configureDTDPipeline, configurePipeline, createDTDProcessor, createDTDScanner, createDTDValidator, createDatatypeValidatorFactory, createDocumentScanner, createEntityManager, createErrorReporter, createNamespaceBinder, createValidationManager, parse, parse, reset, setInputSource, setLocale

    Methods inherited from class org.apache.xerces.parsers.BasicParserConfiguration

    addComponent, checkFeature, checkProperty, getDTDContentModelHandler, getDTDHandler, getDocumentHandler, getEntityResolver, getErrorHandler, getLocale, parse, reset, setDTDContentModelHandler, setDTDHandler, setDocumentHandler, setEntityResolver, setErrorHandler, setFeature, setLocale, setProperty

    Methods inherited from class org.apache.xerces.util.ParserConfigurationSettings

    addRecognizedFeatures, addRecognizedProperties, checkFeature, checkProperty, getFeature, getProperty, setFeature, setProperty

    Field Details

    GENERATE_SYNTHETIC_ANNOTATIONS

    protected static final String GENERATE_SYNTHETIC_ANNOTATIONS
    Feature: generate synthetic annotations

    HONOUR_ALL_SCHEMALOCATIONS

    protected static final String HONOUR_ALL_SCHEMALOCATIONS
    Feature identifier: honour all schemaLocations

    IDENTITY_CONSTRAINT_CHECKING

    protected static final String IDENTITY_CONSTRAINT_CHECKING
    Feature identifier: whether to ignore identity constraint errors

    ID_IDREF_CHECKING

    protected static final String ID_IDREF_CHECKING
    Feature identifier: whether to ignore ID/IDREF errors

    IGNORE_XSI_TYPE

    protected static final String IGNORE_XSI_TYPE
    Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered

    NORMALIZE_DATA

    protected static final String NORMALIZE_DATA
    Feature identifier: expose schema normalized value

    ROOT_TYPE_DEF

    protected static final String ROOT_TYPE_DEF
    Property identifier: root type definition.

    SCHEMA_AUGMENT_PSVI

    protected static final String SCHEMA_AUGMENT_PSVI
    Feature identifier: augment PSVI

    SCHEMA_ELEMENT_DEFAULT

    protected static final String SCHEMA_ELEMENT_DEFAULT
    Feature identifier: send element default value via characters()

    SCHEMA_LOCATION

    protected static final String SCHEMA_LOCATION
    Property identifier: schema location.

    SCHEMA_NONS_LOCATION

    protected static final String SCHEMA_NONS_LOCATION
    Property identifier: no namespace schema location.

    SCHEMA_VALIDATOR

    protected static final String SCHEMA_VALIDATOR
    Property identifier: XML Schema validator.

    UNPARSED_ENTITY_CHECKING

    protected static final String UNPARSED_ENTITY_CHECKING
    Feature identifier: whether to ignore unparsed entity errors

    VALIDATE_ANNOTATIONS

    protected static final String VALIDATE_ANNOTATIONS
    Feature identifier: validate annotations

    XMLSCHEMA_FULL_CHECKING

    protected static final String XMLSCHEMA_FULL_CHECKING
    feature identifier: XML Schema validation -- full checking

    XMLSCHEMA_VALIDATION

    protected static final String XMLSCHEMA_VALIDATION
    feature identifier: XML Schema validation

    fSchemaValidator

    protected XMLSchemaValidator fSchemaValidator
    XML Schema Validator.

    Constructor Details

    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 Details

    checkFeature

    protected void checkFeature(String featureId)
                throws org.apache.xerces.xni.parser.XMLConfigurationException
    Check a feature. If feature is know and supported, this method simply returns. Otherwise, the appropriate exception is thrown.
    Overrides:
    checkFeature in interface DTDConfiguration
    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(String propertyId)
                throws org.apache.xerces.xni.parser.XMLConfigurationException
    Check a property. If the property is know and supported, this method simply returns. Otherwise, the appropriate exception is thrown.
    Overrides:
    checkProperty in interface DTDConfiguration
    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.

    configurePipeline

    protected void configurePipeline()
    Configures the pipeline.
    Overrides:
    configurePipeline in interface DTDConfiguration

    Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.