An Introduction
to the hard Semantic Web... simple Haiku


"The Semantic Web"
takes up many syllables, 
but I struggle on.

RDF Model

RDF is made
of triples--only triples, 
also called "statements".

Three terms make triples: 
just binary relations, 
never more nor less.

The triple-nature: 
subject's first, then predicate, 
followed by object.

These are positions: 
the terms fill these positions
to make the triple.

Terms come in flavours: 
either URI, bNode, 
or string-literal.

Example triples: 
"Fred likes Trucks", "Jane loves Mary"; 
Subject, Verb, Object.

"Fred" and "likes" and "Trucks", 
the terms of the examples, 
should be URIs.

(Terms are also called:
Symbols, Names, all sorts of things;
it rains synonyms.

But Terms are like words,
they denote, not are, concepts; 
Sandro tells me so).

RDF Syntaxes

There is one model, 
but so many syntaxes!
You've a motley choice.

These are the main three:
first, XML RDF; 
then, Notation3.

Also: N-Triples--
a former N3 subset, 
now its own format.

The first is verbose, 
being based on XML, 
but Recommended.

N3 is quite strange: 
Tones of Timblian Logic; 
Enchanting syntax.

NTriples are plain
and very easy to parse; 
used for test-cases.

NT examples: 
"as simple as: " _:a <b#c> .
<#easier> <#than> _:Pie .

I favour N3, 
But it's a complex issue.
Language wars are fun!

Learning XML RDF

For just this section, 
RDF is pronounced "roo-duff".
Sorry about that.

The best way to learn
is by example. Therefore, 
here are some templates:

(Assume these are wrapped
in <rdf:RDF> tag pairs
and right namespaces.)

<!-- it's a URI -->


Note that I made-up
the "the:" scheme, which is not good. 
Use existing schemes.

The default namespace
is predicateQName's base, 
and must be declared.

RDF's namespace name
will not fit well in haiku
but is found here.

Predicates can't end
with non XML-name chars.
That's a bug "feature".

<!-- a URI still -->

   </predicate> <!-- (a literal) --> 

The main change here
is that the object is now
a string literal.

That is all you need
to start XML RDF,
but there are shortcuts.

   pred="literalObj" />

that syntax is called
"abbreviated syntax", 
and confuses all.

The next example
is of what's called a "typed node"; 
it's in common use.

   rdf:about="some:painting" />
this is the same as:

<!-- (another fake scheme) -->

<!-- the pred: --><rdf:type
MasterfulPainting" />

Even without the comments
typed nodes are terser.

For more great features, 
like parseTypes and datatypes, 
check out the new spec.

RDF Vocabularies and the Layer Cake

group lots of related terms
under namespace bough.

People produce these
for others to use elsewhere; 
often designed well.

Lots of main concepts
already have URIs.
Search, don't just invent.

The first stopping point
is the W3C's
RDF Schema.

The next level up
is called DAML+OIL, 
soon to be: OWL.

Then, we have logic, 
as in TimBL's log: schema, 
followed by proof, trust.

Branching sideways now, 
there is Dublin Core and FOAF, 
and RSS too.

You can mix and match
for your own applications, 
but don't make a mess.

Study terms' meanings
lest they bite you in the ass.
Fix now, not later.

RDF Schema

RDF Schema
lets you define resources
in a basic way.

is the class of all classes.
It's a class itself.

Membership of class
is shown with rdf:type; 
in English: "is a".

A short example: 
Fred rdf:type Human
"Human" is the Class.

You will also find
that rdf:Property
is a useful class.

Document your terms
with rdfs:label; 
be kind to humans.

Applications of the Semantic Web

Syndication stuff
great for making news feeds from
ephemeral, though.

Further Reading Whose Titles Fit in Haiku

RDF Syntax
The Semantic Web In Breadth
Striped XRDF

RDF Strawman
The Notation3 Primer
Notation3 Guide

The Semantic Web Roadmap
Semantic Web: Points


No need to panic: 
if you don't understand it...'re on the right track!
Sean B. Palmer