Re: switch was: SVG WG announces Last Call of SVG 1.2

On Tuesday, November 9, 2004, 1:06:45 PM, Jonathan wrote:

JC> Chris,

JC> Would it be possible to extend the use of switch to title and desc?

Yes. This has already been done in the 1.2 spec, but its worth pointing
out in the next revision and adding an example that uses switch on
title, rather like the multilink example does, to give alternate titles
in different languages.

JC> this would have some significant internationalisation benefits in 
JC> respect of Accessibility.

Yes, certainly.

JC> the 1.1 spec allows for switch in the case of text: 
JC> http://www.w3.org/TR/SVG/i18n.html#I18nTextSubstitution
JC> (an alternative formate might be as used in metadata: <title 
JC> xml:lang="es"> or similar, though this may not avoid the use of a 
JC> switch method.)

It wouldn't, because xml:lang is not a test attribute. However,
systemLanguage *is* a test attribute. Even then, you are better with
switch. The first child that evaluates to true is rendered and the rest
are not.

JC> a workaround demonstration is available here: 
JC> http://www.peepo.co.uk/launch/index.svg
JC> for various reasons this currently only works in asv afaik.
JC> eg title text is displayed in a tooltip, or label using the OS language
JC> if available, it currently defaults to English.

JC> my apologies if:
JC> this has already been dealt with elsewhere, I have not found a 
JC> reference to any changes in the draft.
It is mentioned, but the effect of the change could usefully be called
out in a few places, as you note.

-- 
 Chris Lilley                    mailto:chris@w3.org
 Chair, W3C SVG Working Group
 Member, W3C Technical Architecture Group

Received on Wednesday, 10 November 2004 08:40:32 UTC