Re: Point of Extensibility

Hi all!

This is my first post to this list, and I've just been pondering this
problem for a few hours. kind if my suggested solution turns out to be complete rubbish :)

This solution has the following characteristics:
 - Won't affect exsisting pages out there at all (big plus)
 - Generic, a UA can decide what xml languages to support and when
("decoupling" of HTML 5 and other specs like MathML and SVG)
 - Support for fallback
 - XML languages can be parsed as XML (XML in HTML)
 - No tag-name clashes
 - Easy for authors to understand, even if the syntax is a bit ugly

What I'm suggesting is:
Standardize and extend IE's conditional comments syntax, where we introduce
a new "operator" (accept), that takes a mime-type string as operand

 => Only new UAs that understand this new syntax AND has implemented native
support or knows a plug-in is installed will handle this content
 => Legacy browsers will threat this as a comment, and display the fallback
 => Content with an xmlns within such a conditional comment should be parsed
as XML
 => An informative in-line error message should be displayed if not valid
xml (to help/force authors to behave)
 => It is another issue/discussion if the "browser sniffing part" of
conditional comments should be standardized

Here's an example:

<div id="myMathFallback">2x</div>
<!--[if accept text/mathml]>
  <math xmlns="">

  <script type="text/javascript">
     document.getElementById('myMathFallback').style.display = 'none';

It could also be possible to mix namespaces, and combine for instance MathML
and SVG like this:

<div id="myMathAndSVGFallback">
  <img src="" alt="2x">
<!--[if (accept text/mathml) & (accept image/svg+xml)]>
  <svg version="1.1" xmlns="">
     <ellipse cx="300" cy="150" rx="200" ry="80"

  <math xmlns="">

  <script type="text/javascript">
     document.getElementById('myMathAndSVGFallback').style.display = 'none';

Eirik Mikkelsen

On 4/3/08, Hallvord R. M. Steen <> wrote:
> On Tue, 01 Apr 2008 21:33:33 +0200, Julian Reschke <>
> wrote:
>  How about stating that any element with an attribute "xmlns", being set
> > > > to something different from "" or the XHTML namespace name, implies <ext>?
> > > >
> > >
>   Lots of existing content uses attributes named "xmlns" -- see e.g. <
> > >>. (Only 45 pages in the data
> > > set had XML content-types, so this is pretty much all text/html). It seems
> > > that compatibility requirements will make it impossible to base anything on
> > > the "xmlns" attribute.
> > >
> >
>  Well, a similar argument can probably applied to *any* change in the
> > language, such as adding new elements.
> >
> Certainly, but for a nugget of implementor experience to back up what
> Philip is saying: Opera at some point had some "support" for xmlns in
> text/html. It was removed because it broke pages when random sections or
> elements were no longer considered HTML markup. (I know without offering
> more hard facts like what exactly we "supported", how many pages we noticed
> breaking this is semi-anectdotal - I could look up those bugs if required).
> So we really can't imply <ext> when we see some xmlns - or at least not
> without extra magic that would "fall back" to un-implying <ext> if the
> "unknown" content looked like HTML after all (naturally, nobody wants to go
> down this route).
> --
> Hallvord R. M. Steen
> Core QA JavaScript tester, Opera Software
> Opera - simply the best Internet experience

Received on Friday, 4 April 2008 09:52:59 UTC