Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2010-10-14 07:08:02
Size: 971
Editor: SamatJain
Comment: Flesh out Representations
Revision 3 as of 2011-11-03 21:08:07
Size: 2370
Editor: SamatJain
Comment: Better RDFa date example
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
'''RDF''' or '''Resource Description Framework''' is a generic model for describing objects and data. '''RDF''' or '''Resource Description Framework''' is a generic model for describing objects and data. The basic unit of RDF is the triple, which consists of a subject, predicate, and object.
Line 14: Line 14:

== RDFa ==

'''RDFa''' is a mechanism for embedding RDF triples in HTML attributes.

=== Discussion ===

 * [[http://www.jenitennison.com/blog/node/124|HTML5/RDFa arguments]]: why RDFa isn't being included in HTML5

=== Representing dates ===

Since HTML5's <time> element is dead, something like:

{{{#!highlight html
<span property="dc:date">2011-11-03</span>
}}}

or

{{{#!highlight html
<span prefix="dc: http://purl.org/dc/elements/1.1/ xsd: http://www.w3.org/2001/XMLSchema" property="dc:date" content="2011-11-03T03:00Z" datatype="xsd:datetime">
Nov 03, 2011
</span>
}}}

where the date is represented in [[http://www.w3.org/TR/NOTE-datetime|W3CDTF]] (a variant of ISO 8601).


=== Competing formats ===

Microformats are oriented around special attribute values that go into elements' class= attributes. It has no support for namesspaces. It is not compatible with RDF.

Microdata is a section of the draft [[HTML5]] specification that adds a set of new attributes (itemprop, etc) to better expose data than microformats. Has some kind of support for namespaces. It can be made compatible with RDF.

 * [[http://blog.foolip.org/2009/08/23/microformats-vs-rdfa-vs-microdata/|Microformats vs RDFa vs Microdata]]: great article contrasting the three competing formats

RDF or Resource Description Framework is a generic model for describing objects and data. The basic unit of RDF is the triple, which consists of a subject, predicate, and object.

Representations

RDF/XML is a common representation, and unfortunately is intimidating, miserable to work with by hand, and just barely gets by as human unreadable (it's designed for machine consumption).

RDF/N-triples (aka RDF/N3) is a quick-and-easy representation by Tim-Berners Lee. He has a beginner's N3 primer.

Turtle is another natural language-looking, N3-like syntax by Dave Beckett.

RDF/JSON is a description for RDF in JSON, perfect for use in browser-based web applications. Freebase also uses some kind of RDF-in-JSON representation, though different.

Dave Beckett has a summary on various RDF representations in 2010.

RDFa

RDFa is a mechanism for embedding RDF triples in HTML attributes.

Discussion

Representing dates

Since HTML5's <time> element is dead, something like:

   1 <span property="dc:date">2011-11-03</span>

or

   1 <span prefix="dc: http://purl.org/dc/elements/1.1/ xsd: http://www.w3.org/2001/XMLSchema" property="dc:date" content="2011-11-03T03:00Z" datatype="xsd:datetime">
   2 Nov 03, 2011
   3 </span>

where the date is represented in W3CDTF (a variant of ISO 8601).

Competing formats

Microformats are oriented around special attribute values that go into elements' class= attributes. It has no support for namesspaces. It is not compatible with RDF.

Microdata is a section of the draft HTML5 specification that adds a set of new attributes (itemprop, etc) to better expose data than microformats. Has some kind of support for namespaces. It can be made compatible with RDF.

SamatsWiki: RDF (last edited 2011-11-15 06:48:47 by SamatJain)