The Fugue

Counterpoint by Hans Fugal

Camping XHTML

Posted by Hans Fugal Sun, 19 Aug 2007 23:53:16 GMT

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.

1 comment | Tags , , , | atom

Comments

Leave a response

  1. Don Park
    7 months later:

    just what I was looking for! thanks!

Leave a comment