The end for XHTML?
Tim Berners-Lee just dropped a bomb.
It’s hard to see this as anything but the W3C caving to pressure from WHAT WG. There has obviously been tension between the XHTML2 and HTML5 camps, but they occupied seperate niches; HTML5 was about application interfaces and XHTML2 was about hypertext documents.
Given (a.) the current backlash against XHTML, (b.) the popularity of web applications (and (c.) my eternal pessimism), I suspect that hypertext documents will get the short end of the stick. Along with everyone who hates the idea of a Web of walled gardens.
I don’t like the sounds of this. Should be interesting to watch, I guess.
Update: Aristotle Pagaltzis says exactly what I’m thinking.
data: URIs in Ruby
Anne van Kesteren’s got a cute little demonstration of <canvas/>. I particularly like the idea of saving something to a data: URI; one of those cool little things about the Web that doesn’t get much attention.
I also like favicons, and not having to use a general-purpose image manipulation program to create them. Hence, a teeny-tiny Camping mount which will convert an image/png data: URI into a favicon (example). At its heart is a class for handling data: URIs that goes something like this:
module URI
class Data < Generic
attr_reader :mime_type, :data
def read; data; end
def initialize(scheme, userinfo, host, port,
registry, path, opaque, query, fragment)
super
notdata, data = opaque.split(",", 2)
match = URI.decode(notdata).match(/^(.*?)(;base64)?$/)
@mime_type = match[1]
if @mime_type.empty?
@mime_type = "text/plain;charset=US-ASCII"
elsif @mime_type[0] == ?;
@mime_type = "text/plain#{@mime_type}"
end
@data = unless match[2].nil?
Base64.decode64(data)
else
URI.decode(data)
end
end
end
@@schemes["DATA"] = Data
end
It’s not a complete implementation of RFC 2397; some legitimate URIs (eg. data:text/plain;charset=iso-8859-7,%be%fg%be) can’t be parsed without fiddling around with uri.rb’s internals.
(BTW, the favicon is much shrunken from Paintr’s canvas; you’ll have to go over your lines several times to get something you can see.)