xsl-list
[Top] [All Lists]

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

2014-09-17 04:58:32
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(_at_)saxonica(_dot_)com
+44 (0) 118 946 5893




On 17 Sep 2014, at 10:39, Costello, Roger L. costello(_at_)mitre(_dot_)org 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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

--~----------------------------------------------------------------
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>