Last modified: 2011-08-22 10:17:53 UTC
Calling http://en.wikipedia.org/w/api.php?action=query&generator=links&pageids=27338&gpllimit=max&gplnamespace=0&redirects bring my attention on the following item, that appears in results: <page pageid="1072401" ns="14" title="Category:Endurance sports" /> The problem is, that page is found by redirect at http://en.wikipedia.org/w/index.php?title=Endurance_sports&redirect=no which is R to other namespace. Perhaps to avoid such problems, results should be filtered after all redirects are resolved.
That's fundamentally not how generators work. A generator is like a UNIX pipe, feeding the results of one query into another. Moreover, due to the way redirect resolution works, namespace filtering of redirect targets cannot be implemented efficiently.