schroedi
http://www.poppster.de
http://haml.hamptoncatlin.com/docs/rdoc/classes/Haml.html
Quote:
Brackets represent a Ruby hash that is used for specifying the
attributes of an element. It is literally evaluated as a Ruby hash, so
logic will work in it and local variables may be used. Quote
characters within the attribute will be replaced by appropriate escape
sequences. The hash is placed after the tag is defined. For example:
%head{ :name => "doc_head" }
%script{ 'type' => "text/" + "javascript",
:src => "javascripts/script_#{2 + 7}" }
is compiled to:
<head name="doc_head">
<script src='/docs/rdoc/javascripts/script_9' type='text/javascript'>
</script>
</head>
:Unquote
Does this give you an idea?
%script{:src => "http://www.google-analytics.com/urchin.js", :type
=> "text/javascript"}
%script{:type => "text/javascript"}
_uacct = "UA-1234567-1";
urchinTracker();
Converts to
<script src='http://www.google-analytics.com/urchin.js'
type='text/javascript'></script>
<script type='text/javascript'>
_uacct = "UA-438638-1";
urchinTracker();
</script>
Hope this helps.