RDFS Closures
I really have to get the RDFS closures issue sorted out. Currently the spec mandates that the input graph be closed using the RDFS closure rules from the RDF model theory spec. This allows cool things such as automatic subProperty and subClass behaviour so you can write templates for foaf:knows and have it work even if the input graph is using Eric's relationship schema.
The problem comes when you're dealing directly with rdfs:Class or rdf:Property such as when you're writing a stylesheet to produce a nice HTML representation of an RDF schema document. When you try to select all the classes in the schema you also get the inferred ones from the closure rules which rather messes things up.
There are a number of ways round this:
- no closure rules — this would work a the expense of losing all the convenience of subProperty and subClass inferences. It would also make the processor faster.
- closure rules optional — this is one step up from removing the rules entirely and would allow stylesheets that need to deal with low level RDF/RDFS constructs to access only the source graph.
- nodepaths operate optionally on source only — rather than a wholesale on/off setting for the closure rules it might be possible to apply a nodepath only to the original graph. There is already a nodepath scope operator in the syntax which allows a 'global’ select, it would be feasible to add a 'source’ select as well.
- node patterns operate on source only — this would allow parts of a nodepath to operate only on the source graph. Not sure what overall benefit would be gained for the additional implementation complexity this would entail.
Now I've written the various options down, I can feel myself gravitating to option 3. I think implementing that would be fairly simple to do naievely - just keep a copy of the original graph before the closure rules are applied. Syntactically the spec currently uses '/' to denote a global scope nodepath. What symbol would be best for denoting the source graph? Any of these? '#', ':', '^', '!', '@', '~', '?', '%', '&', '$'
Comments
No comments yet.
Leave a comment
Sorry, the comment form is closed at this time.
