4 ms·
No, since end tags are named (redundantly) you can recognize that the footnote is unterminated when there is no closing tag for it before the closing tag of the
by HelloNurse 2y ago
No, since end tags are named (redundantly) you can recognize that the footnote is unterminated when there is no closing tag for it before the closing tag of the enclosing para, much earlier than at the end of the document when the count of open and closed parentheses comes to an head.
The content of footnote doesn't matter, at any point of the document there is a stack of open tags that have to be closed in reverse order with no chance of confusing nested elements of the same name.
It is also false that well-formedness checks require a DTD. A DTD can define entities, add nodes turning a well-formed document into another well-formed document, or define constraints to decide that a well-formed document is not valid.