August 23, 2004

XML in an XXL size

Just got back from another terrific evening of quality presentations at a Melbourne Web Standards Group meeting, and am all excited with geek energy and am eager to rush off and play with all the technologies that were introduced tonight.

XML and XSLT

Browsing the web, occasionally you come across these acronyms that look familiar, but you never quite know what they mean. CSS was one of those obscure ones that never really took off until a bloke named Jeffrey Zeldman rallied the browser makers to make their browsers follow the standards for displaying CSS, and another bloke by the name of Dave Shea went and made something called the CSS Zen Garden, which blew everyone's mind.

And now everybody's doing it. Because of sites like the garden and Paul Scrivens' CSS Vault your site is officially uncool if it doesn't use CSS for its layout.

CSS separates a document's content from its presentation. Well, it mostly does. The format of the document is still bound by the constraints of HTML tags, and while it is often reasonably readable (for those prepared to view the page's source), there is still usually a bunch of stuff that you need to do to satisfy the quirks of a pure CSS layout. Things like meaningless tags, line breaks and invisible horizontal rules all detract from the ideal of pure semantic markup. Add to this the complexity of pulling data out of a database and you end up with a phrase that I still remember from my uni days - tight coupling. Layers which should be completely separate end up relying on each other more than you would like.

And yet all of this is still better than anything Frontpage or Dreamweaver would generate.

This is where XML steps in. The X stands for eXtensible which basically means you can make your own tags. Instead of umming and ahhing over whether you should represent a menu using a <ul> tag or a <dl> tag, you just make up a <menu> tag and that is that.

And then you write some templates which convert your semantically ideal content into the (X)HTML file that you want to display. These templates are called XSLT (eXtensible Stylesheet Language Templates). They list all the rules for taking your XML and generating HTML pages, so that we have true separation of content and presentation.

And that's just plain cool.

Thanks to the very knowledgable Woric for a well-explained introduction to this topic, and kudos for persevering despite a virus shutting his laptop down halfway through! You can find out more at Woric's site.

There is no Dana, only XUL (pronounced "Zool")

The other geeky acronym which got a run tonight was eXtensible User-interface Language, or XUL. I had no idea that the Mozilla browsers were all written in this language, which is just another flavour of XML, but they are. So there.


What that means is that if you have downloaded the Mozilla Firefox browser like I told you to recently, you have an entire platform on your machine to create and execute entire programs, without having to compile them or run them within the page area dictated by a browser.

That is, real software applications that go beyond just a web page.

Even though they are described in the same plain text format used for the web (XML, CSS & Javascript) these applications could include all sorts of things like tabbed windows, buttons, text fields, snazzy lists and all of the user interface components that we come to expect in the programs that we use every day. Word, Excel, heck even Internet Explorer itself could have been written in XUL.

In fact, like I said, Firefox itself is.

You can poke around the various directories in the Firefox install and see for yourself. There is some binary code but inside the "chrome" directory there is a whole stack of text files that you can go and change to your heart's content. Change the Firefox logo, change the menu structure, do what you want.

Just don't complain to me when you break it!

Huge thanks to Nigel McFarlane for his informative and passionate speech, made all the more entertaining by the numerous Microsoft jabs and various comments like "Look what's in this directory! A whole heap of rubbish, you could play for hours!"

Oh and I am happy to give him a plug because he is a nice guy - if you do want to have a play under the hood with Mozilla and XUL, I recommend you buy Nigel's book as he is the authority on the matter. And if he writes with the same flair that he presents it is bound to be an entertaining read.

Posted by mattymcg at August 23, 2004 11:46 PM
Comments

It's becoming nerd central around here. If only I had as many good things to say about a subject. No Dana. Very funny!

Posted by: Hammy at August 27, 2004 09:46 PM

Cuz, your website's becoming a bit beyond poor me! I'm not critical of your posts as I'm all for you getting right back into your computers, but if you could still slip in the odd toilet humour poos and wees type of post for me (or the odd cartoon again!) that'd be great! Cheers bro!

Posted by: Nick at August 29, 2004 07:29 PM

Hello! I like this blog almost :-) as much the 35-degrees (Iīm an IT person myself, but her stuff is so great, no one can compete). Still, I will come back and hunt for good web advice when I start working on a somewhat more presentable web presence than I have now.
One question: Why canīt I "Pull the strip open" ? It really ought to do something!

Posted by: Ferit at August 30, 2004 07:24 AM

Hammy: Glad you enjoyed the Ghostbusters reference.

Nick: Will try and pull out some toilet humour just for you mate. I know I always say this, but there is a redesign coming one day which will categorise things better, so you can pick and choose based on which categories you're interested in.

Ferit: You're right, Kinki is a tough act to follow (I should have never installed Movable Type for her, dammit!) She is so diligent with her photos and I just can't/don't make time to post as frequently. It is what it is.

Posted by: mattymcg at August 30, 2004 08:49 PM

"It is what it is" is it? Now, where have I heard that before...

Posted by: Kinki at September 2, 2004 06:44 AM

Oh, and thanks Ferit for your complimentary words - really, the only reason I'd ever produce good work is because of my geeky muse - aka Husband.

Posted by: Kinki at September 2, 2004 06:46 AM