W3C home > Mailing lists > Public > www-svg@w3.org > November 2004

Re: SVG 1.2 Comment: systemLanguage and switch

From: Jonathan Chetwynd <j.chetwynd@btinternet.com>
Date: Sat, 27 Nov 2004 20:36:58 +0000
Message-Id: <156C2741-40B4-11D9-A83F-000A95C7D298@btinternet.com>
To: SVG (www) list <www-svg@w3.org>

is it intended that there be a script method of evaluating the  
systemLanguage?
or the result of switch? this may already be possible, but techniques  
are currently hard to find.

This example* does not evaluate the switch element and should return  
"ploc" however it would be useful if the default value "splat" was  
available via script (where systemLanguage = "fr" was not true).

This will be particularly relevant for elements such as title or desc,  
which may rely on scripting for display until user agents and assistive  
technologies are able to do so.

regards


Jonathan Chetwynd
http://www.peepo.co.uk     "It's easy to use"
irc://freenode/accessibility

*
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
     "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg xmlns="http://www.w3.org/2000/svg" onload="harry()">
<defs>
<script type="text/javascript"><![CDATA[
function harry(){
var myText=document.getElementById('ourText')
thisText=myText.firstChild.nextSibling.firstChild.nextSibling.firstChild 
.nodeValue
alert(thisText)
}
]]></script>
</defs>
<g  id='ourText' >
<switch>
    <text systemLanguage="fr">ploc</text>
    <text>splat</text>
<switch>
</g>
</svg>
Received on Saturday, 27 November 2004 20:37:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:53 UTC