xsl:fork

The result of the xsl:fork instruction is the sequence formed by concatenating the results of evaluating each of its contained instructions, in order.

Category: instruction
Content: ( xsl:fallback* , ( ( xsl:sequence , xsl:fallback* )* | ( xsl:for-each-group , xsl:fallback* ) ) )
Permitted parent elements: any XSLT element whose content model is sequence constructor; any literal result element
Element has no attributes

Notes on the Saxon implementation

Newly implemented in Saxon 9.6, with restrictions: specifically, the content of xsl:fork must consist of a sequence of xsl:sequence instructions, and can not include xsl:for-each-group elements.

The Saxon 9.6 implementation of xsl:fork in streaming mode does not actually use multiple threads: rather, the events notified by the XML parser (such as startElement and endElement) are notified to each prong of the xsl:fork in turn. Each prong accumulates its result in a temporary tree held in memory, and these temporary trees are combined on completion.

Links to W3C specifications

XSLT 3.0 Specification

See also

xsl:fallback