[dokuwiki] Plugin writing questions / recursive parser

Hi,

I just tried DokuWiki 2 days ago for the first time and I must say I really
like it! Unlike with MediaWiki, I was immediately able to figure out, how to
adapt thins to my liking and the source code is structured very well too.

Anyway, in trying to make DokuWiki more useful as a documentation writer's
environment, I decided to write a plugin, that allows certain text on a page to
be hidden depending on what user is logged in. This would be especially useful
in conjunction with a tool, that saves a statical version of the Wiki, so you
could deploy slightly different versions of your wiki to e.g. different 
customers.

The syntax I imagined goes something like this:

<if joe>
Here comes some text...
</if>

=> show text only if the logged in user is "joe"

<if not joe>
Here comes some text...
</if>

=> show text only if the logged in user is *not* "joe"

<if @clients>
Legal blurb here...
</if>

=> show the legal blurb only if the logged in user belongs to the group 
"clients"

<if not @clients,boss>
FIXME The following description is totally out of date!
</if>

=> leave users of the group "clients" and user "boss" unaware of "inaccuracies"
of your text ;-)

I am aware, that the hidden text would still be visible through the source
code. As I already said, this plugin would mostly be useful when exporting your
content somehow.

The problem with this plugin would be, that basically any syntax should be
allowed between the start/end tags. But that is AFAICS not easily achievable
with the current plugin system. Am I missing something here?

IMHO the parser should allow recursive parsing, i.e. the plugin would just feed
the wiki text it finds between the start/end tags to the parser again (if the
condition matches). Is this already possible/feasible?

Chris

Other related posts: