If you don't know what STX is, just take a look here:
and then read here
There is one feature of STX that I really like: more precise
STX is designed to be incremental and event-based. It fits *perfectly*
in Cocoon's view of the world. *Much* better than XSLT. Xalan has to
jump thru hoops to give us incremental operation (and dies under load
because of the multiple thread problems). Any STX processor is probably
capable of giving us *almost* the same XSLT functionality we use, but
without all the resources used to implement nicely on the server side a
technology that was designed to run on the client-side onto a DOM.
Just look at the example STX transformation sheet (calling it stylesheet
is now totally wrong, IMO) in the xml.com tutorial:
STX doesn't reinvent the wheel: reuses elements and attributes where it
makes sense to do it.
I like this new semantics, much clearer than XSLT where variable is used
for both declaration and instantiation.
Here is the difference: while apply-templates is utterly declerative,
but requires great contextualization by the processing,
is more procedural, but not really different from
that is normally used to restrict template
Look at it: pure SAX, no memory, out-of-the-box incremental operation,
and, I bet, faster than any equivalent XSLT stylesheet.
Just use the right tool for the right job and for server-side simple
transformations, STX might be well worth it, expecially on pipelines
where several stages of XSLT create loading problems.
Note that there is a JAXP-compatible java implementation of an STX
It might just work with our TraxTransformer right out of the box (don't
have time to try it today), but if somebody wants to run it and do some
comparison benchmarking between XSLT, I'll be *very* happy to hear about it!
Pluralitas non est ponenda sine necessitate [William of Ockham]