Hi,
you may have a closer look at <dokuwiki>/inc/search.php and the search() function. Using it with the search_allpages() callback function gives you a list of all pages in a given namespace.
Hint:
http://dev.splitbrain.org/reference/dokuwiki/
HTH
--
chi