Re: ISSUE-41/ACTION-97 decentralized-extensibility

On Sun, Oct 18, 2009 at 9:00 AM, Adrian Bateman <> wrote:
> On Sunday, October 18, 2009 8:53 AM, Tab Atkins Jr. wrote:
>> On Sun, Oct 18, 2009 at 10:30 AM, Adrian Bateman <>
>> wrote:
>> > On Saturday, October 17, 2009 11:34 PM, Jonas Sicking wrote:
>> >> On Sat, Oct 17, 2009 at 4:54 PM, Tony Ross <>
>> wrote:
>> >> > Another use case would be the ability to easily and
>> >> > efficiently select the list of all elements in the document that the
>> >> > library should act upon.
>> >>
>> > [snip]
>> >>
>> >> Not sure I understand the list-of-elements example.
>> >
>> > The scenario is that a library wants to process all elements in its
>> namespace.
>> Why would it want to do so, though?  What sort of work can be done
>> symmetrically on every element in a namespace?  Wouldn't it be more
>> common to want to do particular types of work on particular elements
>> instead?
> For example, on page load a library needs to enumerate all the widgets on the page and set them up. Searching the whole document once for each element that the library supports is less efficient.

So you'd have multiple elements in this namespace that all meant "this
is a widget"? I would have thought that for example <foo:widget>
always meant a widget, and <foo:somethingelse> meant something other
that goes inside the widget, like a configuration parameter or some

I guess I can believe that wanting all elements in the extension
namespace happens. I'm just not sure if its so common that it means
that using prefixed localNames won't work well enough. You can after
all simply use a treewalker with an appropriate filter which will
return just the elements you want. This won't be as performant as
getElementByTagNameNS though I agree.

/ Jonas

Received on Sunday, 18 October 2009 18:45:24 UTC