XML technologies / XSLT / XSLT 3.0 / XSLT streaming / Elements / xsl:stream
The xsl:stream element reads an external document and uses it for an XSLT transformation. The document URI is specified in the href attribute. (See XSL Transformations (XSLT) Version 3.0: 18.1 The xsl:stream Instruction.)
The following code example shows a simple use of xsl:stream.
Code example: introductory example of xsl:stream.
<xsl:template match="/">
<xsl:stream href="wetterdaten.xml">
<xsl:apply-templates select="node()"/>
</xsl:stream>
</xsl:template>Using xsl:stream in a template.
Line 2: The href attribute specifies the URI of the external file. This can also be a URL.
Line 3: xsl:apply-templates processes the external file using additional templates.
Exercise on xsl:stream
Weather report (Exercise 6)