Initial port of DictHtmlGenerator (untested)