require 'rubygems'
require 'builder'
@steps = %w(foo bar baz)
@header = 'header'

class Builder::XmlMarkup
  def nl!
    _text "\n"
  end
end

#####

@w = Builder::XmlMarkup.new
@w.html do
  @w.head do
    @w.title 'Atom Protocol Excerciser Report'
    @w.nl!
    @w.link :rel => 'stylesheet', :type => 'text/css', :href => '/ape/ape.css'
  end
  @w.nl!

  @w.body do
    @w.h2 'The Ape says:'
    @w.nl!
    if @header
      @w.p @header
      @w.nl!
    end
    @w.ol do
      @w.nl!
      @steps.each do |step|

#####
        @w.li step
        @w.nl!
      end
    end
    @w.nl!
  end
end

print @w.target!
