Mike Macgirvin
Diary and Other Rantings
   
Saturday, Nov 22 2008, 06:41 am
Nov 25, 2005
XHTML compliance
I've been trying to make this weblog XHTML compliant. For those non-techies out there XHTML is the modern version of the HTML web 'language'. It's a dialect of XML which is .... oh nevermind. I guess this post is for techies.

The multiple articles per day had to be revisited because it seems that '+' is not allowed in a 'name' attribute. I use named anchors on the index page. These also aren't allowed to begin with numbers. Sigh. All my articles start with numbers. Fixed that. Found a table bug thanks to the XHTML validator .

But there are still some sticky wickets and pages of non-compliance data. All of these are in the articles themselves, which were created by the editor (design) mode of the web browser - in this case Firefox. So Firefox edit mode isn't even close to XHTML compliance. It's actually some of the ugliest HTML I've ever seen.  But wait - it gets worse. If you edit a page which is XHTML compliant, Firefox will gratuitously butcher it into non-compliance for you.

Which makes it particularly ironic that I wrote this weblog application primarily so I wouldn't have to type HTML in my diary any more. But if I want it to be standards compliant, I've got to dump the web editor and go back to typing (X)HTML.

For now, I'm only going to make the application itself XHTML compliant. Someday they'll fix the browser. No sense banging my head over and wasting hundreds of hours fixing somebody else's bug. 
Comments:

Keith Devens
November 25, 2005 04:46
Keith Devens
I use my markup library so that I can write my posts in StructuredText and the code generates XHTML out of it. The code's really messy, so you might want to consider something like PHP Markdown instead. Either way, it's better than typing XHTML manually.

mike (Mike Macgirvin)
November 25, 2005 09:33
[*TOP MEMBER*] mike
Thanks - I had already looked at your markup lib. It's more an issue of when the browsers are going to catch up - they're the forces behind XHTML, so when will they actually produce compliant markup on their own? Oh well, I found two problematic contructs. <br> with no closing slash, and the same with <img ...>

The img tag is the glaring example because Firefox will strip the trailing slash off compliant tags and leave them naked. It's one thing to generate an old style BR tag. It's quite another for an XHTML aware browser to rewrite a new IMG tag as an old one.

As it turns out, I managed to whip up a couple of regex's to fix both of these. That will get me by until the next fiasco. I just dislike using regex's to fix browser bugs.


Comments? | More Actions Open/Close menu
Nov 23, 2005
I've checked out a bunch of the major uber-blogs.
I've checked out a bunch of the major uber-blogs. Sticky apps designed to create social networks. Probably half of all US teenagers are on one of the things. It's mighty lonely being an old geezer in one of these places. You never get invited to anything of significance save perhaps an an occasional FBI sting. Why is an old geezer checking out sites where teens hang out? But I don't really care who's on the things, I'm just checking out the software.

I also figured out what was missing.

These sites appeal to youth because they're all designed around creating lists of 'friends' who all read and comment on their other friends. Us adults don't usually blog to socialize. How to turn a weblog into an indispensable tool? I know. Anybody want to start a software company?

Comments? | More Actions Open/Close menu
Nov 11, 2005
Don't get used to having titles...
Just because the software allows titles doesn't mean I have to use them. Never cared for 'em myself. It's just another piece of data of questionable value that has to be thought up and then stored somewhere.
Comments? | More Actions Open/Close menu
Nov 10, 2005
Multiple Entries
See what I mean? The reason for this is precisely because there are now categories. If one rants about ten different things in the course of a day, it isn't right to put it all into either one category or ten categories. They are ten different things - and each should have the option of being filed separately.
Comments? | More Actions Open/Close menu
Nov 10, 2005
Burning the candle from both ends
Lot of work the last couple of days... Software - the job that's never done. I've been catching up with the competition. Categories for the last few days. Today titles and multiple entries.   
Comments? | More Actions Open/Close menu
Nov 08, 2005
So you might notice that there's a 'Categories' heading over on
So you might notice that there's a 'Categories' heading over on the sidebar. I'm still testing but it looks like I've got categories now. I'll file this under 'software'. Note that you won't see much other category contents until I start going through history and assigning message categories on past messages.
Comments? | More Actions Open/Close menu
Answer a fool according to his folly, lest he be wise in his own conceit.
-- Proverbs, 26:5