[dokuwiki] plugin: recursive syntax substitution

  • From: Andreas Wagner <Andreas.Wagner@xxxxxxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 18 Mar 2009 12:57:15 +0100

Hi all,

in further developing a plugin [1] for interaction with wikindx [2], I am trying to draw more resources from the remote database than just resource titles. Quotes is what I'm at - and in wikindx, quotes (and probably other entries (notes, musings, ...) can contain references to other resources. I can successfully s/wikindx-syntax/dw-my_plugin-syntax in the generated string, but then the plugin would have to start over and also resolve the dw-my_plugin-syntax term. I have tried mode type 'substitution' and 'container' for the plugin with both of them also in the AllowedTypes array. But I think the recursion just isn't triggered.

To give you my testing scenario/a more concrete examples:
I have a wikindx resource with a quote: [3]
When I call the (modified) wikindx API to retrieve the quote, I get a serialized array, with the 'text' item containing [cite]res.nr.:page[/cite]: [4] I can replace this wikindx-style reference with {{wxcite>res.nr:page}}, but while this normally is resolved fine (see [5]), it's not when this is inside the quote: [6] (there you also see that the double parentheses to put the second occurence insinde a footnote isn't resolved either).

You can find the plugin's only file, syntax.php here: [7]

I would be really happy if someone here could give me some hints.

TIA,
Andreas


[1] http://www.dokuwiki.org/plugin:wikindx
[2] http://wikindx.sf.net/
[3] http://www.commontology.de/wikindx3/index.php?action=resourceView&id=2175
[4] http://www.commontology.de/wikindx3/cmsprint.php?action=getQuote&id=3
[5] http://www.commontology.de/polphil/literatur/einbindung_der_literaturdatenbank [6] http://www.commontology.de/polphil/salamanca/blog/2009/03_12_1225_aha_-_noch_ein_lektuereeindruck
[7] http://de.pastebin.ca/1364221
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: