RDF – Crack ( part I )

Resource Description Framework – is the w3c standard, language to describe information in (semantic) web.Is it a new language / structure that we have to read? Absolutely not. It’s an XML /N3 format of representing the data.

RDF is about describing relationship between web resources ex. URLs. It will be represented as triples format.

Basic Structure:

http://www.desiji.com/ndotnanda has a profile whose value is Nandakumar Somasundaram

It is in triples format.

Normally RDF data is represented as triples Triples are a sequence of (subject, predicate, object) terms. N-Triples is a line-based, plain text format for encoding an RDF graph.

There are few ways to define RDF data.

  1. RDF/XML ( for machine reading ) rdf/xml
  2. RDF/Notation3(N3) ( for human reading ) MIME type : text/rdf+n3
  3. Turtle is a subset of N3 to represent the RDF data

RDF/XML representation: RDF defines a specific XML markup language, referred to as RDF/XML, for use in representing RDF information, and for exchanging it between machines.

<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://www.w3.org/2001/08/rdf-test/">
    <dc:creator>Jan Grant</dc:creator>
    <dc:creator>Dave Beckett</dc:creator>
    <dc:publisher>
      <rdf:Description>
        <dc:title>World Wide Web Consortium</dc:title>
        <dc:source rdf:resource="http://www.w3.org/"/>
      </rdf:Description>
    </dc:publisher>
  </rdf:Description>
</rdf:RDF>



RDF example

N3 (Notation 3)

Notation 3 is a way of presenting semantic data in human understandable format. N3 representation of above RDF graph.

<http://www.example.org/index.html> <http://purl.org/dc/elements/1.1/creator> <http://www.example.org/staffid/85740> .

<http://www.example.org/index.html> <http://www.example.org/terms/creation-date> "August 16, 1999" .

<http://www.example.org/index.html> <http://purl.org/dc/elements/1.1/language> "en" .

N3 Subsets

N3 subsetsMore Information:

RDF Schema – http://www.w3.org/TR/rdf-schema/

RDF Syntax – http://www.w3.org/TR/REC-rdf-syntax/#basicconcepts

RDF – http://vanirsystems.com/danielsblog/2008/04/23/rdf-simpler-if-you-look-at-it-in-a-different-way/

http://infolab.stanford.edu/~melnik/rdf/syntax.html

http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax

Upcoming “RDF- Crack” versions will have lot of examples, details.

Zemanta Pixie
Advertisements

About this entry