When editing Web pages, a user may desire to transform the documents a
s freely as with a word processor. But because Web documents must conf
orm to a rigorous structure (defined by the HTML DTD), every transform
ation is not allowed and the editing system must perform some work to
obtain valid HTML documents. This paper presents a solution to the pro
blem of transforming the document structure in a HTML editor. A tool b
ased on a transformation language is described. Techniques that have b
een designed for general structured documents have been adapted to tak
e into account the specific structure of the HTML DTD.