Did you ever tried to use figure section with short text? Maybe it is not problem of SectionParser, but CSS/main parser, but it is very annoying (example here, had to solve it by divider image 600 x 1px: http://robotika.cz/wiki/RobotBotis).

-- Milan HorĂ¡k

INHO this parser mixes up three common tasks:

  1. parse: recognize a markup stream which is written in a specific format an build an internal representtion (usually a parse tree)

  2. transform handle some specific elements within the parse tree in a specific way

  3. serialize the parse tree to an output medium in a specific format

The SectionParser mixes up these tasks because of an ambiguity of its name itself: I would expect a section parser to parse a specific wiki format named "section", similarly to a MediaParser which parses Media wiki markup. (The { { { ... } } } notion belongs to the moin syntax; in fact it can be used to switch between parsers. But it is not a feature of the section parser).

What the section parser actually does instead: it overloads the { { { ... } } } notion to parse "sections", i.e. to handle segments of a markup similarly to the xhtml DIV element. The method is to re-event the idea of semantic tagging with the (only) prenthesis notion the moin markup has at hand. The nesting problem is a limitation of the wiki parser or moin markup. Wiki markup was not meat to do nesting, it suppose to be a quick way to write in the web. I wonder if the solution is not simply allow some html tags to create divs, tables and other complicated structures.

The request the section parser adresses should be taken seriously. Me too likes to have a way "to get rich layout of wiki pages, in a simple and maintainable way". But this should be done with less tangled concepts. IMHO a sound solution calls for an internal representation of wiki pages in XML (combined with a flexible pipeline architecture of parsers, transformers an serializers, as suggested in FeatureRequests/PipelineArchitecture). If we don't mind to allow start and stop elements in wiki markup (which is in fact error prone): why shouldn't we allow selected XML elements like <div> instead? -- jbusse


You might want to examine RadomirDopieralski/SimpleParser.

Please use a section on the main page to discuss. This is not MediaWiki nor WikiPedia.

I prefer that people will not discuss in the main page, I want it to be short and clear documentation page for the current version. This kind of discussion only confuse users who want to try the plugin, but may be useful for future development. If keeping more than one page for this plugin is a problem, I can move the pages to another wiki, but I think it should be here for the convenience of the users. -- NirSoffer 2006-02-08 10:06:53


This needs some slight changes to allow for use on moin 1.6, namely that the parsers were renamed. You need to replace two instances of 'wiki' with 'text_moin_wiki' and one instance of 'plain' with 'text'. -- JohannesBerg 2007-01-10 22:13:21


Thanks Nir for that great code! It is really very helpful! Here's an idea I want to share: To have an AccessibleMoin, layout done by frames should be avoided if possible especially if you do complex nesting of frames like https://developer.skype.com/ (really great, great design but a classic "Don't do this example" in my eyes concerning accessibility). The section parser could help here much (no way to tell it to them unless registering as new skype user which is by default also the wiki user instance). To allow also an easy introduction of new div classes (which user might need to layout their pages) my idea is to have a separate SectionParserCss wikipage like it is done with the PersonalCss to adapt Moin to your needs. By a simple patch of theme/_init_.py the SectionParserCss could be included there like the PersonalCss in the page header. I'm not quite sure, whether this is a good idea: greater flexiblity in adding new layout styles at the same time also opens the door for manipulation and new ways of messing up the wiki, overwriting other css settings and so on. Or not? By the way: Is it possible to protect PersonalCss and SectionParserCss by ACLs so that browsers can still use the page as css and only a special trusted group of users can edit them? -- OliverSiemoneit 2007-02-05 16:30:35

MoinMoin: SectionParser/Discussion (last edited 2007-10-29 19:06:24 by localhost)