[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Stream processing a web site that streams XML

Subject: [xsl] Stream processing a web site that streams XML
From: "Costello, Roger L. costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Jun 2014 09:33:13 -0000

Hi Folks,

This web site emits a continuous stream of XML:


(Neat! Thanks George!)

You can open a browser and plug in that URL to see the XML. The XML is a
stream of Atom <entry> elements inside a <stream> root element.

I wrote an XSLT program which uses the new XSLT 3.0 stream-processing
capability. The XSLT program connects to the web site and then outputs the
value of each Atom <title> element. Below is my XSLT program. When run it
produces an unending stream of titles. Very cool.

Here is my XSLT program:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

    <xsl:template match="/">
            <xsl:for-each select="stream/atom:entry/atom:source/atom:title">
                    <xsl:value-of select="." />


Current Thread