Filename extension .n3
Internet media type text/n3;charset=utf-8
Developed by Tim Berners-Lee
Type of format semantic web
Container for RDF data
Standard Specification

Notation3, or N3 as it is more commonly known, is a shorthand non-XML serialization of Resource Description Framework models, designed with human-readability in mind: N3 is much more compact and readable than XML RDF notation. The format is being developed by Tim Berners-Lee and others from the Semantic Web community. A formalization of the logic underlying N3 was published by Berners-Lee and others in 2008.[1]

N3 has several features that go beyond a serialization for RDF models, such as support for RDF-based rules. Turtle is a simplified, RDF-only subset of N3.


This RDF model in standard XML notation

  <rdf:Description rdf:about="">
    <dc:title>Tony Benn</dc:title>

may be written in Notation 3 like this:

 @prefix dc: <>.
   dc:title "Tony Benn";
   dc:publisher "Wikipedia".

(This example would also be valid Turtle.)

Comparison of Notation3, Turtle, and N-Triples

Character encoding UTF-8UTF-8ASCII
Directives @base
() (DAML lists)
<nowiki>{ … }</nowiki> (statement lists)
Literals true / false
(decimal arbitrary length)
(decimal double)
(decimal integer)
Syntactic sugar RDF paths
a /@a (equiv. to rdf:type )
[] (shorthand for blank node)
<nowiki>=</nowiki>> (x implies y)
<<nowiki>=</nowiki> (y implies x)
<nowiki>=</nowiki> (x is equivalent to y)
, (repeat object in list)
; (repeat subject/verb in list)

See also


  1. Berners-Lee, T. I. M.; Connolly, D. A. N.; Kagal, L.; Scharf, Y.; Hendler, J. I. M. (2008). "N3Logic: A logical framework for the World Wide Web". Theory and Practice of Logic Programming. 8 (3). arXiv:0711.1533. doi:10.1017/S1471068407003213.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.