Notation 3 (computer science)

from Wikipedia, the free encyclopedia

Notation 3 (also Notation3 , or N3 for short ) is a formal language developed by Tim Berners-Lee that can be used as a syntax for RDF data. Unlike Turtle , a subset of Notation3, the language goes beyond general RDF. However, the additional language elements such as formulas, rules and variables can also be fully expressed in simple RDF if required. Due to its better readability compared to RDF / XML, Notation3 is well suited to get to know the basics of the Semantic Web using RDF examples in N3 . The MIME type for Notation3 is , the character encoding is set to UTF-8 . text/n3

example

The following RDF model in XML format (RDF-XML)

<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="http://de.wikipedia.org/wiki/Tim_Berners-Lee">
    <dc:title>Tim Berners-Lee</dc:title>
    <dc:publisher>Wikipedia</dc:publisher>
  </rdf:Description>
</rdf:RDF>

can be expressed in notation 3 as follows:

@prefix dc: <http://purl.org/dc/elements/1.1/>.

<http://de.wikipedia.org/wiki/Tim_Berners-Lee>
    dc:title "Tim Berners-Lee";
    dc:publisher "Wikipedia".

It states that the Wikipedia page about Tim Berners-Lee is titled Tim Berners-Lee and the publisher is Wikipedia.

This example is also a valid turtle .

Web links