W3C home > Mailing lists > Public > public-html@w3.org > March 2008

Re: Exploring new vocabularies for HTML

From: David Carlisle <davidc@nag.co.uk>
Date: Sun, 30 Mar 2008 11:55:36 +0100
Message-Id: <200803301055.m2UAta6S018639@edinburgh.nag.co.uk>
To: ian@hixie.ch
Cc: public-html@w3.org, www-math@w3.org


> Correct me if I'm wrong, but this:
> 
>    <math> 3 </math>
> 
> ...is invalid MathML markup. <math> elements can't contain numbers 
> directly. (Incidentally, I determined this from the DTD, but I can't find 
> anything in MathML2 that defines the processing for this error. What 
> should that render as, assuming the correct namespaces?)

The DTD is normative, so one prossibility is that a validating xml
parser is used, in which case the above never gets as far as a renderer.
If a system uses a non validating parser, then it is up to that system
to report the error in whatever way is natural. (Mozilla for example
deals with that, and other errors in a way it finds natural which is to
say it silently just lets the text fall through, but without any
typographic fix up. 


Unlike the html case where you can try to specify full application
behaviour even in error situations, mathml is intended primarily to be
hosted by some other language (most mathematical expressions live in
some wider context) and the application behaviour of xyz+mathml has to
be mainly influenced by the application behaviour of the host language
xyz.

So basically the current situation is that the above isn't MathML so if
you give it to a MahML (only) system it will generate an error, but if
you give it to a system that defines some language (such as html+mathml)
that isn't defined by the mathml spec, it may do something else such as
silently ignore the error.

In an HTML5 context you are not going to want (the equivalent of) a
validity error on parsing which kills the entire document, that is
clear. But the fixup should only be, that an implied merror (or mtext,
perhaps) is inserted

<math>1+2</math>

couuld perhaps parse as (preferably)

<math><merror><mtext>1+2</mtext></merror></math>

rendering typically as 1+2 in a red border

or perhaps we could consider whether it should parse as

<math><mtext>1+2</mtext></math>

redering as 1+2 with no mathematical spacing refinements.

But html5 should definitely not try to turn math into some kind of
private html microformat that implies character-by-character
tokenization and parsing of the character data resulting in

<math><mn>1</mn><mo>+</mo><mn>2</mn></math>

As Neil said, if you go that route why not add wiki syntax to html so
that authors don't need to use <h*> markup for headings but can just use
some ascii punctuation syntax?  There is actually a need for a linear
syntax for mathematics usable in wikis and the like, but it should be
considered in that context not this one.

David



________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________
Received on Sunday, 30 March 2008 10:56:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:13 GMT