Progress

Purpose:
Report progress during long lived XSL transforms.
Namespace:
urn:WebWorks-XSLT-Extension-Progress
Prefix:
wwprogress
Methods:
Abort():

Check to see if the user has clicked the "Cancel" button.

Returns:
Boolean.
Example:

Short-circuit XSL processing if the user has aborted.

<xsl:for-each select="$VarParagraphs">
 <xsl:variable name="VarParagraph" select="." />

 <xsl:if test="not(wwprogress:Abort())">
  <xsl:call-template name="NotVerySimpleProcess">
   <xsl:with-param name="ParamParagraph" select="VarParagraph" />
  </xsl:call-template>
 </xsl:if>
</xsl:for-each>
Start(int totalSubSteps):

Create a new progress step with the given number of sub-steps.

Returns:
Nothing.
Example:

Create a progress bar with two sub-steps.

<xsl:variable name="VarProgressTotalStart" select="wwprogress:Start(2)" />

<xsl:variable name="VarProgressStep1Start" select="wwprogress:Start(1)" />
<xsl:variable name="VarProgressStep1End" select="wwprogress:End()" />

<xsl:variable name="VarProgressStep2Start" select="wwprogress:Start(1)" />
<xsl:variable name="VarProgressStep2End" select="wwprogress:End()" />

<xsl:variable name="VarProgressTotalEnd" select="wwprogress:End()" />
End():

End the current progress step.

Returns:
Nothing.
Example:

Create a progress bar with two sub-steps.

<xsl:variable name="VarProgressTotalStart" select="wwprogress:Start(2)" />

<xsl:variable name="VarProgressStep1Start" select="wwprogress:Start(1)" />
<xsl:variable name="VarProgressStep1End" select="wwprogress:End()" />

<xsl:variable name="VarProgressStep2Start" select="wwprogress:Start(1)" />
<xsl:variable name="VarProgressStep2End" select="wwprogress:End()" />

<xsl:variable name="VarProgressTotalEnd" select="wwprogress:End()" />
SetStatus(string message):

Set the status bar for the current progress step.

Returns:
Nothing.
Example:

Report status as paragraphs are processed.

<xsl:variable name="VarParagraphCount" select="count($VarParagraphs)" />
<xsl:variable name="VarProgressParagraphsStart" select="wwprogress:Start($VarParagraphCount)" />
<xsl:variable name="VarProgressParagraphsStatus" select="wwprogress:SetStatus(concat('Processing ', $VarParagraphCount))" />
<xsl:for-each select="$VarParagraphs">
 <xsl:variable name="VarParagraph" select="." />

 <xsl:variable name="VarProgressParagraphStart" select="wwprogress:Start(1)" />

 <xsl:variable name="VarProgressParagraphStatus" select="wwprogress:SetStatus('Processing paragraph ', position(), ' of ', $VarParagraphCount, '.'))" />

 <xsl:variable name="VarProgressParagraphEnd" select="wwprogress:End()" />
</xsl:for-each>
<xsl:variable name="VarProgressParagraphsEnd" select="wwprogress:End()" />

DevCenter/Documentation/ExtensionObjects/ePublisher/Progress (last edited 2010-08-23 19:05:11 by BenAllums)