3 (defparameter *xslt-trace
* nil
)
4 (defparameter *xslt-trace-context
* nil
)
5 (defparameter *xslt-trace-indent
* 2)
7 (defvar *xslt-trace-level
* 0)
9 (defun xslt-trace (fmt &rest args
)
11 (format *debug-io
* "~&~v@T~?~%"
12 (* *xslt-trace-level
* *xslt-trace-indent
*)
15 (defun xslt-trace-thunk (thunk fmt
&rest other-args
)
18 (format *debug-io
* "~&~v@TENTER: ~?~%"
19 (* *xslt-trace-level
* *xslt-trace-indent
*)
20 fmt
(substitute "..." :result other-args
))
21 (let ((result (let ((*xslt-trace-level
* (1+ *xslt-trace-level
*)))
22 (funcall thunk ctx
))))
23 (format *debug-io
* "~&~v@TLEAVE: ~@[(CONTEXT: ~s)~%~]~?~%"
24 (* *xslt-trace-level
* *xslt-trace-indent
*)
25 (and *xslt-trace-context
* (xpath:context-node ctx
)) fmt
26 (substitute result
:result other-args
))