Evan Prodromou wrote:
"EP" == Evan Prodromou evan@wikitravel.org writes:
EP> Anyways, I wanted to float a design idea for inclusion of EP> metadata in MediaWiki articles.
I probably oversold this proposal by using the word "metadata", since it's such a loaded term. Introducing categorization as a possible metadata application, which is also a loaded subject for Wikipedia, might have also been a misstep.
Perhaps I should have stuck with "editor-assigned field-value pairs". All *I* want is a way to:
* define field-value pairs for a page * define different ways to render these field-value pairs: as in-page links, as out-of-page links (like interlanguage links now), as <meta> or <link> tags in the <head> of the HTML output, not render them at all, or whatever.
In other words, I want a technical feature for the MediaWiki software. How that feature gets used in different MediaWiki installations should be up to the communities using the installation.
I'd like to make the feature powerful enough that it can handle categorization of Wikipedia, which is one possible if complex application. But if it can't, I'd still like to have the feature.
So, to boil things down again, here's the technical proposal:
Editors can put markup into a page like this:
[[field:name:value]]
"field" is a per-installation fixed string, defining this link as a data field. It probably should not conflict with any namespace, language code, or InterWiki link.
"name" can be any string that won't interfere with other wikitext parsing and doesn't contain a ":"; it is the field name.
"value" is any string that won't interfere with other wikitext parsing, and doesn't contain "]]". It is the field value.
The field tag can go anywhere in the page text. There can be multiple field tags with the same name.
When a page is saved, the fields are extracted and put into a database table called "fields". The table has the following columns:
field_id: an autoincrementing unique identifier field_cur_id : the cur_id of the cur row that contains this field field_name: the contents of the name part field_value: the contents of the value part
When a page is rendered, the associated fields are retrieved, and depending on field name and the installation configuration, they can be:
- ignored. Just left out of the page entirely.
- displayed as a link in-page.
- displayed as text in-page.
- displayed as a link out-of-page (like interlanguage links)
- displayed as text out-of-page
- displayed as a <meta> field-value pair
- displayed as a <link> field-value pair
Any application of this feature is up to the installation. Auto-indexed pages, bread-crumb navigation, field-based search, field display in search results, directories, etc., could be implemented if needed.
~ESP
I agree completely with most of Evan's points.
Does anyone have any good ideas for the fixed string in Evan's scheme? Obviously, we can't use "meta".
Unless someone can think of a good string, I would suggest the [[name=value]] notation from my earlier post, which * eliminates the need for a per-installation fixed string, * the "=" char easily accessed in all international charsets, since it is needed to do math * does not conflict with any existing link scheme * needs fewer characters to type * does not look like ordinary links * is perhaps self-explanatory? * allows namespaces to be used within the fields themselves, eg: [[discussion=Wikipedia talk:Foo]], [[originally-from=en:Fish]]
-- Neil