With a fairly simple technique, we can read and write RDF data in a natural XML format. This is probably much easier to adopt than RDF/XML.
Contents:
In general, each element corresponds to either a node or an arc. When a class or dataname name is used as the element tag, we have a node. When the tag is a property name, it's an arc. In general, we need to alternate between nodes and arcs. Property arcs can also be expressed using XML attributes.
The machine needs to dereference the namespace/tag URIs to tell which tags are which kind of name, unless it has been given local information or some kind of over-ride. For human readers, the capitalization of the first letter can be used.
<Book> <dc:title>Weaving The Web</dc:title> <dc:author> <foaf:Person> <foaf:name>Tim Berners-Lee</foaf:name> </foaf:Person> </dc:author> </Book>
This tag works syntactically like a property name, but allows the URI for a resource to be communicated.
Can be used to get shorter URIs, and also bNodes by using the psuedo-prefix "_".
Appears like a class name, but causes the content to be parsed as element in a list; an abreviation for rdf:first/rdf:rest/rdf:nil.
You can skip the class name if it's rdf:Resource.
<foaf:Person qname="w3c:sandro"> <foaf:friend> <foaf:name>Eric Prud'hommeaux</foaf:name> </foaf:friend> </foaf:Person>
Note that a little RDFS inference would tell us the skipped node is actually an instance of foaf:Person.
You can omit the nested pair of elements (sx:content, sx:List), putting one Class or Datatype element inside a Class element.
There's one problem here: if the list is empty, this abreviation technique will produce the wrong results unless the parser has access to the XML schema, and the schema gives suitable content for the Class element
I just wanted to get this out there, again.
Easiest Demo would be to put the parser in Ontaria, I guess?
We need test cases here, though.