The Fugue Counterpoint by Hans Fugal

19Aug/071

Camping XHTML

I have a little Camping toy, and I decided to
play a bit with MathML to render a few simple
equations. I read the insructions and played
around with a static file and found that all I needed was to use XHTML and
everything would Just Work™.

Until I tried to do it in Camping. I'll spare you the boring details and cut to
the chase:

def layout
  @headers['Content-Type'] = 'application/xhtml+xml'
  xhtml_transitional do
    body { self << yield }
  end
end

The trick is getting the MIME type right.