You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/05/15 20:24:11 UTC
DO NOT REPLY [Bug 9124] New: -
ElemApplyTemplate not calling pushElemTemplateElement
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9124>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9124
ElemApplyTemplate not calling pushElemTemplateElement
Summary: ElemApplyTemplate not calling pushElemTemplateElement
Product: XalanJ2
Version: 2.3
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: Other
Component: org.apache.xalan.templates
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: byersa@automationgroups.com
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)
{
xctxt.setSAXLocator(t);
transformer.setCurrentElement(t);
t.execute(transformer);
}
//-amb, added this line. Should it go in the finally block, too?
transformer.popElemTemplateElement();