Triples are discovered
by:
All subjects, properties, and object values are contained in attributes.
Subjects and properties are named by URIs but we use shorthands to refer to them.
Personbecomes
http://schema.org/Person)
schema:Personbecomes
http://schema.org/Person)
licensebecomes
http://www.w3.org/1999/xhtml/vocab#license)
vocab | Identifies the default vocabulary (a URI). |
typeof | The list of types of a subject. A list of URI, CURIE, or terms. |
resource | Identifies the subject resource (a URI). |
property | The URI of the property relation. A list of URI, CURIE, or terms. |
prefix | A set of prefix mappings to URIs that are in-scope for the descendants. |
Choose a default vocabulary:
<html> <head><title>Example</title></head> <body vocab="http://schema.org/"> <!-- Remember, the default vocabulary concatenates with terms. --> </body> </html>
You can use any URI but we'll use schema.org for this example.
The resource
attribute identifies a subject by URI:
<div resource="http://milowski.com/alex"> <p property="name">Alex Milowski</p> </div>
Subjects can also be identified via links (e.g. @href).
The typeof
attribute induces a subject that may not be named:
<div typeof="http://schema.org/Person"> <p property="name">Alex Milowski</p> </div>
The property
attribute identifies a property and the value comes from:
Full RDFa has many ways to do the same thing...
A property value can be another subject:
<div property="affiliation" typeof="Organization"> <p property="name">Mojang</p> </div>
and sometime you need to name the subject:
<div property="affiliation" resource="http://mojang.com/" typeof="Organization"> <p property="name">Mojang</p> </div>
In both cases, the current subject will have a property affiliation
whose object value is a subject URI.
Alex Milowski
milowski@ischool.berkeley.edu
TTh - 12:45-13:45
School of Information, University of California, Berkeley
<div class="slide" vocab="http://schema.org/" prefix="ischool: http://ischool.berkeley.edu/"> <h1>Full Example</h1> <div class="two-column"> <div typeof="Person"> <p property="name">Alex Milowski</p> <p property="email">milowski@ischool.berkeley.edu</p> <p property="ischool:officeHours">TTh - 12:45-13:45</p> <div property="affiliation" resource="http://ischool.berkeley.edu/" typeof="Organization"> <p><span property="department">School of Information</span>, <span property="name">University of California, Berkeley</span></p> </div> </div> <pre> </pre> </div> </div>