David Bertoni  wrote / napĂ­sal(a):
Tomas Studva wrote:

Xalan-C does not rely on recursion and the processor stack to execute stylesheets. Instead, it simply walks the stylesheet tree iteratively, figuring out what needs to be executed next. If it does need to save some small bit of context, it does that on a "stack" that's kept in dynamically allocated memory.

This has a number of advantages:

1. There's a much smaller chance that stylesheet execution will consume the entire processor stack. 2. Because there is only a small amount of context to be saved, and it's not saved all of the time, execution is faster and consumes less memory. For example, just the overhead of the C++ stack frame is often greater than than any local context that needs to be saved. 3. Execution can be interrupted at any time by simply breaking out of a loop, rather than unwinding a large number of stack frames. 4. It's trivial to restart execution at the point it was interrupted by just re-entering the loop starting with the last template executed.

I'm not sure what you mean by "incremental," because I don't see how it relates to the data model, unless you mean building the source tree incrementally, which is a very different thing from executing the transformation incrementally.

Dave

I understand, iterative execution. No I don't mean incremental in a way of reading source incrementally, what is usable for big size sources in databases. I mean what you get when you type "incremental xslt" in google. Or look at http://tstudva.googlepages.com/darwin-anincrementalxsltprocessor or in design of Darwin http://www.javaforge.com/proj/doc/details.do?doc_id=36525. I don't understand Xalan execution in details and that is problem for me. Some good documentation would help. On Xalan page in design doc, there is written, transformation is performed mainly in transform package. There is transformer, the main class, and there is performed iterative execution using self(on heap) managed stacks. But some part of execution is performed in ElemTemplatesElement, so I am confused. My second big question is if I choosed good to start with Xalan trunk and not with any branch.





Reply via email to