This proposal was originally sent to the RDFPath list for discussion. It's a proposed format for RDFPath.
- Returns all nodes.
- [ ]
- Returns all anonymous nodes.
- [foaf:mbox "email@example.com"]
- Returns all nodes where the value of the property foaf:mbox equals the literal "firstname.lastname@example.org".
- [foaf:mbox "email@example.com" ; foaf:homepage <http://www.aaronsw.com>]
- Returns nodes where foaf:mbox equals the literal of my email address and foaf:homepage equals the resource of my homepage.
- [a rdf:Bag]
- Returns nodes of type rdf:Bag.
- Returns the resource <http://example.org/#foo>.
- Returns the literal "Whatever".
(In these, the first path segment can be replaced with any of the node
- Returns values of the dc:creator property for all resources.
- /[a rdfs:ContainerMembershipProperty]
- Returns the values of all container membership properties (_1, _2, etc.) for all resources.
- "Aaron Swartz"\dc:creator
- Returns all resources with a dc:creator property of "Aaron Swartz".
(The last one may be a bit odd, but I think it's very powerful. It allows
you to go backwards in queries.)
- /dc:creator [a w3c:StaffMember]
- Returns all of the w3c:StaffMembers who are listed as the dc:creator of a resource.
I don't do arcs or reification* because I don't really grok how they fit into a query context.
Can all this be done with anonymous node queries / basic N3? cf discussion with Sandro Hawke on rdfig*.
The <uri> syntax doesn't fit well in attributes, but breaking it breaks the N3 compatibility.
Part of LogicError. Powered by Blogspace, an Aaron Swartz project. Email the webmaster with problems.