using SAXON in streaming mode
Posted: Fri Apr 09, 2010 5:40 pm
From the Saxon documentation:
My transformation scenario:
using Saxon-EE 9.2.0.6
- with settings: initial template: main.
Oxygen doesn't allow me to run this transformation scenario without indicating an input file, which I do not need, since it is called from the saxon:stream function.
Of course I can point to a dummy file, ...
Paul
This is part of the stylesheet:The document that is processed in streaming mode must be read using the doc() function (or in XSLT, the document() function). The query or stylesheet may also process other documents (for example a document named on the command line) but this is not necessary. In XSLT it is often useful to activate the stylesheet at a named template using the -it option on the command line, which allows activation without a primary input document.
Code: Select all
<xsl:template match="/" name="main">
<metadata>
<xsl:apply-templates select="saxon:stream(doc('0001_exportM.xml')/Collection/Artefact)"/>
</metadata>
</xsl:template>
using Saxon-EE 9.2.0.6
- with settings: initial template: main.
Oxygen doesn't allow me to run this transformation scenario without indicating an input file, which I do not need, since it is called from the saxon:stream function.
Of course I can point to a dummy file, ...
Paul