On Sep 23, 9:04 pm, Norman Clarke <
com...@gmail.com> wrote:
> Rather than "!!! 5" it might be better to have something like
> :self_closing => true which is always false for HTML4, always true for
> XHTML, but can be set to true or false for HTML5.
I think this is a better option. Since there may be fewer that want to
use the self-closing tags. Would it make it easier to add this type of
option?
> > As for the XML header, I'm still not sure why that isn't working. What
> > framework are you using? Are you sure you aren't rendering the Haml with
> > :format set to :html5?
I do have set :set haml, :format => :html5 in the configuration for my
sinatra app. And for most of what I'm doing that's perfect, but on two
items (rss/xml feed and xml sitemap, I need XML formatting. Is there a
way to override the :html5 global setting? Something like this:
get '/sitemap.xml' do
haml :sitemap, :layout => false, :format => :xml
end
Thanks for your help and input!
Bill
>
> > On Wed, Sep 23, 2009 at 3:17 PM, Bill Turner <
billtur...@gmail.com> wrote:
>
> >> The new doctype for HTML5 is this:
>
> >> <!DOCTYPE html>
>
> >> And haml correctly displays this (with no code changes from me), when
> >> using set :haml, { :format => :html5 }, and using !!! at the top of my
> >> haml layout file. That part works fine, but I'd like to combine that
> >> doctype with xhtml syntax - which is essentially xhtml5.
>
> >> As for the second item, is there a way to force the rendering mode to
> >> be XML? I'm using:
>
> >> haml :sitemap, :layout => false
>
> >> and the !!! seems to be simply ignored.
>
> >> Here's a little more info on the html5/xhtml5 doctype (and syntax):
>
> >>
http://www.hagenburger.net/2009/03/html5-xhtml5-with-css-for-safari-f...