The adjusted current node (annotation-xml element) is not in the
HTML namespace;
The adjusted current node is not a MathML text integration point;
The adjusted current node is not a MathML text integration point
(separate condition from 3);
The adjusted current node is a MathML annotation-xml element but
the token (</svg>) is not a start tag;
The token is not a start tag (also the annotation-xml isn't an HTML
integration point because it lacks a particular attribute);
The token isn't a character token (also the annotation-xml isn't an
HTML integration point).
Thus the "any other end tag" clause of 12.2.6.5 "The rules for parsing
tokens in foreign context" applies.
The current node's tag name (annotation-xml) is not the same as the
tag name of the token (svg) so this is a parse error.
Since there's no svg element in the stack of open elements, the loop
in step 3 through 6 of the "any other end tag" clause exits when the
body element is reached. and the token is processed according to the
current insertion mode, "in body."
The </svg> matches the "any other end tag" of "in body." Since the
MathML annotation-xml element is not an HTML element but is special
which is a second parse error.
The
</svg>
is parsed in foreign context becauseannotation-xml
element) is not in the HTML namespace;annotation-xml
element but the token (</svg>
) is not a start tag;annotation-xml
isn't an HTML integration point because it lacks a particular attribute);annotation-xml
isn't an HTML integration point).Thus the "any other end tag" clause of 12.2.6.5 "The rules for parsing tokens in foreign context" applies.
The current node's tag name (
annotation-xml
) is not the same as the tag name of the token (svg
) so this is a parse error.Since there's no
svg
element in the stack of open elements, the loop in step 3 through 6 of the "any other end tag" clause exits when thebody
element is reached. and the token is processed according to the current insertion mode, "in body."The
</svg>
matches the "any other end tag" of "in body." Since the MathMLannotation-xml
element is not an HTML element but is special which is a second parse error.