From W3C Wiki
RDF-3T - RDF in Machine Tags
RDF-3T is a Metaformat(a language used to describe another language) that uses a Triple Tag syntax to describe RDF triples in XHTML. The Wikipedia definition of a triple tag says...
A triple tag is a tag that uses a special syntax to define extra information about the tag, making it easier or more meaningful for interpretation by a computer program. Triple tags comprise three parts: a namespace, a predicate and a value.
Triple Tags were first devised in 2004 by Mikel Maron as an experiment in using del.icio.us as a collaborative geo-annotation database. This Method was adopted by Flicr who used the Technical term Machine Tags when referring to Triple Tags. RDF-3T uses Machine Tags and a minimal set of standard html attributes to provide easily discoverable RDF triples or NTriples on any xhtml page.
RDF-3T uses a minimal set of three standard html attributes.
- A unique Identifier used in combination with item as a relative url of the subject. The contents of an id are either a plain text string or a CURIE
- Also a unique Identifier used in combination with item as an absolute url of the subject
- This attribute assigns a class name or set of class names to an element and is used for general syntax processing.
RDF-3T uses the following syntax,
[ prefix ] ' : ' [ term ] ' = ' [ value ]
- Is a Prefix, Term seperator.
- The string after equals(=) is the value of the object that you are describing.
Define a prefix
Define a prefix by using a <meta> tag in the <head>...</head> of a page using the meta name "prefix", you should also define a scheme using using the meta attribute scheme with the value of your chosen prefix. The content attribute should contain the url of your prefix example:
<meta name="prefix" scheme="foaf" content=" http://xmlns.com/foaf/0.1/ "/>
Reference a Term using a "follow your nose" principle and easy RDF-3T statements.
RDF-3T has eight possible Values.
- An instance of a RDF class that may contain a set of RDF classes, What type of thing this is.
- Content is Text or Plain literal.
- A RDF resource type, the values will be either @src or @href
- RDF datatype XMLLiteral, the contents are html markup.
- A relative hash uri reference of an id example: foaf:maker=#thatid
hash underscore (#_)::
- Looks down the document for the first child item with a href attribute or an ID containing a curie if none exists the parser will generate a "blank node" example: foaf:maker=#_
- A compact uri expression of a resource examples: mo:release_type=[mo:album], rdf:type=[pim:ContactLocation] and foaf:maker=[doc:me].
- Any string after equals(=) example: dc:date=2008-12-25, a string should not contain any spaces.
The following pages are some basic tests that were used during the development of RDF-3T, they all including source snippets and conversions.
- Test 1 Publishing contact information
- Test 2 Publishing Music
- Test 3 Publishing an Article
- Test 4 FOAF in HTML 4.01 Transitional
- The RDF-3T homepage
- A blog post about RDF-3T
- Wikipedia entry on Compact URI's ( curie )
- W3C Standard CURIE Syntax 1.0
- Wikipedia entry on Metaformat's