A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on IRC (such as one of these permanent autoconfirmed members).

Difference between revisions of "New Vocabularies Solution"

From WHATWG Wiki
Jump to: navigation, search
Line 1: Line 1:
'''this doesn't handle these cases well:'''
 
<pre>
 
<table><math></html><!-- x --> (</html> should be ignored)
 
<table><td><math></html><!-- x --> (ditto)
 
<table><caption><math></html><!-- x --> (ditto)
 
<table><caption><math><mtext><caption>x (<caption> should start new caption)
 
<em><button><math></em>x (</em> should be ignored)
 
</pre>
 
'''to fix these we'll need a secondary insertion mode which is set whenever the insertion mode is set to "in math/svg", including in the reset algorithm (just jump down to the secondary steps and continue the walk up until you hit either the root, or a caption, td/th, or table)'''
 
 
'''what about:'''
 
<pre>
 
<table><caption><math><mrow><mtext><svg><circle></mrow>
 
<table><caption><math><mrow><mtext><svg><circle><foreignObject></mrow>
 
<table><caption><math><mrow><mtext><svg><circle></svg>
 
<table><caption><math><mtext><svg><circle><caption>
 
</pre>
 
'''check that those are handled right. maybe we need a stack for the insertion mode which is "{svg|math}*, {cell|caption|table|body}"'''
 
 
 
resetting appropriately:
 
resetting appropriately:
 
* if node is in a namespace other than html, "in namespace"
 
* if node is in a namespace other than html, "in namespace"

Revision as of 20:43, 3 April 2008

resetting appropriately:

  • if node is in a namespace other than html, "in namespace"

tokeniser:

  • tokeniser changes so that when insertion mode is "in namespace", support CDATA blocks.
  • tokeniser keeps track of /> endings.
  • we add all the MathML entities to the entity list.
  • φ works differently when in "in math" or "in math content".

"in body":

  • "math" element:
    1. insert math element in mathml namespace
    2. switch to "in namespace", with secondary mode set to whatever insertion mode used to be
    3. if the tag had a closing slash, imply a closing tag with the same tag name
  • "svg" element
    1. insert svg element in svg namespace
    2. switch to "in namespace", with secondary mode set to whatever insertion mode used to be
    3. if the tag had a closing slash, imply a closing tag with the same tag name

"in namespace":

  • comment
    1. insert comment
  • text:
    1. insert text
  • doctype
    1. 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
  • end tag
    1. treat as in the secondary mode
    2. 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)
    1. parse error
    2. pop nodes until the current node is in the html namespace
    3. switch to the secondary mode
    4. reprocess token
  • other start tag
    1. if namespace is svg, apply case fixups
    2. insert element for token, in same namespace as current node
    3. if the tag had a closing slash, imply a closing tag with the same tag name


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')

...