use of org.apache.xalan.trace.TracerEvent in project webtools.sourceediting by eclipse.
the class XalanStyleFrame method popElement.
public TracerEvent popElement() {
TracerEvent e = (TracerEvent) eventStack.pop();
currentLine = e.m_styleNode.getEndLineNumber();
if (log.isDebugEnabled())
log.debug("Popped element " + TracerEvent.printNode(e.m_styleNode) + " at line " + currentLine);
ElemTemplateElement element = e.m_styleNode;
String name = element.getNodeName();
log.debug(" name " + name);
if (name.equals("param") || name.equals("variable"))
addVariable((ElemVariable) e.m_styleNode);
return e;
}
use of org.apache.xalan.trace.TracerEvent in project webtools.sourceediting by eclipse.
the class XalanTraceListener method traceEnd.
public void traceEnd(TracerEvent ev) {
XalanStyleFrame styleFrame = (XalanStyleFrame) debugger.peekStyleFrame();
if (styleFrame != null) {
if (ev.m_styleNode.getOwnerXSLTemplate() == ev.m_styleNode) {
// remove from current template element stack
styleFrame.popElement();
} else if (ev.m_styleNode.getXSLToken() != Constants.ELEMNAME_TEXTLITERALRESULT) {
// remove from current template element stack
styleFrame.popElement();
} else {
log.debug("Skipped pop for element " + ev.m_styleNode.getLocalName());
}
check(styleFrame);
if (ev.m_styleNode.getOwnerXSLTemplate() == ev.m_styleNode) {
// end of template, so remove from stack
debugger.popStyleFrame();
} else {
// because we don't get selectEnd events, we need to do this check
TracerEvent tel = styleFrame.peekElement();
// if the parent is a choose, move on to it
switch(tel.m_styleNode.getXSLToken()) {
case Constants.ELEMNAME_CHOOSE:
styleFrame.popElement();
check(styleFrame);
}
}
}
}
Aggregations