1 16 17 package xni.parser; 18 19 import org.apache.xerces.parsers.XIncludeAwareParserConfiguration; 20 import org.apache.xerces.util.SymbolTable; 21 import org.apache.xerces.xni.grammars.XMLGrammarPool; 22 import org.apache.xerces.xni.parser.XMLComponentManager; 23 24 import xni.PSVIWriter; 25 26 34 public class PSVIConfiguration extends XIncludeAwareParserConfiguration { 35 36 37 38 protected PSVIWriter fPSVIWriter; 39 40 44 48 public PSVIConfiguration() { 49 this(null, null); 50 } 52 57 public PSVIConfiguration(SymbolTable symbolTable) { 58 this(symbolTable, null); 59 } 61 72 public PSVIConfiguration(SymbolTable symbolTable, 73 XMLGrammarPool grammarPool) { 74 this(symbolTable, grammarPool, null); 75 } 77 89 public PSVIConfiguration(SymbolTable symbolTable, 90 XMLGrammarPool grammarPool, 91 XMLComponentManager parentSettings) { 92 super(symbolTable, grammarPool, parentSettings); 93 94 fPSVIWriter = createPSVIWriter(); 95 if (fPSVIWriter != null) { 96 addComponent(fPSVIWriter); 97 } 98 99 } 101 102 103 protected void configurePipeline() { 104 105 super.configurePipeline(); 106 if (fSchemaValidator != null) { 107 fSchemaValidator.setDocumentHandler(fPSVIWriter); 108 fPSVIWriter.setDocumentHandler(fDocumentHandler); 109 fPSVIWriter.setDocumentSource(fSchemaValidator); 110 } 111 112 } 114 115 116 protected PSVIWriter createPSVIWriter(){ 117 return new PSVIWriter(); 118 } 119 120 } | Popular Tags |