intertwingly

It’s just data

Using the Genshi HTMLSerializer with Venus


Genshi’s HTMLSerializer makes it drop dead simple to create an xhtml2html filter for Venus.  Such a filter drops all SVG, MathML, and trailing slashes on void elements.

With this in place, I’m exploring a new approach for serving Planet Intertwingly:

AddType application/xhtml+xml .html xhtml5
AddType text/html .html5
AddCharset utf-8 .html .html5

RewriteCond %{REQUEST_FILENAME} \.html$
RewriteCond %{HTTP_ACCEPT} html
RewriteCond %{HTTP_ACCEPT} !xhtml
RewriteCond %{REQUEST_FILENAME}4 -s
RewriteRule (.*)\.html$ $1.html5

RewriteCond %{REQUEST_FILENAME} /$
RewriteCond %{HTTP_ACCEPT} html
RewriteCond %{HTTP_ACCEPT} !xhtml
RewriteCond %{REQUEST_FILENAME}index.html5 -s
RewriteRule (.*) $1/index.html5

Additionally, the XHTML5 and HTML5 versions of this page can be viewed directly.