Go watch Magnolia. Now. It's a masterpiece.
March 2004
Annoying discovery of the day: The W3C validator doesn't pick up missing character entity end delimiters (;) for HTML. Since I've always validated against the HTML standard (specifically, HTML 4.01 Strict), I've always been blissfully ignorant of this, but as I'm converting all my documents to XHTML (because of MathML) I'm haunted by "reference not terminated by REFC delimiter" errors. Now, the validator doesn't do anything wrong with not picking these errors up, as REFC delimiters are optional in SGML but required in XML (and it does pick them up when validating against any version/flavor of XHTML). These errors are my own, but I'm a little annoyed about how lenient SGML is...
I once tried to get MathML working, to no avail. Now I see why; I sent it as text/html when I should have been sending it as application/xhtml+xml, which is the proper MIME type for XHTML. With this knowledge, I put up a MathML test suite, where I'm basically playing around with MathML.
Now, IE users trying to retrieve documents sent as application/xhtml+xml will be prompted to download it, which means that I, even though it's not even my fault that IE sucks, have to find a way to send it as text/html to IE and application/xhtml+xml to everything else (unless I find out that there's another browser out there that can't handle the application/xhtml+xml MIME type correctly). I'm this close to just sending my documents as application/xhtml+xml to everything, and in the process ban IE users from my site. Is that smart? No. Is it tempting? Hell yes!
IE is the bane of my existence...
Let's have a little look-see at XHTML 2.0, shall we?
First up, we have <blockcode>. This will come in handy, since it beats <code class="block">. (<code> is an inline element by default.)
Then we have the <section> and <h> elements, and the suggested deprecation of <h1> through <h6>. A basic document structure in HTML:
<h1>Main title</h1>
<p>First paragraph of the main title.</p>
<p>Second paragraph of the main title.</p>
<h2>Sub title 1</h2>
<p>First paragraph of first sub title.</p>
<p>Second paragraph of first sub title.</p>
<h2>Sub title 2</h2>
<p>First paragraph of second sub title.</p>
<p>Third paragraph of the main title.</p>
But wait a minute. How do we know that the last paragraph "belongs", if you will, to the main title? With XHTML 2.0, you'd nest <section> elements. The level of nesting indicates the importance of the <h> embedded somewhere in there, thus allowing arbitrary levels of headings (no longer restricted to six levels):
<section>
<h>Main title</h>
<p>First paragraph of the main title.</p>
<p>Second paragraph of the main title.</p>
<section>
<h>Sub title 1</h>
<p>First paragraph of first sub title.</p>
<p>Second paragraph of first sub title.</p>
<h>Sub title 2</h>
<p>First paragraph of second sub title.</p>
</section>
<p>Third paragraph of the main title.</p>
</section>
There. Now the last paragraph has a proper parent. Or sibling, depending on how you view it.
I don't yet know where I stand on the deprecation of <h1> through <h6> issue. On one hand, it would be nice to be able to choose your style. On the other hand, XHTML 2.0 isn't supposed to be backward compatible with any previous version of HTML or XHTML (HTML 2.0, HTML 3.2, any flavor of HTML 4.0 and HTML 4.01 (Strict, Transitional and Frameset), XHTML Basic, any flavor of XHTML 1.0 (Strict, Transitional and Frameset) and XHTML 1.1).
Oh, and <l>, which stands for line. This'll be used to mark up lines of text, like a poem or a piece of computer code. Doing it like this (as opposed to using <br>), will allow you to automatically add line numbers. To quote the specs:
"By retaining structure in text that has to be broken over lines, you retain essential information about its makeup. This gives you greater freedom with styling the content. For instance, line numbers can be generated automatically from the stylesheet if needed."
It's pretty cool, but you can do something similar, today, in HTML, using list items and some CSS. Check out Simon Willison's Numbered Code Listing Experiment.
<q> is now <quote> and it's now the author's responsibility to add quote marks, not the UAs'. Otherwise, there are no differences between the two.
This is far from a comprehensive look at XHTML 2.0, it's just scratching the surface a little.
Added quotes from NOLF. Onward to NOLF2.
Went through the Archived News and deleted the title attribute of every <acronym> element whose acronym was already defined at the first occurrence in a given post. Eh, what I mean to say is, only the first occurrence of an acronym in a post has its title attribute set. This makes my posts appear cleaner, without all those pesky dotted underlines for each and every single acronym.
The clouds are gone, the sun is here... I reckon I should re-assemble the ping-pong table and play some ping-pong! ("Heh, he said table.")
Stupid realization of the day: Floats in CSS potentially span several elements, depending on whether they need to or not. At first I found this weird, but upon further pondering it made perfect sense. You see, that's the behavior you'd expect most of the time. Want it to keep its place within the containing element? clear to the rescue.
Drawing overlapping vectors sucks. I can't find a suitable way to do it! Currently, I use curly braces to mark sections along the line, but this is far from optimal. Especially with more than two overlapping vectors.
There are 7 posts for March 2004.