On Tue, 19 Oct 2004 22:28:27 +0900, trans.  (T. Onoma)
<transami / runbox.com> wrote:
> What's the preferred way to do XSL transformations?
> 
> Is their a reliable Ruby tool out there for the task? Or is there a fairly
> standard unix tool one uses?
> 
> Thanks,
> T.
> 
> 

On the commandline, you can use xsltproc or xalan. (I'm sure there are
others too). Both of these are apt-gettable in Debian. Xalan is from
the Apache Foundation. It's been pretty solid for a while now.

I've also seen these ruby projects floating around :)

http://raa.ruby-lang.org/project/ruby-xslt/
http://raa.ruby-lang.org/project/libxslt/
http://raa.ruby-lang.org/project/xslt4r/

Ruby-xslt looks to have had a new version was released just recently.
You'll probably want ruby-xpath to go with it too.

The examples make it look as easy as this -

  require 'xml/xslt'

  xslt = XML::XSLT.new()
  xslt.xmlfile = "fuzface.xml"
  xslt.xslfile = "fuzface.xsl"

  out = xslt.serve() 
  print out;

(This is also the libxslt-ruby package in Debian.)

I have to admit, though, that I tend to avoid XSL transformations
except in the direst of circumstances, instead using Ruby itself as my
transformation language (via the DOM, SAX, or REXML interfaces).

Just my two cents. good luck,
wad