XPointerParserConfigurationpublic class XPointerParserConfiguration extends XML11Configuration
Fields Summary |
---|
private com.sun.org.apache.xerces.internal.xinclude.XPointerSchema | fXPointerSchemaComponent | protected static final String | XINCLUDE_HANDLERProperty identifier: error reporter. | protected static final String | NAMESPACE_CONTEXTProperty identifier: error reporter. |
Constructors Summary |
---|
public XPointerParserConfiguration()Default constructor.
this(null, null, null);
//this(null, new XMLGrammarPoolImpl(), null);
| public XPointerParserConfiguration(SymbolTable symbolTable)Constructs a parser configuration using the specified symbol table.
this(symbolTable, null, null);
//this(symbolTable, new XMLGrammarPoolImpl(), null);
| public XPointerParserConfiguration(SymbolTable symbolTable, 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.
this(symbolTable, grammarPool, null);
| public XPointerParserConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, 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.
super(symbolTable, grammarPool, parentSettings);
// add default recognized properties
final String[] recognizedProperties =
{ XINCLUDE_HANDLER, NAMESPACE_CONTEXT };
addRecognizedProperties(recognizedProperties);
setProperty(NAMESPACE_CONTEXT, new XIncludeNamespaceSupport());
|
Methods Summary |
---|
protected void | configurePipeline()Configures the pipeline.
super.configurePipeline();
// setup document pipeline
// add the XPointerSchema component to the list of recognized components
if (fXPointerSchemaComponent == null) {
if( (fXPointerSchemaComponent = (XPointerSchema)getProperty(XINCLUDE_HANDLER)) !=null){
addComponent(fXPointerSchemaComponent);
}
}
// insert before fSchemaValidator, if one exists.
XMLDocumentHandler next = null;
if (fFeatures.get(XMLSCHEMA_VALIDATION) == Boolean.TRUE) {
// we don't have to worry about fSchemaValidator being null, since
// super.configurePipeline() instantiated it if the feature was set
next = fSchemaValidator.getDocumentHandler();
}
// Otherwise, insert after the last component in the pipeline
if (next != null) {
XMLDocumentSource prev = next.getDocumentSource();
if (prev != null) {
fXPointerSchemaComponent.setDocumentSource(prev);
prev.setDocumentHandler(fXPointerSchemaComponent);
}
next.setDocumentSource(fXPointerSchemaComponent);
fXPointerSchemaComponent.setDocumentHandler(next);
}
else {
next = fLastComponent.getDocumentHandler();
if (next != null) {
fXPointerSchemaComponent.setDocumentHandler(next);
next.setDocumentSource(fXPointerSchemaComponent);
}
fLastComponent.setDocumentHandler(fXPointerSchemaComponent);
fXPointerSchemaComponent.setDocumentSource(fLastComponent);
setDocumentHandler(fXPointerSchemaComponent);
}
|
|