2 ms·
If a footnote can contain a para then you still don't know that there's a missing footnote end-tag until you reach the end of the document. Even so, any editor
by taylodl 2y ago
If a footnote can contain a para then you still don't know that there's a missing footnote end-tag until you reach the end of the document. Even so, any editor capable of pointing out that error would need access to the DTD in order to determine there's a problem.
There's a lot of work that has to be done to enable this kind of parser checking that's being hand-waved away. At least with S-Expressions, all I have to do is count opening and closing parentheses and I can alert you that there's a problem somewhere.
- HelloNurse 2y agoNo, 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.