Three Monkeys, Three Typewriters, Two Days

April 29, 2004

SVG spec madness

It was claimed to me that the SVG 1.2 spec authors were mad. The evidence that was introduced was the SVGWindow interface and the socket API.

Based on this evidence, especially on the lack of a way to specify in which exact encoding that nice UTF-16 string is suposed to be sent to that socket (should it be sent as UTF-16? this is to be implemented interoperably?), on the attempt to expose the UA sheet (which need not even exist as a real CSS stylesheet!) to the page, on the addition of "window.evt" with its disastrous consequences for event handlers that trigger other events, on the addition of document.window, something that no UA implements, and with good reason, I have to agree that the SVG working group is indeed mad.

Stop reinventing the wheel to justify your own existence, folks, and focus on what SVG should be—a (possibly scriptable) vector graphics format. That's what the "VG" part is for, no? No need for sockets there. Let's not have SVG suffer the fate of MNG, lying unimplemented or very partially implemented because no one wants to drag about all the baggage it requires.

I would like to thank Ian for the illustrative examples of madness.

[Update: Ian points out that there is in fact a way to specify some sort of encoding on the socket thing. The spec doesn't say what happens if it's set, and setting it is optional. The spec doesn't say what happens if it's not set, of course.]

Posted by bzbarsky at 5:26 PM