XSLT on DreamHost

software development

#1

I’m looking to start using XSLT for a new project. It sounds like XSLT is not supported in DreamHost’s configuration of at least some scripting languages (such as PHP5).

Has anyone had any luck getting XSLT to work here at DreamHost? If so, can you give a brief overview of your setup?

(I’m interested in hearing about any programming language, even if it involves installing some stuff (though I’m not using a dedicated server), but I’d prefer to use whatever DH has already installed where possible.)

Thanks!
Erik


#2

Replying to my own post…

I just got XSL going with PHP5. I’d still like to hear about other peoples’ experiences using other languages (especially Ruby, since I’ve been asked to learn something about Ruby at work), or even other PHP configurations.

Anyhoo, here’s what I had to do to get XSL working with PHP5:

  1. Enable PHP5. The default (on my account at least) was PHP4. I enabled it using the instructions on the DreamHost wiki.

  2. Use PHP’s XSL support, like this:

<?php $xsl = new XSLTProcessor(); $xsl->importStyleSheet(DOMDocument::load("foo.xsl")); echo $xsl->transformToXML(DOMDocument::load("foo.xml")); ?>
That was it! Now all I have to do is learn PHP…