El mar, 29-11-2005 a las 10:04 +0000, Ross Gardler escribió: > David Crossley wrote: > > Thorsten Scherler wrote: > > > >>No, I had a simple transformer that was "just" transforming the > >>contracts into the position where it could be found. > >> > >>I wanted to check that in but started to clean the code and added > >>comments. Doing this I then started to apply recent proposals and it is > >>not that easy. ;-) The challenge is to create a DOM result with SAX > >>events out of attributes of contracts and the structure path of the > >>hooks and then inject it again in the SAX result stream. I hope to have > >>a first version ready after the weekend. > > > > > > I don't know what i am talking about, but ... > > > > Will creating an intermediate DOM cause a bottleneck? > > I've been waiting for a response from someone who knows this stuff > better than me, but it's not come. I'll try a response and wait for a > more educated fellow to tell me I'm wrong ;-) >
Sorry no time ATM (...to tell u u're wrong). ;-) > Yes. It will cause a bottleneck. Those who know the early Cocoon will be > aware that in Version 1.0 it used DOM in 2.0 it moved to SAX because of > performance problems with DOM. In general I agree, but we are speaking here about *some* code in *one* transformer (which is SAX based). > > My intention was to see the code and then try and make a suggestion as > to how we can avoid this bottleneck. I'm guessing there is a good > technical reason for needing a DOM. > Hmm, actually yes. Do you remember the @xpath injection? How can you do this via sax events. ATM I am generating the response in DOM to inject all the xpath stuff (which is harder that I thought) coming from the contracts. > Perhaps Thorsten could let us know more about this problem and see what > we can come up with as a community. > Eager to hear what u think how we can have the xpath injection with SAX. The problem I have is since I added the injection stuff it is not working anymore like I expected, so I am not keen to check something in that is not working ATM. salu2 > Ross -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd)