 : <document> ( -- document )
     document new
         V{ } clone >>tree
-        initial-mode >>tree-insert-mode
+        initial-mode >>tree-insertion-mode
         <doctype> >>doctype
         SBUF" " clone >>attribute-name
         SBUF" " clone >>attribute-value

: push-doctype-system-identifier ( ch document -- )
    doctype>> system-identifier>> push ;

GENERIC: tree-insert* ( document obj tree-insert-mode -- document )
M: initial-mode tree-insert*
    drop {
        { CHAR: \t [ ] }

quirks-mode?
fostering-parent?
tree
tree-insertion-mode
original-insertion-mode
last
node
context
doctype
tag
end-tag
