I would like to know what of the many XSLT engines out there works well with Perl.
I will use Apache (2.0) and Perl, and I want to obtain PDFs and XHTMLs.
I’m new to this kind of projects so any comment or suggestion will be welcome.
Thanks.
Doing a simple search on Google I found a lot and I suppose that there are to many more.
- http://www.mod-xslt2.com/
- http://xml.apache.org/xalan-j/
- http://saxon.sourceforge.net/
- http://www.dopscripts.com/xslt_parser.html
Any comment on your experiences will be welcome.
First mistake – search on CPAN, not Google 🙂
This throws up a bunch of results, but does rather highlight the problem of CPAN, that there’s more than one solution, and it’s not always clear which ones work, have been abandoned, are broken, slow or whatever.
And disturbingly, the best answer (or at least, one of the best) comes up on page four of the results 🙁 As other folks have suggested, XML::LibXSLT is robust and does the job:
If you want to output results to a file then add this
If you don’t want to do anything fancy, though, there’s XML::LibXSLT::Easy, which essentially just wraps the above in one method call (and does a bunch of clever stuff behind the scenes using Moose. Check the source for an education!).