Re: SVG 1.2 Comment: systemLanguage and switch

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