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

Re: getElementById method on SVGSVGElement

From: Thomas DeWeese <Thomas.DeWeese@Kodak.com>
Date: Fri, 04 Feb 2005 06:24:44 -0500
Message-ID: <42035B7C.5060504@Kodak.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
CC: www-svg@w3.org

Hi all,

     This is a feature that has been in a specification and
implemented by viewers for over 4 years.  I think deprecation
needs to be reserved for features that introduce real
technical issues, not things that someone finds to be a
minor nuisance to implement.  This is just silly, the code is
attached for Java, are we really concerned about 8 lines of
code?

public Element getElementByID(String id) {
     Element e = getOwnerDocument().getElementByID(id);
     Node n = e;
     while (n != null) {
	if (n == this) return e;
	n = n.getParentNode();
     }
     return null;
}

Bjoern Hoehrmann wrote:

> * Thomas DeWeese wrote:
> 
>>>Would it make sense to deprecate this method in future SVG versions?
>>
>>   Given that the implementation is really not that hard I would
>>argue against it.
> 
> From http://groups.yahoo.com/group/svg-developers/message/47300 it would
> seem that this method confuses authors to believe one can re-use IDs in
> a document. 

    If you got rid of any feature that confused authors you wouldn't
be left with anything.  And BTW the confusion on re-using ID's is
not limited to this method.

> And http://www.w3.org/mid/41FD3969.2070508@mit.edu suggests
> that it confuses implementers, too. Among the not really that hard to
> implement features there seem to be more useful methods...

    This is the message that started this thread, isn't that kind
of circular?
Received on Friday, 4 February 2005 11:24:46 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:39:55 UTC