From: Daniel Kinzler daniel@brightbyte.de
I propose a pluggable handler system for different types of content, similar to what we have for file uploads. So, I propose to associate a "content model" identifier with each page, and have handlers for each model that provide serialization, rendering, an editor, etc.
The background is that the Wikidata project needs a way to store structured data (JSON) on wiki pages instead of wikitext.
The "pluggable" part sounds great, as long as it isn't JSON-centric. I could see a need for XML or even SQL adaptors.
It would be great if namespaces, subpages, or even regexp title matches could trigger a particular content rendering. For example, I have LOTS of pages that contain identical wikitext in order to access SQL data, using subpages:
{{plant used for|{{SUBPAGENAME}}}}
This simply fires off an identical template for each subpage, passing in the SUBPAGENAME, which then is used as a query term to display a page of structured data. For example: http://www.EcoReality.org/wiki/Plant_used_for/Adaptogen
I've also got LOTS of pages with "{{plant needs|{{SUBPAGENAME}}}}", "{{plant supplies|{{SUBPAGENAME}}}}", etc., not to mention pages like "{{annual harvest for|...}}" and "{{monthly harvest for|...}}".
I seem to have LOTS of templates whose name ends with "for" that take one argument and that display data. I've often thought "there should be an easier way..." I played with SMW for a bit, but couldn't easily bend it to my needs.
Is this the sort of use you had in mind?
---------------- Life isn't fair. It's just fairer than death, that's all. -- William Goldman :::: Jan Steinman, EcoReality Co-op ::::
It sounds like what is being proposed is basically an open parser system. Perhaps it could be done seamlessly, much like parser functions, where multiple syntaxes can be mixed on a single page. For example, Lua scripting has already been proposed, and the goals of that proposal may be compatible with the Wikidata parser proposal. If so, there is an opportunity to avoid duplication of effort by collaborating with the other interests in sort of opening MediaWiki to multiple, perhaps simultaneous, alternative parsers.
-- View this message in context: http://wikimedia.7.n6.nabble.com/Cutting-MediaWiki-loose-from-wikitext-tp465... Sent from the WikiMedia General mailing list archive at Nabble.com.
mediawiki-l@lists.wikimedia.org