On 06/05/2011 14:45, Роман Иванов wrote:
    How can I get value of an element, for example,
     <xsl:element name="Time">
           <xsl:value-of select="substring(string(current-time()), 1, 5)"/>

     or value of variable, for example:
    <xsl:variable name="elt-name" select="current-time()"/>

when I try to debug xslt transformation in Java by attaching TraceListener to the net.sf.saxon.Controller ?

Best regards,
Roman Ivanov.
Have you tried using the debuggers that come with Stylus Studio or oXygen? The developers of those products put a lot of effort into writing custom trace listeners that extract the subset of information needed for debugging. A lot more information is reported to the TraceListener than the StandardTraceListener (activated using the -T option) actually reports. However, the focus is on reporting which instructions and expressions are evaluated, rather than on what the actual values are. To get the values, you can combine the information written to the TraceListener with the information written to the result tree - which isn't easy, but the Stylus Studio and oXygen debuggers demonstrate that it can be done.

Michael Kay