Class 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 Details

    • NORMALIZE_DATA

      protected static final String NORMALIZE_DATA
      Feature identifier: expose schema normalized value
      See Also:
    • SCHEMA_ELEMENT_DEFAULT

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

      protected static final String SCHEMA_AUGMENT_PSVI
      Feature identifier: augment PSVI
      See Also:
    • XMLSCHEMA_VALIDATION

      protected static final String XMLSCHEMA_VALIDATION
      feature identifier: XML Schema validation
      See Also:
    • XMLSCHEMA_FULL_CHECKING

      protected static final String XMLSCHEMA_FULL_CHECKING
      feature identifier: XML Schema validation -- full checking
      See Also:
    • GENERATE_SYNTHETIC_ANNOTATIONS

      protected static final String GENERATE_SYNTHETIC_ANNOTATIONS
      Feature: generate synthetic annotations
      See Also:
    • VALIDATE_ANNOTATIONS

      protected static final String VALIDATE_ANNOTATIONS
      Feature identifier: validate annotations
      See Also:
    • HONOUR_ALL_SCHEMALOCATIONS

      protected static final String HONOUR_ALL_SCHEMALOCATIONS
      Feature identifier: honour all schemaLocations
      See Also:
    • NAMESPACE_GROWTH

      protected static final String NAMESPACE_GROWTH
      Feature identifier: namespace growth
      See Also:
    • TOLERATE_DUPLICATES

      protected static final String TOLERATE_DUPLICATES
      Feature identifier: tolerate duplicates
      See Also:
    • 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
      See Also:
    • ID_IDREF_CHECKING

      protected static final String ID_IDREF_CHECKING
      Feature identifier: whether to ignore ID/IDREF errors
      See Also:
    • UNPARSED_ENTITY_CHECKING

      protected static final String UNPARSED_ENTITY_CHECKING
      Feature identifier: whether to ignore unparsed entity errors
      See Also:
    • IDENTITY_CONSTRAINT_CHECKING

      protected static final String IDENTITY_CONSTRAINT_CHECKING
      Feature identifier: whether to ignore identity constraint errors
      See Also:
    • SCHEMA_VALIDATOR

      protected static final String SCHEMA_VALIDATOR
      Property identifier: XML Schema validator.
      See Also:
    • SCHEMA_LOCATION

      protected static final String SCHEMA_LOCATION
      Property identifier: schema location.
      See Also:
    • SCHEMA_NONS_LOCATION

      protected static final String SCHEMA_NONS_LOCATION
      Property identifier: no namespace schema location.
      See Also:
    • ROOT_TYPE_DEF

      protected static final String ROOT_TYPE_DEF
      Property identifier: root type definition.
      See Also:
    • ROOT_ELEMENT_DECL

      protected static final String ROOT_ELEMENT_DECL
      Property identifier: root element declaration.
      See Also:
    • SCHEMA_DV_FACTORY

      protected static final String SCHEMA_DV_FACTORY
      Property identifier: Schema DV Factory
      See Also:
    • 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

    • configurePipeline

      protected void configurePipeline()
      Configures the pipeline.
      Overrides:
      configurePipeline in class DTDConfiguration
    • 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 class 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 class 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.