This is my Blog.

It's full of opinions on a wide range of stuff.

XSLT using Ruby

Short Story

libxsl-ruby is a nightmare to install. If you can indeed get it to install at all. I couldnt get the bloody thing to install at all on my 10.5 OSX box; and thats with ALL the required libs installed. I get the impression that its not very well maintained anymore and the project following has dropped off.

I turned to ruby-xslt - based on REXML, so yes, its slower. If your looking for speed then persist with the libxsl ruby path, but otherwise, save yourself a lot of time and just use this. Its vastly simpler!

Long(er) Story

Libxsl sucks. Strong statment I know. I would say im a fairly techincal chap, and ive just spent, nay, wasted, the last 3 - 4 hours trying to work out why libxsl-ruby wont install. Thats a bit of a bugger indeed. Who knows what the problem is, but ultimately its less portable due to reliance of the Gnome XML parsing libs. Granted there very fast, but thats no help at all if you cant even install them.

REXML vs Libxml is a non-contest. We all know libxml is significantly faster - if you need that speed then i strongly advise you to continue with libxml; it will pay dividends in the end. If however your not going to need very fast parsing, then really, save yourself a lot of wasted time and use REXML.

REXML is bundled with the ruby distribution, so its also a lot more portable that libxml2. Anyway, if your even still reading, stop now, and bosh this into your terminal:

<code>sudo gem install ruby-xslt</code>

Job done.

blog comments powered by Disqus