Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Notation3
Compact non-XML format for RDF models

Notation3 (N3) is a compact, human-readable, non-XML serialization of Resource Description Framework models, developed by Tim Berners-Lee and the Semantic Web community. Unlike XML RDF notation, N3 offers improved readability and additional capabilities such as support for RDF-based rules. The formal logic behind N3 was published by Berners-Lee and colleagues in 2008. Additionally, Turtle is a simplified subset of N3, focusing solely on RDF serialization while maintaining ease of use.

We don't have any images related to Notation3 yet.
We don't have any YouTube videos related to Notation3 yet.
We don't have any PDF documents related to Notation3 yet.
We don't have any Books related to Notation3 yet.
We don't have any archived web articles related to Notation3 yet.

Examples

The following is an RDF model in standard XML notation:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:Description rdf:about="https://en.wikipedia.org/wiki/Tony_Benn"> <dc:title>Tony Benn</dc:title> <dc:publisher>Wikipedia</dc:publisher> </rdf:Description> </rdf:RDF>

may be written in Notation3 like this:

@prefix dc: <http://purl.org/dc/elements/1.1/>. <https://en.wikipedia.org/wiki/Tony_Benn> dc:title "Tony Benn"; dc:publisher "Wikipedia".

This N3 code above would also be in valid Turtle syntax.

Comparison of Notation3, Turtle, and N-Triples

FeatureNotation3TurtleN-Triples
Character encodingUTF-8ASCII
Directives@baseYesYesNo
@forAllYesNoNo
@forSomeYesNoNo
@keywordsYesNoNo
@prefixYesYesNo
Lists
() (DAML lists)YesYesNo
{ … } (statement lists)YesNoNo
Literalstrue / false(Boolean)YesYesNo
xsd:decimal (decimal arbitrary length)YesYesNo
xsd:double (decimal double)YesYesNo
xsd:integer (decimal integer)YesYesNo
Syntactic sugarRDF pathsYesNoNo
QNamesYesYesNo
a/@a (equiv. to rdf:type)YesYesNo
[] (shorthand for blank node)YesYesNo
=> (x implies y)YesNoNo
<= (y implies x)YesNoNo
= (x is equivalent to y)YesNoNo
, (repeat object in list)YesYesNo
; (repeat subject/verb in list)YesYesNo

See also

References

  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): 249–269. arXiv:0711.1533. doi:10.1017/S1471068407003213. /wiki/ArXiv_(identifier)