Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Wednesday July 13, 2005
07:46 PM

Dipping a toe in the cold XSLT water

[ #25690 ]

In working with the code for Bricolage 2.0, we need a convenient way for Web services to work. SOAP is awful, so we're ignoring it for now in favor of REST. REST is rather easy to use and, unlike SOAP, allows us to generate content that is ridiculously easy to parse. In fact, today I am writing my first XSLT stylesheet. By including a reference to that in the REST response, XSLT aware browsers can browse our object datastore without me having to write a single line of code. In fact, I had started writing code that would allow the user to request HTML instead of XML, but now that I know to include the XSLT link, this is transparent.

After playing around with this for a bit, I discovered a slight bug in my server code just by clicking around through a test database in the browser. Mighty cool! Now I know why XSLT is such a hot technology.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • If you need to author XSLT, I highly using GNU Emacs together with nxml-mode []. There really is no better XML authoring environment. It validates as you go, highlighting errors in your file with a red line underneath. And it has completion of valid elements/attributes at the cursor. It rocks.

    Funnily enough, it was written by James Clark [], who was also one of the main people behind the XSLT spec.


  • XSLT can easily blind someone with its excessive verbosity and the painful lack of string munging (the exact opposite of Perl, I suppose). But the tree manipulation language at the core is elegant and the XPath language underpinning it is deeply beautiful. I’ve been hacking XSLT for a while, and I love it.

    I’ve been toying with the idea of using the possibility to easily register extension functions with XML::LibXSLT [] to make Perl’s string munging available to stylesheets. Of course, that