W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2000

RE: Older Sibling?

From: Miles Sabin <msabin@cromwellmedia.co.uk>
Date: Wed, 1 Mar 2000 11:13:02 -0000
Message-ID: <AA4C152BA2F9D211B9DD0008C79F760A95D661@odin.cromwellmedia.co.uk>
To: www-dom@w3.org
David Brownell wrote,
> would you seriously expect DOM to save you the work of
> writing such a simple subroutine?  If so, why?

How about: because some implementations might be able to
provide an O(1) implementation, whereas an external routine
would be likely to be O(number of siblings) or thereabouts.

There're several other queries like this which could usefully
be added and which might allow for similar optimizations:
precedes in document order; is an ancestor of; least common
ancestor; depth from root etc.



Miles Sabin                       Cromwell Media
Internet Systems Architect        5/6 Glenthorne Mews
+44 (0)20 8817 4030               London, W6 0LJ, England
msabin@cromwellmedia.com          http://www.cromwellmedia.com/
Received on Wednesday, 1 March 2000 06:13:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:06 UTC