XSLT transformations: "more than meets the eye"

A few months ago, my department head had encouraged us to learn about XML stylesheets and XSLT transformations. After picking at it here and there, I finally had my breakthrough with it this weekend. Of course, were I more patient, I could have gotten paid to do this at work tomorrow.

As usual, the majority of the work is in finding examples and explanations that speak to me. This thread was particularly helpful.

One of the biggest breakthroughs – as embarrassing as it is to admit – was my realization that one needed an XSLT processor to actually create a new XML document based on the instructions provided in the stylesheet.

I've been experimenting with both the Saxon and Microsoft processors. Rather than run them from the Windows command prompt, I've been using the command line interface in the jEdit text editor. There's a built in XSLT processor plug-in with jEdit, but I couldn't get it to work, hence the use of the aforementioned methods.

If I understand correctly, one of the uses of this will be to take XML data about audio files generated from the JSTOR/Harvard Object Validation Environment (JHOVE) and map the pertinent information to another schema/XML document. That's a bit out of my league right now, but a modest start is yet a start.

I'll also be interested in using transformations to make customized XML documents from MusicXML sources and Zotero exports. Admittedly, I have no real ideas as to what I'd need to do this for, but I simply have a hankering to think of related projects. Maybe pulling the lyrics out of a MusicXML document into a TEI verse document?

--------------

Related Content:

1 Comment

  1. nitin

    I forgot to mention a very practical use of XML stylesheets. And that's getting an XML document to display as tabular HTML so that the HTML display of the XML can be pasted into OpenOffice Calc, which unlike Excel doesn't natively import XML – far as I know.

    For more info, see:
    http://blog.humaneguitarist.org/?p=71

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*