5. The method according to claim 1, wherein said examining step comprises checking each node of the document tree.
1. A method for determining whether an editing step of a document tree results in a weakly valid document structure, the weakly valid document structure being a document structure that is extendable into a valid document structure that satisfies a grammar, the method comprising the steps of: producing the document tree having a plurality of nodes labelled with symbols of the grammar; examining selective nodes of the document tree to determine whether the selective nodes are weakly valid to extend into the valid document structure that satisfies the grammar; and performing the editing step to obtain the weakly valid document structure if the selective nodes are determined to be weakly valid.