xsl-list
[Top] [All Lists]

[xsl] Recording start and end time of processing (in pipeline)

2010-04-29 14:17:07
I have a quite complex XSLT sheet that processes some large amount data.
I'd like to record the start and end processing times in the output, so
that I can do rudimentary profiling of the work done.

I've noticed however that in the following sort of scenario (pipeline
processing using variables to store intermediary steps), I end up
getting the exact same start and end times.

<xsl:template name="process">
        <xsl:variable name="start" select="current-dateTime()"/>

        <xsl:variable name="step1">
                <!-- some processing -->
        </xsl:variable>

        <xsl:variable name="step2">
                <!-- some processing on step1 -->
        </xsl:variable>

        <xsl:variable name="end" select="current-dateTime()"/>

        <xsl:result-document>
                <process start="{$start}" end="{$end}">
                        <xsl:sequence select="$step2"/>
                </process>
        </xsl:result-document>
</xsl:template>

I fully understand why (xsl processor evaluating only when necessary),
but wonder how I could get it working.

Fabre Lambeau
######################################################################
Attention: 
This e-mail message is privileged and confidential. If you are not the 
intended recipient please delete the message and notify the sender. 
Any views or opinions presented are solely those of the author.

This email was scanned and cleared by NetIQ MailMarshal.
######################################################################

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>