- case attr :style - when 'qanda' %qandaset{:id=>@id, :role=>(attr :role), :xreflabel=>(attr :reftext)} - if title? %title=title - items.each do |terms, dd| %qandaentry %question - [*terms].each do |dt| %simpara=dt.text - unless dd.nil? %answer - if dd.text? %simpara=dd.text - if dd.blocks? =dd.content - when 'glossary' - items.each do |terms, dd| %glossentry - [*terms].each do |dt| %glossterm=dt.text - unless dd.nil? %glossdef - if dd.text? %simpara=dd.text - if dd.blocks? =dd.content - when 'horizontal' - haml_tag((title? ? 'table' : 'informaltable'), :id=>@id, :role=>(attr :role), :xreflabel=>(attr :reftext), :tabstyle=>'horizontal', :frame=>'none', :colsep=>0, :rowsep=>0) do - if title? %title=title %tgroup(cols=2) %colspec(colwidth="#{attr :labelwidth, 15}*")/ %colspec(colwidth="#{attr :labelwidth, 85}*")/ %tbody(valign='top') - items.each do |terms, dd| %row %entry - [*terms].each do |dt| %simpara=dt.text - unless dd.nil? %entry - if dd.text? %simpara=dd.text - if dd.blocks? =dd.content - else %variablelist{:id=>@id, :role=>(attr :role), :xreflabel=>(attr :reftext)} - if title? %title=title - items.each do |terms, dd| %varlistentry - [*terms].each do |dt| %term=dt.text - unless dd.nil? %listitem - if dd.text? %simpara=dd.text - if dd.blocks? =dd.content