More on Firefox SVG

Since I wrote my 'First Impressions of Firefox 1.5B1', Jeff Schiller has written a 'Guide to Deploying SVG with HTML', with some workarounds for differences between the Firefox and Adobe views of how compound documents work. He has also linked to the Compound Document Formats working group at the W3C, whose mission is to sort out some of the confusion caused by the glib assumption that we can just mix XML document formats together and Namespaces will sort it out.

He also mailed me a pointer to SmilScript, a JavaScript library (available under the Artistic licence from Vectoreal) that scans your SVG file for SMIL declarations and then goes the specified animation itself using the time-honoured JavaScript methods involving timers and mutating the DOM. Alas! for at least some of my existing SVG files (such as the Flickr badge shown on my home page), this will not yet provide the whole answer---I use features like the keyTimes attribute that SmilScript does not understand (yet).

In the meantime, I have belatedly changed my Flickr badge so that in the absence of any declarative animation, it shows the most recent image. This is way better than just showing a black square!

Update (10 Dec.). To get rid of the gratuitous scrollbars (Mozilla bug 288276), I have munged the SVG for the Flickr badge so that it starts with

<svg xmlns="http://www.w3.org/2000/svg" 
    xmlns:xlink="http://www.w3.org/1999/xlink" 
    viewBox="0 0 200 200" width="100%" height="100%">

in other words, its natural height and width are both 100%. This causes it to display correctly in Firefox 1.5, and hopefully won't break it in Adobe SVG Viewer. It also means that if you right-click and choose This Frame → Show Only This Frame (Firefox) or View SVG (Adobe), then you see a gigantic badge (full window size) rather than a more reasonable size. But that is not much of a problem.