I’ve been hacking away at danbri’s version of specgen so we can rev the foaf spec. The idea is that you take an RDFS / OWL schema and generate some human-readable HTML from it, by taking the classes and properties and writing out their basic constituents. Optionally you can add some introductory text in a template, plus some individual bits of text for each property and class, eventually in different languages too.
I slapped in some RDFa yesterday because we needed a replacement for the ugly addition of RDF directly into the html, which makes it invalid. I realise some people may think this is back to front, but the foaf spec’s ‘original’ format has always been RDFS/OWL so it makes sense for us. I’m not actually sure we need two RDF versions (as there is alternate pointing to RDFS/OWL version from the HTML) but heck why not, and danbri’s consulting the community so there’s probably an argument I’ve missed.
There are several specgens available and at some point it might be nice to rationalise, or maybe go for functional equivalence. These are probably better in some senses than the one I’ve been working on, especially as I’m new to Python.
The ones I’ve found:
- SIOC’s specgen, a rev from danbri’s original one (which was itself based on something Chris Schmidt did, I think) – requires Redland
- Morfeo specgen, a rev from the SIOC one, again requires Redland
- Foaf specgen – requires RDFlib
- Patrick Sinclair’s ldontospec which uses Rena (Ruby)
I think the two things that unite the first three is that they are (a) self-described hacks (b) in python. The Foaf one uses RDFlib rather than Redland because danbri was having trouble with Redland installation on the Mac I believe.
Next things I’d like to look at are
- Generating specs from sample data (maybe someone’s done this already? It wouldn’t be complete but could be a start)
- Defining application profiles or Argots and using them to generate, say, useful Sparql queries
3 thoughts on “Generating specs from RDFS / OWL docs”
Regarding spec generation, you may also be interested in XSPARQL, cf the related use-case at http://xsparql.deri.org/spec/xsparql-use-cases.html#sec:ontogen Applying this query to the FOAF ontology gives the following result: http://apassant.net/home/2009/06/foaf/
Wrt generating spec from sample data, Vocabify (http://kwijibo.talis.com/vocabify/) might be a first step to look at
Another one for your list is Yves Raimond’s OntoSpec http://moustaki.org/ontospec/.
And another… http://www.ebusiness-unibw.org/projects/owl2xhtml/
Comments are closed.