|
hy,
i made a transformer to index xml file. Simplified Example of input : <indexation> <query action="" uri="coco.xml"> <query action="" uri="coco2.xml"> <query action="" uri="coco3.xml"> </indexation> Inside this transformer, Each xml file
(coco,coco2,..) is transformed with a xsl file in using the xalan transformer.
the xsl result is parsed to create a Lucene Document.
so i created a virtual pipeline in the Index
Transformer :
For each file ,
(Filegenerator-->XSL transformer-->xml parser(=>lucene Document)) public LuceneDocument parse(String uri, String
xslsrc) {
this.generator.setup(this.resolver, objectModel, uri, this.parameters); this.transformer.setup(this.resolver, objectModel, src, this.parameters); this.generator.setConsumer(transformer); this.transformer.setConsumer(xmlparser); this.generator.generate(); return xmlparser.getDocument(); } I would know if my virtualpipeline code is
optimized
NOTE : the xsl src is always the same for all
files
thanks in advance nicolas maisonneuve
|
