[xquery-talk] xsl:message? How to debug?

Michael Kay mhk at mhk.me.uk
Mon Nov 21 16:57:34 PST 2005

> > Is there an equivalent of xsl:message please,
> > to produce debug output?
> There is fn:trace($val, $something). The $something serves as a label
> where the debug info should go and is implementation dependant. Be
> careful as many processors optimise unused code away.

A useful trick if you just want to produce a message, rather than displaying
the value of an expression, is to replace some expression E in your query

(E, trace((), "Kilroy was here"))

Michael Kay

More information about the talk mailing list