[xslt] ApplyTemplates with param in libxslt-0.5.0



The changes in transform.c to xsltApplyTemplates are "necessary" but not
"sufficient".  The problem is this: when xsltApplyTemplates is ready to work
on a node, it calls xsltProcessOneNode.  That routine, after some work,
calls xsltApplyOneTemplate, but just before the call it clears the
parameters (with a varsPush(ctxt, NULL)).  The fix for this, of course, is
simple - just remove the varsPush and the corresponding
xsltFreeStackElemList(varsPop(ctxt)).

The problems I can't resolve (and leave for the experts) is whether this
required change will affect some other code, as well as whether the clearing
of vars/params is erroneously done at other places.  The only other place
which calls xsltProcessOneNode is xsltDefaultProcessOneNode, so possibly the
vars should be cleared before that call is made?





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]