Skip to content

Instantly share code, notes, and snippets.

@metade
Created October 27, 2008 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metade/20055 to your computer and use it in GitHub Desktop.
Save metade/20055 to your computer and use it in GitHub Desktop.
%h1 rdfa testing in haml
%div{ 'xmlns:dc' => "http://purl.org/dc/elements/1.1/" }
%h2{ :property => "dc:title" } The trouble with Bob
%h3{ :property => "dc:creator" } Alice
%div{ :about => "/alice/posts/jos_barbecue" }
%h2{ :property => "dc:title" } The trouble with Bob
%h3{ :property => "dc:creator" } Alice
%div{ :about => "/alice/posts/trouble_with_bob" }
%h2{ :property => "dc:title" } The trouble with Bob
The trouble with Bob is that he takes much better photos than I do:
%div{ :about => "http://example.com/bob/photos/sunset.jpg" }
%img{ :src => "http://example.com/bob/photos/sunset.jpg" }
%span{ :property => "dc:title" } Beautiful Sunset
by
%span{ :property => "dc:creator" } Bob
%div{ :typeof => "foaf:Person", 'xmlns:foaf' => "http://xmlns.com/foaf/0.1/" }
%p{ :property => "foaf:name" } Alice Birpemswick
%p
Email:
%a{ :rel => "foaf:mbox", :href=> "mailto:alice@example.com"} alice@example.com
%p
Phone:
%a{ :rel => "foaf:phone", :href => "tel:+1-617-555-7332" } +1 617.555.7332
<h1>rdfa testing</h1>
<div xmlns:dc='http://purl.org/dc/elements/1.1/'>
<h2 property='dc:title'>The trouble with Bob</h2>
<h3 property='dc:creator'>Alice</h3>
</div>
<div about='/alice/posts/jos_barbecue'>
<h2 property='dc:title'>The trouble with Bob</h2>
<h3 property='dc:creator'>Alice</h3>
</div>
<div about='/alice/posts/trouble_with_bob'>
<h2 property='dc:title'>The trouble with Bob</h2>
The trouble with Bob is that he takes much better photos than I do:
<div about='http://example.com/bob/photos/sunset.jpg'>
<img src='http://example.com/bob/photos/sunset.jpg' />
<span property='dc:title'>Beautiful Sunset</span>
by
<span property='dc:creator'>Bob</span>
</div>
</div>
<div typeof='foaf:Person' xmlns:foaf='http://xmlns.com/foaf/0.1/'>
<p property='foaf:name'>Alice Birpemswick</p>
<p>
Email:
<a href='mailto:alice@example.com' rel='foaf:mbox'>alice@example.com</a>
</p>
<p>
Phone:
<a href='tel:+1-617-555-7332' rel='foaf:phone'>+1 617.555.7332</a>
</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment