git ssb

0+

Grey the earthling / gkn.me.uk



Tree: 42fd8897ab16ba7f6d7f843ba1695042431b025d

Files: 42fd8897ab16ba7f6d7f843ba1695042431b025d / content / weblog028.md

3923 bytesRaw

title: > Adventures in XML date: 2004-04-27 17:40 modified: 2004-06-07 18:40 status: published tags: XML, XSL, The Twaddle, KHTML, Moo­quack­woof­tweet­meow, Internet Explorer, XML Namespaces, validation, the Web


<p>
I did manage to get the XML+XSL-based jiggery-pokery for The Twaddle working - quite nicely, actually. Getting the entire contents of the content field onto the page took a little bit of effort, as described <a href="http://forums.mozillazine.org/viewtopic.php?t=71322&sid=7848e3b9bfb83d57adacdde5f19433e9">on the mozillaZine forums</a>. </p>
<p>
I won't be implementing this on The Twaddle, though - for a start, Opera and KHTML don't like XSLT. And it's not half as accessible for non-standard browsers (relics, mobile devices, text browsers...) as plain, extraneous-menu-items-and-such-written-into-the-article XHTML is. Nonetheless, a working example is online for the time being. </p>
<p><ins>
Update: the real thing's gone live... sort of... so the prototype has been removed. Additional related blurb is contained in <a href="/weblog035">a later entry in this weblog</a>. </ins></p>
<p>
There's a slight chance that I might implement an XML-driven article system on Mooquackwooftweetmeow, where I'm not too fussed about <a href="http://microsoft.com/ie">old and/or buggy browsers</a>. The fact that mobile devices won't render the page is more of a concern. </p>
<p>
Perhaps some way of pulling in external XHTML fragments could be handled in CSS3? Then again, why duplicate XSL functionality in CSS - small devices' browsers could just be taught to handle XSL. </p>
<p>
One more Twaddle-related thing: thanks to <a href="http://www.quirksmode.org/css/condcom.html">Internet Explorer conditional comments</a> (on which MSDN has <a href="http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp#Conditional_Comments_Terminology">an hilarious article</a>), I'm now feeding IE users <a href="http://purl.org/thetwaddle/home/index.html#spur">some nice propaganda in the foot of the front page</a>: </p>
<p>
<q>You're using Internet Explorer?! You do realise that it's years out-of-date, and screws up most modern web pages, don't you? In fact it's screwing this one up right now and you don't even know it. Try <a href="http://www.mozilla.org/products/firefox/">a proper web browser</a> instead.</q>
</p>
<p>
Oh, and another tiny little piece of The Twaddle-related trivia: the version number on the front page is now in the title text of the <a href="http://purl.org/thetwaddle/home/index.html#copyright">copyright notice</a> - it's tidier and it leaves room for a pointless codename. </p>
<p>
Over to the Mooquackwooftweetmeow Weblog now, where, thanks to our old friend XML namespaces, and our newer friend <a href="http://forums.mozillazine.org/viewtopic.php?t=71322&sid=7848e3b9bfb83d57adacdde5f19433e9">the XSL <code>copy-of</code> element</a>, proper links are now in use. I've gone back through the weblog and updated plain text URLs to be links. The more observant of you will have noticed that there have been a smattering of links throughout this post - that'll be the norm from now on. </p>
<p>
The even more observant of you will have noticed line breaks as well. I'd use paragraphs but the XSL stylesheet inserts the content into a paragraph - I don't think the <a href="http://validator.w3.org">XHTML validator</a> would like paragraphs within paragraphs (not that it'd like this Atom file at all...). And I don't think the site's CSS would like <code>div</code>s to hold the text, in place of paragraphs; it might - I just haven't looked at mqwtm's CSS in ages so I can't remember. Besides, line breaks are lighter on the markup than open-and-close <code>&lt;xhtml:p></code> tags. </p>
<p>
And in a final twist of XMLish loveliness, I've chucked a few XHTML <code>&lt;code></code> tags in as well. </p>
<p>
<code>&lt;/epic></code>
</p>

Built with git-ssb-web