W3C home > Mailing lists > Public > www-svg@w3.org > June 2005

RE: SVG12: get/setAttribute

From: Ola Andersson <Ola.Andersson@ikivo.com>
Date: Mon, 13 Jun 2005 08:41:58 +0200
Message-ID: <586AE9F507AF5E4AA45364333D9E2FA201093CE9@sesthsrv02.zoomon.local>
To: "Bjoern Hoehrmann" <derhoermi@gmx.net>
Cc: <www-svg@w3.org>, "WG SVG" <w3c-svg-wg@w3.org>

> From: Bjoern Hoehrmann [mailto:derhoermi@gmx.net]
> 
> * Ola Andersson wrote:
> >MyEventListenerInitializer2 has been changed to:
> 
> Due to http://lists.w3.org/Archives/Public/www-svg/2005May/0254
> I'm not sure whether this is correct, could you clarify?
>

The mail you refer to does no longer apply due to a later resolution in the WG. Set/getAttributeNS do apply (as written in the LC-spec) to svg elements.
 
> >Example SVG 1.1 scripting has been changed to:
> ><svg xmlns="http://www.w3.org/2000/svg" version="1.1">
> >    <rect id="myRect" x="10" y="20" width="200" height="300" fill="red"
> >        onclick="var width =  parseFloat(
> >        document.getElementById('myRect').getAttributeNS(null, 'width'));
> >        document.getElementById('myRect').setAttributeNS(null, 'width',
> (width+10));"/>
> ></svg>
> 
> This seems overly complex to me, I think this should be
> 
>   <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
>     <rect x="10" y="20" width="200" height="300" fill="red"
>         onclick="evt.target.width.baseVal.value += 10" />
>   </svg>

This is not svg tiny 1.1 compliant. The idea is that the example should be tiny 1.1 udom compliant. We should add baseProfile="tiny" to make this clear. 

> --
> Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
> Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
> 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Received on Monday, 13 June 2005 06:42:14 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:30 GMT