Why I love and hate XSLT
XSLT is a good design, but it is not easy enough to use because the design is not good enough.
The basic design of XSLT is a good reason to love it:
- It is elegant.
- It is extremely powerfull.
And with version 2.0 it has gotten more beautiful with multiple transform sequences
and so many new useful functions.
However, the reasons for hate are not petty, even though they are in the details:
- All XSLT code looks the same.
- Navigating your code is difficult.
- You have to know the whole to understand the details.
- No high-level set-manipulation functions like XQuery.
- You can do everything but you have to write it yourself.
- No methodology for writing comments.
- No method for making source documentation.
Most people program XSLT through trial and error. While the language is mathematically
beautiful, when using it you go back to the stone age.
XSLT is assembler for XML manipulation.
However XSLT has one other good feature:
- You can use it to generate XSLT.
This is the feature I have used in a sub project called XSLT Jack to change XSLT into a high-level language. You learn a lot doing that, but I ended up going gaga debugging the code that generated the same language code from some input that was partially in that code.
