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
Fully implemented since Saxon 9.7. Note that streaming of
xsl:for-each-group, as a child of xsl:fork, with a
group-by attribute is not implemented.
In Saxon 9.6, the instruction was implemented 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.