W3C home > Mailing lists > Public > www-svg@w3.org > May 2011

Re: HTML5 how to indicate missing content: inline SVG & .svgz?

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Tue, 24 May 2011 09:32:39 +0100
To: Tony Schreiner <tonyschr@microsoft.com>, www-svg@w3.org, j.chetwynd@btinternet.com
Message-Id: <201105241032.39769.Dr.O.Hoffmann@gmx.de>
Tony Schreiner: 
> For inline SVG in HTML5 the best solution is to use feature detection (e.g.
> http://blogs.msdn.com/b/ie/archive/2010/09/03/same-markup-using-canvas-audi
>o-and-video.aspx) rather than browser detection. This embedding type is
> relatively new, so only the latest versions of browsers include support.

Can you provide a precise URI/IRI/fragment identifier to the W3C-HTML5 draft
indicating a declarative method for something like a format detection or 
feature detection?
Something like this (in SVG) would be helpful (but not already perfectly 
usable for authors):

I think, scripted methods to detect something different than scripted issues 
are not very useful, because it does not really care about the relevant 
question. It simply tests mainly scripting capabilities and not only the 
feature in question ;o)

Some declarative (X)HTML+SVG pseudo code could look like this,
assuming a switch element in (X)HTML corresponding to that of SVG:

<!-- more (X)HTML content before conditional processing -->
<switch requiredFormats="image/svg+xml" 
<svg width="4cm" height="4cm" viewBox="-1 -1 2 2"
     version="1.2" baseProfile="tiny"
     viewport-fill="white" viewport-fill-opacity="0.5">
     <title>Sample SVG With Circle</title>
     <circle r="1" />
<div>Obviously no embedded SVG tiny 1.2 available, imagine a black circle with 
a radius of 2cm on a partly white opaque viewport as alternative.</div>
<!-- more (X)HTML content after conditional processing -->

If the viewer cannot interprete SVG tiny 1.2 (relevant for the viewport-* 
properties here), the alternative content should be displayed. 

Even more important maybe to have this for MathML and other formats, that
may appear with an even lower probability to be interpreted.

Received on Tuesday, 24 May 2011 08:33:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:25 UTC