« using radio outliner | Home | dreams about a book database »
April 14, 2002
The Road To W3C Validation
The Road To W3C Validation. In my never ending quest for better cross browser / cross platform compatibility (I still haven't solved the radioScan JavaScript issue), I tried to achieve full HTML 4.01 and CSS 2.0 compatibility as defined by the W3C validators. s l a m now proudly proclaims its W3C standards compatibility at the bottom of each regular page, but it took a lot more work than I expected. The only benefit so far is that s l a m pages load noticeably faster in Mozilla. My most common mistake: all IMG tags must must have an ALT="description" attribute to be HTML 4.01 compliant. I had neglected this in most of the pictures included in my posts. Second most common mistake: the & is a reserved HTML character, it defines an entity. It cannot be used anywhere in a non entity definition role, including in the cgi part of url links. I had to replace all http://blabla/cgi?p1=foo&p2=bar kind of links by http://blabla/cgi?p1=foo&p2=bar. Third common mistake: for some reason, I had used a (much deprecated) NOSHADOW attribute to the HR tag, which doesn't work in HTML 4.01 since all attributes must have arguments between quotes (noshadow="noshadow" might have worked). And now for the fun part: I had to do a little strictly 'non-kosher' tweaking of the radio.root and weblogdata.root tables, since some of the code and data called from Radio publishing templates is not HTML 4.01 compatible.
- system.verbs.builtins.radio.html.commentLink:
Replaced &p by &p in the definition of commentPageUrl.
- system.verbs.buitins.radio.weblog.render:
Changed &c by &c if adrblog^.prefs.flCommentLinksEnabled in bodytext for the commentCount script tag.
- In weblogData.root:
In the archiveLinkImgTag string, added an alt="Permalink" attribute to the img tag.
In itemPermaLinkImgTag, modified the calling macro like this:
<%radio.macros.imageref ("images/woodsItemLink.gif",\ "",\ "",\ "",\ "",\ "Permalink")%>.