40. ixsl:schedule-action (2/2)

The ixsl:schedule-action element wraps a xsl:call-template (and nothing else!). The template specified will be called when the scheduled action is complete.

For example:

<ixsl:schedule-action wait="{$seconds * 1000}">
  <xsl:call-template name="update-clock"/>
</ixsl:schedule-action>

Or, perhaps more commonly:

<ixsl:schedule-action document="{$endpoint}">
  <xsl:call-template name="process-reply"/>
</ixsl:schedule-action>

Note: ixsl:schedule-action doesn’t deliver the resulting document to the called template. It merely assures that the document is in SaxonJS’s cache of available documents. You have to use doc() or json-doc() to access the data.