Can HAML in Ruby on Rails output HTML attributes in an "ordered hash"?
For example, if you use haml:
%html{'xmlns' => "http://www.w3.org/1999/xhtml",
'xmlns:og' => "http://ogp.me/ns#",
'xmlns:fb' => "http://www.facebook.com/2008/fbml"}
conclusion:
<html xmlns:fb='http://www.facebook.com/2008/fbml' xmlns:og='http://ogp.me/ns#' xmlns='http://www.w3.org/1999/xhtml'>
which is in a different order. Is there a way to do this in this order?
(using Ruby 1.9.2 and Rails 3.0.6)
Update 1: although in HTML the order of the attributes doesn't matter, but in some cases I just want to keep track of what the spec says. Who knows what their parser does, and whether it uses some kind of regular expression to ensure that people following the specification will comply, but will not follow the specification will not match due to an βerrorβ that they use regular expression to parse.
2: , , - ? HTML. , .