Pient RDF Serialization

Pient is a proposed alternate RdfSyntax that is an extension of N-Triples to include some constructs from Notation3 (NotationThree.) The language can be thought of as N-Triples+ or N3-. Its name is pronounced "pint".

Goals: isomorphism with RDF/XML, using the best features from N-Triples and N3. Rigid grammar and definition. Possibly to be published as a W3C Note? Nearby: NotationThree.

Grammar

The EBNF used is that defined in the XML recommendation.

document ::= ( comment crlf | pdirective ws+ | triple ws+ )* 
   ( pdirective | triple )?
pdirective ::= '@prefix' ws+ prefix? ':' ws+ uriref ws* '.'

triple ::= ( subject polist | anonnode ) '.'
subject ::= qname | uriref | bnode
predicate ::= qname | uriref | 'a'
object ::= qname | uriref | bnode | literal

prefix ::= [A-Za-z][A-Za-z0-9_]*
name ::= [A-Za-z0-9_]+
qname ::= prefix? ':' name

uriref ::= '<' URI-reference '>'
bnode ::= nodeID | '[' ws* ']' | anonnode
anonnode ::= '[' ws* polist ws* ']'
polist ::= predicate ws+ objtlist ws* ( ';' ws* predicate ws+ objtlist )*
objtlist ::= object ws* ( ',' ws* object )*

/* Whitespace is " \t\r\n" */
ws ::= #x20 | #xD | #xA | #x9 

Imported productions are as follows:

URI-reference from RFC 2396
nodeID from N-Triples
literal from N-Triples
comment from N-Triples
crlf from N-Triples

How about a diff from an N3 grammar in the same form?

Documents are to be served as text/plain, with ASCII character encoding.

FAQ

Does the world really need another RDF notation?

Why "Pient"?

How can one tell a peint document from N3 or N-Triples?

Discussion

Feel free to discuss the syntax here, or add questions to the FAQ above, etc.

References

Contributors

Sean B. Palmer hashed out the initial grammar and documentation for pient. TimBL developed N3 with much input from DanC et al. Dave Beckett and Jan Grant are the editors for N-Triples. RDF was developed by hundreds or thousands.

PieNt (last edited 2005-07-09 22:18:34 by aaron)