Streaming Transformations for XML
Streaming Transformations for XML (STX) is an XML transformation language intended as a high-speed, low memory consumption alternative to XSLT.
Introduction
STX is an XML standard for efficient processing of stream-based XML. As we will discover XSLT is not well suited to stream based processing and STX fills this niche.
SAX streams XML events as "open element" "close element" "text node" so that other software that can begin parsing it immediately. Unfortunately some software can't effectively use individual XML segments this way and must stockpile these events, build up the whole document, and then begin processing. So is the case with XSLT. Because XSLT's XPath can select any node (regardless of context) it must have the entire document available in memory for queries. This could be perceived as a bottleneck if it weren't for that XPath's flexibility is often useful and neccessary.
STX fills an important niche where XPath's flexibility isn't needed, or where speed and memory use is important. By only allowing simple queries based on nodes immediately surrounding the current SAX event, STX can start parsing and outputing events as they arrive. Because of this, STX is often considered an architecture heavily influenced by the original goals of SAX.
Implementations of STX are available in Java and Perl.