Skip to content

Instantly share code, notes, and snippets.

@metade
Created October 27, 2008 08:36
Show Gist options
  • 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:[email protected]"} [email protected]
%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:[email protected]' rel='foaf:mbox'>[email protected]</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