That's more of a Sinatra question... Haml doesn't handle framework configuration. It just gets options passed in on a per-template basis.
On Wed, Sep 23, 2009 at 7:39 PM, Bill Turner <[email protected]> wrote: > > On Sep 23, 9:04 pm, Norman Clarke <[email protected]> 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 <[email protected]> > 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. > .. > > > > >> Thanks > > >> Bill > > > > >> On Sep 23, 2:26 pm, Nathan Weizenbaum <[email protected]> wrote: > > >> > There is no doctype defined for XHTML5; > > >> > seehttp:// > www.whatwg.org/specs/web-apps/current-work/#writing-xhtml-docu.... > > >> > What doctype are you trying to use? > > > > >> > As for the XML header, the only reason I could imagine for it not > being > > >> > displayed is if you're rendering the templates in HTML mode. > > > > >> > Bill Turner wrote: > > >> > > Hi folks, > > > > >> > > I'm relatively new to HAML, but I'm really liking it (and SASS). I > > >> > > have a peculiar issue that I'm trying to work out for my sinatra > app. > > > > >> > > I have the format set to html5, via: > > > > >> > > set :haml, { :format => :html5 } > > > > >> > > but is there a way to have the option for self-closing tags with > HTML5 > > >> > > along with the new HTML5 doctype? Even if I add the :autoclose to > the > > >> > > set command, those tags (like link) don't self close. > > > > >> > > set :haml, { :format => :html5, :autoclose => ['meta', 'img', > 'link', > > >> > > 'br', 'hr', 'input', 'area', 'param', 'col', 'base'] } > > > > >> > > Also, possibly related, on my .haml templates for XML files, the > !!! > > >> > > no longer will give me an XML header, none of these work: > > >> > > !!! > > >> > > !!! XML > > >> > > !!! xml > > > > >> > > Any ideas for either of these? > > >> > > Many thanks! > > >> > > Bill > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
