trans. (T. Onoma) wrote:
> On Tuesday 19 October 2004 04:22 pm, Florian Weber wrote:
> | On Oct 19, 2004, at 16:52 Uhr, trans. (T. Onoma) wrote:
> | > Nice. Thanks you for such a great reply! Very informative.
> | >
> | > Why do you avoid XSLT? Because it is slow? Or?
> |
> | you will run into tons of situations where xslt can't do what you
> | wanna do, because it's based on xml.. and when it's possible
> | you are either forced to duplicate code or using a even more
> | verbose way of expressing what you wanna do..
> |
> | well, and sooner or later its verbosity will also annoy the hell out of
> | you.
> |
> | personally i would never recommend anybody to use xslt if you
> | are not absolutely forced to or doing something very simple.
> 
> That's too bad. So there is no _worthy_ standard declarative XML 
> transformation language then? So much for standards. I will use Ruby. Thanks.

I find XSLT quite worthy in its own way.  It is a functional language, 
so you have to think in a different way to do looping and such.  But for 
most simple things it seems to be too much work, though.  If, for 
example, I want to take all foo elements and convert them to bar 
elements, REXML shines.  As might Regexp.

If I want to do conditional transformations based on element names and 
attributes, REXML is simple.  XSLT may be better for defining complex 
templates and patterns, as I have a hard time setting up state tracking 
past a certain level.  But maybe that's just me.

An advantage to XSLT is that it is (presumably) portable.  But I suspect 
that once people have settled on a platform and programming language, 
they are unlikely to switch down the line.  (As an aside, how many 
people have worked on projects where Java was selected because it was 
"cross-platform", yet there was never any foreseeable need to jump 
platforms, and indeed the development company had complete say over the 
development and production platforms?)

I would like to see an XML transformation lib in Ruby that helped solve 
most general cases, so that people would not have to rewrite essentially 
the same code.  REXSLT or something.  But so far, in my work converting 
between OOo XML and HTML, the Ruby code seems simple enough.  But I've 
not covered all transformation cases, and there have been times I 
thought XSLT might have been easier.



James


> 
> T.
> 
>