Hi developers

I have a problem concerning the generation of xmlns-attributes with 
Javascript in SVG group nodes.

In Javascript 3 variables exist:
var xlinkNS = "http://www.w3.org/1999/xlink";;
var svgNS = "http://www.w3.org/2000/svg";;
var attribNS = "http://www.carto.net/schnabel";;

Now I generate a group node:
var group = document.createElementNS(svgNS,"g");
group.setAttributeNS(null,"id","layer");

After that I want to set an attribute "xmlns:attrib" to the group node 
like this:
group.setAttributeNS(null,"xmlns:attrib","http://www.carto.net/schnabel";);

But in Mozilla Firefox 1.5 and Opera 9.1 this code gives an error 
message. I also tried:
group.setAttributeNS("xmlns","attrib","http://www.carto.net/schnabel";);
group.setAttributeNS(svgNS,"xmlns:attrib","http://www.carto.net/schnabel";);
group.setAttributeNS(attribNS,"xmlns:attrib","http://www.carto.net/schnabel";);
group.setAttributeNS(attribNS,"","http://www.carto.net/schnabel";);

but nothing worked. Has anyone of you an idea??
Thanks for your answer.
Regards
Olaf

-- 
Olaf Schnabel
ETH Zurich
Institute of Cartography
CH-8093 Zurich
Switzerland

tel:    ++41 44 633 3031
fax:    ++41 44 633 1153
e-mail: [EMAIL PROTECTED]
www1:   http://www.ika.ethz.ch/schnabel
www2:   http://www.e-cartouche.ch


-----
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