using SAXON in streaming mode

Having trouble installing Oxygen? Got a bug to report? Post it all here.
PaulHermans
Posts: 82
Joined: Sat Jan 13, 2007 5:39 pm
Location: Belgium

using SAXON in streaming mode

Post by PaulHermans »

From the Saxon documentation:
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.
This is part of the stylesheet:

Code: Select all

<xsl:template match="/" name="main">
<metadata>
<xsl:apply-templates select="saxon:stream(doc('0001_exportM.xml')/Collection/Artefact)"/>
</metadata>
</xsl:template>
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
Paul
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: using SAXON in streaming mode

Post by george »

Hi Paul,

That is indeed a limitation that was not removed when we added support for setting the initial template for Saxon 9. We plan to make the XML field optional and report an error later, when the transformation is executed, in case an XML is required (as in case of XSLT 1.0 or if initial template is not set).

Best Regards,
George
George Cristian Bina
Post Reply