Subject: Re: [xsl] Recording start and end time of processing (in pipeline) From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 29 Apr 2010 12:57:25 -0700 |
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.
<xsl:template match="/"> <xsl:copy-of select="."/> </xsl:template>
-- XSLT/XQuery training: San Carlos, California 2010-04-26/30 Principles of XSLT for XQuery Writers: San Francisco,CA 2010-05-03 XSLT/XQuery/UBL/Code List training: Trondheim,Norway 2010-06-02/11 Vote for your XML training: http://www.CraneSoftwrights.com/m/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/m/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/m/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Recording start and end time , Fabre Lambeau | Thread | Re: [xsl] Recording start and end t, Liam R E Quin |
[xsl] Recording start and end time , Fabre Lambeau | Date | Re: [xsl] Recording start and end t, Liam R E Quin |
Month |