Hello everyone,
After scouring the mediawiki.org site, I can't seem to find any way to add/manage dublin core metadata for my pages. I found something about RDF, but it seems both still in development, and not particularly friendly to implement/use.
Surely *someone* had come up with a solution for this?
Any assistance appreciated.
Thanks
Sean -- look into Semantic Mediawiki and Semantic Forms extensions. This is how I've implemented the DCES vocabulary on a couple projects. Dan
On 9/27/07, Sean O'Connor sean@transabled.org wrote:
Hello everyone,
After scouring the mediawiki.org site, I can't seem to find any way to add/manage dublin core metadata for my pages. I found something about RDF, but it seems both still in development, and not particularly friendly to implement/use.
Surely *someone* had come up with a solution for this?
Any assistance appreciated.
Thanks
-- Sean O'Connor - "BIID, just another disability" http://biid-info.org http://transabled.org
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On Donnerstag, 27. September 2007, Dan Thomas wrote:
Sean -- look into Semantic Mediawiki and Semantic Forms extensions. This is how I've implemented the DCES vocabulary on a couple projects. Dan
SMW [1] has means of using Dublin Core and any other vocabulary [2], but it does not embedd the annotations into the XHTML-header (as I know some webpages do with DC). Rather, the header contains a link to an RDF-feed that include the properties.
There is a mailing list "semediawiki-user" for usage questions [3].
Cheers,
Markus
[1] http://ontoworld.org/wiki/Semantic_MediaWiki [2] http://ontoworld.org/wiki/Help:Import_vocabulary [3] http://sourceforge.net/mail/?group_id=147937
On 9/27/07, Sean O'Connor sean@transabled.org wrote:
Hello everyone,
After scouring the mediawiki.org site, I can't seem to find any way to add/manage dublin core metadata for my pages. I found something about RDF, but it seems both still in development, and not particularly friendly to implement/use.
Surely *someone* had come up with a solution for this?
Any assistance appreciated.
Thanks
-- Sean O'Connor - "BIID, just another disability" http://biid-info.org http://transabled.org
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Dan, thanks, I'll look at semantic mediawiki.
SMW has means of using Dublin Core and any other vocabulary, but it does not embedd the annotations into the XHTML-header (as I know some webpages do with DC).
Markus, that would be a problem for me. Part of the reason I need DC on my site is to interact with applications such as Zotero [1], allowing researchers to grab bibliography/citation information from the page.
On Freitag, 28. September 2007, Sean O'Connor wrote:
Dan, thanks, I'll look at semantic mediawiki.
SMW has means of using Dublin Core and any other vocabulary, but it does not embedd the annotations into the XHTML-header (as I know some webpages do with DC).
Markus, that would be a problem for me. Part of the reason I need DC on my site is to interact with applications such as Zotero [1], allowing researchers to grab bibliography/citation information from the page.
It would be possible to make certain properties available in the XHTML header, but this is clearly not useful for all data SMW collects (this would make the header really large). So the best solution would probably be an extension to SMW which "knows" the DC properties and treats them in a special way. We are planning to put together the infrastructure for adding predefined properties in extensions more easily, but an ad hoc solution can be done with the current version already. There might be some performance issues though, since Meta-tags added to wiki-output are not cached. Should be OK for smaller wikis.
But anyway, here is a sketch of the solution. Install SMW1.0alpha(SVN) and add the following to your LocalSettings.php:
$wgHooks['BeforePageDisplay'][] = 'metaTest';
function metaTest(&$out) { if ($out->isArticle()) { $page = Title::newFromText($out->getPageTitle()); $dccreator = Title::newFromText('dccreator', SMW_NS_PROPERTY); $res = smwfGetStore()->getPropertyValues($page, $dccreator); foreach ($res as $creator) { $out->addMeta('DC.Creator', $creator->getShortHTMLText()); } } return true; }
Then, whenever you use a property called "dccreator" in your wiki (the name is hardcoded above, feel free to change it), a metatag will appear in the according XHTML page. A test page for instance could contain "[[Dccreator::John Doe]]" (no page for Property:Dccreator is needed if you want dccreators to be given by pages in the wiki).
Of course, this method is just a 15min hack -- there might be encoding issues in some cases; the datatype of the property does not matter (use what you think is cool); there are no proper URIs, only plain text strings here (of course this could be changed, if your tool can handle URIs); and there is this performance thingy of querying the store on every page view (if there would be more properties, a general condition for checking through all of those would be handy, e.g. one could do this only when the page is in a certain category). I am also unsure whether the above method of finding the current page title is really right, but it worked for me so far.
-- Markus
mediawiki-l@lists.wikimedia.org