Perl may not be as well known as some of the other languages, but it boasts a powerful library of packages and modules that everyone can use to work with XML. In this article, Harish Kamath explains how to get started with the "XML::XSLT" package that allows you to transform XML documents by using XSLT style sheets using Perl.
When it comes to Perl, all roads lead to CPAN -- or one of its mirror sites!
After a quick search for Perl modules that implement the XSL Transformations specification, you’ll realize that you have several options. The reason is simple: the open standards, as defined by the World Wide Web consortium, give total freedom to programmers to develop their very own implementation.
Coming back to CPAN, I’ve listed a couple that I found:
Implementations such as XML::Sablotron leverage other languages to deliver faster performance. However, being a core Perl fanatic, I’ll concentrate on the XML::XSLT module, as it is coded entirely in Perl, our favorite language.
After a quick review of the installation instructions, you’ll learn that the XML::XSLT module requires your Perl installation to have some packages already installed. These include XML::DOM, XML::RegExp and XML::LWP, among others. Note that this list is not exhaustive; the modules that you may have to install will vary depending on the modules that you’ve already installed. It may be handy to have your neighborhood Perl guru guide you through the installation process.