I'm trying to distribute a non-broken version of the text_xml.py formatter as a third-party plug-in, but I'm not sure how I register the statement "please use this formatter instance for requests with mimetype=text/xml". Note: I'm willing to instead register for mimetype="application/xml", if that's easier.
I've read the various pages such as: * http://moinmo.in/ApplyingFormatters * http://moinmo.in/MoinDev/PluginConcept They don't really say much about this, except to say "Wiki plugins always override builtin plugins. For example, if you want to have a different RecentChanges <http://moinmo.in/RecentChanges> macro, you don't have to touch MoinMoin <http://moinmo.in/MoinMoin> code, simply write your own RecentChanges macro and install in the wiki data/plugin/macro/. Your macro will be used instead of the built-in one." So I figured I could look at other plugins for a clue, but I don't see any in the built-ins, and certainly not in text_xml.py, nor in, e.g. http://moinmo.in/FormatterMarket?action=AttachFile&do=view&target=text_latex-1.6.py . The string "mime" appears in neither. I would have expected FormatterBase initializer to accept a mimetype param, or for the formatter to call some function to register one or more mimetypes, but I see nothing of the sort. I tried to trace it from the other end, i.e. what happens in the show action when someone requests a specific mimetype, and traced it as far as: http://hg.moinmo.in/moin/1.9/file/ced05deb11ae/MoinMoin/Page.py#l1046 but the trail gets pretty lukewarm at that point and I figured there has to be something obvious I'm missing. Any clues, please? Thanks. -- Uche Ogbuji http://uche.ogbuji.net Weblog: http://copia.ogbuji.net Founding Partner, Zepheira http://zepheira.com Linked-in: http://www.linkedin.com/in/ucheogbuji Articles: http://uche.ogbuji.net/tech/publications/ Poetry ed @TNB: http://www.thenervousbreakdown.com/uogbuji/ Friendfeed: http://friendfeed.com/uche Twitter: http://twitter.com/uogbuji http://www.google.com/profiles/uche.ogbuji
------------------------------------------------------------------------------
_______________________________________________ Moin-user mailing list Moin-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user