Jake wrote:

>FYI, I just tests Aptana with the embedded Gecko renderer on a
>compound XHTML-SVG document (.xhtml extension, so the Eclipse wouldn't
>get confused about the MIME type), and it totally worked. Nice little
>animated SVG prototype running right there in Eclipse :-)

I just tried something that worked, part of the way. I took a simple SVG file 
(shown below) having simple script and
just wrapped it in <html> tag with xhtml namespace. It rendered in Aptana's 
Firefox emulator.

But any mouseclick event throws an exception:
Exception: evt is not defined File: [...]/.tmp_simpleDrag.xhtml.49888~ Line: 1 
Column: 0

I added xmlns:ev="http://www.w3.org/2001/xml-events"; to the <svg> thinking that 
that might help, but it didn't. The file works just fine in IE, FF, Opera, 
Safari, Chrome, but not in Aptana as served as faux xhtml.

Any ideas?

thanks
David

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<body>
<svg xmlns="http://www.w3.org/2000/svg"; width="100%"
  xmlns:xlink="http://www.w3.org/1999/xlink"; 
  xmlns:ev="http://www.w3.org/2001/xml-events";
>
<script><![CDATA[
xmlns="http://www.w3.org/2000/svg";
xlink="http://www.w3.org/1999/xlink"; 
document.documentElement.setAttribute("onclick","remove(evt)")
function remove(evt){
 if (evt.target.nodeName=="rect") add(evt)
 else document.documentElement.removeChild(evt.target)
}
function add(evt){
 var C=document.createElementNS(xmlns,"circle")
 C.setAttributeNS(null, "r", 50)
 C.setAttributeNS(null, "cx", evt.clientX)
 C.setAttributeNS(null, "cy", evt.clientY)
 document.documentElement.appendChild(C)
}
//]]>
</script>
<rect width="100%" height="100%" fill="white"/>
<circle r="50"/>
<text font-size="12"  x="50" y="20" >Click something to remove it</text>
<text font-size="12"  x="50" y="80" >Click nothing to add something</text>
</svg>
</body></html>

[Non-text portions of this message have been removed]


------------------------------------

-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to