title: Notation3
text: # Notation3
  
  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.
  
  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.
  
  ## Examples
  
  The following is an RDF model in standard XML notation:
  
  may be written in Notation3 like this:
  
  This N3 code above would also be in valid Turtle syntax.
  
  ## Comparison of Notation3, Turtle, and N-Triples
  
  | Feature | Feature | Notation3 | Turtle | N-Triples |
  | - | - | - | - | - |
  | Character encoding | Character encoding | UTF-8 | UTF-8 | ASCII |
  | Directives | @base | | | |
  | Directives | @forAll | | | |
  | Directives | @forSome | | | |
  | Directives | @keywords | | | |
  | Directives | @prefix | | | |
  | Lists |
  | Lists | (DAML lists) | | | |
  | Lists | <nowiki>{ … }</nowiki> (statement lists) | | | |
  | Literals | true / false (Boolean) | | | |
  | Literals | xsd:decimal (decimal arbitrary length) | | | |
  | Literals | xsd:double (decimal double) | | | |
  | Literals | xsd:integer (decimal integer) | | | |
  | Syntactic sugar | RDF paths | | | |
  | Syntactic sugar | QNames | | | |
  | Syntactic sugar | a/@a (equiv. to rdf:type) | | | |
  | Syntactic sugar | (shorthand for blank node) | | | |
  | Syntactic sugar | <nowiki>=</nowiki>> (x implies y) | | | |
  | Syntactic sugar | <<nowiki>=</nowiki> (y implies x) | | | |
  | Syntactic sugar | <nowiki>=</nowiki> (x is equivalent to y) | | | |
  | Syntactic sugar | , (repeat object in list) | | | |
  | Syntactic sugar | ; (repeat subject/verb in list) | | | |
  