This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Although I have not found any documentation for this "function::" E4X notation, others have referred to it on the net, and it works in Mozilla. However, using it in Netbeans (in a plain JavaScript file) gives an error: var a = foo.(function::attribute('var') == 'bar'); // Gives "missing ( before function parameters"
It's hard to know what to do about this since there's no spec for it. We just got JavaScript 1.7 support (see http://blogs.sun.com/tor/entry/netbeans_screenshot_of_the_week4 ) but I don't think this is valid JavaScript 1.7 I'm speculating that this perhaps is related to the namespace stuff in JavaScript 2.0? ( http://www.mozilla.org/js/language/js20-2002-04/index.html ) but it's hard to say more without more knowledge of what this code is supposed to be doing etc. Support for languages beyond JavaScript 1.8 would be an enhancement so changing issue type from defect to enhancement. If you come across more information about this construct and can attach it here that would help.
Thinking about it some more, I think it is likely that the "function::" notation itself is some kind of JS namespacing, as you suggest. Since this is used within a filter, that presumably avoids a potential JavaScript conflict which something like the following might have: var a = foo.(attribute('var') == 'bar'); As far as the particular use here, it works basically like foo.attribute('var'), but within a filter--or as would foo.@var if the latter were legal when using a reserved keyword (actually, I'm not clear that the latter is not legal because while all of the tutorials, etc. I've seen mention that the use of the .attribute() notation is to avoid using reserved keywords, the E4X spec itself doesn't seem to mention that reserved keywords are not allowed, and Mozilla itself allows it). The "function::" notation also is necessary within the filter to avoid errors when a reference is made to an item or attribute in the filter which does not exist at all on one of the filtered items. See https://bugzilla.mozilla.org/show_bug.cgi?id=336355
I found a source note where Brendan Eich (JavaScript creator) indicates regarding this feature that he had "prototyped this in SpiderMonkey": http://groups.google.com/group/netscape.public.mozilla.jseng/browse_thread/thread/b99b718927d06901/0803567b41f3e191?lnk=gst&q=%22prototyped+this%22#0803567b41f3e191 . This feature is very seriously needed by anyone using E4X (at least Mozilla which makes it available) since filters (which work similar to XPath expressions) are otherwise practically useless.