W3C home > Mailing lists > Public > www-math@w3.org > February 2012

Re: Namespace prefix or not?

From: Neil Soiffer <NeilS@dessci.com>
Date: Sat, 4 Feb 2012 16:14:43 -0800
Message-ID: <CAESRWkBLx7Dgrb0TYkHKyJU0BQ3V9TvqLWn=9Gcueup4mphObQ@mail.gmail.com>
To: Bruce Miller <bruce.miller@nist.gov>
Cc: "www-math@w3.org" <www-math@w3.org>
The "universal" solution for XHTML and HTML5 is to put the namespace decl
on the math tag as in

<math xmlns='http://www.w3.org/1998/Math/MathML'>
  <mi>x</mi><mo>+</mo><mi>y</mi>
</math>

This should work for all HTML5 parsers and for all XHTML parsers.
MathPlayer will handle this form in IE when it is served as XHTML via a
MIME filter it installs that rewrites the math in the page.  This form is
not legal for HTML4, but MathML isn't really part of HTML4 and only works
in HTML4 for IE+MathPlayer.

    Neil



On Sat, Feb 4, 2012 at 12:54 PM, Bruce Miller <bruce.miller@nist.gov> wrote:

> Seems odd asking such a fundamentally naive
> question so late in the game, but...
>
> As we all know, you can include MathML in XHTML
> either by declaring and using a namespace
> prefix, m: by tradition, or by placing
> an xmlns namespace declaration on _each_
> math element.
>
> I have always preferred the prefixed form
> --- seems more readable, perhaps more compact
> in practice (though I never tested).
> I have the vague recollection that early versions of
> MathPlayer _required_ the prefixed form for IE to trigger it(?)
>
> But now I find that
>  http://www.dessci.com/en/**products/mathplayer/author/**creatingpages.htm<http://www.dessci.com/en/products/mathplayer/author/creatingpages.htm>
> prefers the NON-prefixed form for xhtml.
> Moreover, the <mumble mumble> validator at w3,
> http://validator.w3.org/, has nice analysis,
> but is dtd-based and only recognizes the NON-prefixed
> form. I've never found such a convenient online
> service doing relaxng validations (so do it at home).
>
> So, maybe I mis-remembered MathPlayer's requirements,
> or am forgetting some other reason...
> Are there any remaining reasons (besides taste) to prefer
> the prefixed form?
>
> bruce
>
> PS: No need to mention that html5 doesn't want the prefix;
> in fact: PLEASE DONT! :>
>
>
Received on Sunday, 5 February 2012 00:15:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 5 February 2012 00:15:13 GMT