Tutorials

From RDFaWiki

Jump to: navigation, search

Contents

Guidelines for Developing Tutorials

  • Clearly define the problem in the title
  • Expand on the title in the first paragraph so people know if they are reading the right thing
  • Use a real world example of content as a starting point
  • Incrementally annotate it in the SIMPLEST WAY POSSIBLE that addresses the problem statement
  • Use fragments for examples - complete documents are intimidating and hard to read
  • Never Never Never mention a triple nor a Bnode!

Good practice

Friend-of-a-friend (FOAF)

The Friend of a friend (FOAF) vocabulary is used to mark up people and their relationships with one another.

vCard

  • hcard a demonstration of the use of RDFa (including FOAF, Dublin Core and W3C PIM vocabularies) in conjunction with Microformats (including hCard and rel-tag)
  • An example and mini howto about how to combine Foaf with hCard called Extending hCard using RDFa.

vEvent

RSS 1.0

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      xmlns:rss="http://www.w3.org/1999/02/22-rdf-syntax-ns" 
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:lang="en">
        <head profile="http://www.w3.org/1999/xhtml/vocab" typeof="rss:channel" about="$RSS_FEED">
                <title property="rss:title">Test page</title>
		<link href="$LINK" rel="rss:link"/>
		<meta property="rss:description" content="$DESCRIPTION"/>
		<meta property="rss:items">
			<meta property="rdf:Seq">
				<link rel="rdf:li" href="$LINK1"/>
			</meta>
		</meta>
	</head>
        <body>
                <div>
                        <div typeof="rss:item" about="$LINK1" id="n1">
                                <h3 property="rss:title">$TITLE</h3>
                                <a href="$LINK1" rel="rss:link"/>
                                <p property="rss:description">An RSS item.</p>
                        </div>
                </div>
	</body>
</html>

Semantically-Interlinked Online Communities (SIOC)

The Semantically-Interlinked Online Communities (SIOC) vocabulary is used to mark up discussion on the Web, such as blogs, online forums, mailing lists, etc.

Geolocations

The Basic Geo Vocabulary can be used to quickly indicate where things are. We have a step by step tutorial.

There is also an example of how this may be done using the Geo Microformat from hCard called hCard+RDFa.

Further resources

See also the RDFa Recipes page.

If you want to dive-in deeper, you may also want to have a look at the RDFa publications page.

In the following, resources regarding specific topics or domains are listed.

Healthcare & Life Sciences

Personal tools