* @param context the XPath dynamic execution context (which holds the head of a linked
* list of context objects, representing the execution stack)
*/
public static void printStackTrace(PrintStream out, XPathContext context) {
Iterator iterator = new ContextStackIterator(context);
while (iterator.hasNext()) {
ContextStackFrame frame = (ContextStackFrame)iterator.next();
if (frame == null) {
break;
}
frame.print(out);
}