Re: [SVG2 CR] switch, script and style, requiredFormats?

I didn't know about requiredFormats in SVG 1.2.  That is unfortunate that
it wasn't copied over.  I have elsewhere argued that adding a file-format
support test to switch would be helpful in making it equivalent to HTML
<picture> element.

Unfortunately, the way it is currently spec'd, <switch> is fairly useless
for anything except language switching (which has its own problems) and
creating static fallbacks for proprietary extensions (as Adobe does).
Specifically, switch is not expected to block file downloads or scripts, so
there is no performance benefit to using it for feature testing.  I've
argued that we should now just call it "conditional display" instead of
"conditional processing", because it only controls rendering, not
processing at all.

Those of us working on the spec weren't happy about writing it up this way,
but without commitments from browsers to change their implementations, we
went with specifying current behavior.

~ABR

On 17 September 2016 at 05:45, Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
wrote:

> Hello,
>
> about switch it is noted in 5.7.3.:
> "The ‘switch’ element does not affect the processing of ‘script’ and
> ‘style’
> elements."
>
> I think, it would be pretty helpful for authors (and implementors) to
> provide
> some text and examples, how to get an effect of switch on scripting and
> styling
> else.
> I think, in several cases authors might want to change styling (maybe
> scripting as well) for an alternative.
>
> Idea: If one uses only g elements within a switch, id or class attributes
> with
> different values may do the job for styling.
>
>
> SVG tiny 1.2 has requiredFormats as well, what is pretty useful, especially
> because there are no required formats for audio and video, why is this
> missing?
> Often one needs a completely other solution, if some content cannot be
> displayed.
> For a similar reason requiredFonts can be useful as well.
>
>
> Olaf
>
>
>

Received on Wednesday, 21 September 2016 01:57:00 UTC