On Thursday 08 February 2007 21:28, S Page wrote:
> >  My question is: is there an easy way to exploit the RDF output to
> >produce data in other formats? I think about PDF for presentation of
> >output, or SQL for injecting databases, or CSV for data analysis...

If you mean "easy" in a very general sense, I fear the answer is no. RDF is a 
machine format tailored towards easy and robust data exchange, but it is not 
made for any particular purpose. Basically, it just encodes the information 
in the factbox of each page for transmission over the Web.

If you want to reuse this data, this is usually related to some application 
area (i.e. you have an idea what your RDF talks about, and you want to use 
the data in an application that can use this content). Now most applications 
are not used to the idea of using the Web as a data source, so they do not 
have RDF interfaces (yet). A notable exception are feed-readers, since RSS1 
is an RDF-based format, but they are not expecting the kind of data that 
comes from a wiki. 

So, depending on the kind of reuse you envision, there are multiple 
possibilities:

* Write a program that reads the RDF and does with it whatever you want. For a 
programmer, this is quite easy: there are free RDF processing libraries for 
all major programming languages, so one does not have to implement parsers 
etc. for reading RDF. Denny once wrote a web page that embedded life data 
from the wiki into HTML -- the PHP code he had to create for this was just a 
few lines.
* Write an email to someone who could be interested in writing the above 
program. If your wiki has interesting data, someone else might be happy to 
use it.
* Use an existing, usually general purpose, RDF processing tool. An example 
would be the free RDF browser "Longwell" by Simile.

The reuse of RDF data is significantly simpler than for most other kinds of 
formats, but data migration etc. on special purpose systems always has some 
(implementation, customisation) costs. If you just want CSV output, a small 
script could easily produce this from RDF. Creating PDF is much trickier I 
would say.

Some comments to S' remarks:

>
> Well, it's XML so one way to transform an RDF file is with XSLT.  Google
> for "XSLT RDF CSV", etc.

The problem is that this is application specific too. CSV assumes tabular data 
organisation, whereas RDF can represent more general kinds of data as well. 
So there is no canoncial way of creating CSV from RDF if you don't know what 
information is in the RDF.

>
> One thing to watch out for is the RDF output normalizes various characters
> to create valid RDF names, e.g. ':' becomes "-3A".

This is to be ignored by applications: strings like "-3A" only occur in 
identifiers (URIs), which do not carry any meaning anyway. If you want to 
know the name of an article, just read the label-property. If you want to 
know its URL, read the hasArticle property. The URIs are not containing any 
information -- we could have chosen 30 digit numbers as well as anything 
else, as long as there is a one-to-one mapping to the individuals (article 
subjects) they refer to. We have tried to make the URIs look like the article 
URLs in order to make it more readable. 

>
> You could also directly query the underlying smw_* tables.  You could do
> this in any programming language, but you could also do it from the wiki
> Web interface by copying or extending the existing Special:ExportRDF to
> support additional export formats.  Currently SMW_SpecialExportRDF.php
> mixes its RDF generation with recursing through pages; it would be nice if
> it separated output from walking.

Agreed. In fact, it would be nice to have separate code for "printing as RDF" 
in order to be able to apply it on query results as well. 

>
> Another approach would be to load the RDF into some tool with its own
> export features, but I know nothing about such tools.

Most RDF-tools are developers tools, since RDF is mostly a format for the 
backend. The Protégé ontology editor might have a feature for exporting RDF 
in different formats, but graphical tools tend to impose certain size 
restrictions on the imported data. The RDF SMW exports is compatible with the 
Web Ontology Language OWL, so OWL tools/editors should also work.

-- Markus

-- 
Markus Krötzsch
Institute AIFB, University of Karlsruhe, D-76128 Karlsruhe
[EMAIL PROTECTED]        phone +49 (0)721 608 7362
www.aifb.uni-karlsruhe.de/WBS/     fax +49 (0)721 693  717

Attachment: pgp8BCbhFItxA.pgp
Description: PGP signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-user

Reply via email to