Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.4
-
None
-
None
-
Operating System: Linux
Platform: PC
-
9124
Description
It appears that ElemApplyTemplate calls pushElemTemplateElement for the
childTemplates of "template", but not the template, itself. Consequently the
element stack for use by tools is not correct.
I seemed to have gotten it to work by the mods shown below.
/************ starting about line 410 in ElemApplyTemplate ******/
//-amb, was null. Moved from above.
transformer.pushElemTemplateElement(template);
// Fire a trace event for the template.
if (TransformerImpl.S_DEBUG)
transformer.getTraceManager().fireTraceEvent(template);
//-amb, added this line (or you could think of adding the above line,
// as the original line had null as the argument
transformer.pushElemTemplateElement(null);
// And execute the child templates.
// Loop through the children of the template, calling execute on
// each of them.
for (ElemTemplateElement t = template.m_firstChild;
t != null; t = t.m_nextSibling)
//-amb, added this line. Should it go in the finally block, too?
transformer.popElemTemplateElement();