On Wed, Jul 1, 2009 at 1:42 AM, Dmitriy Sintsov<questpc(a)rambler.ru> wrote:
XSLT itself is a way too much locked down - even
simple things like
substrings manipulation and loops aren't so easy to perform. Well, maybe
I am too stupid for XSLT but from my experience bringing tag syntax in
programming language make the code poorly readable and bloated. I've
used XSLT for just one of my projects.
Juniper Networks (my day job) uses XSLT as the primary scripting
language on their routing devices, and chose to do so primarily
because of sandboxing and the ease of XML tree manipulation with xpath
(JunOS configuration has a complete and comprehensive XML
representation). To facilitate that usage we defined an alternative
syntax for XSLT called SLAX (http://code.google.com/p/libslax/
though it hasn't seen widespread adoption outside of Juniper yet.
(Slax can be mechanically converted to XSLT and vice versa)
SLAX pretty much resolves your readability concern. Although there are
the conceptual barriers for people coming from procedural languages to
any strongly functional programming language still remain.
You don't loop in XSLT, you recurse or iterate over a structure (i.e.
I've grown rather fond of XSLT but wouldn't personally recommend it
for this application. It lacks the high speed bytecoded execution
environments available for other languages, snf I don't see many
scripts on the site doing extensive document tree manipulation (it's
hard for me to express how awesome xpath is at that)... and I would
also guess that there are probably more adept mediawiki template
language coders today than there are people who are really fluent in