tags:

views:

188

answers:

2

Can anyone recommend an efficient method to execute XSLT transforms of XML data within a Ruby application? The XSL gem (REXSL) is not available yet, and while I have seen a project or two that implement it, I'm wary of using them so early on. A friend had recommended a shell out call to Perl, but I'm worried about resources.

This is for a linux environment.

+1  A: 

Try the "libxslt-ruby" gem. It depends on the "libxmlr-ruby" bindings for libxml library, which you probably already have installed if you're developing on Linux.

mislav
+1  A: 

I would recomment to shell out call to "xsltproc", which comes with the libxslt libraries in linux and does the work.

Or if you are using JRuby by any chance, then you have several xslt parsers for java that you can really really easily use from your ruby program.

Evgeny
My dev environment has JRuby thanks to Eclipse, but production I don't believe has it. The gem listed above I believe does the same shell out call, but I do not believe directly supports what I need, so may as well do it myself. :-)
Adam