[dokuwiki] Re: metadata clearing

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 14 Nov 2006 14:42:27 +0000

Chris Smith wrote:

My proposal is to:
- add a PARSER_METADATA_RENDER event wrapped around metadata rendering. Action plugins which add/handle metadata could respond to this. - add a clear() method to the syntax plugin class. DW would call that method for every syntax plugin prior to processing the instruction list. Syntax plugins that wished to clear out their metadata could override the default method (which does nothing).


On reflection, I think the event is ok with or without this problem. I am not so sure about the clear() method.

Other alternatives are:
- wipe all metadata before re-rendering
- allow metadata values to be (somehow) marked as persistent when setting them. Values would not be persistent by default. The renderer would wipe all but persistent values before re-rendering.
- as above, but mark as non-persistent and default to persistent.

I think the above choices are better than clear() as the onus is no longer on the plugin to assume (or somehow determine) that a value of a particular key is its responsibility.

Cheers,

Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: