New Vocabularies Solution
From WHATWG Wiki
tokeniser:
- move the insertion mode flag to before the tokeniser ✓
- tokeniser changes so that when insertion mode is "in namespace", support CDATA blocks. ✓
- add a paragraph to the "Markup declaration open state" saying that if the next seven characters match "[CDATA[", and the insertion mode is "in namespace", and the current node is not html nor either <mi>, <mo>, <mn>, <ms>, <mtext> in mathml, nor <foreignObject>, <desc>, <title> in svg, then you switch to a state that emits character tokens until it hits "]]>". ✓
- tokeniser keeps track of /> endings.
- add a new tokeniser state which you go to when hitting a / instead of going to the "before attribute name state". This new state has just two exits -- one for ">", which sets a flag saying that the tag is self-closing, and one for anything else, which has a parse error and reconsumes in the "before attribute name state". ✓
- make it a parse error for end tags to have this slash ✓
- change the definition of "permitted slash" paragraph to instead say "if a start tag is emitted with the self-closing flag set, and the token is processed by the tree construction stage without that flag being acknowledged, then there is a parse error". ✓
- change the handling of the void elements "in body" and "in head" (anywhere else?) to acknowledge the self-closing flag. ✓
- we add all the MathML entities to the entity list.
resetting appropriately:
- if node is in a namespace other than html, "in namespace" ✓
"in body":
- "math" element:
- insert math element in mathml namespace✓
- switch to "in namespace", with secondary mode set to whatever insertion mode used to be✓
- if the tag had a closing slash, imply a closing tag with the same tag name✓
- "svg" element
- insert svg element in svg namespace✓
- switch to "in namespace", with secondary mode set to whatever insertion mode used to be✓
- if the tag had a closing slash, imply a closing tag with the same tag name✓
"in namespace":
- comment
- insert comment
- text:
- insert text
- doctype
- parse error
- start tag if current node is <mi>, <mo>, <mn>, <ms>, <mtext> in mathml
- start tag if current node is <foreignObject>, <desc>, <title> in svg
- start tag if current node is in the html namespace
- start tag with tag name "svg" if current node is <annotation-xml> in mathml
- end tag
- treat as in the secondary mode
- if the insertion mode is still "in namespace", but there is no namespaced element in scope, switch to the secondary mode
- start tag for one of: (html elements)
- parse error
- pop nodes until the current node is in the html namespace
- switch to the secondary mode
- reprocess token
- other start tag
- if namespace is svg, apply case fixups
- insert element for token, in same namespace as current node
- if the tag had a closing slash, imply a closing tag with the same tag name and acknowledge the self-closing flag
syntax:
- add a kind of element for those elements not in the HTML namespace ✓
- add a definition for how tags work for those elements to the Tags paragraph, including mentioning that start tags can be marked as self-closing, in which case there must not be a matching end tag ✓
- define what these elements can contain in the subsequent paragraphs, including cdata; nothing if the start tag is marked self-closing ✓
- add the definition of the /> syntax to the start tag bit, "self-closing" start tag ✓
- define cdata blocks ✓
content models:
- define MathML's <math> element as phrasing ✓
- define SVG's <svg> as embedded ✓
MathML error handling in text/html
Require the following behaviour, since MathML requires the host language to define error handling:
- An element with the wrong number or type of children must render as an error indicator. (list cases)
- a sequence of one or more text nodes containing non-inter-element-whitespace must be treated as <mtext>
Interaction of MathML and CSS ('display')
...
