|
Re: ElemApplyTemplates implementation: msg#00012java.helma.antville.user
Hi, Tomas. Tomas Studva <tstudva@xxxxxxxxx> wrote on 2007-10-10 04:59:28 PM: > 1, > In ElemApplyTemplates when matching node against template there is code > case DTM.TEXT_NODE: > [HZ: Deleted code] > > There is some default template, sroot.getDefaultTextRule(), but it is > not executed and instead direct call to > dtm.dispatchCharactersEvents(child, rth,false); is performed. > Why?(optimization?) Yes, that's an optimization because that particular template rule is invoked so often. > 2, In ElemApplyTemplates after template is found, is set on stacks and > so on and params are processed, follows code with comment > // And execute the child templates. > // Loop through the children of the template, > // calling execute on > // each of them. [HZ: Deleted code] > which directly executes children of matched template insted of executing > template. Why? It looks to me like somebody - Scott Boag very early on, probably - did that to eliminate the extra step of recursively invoking the execute method on the xsl:template element. I'm guessing it was done that way to increase the amount of recursive processing that could be done without causing a Java StackOverflowException. Thanks, Henry ------------------------------------------------------------------ Henry Zongaro XSLT Processors Development IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044 mailto:zongaro@xxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Can someone explain Xalan XSLT execution, keshlam |
|---|---|
| Next by Date: | Re: ElemApplyTemplates implementation, Tomas Studva |
| Previous by Thread: | Re: ElemApplyTemplates implementation, Tomas Studva |
| Next by Thread: | Re: ElemApplyTemplates implementation, Tomas Studva |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |