Re: [xsl] Can xsl:iterate be used in stream-processing?

Subject: Re: [xsl] Can xsl:iterate be used in stream-processing?
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Sep 2014 09:58:17 -0000
It's complaining about a context item expression (.) not about xsl:iterate, so
I can't see how you come to that (false) conclusion.

It would help if we could see what's in the elided "...", since that's
probably where the trouble is.

Michael Kay
Saxonica
mike@xxxxxxxxxxxx
+44 (0) 118 946 5893




On 17 Sep 2014, at 10:39, Costello, Roger L. costello@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hi Folks,
>
> I am trying to stream-process this web site which emits a continuous stream
of XML:
>
> http://xmpp.wordpress.com:8008/firehose.xml?type=text/plain
>
> Ergo, I use xsl:stream like so:
>
>        <xsl:stream
href="http://xmpp.wordpress.com:8008/firehose.xml?type=text/plain";>
>            ...
>        </xsl:stream>
>
> The XML that the web site delivers consists of an infinitely long sequence
of Atom <entry> elements. I want to iterate through them and keep a running
count. Ergo, I embed xsl:iterate inside xsl:stream like so:
>
>        <xsl:stream
href="http://xmpp.wordpress.com:8008/firehose.xml?type=text/plain";>
>            <xsl:iterate select="stream/atom:entry ">
>                <xsl:param name="count" select="1" as="xs:integer"/>
>                ...
>            </xsl:iterate>
>        </xsl:stream>
>
> However, that results in Saxon throwing this error:
>
>  The body of the xsl:stream instruction is not guaranteed streamable
according to W3C rules
>  *  Context item expression (.) in a navigational context is free-ranging
>
> I conclude that xsl:iterate cannot be used in stream-processing. Correct?
>
> /Roger

Current Thread