[xsl] StreamBurner to preview Atom and RSS

Subject: [xsl] StreamBurner to preview Atom and RSS
From: "Schimon Jehudah sch@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 6 Mar 2026 12:14:53 -0000
Greetings.

I have a question about XSLT 1.0 in regard to project StreamBurner.


Introduction
------------

StreamBurner project was made over a decade ago in the hope of
developers of FTP and HTTP internet browsers to enable previewing of
Atom and RSS documents by utilizing a single stylesheet to transform
XML to (X)HTML.

https://gitgud.io/sjehuda/streamburner

https://git.xmpp-it.net/sch/StreamBurner/src/branch/main/xsl

Considering that XSLT 2.0 is not yet implemented everywhere, it was
decided to utilize XSLT 1.0 for stylesheet.


Problem
-------

However, XSLT 1.0 does not support serialization of data, so it happens
that the XHTML structure repeats itself and the stylesheet increases by
a hundred lines for every new document (ActivityStream 1.0, Atom 0.3,
Atom 1.0, Atomsub 1.0, FOAF 0.1, OPML, RSS 1.0, RSS 2.0, XBEL, et
cetera); nevertheless, it might be my fault by not having the essential
knowledge of this concern.


Question
--------

Is it valid or possible to allocate XPath directives as variables and
apply the variables as XPath directives, similarly to "eval"?

<xsl:variable name="feed-subtitle"
              select="'atom:subtitle'"/>

<xsl:variable name="entry-iterate"
              select="'atom:entry'">

Doing so, would significantly reduce the amount of repeated code.

I would appreciate your advisory.


Kind reagrds,
Schimon

Current Thread