I'm implementing Schema microformats on a Ruby project using HAML and can't figure out how to set an empty attribute on a tag. I tried nil and false, but they simply do not shown.
Example: <div itemscope>
I'm tring to set an empty itemscope attribute.
Code added from comment by @StrangeElement:
My code:
.agency.premium{:itemscope => true, :itemtype => 'schema.org/ProfessionalService';}
:itemscope => true
seems to be the recommended approach from HAML's documentation. I get the same result as I would get with :itemscope => ''
, a XHTML-valid attribute with an empty value (i.e. <div itemscope="">
).
Probably fine, but I'd rather have it empty as is documented in the Schema doc.