I’ve been doing some more work on my proposed alternative RDF syntax. I’ve made quite a few changes to the schema, and finally implmented an XSLT that converts from the new format to RDF/XML.
I’m also working on a process for converting from an RDF graph to the new syntax. Obviously, I can’t do this in XSLT (If RDF/XML was XSLT processable, I wouldn’t be doing this project!), so I’m implementing this process in Java using Jena at the moment.
The changes to the schema aren’t all that interesting, but there is a reason behind most of them:
- The regexps have been improved so that URIs are restricted to absolute RDF URI-Refs; nodeIds are restricted to "_:" followed by an NCName, restricted to the ASCII character-set.
- The container syntax has changed to use a fixed enum of container types. This is to provide a more uniform representation for containers that have multiple rdf:types. This still needs some work.
- The syntax for unasserted reified statements was broken before (it allowed multiple predicates and objects be nested beneath the single subject, which caused all of those statements to have the same stmtId). It has now been improved by moving stmtId to the <o> tag, so that multiple statements can now be nested and still all have unique stmtIds.
- Indexes have been removed from container items. I decided that this was too much of an edge case. So, now, sparse lists and other funky lists, have to be written out long-hand. I don’t think that this is too much of a disadvantage, because these funky lists would be hard to process using XSLT anyway.
- The id for collections has moved from the declaration itself, to a seperate listId attribute on each item. I was going to add a listId anyway, so that the list nodes could be referenced, and if I’m doing this, it makes the id on the <d> element redundant because it serves the same purpose as the listId on the first element in the list.
All of the links are here.