On 19/07/2010 07:58, Jeroen De Dauw wrote:
Hey,
Currently the Maps extension [0] allows you to specify marker specific data [1] (a titel, further text, and the icon to use). The way this is done is not very clean, and needs improvement. Someone poked me about this at Wikimania, but I don't know how to improve upon the current syntax, hence this discussion.
What's bad about the current approach:
- A 3rd level of parameter is needed, which is rather insane. (The first
level are the regular parser function parameters, separated with vertical lines. The second level are coordinates or addresses, separated by semicolons. The third level for the marker specific data uses tildes as delimiters.)
- Not very readable.
- Unsuited for long text.
- Excludes all the delimiters from usage in the text.
- Problems with links in the wikitext.
Anyone an idea what a better approach would be? You can either reply here, or write out your idea's on the discussion page [2].
An idea that has not been explored a lot yet is to introduce dedicated parser functions for such nested parameter blocks instead of changing the separators on each level of nesting. In the most basic case, one could use a parser function call to merely insert the idiosyncratic separator types of the deeper levels, where the parser function takes care of possible escaping. A cleaner approach would be to use the MW parser to get parameters via the DOM so that no actual serialisation of the nested parameters is required at all. In this case, one would not even need different parser functions for each new nesting level.
This would result in a syntax with nested parser functions, of course, which might not seem so compelling to everybody. But it seems to be the most MediaWiki way of handling the problem (maximise the amount of {{}} per page, but avoid custom syntax).
-- Markus
[0] http://www.mediawiki.org/wiki/Extension:Maps [1] http://mapping.referata.com/wiki/Help:Marker_data [2] http://mapping.referata.com/wiki/Help_talk:Marker_data
Cheers
-- Jeroen De Dauw
Don't panic. Don't be evil. 50 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
--
This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Semediawiki-user mailing list Semediawiki-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-user