xsl-list
[Top] [All Lists]

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

2014-09-17 04:39:19
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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>