/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class is the configuration used to parse XML 1.0 and XML 1.1 documents
* and provides support for XInclude. This is the default Xerces configuration.
*
* @author Michael Glavassevich, IBM
*
* @version $Id: XIncludeAwareParserConfiguration.java,v 1.5 2010-11-01 04:40:10 joehw Exp $
*/
/** Feature identifier: allow notation and unparsed entity events to be sent out of order. */
/** Feature identifier: fixup base URIs. */
/** Feature identifier: fixup language. */
/** Feature identifier: XInclude processing */
/** Property identifier: error reporter. */
/** Property identifier: error reporter. */
//
// Components
//
/** XInclude handler. */
/** Non-XInclude NamespaceContext. */
/** XInclude NamespaceContext. */
/** Current NamespaceContext. */
/** Flag indicating whether XInclude processsing is enabled. */
protected boolean fXIncludeEnabled = false;
/** Default constructor. */
public XIncludeAwareParserConfiguration() {
} // <init>()
/**
* Constructs a parser configuration using the specified symbol table.
*
* @param symbolTable The symbol table to use.
*/
} // <init>(SymbolTable)
/**
* Constructs a parser configuration using the specified symbol table and
* grammar pool.
* <p>
*
* @param symbolTable The symbol table to use.
* @param grammarPool The grammar pool to use.
*/
public XIncludeAwareParserConfiguration(
} // <init>(SymbolTable,XMLGrammarPool)
/**
* Constructs a parser configuration using the specified symbol table,
* grammar pool, and parent settings.
* <p>
*
* @param symbolTable The symbol table to use.
* @param grammarPool The grammar pool to use.
* @param parentSettings The parent settings.
*/
public XIncludeAwareParserConfiguration(
final String[] recognizedFeatures = {
};
// add default recognized properties
final String[] recognizedProperties =
setFeature(XINCLUDE_FIXUP_BASE_URIS, true);
setFeature(XINCLUDE_FIXUP_LANGUAGE, true);
fNonXIncludeNSContext = new NamespaceSupport();
}
/** Configures the pipeline. */
protected void configurePipeline() {
super.configurePipeline();
if (fXIncludeEnabled) {
// If the XInclude handler was not in the pipeline insert it.
if (fXIncludeHandler == null) {
fXIncludeHandler = new XIncludeHandler();
// add XInclude component
fXIncludeHandler.reset(this);
}
// Setup NamespaceContext
if (fCurrentNSContext != fXIncludeNSContext) {
if (fXIncludeNSContext == null) {
}
}
//configure DTD pipeline
if (fDTDHandler != null) {
}
// configure XML document pipeline: insert after DTDValidator and
// before XML Schema validator
// we don't have to worry about fSchemaValidator being null, since
// super.configurePipeline() instantiated it if the feature was set
}
// Otherwise, insert after the last component in the pipeline
else {
}
}
}
else {
// Setup NamespaceContext
if (fCurrentNSContext != fNonXIncludeNSContext) {
}
}
} // configurePipeline()
protected void configureXML11Pipeline() {
super.configureXML11Pipeline();
if (fXIncludeEnabled) {
// If the XInclude handler was not in the pipeline insert it.
if (fXIncludeHandler == null) {
fXIncludeHandler = new XIncludeHandler();
// add XInclude component
fXIncludeHandler.reset(this);
}
// Setup NamespaceContext
if (fCurrentNSContext != fXIncludeNSContext) {
if (fXIncludeNSContext == null) {
}
}
// configure XML 1.1. DTD pipeline
if (fDTDHandler != null) {
}
// configure XML document pipeline: insert after DTDValidator and
// before XML Schema validator
// we don't have to worry about fSchemaValidator being null, since
// super.configurePipeline() instantiated it if the feature was set
}
// Otherwise, insert after the last component in the pipeline
else {
}
}
}
else {
// Setup NamespaceContext
if (fCurrentNSContext != fNonXIncludeNSContext) {
}
}
} // configureXML11Pipeline()
throws XMLConfigurationException {
}
}
return super.getFeatureState0(featureId);
} // getFeature(String):boolean
throws XMLConfigurationException {
fConfigUpdated = true;
return;
}
}
}