cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Maisonneuve" <n.maisonne...@hotpop.com>
Subject optimize virtual pipeline
Date Wed, 26 Nov 2003 04:51:03 GMT
hy,
i made a transformer to index xml file.
Simplified Example of input :
<indexation>
<query action="index" uri="coco.xml">
<query action="index" uri="coco2.xml">
<query action="index" 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
Mime
View raw message