Walking

Wait a minute. I remember asking about this. Ian actually advocates against using application/xhtml+xml for XHTML pages; instead, he supports the use of text/xml. And, as he points out in the appendix and Mark Pilgrim does in his article, UAs (browsers to the rest of us) that support XHTML sent as application/xhtml+xml all support XHTML sent as text/xml too. As an added bonus, this means that TrackBack code can now be validly inserted into the file instead of hacked in inside comments.

Off to update my templates and CSS, and track down those nasty character entity references.

[Later: D’oh! First post in valid-XHTML-land and it gets screwed up by a macro expansion inside an attribute. Worked around in anticipation of a fix.]

[Even later: Following Ian’s comment, I’m back to the original application/xhtml+xml. My thoughts on text/xml allowing TrackBack inline actually still apply. And I’m still trying to figure out Pingback for Movable Type, based on Stuart Langridge’s code. Perhaps Stumbling would have been a better title.]

Baby steps

Mark Pilgrim has updated his site based on recommendations from Ian Hickson on building a perfect Web log. Following some of their lead, I’ve added the first bit of browser checking to my site using Apache’s mod_rewrite. The module has always scared me, but using what amounts to an identity rewrite I’ve managed to dynamically change the MIME type returned for my weblog pages. Here’s how it works.

RewriteEngine on

This line turns on the rewriting engine for the current directory and all subdirectories below it.

RewriteCond %{HTTP_USER_AGENT} ^Mozilla/[5-9].* [OR]
RewriteCond %{HTTP_USER_AGENT} ^Amaya/[5-9].*

These two lines define the conditions where the following rule will apply. They look at the HTTP_USER_AGENT variable (i.e. the User-Agent: field in the HTTP request) and check that it begins with Mozilla/ or Amaya/ followed by a major revision that is known or presumed to support the correct MIME type for XHTML files. (I’m working under the assumption that if it’s supported in an earlier version it will continue to be supported in a later one.)

RewriteRule ^(.*)\.html$ - [T=application/xhtml+xml]

Finally, I add the rule itself: any file that has the extension .html gets mapped to exactly the same name. By itself that’s useless and just wastes cycles on each request… except for the T= field that resets the MIME type, which was the original goal.

Easy peasy.

Right now, all of these lines are in a .htaccess file in the weblog directory. If/when I update the rest of the site to a version of XHTML (most of it has been, but I’m not confident enough to switch completely yet), these rules will migrate to my global httpd.conf.

Sundries

Responsible

Above all others, there are five people to be held responsible for my having any delusions of having the ability to write.

  • Robert Enns.
  • John Burke.
  • Colette Smith.
  • My parents.

All five of the above are teachers; the first three are specifically English teachers, and the latter two teach French, Spanish and other languages. More on all of them another time.

I’ve been finding it hard to update here regularly, but my desire to write has been rekindled by my friend Kym, in various different ways. Thanks Kym!

Writer

It’s intimidating to discuss writing with someone who’s been doing it for more than 15 years, particularly when my recent experience in the field is limited to less than eight months of short blurbs like this one, but I had another chance to do so tonight with my new writer friend. I love to hear the pleasure in her voice when she talks about her craft. Even her frustrations have a quality to them that says she loves what she does.

Were I any good at thinking on my feet, I’d have told her that. Perhaps I just have.

Taxonomy

I think it’s time for two new categories, Personal and Writing, but I don’t want to call them by those names. I’m now accepting suggestions for pithy quotations for each category and a short excerpt for the name. (Even I found Of all those arts in which the wise excel, Nature’s chief masterpiece is writing well–category title Nature’s chief masterpiece–from the Duke of Buckinghamshire Sheffield’s Essay on Poetry too pretentious for my little chunk of cyberspace.)

Come together

SONICblue and TiVo have dropped their mutual patent infringement lawsuits: We believe our energies are better spent expanding the market for Digital Video Recorders (DVRs) rather than fighting each other… the overall success of the DVR category is what is most important to the companies at this time.

I was all ready to post some snarky comment about how DVR will never go anywhere because the competitors just aren’t partisan enough, but my heart’s just not in it. Instead, bravo to two companies who recognize that cooperation can be more productive than litigation.