beginnings of a DOM-direct writer