Skip to content

Instantly share code, notes, and snippets.

@scor
Created September 19, 2014 14:20
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 scor/eb7f36db332a46bad51b to your computer and use it in GitHub Desktop.
Save scor/eb7f36db332a46bad51b to your computer and use it in GitHub Desktop.
## RDFa markup
<ol vocab="http://schema.org/" typeof="ItemList">
<li property="itemListElement" typeof="ListItem">
<a property="item" typeof="WebPage" href="http://www.example.com/dresses">
<span property="title">Dresses</span>
</a>
<meta property="position" content="1">
</li>
› <li property="itemListElement" typeof="ListItem">
<a property="item" typeof="WebPage" href="http://www.example.com/dresses/real">
<span property="title">Real Dresses</span>
</a>
<meta property="position" content="2">
</li>
</ol>
## RDFa => Turtle
[
a schema:ItemList;
schema:itemListElement [
a schema:ListItem;
schema:item <http://www.example.com/dresses>;
schema:position "1"
], [
a schema:ListItem;
schema:item <http://www.example.com/dresses/real>;
schema:position "2"
]
] .
<http://www.example.com/dresses> a schema:WebPage;
schema:title "Dresses" .
<http://www.example.com/dresses/real> a schema:WebPage;
schema:title "Real Dresses" .
# Microdata style 1 (WebPage)
<ol itemscope="" itemtype="http://schema.org/ItemList">
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a itemprop="item" itemscope="" itemtype="http://schema.org/WebPage" href="http://www.example.com/dresses">
<span itemprop="name">Dresses</span>
</a>
<meta itemprop="position" content="1" />
</li>
› <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a itemprop="item" itemscope="" itemtype="http://schema.org/WebPage" href="http://www.example.com/dresses/real">
<span itemprop="name">Real Dresses</span>
</a>
<meta itemprop="position" content="2" />
</li>
</ol>
# Microdata style 1 => Turtle
a schema:ItemList;
schema:itemListElement ([
a schema:ListItem;
schema:item [
a schema:WebPage;
schema:name "Dresses"
];
schema:position "1"
] [
a schema:ListItem;
schema:item [
a schema:WebPage;
schema:name "Real Dresses"
];
schema:position "2"
])
# Microdata style 2 (URI)
<ol itemscope="" itemtype="http://schema.org/ItemList">
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a itemprop="item" itemtype="http://schema.org/WebPage" href="http://www.example.com/dresses">
<span itemprop="name">Dresses</span>
</a>
<meta itemprop="position" content="1" />
</li>
› <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a itemprop="item" itemtype="http://schema.org/WebPage" href="http://www.example.com/dresses/real">
<span itemprop="name">Real Dresses</span>
</a>
<meta itemprop="position" content="2" />
</li>
</ol>
# Microdata style 2 => Turtle
a schema:ItemList;
schema:itemListElement ([
a schema:ListItem;
schema:item <http://www.example.com/dresses>;
schema:name "Dresses";
schema:position "1"
] [
a schema:ListItem;
schema:item <http://www.example.com/dresses/real>;
schema:name "Real Dresses";
schema:position "2"
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment