public StandardParserConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, parentSettings);   final String[] recognizedFeatures = { WARN_ON_DUPLICATE_ATTDEF,   WARN_ON_UNDECLARED_ELEMDEF, ALLOW_JAVA_ENCODINGS,       CONTINUE_AFTER_FATAL_ERROR, LOAD_EXTERNAL_DTD,          NOTIFY_BUILTIN_REFS, NOTIFY_CHAR_REFS, }; addRecognizedFeatures(recognizedFeatures);   setFeature(WARN_ON_DUPLICATE_ATTDEF, false); setFeature(WARN_ON_UNDECLARED_ELEMDEF, false); setFeature(ALLOW_JAVA_ENCODINGS, false); setFeature(CONTINUE_AFTER_FATAL_ERROR, false); setFeature(LOAD_EXTERNAL_DTD, true); setFeature(NOTIFY_BUILTIN_REFS, false); setFeature(NOTIFY_CHAR_REFS, false);   final String[] recognizedProperties = { ERROR_REPORTER, ENTITY_MANAGER, DOCUMENT_SCANNER, DTD_SCANNER, DTD_VALIDATOR, NAMESPACE_BINDER, XMLGRAMMAR_POOL, DATATYPE_VALIDATOR_FACTORY, VALIDATION_MANAGER }; addRecognizedProperties(recognizedProperties);   if (grammarPool == null) { grammarPool = new XMLGrammarPoolImpl(); } fGrammarPool = grammarPool; setProperty(XMLGRAMMAR_POOL, fGrammarPool);  fEntityManager = createEntityManager(); setProperty(ENTITY_MANAGER, fEntityManager); addComponent(fEntityManager);  fErrorReporter = createErrorReporter(); fErrorReporter.setDocumentLocator(fEntityManager.getEntityScanner()); setProperty(ERROR_REPORTER, fErrorReporter); addComponent(fErrorReporter);  fScanner = createDocumentScanner(); setProperty(DOCUMENT_SCANNER, fScanner); if (fScanner instanceof XMLComponent) { addComponent((XMLComponent)fScanner); }  fDTDScanner = createDTDScanner(); if (fDTDScanner != null) { setProperty(DTD_SCANNER, fDTDScanner); if (fDTDScanner instanceof XMLComponent) { addComponent((XMLComponent)fDTDScanner); } }  fDTDValidator = createDTDValidator(); if (fDTDValidator != null) { setProperty(DTD_VALIDATOR, fDTDValidator); addComponent(fDTDValidator); }  fNamespaceBinder = createNamespaceBinder(); if (fNamespaceBinder != null) { setProperty(NAMESPACE_BINDER, fNamespaceBinder); addComponent(fNamespaceBinder); }  fDatatypeValidatorFactory = createDatatypeValidatorFactory(); if (fDatatypeValidatorFactory != null) { setProperty(DATATYPE_VALIDATOR_FACTORY, fDatatypeValidatorFactory); } fValidationManager = createValidationManager();  if (fValidationManager != null) { setProperty (VALIDATION_MANAGER, fValidationManager); }  if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) { XMLMessageFormatter xmft = new XMLMessageFormatter(); fErrorReporter.putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, xmft); fErrorReporter.putMessageFormatter(XMLMessageFormatter.XMLNS_DOMAIN, xmft); }   try { setLocale(Locale.getDefault()); } catch (XNIException e) {   }  }
public StandardParserConfiguration() { this(null, null, null); }
    public StandardParserConfiguration(SymbolTable symbolTable,                                       XMLGrammarPool grammarPool,                                       XMLComponentManager parentSettings) {        super(symbolTable, parentSettings);        // add default recognized features        final String[] recognizedFeatures = {            WARN_ON_DUPLICATE_ATTDEF,   WARN_ON_UNDECLARED_ELEMDEF,            ALLOW_JAVA_ENCODINGS,       CONTINUE_AFTER_FATAL_ERROR,            LOAD_EXTERNAL_DTD,          NOTIFY_BUILTIN_REFS,            NOTIFY_CHAR_REFS,        };        addRecognizedFeatures(recognizedFeatures);        // set state for default features        setFeature(WARN_ON_DUPLICATE_ATTDEF, false);        setFeature(WARN_ON_UNDECLARED_ELEMDEF, false);        setFeature(ALLOW_JAVA_ENCODINGS, false);        setFeature(CONTINUE_AFTER_FATAL_ERROR, false);        setFeature(LOAD_EXTERNAL_DTD, true);        setFeature(NOTIFY_BUILTIN_REFS, false);        setFeature(NOTIFY_CHAR_REFS, false);        // add default recognized properties        final String[] recognizedProperties = {            ERROR_REPORTER,                         ENTITY_MANAGER,             DOCUMENT_SCANNER,            DTD_SCANNER,            DTD_VALIDATOR,            NAMESPACE_BINDER,            XMLGRAMMAR_POOL,               DATATYPE_VALIDATOR_FACTORY,            VALIDATION_MANAGER        };        addRecognizedProperties(recognizedProperties);        // create and register missing components        if (grammarPool == null) {            grammarPool = new XMLGrammarPoolImpl();        }        fGrammarPool = grammarPool;        setProperty(XMLGRAMMAR_POOL, fGrammarPool);        fEntityManager = createEntityManager();        setProperty(ENTITY_MANAGER, fEntityManager);        addComponent(fEntityManager);        fErrorReporter = createErrorReporter();        fErrorReporter.setDocumentLocator(fEntityManager.getEntityScanner());        setProperty(ERROR_REPORTER, fErrorReporter);        addComponent(fErrorReporter);        fScanner = createDocumentScanner();        setProperty(DOCUMENT_SCANNER, fScanner);        if (fScanner instanceof XMLComponent) {            addComponent((XMLComponent)fScanner);        }        fDTDScanner = createDTDScanner();        if (fDTDScanner != null) {            setProperty(DTD_SCANNER, fDTDScanner);            if (fDTDScanner instanceof XMLComponent) {                addComponent((XMLComponent)fDTDScanner);            }        }        fDTDValidator = createDTDValidator();        if (fDTDValidator != null) {            setProperty(DTD_VALIDATOR, fDTDValidator);            addComponent(fDTDValidator);        }        fNamespaceBinder = createNamespaceBinder();        if (fNamespaceBinder != null) {            setProperty(NAMESPACE_BINDER, fNamespaceBinder);            addComponent(fNamespaceBinder);        }                fDatatypeValidatorFactory = createDatatypeValidatorFactory();        if (fDatatypeValidatorFactory != null) {            setProperty(DATATYPE_VALIDATOR_FACTORY,                        fDatatypeValidatorFactory);        }        fValidationManager = createValidationManager();        if (fValidationManager != null) {            setProperty (VALIDATION_MANAGER, fValidationManager);        }        // add message formatters        if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {            XMLMessageFormatter xmft = new XMLMessageFormatter();            fErrorReporter.putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, xmft);            fErrorReporter.putMessageFormatter(XMLMessageFormatter.XMLNS_DOMAIN, xmft);        }        // set locale        try {            setLocale(Locale.getDefault());        }        catch (XNIException e) {            // do nothing            // REVISIT: What is the right thing to do? -Ac        }    } // <init>(SymbolTable,XMLGrammarPool)