You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4206 lines
314 KiB
4206 lines
314 KiB
<?xml version='1.0' encoding='UTF-8'?>
|
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.0//EN' 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd'>
|
|
<html dir="ltr" about="" property="dcterms:language" content="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:dcterms='http://purl.org/dc/terms/' xmlns:bibo='http://purl.org/ontology/bibo/' xmlns:foaf='http://xmlns.com/foaf/0.1/' xmlns:xsd='http://www.w3.org/2001/XMLSchema#'>
|
|
<head>
|
|
<title>RDFa Core 1.1</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
|
|
<!--
|
|
=== NOTA BENE === For the three scripts below, if your spec resides on dev.w3 you can check them out in the same tree and use relative links so that they'll work offline, -->
|
|
|
|
<style type="text/css">
|
|
code { font-family: monospace; }
|
|
|
|
span.hilite { color: red; /* font-weight: bold */ }
|
|
|
|
li p { margin-top: 0.3em;
|
|
margin-bottom: 0.3em; }
|
|
|
|
div.explanation { background-color: #ADD8E6;
|
|
width: 80%;
|
|
margin: 12px; padding: 8px; }
|
|
div.explanation li { margin-top: 8px; }
|
|
div.explanation dd { margin: 4px; }
|
|
|
|
|
|
.adef {
|
|
font-family: monospace;
|
|
font-weight: bold;
|
|
color: #ff4500 !important;
|
|
}
|
|
|
|
.aref {
|
|
font-family: monospace;
|
|
font-weight: bold;
|
|
color: #ff4500 !important;
|
|
}
|
|
|
|
span.entity { color: red; }
|
|
|
|
span.element { color: green; }
|
|
</style>
|
|
|
|
<!-- <script src='/ReSpec.js/js/respec.js' class='remove'></script> -->
|
|
|
|
|
|
<style type="text/css">
|
|
/*****************************************************************
|
|
* ReSpec CSS
|
|
* Robin Berjon (robin at berjon dot com)
|
|
* v0.05 - 2009-07-31
|
|
*****************************************************************/
|
|
|
|
|
|
/* --- INLINES --- */
|
|
em.rfc2119 {
|
|
text-transform: lowercase;
|
|
font-variant: small-caps;
|
|
font-style: normal;
|
|
color: #900;
|
|
}
|
|
|
|
h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
|
|
h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
|
|
border: none;
|
|
}
|
|
|
|
dfn {
|
|
font-weight: bold;
|
|
}
|
|
|
|
a.internalDFN {
|
|
color: inherit;
|
|
border-bottom: medium solid #99c;
|
|
text-decoration: none;
|
|
}
|
|
|
|
a.externalDFN {
|
|
color: inherit;
|
|
border-bottom: medium dotted #ccc;
|
|
text-decoration: none;
|
|
}
|
|
|
|
a.bibref {
|
|
text-decoration: none;
|
|
}
|
|
|
|
code {
|
|
color: #ff4500;
|
|
}
|
|
|
|
|
|
/* --- WEB IDL --- */
|
|
pre.idl {
|
|
border-top: 1px solid #90b8de;
|
|
border-bottom: 1px solid #90b8de;
|
|
padding: 1em;
|
|
line-height: 120%;
|
|
}
|
|
|
|
pre.idl::before {
|
|
content: "WebIDL";
|
|
display: block;
|
|
width: 150px;
|
|
background: #90b8de;
|
|
color: #fff;
|
|
font-family: initial;
|
|
padding: 3px;
|
|
font-weight: bold;
|
|
margin: -1em 0 1em -1em;
|
|
}
|
|
|
|
.idlType {
|
|
color: #ff4500;
|
|
font-weight: bold;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/*.idlModule*/
|
|
/*.idlModuleID*/
|
|
/*.idlInterface*/
|
|
.idlInterfaceID {
|
|
font-weight: bold;
|
|
color: #005a9c;
|
|
}
|
|
|
|
.idlSuperclass {
|
|
font-style: italic;
|
|
color: #005a9c;
|
|
}
|
|
|
|
/*.idlAttribute*/
|
|
.idlAttrType, .idlFieldType {
|
|
color: #005a9c;
|
|
}
|
|
.idlAttrName, .idlFieldName {
|
|
color: #ff4500;
|
|
}
|
|
.idlAttrName a, .idlFieldName a {
|
|
color: #ff4500;
|
|
border-bottom: 1px dotted #ff4500;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/*.idlMethod*/
|
|
.idlMethType {
|
|
color: #005a9c;
|
|
}
|
|
.idlMethName {
|
|
color: #ff4500;
|
|
}
|
|
.idlMethName a {
|
|
color: #ff4500;
|
|
border-bottom: 1px dotted #ff4500;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/*.idlParam*/
|
|
.idlParamType {
|
|
color: #005a9c;
|
|
}
|
|
.idlParamName {
|
|
font-style: italic;
|
|
}
|
|
|
|
.extAttr {
|
|
color: #666;
|
|
}
|
|
|
|
/*.idlConst*/
|
|
.idlConstType {
|
|
color: #005a9c;
|
|
}
|
|
.idlConstName {
|
|
color: #ff4500;
|
|
}
|
|
.idlConstName a {
|
|
color: #ff4500;
|
|
border-bottom: 1px dotted #ff4500;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/*.idlException*/
|
|
.idlExceptionID {
|
|
font-weight: bold;
|
|
color: #c00;
|
|
}
|
|
|
|
.idlTypedefID, .idlTypedefType {
|
|
color: #005a9c;
|
|
}
|
|
|
|
.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
|
|
color: #c00;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.excName a {
|
|
font-family: monospace;
|
|
}
|
|
|
|
.idlRaises a.idlType, .excName a.idlType {
|
|
border-bottom: 1px dotted #c00;
|
|
}
|
|
|
|
.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
|
|
width: 45px;
|
|
text-align: center;
|
|
}
|
|
.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; }
|
|
.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; }
|
|
|
|
.idlImplements a {
|
|
font-weight: bold;
|
|
}
|
|
|
|
dl.attributes, dl.methods, dl.constants, dl.fields {
|
|
margin-left: 2em;
|
|
}
|
|
|
|
.attributes dt, .methods dt, .constants dt, .fields dt {
|
|
font-weight: normal;
|
|
}
|
|
|
|
.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
|
|
font-weight: bold;
|
|
color: #000;
|
|
font-family: monospace;
|
|
}
|
|
|
|
.attributes dt code, .fields dt code {
|
|
background: #ffffd2;
|
|
}
|
|
|
|
.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
|
|
color: #005a9c;
|
|
background: transparent;
|
|
font-family: inherit;
|
|
font-weight: normal;
|
|
font-style: italic;
|
|
}
|
|
|
|
.methods dt code {
|
|
background: #d9e6f8;
|
|
}
|
|
|
|
.constants dt code {
|
|
background: #ddffd2;
|
|
}
|
|
|
|
.attributes dd, .methods dd, .constants dd, .fields dd {
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
table.parameters, table.exceptions {
|
|
border-spacing: 0;
|
|
border-collapse: collapse;
|
|
margin: 0.5em 0;
|
|
width: 100%;
|
|
}
|
|
table.parameters { border-bottom: 1px solid #90b8de; }
|
|
table.exceptions { border-bottom: 1px solid #deb890; }
|
|
|
|
.parameters th, .exceptions th {
|
|
color: #fff;
|
|
padding: 3px 5px;
|
|
text-align: left;
|
|
font-family: initial;
|
|
font-weight: normal;
|
|
text-shadow: #666 1px 1px 0;
|
|
}
|
|
.parameters th { background: #90b8de; }
|
|
.exceptions th { background: #deb890; }
|
|
|
|
.parameters td, .exceptions td {
|
|
padding: 3px 10px;
|
|
border-top: 1px solid #ddd;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.parameters tr:first-child td, .exceptions tr:first-child td {
|
|
border-top: none;
|
|
}
|
|
|
|
.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
|
|
width: 100px;
|
|
}
|
|
|
|
.parameters td.prmType {
|
|
width: 120px;
|
|
}
|
|
|
|
table.exceptions table {
|
|
border-spacing: 0;
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
}
|
|
|
|
/* --- TOC --- */
|
|
.toc a {
|
|
text-decoration: none;
|
|
}
|
|
|
|
a .secno {
|
|
color: #000;
|
|
}
|
|
|
|
/* --- TABLE --- */
|
|
table.simple {
|
|
border-spacing: 0;
|
|
border-collapse: collapse;
|
|
border-bottom: 3px solid #005a9c;
|
|
}
|
|
|
|
.simple th {
|
|
background: #005a9c;
|
|
color: #fff;
|
|
padding: 3px 5px;
|
|
text-align: left;
|
|
}
|
|
|
|
.simple th[scope="row"] {
|
|
background: inherit;
|
|
color: inherit;
|
|
border-top: 1px solid #ddd;
|
|
}
|
|
|
|
.simple td {
|
|
padding: 3px 10px;
|
|
border-top: 1px solid #ddd;
|
|
}
|
|
|
|
.simple tr:nth-child(even) {
|
|
background: #f0f6ff;
|
|
}
|
|
|
|
/* --- DL --- */
|
|
.section dd > p:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.section dd > p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.section dd {
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
.section dl.attrs dd, .section dl.eldef dd {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* --- EXAMPLES --- */
|
|
pre.example {
|
|
border-top: 1px solid #ff4500;
|
|
border-bottom: 1px solid #ff4500;
|
|
padding: 1em;
|
|
margin-top: 1em;
|
|
}
|
|
|
|
pre.example::before {
|
|
content: "Example";
|
|
display: block;
|
|
width: 150px;
|
|
background: #ff4500;
|
|
color: #fff;
|
|
font-family: initial;
|
|
padding: 3px;
|
|
font-weight: bold;
|
|
margin: -1em 0 1em -1em;
|
|
}
|
|
|
|
/* --- EDITORIAL NOTES --- */
|
|
.issue {
|
|
padding: 1em;
|
|
border: 1px solid #f00;
|
|
background: #ffc;
|
|
}
|
|
|
|
.issue::before {
|
|
content: "Issue";
|
|
display: block;
|
|
width: 150px;
|
|
margin: -1.5em 0 0.5em 0;
|
|
font-weight: bold;
|
|
border: 1px solid #f00;
|
|
background: #fff;
|
|
padding: 3px 1em;
|
|
}
|
|
|
|
.note {
|
|
padding: 1em;
|
|
border: 2px solid #cff6d9;
|
|
background: #e2fff0;
|
|
}
|
|
|
|
.note::before {
|
|
content: "Note";
|
|
display: block;
|
|
width: 150px;
|
|
margin: -1.5em 0 0.5em 0;
|
|
font-weight: bold;
|
|
border: 1px solid #cff6d9;
|
|
background: #fff;
|
|
padding: 3px 1em;
|
|
}
|
|
|
|
/* --- SYNTAX HIGHLIGHTING --- */
|
|
pre.sh_sourceCode {
|
|
background-color: white;
|
|
color: black;
|
|
font-style: normal;
|
|
font-weight: normal;
|
|
}
|
|
|
|
pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; } /* language keywords */
|
|
pre.sh_sourceCode .sh_type { color: #666; } /* basic types */
|
|
pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */
|
|
pre.sh_sourceCode .sh_string { color: red; font-family: monospace; } /* strings and chars */
|
|
pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */
|
|
pre.sh_sourceCode .sh_specialchar { color: #ffc0cb; font-family: monospace; } /* e.g., \n, \t, \\ */
|
|
pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; } /* comments */
|
|
pre.sh_sourceCode .sh_number { color: purple; } /* literal numbers */
|
|
pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; } /* e.g., #include, import */
|
|
pre.sh_sourceCode .sh_symbol { color: blue; } /* e.g.+ */
|
|
pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */
|
|
pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */
|
|
pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; } /* TODO and FIXME */
|
|
|
|
/* Predefined variables and functions (for instance glsl) */
|
|
pre.sh_sourceCode .sh_predef_var { color: #00008B; }
|
|
pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
|
|
|
|
/* for OOP */
|
|
pre.sh_sourceCode .sh_classname { color: teal; }
|
|
|
|
/* line numbers (not yet implemented) */
|
|
pre.sh_sourceCode .sh_linenum { display: none; }
|
|
|
|
/* Internet related */
|
|
pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
|
|
|
|
/* for ChangeLog and Log files */
|
|
pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
|
|
pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
|
|
pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
|
|
|
|
/* for Prolog, Perl... */
|
|
pre.sh_sourceCode .sh_variable { color: #006400; }
|
|
|
|
/* for LaTeX */
|
|
pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
|
|
pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
|
|
pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
|
|
pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
|
|
pre.sh_sourceCode .sh_argument { color: #006400; }
|
|
pre.sh_sourceCode .sh_optionalargument { color: purple; }
|
|
pre.sh_sourceCode .sh_math { color: orange; }
|
|
pre.sh_sourceCode .sh_bibtex { color: blue; }
|
|
|
|
/* for diffs */
|
|
pre.sh_sourceCode .sh_oldfile { color: orange; }
|
|
pre.sh_sourceCode .sh_newfile { color: #006400; }
|
|
pre.sh_sourceCode .sh_difflines { color: blue; }
|
|
|
|
/* for css */
|
|
pre.sh_sourceCode .sh_selector { color: purple; }
|
|
pre.sh_sourceCode .sh_property { color: blue; }
|
|
pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
|
|
|
|
/* other */
|
|
pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
|
|
pre.sh_sourceCode .sh_paren { color: red; }
|
|
pre.sh_sourceCode .sh_attribute { color: #006400; }
|
|
|
|
</style><link href="http://www.w3.org/StyleSheets/TR/W3C-WD" rel="stylesheet" type="text/css" charset="utf-8" /></head>
|
|
<body style="display: inherit; "><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" /></a></p><h1 property="dcterms:title" class="title" id="title">RDFa Core 1.1</h1><h2 property="bibo:subtitle" id="subtitle">Syntax and processing rules for embedding RDF through attributes</h2><h2 property="dcterms:issued" datatype="xsd:dateTime" content="2011-12-15T06:00:00+0000" id="w3c-working-draft-15-december-2011"><acronym title="World Wide Web Consortium">W3C</acronym> Working Draft 15 December 2011</h2><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2011/WD-rdfa-core-20111215/">http://www.w3.org/TR/2011/WD-rdfa-core-20111215/</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/rdfa-core/">http://www.w3.org/TR/rdfa-core/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://www.w3.org/2010/02/rdfa/drafts#rdfa-core">http://www.w3.org/2010/02/rdfa/drafts#rdfa-core</a></dd><dt>Previous version:</dt><dd><a rel="dcterms:replaces" href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331/">http://www.w3.org/TR/2011/WD-rdfa-core-20110331/</a></dd><dt>Latest recommendation:</dt><dd><a href="http://www.w3.org/TR/rdfa-syntax/">http://www.w3.org/TR/rdfa-syntax/</a></dd><dt>Editors:</dt><dd rel="bibo:editor"><span typeof="foaf:Person"><span property="foaf:name">Ben Adida</span>, Creative Commons <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:ben@adida.net">ben@adida.net</a></span> </span>
|
|
</dd>
|
|
<dd rel="bibo:editor"><span typeof="foaf:Person"><span property="foaf:name">Mark Birbeck</span>, webBackplane <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:mark.birbeck@webBackplane.com">mark.birbeck@webBackplane.com</a></span> </span>
|
|
</dd>
|
|
<dd rel="bibo:editor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Shane McCarron" href="http://blog.halindrome.com">Shane McCarron</a>, Applied Testing and Technology, Inc. <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:shane@aptest.com">shane@aptest.com</a></span> </span>
|
|
</dd>
|
|
<dd rel="bibo:editor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Ivan Herman" href="http://www.w3.org/People/Ivan/">Ivan Herman</a>, <acronym title="World Wide Web Consortium">W3C</acronym> <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:ivan@w3.org">ivan@w3.org</a></span> </span>
|
|
</dd>
|
|
</dl><p>This document is also available in these non-normative formats: <a href="rdfa-core-diff.html">Diff from previous Working Draft</a>, <a href="rdfa-core.ps">PostScript version</a>, and <a href="rdfa-core.pdf">PDF version</a>.</p><p class="copyright"><a rel="license" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2007-2011 <span rel="dcterms:publisher"><span typeof="foaf:Organization"><a rel="foaf:homepage" property="foaf:name" content="World Wide Web Consotrium" href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup></span></span> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. <acronym title="World Wide Web Consortium">W3C</acronym> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p><hr /></div>
|
|
<div id="abstract" class="introductory section" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" about="#abstract"><h2>Abstract</h2>
|
|
<p>The current Web is primarily made up of an enormous number of documents
|
|
that have been created using HTML. These documents contain significant
|
|
amounts of structured data, which is largely unavailable to tools and
|
|
applications. When publishers can express this data more completely, and
|
|
when tools can read it, a new world of user functionality becomes
|
|
available, letting users transfer structured data between applications
|
|
and web sites, and allowing browsing applications to improve the user
|
|
experience: an event on a web page can be directly imported into a
|
|
user's desktop calendar; a license on a document can be detected so that
|
|
users can be informed of their rights automatically; a photo's creator,
|
|
camera setting information, resolution, location and topic can be
|
|
published as easily as the original photo itself, enabling structured
|
|
search and sharing.</p>
|
|
<p>RDFa Core is a specification for attributes to express structured data
|
|
in any markup language. The embedded data already available in the
|
|
markup language (e.g., XHTML) can often be reused by the RDFa markup, so
|
|
that publishers don't need to repeat significant data in the document
|
|
content. The underlying abstract representation is RDF [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-PRIMER">RDF-PRIMER</a></cite>],
|
|
which lets publishers build their own vocabulary, extend others, and
|
|
evolve their vocabulary with maximal interoperability over time. The
|
|
expressed structure is closely tied to the data, so that rendered data
|
|
can be copied and pasted along with its relevant structure.</p>
|
|
<p>The rules for interpreting the data are generic, so that there is no
|
|
need for different rules for different formats; this allows authors and
|
|
publishers of data to define their own formats without having to update
|
|
software, register formats via a central authority, or worry that two
|
|
formats may interfere with each other.</p>
|
|
<p>RDFa shares some of the same goals with microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>].
|
|
Whereas microformats specify both a syntax for embedding structured data
|
|
into HTML documents and a vocabulary of specific terms for each
|
|
microformat, RDFa specifies only a syntax and relies on independent
|
|
specification of terms (often called vocabularies or taxonomies) by
|
|
others. RDFa allows terms from multiple independently-developed
|
|
vocabularies to be freely intermixed and is designed such that the
|
|
language can be parsed without knowledge of the specific vocabulary
|
|
being used. </p>
|
|
<p>This document is a detailed syntax specification for RDFa, aimed at:</p>
|
|
<ul>
|
|
<li>those looking to create an RDFa Processor, and who therefore need a
|
|
detailed description of the parsing rules;</li>
|
|
<li>those looking to integrate RDFa into a new markup language;</li>
|
|
<li>those looking to recommend the use of RDFa within their
|
|
organization, and who would like to create some guidelines for their
|
|
users;</li>
|
|
<li>anyone familiar with RDF, and who wants to understand more about
|
|
what is happening 'under the hood', when an RDFa Processor runs.</li>
|
|
</ul>
|
|
<p> For those looking for an introduction to the use of RDFa and some
|
|
real-world examples, please consult the <a href="http://www.w3.org/TR/xhtml-rdfa-primer/">RDFa
|
|
|
|
Primer</a>.</p>
|
|
<div typeof="bibo:Chapter" about="#how-to-read-this-document" class="section">
|
|
<h3 id="how-to-read-this-document">How to Read this Document</h3>
|
|
<p>First, if you are not familiar with either RDFa <em>or</em> RDF, and
|
|
simply want to add RDFa to your documents, then you may find the RDFa
|
|
Primer [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-PRIMER">RDFA-PRIMER</a></cite>] to be a better introduction.</p>
|
|
<p>If you are already familiar with RDFa, and you want to examine the
|
|
processing rules — perhaps to create an RDFa Processor — then you'll
|
|
find the <a href="#s_model">Processing Model</a> section of most
|
|
interest. It contains an overview of each of the processing steps,
|
|
followed by more detailed sections, one for each rule.</p>
|
|
<p>If you are not familiar with RDFa, but you <em>are</em> familiar
|
|
with RDF, then you might find reading the <a href="#s_Syntax_overview">Syntax
|
|
|
|
Overview</a> useful, before looking at the <a href="#s_model">Processing
|
|
|
|
Model</a> since it gives a range of examples of markup that use
|
|
RDFa. Seeing some examples first should make reading the processing
|
|
rules easier.</p>
|
|
<p>If you are not familiar with RDF, then you might want to take a look
|
|
at the section on <a href="#s_rdfterminology">RDF Terminology</a>
|
|
before trying to do too much with RDFa. Although RDFa is designed to
|
|
be easy to author — and authors don't need to understand RDF to use it
|
|
— anyone writing applications that <em>consume</em> RDFa will need to
|
|
understand RDF. There is a lot of material about RDF on the web, and a
|
|
growing range of tools that support RDFa, this document only contains
|
|
enough background on RDF to make the goals of RDFa more clear.</p>
|
|
<p class="note">RDFa is a way of expressing <em>RDF</em>-style
|
|
relationships using simple attributes in existing markup languages
|
|
such as HTML. RDF is fully internationalized, and permits the use of
|
|
Internationalized Resource Identifiers, or IRIs. You will see the term
|
|
'IRI' used throughout this specification. Even if you are not familiar
|
|
with the term IRI, you probably have seen the term 'URI' or 'URL'.
|
|
IRIs are an extension of URIs that permits the use of characters
|
|
outside those of plain ASCII. RDF allows the use of these characters,
|
|
and so does RDFa. This specification has been careful to use the
|
|
correct term, IRI, to make it clear that this is the case.</p>
|
|
</div>
|
|
</div><div id="sotd" class="introductory section" typeof="bibo:Chapter" about="#sotd"><h2>Status of This Document</h2><p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current <acronym title="World Wide Web Consortium">W3C</acronym> publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><acronym title="World Wide Web Consortium">W3C</acronym> technical reports index</a> at http://www.w3.org/TR/.</em></p>
|
|
|
|
<!-- <p>This document has been reviewed by W3C Members, by software
|
|
developers, and by other W3C groups and interested parties, and isendorsed by the Director as a W3C Recommendation. It is a stabledocument and may be used as reference material or cited from anotherdocument. W3C's role in making the Recommendation is to draw attention
|
|
to the specification and to promote its widespread deployment. Thisenhances the functionality and interoperability of the Web.</p> -->
|
|
|
|
<p>This version reflects changes made as a result of comments received
|
|
during a second Last Call period. That document was widely reviewed and
|
|
the Working Group has made significant improvements and clarifications
|
|
as a result. The Working Group believes that all comments received
|
|
during the last call have been addressed.</p>
|
|
<p>This is a revision of RDFa Syntax 1.0 [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-SYNTAX">RDFA-SYNTAX</a></cite>]. Once development
|
|
is complete, if accepted by the <acronym title="World Wide Web Consortium">W3C</acronym> membership, this document will
|
|
supersede the <a href="http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014">previous
|
|
|
|
Recommendation</a>. There are a number of substantive differences
|
|
between this version and its predecessor, including:</p>
|
|
<ol>
|
|
<li>The removal of the specific rules for XHTML - these are now defined
|
|
in XHTML+RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-XHTML-RDFA">XHTML-RDFA</a></cite>]</li>
|
|
<li>An expansion of the datatypes of some RDFa attributes so that they
|
|
can contain Terms, CURIES, or Absolute IRIs.</li>
|
|
<li>Host languages are permitted to define collections of default terms,
|
|
default prefix mappings, and a default vocabulary.</li>
|
|
<li>The ability to define a default vocabulary to use for Terms that are
|
|
undefined.</li>
|
|
<li>Terms are required to be compared in a case-insensitive manner.</li>
|
|
<li>A richer behavior of the @property attribute, that can replace, in many cases the
|
|
@rel attribute.</li>
|
|
<li>A slightly different handling of @typeof, making it better adapted to practical usage.</li>
|
|
</ol>
|
|
<p>A <a href="http://rdfa.digitalbazaar.com/test-suite/">sample test
|
|
harness</a> is available. This set of tests is not intended to be
|
|
exhaustive. Users may find the tests to be useful examples of RDFa
|
|
usage.
|
|
|
|
<!--
|
|
An <a href="http://www.w3.org/2006/07/SWD/RDFa/implementation-report/">implementation report</a> lists several implementationsof this specification tested during the Candidate Recommendationperiod. A community-maintained <a href="http://rdfa.info/rdfa-implementations/">Wiki page</a> includes subsequent updates. -->
|
|
|
|
</p>
|
|
<p>This document was published by the <a href="http://www.w3.org/2010/02/rdfa">RDFa Working Group</a> as a Working Draft. This document is intended to become a <acronym title="World Wide Web Consortium">W3C</acronym> Recommendation. If you wish to make comments regarding this document, please send them to <a href="mailto:public-rdfa-wg@w3.org">public-rdfa-wg@w3.org</a> (<a href="mailto:public-rdfa-wg-request@w3.org?subject=subscribe">subscribe</a>, <a href="http://lists.w3.org/Archives/Public/public-rdfa-wg/">archives</a>). All feedback is welcome.</p><p>Publication as a Working Draft does not imply endorsement by the <acronym title="World Wide Web Consortium">W3C</acronym> Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>. <acronym title="World Wide Web Consortium">W3C</acronym> maintains a <a href="http://www.w3.org/2004/01/pp-impl/44350/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>.</p></div><div id="toc" typeof="bibo:Chapter" about="#toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#s_motivation" class="tocxref"><span class="secno">1. </span>Motivation</a></li><li class="tocline"><a href="#s_Syntax_overview" class="tocxref"><span class="secno">2. </span>Syntax Overview</a><ul class="toc"><li class="tocline"><a href="#rdfa-attributes" class="tocxref"><span class="secno">2.1 </span>The RDFa Attributes</a></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">2.2 </span>Examples</a></li></ul></li><li class="tocline"><a href="#s_rdfterminology" class="tocxref"><span class="secno">3. </span>RDF Terminology</a><ul class="toc"><li class="tocline"><a href="#statements" class="tocxref"><span class="secno">3.1 </span>Statements</a></li><li class="tocline"><a href="#triples" class="tocxref"><span class="secno">3.2 </span>Triples</a></li><li class="tocline"><a href="#T-IRI-reference" class="tocxref"><span class="secno">3.3 </span>IRI references</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">3.4 </span>Plain literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">3.5 </span>Typed literals</a></li><li class="tocline"><a href="#turtle" class="tocxref"><span class="secno">3.6 </span>Turtle</a></li><li class="tocline"><a href="#graphs" class="tocxref"><span class="secno">3.7 </span>Graphs</a></li><li class="tocline"><a href="#compact-uri-expressions" class="tocxref"><span class="secno">3.8 </span>Compact URI Expressions</a></li><li class="tocline"><a href="#markup-fragments-and-rdfa" class="tocxref"><span class="secno">3.9 </span>Markup Fragments and RDFa</a></li><li class="tocline"><a href="#a-description-of-rdfa-in-rdf-terms" class="tocxref"><span class="secno">3.10 </span>A description of RDFa in RDF terms</a></li></ul></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">4. </span>Conformance</a><ul class="toc"><li class="tocline"><a href="#processorconf" class="tocxref"><span class="secno">4.1 </span>RDFa Processor Conformance</a></li><li class="tocline"><a href="#hostlangconf" class="tocxref"><span class="secno">4.2 </span>RDFa Host Language Conformance</a></li><li class="tocline"><a href="#xmlrdfaconformance" class="tocxref"><span class="secno">4.3 </span>XML+RDFa Document Conformance</a></li></ul></li><li class="tocline"><a href="#s_syntax" class="tocxref"><span class="secno">5. </span>Attributes and Syntax</a><ul class="toc"><li class="tocline"><a href="#white_space" class="tocxref"><span class="secno">5.1 </span>White space within attribute values</a></li></ul></li><li class="tocline"><a href="#s_curies" class="tocxref"><span class="secno">6. </span>CURIE Syntax Definition</a><ul class="toc"><li class="tocline"><a href="#why-curies-and-not-qnames" class="tocxref"><span class="secno">6.1 </span>Why CURIEs and not QNames?</a></li></ul></li><li class="tocline"><a href="#s_model" class="tocxref"><span class="secno">7. </span>Processing Model</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">7.1 </span>Overview</a></li><li class="tocline"><a href="#evaluation-context" class="tocxref"><span class="secno">7.2 </span>Evaluation Context</a></li><li class="tocline"><a href="#s_chaining" class="tocxref"><span class="secno">7.3 </span>Chaining</a></li><li class="tocline"><a href="#s_curieprocessing" class="tocxref"><span class="secno">7.4 </span>CURIE and IRI Processing</a><ul class="toc"><li class="tocline"><a href="#scoping-of-prefix-mappings" class="tocxref"><span class="secno">7.4.1 </span>Scoping of Prefix Mappings</a></li><li class="tocline"><a href="#general-use-of-curies-in-attributes" class="tocxref"><span class="secno">7.4.2 </span>General Use of CURIEs in Attributes</a></li><li class="tocline"><a href="#s_terms" class="tocxref"><span class="secno">7.4.3 </span>General Use of Terms in Attributes</a></li><li class="tocline"><a href="#use-of-curies-in-specific-attributes" class="tocxref"><span class="secno">7.4.4 </span>Use of CURIEs in Specific Attributes</a></li><li class="tocline"><a href="#s_blankNodes" class="tocxref"><span class="secno">7.4.5 </span>Referencing Blank Nodes</a></li></ul></li><li class="tocline"><a href="#s_sequence" class="tocxref"><span class="secno">7.5 </span>Sequence</a></li><li class="tocline"><a href="#processor-status" class="tocxref"><span class="secno">7.6 </span>Processor Status</a><ul class="toc"><li class="tocline"><a href="#accessing-the-processor-graph" class="tocxref"><span class="secno">7.6.1 </span>Accessing the Processor Graph</a></li><li class="tocline"><a href="#processor-graph-terms" class="tocxref"><span class="secno">7.6.2 </span>Processor Graph Terms</a></li></ul></li><li class="tocline"><a href="#vocabulary-expansion" class="tocxref"><span class="secno">7.7 </span>Vocabulary Expansion</a></li></ul></li><li class="tocline"><a href="#s_rdfaindetail" class="tocxref"><span class="secno">8. </span>RDFa Processing in detail</a><ul class="toc"><li class="tocline"><a href="#changing-the-evaluation-context" class="tocxref"><span class="secno">8.1 </span>Changing the evaluation context</a><ul class="toc"><li class="tocline"><a href="#setting-the-current-subject" class="tocxref"><span class="secno">8.1.1 </span>Setting the current subject</a><ul class="toc"><li class="tocline"><a href="#the-current-document" class="tocxref"><span class="secno">8.1.1.1 </span>The current document</a></li><li class="tocline"><a href="#using--about" class="tocxref"><span class="secno">8.1.1.2 </span>Using <span class="aref formerLink aref" title="about">@about</span></a></li><li class="tocline"><a href="#typing-resources-with--typeof" class="tocxref"><span class="secno">8.1.1.3 </span>Typing resources with <span class="aref formerLink aref" title="typeof">@typeof</span></a><ul class="toc"><li class="tocline"><a href="#chaining-with--property-and--typeof" class="tocxref"><span class="secno">8.1.1.3.1 </span>Chaining with <span class="aref formerLink aref" title="property">@property</span> and <span class="aref formerLink aref" title="typeof">@typeof</span></a></li></ul></li><li class="tocline"><a href="#determining-the-subject-with-neither--about-nor--typeof" class="tocxref"><span class="secno">8.1.1.4 </span>Determining the subject with neither <span class="aref formerLink aref" title="about">@about</span> nor <span class="aref formerLink aref" title="typeof">@typeof</span></a><ul class="toc"><li class="tocline"><a href="#inheriting-subject-from--resource" class="tocxref"><span class="secno">8.1.1.4.1 </span>Inheriting subject from <span class="aref formerLink aref" title="resource">@resource</span></a></li><li class="tocline"><a href="#inheriting-an-anonymous-subject" class="tocxref"><span class="secno">8.1.1.4.2 </span>Inheriting an anonymous subject</a></li></ul></li></ul></li></ul></li><li class="tocline"><a href="#s_Completing_Incomplete_Triples" class="tocxref"><span class="secno">8.2 </span>Completing incomplete triples'</a></li><li class="tocline"><a href="#object-resolution" class="tocxref"><span class="secno">8.3 </span>Object resolution</a><ul class="toc"><li class="tocline"><a href="#object-resolution-for-the--property-attribute" class="tocxref"><span class="secno">8.3.1 </span>Object resolution for the <span class="aref formerLink aref" title="property">@property</span> attribute</a><ul class="toc"><li class="tocline"><a href="#plain-literals-1" class="tocxref"><span class="secno">8.3.1.1 </span>Plain Literals</a><ul class="toc"><li class="tocline"><a href="#language-tags" class="tocxref"><span class="secno">8.3.1.1.1 </span>Language Tags</a></li></ul></li><li class="tocline"><a href="#typed-literals-1" class="tocxref"><span class="secno">8.3.1.2 </span>Typed literals</a></li><li class="tocline"><a href="#s-xml-literals" class="tocxref"><span class="secno">8.3.1.3 </span><span title="xml-literals">XML Literals</span></a></li></ul></li><li class="tocline"><a href="#iri-object-resolution" class="tocxref"><span class="secno">8.3.2 </span>IRI object resolution</a><ul class="toc"><li class="tocline"><a href="#using--resource-to-set-the-object" class="tocxref"><span class="secno">8.3.2.1 </span>Using <span class="aref formerLink aref" title="resource">@resource</span> to set the object</a></li><li class="tocline"><a href="#using--href-or--src" class="tocxref"><span class="secno">8.3.2.2 </span>Using <span class="aref formerLink aref" title="href">@href</span> or <span class="aref formerLink aref" title="src">@src</span></a></li><li class="tocline"><a href="#incomplete-triples" class="tocxref"><span class="secno">8.3.2.3 </span>Incomplete triples</a></li></ul></li></ul></li><li class="tocline"><a href="#list-generation" class="tocxref"><span class="secno">8.4 </span>List generation</a></li></ul></li><li class="tocline"><a href="#s_initialcontexts" class="tocxref"><span class="secno">9. </span>RDFa Initial Contexts</a></li><li class="tocline"><a href="#s_vocab_expansion" class="tocxref"><span class="secno">10. </span><span>RDFa Vocabulary Expansion</span></a><ul class="toc"><li class="tocline"><a href="#s_vocab_expansion_details" class="tocxref"><span class="secno">10.1 </span><span>Details of the RDFa Vocabulary
|
|
Expansion</span></a><ul class="toc"><li class="tocline"><a href="#s_vocab_entailment" class="tocxref"><span class="secno">10.1.1 </span><span>RDFa Vocabulary Entailment</span></a></li></ul></li><li class="tocline"><a href="#s_expansion_control" class="tocxref"><span class="secno">10.2 </span>Vocabulary Expansion Control of RDFa Processors</a><ul class="toc"><li class="tocline"><a href="#s_vocab_guidelines" class="tocxref"><span class="secno">10.2.1 </span>Notes to RDFa Vocabulary Implementations and Publishing</a></li></ul></li></ul></li><li class="tocline"><a href="#s_datatypes" class="tocxref"><span class="secno">A. </span>CURIE Datatypes</a><ul class="toc"><li class="tocline"><a href="#xml-schema-definition" class="tocxref"><span class="secno">A.1 </span>XML Schema Definition</a></li><li class="tocline"><a href="#xml-dtd-definition" class="tocxref"><span class="secno">A.2 </span>XML DTD Definition</a></li></ul></li><li class="tocline"><a href="#vocabulary" class="tocxref"><span class="secno">B. </span>The RDFa Vocabulary</a><ul class="toc"><li class="tocline"><a href="#term-prefix-definitions-vocabulary" class="tocxref"><span class="secno">B.1 </span>Term and Prefix Assignments</a></li><li class="tocline"><a href="#processor-graph-reporting" class="tocxref"><span class="secno">B.2 </span>Processor Graph Reporting</a></li><li class="tocline"><a href="#vocabulary-relationship" class="tocxref"><span class="secno">B.3 </span>Term for vocabulary expansion</a></li><li class="tocline"><a href="#a_history" class="tocxref"><span class="secno">B.4 </span>Changes</a><ul class="toc"><li class="tocline"><a href="#major-differences-with-rdfa-syntax-1.0" class="tocxref"><span class="secno">B.4.1 </span>Major differences with RDFa Syntax 1.0</a></li></ul></li></ul></li><li class="tocline"><a href="#a_acks" class="tocxref"><span class="secno">C. </span>Acknowledgments</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">D. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">D.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">D.2 </span>Informative references</a></li></ul></li></ul></div>
|
|
|
|
<div class="informative section" id="s_motivation" typeof="bibo:Chapter" about="#s_motivation">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">1. </span>Motivation</h2><p><em>This section is non-normative.</em></p>
|
|
<p>RDF/XML [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SYNTAX">RDF-SYNTAX</a></cite>] provides sufficient flexibility to represent all
|
|
of the abstract concepts in RDF [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>]. However, it presents a
|
|
number of challenges; first it is difficult or impossible to validate
|
|
documents that contain RDF/XML using XML Schemas or DTDs, which
|
|
therefore makes it difficult to import RDF/XML into other markup
|
|
languages. Whilst newer schema languages such as RELAX NG
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-RELAXNG-SCHEMA">RELAXNG-SCHEMA</a></cite>] do provide a way to validate documents that contain
|
|
arbitrary RDF/XML, it will be a while before they gain wide support.</p>
|
|
<p>Second, even if one could add RDF/XML directly into an XML dialect like
|
|
XHTML, there would be significant data duplication between the rendered
|
|
data and the RDF/XML structured data. It would be far better to add RDF
|
|
to a document without repeating the document's existing data. For
|
|
example, an XHTML document that explicitly renders its author's name in
|
|
the text—perhaps as a byline on a news site—should not need to repeat
|
|
this name for the RDF expression of the same concept: it should be
|
|
possible to supplement the existing markup in such a way that it can
|
|
also be interpreted as RDF.</p>
|
|
<p>Another reason for aligning the rendered data with the structured data
|
|
is that it is highly beneficial to express the web data's structure 'in
|
|
context'; as users often want to transfer structured data from one
|
|
application to another, sometimes to or from a non-web-based
|
|
application, the user experience can be enhanced. For example,
|
|
information about specific rendered data could be presented to the user
|
|
via 'right-clicks' on an item of interest.</p>
|
|
<p>In the past, many attributes were 'hard-wired' directly into the markup
|
|
language to represent specific concepts. For example, in XHTML 1.1
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-XHTML11">XHTML11</a></cite>] and HTML [<cite><a class="bibref" rel="biblioentry" href="#bib-HTML401">HTML401</a></cite>] there is <span class="aref">@cite</span>;
|
|
the attribute allows an author to add information to a document which is
|
|
used to indicate the origin of a quote.</p>
|
|
<p>However, these 'hard-wired' attributes make it difficult to define a
|
|
generic process for extracting metadata from any document since an RDFa
|
|
Processor would need to know about each of the special attributes. One
|
|
motivation for RDFa has been to devise a means by which documents can be
|
|
augmented with metadata in a general, rather than hard-wired, manner.
|
|
This has been achieved by creating a fixed set of attributes and parsing
|
|
rules, but allowing those attributes to contain properties from any of a
|
|
number of the growing range of available RDF vocabularies. In most cases
|
|
the <em>values</em> of those properties are the information that is
|
|
already in an author's document.</p>
|
|
<p>RDFa alleviates the pressure on markup language designers to anticipate
|
|
all the structural requirements users of their language might have, by
|
|
outlining a new syntax for RDF that relies only on attributes. By
|
|
adhering to the concepts and rules in this specification, language
|
|
designers can import RDFa into their environment with a minimum of
|
|
hassle and be confident that semantic data will be extractable from
|
|
their documents by conforming processors. </p>
|
|
</div>
|
|
<div class="informative section" id="s_Syntax_overview" typeof="bibo:Chapter" about="#s_Syntax_overview">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">2. </span>Syntax Overview</h2><p><em>This section is non-normative.</em></p>
|
|
<p>The following examples are intended to help readers who are not
|
|
familiar with RDFa to quickly get a sense of how it works. For a more
|
|
thorough introduction, please read the RDFa Primer [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-PRIMER">RDFA-PRIMER</a></cite>].</p>
|
|
<p>In RDF, it is common for people to shorten vocabulary terms via
|
|
abbreviated IRIs that use a 'prefix' and a 'reference'. This mechanism
|
|
is explained in detail in the section titled <a>Compact URI Expressions</a>.
|
|
The examples throughout this document assume that the following
|
|
vocabulary <a class="tref" title="prefix" href="#T-prefix">prefixes</a> have been defined:</p>
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">bibo:</td>
|
|
<td rowspan="1" colspan="1">http://purl.org/ontology/bibo/</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">cc:</td>
|
|
<td rowspan="1" colspan="1">http://creativecommons.org/ns#</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">dbp:</td>
|
|
<td rowspan="1" colspan="1">http://dbpedia.org/property/</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">dbp-owl:</td>
|
|
<td rowspan="1" colspan="1">http://dbpedia.org/ontology/</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">dbr:</td>
|
|
<td rowspan="1" colspan="1">http://dbpedia.org/resource/</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">dc:</td>
|
|
<td rowspan="1" colspan="1">http://purl.org/dc/terms/</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">ex:</td>
|
|
<td rowspan="1" colspan="1">http://example.org/</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">foaf:</td>
|
|
<td rowspan="1" colspan="1">http://xmlns.com/foaf/0.1/</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">rdf:</td>
|
|
<td rowspan="1" colspan="1">
|
|
http://www.w3.org/1999/02/22-rdf-syntax-ns#</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">rdfa:</td>
|
|
<td rowspan="1" colspan="1"> http://www.w3.org/ns/rdfa#</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">rdfs:</td>
|
|
<td rowspan="1" colspan="1"> http://www.w3.org/2000/01/rdf-schema#</td>
|
|
</tr>
|
|
|
|
<!--
|
|
<tr> <td rowspan="1" colspan="1">taxo:</td> <td rowspan="1" colspan="1">http://purl.org/rss/1.0/modules/taxonomy/</td> </tr> -->
|
|
|
|
<tr>
|
|
<td rowspan="1" colspan="1">xhv:</td>
|
|
<td rowspan="1" colspan="1">http://www.w3.org/1999/xhtml/vocab#</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">xsd:</td>
|
|
<td rowspan="1" colspan="1">http://www.w3.org/2001/XMLSchema#</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p class="note">In some of the examples below we have used IRIs with
|
|
fragment identifiers that are local to the document containing the RDFa
|
|
fragment identifiers shown (e.g., '<code>about="#me"</code>'). This
|
|
idiom, which is also used in RDF/XML [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SYNTAX-GRAMMAR">RDF-SYNTAX-GRAMMAR</a></cite>] and other
|
|
RDF serializations, gives a simple way to 'mint' new IRIs for entities
|
|
described by RDFa and therefore contributes considerably to the
|
|
expressive power of RDFa. Unfortunately, this practice is not at present
|
|
covered by the media type registrations that govern the meaning of
|
|
fragment identifiers (see section 3.5 of the URI specification
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>], [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3023">RFC3023</a></cite>], and [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC2854">RFC2854</a></cite>]). For more information about
|
|
fragment identifier semantics, see [<cite><a class="bibref" rel="biblioentry" href="#bib-WEBARCH">WEBARCH</a></cite>] section 3.2.1.</p>
|
|
<div id="rdfa-attributes" typeof="bibo:Chapter" about="#rdfa-attributes" class="section">
|
|
<h3><span class="secno">2.1 </span>The RDFa Attributes</h3>
|
|
<p>RDFa makes use of a number of commonly found attributes, as well as
|
|
providing a few new ones. Attributes that already exist in widely
|
|
deployed languages (e.g., HTML) have the same meaning they always did,
|
|
although their syntax has been slightly modified in some cases. For
|
|
example, in (X)HTML there is no clear way to add new <a class="aref" href="#A-rel" title="rel">@rel</a>
|
|
values; RDFa sets out to explicitly solve this problem, and does so by
|
|
allowing IRIs as values. It also introduces the concepts of <a class="tref" title="term" href="#T-term">terms</a>
|
|
and '<a class="tref" title="curie" href="#T-curie">compact URI expressions</a>' — referred to
|
|
as CURIEs in this document — which allow a full IRI value to be
|
|
expressed succinctly. For a complete list of RDFa attribute names and
|
|
syntax, see <a href="#s_syntax">Attributes and Syntax</a>.</p>
|
|
</div>
|
|
<div id="examples" typeof="bibo:Chapter" about="#examples" class="section">
|
|
<h3><span class="secno">2.2 </span>Examples</h3>
|
|
<p>In HTML, authors can include metadata and relationships concerning
|
|
the current document by using the <code>meta</code> and <code>link</code>
|
|
elements. For example, the author of the page along with the pages
|
|
preceding and following the current page can be expressed using the
|
|
link and meta elements:</p>
|
|
<pre class="example"><html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Page 7</title>
|
|
<span class="hilite"><meta name="author" content="Mark Birbeck" /></span>
|
|
<span class="hilite"><link rel="prev" href="page6.html" /></span>
|
|
<span class="hilite"><link rel="next" href="page8.html" /></span>
|
|
</head>
|
|
<body>...</body>
|
|
</html></pre>
|
|
<p>RDFa makes use of this concept, enhancing it with the ability to make
|
|
use of other vocabularies by using full IRIs:</p>
|
|
<pre class="example"><html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>My home-page</title>
|
|
<meta property="<span class="hilite">http://purl.org/dc/terms/creator</span>" content="Mark Birbeck" />
|
|
<link rel="<span class="hilite">http://xmlns.com/foaf/0.1/topic</span>" href="http://www.example.com/#us" />
|
|
</head>
|
|
<body>...</body>
|
|
</html></pre>
|
|
<p>Because using full IRIs like those above can be cumbersome, RDFa also
|
|
permits the use of <a class="datatype internalDFN" title="CURIE" href="#dfn-curie">compact URI expressions</a>
|
|
so an author can use a shorthand to reference terms in multiple
|
|
vocabularies:</p>
|
|
<pre class="example"><html
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
<span class="hilite">prefix="foaf: http://xmlns.com/foaf/0.1/</span>
|
|
<span class="hilite">dc: http://purl.org/dc/terms/"</span>
|
|
>
|
|
<head>
|
|
<title>My home-page</title>
|
|
<meta property="<span class="hilite">dc:creator</span>" content="Mark Birbeck" />
|
|
<link rel="<span class="hilite">foaf:topic</span>" href="http://www.example.com/#us" />
|
|
</head>
|
|
<body>...</body>
|
|
</html></pre>
|
|
<p>RDFa supports the use of <a class="aref" href="#A-rel" title="rel">@rel</a> and <a class="aref" href="#A-rev" title="rev">@rev</a> on
|
|
any element. This is even more useful with the addition of support for
|
|
different vocabularies:</p>
|
|
<pre id="ccLicense" class="example">This document is licensed under the
|
|
<a <span class="hilite">prefix="cc: http://creativecommons.org/ns#"</span>
|
|
<span class="hilite">rel="cc:license"</span>
|
|
href="http://creativecommons.org/licenses/by-nc-nd/3.0/">
|
|
Creative Commons By-NC-ND License
|
|
</a>.</pre>
|
|
<p>Not only can IRIs in the document be re-used to provide metadata, but
|
|
so can inline text when used with <a class="aref" href="#A-property" title="property">@property</a>:</p>
|
|
<pre class="example"><html
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
<span class="hilite">prefix="cal: http://www.w3.org/2002/12/cal/ical#"</span>
|
|
>
|
|
<head><title>Jo's Friends and Family Blog</title></head>
|
|
<body>
|
|
<p>
|
|
I'm holding
|
|
<span <span class="hilite">property="cal:summary"</span>>
|
|
<span class="hilite">one last summer Barbecue</span>
|
|
</span>,
|
|
on September 16th at 4pm.
|
|
</p>
|
|
</body>
|
|
</html></pre>
|
|
<p>If some displayed text is different to the actual 'value' it
|
|
represents, a more precise value can be added, which can optionally
|
|
include <a class="aref" href="#A-datatype" title="datatype">@datatype</a>:</p>
|
|
<pre class="example"><html
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
prefix="cal: http://www.w3.org/2002/12/cal/ical#
|
|
<span class="hilite">xsd: http://www.w3.org/2001/XMLSchema"</span>
|
|
>
|
|
<head><title>Jo's Friends and Family Blog</title></head>
|
|
<body>
|
|
<p>
|
|
I'm holding
|
|
<span property="cal:summary">
|
|
one last summer Barbecue
|
|
</span>,
|
|
on
|
|
<span <span class="hilite">property="cal:dtstart"</span> <span class="hilite">content="2015-09-16T16:00:00-05:00"</span>
|
|
<span class="hilite">datatype="xsd:dateTime"</span>>
|
|
September 16th at 4pm
|
|
</span>.
|
|
</p>
|
|
</body>
|
|
</html></pre>
|
|
<p>In many cases a block of markup will contain a number of properties
|
|
that relate to the same item; it's possible with RDFa to indicate the
|
|
type of that item using <a class="aref" href="#A-typeof" title="typeof">@typeof</a>:</p>
|
|
<pre class="example"><html
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
prefix="cal: http://www.w3.org/2002/12/cal/ical#
|
|
xsd: http://www.w3.org/2001/XMLSchema"
|
|
>
|
|
<head><title>Jo's Friends and Family Blog</title></head>
|
|
<body>
|
|
<p <span class="hilite">typeof="cal:Vevent"</span>>
|
|
I'm holding
|
|
<span property="cal:summary">
|
|
one last summer Barbecue
|
|
</span>,
|
|
on
|
|
<span property="cal:dtstart" content="2015-09-16T16:00:00-05:00"
|
|
datatype="xsd:dateTime">
|
|
September 16th at 4pm
|
|
</span>.
|
|
</p>
|
|
</body>
|
|
</html></pre>
|
|
<p>RDFa allows the document to contain metadata information about other
|
|
documents and resources:</p>
|
|
<pre class="example"><html
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
prefix="bibo: http://purl.org/ontology/bibo/
|
|
dc: http://purl.org/dc/terms/"
|
|
>
|
|
<head>
|
|
<title>Books by Marco Pierre White</title>
|
|
</head>
|
|
<body>
|
|
I think White's book
|
|
'<span <span class="hilite">about="urn:ISBN:0091808189"</span> <span class="hilite">typeof="bibo:Book"</span>
|
|
<span class="hilite">property="dc:title"</span>>
|
|
Canteen Cuisine
|
|
</span>'
|
|
is well worth getting since although it's quite advanced stuff, he
|
|
makes it pretty easy to follow. You might also like
|
|
<span <span class="hilite">about="urn:ISBN:1596913614"</span> <span class="hilite">typeof="bibo:Book"</span>
|
|
<span class="hilite">property="dc:description"</span>>
|
|
White's autobiography
|
|
</span>.
|
|
</body>
|
|
</html></pre>
|
|
<p> When dealing with small amounts of markup, it is sometimes easier to
|
|
use full IRIs, rather than CURIEs. The previous example can also be
|
|
written as follows:</p>
|
|
<pre class="example"><html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Books by Marco Pierre White</title>
|
|
</head>
|
|
<body>
|
|
I think White's book
|
|
'<span
|
|
<span class="hilite">about="urn:ISBN:0091808189"</span>
|
|
<span class="hilite">typeof="http://purl.org/ontology/bibo/Book"</span>
|
|
<span class="hilite">property="http://purl.org/dc/terms/title"</span>
|
|
>Canteen Cuisine</span>'
|
|
is well worth getting since although it's quite advanced stuff, he
|
|
makes it pretty easy to follow. You might also like
|
|
<span
|
|
<span class="hilite">about="urn:ISBN:1596913614"</span>
|
|
<span class="hilite">typeof="http://purl.org/ontology/bibo/Book"</span>
|
|
<span class="hilite">property="http://purl.org/dc/terms/description"</span>
|
|
>White's autobiography</span>.
|
|
</body>
|
|
</html></pre>
|
|
<p>A simple way of defining a portion of a document using terms from a
|
|
specific vocabulary is to use <a class="aref" href="#A-vocab" title="vocab">@vocab</a> to define a default
|
|
vocabulary IRI. For example, to use FOAF terms:</p>
|
|
<pre class="example"><div <span class="hilite">vocab="http://xmlns.com/foaf/0.1/"</span> about="#me">
|
|
My name is <span <span class="hilite">property="name"</span>>John Doe</span> and my blog is called
|
|
<a <span class="hilite">rel="homepage"</span> href="http://example.org/blog/">Understanding Semantics</a>.
|
|
</div></pre>
|
|
<p>The example above will produce the following triples, expressed here
|
|
in <a href="#turtle">Turtle</a> syntax:</p>
|
|
<pre class="example">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
<#me> <span class="hilite">foaf:name</span> "John Doe" ;
|
|
<span class="hilite">foaf:homepage</span> <http://example.org/blog/> .</pre>
|
|
<p>In simple cases the <a class="aref" href="#A-property" title="property">@property</a> property can also be used
|
|
in place of <a class="aref" href="#A-rel" title="rel">@rel</a>. Indeed, in case when the element does
|
|
not contain <a class="aref" href="#A-rel" title="rel">@rel</a>, <a class="aref" href="#A-datatype" title="datatype">@datatype</a>, of <a class="aref" href="#A-content" title="content">@content</a>,
|
|
but there is, for example, a <a class="aref" href="#A-href" title="href">@href</a>, the effect of <a class="aref" href="#A-property" title="property">@property</a>
|
|
is analogous to the role of <a class="aref" href="#A-rel" title="rel">@rel</a>. For example, the
|
|
previous example could have been written:</p>
|
|
<pre class="example"><div <span class="hilite">vocab="http://xmlns.com/foaf/0.1/"</span> about="#me">
|
|
My name is <span <span class="hilite">property="name"</span>>John Doe</span> and my blog is called
|
|
<a <span class="hilite">property="homepage"</span> href="http://example.org/blog/">Understanding Semantics</a>.
|
|
</div></pre> </div>
|
|
</div>
|
|
<div class="informative section" id="s_rdfterminology" typeof="bibo:Chapter" about="#s_rdfterminology">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">3. </span>RDF Terminology</h2><p><em>This section is non-normative.</em></p>
|
|
<p> The previous section gave examples of typical markup in order to
|
|
illustrate the structure of RDFa markup. RDFa is short for "RDF in
|
|
Attributes". In order to author RDFa you do not need to understand RDF,
|
|
although it would certainly help. However, if you are building a system
|
|
that consumes the RDF output of a language that supports RDFa you will
|
|
almost certainly need to understand RDF. This section introduces the
|
|
basic concepts and terminology of RDF. For a more thorough explanation
|
|
of RDF, please refer to the RDF Concepts document [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>] and
|
|
the RDF Syntax Document [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SYNTAX">RDF-SYNTAX</a></cite>]. </p>
|
|
<div id="statements" typeof="bibo:Chapter" about="#statements" class="section">
|
|
<h3><span class="secno">3.1 </span>Statements</h3>
|
|
<p> The structured data that RDFa provides access to is a collection of
|
|
<em>statements</em>. A statement is a basic unit of information that
|
|
has been constructed in a specific format to make it easier to
|
|
process. In turn, by breaking large sets of information down into a
|
|
collection of statements, even very complex metadata can be processed
|
|
using simple rules. </p>
|
|
<p> To illustrate, suppose we have the following set of facts:</p>
|
|
<pre class="example">Albert was born on March 14, 1879, in the German Empire. There is a picture of him at
|
|
the web address, http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.</pre>
|
|
<p>This would be quite difficult for a machine to interpret, and it is
|
|
certainly not in a format that could be passed from one data
|
|
application to another. However, if we convert the information to a
|
|
set of statements it begins to be more manageable. The same
|
|
information could therefore be represented by the following shorter
|
|
'statements':</p>
|
|
<pre class="example">Albert was born on March 14, 1879.
|
|
Albert was born in the German Empire.
|
|
Albert has a picture at
|
|
http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.</pre> </div>
|
|
<div id="triples" typeof="bibo:Chapter" about="#triples" class="section">
|
|
<h3><span class="secno">3.2 </span>Triples</h3>
|
|
<p> To make this information machine-processable, RDF defines a
|
|
structure for these statements. A statement is formally called a <dfn title="triple" id="T-triple"><em>triple</em></dfn>,
|
|
meaning that it is made up of three components. The first is the <em>subject</em>
|
|
of the triple, and is what we are making our statements <em>about</em>.
|
|
In all of these examples the subject is 'Albert'. </p>
|
|
<p> The second part of a triple is the property of the subject that we
|
|
want to define. In the examples here, the properties would be 'was
|
|
born on', 'was born in', and 'has a picture at'. These are more
|
|
usually called <em>predicates</em> in RDF. </p>
|
|
<p> The final part of a triple is called the <em>object</em>. In the
|
|
examples here the three objects have the values 'March 14, 1879', 'the
|
|
German Empire', and
|
|
'http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg'. </p>
|
|
<p class="note">RDFa has complete support for internationalized
|
|
characters. This includes internationalized characters in the subject,
|
|
property and object location.</p>
|
|
</div>
|
|
<div id="T-IRI-reference" typeof="bibo:Chapter" about="#T-IRI-reference" class="section">
|
|
<h3><span class="secno">3.3 </span>IRI references</h3>
|
|
<p> Breaking complex information into manageable units helps us be
|
|
specific about our data, but there is still some ambiguity. For
|
|
example, which 'Albert' are we talking about? If another system has
|
|
more facts about 'Albert', how could we know whether they are about
|
|
the same person, and so add them to the list of things we know about
|
|
that person? If we wanted to find people born in the German Empire,
|
|
how could we know that the predicate 'was born in' has the same
|
|
purpose as the predicate 'birthplace' that might exist in some other
|
|
system? RDF solves this problem by replacing our vague terms with <dfn title="iri-reference" id="T-iri-reference">IRI
|
|
|
|
references. </dfn></p>
|
|
<p> IRIs are most commonly used to identify web pages, but RDF makes use
|
|
of them as a way to provide unique identifiers for concepts. For
|
|
example, we could identify the subject of all of our statements (the
|
|
first part of each triple) by using the DBPedia [<a href="http://dbpedia.org">http://dbpedia.org</a>]
|
|
IRI for Albert Einstein, instead of the ambiguous string 'Albert':</p>
|
|
<pre class="example"><span class="hilite"><http://dbpedia.org/resource/Albert_Einstein></span>
|
|
has the name
|
|
Albert Einstein.
|
|
<span class="hilite"><http://dbpedia.org/resource/Albert_Einstein></span>
|
|
was born on
|
|
March 14, 1879.
|
|
<span class="hilite"><http://dbpedia.org/resource/Albert_Einstein></span>
|
|
was born in
|
|
the German Empire.
|
|
<span class="hilite"><http://dbpedia.org/resource/Albert_Einstein></span>
|
|
has a picture at
|
|
http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.</pre>
|
|
<p> IRI references are also used to uniquely identify the objects in
|
|
metadata statements (the third part of each triple). The picture of
|
|
Einstein is already an IRI, but we could also use an IRI to uniquely
|
|
identify the country 'German Empire'. At the same time we'll indicate
|
|
that the name and date of birth really are literals (and not IRIs), by
|
|
putting quotes around them:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein>
|
|
has the name
|
|
<span class="hilite">"</span>Albert Einstein<span class="hilite">"</span>.
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
was born on
|
|
<span class="hilite">"</span>March 14, 1879<span class="hilite">"</span>.
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
was born in
|
|
<span class="hilite"><http://dbpedia.org/resource/German_Empire></span>.
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
has a picture at
|
|
<span class="hilite"><</span>http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg<span class="hilite">></span>.</pre>
|
|
<p> IRI references are also used to ensure that predicates are
|
|
unambiguous; now we can be sure that 'birthplace', 'place of birth',
|
|
'Lieu de naissance' and so on, all mean the same thing:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein>
|
|
<span class="hilite"><http://xmlns.com/foaf/0.1/name></span>
|
|
"Albert Einstein".
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
<span class="hilite"><http://dbpedia.org/property/dateOfBirth></span>
|
|
"March 14, 1879".
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
<span class="hilite"><http://dbpedia.org/property/birthPlace></span>
|
|
<http://dbpedia.org/resource/German_Empire>.
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
<span class="hilite"><http://xmlns.com/foaf/0.1/depiction></span>
|
|
<http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg>.</pre> </div>
|
|
<div id="plain-literals" typeof="bibo:Chapter" about="#plain-literals" class="section">
|
|
<h3><span class="secno">3.4 </span>Plain literals</h3>
|
|
<p> Although IRI resources are always used for subjects and predicates,
|
|
the object part of a triple can be either an IRI or a <dfn title="literal" id="T-literal"><em>literal</em></dfn>.
|
|
In the example triples, Einstein's name is represented by a <dfn title="plain-literal" id="T-plain-literal"><em>plain
|
|
|
|
literal</em></dfn>, which means that it is a basic string with no
|
|
type or language information:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein>
|
|
<http://xmlns.com/foaf/0.1/name> <span class="hilite">"Albert Einstein"</span>.</pre> </div>
|
|
<div id="typed-literals" typeof="bibo:Chapter" about="#typed-literals" class="section">
|
|
<h3><span class="secno">3.5 </span>Typed literals</h3>
|
|
<p> Some literals, such as dates and numbers, have very specific
|
|
meanings, so RDF provides a mechanism for indicating the type of a
|
|
literal. A <dfn title="typed-literal" id="T-typed-literal"><em>typed literal</em></dfn>
|
|
is indicated by attaching an IRI to the end of a <a class="tref" title="plain-literal" href="#T-plain-literal">plain literal</a>,
|
|
and this IRI indicates the literal's datatype. This IRI is usually
|
|
based on datatypes defined in the XML Schema Datatypes specification
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>]. The following syntax would be used to unambiguously
|
|
express Einstein's date of birth as a literal of type <code>http://www.w3.org/2001/XMLSchema#date</code>:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein>
|
|
<http://dbpedia.org/property/dateOfBirth>
|
|
"1879-03-14"<span class="hilite">^^<http://www.w3.org/2001/XMLSchema#date></span>.</pre> </div>
|
|
<div id="turtle" typeof="bibo:Chapter" about="#turtle" class="section">
|
|
<h3><span class="secno">3.6 </span>Turtle</h3>
|
|
<p> RDF itself does not have one set way to express triples, since the
|
|
key ideas of RDF are the triple and the use of IRIs, and <em>not</em>
|
|
any particular syntax. However, there are a number of mechanisms for
|
|
expressing triples, such as RDF/XML [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SYNTAX-GRAMMAR">RDF-SYNTAX-GRAMMAR</a></cite>], Turtle
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>], and of course RDFa. Many discussions of RDF make use of
|
|
the <em>Turtle</em> syntax to explain their ideas, since it is quite
|
|
compact. The examples we have just seen are already using this syntax,
|
|
and we'll continue to use it throughout this document when we need to
|
|
talk about the RDF that could be generated from some RDFa. Turtle
|
|
allows long IRIs to be abbreviated by using an IRI mapping, which can
|
|
be used to express a compact IRI expression as follows:</p>
|
|
<pre class="example"><span class="hilite">@prefix dbp: <http://dbpedia.org/property/> .</span>
|
|
<span class="hilite">@prefix foaf: <http://xmlns.com/foaf/0.1/> .</span>
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
<span class="hilite">foaf:name</span> "Albert Einstein" .
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
<span class="hilite">dbp:birthPlace</span> <http://dbpedia.org/resource/German_Empire> .</pre>
|
|
<p>Here 'dbp:' has been mapped to the IRI for DBPedia and 'foaf:' has
|
|
been mapped to the IRI for the 'Friend of a Friend' taxonomy.</p>
|
|
<p>Any IRI in Turtle could be abbreviated in this way. This means that
|
|
we could also have used the same technique to abbreviate the
|
|
identifier for Einstein, as well as the datatype indicator:</p>
|
|
<pre class="example">@prefix dbp: <http://dbpedia.org/property/> .
|
|
<span class="hilite">@prefix dbr: <http://dbpedia.org/resource/> .</span>
|
|
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
<span class="hilite">@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .</span>
|
|
<span class="hilite">dbr:Albert_Einstein</span> dbp:dateOfBirth "1879-03-14"^^<span class="hilite">xsd:date</span> .
|
|
<span class="hilite">dbr:Albert_Einstein</span>
|
|
foaf:depiction <http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg> .</pre>
|
|
<p> When writing examples, you will often see the following IRI in the
|
|
Turtle representation:</p>
|
|
<pre class="example"><></pre>
|
|
<p> This indicates the 'current document', i.e., the document being
|
|
processed. In reality there would always be a full IRI based on the
|
|
document's location, but this abbreviation serves to make examples
|
|
more compact. Note in particular that the whole technique of
|
|
abbreviation is merely a way to make examples more compact, and the
|
|
actual triples generated would always use the full IRIs.</p>
|
|
</div>
|
|
<div id="graphs" typeof="bibo:Chapter" about="#graphs" class="section">
|
|
<h3><span class="secno">3.7 </span>Graphs</h3>
|
|
<p> A collection of triples is called a <em>graph</em>. All of the
|
|
triples that are defined by this specification are contained in the <a class="tref" title="output-graph" href="#T-output-graph">output
|
|
|
|
graph</a> by an RDFa Processor. For more information on graphs
|
|
and other RDF concepts, see [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>]. </p>
|
|
</div>
|
|
<div id="compact-uri-expressions" typeof="bibo:Chapter" about="#compact-uri-expressions" class="section">
|
|
<h3><span class="secno">3.8 </span>Compact URI Expressions</h3>
|
|
<p>In order to allow for the compact expression of RDF statements, RDFa
|
|
allows the contraction of most <a class="tref" title="iri-reference" href="#T-iri-reference">IRI reference</a>s into a
|
|
form called a 'compact URI expression', or <a class="datatype internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>. A
|
|
detailed discussion of this mechanism is in the section <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a>.</p>
|
|
<p>Note that CURIEs are only used in the markup and Turtle examples, and
|
|
will never appear in the generated <a class="tref" title="triple" href="#T-triple">triple</a>s, which are
|
|
defined by RDF to use <a class="tref" title="iri-reference" href="#T-iri-reference">IRI reference</a>s.</p>
|
|
<p>Full details on how CURIEs are processed are in the section titled <a href="#s_curieprocessing">CURIE
|
|
|
|
Processing</a>.</p>
|
|
</div>
|
|
<div id="markup-fragments-and-rdfa" typeof="bibo:Chapter" about="#markup-fragments-and-rdfa" class="section">
|
|
<h3><span class="secno">3.9 </span>Markup Fragments and RDFa</h3>
|
|
<p>A growing use of embedded metadata is to take fragments of markup and
|
|
move them from one document to another. This may happen through the
|
|
use of tools, such as drag-and-drop in a browser, or through snippets
|
|
of code provided to authors for inclusion in their documents. (A good
|
|
example of the latter is the <a href="#ccLicense">licensing fragment
|
|
provided by Creative Commons</a>.)</p>
|
|
<p>However, those involved in creating fragments (either by building
|
|
tools, or authoring snippets), should be aware that this specification
|
|
does not say how fragments are processed. Specifically, the processing
|
|
of a fragment 'outside' of a complete document is undefined because
|
|
RDFa processing is largely about context. Future versions of this or
|
|
related specifications may do more to define this behavior.</p>
|
|
<p>Developers of tools that process fragments, or authors of fragments
|
|
for manual inclusion, should also bear in mind what will happen to
|
|
their fragment once it is included in a complete document. They should
|
|
carefully consider the amount of 'context' information that will be
|
|
needed in order to ensure a correct interpretation of their fragment.</p>
|
|
</div>
|
|
<div id="a-description-of-rdfa-in-rdf-terms" typeof="bibo:Chapter" about="#a-description-of-rdfa-in-rdf-terms" class="section">
|
|
<h3><span class="secno">3.10 </span>A description of RDFa in RDF terms</h3>
|
|
<p> The following is a brief description of RDFa in terms of the RDF
|
|
terminology introduced here. It may be useful to readers with an RDF
|
|
background: </p>
|
|
<p>The aim of RDFa is to allow a single <a class="tref" title="rdf-graph" href="#T-rdf-graph">RDF graph</a> to be
|
|
carried in various types of document markup. An <dfn title="rdf-graph" id="T-rdf-graph">RDF graph</dfn>
|
|
comprises <dfn title="node" id="T-node">node</dfn>s linked by relationships. The basic unit
|
|
of an <a class="tref" title="rdf-graph" href="#T-rdf-graph">RDF graph</a> is a <a class="tref" title="triple" href="#T-triple">triple</a>, in which a
|
|
subject <a class="tref" title="node" href="#T-node">node</a> is linked to an object <a class="tref" title="node" href="#T-node">node</a>
|
|
via a <a class="tref" title="predicate" href="#T-predicate">predicate</a>. The <dfn title="subject" id="T-subject">subject</dfn> <a class="tref" title="node" href="#T-node">node</a>
|
|
is always either a <a class="tref" title="iri-reference" href="#T-iri-reference">IRI reference</a> or a <dfn title="bnode" id="T-bnode">blank
|
|
node (or bnode)</dfn>, the <dfn title="predicate" id="T-predicate">predicate</dfn> is <em>always</em>
|
|
a <a class="tref" title="iri-reference" href="#T-iri-reference">IRI reference</a>, and the object of a statement can be a
|
|
<a class="tref" title="iri-reference" href="#T-iri-reference">IRI reference</a>, a <a class="tref" title="literal" href="#T-literal">literal</a>, or a <a class="tref" title="bnode" href="#T-bnode">bnode</a>.</p>
|
|
<p>In RDFa, a subject <a class="tref" title="iri-reference" href="#T-iri-reference">IRI reference</a> is generally indicated
|
|
using <a class="aref" href="#A-about" title="about">@about</a> and predicates are represented using one of
|
|
<a class="aref" href="#A-property" title="property">@property</a>, <a class="aref" href="#A-rel" title="rel">@rel</a>, or <a class="aref" href="#A-rev" title="rev">@rev</a>.
|
|
Objects which are <a class="tref" title="iri-reference" href="#T-iri-reference">IRI reference</a>s are represented using <a class="aref" href="#A-resource" title="resource">@resource</a>,
|
|
<a class="aref" href="#A-src" title="src">@src</a>, or <a class="aref" href="#A-href" title="href">@href</a>, whilst objects that are <a class="tref" title="literal" href="#T-literal">literal</a>s
|
|
are represented either with <a class="aref" href="#A-content" title="content">@content</a> or the content of
|
|
the element in question (with an optional datatype expressed using <a class="aref" href="#A-datatype" title="datatype">@datatype</a>,
|
|
and an optional language expressed using a Host Language-defined
|
|
mechanism such as <span class="aref">xml:lang</span>).</p>
|
|
</div>
|
|
</div>
|
|
<div id="conformance" class="normative section" typeof="bibo:Chapter" about="#conformance">
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">4. </span>Conformance</h2><p>As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.</p>
|
|
<p>The key words <em class="rfc2119" title="must">must</em>, <em class="rfc2119" title="must not">must not</em>, <em class="rfc2119" title="required">required</em>, <em class="rfc2119" title="should">should</em>, <em class="rfc2119" title="should not">should not</em>, <em class="rfc2119" title="recommended">recommended</em>, <em class="rfc2119" title="may">may</em>, and <em class="rfc2119" title="optional">optional</em> in this specification are to be interpreted as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC2119">RFC2119</a></cite>].</p>
|
|
|
|
<div id="processorconf" typeof="bibo:Chapter" about="#processorconf" class="section">
|
|
<h3><span class="secno">4.1 </span>RDFa Processor Conformance</h3>
|
|
<p>A conforming RDFa Processor <em class="rfc2119" title="must">must</em> make available to a consuming
|
|
application a single <a class="tref" title="rdf-graph" href="#T-rdf-graph">RDF graph</a> containing all possible
|
|
triples generated by using the rules in the <a href="#s_model">Processing
|
|
Model</a> section. This specification uses the term <dfn title="output-graph" id="T-output-graph">output
|
|
graph</dfn> to mean all of the triples asserted by a document
|
|
according to the <a href="#s_model">Processing Model</a> section. The
|
|
term <dfn title="processor-graph" id="T-processor-graph">processor graph</dfn> is used to denote the collection of
|
|
all informational, warning, and error triples that may be generated by
|
|
the RDFa Processor to <a href="#processor-status">report its status</a>.
|
|
The <a class="tref" title="output-graph" href="#T-output-graph">output graph</a> and the <a class="tref" title="processor-graph" href="#T-processor-graph">processor graph</a>
|
|
are separate graphs and <em class="rfc2119" title="must not">must not</em> be stored in the same graph by the
|
|
RDFa Processor. </p>
|
|
<p>A conforming RDFa Processor <em class="rfc2119" title="may">may</em> make available additional triples
|
|
that have been generated using rules not described here, but these
|
|
triples <em class="rfc2119" title="must not">must not</em> be made available in the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a>.
|
|
(Whether these additional triples are made available in one or more
|
|
additional <a class="tref" title="rdf-graph" href="#T-rdf-graph">RDF graph</a>s is implementation-specific, and
|
|
therefore not defined here.)</p>
|
|
<p>A conforming RDFa Processor <em class="rfc2119" title="must">must</em> preserve white space in both <a class="tref" title="plain-literal" href="#T-plain-literal">plain
|
|
|
|
literal</a>s and <a class="tref" title="xml-literals" href="#T-xml-literals">XML literals</a>.
|
|
However, it may be the case that the architecture in which a processor
|
|
operates has made changes to the white space in a document before that
|
|
document ever reaches the RDFa Processor (e.g., [<cite><a class="bibref" rel="biblioentry" href="#bib-XMLSCHEMA-1">XMLSCHEMA-1</a></cite>]
|
|
processors are permitted to 'normalize' white space in attribute
|
|
values - see section 3.1.4). To ensure maximum consistency between
|
|
processing environments, authors <em class="rfc2119" title="should">should</em> remove any unnecessary white
|
|
space in their plain and XML Literal content.</p>
|
|
<p>A conforming RDFa Processor <em class="rfc2119" title="must">must</em> examine the media type of a document
|
|
it is processing to determine the document's Host Language. If the
|
|
RDFa Processor is unable to determine the media type, or does not
|
|
support the media type, the RDFa Processor <em class="rfc2119" title="must">must</em> process the document
|
|
as if it were media type <code>application/xml</code>. See <a href="#xmlrdfaconformance">XML+RDFa
|
|
|
|
Document Conformance</a>. A Host Language <em class="rfc2119" title="may">may</em> specify additional
|
|
announcement mechanisms.</p>
|
|
<p class="note">A conforming RDFa Processor <em class="rfc2119" title="may">may</em> use additional
|
|
mechanisms (e.g., the DOCTYPE, a file extension, the root element) to
|
|
attempt to determine the Host Language if the media type is
|
|
unavailable. These mechanisms are unspecified.</p>
|
|
</div>
|
|
<div id="hostlangconf" typeof="bibo:Chapter" about="#hostlangconf" class="section">
|
|
<h3><span class="secno">4.2 </span>RDFa Host Language Conformance</h3>
|
|
<p>Host Languages that incorporate RDFa must adhere to the following:</p>
|
|
<ul>
|
|
<li> All of the facilities required in this specification <em class="rfc2119" title="must">must</em> be
|
|
included in the Host Language.</li>
|
|
<li>The attributes defined in this specification <em class="rfc2119" title="must">must</em> be included in
|
|
the content model of the Host Language.</li>
|
|
<li> If the Host Language uses XML Namespaces [<cite><a class="bibref" rel="biblioentry" href="#bib-XML-NAMES">XML-NAMES</a></cite>], the
|
|
attributes in this specification <em class="rfc2119" title="should">should</em> be defined in 'no
|
|
namespace'. (e.g., when the attributes are used on elements in the
|
|
Host Language's namespace, they can be used with no qualifying
|
|
prefix: <code><myml:myElement property="next"></code>).
|
|
|
|
When a Host Language does not use the attributes in 'no namespace',
|
|
they <em class="rfc2119" title="must">must</em> be referenced via the XHTML Namespace (<code>http://www.w3.org/1999/xhtml</code>).</li>
|
|
<li>If the Host Language has its own definition for any attribute
|
|
defined in this specification, that definition <em class="rfc2119" title="must">must</em> be such that the
|
|
processing required by this specification remains possible when the
|
|
attribute is used in a way consistent with the requirements herein.</li>
|
|
<li>The Host Language <em class="rfc2119" title="may">may</em> specify an <a class="tref" title="initial-context" href="#T-initial-context">initial context</a>
|
|
(e.g., the definition of terms, IRI mappings, and/or a default
|
|
vocabulary IRI). Such an <a class="tref" title="initial-context" href="#T-initial-context">initial context</a> <em class="rfc2119" title="should">should</em> be
|
|
defined using the conventions defined in <a href="#s_initialcontexts">RDFa
|
|
|
|
Initial Contexts</a>.</li>
|
|
</ul>
|
|
</div>
|
|
<div id="xmlrdfaconformance" typeof="bibo:Chapter" about="#xmlrdfaconformance" class="section">
|
|
<h3><span class="secno">4.3 </span>XML+RDFa Document Conformance</h3>
|
|
<p>This specification does not define a stand-alone document type. The
|
|
attributes herein are intended to be integrated into other host
|
|
languages (e.g., HTML+RDFa or XHTML+RDFa). However, this specification
|
|
<strong>does</strong> define processing rules for generic XML
|
|
documents - that is, those documents delivered as media types <code>text/xml</code>
|
|
or <code>application/xml</code>. Such documents must meet all of the
|
|
following criteria:</p>
|
|
<ol>
|
|
<li>The document <em class="rfc2119" title="must">must</em> be well-formed as defined in [<cite><a class="bibref" rel="biblioentry" href="#bib-XML10-4e">XML10-4e</a></cite>]. </li>
|
|
<li> The document <em class="rfc2119" title="must">must</em> use the attributes defined in this
|
|
specification through references to the XHTML namespace (<code>http://www.w3.org/1999/xhtml</code>).
|
|
|
|
</li>
|
|
</ol>
|
|
<p>When an RDFa Processor processes an XML+RDFa document, it does so via
|
|
the following <a class="tref" title="initial-context" href="#T-initial-context">initial context</a>:</p>
|
|
<ol>
|
|
<li>There are default terms (e.g., <code>describedby</code>, <code>license</code>, and <code>role</code>), defined
|
|
in <a href="http://www.w3.org/2011/rdfa-context/rdfa-1.1"><code>http://www.w3.org/2011/rdfa-context/rdfa-1.1</code></a>.</li>
|
|
<li>There are default prefix mappings (e.g., <code>dc</code>),
|
|
defined in <a href="http://www.w3.org/2011/rdfa-context/rdfa-1.1"><code>http://www.w3.org/2011/rdfa-context/rdfa-1.1</code></a>.</li>
|
|
<li>There is no default vocabulary IRI.</li>
|
|
<li>The <a class="tref" title="base" href="#T-base">base</a> can be set using the <span class="aref">@xml:base</span>
|
|
attribute as defined in [<cite><a class="bibref" rel="biblioentry" href="#bib-XML10-4e">XML10-4e</a></cite>].</li>
|
|
<li>The <a class="tref" title="current-language" href="#T-current-language">current language</a> can be set using <span class="aref">@xml:lang</span>
|
|
attribute. </li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
<div class="normative section" id="s_syntax" typeof="bibo:Chapter" about="#s_syntax">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">5. </span>Attributes and Syntax</h2>
|
|
<p>This specification defines a number of attributes and the way in which
|
|
the values of those attributes are to be interpreted when generating RDF
|
|
triples. This section defines the attributes and the syntax of their
|
|
values.</p>
|
|
<dl>
|
|
<dt><dfn class="adef" title="about" id="A-about">about</dfn></dt>
|
|
<dd>a <a class="datatype internalDFN" title="SafeCURIEorCURIEorIRI" href="#dfn-safecurieorcurieoriri">SafeCURIEorCURIEorIRI</a>, used for stating what the
|
|
data is about (a 'subject' in RDF terminology);</dd>
|
|
<dt><dfn class="adef" title="content" id="A-content">content</dfn> </dt>
|
|
<dd>a <code>CDATA</code> string, for supplying machine-readable content
|
|
for a literal (a 'plain literal object', in RDF terminology);</dd>
|
|
<dt><dfn class="adef" title="datatype" id="A-datatype">datatype</dfn></dt>
|
|
<dd>a <a class="datatype internalDFN" title="TERMorCURIEorAbsIRI" href="#dfn-termorcurieorabsiri">TERMorCURIEorAbsIRI</a> representing a datatype, to
|
|
express the datatype of a literal;</dd>
|
|
<dt><dfn class="adef" title="href" id="A-href">href</dfn></dt>
|
|
<dd>a traditionally navigable <a class="externalDFN" title="URI">URI</a> for expressing the
|
|
partner resource of a relationship (a 'resource object', in RDF
|
|
terminology);</dd>
|
|
<dt><dfn class="adef" title="prefix" id="A-prefix">prefix</dfn></dt>
|
|
<dd>a white space separated list of prefix-name IRI pairs of the form
|
|
<pre><a href="#P_prefix">NCName</a> ':' ' '+ xs:anyURI</pre>
|
|
</dd>
|
|
<dt><dfn class="adef" title="property" id="A-property">property</dfn></dt>
|
|
<dd>a white space separated list of <a class="datatype internalDFN" title="TERMorCURIEorAbsIRIs" href="#dfn-termorcurieorabsiris">TERMorCURIEorAbsIRIs</a>,
|
|
used for expressing relationships between a subject and some literal
|
|
text (also a 'predicate');</dd>
|
|
<dt><dfn class="adef" title="rel" id="A-rel">rel</dfn></dt>
|
|
<dd>a white space separated list of <a class="datatype internalDFN" title="TERMorCURIEorAbsIRIs" href="#dfn-termorcurieorabsiris">TERMorCURIEorAbsIRIs</a>,
|
|
used for expressing relationships between two resources ('predicates'
|
|
in RDF terminology);</dd>
|
|
<dt><dfn class="adef" title="resource" id="A-resource">resource</dfn></dt>
|
|
<dd>a <a class="datatype internalDFN" title="SafeCURIEorCURIEorIRI" href="#dfn-safecurieorcurieoriri">SafeCURIEorCURIEorIRI</a> for expressing the partner
|
|
resource of a relationship that is not intended to be navigable (e.g.,
|
|
a 'clickable' link) (also an 'object');</dd>
|
|
<dt><dfn class="adef" title="rev" id="A-rev">rev</dfn> </dt>
|
|
<dd>a white space separated list of <a class="datatype internalDFN" title="TERMorCURIEorAbsIRIs" href="#dfn-termorcurieorabsiris">TERMorCURIEorAbsIRIs</a>,
|
|
used for expressing reverse relationships between two resources (also
|
|
'predicates');</dd>
|
|
<dt><dfn class="adef" title="src" id="A-src">src</dfn></dt>
|
|
<dd>a <a class="externalDFN" title="URI">URI</a> for expressing the partner resource of a
|
|
relationship when the resource is embedded (also a 'resource object');</dd>
|
|
<dt><dfn class="adef" title="typeof" id="A-typeof">typeof</dfn></dt>
|
|
<dd>a white space separated list of <a class="datatype internalDFN" title="TERMorCURIEorAbsIRIs" href="#dfn-termorcurieorabsiris">TERMorCURIEorAbsIRIs</a>
|
|
that indicate the RDF type(s) to associate with a subject;</dd>
|
|
<dt><dfn class="adef" title="vocab" id="A-vocab">vocab</dfn></dt>
|
|
<dd>A <a class="externalDFN" title="URI">URI</a> that defines the mapping to use when a <a class="datatype internalDFN" title="TERM" href="#dfn-term">TERM</a>
|
|
is referenced in an attribute value. See <a href="#s_terms">General
|
|
Use of Terms in Attributes</a> and the <a href="#s_vocab_expansion">section
|
|
|
|
on Vocabulary Expansion</a>.</dd>
|
|
<dt><dfn class="adef" title="inlist" id="A-inlist">inlist</dfn></dt>
|
|
<dd>An attribute (value ignored) used to indicate that the object
|
|
associated with a <code>rel</code> or <code>property</code>
|
|
attribute on the same element is to be added to the list for that
|
|
predicate. Causes a list to be created if it does not already exist</dd>
|
|
</dl>
|
|
<div id="white_space" typeof="bibo:Chapter" about="#white_space" class="section">
|
|
<h3><span class="secno">5.1 </span>White space within attribute values</h3>
|
|
<p>Many attributes accept a white space separated list of tokens. This
|
|
specification defines white space as:</p>
|
|
<pre><span id="P_whitespace">whitespace</span> ::= (#x20 | #x9 | #xD | #xA)+
|
|
</pre>
|
|
<p id="C1" about="#C1" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-05-20#resolution_1" rel="bibo:affirmedBy">When
|
|
|
|
attributes accept a white space separated list of tokens, an RDFa
|
|
Processor <em class="rfc2119" title="must">must</em> ignore any leading or trailing white space.</p>
|
|
<p class="note">This definition is consistent with the definition found
|
|
in [<cite><a class="bibref" rel="biblioentry" href="#bib-XML10">XML10</a></cite>].</p>
|
|
</div>
|
|
</div>
|
|
<div class="normative section" id="s_curies" typeof="bibo:Chapter" about="#s_curies">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">6. </span>CURIE Syntax Definition</h2>
|
|
<p>The key component of RDF is the IRI, but these are usually long and
|
|
unwieldy. RDFa therefore supports a mechanism by which IRIs can be
|
|
abbreviated, called 'compact URI expressions' or simply, <dfn title="curie" id="T-curie">CURIEs</dfn>.</p>
|
|
<p> When expanded, the resulting IRI <em class="rfc2119" title="must">must</em> be a syntactically valid IRI
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>]. For a more detailed explanation see <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a>. The <em>lexical space</em> of a CURIE is as
|
|
defined in <a href="#P_curie">curie</a> below. The <em>value space</em>
|
|
is the set of IRIs.</p>
|
|
<p>A CURIE is comprised of two components, a <em><dfn title="prefix" id="T-prefix">prefix</dfn></em>
|
|
and a <em><dfn title="reference" id="T-reference">reference</dfn></em>. The prefix is separated from the
|
|
reference by a colon (<code>:</code>). In general use it is possible to
|
|
omit the prefix, and so create a CURIE that makes use of the 'default
|
|
prefix' mapping; in RDFa the 'default prefix' mapping is <code>http://www.w3.org/1999/xhtml/vocab#</code>.
|
|
It's also possible to omit both the prefix <em>and</em> the colon, and
|
|
so create a CURIE that contains just a reference which makes use of the
|
|
'no prefix' mapping. This specification does not define a 'no prefix'
|
|
mapping. RDFa Host Languages <em class="rfc2119" title="must not">must not</em> define a 'no prefix' mapping. </p>
|
|
<p class="note"> The RDFa 'default prefix' should not be confused with the
|
|
'default namespace' as defined in [<cite><a class="bibref" rel="biblioentry" href="#bib-XML-NAMES">XML-NAMES</a></cite>]. An RDFa Processor <em class="rfc2119" title="must
|
|
not">must
|
|
not</em> treat an XML-NAMES 'default namespace' declaration as if it were
|
|
setting the 'default prefix'. </p>
|
|
<p> The general syntax of a CURIE can be summarized as follows: </p>
|
|
<pre><span id="P_prefix">prefix</span> ::= <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a>
|
|
|
|
<span id="P_reference">reference</span> ::= irelative-ref (as defined in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>])
|
|
|
|
<span id="P_curie">curie ::= [ [ prefix ] ':' ] reference</span>
|
|
|
|
<span id="P_safe_curie">safe_curie ::= '[' [ [ prefix ] ':' ] reference ']'</span>
|
|
</pre>
|
|
<p class="note"> The production <code>safe_curie</code> is not required,
|
|
even in situations where an attribute value is permitted to be a CURIE
|
|
or an IRI: An IRI that uses a scheme that is not an in-scope mapping <em>cannot</em>
|
|
be confused with a CURIE. The concept of a safe_curie is retained for
|
|
backward compatibility. </p>
|
|
<p> In normal evaluation of CURIEs the following context information would
|
|
need to be provided:</p>
|
|
<ul>
|
|
<li>a set of mappings from prefixes to IRIs;</li>
|
|
<li>a mapping to use with the default prefix (for example, <code>:p</code>);</li>
|
|
<li>a mapping to use when there is no prefix (for example, <code>p</code>);</li>
|
|
<li>a mapping to use with the '_' prefix, which is used to generate
|
|
unique identifiers (for example, <code>_:p</code>). </li>
|
|
</ul>
|
|
<p> In RDFa these values are defined as follows:</p>
|
|
<ul>
|
|
<li>the <strong>set of mappings from prefixes to URIs</strong> is
|
|
provided by the current in-scope prefix declarations of the <a class="tref" title="current-element" href="#T-current-element">current
|
|
|
|
element</a> during parsing;</li>
|
|
<li>the <strong>mapping to use with the default prefix</strong> is the
|
|
current default prefix mapping;</li>
|
|
<li>the <strong>mapping to use when there is no prefix</strong> is not
|
|
defined;</li>
|
|
<li>the <strong>mapping to use with the '_' prefix</strong>, is not
|
|
explicitly stated, but since it is used to generate <a class="tref" title="bnode" href="#T-bnode">bnode</a>s,
|
|
|
|
|
|
its implementation needs to be compatible with the RDF definition and
|
|
rules in <a href="#s_blankNodes">Referencing Blank Nodes</a>. A
|
|
document <em class="rfc2119" title="should not">should not</em> define a mapping for the '_' prefix. A Conforming
|
|
RDFa Processor <em class="rfc2119" title="must">must</em> ignore any definition of a mapping for the '_'
|
|
prefix.</li>
|
|
</ul>
|
|
<p>A CURIE is a representation of a full IRI. The rules for determining
|
|
that IRI are:</p>
|
|
<ul>
|
|
<li>If a CURIE consists of an empty <code>prefix</code> and a <code>reference</code>,
|
|
the IRI is obtained by taking the current default prefix mapping and
|
|
concatenating it with the <code>reference</code>. If there is no
|
|
current default prefix mapping, then this is not a valid CURIE and
|
|
<em class="rfc2119" title="must">must</em> be ignored. </li>
|
|
<li>Otherwise, if a CURIE consists of a non-empty <code>prefix</code>
|
|
and <code>reference</code>, and if there is an in-scope mapping for <code>prefix</code>
|
|
(when compared case-insensitively), then the IRI is created by using
|
|
that mapping, and concatenating it with the <code>reference</code>. </li>
|
|
<li>Finally, if there is no in-scope mapping for <code>prefix</code>,
|
|
then the value is not a CURIE. </li>
|
|
</ul>
|
|
<p class="note">See <a href="#s_terms">General Use of Terms in Attributes</a>
|
|
for the way items with no colon can be interpreted in some datatypes by
|
|
RDFa Processors.</p>
|
|
<div class="informative section" id="why-curies-and-not-qnames" typeof="bibo:Chapter" about="#why-curies-and-not-qnames">
|
|
<h3><span class="secno">6.1 </span>Why CURIEs and not QNames?</h3><p><em>This section is non-normative.</em></p>
|
|
<p>In many cases, language designers have attempted to use QNames for an
|
|
extension mechanism [<cite><a class="bibref" rel="biblioentry" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>]. QNames do permit independent
|
|
management of the name collection, and <em>can</em> map the names to
|
|
a resource. Unfortunately, QNames are unsuitable in most cases because
|
|
1) the use of QName as identifiers in attribute values and element
|
|
content is problematic as discussed in [<cite><a class="bibref" rel="biblioentry" href="#bib-QNAMES">QNAMES</a></cite>] and 2) the syntax of
|
|
QNames is overly restrictive and does not allow all possible IRIs to
|
|
be expressed.</p>
|
|
<p>A specific example of the problem this causes comes from attempting
|
|
to define the name collection for books. In a QName, the part after
|
|
the colon must be a valid element name, making an example such as the
|
|
following <em>invalid</em>: <code>isbn:0321154991</code></p>
|
|
<p>This is not a valid QName simply because "0321154991" is not a valid
|
|
element name. Yet, in the example given, we don't really want to
|
|
define a valid element name anyway. The whole reason for using a QName
|
|
was to reference an item in a private scope - that of ISBNs. Moreover,
|
|
in this example, we want the names within that scope to map to an IRI
|
|
that will reveal the meaning of that ISBN. As you can see, the
|
|
definition of QNames and this (relatively common) use case are in
|
|
conflict with one another.</p>
|
|
<p>This specification addresses the problem by defining CURIEs.
|
|
Syntactically, CURIEs are a superset of QNames.</p>
|
|
<p>Note that this specification is targeted at language designers, not
|
|
document authors. Any language designer considering the use of QNames
|
|
as a way to represent IRIs or unique tokens should consider instead
|
|
using CURIEs:</p>
|
|
<ul>
|
|
<li>CURIEs are designed from the ground up to be used in attribute
|
|
values. QNames are designed for unambiguously naming elements and
|
|
attributes.</li>
|
|
<li>CURIEs expand to IRIs, and any IRI can be represented by such an
|
|
expansion. QNames are treated as value pairs, but even if those
|
|
pairs are combined into a string, only a subset of IRIs can be
|
|
represented.</li>
|
|
<li>CURIEs can be used in non-XML grammars, and can even be used in
|
|
XML languages that do not support XML Namespaces. QNames are limited
|
|
to XML Namespace-aware XML Applications.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="normative section" id="s_model" typeof="bibo:Chapter" about="#s_model">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">7. </span>Processing Model</h2>
|
|
<p> This section looks at a generic set of processing rules for creating a
|
|
set of triples that represent the structured data present in an RDFa
|
|
document. Processing need not follow the DOM traversal technique
|
|
outlined here, although the effect of following some other manner of
|
|
processing must be the same as if the processing outlined here were
|
|
followed. The processing model is explained using the idea of DOM
|
|
traversal which makes it easier to describe (particularly in relation to
|
|
the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>). </p>
|
|
<div class="explanation">Note that in this section, explanations about the
|
|
processing model or guidance to implementors are enclosed in sections
|
|
like this.</div>
|
|
<div id="overview" typeof="bibo:Chapter" about="#overview" class="section">
|
|
<h3><span class="secno">7.1 </span>Overview</h3>
|
|
<p> Evaluating a document for RDFa triples is carried out by starting at
|
|
the document object, and then visiting each of its child elements in
|
|
turn, in document order, applying processing rules. Processing is
|
|
recursive in that for each child element the processor also visits
|
|
each of <em>its</em> child elements, and applies the same processing
|
|
rules. </p>
|
|
<p class="note"> In some environments there will be little difference
|
|
between starting at the root element of the document, and starting at
|
|
the document object itself. It is defined this way because in some
|
|
environments important information is present at the document object
|
|
level which is not present on the root element. </p>
|
|
<p> As processing continues, rules are applied which may generate
|
|
triples, and may also change the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>
|
|
information that will then be used when processing descendant
|
|
elements. </p>
|
|
<p class="note"> This specification does not say anything about what
|
|
should happen to the triples generated, or whether more triples might
|
|
be generated during processing than are outlined here. However, to be
|
|
conforming, an RDFa Processor <em class="rfc2119" title="must">must</em> act as if at a minimum the rules in
|
|
this section are applied, and a single <a class="tref" title="rdf-graph" href="#T-rdf-graph">RDF graph</a>
|
|
produced. As described in the <a href="#processorconf">RDFa Processor
|
|
Conformance</a> section, any additional triples generated <em class="rfc2119" title="must not">must not</em>
|
|
appear in the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a>. </p>
|
|
</div>
|
|
<div id="evaluation-context" typeof="bibo:Chapter" about="#evaluation-context" class="section">
|
|
<h3><span class="secno">7.2 </span>Evaluation Context</h3>
|
|
<p> During processing, each rule is applied using information provided
|
|
by an <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>. An <dfn title="initial-context" id="T-initial-context">initial context</dfn>
|
|
is created when processing begins. That context has the following
|
|
members:</p>
|
|
<ul>
|
|
<li> The <dfn title="base" id="T-base">base</dfn>. This will usually be the IRI of the
|
|
document being processed, but it could be some other IRI, set by
|
|
some other mechanism, such as the (X)HTML <code>base</code>
|
|
element. The important thing is that it establishes an IRI against
|
|
which relative paths can be resolved. </li>
|
|
<li> The <dfn title="parent-subject" id="T-parent-subject">parent subject</dfn>. The initial
|
|
value will be the same as the initial value of <a class="tref" title="base" href="#T-base">base</a>,
|
|
but it will usually change during the course of processing. </li>
|
|
<li> The <dfn title="parent-object" id="T-parent-object">parent object</dfn>. In some
|
|
situations the object of a statement becomes the subject of any
|
|
nested statements, and this property is used to convey this value.
|
|
Note that this value may be a <a class="tref" title="bnode" href="#T-bnode">bnode</a>, since in some
|
|
situations a number of nested statements are grouped together on one
|
|
<a class="tref" title="bnode" href="#T-bnode">bnode</a>. This means that the <a class="tref" title="bnode" href="#T-bnode">bnode</a> must be
|
|
set in the containing statement and passed down, and this property
|
|
is used to convey this value. </li>
|
|
<li>A list of current, in-scope <dfn title="list-of-iri-mappings" id="T-list-of-iri-mappings">IRI
|
|
|
|
mappings</dfn>.</li>
|
|
<li>A list of <dfn title="incomplete-triple" id="T-incomplete-triple">incomplete triple</dfn>s. A triple can be
|
|
incomplete when no object resource is provided alongside a predicate
|
|
that requires a resource (i.e., <a class="aref" href="#A-rel" title="rel">@rel</a> or <a class="aref" href="#A-rev" title="rev">@rev</a>).
|
|
|
|
The triples can be completed when a resource becomes available,
|
|
which will be when the next subject is specified (part of the
|
|
process called <a class="tref" title="chaining" href="#T-chaining">chaining</a>).</li>
|
|
<li>A <dfn title="list-mapping" id="T-list-mapping">list mapping</dfn> mapping IRIs to lists.</li>
|
|
<li>The <dfn title="language" id="T-language">language</dfn>. Note that there is no default
|
|
language.</li>
|
|
<li>The <dfn title="term-mappings" id="T-term-mappings">term mappings</dfn>, a list of terms and their
|
|
associated IRIs. This specification does not define an initial list.
|
|
Host Languages <em class="rfc2119" title="may">may</em> define an initial list.</li>
|
|
<li>The <dfn title="default-vocabulary" id="T-default-vocabulary">default vocabulary</dfn>, a value to use as the prefix
|
|
IRI when a <a class="tref" title="term" href="#T-term">term</a> is used. This specification does not
|
|
define an initial setting for the default vocabulary. Host Languages
|
|
<em class="rfc2119" title="may">may</em> define an initial setting.</li>
|
|
</ul>
|
|
<p>During the course of processing, new <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>s
|
|
are created which are passed to each child element. The rules
|
|
described below will determine the values of the items in the context.
|
|
Additionally, some rules will cause new triples to be created by
|
|
combining information provided by an element with information from the
|
|
<a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>.</p>
|
|
<p>During the course of processing a number of locally scoped values are
|
|
needed, as follows:</p>
|
|
<ul>
|
|
<li>An initially empty list of <a class="tref" title="iri-mapping" href="#T-iri-mapping">IRI mapping</a>s, called the
|
|
<dfn title="local-list-of-iri-mappings" id="T-local-list-of-iri-mappings">local list of IRI mappings</dfn>.</li>
|
|
<li>An initially empty <dfn title="list-of-incomplete-triples" id="T-list-of-incomplete-triples">list of incomplete triples</dfn>,
|
|
called the <dfn title="local-list-of-incomplete-triples" id="T-local-list-of-incomplete-triples">local list of incomplete triples</dfn>.</li>
|
|
<li>An initially empty <a class="tref" title="language" href="#T-language">language</a> value.</li>
|
|
|
|
<!--
|
|
<li>A <tdef>recurse</tdef> flag. Processing generally continues recursively through the entire tree of elements available. However, if an author indicates that some branch of the tree should be treated as an XML literal, no further processing should take place on that branch, and setting this flag to <code>false</code> would have that effect. </li>
|
|
-->
|
|
|
|
<li> A <dfn title="skip-element" id="T-skip-element">skip element</dfn> flag, which indicates whether the <a class="tref" title="current-element" href="#T-current-element">current
|
|
|
|
element</a> can safely be ignored since it has no relevant RDFa
|
|
attributes. Note that descendant elements will still be processed. </li>
|
|
<li> A <dfn title="new-subject" id="T-new-subject">new subject</dfn> value, which once calculated will set
|
|
the <a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a> property in an <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation
|
|
context</a>, as well as being used to complete any <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete
|
|
|
|
triple</a>s, as described in the next section. </li>
|
|
<li> A value for the <dfn title="current-property-value" id="T-current-property-value">current
|
|
property value</dfn>, the literal to use when creating triples
|
|
that have a literal object, or IRI-s in the absence of <a class="aref" href="#A-rel" title="rel">@rel</a>
|
|
or <a class="aref" href="#A-rev" title="rev">@rev</a>. </li>
|
|
<li> A value for the <dfn title="current-object-resource" id="T-current-object-resource">current
|
|
object resource</dfn>, the resource to use when creating triples
|
|
that have a resource object. </li>
|
|
<li> A value for the <dfn title="typed-resource" id="T-typed-resource">typed resource</dfn>,
|
|
the source for creating <code>rdf:type</code> relationships to
|
|
types specified in <a class="aref" href="#A-datatype" title="datatype">@datatype</a>. </li>
|
|
<li> The <dfn title="local-term-mappings" id="T-local-term-mappings">local term mappings</dfn>, a list of terms and their
|
|
associated IRIs.</li>
|
|
<li> The <dfn title="local-list-mapping" id="T-local-list-mapping">local list mapping</dfn>, mapping IRIs to lists</li>
|
|
<li> A <dfn title="local-default-vocabulary" id="T-local-default-vocabulary">local default vocabulary</dfn>, an IRI to use as a
|
|
prefix mapping when a <a class="tref" title="term" href="#T-term">term</a> is used.</li>
|
|
</ul>
|
|
</div>
|
|
<div id="s_chaining" typeof="bibo:Chapter" about="#s_chaining" class="section">
|
|
<h3><span class="secno">7.3 </span>Chaining</h3>
|
|
<p>Statement <dfn title="chaining" id="T-chaining">chaining</dfn> is an RDFa feature that allows the
|
|
author to link RDF statements together while avoiding unnecessary
|
|
repetitive markup. For example, if an author were to add statements as
|
|
children of an object that was a resource, these statements should be
|
|
interpreted as being about that resource: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<div rel="dbp:birthPlace" <span class="hilite">resource="http://dbpedia.org/resource/German_Empire"</span>>
|
|
<span class="hilite"><span property="dbp:conventionalLongName">the German Empire</span></span>
|
|
</div>
|
|
</div></pre>
|
|
<p> In this example we can see that an object resource
|
|
('German_Empire'), has become the subject for nested statements. This
|
|
markup also illustrates the basic chaining pattern of 'A has a B has a
|
|
C' (i.e., Einstein has a birth place of the German Empire, which has a
|
|
long name of "the German Empire"). </p>
|
|
<p>It's also possible for the subject of nested statements to provide
|
|
the object for <em>containing</em> statements — essentially the
|
|
reverse of the example we have just seen. To illustrate, we'll take an
|
|
example of the type of chaining just described, and show how it could
|
|
be marked up more efficiently. To start, we mark up the fact that
|
|
Albert Einstein had, at some point in his life, a residence both in
|
|
the German Empire and in Switzerland: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span class="hilite"><div rel="dbp-owl:residence" resource="http://dbpedia.org/resource/German_Empire"></div></span>
|
|
<span class="hilite"><div rel="dbp-owl:residence" resource="http://dbpedia.org/resource/Switzerland"></div></span>
|
|
</div></pre>
|
|
<p>Now, we show the same information, but this time we create an <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete
|
|
|
|
triple</a> from the residence part, and then use any number of
|
|
further subjects to 'complete' that triple, as follows:</p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein" rel="dbp-owl:residence">
|
|
<span class="hilite"><span about="http://dbpedia.org/resource/German_Empire"></span></span>
|
|
<span class="hilite"><span about="http://dbpedia.org/resource/Switzerland"></span></span>
|
|
</div></pre>
|
|
<p> In this example, the <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete triple</a> actually gets
|
|
completed twice, once for the German Empire and once for Switzerland,
|
|
giving exactly the same information as we had in the earlier example:
|
|
</p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein>
|
|
dbp-owl:residence <http://dbpedia.org/resource/German_Empire> .
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
dbp-owl:residence <http://dbpedia.org/resource/Switzerland> .</pre>
|
|
<p> Chaining can sometimes involve elements containing relatively
|
|
minimal markup, for example showing only one resource, or only one
|
|
predicate. Here the <code>img</code> element is used to carry a
|
|
picture of Einstein: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<div <span class="hilite">rel="foaf:depiction"</span>>
|
|
<img src="http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg" />
|
|
</div>
|
|
</div></pre>
|
|
<p> When such minimal markup is used, any of the resource-related
|
|
attributes could act as a subject or an object in the chaining: </p>
|
|
<pre class="example"><div <span class="hilite">about="http://dbpedia.org/resource/Albert_Einstein"</span>>
|
|
<div <span class="hilite">rel="dbp-owl:residence"</span>>
|
|
<span <span class="hilite">about="http://dbpedia.org/resource/German_Empire"</span>></span>
|
|
<span <span class="hilite">about="http://dbpedia.org/resource/Switzerland"</span>></span>
|
|
</div>
|
|
</div></pre>
|
|
<p>Note that, as noted above, in many situations the <a class="aref" href="#A-property" title="property">@property</a>
|
|
and <a class="aref" href="#A-rel" title="rel">@rel</a> are interchangeable. This is <em>not</em> true
|
|
for chaining. Taking the first example, if that example was used as
|
|
follows:</p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<div <span class="hilite">property="dbp:birthPlace"</span> resource="http://dbpedia.org/resource/German_Empire">
|
|
<span property="dbp:conventionalLongName">the German Empire</span>
|
|
</div>
|
|
</div></pre>
|
|
<p>The subject for the 'German Empire' would remain Albert Einstein (and
|
|
that would, of course, be an error). This is the main difference
|
|
between <a class="aref" href="#A-property" title="property">@property</a> and <a class="aref" href="#A-rel" title="rel">@rel</a>: the latter
|
|
induces chaining, whereas the former, usually, does not.</p>
|
|
</div>
|
|
<div id="s_curieprocessing" typeof="bibo:Chapter" about="#s_curieprocessing" class="section">
|
|
<h3><span class="secno">7.4 </span>CURIE and IRI Processing</h3>
|
|
<p> Since RDFa is ultimately a means for transporting RDF, a key concept
|
|
is the <em>resource</em> and its manifestation as a IRI. RDF deals
|
|
with complete IRIs (not relative paths); when converting RDFa to
|
|
triples, any relative IRIs <em class="rfc2119" title="must">must</em> be resolved relative to the base IRI,
|
|
using the algorithm defined in section 6.5 of RFC 3987 [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], <em>Reference
|
|
|
|
Resolution</em>. The values of <a href="#s_syntax">RDFa attributes</a>
|
|
that refer to IRIs use three different datatypes: <a class="externalDFN" title="URI">URI</a>,
|
|
<a class="datatype internalDFN" title="SafeCURIEorCURIEorIRI" href="#dfn-safecurieorcurieoriri">SafeCURIEorCURIEorIRI</a>, or <a class="datatype internalDFN" title="TERMorCURIEorAbsIRI" href="#dfn-termorcurieorabsiri">TERMorCURIEorAbsIRI</a>.
|
|
All these attributes are mapped, after processing, to IRIs. The
|
|
handling of these attributes is as follows:</p>
|
|
<dl>
|
|
<dt>URI</dt>
|
|
<dd>The content is a URI, and is used as such.</dd>
|
|
<dt>SafeCURIEorCURIEorIRI</dt>
|
|
<dd>
|
|
<ul>
|
|
<li>When the value is surrounded by square brackets, then the
|
|
content within the brackets is evaluated as a CURIE according to
|
|
the <a href="#s_curies">CURIE Syntax definition</a>. If it is
|
|
not a valid CURIE, the value <em class="rfc2119" title="must">must</em> be ignored.</li>
|
|
<li>Otherwise, the value is evaluated as a CURIE. If it is a valid
|
|
CURIE, the resulting IRI is used; otherwise, the value is
|
|
processed as an IRI. </li>
|
|
</ul>
|
|
</dd>
|
|
<dt>TERMorCURIEorAbsIRI</dt>
|
|
<dd>
|
|
<ul id="C2" about="#C2" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-07-01#resolution_3" rel="bibo:affirmedBy">
|
|
<li>If the value is an <a class="tref" title="term" href="#T-term">term</a>
|
|
then it is evaluated as a term according to <a href="#s_terms">General Use of Terms in Attributes</a>. Note that this step may mean
|
|
that the value is to be ignored.</li>
|
|
<li>If the value is a valid CURIE, then the resulting IRI is used.</li>
|
|
<li>If the value is an absolute IRI, that value is used.</li>
|
|
<li>Otherwise, the value is ignored.</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p id="C3" about="#C3" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-05-20#resolution_2" rel="bibo:affirmedBy">Note
|
|
|
|
that it is possible for all values in an attribute to be ignored. When
|
|
that happens, the attribute <em class="rfc2119" title="must">must</em> be treated as if it were empty.</p>
|
|
<p>For example, the full IRI for Albert Einstein on DBPedia is:</p>
|
|
<pre class="example">http://dbpedia.org/resource/Albert_Einstein</pre>
|
|
<p>This can be shortened by authors to make the information easier to
|
|
manage, using a CURIE. The first step is for the author to create a
|
|
prefix mapping that links a prefix to some leading segment of the IRI.
|
|
In RDFa these mappings are expressed using the XML namespace syntax:</p>
|
|
<pre class="example"><div <span class="hilite">prefix="db: http://dbpedia.org/"</span>>
|
|
...
|
|
</div></pre>
|
|
<p>Once the prefix has been established, an author can then use it to
|
|
shorten an IRI as follows:</p>
|
|
<pre class="example"><div prefix="db: http://dbpedia.org/">
|
|
<div about="<span class="hilite">db:resource/Albert_Einstein</span>">
|
|
...
|
|
</div>
|
|
</div></pre>
|
|
<p> The author is free to split the IRI at any point, as long as it
|
|
begins at the left end. However, since a common use of CURIEs is to
|
|
make available libraries of terms and values, the prefix will usually
|
|
be mapped to some common segment that provides the most re-use, often
|
|
provided by those who manage the library of terms. For example, since
|
|
DBPedia contains an enormous list of resources, it is more efficient
|
|
to create a prefix mapping that uses the base location of the
|
|
resources:</p>
|
|
<pre class="example"><div <span class="hilite">prefix="dbr: http://dbpedia.org/resource/"</span>>
|
|
<div about="<span class="hilite">dbr:Albert_Einstein</span>">
|
|
...
|
|
</div>
|
|
<div about="<span class="hilite">dbr:Baruch_Spinoza</span>">
|
|
...
|
|
</div>
|
|
</div></pre>
|
|
<div class="explanation"> Note that it is generally considered a bad
|
|
idea to use relative paths in prefix declarations. Since it is
|
|
possible that an author may ignore this guidance, it is further
|
|
possible that the IRI obtained from a CURIE is relative. However,
|
|
since all IRIs must be resolved relative to <a class="tref" title="base" href="#T-base">base</a> before
|
|
being used to create triples, the use of relative paths should not
|
|
have any effect on processing. </div>
|
|
<div id="scoping-of-prefix-mappings" typeof="bibo:Chapter" about="#scoping-of-prefix-mappings" class="section">
|
|
<h4><span class="secno">7.4.1 </span>Scoping of Prefix Mappings</h4>
|
|
<p>CURIE prefix mappings are defined on the current element and its
|
|
descendants. The inner-most mapping for a given prefix takes
|
|
precedence. For example, the IRIs expressed by the following two
|
|
CURIEs are different, despite the common prefix, because the prefix
|
|
mappings are locally scoped: </p>
|
|
<pre class="example"><div <span class="hilite">prefix="dbr: http://dbpedia.org/resource/"</span>>
|
|
<div about="<span class="hilite">dbr:Albert_Einstein</span>">
|
|
...
|
|
</div>
|
|
</div>
|
|
<div <span class="hilite">prefix="dbr: http://someotherdb.org/resource/"</span>>
|
|
<div about="<span class="hilite">dbr:Albert_Einstein</span>">
|
|
...
|
|
</div>
|
|
</div></pre> </div>
|
|
<div id="general-use-of-curies-in-attributes" typeof="bibo:Chapter" about="#general-use-of-curies-in-attributes" class="section">
|
|
<h4><span class="secno">7.4.2 </span>General Use of CURIEs in Attributes</h4>
|
|
<p> There are a number of ways that attributes make use of CURIEs, and
|
|
they need to be dealt with differently. These are: </p>
|
|
<ol>
|
|
<li>An attribute may allow one or more values that are a mixture of
|
|
TERMs, CURIEs, and absolute IRIs.</li>
|
|
<li>An attribute may allow one or more values that are a mixture of
|
|
CURIEs and IRIs. In this case any value that is not a CURIE, as
|
|
outlined in section <a href="#s_curies">CURIE Syntax Definition</a>,
|
|
will be processed as an IRI.</li>
|
|
<li>If the value <em>is</em> surrounded by square brackets, then
|
|
the content within the brackets is always evaluated according to
|
|
the rules in <a href="#s_curies">CURIE Syntax Definition</a> -
|
|
and if that content is not a CURIE, then the content <em class="rfc2119" title="must">must</em> be
|
|
ignored.</li>
|
|
</ol>
|
|
<p class="note">An empty attribute value (e.g., <code>typeof=''</code>)
|
|
is <em>still </em> a CURIE, and is processed as such. The rules
|
|
for this processing are defined in <a href="#s_sequence">Sequence</a>.
|
|
Specifically, however, an empty attribute value is <em>never</em>
|
|
treated as a relative IRI by this specification.</p>
|
|
<p>An example of an attribute that can contain a CURIEorIRI is <a class="aref" href="#A-about" title="about">@about</a>.
|
|
To express an IRI directly, an author might do this:</p>
|
|
<pre class="example"><div <span class="hilite">about="http://dbpedia.org/resource/Albert_Einstein"</span>>
|
|
...
|
|
</div></pre>
|
|
<p>whilst to express the IRI above as a CURIE they would do this:</p>
|
|
<pre class="example"><div <span class="hilite">about="dbr:Albert_Einstein"</span>>
|
|
...
|
|
</div></pre>
|
|
<p>The author could also use a safe CURIE, as follows:</p>
|
|
<pre class="example"><div <span class="hilite">about="[dbr:Albert_Einstein]"</span>>
|
|
...
|
|
</div></pre>
|
|
<p> Since non-CURIE values <em class="rfc2119" title="must">must</em> be ignored, the following value in <a class="aref" href="#A-about" title="about">@about</a>
|
|
would <em>not</em> set a new subject, since <a class="aref" href="#A-about" title="about">@about</a>
|
|
does not permit the use of <a class="datatype internalDFN" title="TERM" href="#dfn-term">TERM</a>s, and the CURIE
|
|
has no prefix separator.</p>
|
|
<pre class="example"><div <span class="hilite">about="[Albert_Einstein]"</span>>
|
|
...
|
|
</div></pre>
|
|
<p>However, this markup <em>would</em> set a subject, since it is not
|
|
a CURIE, but a valid relative IRI:</p>
|
|
<pre class="example"><div <span class="hilite">about="Albert_Einstein"</span>>
|
|
...
|
|
</div></pre>
|
|
<p>
|
|
Note that several RDFa attributes are able to also take <a class="datatype internalDFN" title="term" href="#dfn-term">TERMS</a> as their value.
|
|
This is discussed in the next section.
|
|
</p>
|
|
</div>
|
|
<div id="s_terms" typeof="bibo:Chapter" about="#s_terms" class="section">
|
|
<h4><span class="secno">7.4.3 </span>General Use of Terms in Attributes</h4>
|
|
<p>Some RDFa attributes have a datatype that permits a <dfn title="term" id="T-term">term</dfn> to be referenced.
|
|
RDFa defines the syntax of a term as:</p>
|
|
<pre><span id="P_term">term ::= <a href="http://www.w3.org/TR/2006/REC-xml-names-20060816/#NT-NCNameStartChar">NCNameStartChar</a> <a href="#P_termChar">termChar</a>*</span>
|
|
<span id="P_termChar">termChar ::= ( <a href="http://www.w3.org/TR/2006/REC-xml-names-20060816/#NT-NCNameChar">NameChar</a> - ':' ) | '/'</span>
|
|
</pre>
|
|
<p class="note">For the avoidance of doubt, this definition
|
|
means a 'term' in RDFa is an XML <a href="http://www.w3.org/TR/2006/REC-xml-names-20060816/#NT-NCName">NCName</a> that also permits
|
|
slash as a non-leading character.</p>
|
|
<p>When an RDFa attribute permits the use of a term, and the value
|
|
being evaluated matches the production for term above, it is
|
|
transformed to an IRI using the following logic:</p>
|
|
<ul>
|
|
<li>Check if the <code>term</code> matches an item in the list of <a class="tref" title="local-term-mappings" href="#T-local-term-mappings">local
|
|
term mappings</a>. First compare against the list <em>case-sensitively</em>,
|
|
and if there is no match then compare <em>case-insensitively</em>.
|
|
If there is a match, use the associated IRI.</li>
|
|
<li>If there is a <a class="tref" title="local-default-vocabulary" href="#T-local-default-vocabulary">local default vocabulary</a> the IRI is
|
|
obtained by concatenating that value and the <code>term</code>.</li>
|
|
<li>If there is no <a class="tref" title="local-default-vocabulary" href="#T-local-default-vocabulary">local default vocabulary</a>, the <code>term</code>
|
|
has no associated IRI and <em class="rfc2119" title="must">must</em> be ignored.</li>
|
|
</ul>
|
|
|
|
<!-- <p class='note' id="C22" about="#C22" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-01-20#ISSUE__2d_63__3a__Case__2d_insensitive_term_matching" rel='bibo:affirmedBy'>In the event that multiple <code>term</code>s are defined that differ only in case (e.g., 'Agent', 'agent', and 'AGENT'), if a reference is made which DOES NOT match case-sensitively (e.g., typeof='AGENt'), the results are UNSPECIFIED.</p> -->
|
|
|
|
</div>
|
|
<div id="use-of-curies-in-specific-attributes" typeof="bibo:Chapter" about="#use-of-curies-in-specific-attributes" class="section">
|
|
<h4><span class="secno">7.4.4 </span>Use of CURIEs in Specific Attributes</h4>
|
|
<p> The general rules discussed in the previous sections apply to the
|
|
RDFa attributes in the following ways: </p>
|
|
<ul>
|
|
<li><a class="aref" href="#A-about" title="about">@about</a> and <a class="aref" href="#A-resource" title="resource">@resource</a> support the
|
|
datatype <a class="datatype internalDFN" title="SafeCURIEorCURIEorIRI" href="#dfn-safecurieorcurieoriri">SafeCURIEorCURIEorIRI</a> - allowing a
|
|
SafeCURIE, a CURIE, or an IRI.</li>
|
|
<li><a class="aref" href="#A-href" title="href">@href</a> and <a class="aref" href="#A-src" title="src">@src</a> are as defined in the
|
|
Host Language (e.g., XHTML), and support only an IRI.</li>
|
|
<li><a class="aref" href="#A-vocab" title="vocab">@vocab</a> supports an IRI.</li>
|
|
<li><a class="aref" href="#A-datatype" title="datatype">@datatype</a> supports the datatype <a class="datatype internalDFN" title="TERMorCURIEorAbsIRI" href="#dfn-termorcurieorabsiri">TERMorCURIEorAbsIRI</a>
|
|
- allowing a single Term, CURIE, or Absolute IRI.</li>
|
|
<li><a class="aref" href="#A-property" title="property">@property</a>, <a class="aref" href="#A-typeof" title="typeof">@typeof</a>, <a class="aref" href="#A-rel" title="rel">@rel</a>,
|
|
and <a class="aref" href="#A-rev" title="rev">@rev</a> support the datatype <a class="datatype internalDFN" title="TERMorCURIEorAbsIRIs" href="#dfn-termorcurieorabsiris">TERMorCURIEorAbsIRIs</a>
|
|
- allowing one or more Terms, CURIEs, or Absolute IRIs.</li>
|
|
</ul>
|
|
<p> Any value that matches a defined term <em class="rfc2119" title="must">must</em> be expanded into a
|
|
reference to the corresponding IRI. For example in [<cite><a class="bibref" rel="biblioentry" href="#bib-XHTML-RDFA">XHTML-RDFA</a></cite>]
|
|
the following examples: </p>
|
|
<pre class="example"><link rel="<span class="hilite">next</span>" href="http://example.org/page2.html" />
|
|
<link rel="<span class="hilite">xhv:next</span>" href="http://example.org/page2.html" /></pre>
|
|
<p>would each generate the following triple:</p>
|
|
<pre class="example"><> <http://www.w3.org/1999/xhtml/vocab#next> <http://example.org/page2.html> .</pre> </div>
|
|
<div id="s_blankNodes" typeof="bibo:Chapter" about="#s_blankNodes" class="section">
|
|
<h4><span class="secno">7.4.5 </span>Referencing Blank Nodes</h4>
|
|
<p>In RDFa, it is possible to establish relationships using various
|
|
types of resource references, including <a class="tref" title="bnode" href="#T-bnode">bnode</a>s. If a
|
|
subject or object is defined using a CURIE, and that CURIE
|
|
explicitly names a <a class="tref" title="bnode" href="#T-bnode">bnode</a>, then a Conforming Processor
|
|
<em class="rfc2119" title="must">must</em> create the <a class="tref" title="bnode" href="#T-bnode">bnode</a> when it is encountered during
|
|
parsing. The RDFa Processor <em class="rfc2119" title="must">must</em> also ensure that no <a class="tref" title="bnode" href="#T-bnode">bnode</a>
|
|
created automatically (as a result of <a class="tref" title="chaining" href="#T-chaining">chaining</a>) has a
|
|
name that collides with a <a class="tref" title="bnode" href="#T-bnode">bnode</a> that is defined by
|
|
explicit reference in a CURIE.</p>
|
|
<p>Consider the following example:</p>
|
|
<pre class="example"><link <span class="hilite">about="_:john"</span> rel="foaf:mbox"
|
|
href="mailto:john@example.org" />
|
|
<link <span class="hilite">about="_:sue"</span> rel="foaf:mbox"
|
|
href="mailto:sue@example.org" />
|
|
<link <span class="hilite">about="_:john"</span> rel="foaf:knows"
|
|
resource="_:sue" /></pre>
|
|
<p>In the above fragment, two <a class="tref" title="bnode" href="#T-bnode">bnodes</a> are
|
|
explicitly created as the subject of triples. Those <a class="tref" title="bnode" href="#T-bnode">bnodes</a>
|
|
are then referenced to demonstrate the relationship between the
|
|
parties. After processing, the following triples will be generated:</p>
|
|
<pre class="example">_:john foaf:mbox <mailto:john@example.org> .
|
|
_:sue foaf:mbox <mailto:sue@example.org> .
|
|
_:john foaf:knows _:sue .</pre>
|
|
<p class="note" id="C18" about="#C18" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-10-21#resolution_3" rel="bibo:affirmedBy">
|
|
RDFa Processors use, internally, implementation-dependent
|
|
identifiers for bnodes. When triples are <em>retrieved</em>, new
|
|
bnode indentifiers are used, which usually bear no relation to the
|
|
original identifiers. However, implementations do ensure that these
|
|
generated bnode identifiers are consistent: each bnode will have its
|
|
own identifier, all references to a particular bnode will use the
|
|
same identifier, and different bnodes will have different
|
|
identifiers. </p>
|
|
<p>As a special case, <code>_:</code> is also a valid reference for <em>one</em>
|
|
specific <a class="tref" title="bnode" href="#T-bnode">bnode</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div id="s_sequence" typeof="bibo:Chapter" about="#s_sequence" class="section">
|
|
<h3><span class="secno">7.5 </span>Sequence</h3>
|
|
<p> Processing would normally begin after the document to be parsed has
|
|
been completely loaded. However, there is no requirement for this to
|
|
be the case, and it is certainly possible to use a stream-based
|
|
approach, such as SAX [<cite><a class="bibref" rel="biblioentry" href="#bib-SAX">SAX</a></cite>] to extract the RDFa information.
|
|
However, if some approach other than the DOM traversal technique
|
|
defined here is used, it is important to ensure that Host
|
|
Language-specific processing rules are applied (e.g., XHTML+RDFa
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-XHTML-RDFA">XHTML-RDFA</a></cite>] indicates the <code>base</code> element can be used,
|
|
and <code>base</code> will affect the interpretation of IRIs in <code>meta</code>
|
|
or <code>link</code> elements even if those elements are before the <code>base</code>
|
|
element in the stream). </p>
|
|
<p id="PS-initial-context"> At the beginning of processing, an initial <dfn title="evaluation-context" id="T-evaluation-context">evaluation
|
|
|
|
context</dfn> is created, as follows:</p>
|
|
<ul>
|
|
<li>the <a class="tref" title="base" href="#T-base">base</a> is set to the IRI of the document (or
|
|
another value specified in a language specific manner such as the
|
|
HTML <code>base</code> element); </li>
|
|
<li>the <a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a> is set to the <a class="tref" title="base" href="#T-base">base</a>
|
|
value;</li>
|
|
<li>the <a class="tref" title="parent-object" href="#T-parent-object">parent object</a> is set to null;</li>
|
|
<li>the <a class="tref" title="list-of-incomplete-triples" href="#T-list-of-incomplete-triples">list of incomplete triples</a> is empty;</li>
|
|
<li>the <a class="tref" title="list-mapping" href="#T-list-mapping">list mapping</a> is empty;</li>
|
|
<li>the <a class="tref" title="language" href="#T-language">language</a> is set to null.</li>
|
|
<li id="C12" about="#C12" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-07-22#resolution_2" rel="bibo:affirmedBy">
|
|
the <a class="tref" title="list-of-iri-mappings" href="#T-list-of-iri-mappings">list of IRI mappings</a> is empty (or a list defined
|
|
in the <a href="#s_initialcontexts">initial context</a> of the Host
|
|
Language).</li>
|
|
<li id="C13" about="#C13" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-07-22#resolution_2" rel="bibo:affirmedBy">the
|
|
|
|
<a class="tref" title="term-mappings" href="#T-term-mappings">term mappings</a> is set to null (or a list defined in the
|
|
<a href="#s_initialcontexts">initial context</a> of the Host
|
|
Language).</li>
|
|
<li id="C14" about="#C14" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-07-22#resolution_2" rel="bibo:affirmedBy">the
|
|
|
|
<a class="tref" title="default-vocabulary" href="#T-default-vocabulary">default vocabulary</a> is set to null (or a IRI defined in
|
|
the <a href="#s_initialcontexts">initial context</a> of the Host
|
|
Language).</li>
|
|
</ul>
|
|
<p> Processing begins by applying the processing rules below to the
|
|
document object, in the context of this initial <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation
|
|
context</a>. All elements in the tree are also processed
|
|
according to the rules described below, depth-first, although the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation
|
|
|
|
context</a> used for each set of rules will be based on previous
|
|
rules that may have been applied.</p>
|
|
<p class="note">This specification defines processing rules for optional
|
|
attributes that may not be present in all Host Languages (e.g., <code>@xmlns:</code>).
|
|
|
|
|
|
If these attributes are not supported in the Host Language, then the
|
|
corresponding processing rules are not relevant for that language.</p>
|
|
<p> The processing rules are:</p>
|
|
<ol>
|
|
<li id="PS-initialization"> First, the local values are initialized,
|
|
as follows:
|
|
<ul>
|
|
|
|
<!-- <li>the <tref>recurse</tref> flag is set to 'true';</li> -->
|
|
|
|
<li>the <a class="tref" title="skip-element" href="#T-skip-element">skip element</a> flag is set to 'false';</li>
|
|
<li><a class="tref" title="new-subject" href="#T-new-subject">new subject</a> is set to null;</li>
|
|
<li><a class="tref" title="current-object-resource" href="#T-current-object-resource">current object resource</a> is set to null;</li>
|
|
<li><a class="tref" title="typed-resource" href="#T-typed-resource">typed resource</a> is set to null;</li>
|
|
<li>the <a class="tref" title="local-list-of-iri-mappings" href="#T-local-list-of-iri-mappings">local list of IRI mappings</a> is set to the
|
|
list of IRI mappings from the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>;</li>
|
|
<li>the <a class="tref" title="local-list-of-incomplete-triples" href="#T-local-list-of-incomplete-triples">local list of incomplete triples</a> is set to
|
|
null;</li>
|
|
<li>the <a class="tref" title="list-mapping" href="#T-list-mapping">list mapping</a> is set to (a reference of) the
|
|
list mapping from the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>;</li>
|
|
<li>the <a class="tref" title="current-language" href="#T-current-language">current language</a> value is set to the <a class="tref" title="language" href="#T-language">language</a>
|
|
value from the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>.</li>
|
|
<li>the <a class="tref" title="local-term-mappings" href="#T-local-term-mappings">local term mappings</a> is set to the <a class="tref" title="term-mappings" href="#T-term-mappings">term
|
|
|
|
mappings</a> from the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>.</li>
|
|
<li>the <a class="tref" title="local-default-vocabulary" href="#T-local-default-vocabulary">local default vocabulary</a> is set to the <a class="tref" title="default-vocabulary" href="#T-default-vocabulary">default
|
|
|
|
vocabulary</a> from the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>.</li>
|
|
</ul>
|
|
<div class="explanation"> Note that some of the local variables are
|
|
temporary containers for values that will be passed to descendant
|
|
elements via an <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>. In some cases
|
|
the containers will have the same name, so to make it clear which
|
|
is being acted upon in the following steps, the local version of
|
|
an item will generally be referred to as such. </div>
|
|
</li>
|
|
<li id="PS-default-vocabulary"> Next the <dfn title="current-element" id="T-current-element">current element</dfn>
|
|
is examined for any change to the <a class="tref" title="default-vocabulary" href="#T-default-vocabulary">default vocabulary</a>
|
|
via <a class="aref" href="#A-vocab" title="vocab">@vocab</a>. If <a class="aref" href="#A-vocab" title="vocab">@vocab</a> is present and
|
|
contains a value, its value updates the <a class="tref" title="local-default-vocabulary" href="#T-local-default-vocabulary">local default
|
|
vocabulary</a>. If the value is empty, then the <a class="tref" title="local-default-vocabulary" href="#T-local-default-vocabulary">local
|
|
default vocabulary</a> <em class="rfc2119" title="must">must</em> be reset to the Host Language
|
|
defined default (if any).
|
|
<div class="explanation"> The value of <a class="aref" href="#A-vocab" title="vocab">@vocab</a> is used
|
|
to generate a triple as follows:
|
|
<dl>
|
|
<dt>subject</dt>
|
|
<dd><a class="tref" title="base" href="#T-base">base</a></dd>
|
|
<dt>predicate</dt>
|
|
<dd><code>http://www.w3.org/ns/rdfa#usesVocabulary</code></dd>
|
|
<dt>object</dt>
|
|
<dd>value from <a class="aref" href="#A-vocab" title="vocab">@vocab</a></dd>
|
|
</dl>
|
|
</div>
|
|
<div class="explanation"> A Host Language is not required to define
|
|
a default vocabulary. In such a case, setting <a class="aref" href="#A-vocab" title="vocab">@vocab</a>
|
|
to the empty value has the effect of clearing the <a class="tref" title="local-default-vocabulary" href="#T-local-default-vocabulary">local
|
|
default vocabulary</a>. </div>
|
|
</li>
|
|
<li id="PS-IRI-mappings">Next, the <a class="tref" title="current-element" href="#T-current-element">current element</a> is
|
|
examined for <dfn title="iri-mapping" id="T-iri-mapping">IRI mapping</dfn>s and these are added to the <a class="tref" title="local-list-of-iri-mappings" href="#T-local-list-of-iri-mappings">local
|
|
|
|
list of IRI mappings</a>. Note that a <a class="tref" title="iri-mapping" href="#T-iri-mapping">IRI mapping</a>
|
|
will simply overwrite any current mapping in the list that has the
|
|
same name;
|
|
<div class="explanation"> Mappings are defined via <a class="aref" href="#A-prefix" title="prefix">@prefix</a>.
|
|
<span id="C21" about="#C21" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-01-13#ISSUE__2d_62__3a____40_prefix_processing_order" rel="bibo:affirmedBy">Values
|
|
|
|
in this attribute are evaluated from beginning to end (e.g.,
|
|
left to right in typical documents).</span> <span id="C23" about="#C23" rel="bibo:affirmedBy" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-02-14#resolution_3">For
|
|
|
|
backward compatibility, RDFa Processors <em class="rfc2119" title="should">should</em> also permit the
|
|
definition of mappings via <span class="aref">@xmlns</span>. In
|
|
this case, the value to be mapped is set by the XML namespace
|
|
prefix, and the value to map is the value of the attribute — an
|
|
IRI. (Note that prefix mapping via <span class="aref">@xmlns</span>
|
|
is deprecated, and may be removed in a future version of this
|
|
specification.)</span> When <span class="aref">xmlns</span> is
|
|
supported, such mappings <em class="rfc2119" title="must">must</em> be processed before processing an
|
|
mappings from <a class="aref" href="#A-prefix" title="prefix">@prefix</a> on the same element. <span id="C5" about="#C5" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-05-13#resolution_1" rel="bibo:affirmedBy">
|
|
Regardless of how the mapping is declared, the value to be
|
|
mapped <em class="rfc2119" title="must">must</em> be converted to lower case</span>, and the IRI is
|
|
not processed in any way; in particular if it is a relative path
|
|
it <em class="rfc2119" title="must not">must not</em> be resolved against the current <a class="tref" title="base" href="#T-base">base</a>.
|
|
Authors <em class="rfc2119" title="should not">should not</em> use relative paths as the IRI. </div>
|
|
</li>
|
|
<li id="PS-language" about="#PS-language" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-05-13#resolution_3" rel="bibo:affirmedBy">
|
|
The <a class="tref" title="current-element" href="#T-current-element">current element</a> is also parsed for any language
|
|
information, and if present, <a class="tref" title="current-language" href="#T-current-language">current language</a> is set
|
|
accordingly;
|
|
<div class="explanation"> Host Languages that incorporate RDFa <em class="rfc2119" title="may">may</em>
|
|
provide a mechanism for specifying the natural language of an
|
|
element and its contents (e.g., XML provides the general-purpose
|
|
XML attribute <span class="aref">@xml:lang</span>). </div>
|
|
</li>
|
|
<li id="PS-new-subject"> If the <a class="tref" title="current-element" href="#T-current-element">current element</a> contains
|
|
no <a class="aref" href="#A-rel" title="rel">@rel</a> or <a class="aref" href="#A-rev" title="rev">@rev</a> attribute, then the next
|
|
step is to establish a value for <a class="tref" title="new-subject" href="#T-new-subject">new subject</a>. This
|
|
step has two possible alternatives.
|
|
<ol>
|
|
<li id="GK1" about="#GK1" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-11-10#resolution_2" rel="bibo:affirmedBy">
|
|
If the <a class="tref" title="current-element" href="#T-current-element">current element</a> contains the <a class="aref" href="#A-property" title="property">@property</a>
|
|
attribute, but does <em>not</em> contains neither the <a class="aref" href="#A-content" title="content">@content</a>
|
|
nor <a class="aref" href="#A-datatype" title="datatype">@datatype</a> attributes, then
|
|
<div class="explanation"> <a class="tref" title="new-subject" href="#T-new-subject">new subject</a> is set to
|
|
the IRI obtained from the first match from the following rule:
|
|
<ul>
|
|
<li>by using the IRI from <a class="aref" href="#A-about" title="about">@about</a>, if present,
|
|
obtained according to the section on <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a>;</li>
|
|
</ul>
|
|
<p>If no IRI is provided by a resource attribute, then the
|
|
first match from the following rules will apply:</p>
|
|
<ul>
|
|
<li>if the element is the root element of the document, then
|
|
act as if there is an empty <a class="aref" href="#A-about" title="about">@about</a> present,
|
|
and process it according to the rule for <a class="aref" href="#A-about" title="about">@about</a>,
|
|
above;</li>
|
|
<li><em>otherwise</em>, if <a class="tref" title="parent-object" href="#T-parent-object">parent object</a> is
|
|
present, <a class="tref" title="new-subject" href="#T-new-subject">new subject</a> is set to the value of
|
|
<a class="tref" title="parent-object" href="#T-parent-object">parent object</a>.</li>
|
|
</ul>
|
|
<p>If <a class="aref" href="#A-typeof" title="typeof">@typeof</a> is present:</p>
|
|
<ul>
|
|
<li>if the element contains a <a class="aref" href="#A-href" title="href">@href</a>, <a class="aref" href="#A-src" title="src">@src</a>,
|
|
or <a class="aref" href="#A-resource" title="resource">@resource</a> attribute, the value of <a class="tref" title="typed-resource" href="#T-typed-resource">typed
|
|
|
|
resource</a> is set the IRI from the first value from
|
|
this set of attributes, obtained according to the section
|
|
on <a href="#s_curieprocessing">CURIE and IRI Processing</a>;</li>
|
|
<li>otherwise, the value of <a class="tref" title="typed-resource" href="#T-typed-resource">typed resource</a> is
|
|
set to a newly created <a class="tref" title="bnode" href="#T-bnode">bnode</a></li>
|
|
<li>The value of the <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object resource</a>
|
|
is set to the value of <a class="tref" title="typed-resource" href="#T-typed-resource">typed resource</a></li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<li><em>otherwise</em>:
|
|
<div class="explanation">
|
|
<p>if the element contains a <a class="aref" href="#A-about" title="about">@about</a>, <a class="aref" href="#A-href" title="href">@href</a>,
|
|
<a class="aref" href="#A-src" title="src">@src</a>, or <a class="aref" href="#A-resource" title="resource">@resource</a> attribute, <a class="tref" title="new-subject" href="#T-new-subject">new
|
|
|
|
subject</a> is set to the IRI obtained from the first
|
|
value from this set of attributes, obtained according to the
|
|
section on <a href="#s_curieprocessing">CURIE and IRI
|
|
Processing</a>.</p>
|
|
<p>If no IRI is provided by a resource attribute, then the
|
|
first match from the following rules will apply:</p>
|
|
<ul>
|
|
<li>if the element is the root element of the document, then
|
|
act as if there is an empty <a class="aref" href="#A-about" title="about">@about</a> present,
|
|
and process it according to the rule for <a class="aref" href="#A-about" title="about">@about</a>,
|
|
above;</li>
|
|
<li>if <a class="aref" href="#A-typeof" title="typeof">@typeof</a> is present, then <a class="tref" title="new-subject" href="#T-new-subject">new
|
|
subject</a> is set to be a newly created <a class="tref" title="bnode" href="#T-bnode">bnode</a>.</li>
|
|
<li><em>otherwise</em>, if <a class="tref" title="parent-object" href="#T-parent-object">parent object</a> is
|
|
present, <a class="tref" title="new-subject" href="#T-new-subject">new subject</a> is set to the value of
|
|
<a class="tref" title="parent-object" href="#T-parent-object">parent object</a>. Additionally, if <a class="aref" href="#A-property" title="property">@property</a>
|
|
is <em>not</em> present then the <a class="tref" title="skip-element" href="#T-skip-element">skip element</a>
|
|
flag is set to 'true';</li>
|
|
</ul>
|
|
<p id="GK2" about="#GK2" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-11-10#resolution_2" rel="bibo:affirmedBy">if
|
|
|
|
<a class="aref" href="#A-typeof" title="typeof">@typeof</a> is present, set the <a class="tref" title="typed-resource" href="#T-typed-resource">typed
|
|
resource</a> to the value of <a class="tref" title="new-subject" href="#T-new-subject">new subject</a>.</p>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
<li id="PS-new-subject-and-object"> If the <a class="tref" title="current-element" href="#T-current-element">current element</a>
|
|
<em>does</em> contain a <a class="aref" href="#A-rel" title="rel">@rel</a> or <a class="aref" href="#A-rev" title="rev">@rev</a>
|
|
attribute, then the next step is to establish <em>both</em> a value
|
|
for <a class="tref" title="new-subject" href="#T-new-subject">new subject</a> and a value for <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object
|
|
resource</a>:
|
|
<div class="explanation"> <a class="tref" title="new-subject" href="#T-new-subject">new subject</a> is set to the
|
|
IRI obtained from the first match from the following rules:
|
|
<ul>
|
|
<li>by using the IRI from <a class="aref" href="#A-about" title="about">@about</a>, if present,
|
|
obtained according to the section on <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a>;</li>
|
|
</ul>
|
|
<p id="GK3" about="#GK3" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-11-10#resolution_2" rel="bibo:affirmedBy">
|
|
if the <a class="aref" href="#A-typeof" title="typeof">@typeof</a> attribute is present, set <a class="tref" title="typed-resource" href="#T-typed-resource">typed
|
|
|
|
resource</a> to <a class="tref" title="new-subject" href="#T-new-subject">new subject</a>.</p>
|
|
<p>If no IRI is provided then the first match from the following
|
|
rules will apply:</p>
|
|
<ul>
|
|
<li>if the element is the root element of the document then act
|
|
as if there is an empty <a class="aref" href="#A-about" title="about">@about</a> present, and
|
|
process it according to the rule for <a class="aref" href="#A-about" title="about">@about</a>,
|
|
above;</li>
|
|
<li><em>otherwise</em>, if <a class="tref" title="parent-object" href="#T-parent-object">parent object</a> is
|
|
present, <a class="tref" title="new-subject" href="#T-new-subject">new subject</a> is set to that.</li>
|
|
</ul>
|
|
<p>Then the <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object resource</a> is set to the
|
|
IRI obtained from the first match from the following rules:</p>
|
|
<ul>
|
|
<li>by using the IRI from <a class="aref" href="#A-resource" title="resource">@resource</a>, if present,
|
|
obtained according to the section on <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a>;</li>
|
|
<li><em>otherwise</em>, by using the URI from <a class="aref" href="#A-href" title="href">@href</a>,
|
|
if present, obtained according to the section on <a href="#s_curieprocessing">CURIE
|
|
|
|
and URI Processing</a>.</li>
|
|
<li><em>otherwise</em>, by using the IRI from <a class="aref" href="#A-src" title="src">@src</a>,
|
|
if present, obtained according to the section on <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a>.</li>
|
|
<li><em>otherwise</em>, if <a class="aref" href="#A-typeof" title="typeof">@typeof</a> is present and <a class="aref" href="#A-about" title="about">@about</a>
|
|
is not, use a newly created <a class="tref" title="bnode" href="#T-bnode">bnode</a>.</li>
|
|
</ul>
|
|
<p id="GK4" about="#GK4" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-11-10#resolution_2" rel="bibo:affirmedBy">
|
|
If <a class="aref" href="#A-typeof" title="typeof">@typeof</a> is present and <a class="aref" href="#A-about" title="about">@about</a> is
|
|
not, set <a class="tref" title="typed-resource" href="#T-typed-resource">typed resource</a> to <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object
|
|
resource</a>.</p>
|
|
<p>Note that final value of the <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object resource</a>
|
|
will either be null (from initialization) or a full IRI.</p>
|
|
</div>
|
|
</li>
|
|
<li id="PS-subject-types" about="#PS-subject-types" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-11-10#resolution_2" rel="bibo:affirmedBy">
|
|
If in any of the previous steps a <a class="tref" title="typed-resource" href="#T-typed-resource">typed resource</a> was
|
|
set to a non-null value, it is now used to provide a subject for
|
|
type values;
|
|
<div class="explanation"> One or more 'types' for the <a class="tref" title="typed-resource" href="#T-typed-resource">typed
|
|
resource</a> can be set by using <a class="aref" href="#A-typeof" title="typeof">@typeof</a>. If
|
|
present, the attribute may contain one or more IRIs, obtained
|
|
according to the section on <a href="#s_curieprocessing">CURIE
|
|
and IRI Processing</a>, each of which is used to generate a
|
|
triple as follows:
|
|
<dl>
|
|
<dt>subject</dt>
|
|
<dd><a class="tref" title="typed-resource" href="#T-typed-resource">typed resource</a></dd>
|
|
<dt>predicate</dt>
|
|
<dd>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</dd>
|
|
<dt>object</dt>
|
|
<dd>full IRI of 'type'</dd>
|
|
</dl>
|
|
</div>
|
|
</li>
|
|
<li id="PS-empty-list-mapping"> If in any of the previous steps a <a class="tref" title="new-subject" href="#T-new-subject">new
|
|
|
|
subject</a> was set to a non-null value <em>different</em>
|
|
from the <a class="tref" title="parent-object" href="#T-parent-object">parent object</a>;
|
|
<div class="explanation"> The <a class="tref" title="list-mapping" href="#T-list-mapping">list mapping</a> taken from
|
|
the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a> is set to a new, empty
|
|
mapping. </div>
|
|
</li>
|
|
<li id="PS-generate-triples"> If in any of the previous steps a <a class="tref" title="current-object-resource" href="#T-current-object-resource">current
|
|
|
|
object resource</a> was set to a non-null value, it is now used
|
|
to generate triples and add entries to the <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list mapping</a>:
|
|
<div class="explanation"> If the element contains <em>both</em> the
|
|
<a class="aref" href="#A-inlist" title="inlist">@inlist</a> and the <a class="aref" href="#A-rel" title="rel">@rel</a> attributes: the <a class="aref" href="#A-rel" title="rel">@rel</a>
|
|
may contain one or more IRIs, obtained according to the section on
|
|
<a href="#s_curieprocessing">CURIE and IRI Processing</a> each of
|
|
which is used to add an entry to the <a class="tref" title="list-mapping" href="#T-list-mapping">list mapping</a> as
|
|
follows:
|
|
<ul>
|
|
<li>if the <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list mapping</a> does not contain a
|
|
list associated with the IRI, instantiate a new list and add
|
|
to local list mappings</li>
|
|
<li>add the <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object resource</a> to the list
|
|
associated with the IRI in the <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list mapping</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="explanation"> Predicates for the <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object
|
|
resource</a> can be set by using one or both of the <a class="aref" href="#A-rel" title="rel">@rel</a>
|
|
and the <a class="aref" href="#A-rev" title="rev">@rev</a> attributes but, in case of the <a class="aref" href="#A-rel" title="rel">@rel</a>
|
|
attribute, only if the <a class="aref" href="#A-inlist" title="inlist">@inlist</a> is <em>not</em>
|
|
present:
|
|
<ul>
|
|
<li> If present, <a class="aref" href="#A-rel" title="rel">@rel</a> may contain one or more IRIs,
|
|
obtained according to the section on <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a> each of which is used to generate a
|
|
triple as follows:
|
|
<dl>
|
|
<dt>subject</dt>
|
|
<dd><a class="tref" title="new-subject" href="#T-new-subject">new subject</a></dd>
|
|
<dt>predicate</dt>
|
|
<dd>full IRI</dd>
|
|
<dt>object</dt>
|
|
<dd><a class="tref" title="current-object-resource" href="#T-current-object-resource">current object resource</a></dd>
|
|
</dl>
|
|
</li>
|
|
<li> If present, <a class="aref" href="#A-rev" title="rev">@rev</a> may contain one or more IRIs,
|
|
obtained according to the section on <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a> each of which is used to generate a
|
|
triple as follows:
|
|
<dl>
|
|
<dt>subject</dt>
|
|
<dd><a class="tref" title="current-object-resource" href="#T-current-object-resource">current object resource</a></dd>
|
|
<dt>predicate</dt>
|
|
<dd>full IRI</dd>
|
|
<dt>object</dt>
|
|
<dd><a class="tref" title="new-subject" href="#T-new-subject">new subject</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<li id="PS-incomplete-triples"> If however <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object
|
|
resource</a> was set to null, but there are predicates present,
|
|
then they must be stored as <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete triple</a>s,
|
|
pending the discovery of a subject that can be used as the object.
|
|
Also, <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object resource</a> should be set to a newly
|
|
created <a class="tref" title="bnode" href="#T-bnode">bnode</a>;
|
|
<div class="explanation"> Predicates for <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete triple</a>s
|
|
can be set by using one or both of the <a class="aref" href="#A-rel" title="rel">@rel</a> and <a class="aref" href="#A-rev" title="rev">@rev</a>
|
|
attributes:
|
|
<ul>
|
|
<li> If present, <a class="aref" href="#A-rel" title="rel">@rel</a> must contain one or more
|
|
IRIs, obtained according to the section on <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a> each of which is added to the <a class="tref" title="local-list-of-incomplete-triples" href="#T-local-list-of-incomplete-triples">local
|
|
|
|
list of incomplete triples</a> as follows:
|
|
<ul>
|
|
<li> If the element contains the <a class="aref" href="#A-inlist" title="inlist">@inlist</a>
|
|
attribute, then
|
|
<ul>
|
|
<li>if the <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list mapping</a> does not
|
|
contain a list associated with the IRI, instantiate a
|
|
new list and add to local list mappings. </li>
|
|
<li>Add:
|
|
<dl>
|
|
<dt>list</dt>
|
|
<dd>list from <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list mapping</a> for
|
|
this IRI</dd>
|
|
<dt>direction</dt>
|
|
<dd>none</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li>Otherwise add:
|
|
<ul>
|
|
<li>
|
|
<dl>
|
|
<dt>predicate</dt>
|
|
<dd>full IRI</dd>
|
|
<dt>direction</dt>
|
|
<dd>forward</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li> If present, <a class="aref" href="#A-rev" title="rev">@rev</a> must contain one or more
|
|
IRIs, obtained according to the section on <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a>, each of which is added to the <a class="tref" title="local-list-of-incomplete-triples" href="#T-local-list-of-incomplete-triples">local
|
|
|
|
list of incomplete triples</a> as follows:
|
|
<dl>
|
|
<dt>predicate</dt>
|
|
<dd>full IRI</dd>
|
|
<dt>direction</dt>
|
|
<dd>reverse</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<li id="PS-current-object-literal"> The next step of the iteration is
|
|
to establish any <a class="tref" title="current-property-value" href="#T-current-property-value">current property value</a>;
|
|
<div class="explanation"> Predicates for the <a class="tref" title="current-property-value" href="#T-current-property-value">current property
|
|
value</a> can be set by using <a class="aref" href="#A-property" title="property">@property</a>. If
|
|
present, one or more IRIs are obtained according to the section on
|
|
<a href="#s_curieprocessing">CURIE and IRI Processing</a>, and
|
|
then the actual literal value is obtained as follows:
|
|
<ul>
|
|
<li> as a <a class="tref" title="typed-literal" href="#T-typed-literal">typed literal</a> if <a class="aref" href="#A-datatype" title="datatype">@datatype</a>
|
|
is present, does not have an empty value according to the
|
|
section on <a href="#s_curieprocessing">CURIE and IRI
|
|
Processing</a>, and is not set to <code>XMLLiteral</code>
|
|
in the vocabulary <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code>.
|
|
<p>The actual literal is either the value of <a class="aref" href="#A-content" title="content">@content</a>
|
|
(if present) <em>or</em> a string created by concatenating
|
|
the value of all descendant text nodes, of the <a class="tref" title="current-element" href="#T-current-element">current
|
|
|
|
element</a> in turn. The final string includes the
|
|
datatype IRI, as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>], which will
|
|
have been obtained according to the section on <a href="#s_curieprocessing">CURIE
|
|
|
|
and IRI Processing</a>.</p>
|
|
</li>
|
|
<li id="C7" about="#C7" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-06-17#resolution_2" rel="bibo:affirmedBy">
|
|
<em>otherwise</em>, as an <a class="tref" title="xml-literals" href="#T-xml-literals">XML
|
|
literal</a> if <a class="aref" href="#A-datatype" title="datatype">@datatype</a> is present and is
|
|
set to <code>XMLLiteral</code> in the vocabulary <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code>.
|
|
<p>The value of the <a class="tref" title="xml-literals" href="#T-xml-literals">XML literal</a>
|
|
is a string created by serializing to text, all nodes that
|
|
are descendants of the <a class="tref" title="current-element" href="#T-current-element">current element</a>, i.e.,
|
|
not including the element itself, and giving it a datatype
|
|
of <code>XMLLiteral</code> in the vocabulary <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code>.
|
|
The format of the resulting serialized content is as defined
|
|
in Exclusive XML Canonicalization Version [<cite><a class="bibref" rel="biblioentry" href="#bib-XML-EXC-C14N">XML-EXC-C14N</a></cite>].</p>
|
|
<p class="note" id="C19" about="#C19" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-01-13#ISSUE__2d_60__3a__XMLLiteral_context_preservation" rel="bibo:affirmedBy">
|
|
In order to maintain maximum portability of this literal,
|
|
any children of the current node that are elements <em class="rfc2119" title="must">must</em> have
|
|
the current XML namespace declarations (if any) declared on
|
|
the serialized element. Since the child element node could
|
|
also declare new XML namespaces, the RDFa Processor <em class="rfc2119" title="must">must</em> be
|
|
careful to merge these together when generating the
|
|
serialized element definition. For avoidance of doubt, any
|
|
re-declarations on the child node <em class="rfc2119" title="must">must</em> take precedence over
|
|
declarations that were active on the current node. </p>
|
|
</li>
|
|
<li id="GK6" about="#GK6" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-11-10#resolution_2" rel="bibo:affirmedBy">
|
|
<em>otherwise</em>, as an <a class="tref" title="plain-literal" href="#T-plain-literal">plain literal</a> using
|
|
the value of <a class="aref" href="#A-content" title="content">@content</a> if <a class="aref" href="#A-content" title="content">@content</a> is
|
|
present.</li>
|
|
<li id="GK7" about="#GK7" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-11-10#resolution_2" rel="bibo:affirmedBy">
|
|
<em>otherwise</em>, as an <a class="tref" title="iri-reference" href="#T-iri-reference">IRI Reference</a>,
|
|
obtained via the <a href="#s_curieprocessing">CURIE and IRI
|
|
Processing</a> of the first value of the <a class="aref" href="#A-resource" title="resource">@resource</a>,
|
|
<a class="aref" href="#A-href" title="href">@href</a>, or <a class="aref" href="#A-src" title="src">@src</a>, if present, <em>and</em>
|
|
the <a class="aref" href="#A-rel" title="rel">@rel</a>, <a class="aref" href="#A-rev" title="rev">@rev</a>, or <a class="aref" href="#A-content" title="content">@content</a>
|
|
attributes are <em>not</em> present.</li>
|
|
<li id="GK8" about="#GK8" resource="http://www.w3.org/2010/02/rdfa/meetings/2011-11-10#resolution_2" rel="bibo:affirmedBy">
|
|
<em>otherwise</em>, if <a class="aref" href="#A-typeof" title="typeof">@typeof</a> is present and <a class="aref" href="#A-about" title="about">@about</a>
|
|
is not, the value of <a class="tref" title="typed-resource" href="#T-typed-resource">typed resource</a>. </li>
|
|
<li id="C8" about="#C8" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-05-13#resolution_2" rel="bibo:affirmedBy">
|
|
<em>otherwise</em> as a <a class="tref" title="plain-literal" href="#T-plain-literal">plain literal</a>.
|
|
<p>Additionally, if there is a value for <dfn title="current-language" id="T-current-language">current
|
|
language</dfn> then the value of the <a class="tref" title="plain-literal" href="#T-plain-literal">plain literal</a>
|
|
should include this language information, as described in
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>]. The actual literal is either the value of
|
|
<a class="aref" href="#A-content" title="content">@content</a> (if present) <em>or</em> a string
|
|
created by concatenating the text content of each of the
|
|
descendant elements of the <a class="tref" title="current-element" href="#T-current-element">current element</a> in
|
|
document order.</p>
|
|
</li>
|
|
</ul>
|
|
<p>The <a class="tref" title="current-property-value" href="#T-current-property-value">current property value</a> is then used with each
|
|
predicate as follows:</p>
|
|
<ul>
|
|
<li>If the element also includes the <a class="aref" href="#A-inlist" title="inlist">@inlist</a>
|
|
attribute, the <a class="tref" title="current-property-value" href="#T-current-property-value">current property value</a> is added
|
|
to the <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list mapping</a> as follows:
|
|
<ul>
|
|
<li>if the <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list mapping</a> does not contain
|
|
a list associated with the predicate IRI, instantiate a
|
|
new list and add to local list mappings</li>
|
|
<li>add the <a class="tref" title="current-property-value" href="#T-current-property-value">current property value</a> to the list
|
|
associated with the predicate IRI in the <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list
|
|
mapping</a></li>
|
|
</ul>
|
|
</li>
|
|
<li>Otherwise the <a class="tref" title="current-property-value" href="#T-current-property-value">current property value</a> is used
|
|
to generate a triple as follows:
|
|
<dl>
|
|
<dt>subject</dt>
|
|
<dd><a class="tref" title="new-subject" href="#T-new-subject">new subject</a></dd>
|
|
<dt>predicate</dt>
|
|
<dd>full IRI</dd>
|
|
<dt>object</dt>
|
|
<dd><a class="tref" title="current-property-value" href="#T-current-property-value">current property value</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- <p>Once the triple has been created, if the <tdef>datatype</tdef> of the <tref>current property value</tref> is <code>rdf:XMLLiteral</code>,
|
|
then the <tref>recurse</tref> flag is set to <code>false</code>.</p> -->
|
|
|
|
</li>
|
|
<li id="PS-complete-triples"> If the <a class="tref" title="skip-element" href="#T-skip-element">skip element</a> flag
|
|
is 'false', <em>and</em> <a class="tref" title="new-subject" href="#T-new-subject">new subject</a> was set to a
|
|
non-null value, then any <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete triple</a>s <em>within
|
|
|
|
the current context</em> should be completed:
|
|
<div class="explanation"> The <a class="tref" title="list-of-incomplete-triples" href="#T-list-of-incomplete-triples">list of incomplete triples</a>
|
|
from the current <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a> (<em>not</em>
|
|
the <a class="tref" title="local-list-of-incomplete-triples" href="#T-local-list-of-incomplete-triples">local list of incomplete triples</a>) will contain
|
|
zero or more predicate IRIs. This list is iterated and is and each
|
|
of the predicates is used with <a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a> and <a class="tref" title="new-subject" href="#T-new-subject">new
|
|
|
|
subject</a> to generate a triple or add a new element to the
|
|
<a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list mapping</a>. Note that at each level there are
|
|
<em>two</em> lists of <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete triple</a>s; one for
|
|
the current processing level (which is passed to each child
|
|
element in the previous step), and one that was received as part
|
|
of the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>. It is the latter that is
|
|
used in processing during this step. </div>
|
|
<div class="explanation"> Note that each <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete triple</a>
|
|
has a <dfn title="direction" id="T-direction">direction</dfn> value that it used to determine what
|
|
will become the subject, and what will become the object, of each
|
|
generated triple:
|
|
<ul>
|
|
<li>If <a class="tref" title="direction" href="#T-direction">direction</a> is 'none', the <a class="tref" title="new-subject" href="#T-new-subject">new subject</a>
|
|
is added to the list from the iterated <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete
|
|
triple</a>. </li>
|
|
<li> If <a class="tref" title="direction" href="#T-direction">direction</a> is 'forward' then the following
|
|
triple is generated:
|
|
<dl>
|
|
<dt>subject</dt>
|
|
<dd><a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a></dd>
|
|
<dt>predicate</dt>
|
|
<dd>the predicate from the iterated <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete triple</a></dd>
|
|
<dt>object</dt>
|
|
<dd><a class="tref" title="new-subject" href="#T-new-subject">new subject</a></dd>
|
|
</dl>
|
|
</li>
|
|
<li> If <a class="tref" title="direction" href="#T-direction">direction</a> is neither 'forward' nor 'none'
|
|
then this is the triple generated:
|
|
<dl>
|
|
<dt>subject</dt>
|
|
<dd><a class="tref" title="new-subject" href="#T-new-subject">new subject</a></dd>
|
|
<dt>predicate</dt>
|
|
<dd>the predicate from the iterated <a class="tref" title="incomplete-triple" href="#T-incomplete-triple">incomplete triple</a></dd>
|
|
<dt>object</dt>
|
|
<dd><a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<li id="PS-recurse"> Next, all elements that are children of the <a class="tref" title="current-element" href="#T-current-element">current
|
|
|
|
element</a> are processed using the rules described here, using
|
|
a new <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>, initialized as follows:
|
|
<ul>
|
|
<li> If the <a class="tref" title="skip-element" href="#T-skip-element">skip element</a> flag is 'true' then the new
|
|
<a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a> is a copy of the current context
|
|
that was passed in to this level of processing, with the <a class="tref" title="language" href="#T-language">language</a>
|
|
and <a class="tref" title="list-of-iri-mappings" href="#T-list-of-iri-mappings">list of IRI mappings</a> values replaced with the
|
|
local values; </li>
|
|
<li> Otherwise, the values are:
|
|
<ul>
|
|
<li>the <a class="tref" title="base" href="#T-base">base</a> is set to the <a class="tref" title="base" href="#T-base">base</a>
|
|
value of the current <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>;</li>
|
|
<li>the <a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a> is set to the value of <a class="tref" title="new-subject" href="#T-new-subject">new
|
|
|
|
subject</a>, if non-null, <em>or</em> the value of the
|
|
<a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a> of the current <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation
|
|
context</a>;</li>
|
|
<li>the <a class="tref" title="parent-object" href="#T-parent-object">parent object</a> is set to value of <a class="tref" title="current-object-resource" href="#T-current-object-resource">current
|
|
|
|
object resource</a>, if non-null, <em>or</em> the
|
|
value of <a class="tref" title="new-subject" href="#T-new-subject">new subject</a>, if non-null, <em>or</em>
|
|
the value of the <a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a> of the current
|
|
<a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a>;</li>
|
|
<li>the <a class="tref" title="list-of-iri-mappings" href="#T-list-of-iri-mappings">list of IRI mappings</a> is set to the <a class="tref" title="local-list-of-iri-mappings" href="#T-local-list-of-iri-mappings">local
|
|
|
|
list of IRI mappings</a>;</li>
|
|
<li>the <a class="tref" title="list-of-incomplete-triples" href="#T-list-of-incomplete-triples">list of incomplete triples</a> is set to the
|
|
<a class="tref" title="local-list-of-incomplete-triples" href="#T-local-list-of-incomplete-triples">local list of incomplete triples</a>;</li>
|
|
<li>the <a class="tref" title="list-mapping" href="#T-list-mapping">list mapping</a> is set to the <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local
|
|
list mapping</a>;</li>
|
|
<li><a class="tref" title="language" href="#T-language">language</a> is set to the value of <a class="tref" title="current-language" href="#T-current-language">current
|
|
|
|
language</a>.</li>
|
|
|
|
<!-- <li>the <tref>term mappings</tref> is set to the value of the
|
|
<tref>local term mappings</tref>.</li> -->
|
|
|
|
<li>the <a class="tref" title="default-vocabulary" href="#T-default-vocabulary">default vocabulary</a> is set to the value
|
|
of the <a class="tref" title="local-default-vocabulary" href="#T-local-default-vocabulary">local default vocabulary</a>.</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li id="PS-Lists"> Once all the child elements have been traversed,
|
|
list triples are generated, if necessary.
|
|
<div class="explanation"> For each IRI in the <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list
|
|
mapping</a>, if the equivalent list does not exist in the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation
|
|
|
|
context</a>, indicating that the list was originally defined
|
|
on the current element, use the list as follows:
|
|
<ul>
|
|
<li>Create a new ‘bnode’ array containing newly created <a class="tref" title="bnode" href="#T-bnode">bnode</a>s,
|
|
|
|
one for each element in the list</li>
|
|
<li>For each pair of <a class="tref" title="bnode" href="#T-bnode">bnode</a> and IRI from the list
|
|
the following triple is generated:
|
|
<dl>
|
|
<dt>subject</dt>
|
|
<dd><a class="tref" title="bnode" href="#T-bnode">bnode</a></dd>
|
|
<dt>predicate</dt>
|
|
<dd>http://www.w3.org/1999/02/22-rdf-syntax-ns#first</dd>
|
|
<dt>object</dt>
|
|
<dd>full IRI</dd>
|
|
</dl>
|
|
</li>
|
|
<li>For each element in the ‘bnode’ array the following triple
|
|
is generated:
|
|
<dl>
|
|
<dt>subject</dt>
|
|
<dd><a class="tref" title="bnode" href="#T-bnode">bnode</a></dd>
|
|
<dt>predicate</dt>
|
|
<dd>http://www.w3.org/1999/02/22-rdf-syntax-ns#rest</dd>
|
|
<dt>object</dt>
|
|
<dd>next element in the ‘bnode’ array or, if that does not
|
|
exist, http://www.w3.org/1999/02/22-rdf-syntax-ns#nil</dd>
|
|
</dl>
|
|
</li>
|
|
<li>A single additional triple is generated:
|
|
<dl>
|
|
<dt>subject</dt>
|
|
<dd><a class="tref" title="current-subject" href="#T-current-subject">current subject</a></dd>
|
|
<dt>predicate</dt>
|
|
<dd>full IRI of the <a class="tref" title="local-list-mapping" href="#T-local-list-mapping">local list mapping</a>
|
|
associated with this list</dd>
|
|
<dt>object</dt>
|
|
<dd>first element of the ‘bnode’ array</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<div id="processor-status" typeof="bibo:Chapter" about="#processor-status" class="section">
|
|
<h3><span class="secno">7.6 </span>Processor Status</h3>
|
|
<p> The processing rules covered in the previous section are designed to
|
|
extract as many triples as possible from a document. The RDFa
|
|
Processor is designed to continue processing, even in the event of
|
|
errors. For example, failing to resolve a prefix mapping or <a class="tref" title="term" href="#T-term">term</a>
|
|
would result in the RDFa Processor skipping the generation of a triple
|
|
and continuing with document processing. There are cases where knowing
|
|
each RDFa Processor warning or error would be beneficial to authors.
|
|
The <a class="tref" title="processor-graph" href="#T-processor-graph">processor graph</a> is designed as a possible mechanism
|
|
to capture all informational, warning, and error messages as triples
|
|
from the RDFa Processor. These status triples may be retrieved and
|
|
used to aid RDFa authoring or automated error detection. </p>
|
|
<p id="C15" about="#C15" rel="bibo:affirmedBy" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-07-15#resolution_1">
|
|
If an RDFa Processor supports the generation of a processor graph,
|
|
then it <em class="rfc2119" title="must">must</em> generate a set of triples when the following processing
|
|
issues occur: </p>
|
|
<ul>
|
|
<li>An rdfa:Error <em class="rfc2119" title="must">must</em> be generated when the document fails to be
|
|
fully processed as a result of non-conformant host language markup.</li>
|
|
<li>A rdfa:Warning <em class="rfc2119" title="must">must</em> be generated when a CURIE prefix fails to be
|
|
resolved.</li>
|
|
<li>A rdfa:Warning <em class="rfc2119" title="must">must</em> be generated when a Term fails to be resolved.</li>
|
|
</ul>
|
|
<p> Other implementation-specific rdfa:Info, rdfa:Warning, or rdfa:Error
|
|
triples <em class="rfc2119" title="may">may</em> be generated by the RDFa Processor. </p>
|
|
<div id="accessing-the-processor-graph" typeof="bibo:Chapter" about="#accessing-the-processor-graph" class="section">
|
|
<h4><span class="secno">7.6.1 </span>Accessing the Processor Graph</h4>
|
|
<p> Accessing the <a class="tref" title="processor-graph" href="#T-processor-graph">processor graph</a> may be accomplished in
|
|
a variety of ways and is dependent on the type of RDFa Processor and
|
|
access method that the developer is utilizing. </p>
|
|
<p> SAX-based processors or processors that utilize function or method
|
|
callbacks to report the generation of triples are classified as <dfn title="event-based-rdfa-processor" id="T-event-based-rdfa-processor">event-based
|
|
|
|
RDFa Processor</dfn>s. For Event-based RDFa Processors, the
|
|
software <em class="rfc2119" title="must">must</em> allow the developer to register a function or callback
|
|
that is called when a triple is generated for the <a class="tref" title="processor-graph" href="#T-processor-graph">processor
|
|
graph</a>. The callback <em class="rfc2119" title="may">may</em> be the same as the one that is used
|
|
for the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a> as long as it can be determined
|
|
if a generated triple belongs in the <a class="tref" title="processor-graph" href="#T-processor-graph">processor graph</a>
|
|
or the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a>. </p>
|
|
<p> A <dfn title="whole-graph-rdfa-processor" id="T-whole-graph-rdfa-processor">whole-graph RDFa Processor</dfn> is defined as any RDFa
|
|
Processor that processes the entire document and only allows
|
|
developer access to the triples after processing has completed. RDFa
|
|
Processors that typically fall into this category express their
|
|
output via a single call using RDF/XML, N3, TURTLE, or N-Triples
|
|
notation. For whole-graph RDFa Processors, the software <em class="rfc2119" title="must">must</em> allow
|
|
the developer to specify if they would like to retrieve the <a class="tref" title="output-graph" href="#T-output-graph">output
|
|
|
|
graph</a>, the <a class="tref" title="processor-graph" href="#T-processor-graph">processor graph</a>, or both graphs as
|
|
a single, combined graph from the RDFa Processor. <span id="whole-graph-output-graph-preference" about="#whole-graph-output-graph-preference" rel="bibo:affirmedBy" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-07-01#resolution_1">
|
|
If the graph preference is not specified, the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a>
|
|
<em class="rfc2119" title="must">must</em> be returned. </span> </p>
|
|
<p> An <dfn title="web-service-rdfa-processor" id="T-web-service-rdfa-processor">web service RDFa Processor</dfn> is defined as any RDFa
|
|
Processor that is capable of processing a document by performing an
|
|
HTTP GET, POST or similar action on an RDFa Processor IRI. For this
|
|
class of RDFa Processor, the software <em class="rfc2119" title="must">must</em> allow the caller to
|
|
specify if they would like to retrieve the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a>,
|
|
the <a class="tref" title="processor-graph" href="#T-processor-graph">processor graph</a>, or both graphs as a single,
|
|
combined graph from the web service. The <code>rdfagraph</code>
|
|
query parameter <em class="rfc2119" title="must">must</em> be used to specify the value. The allowable
|
|
values are <code>output</code>, <code>processor</code> or both
|
|
values, in any order, separated by a comma character. <span id="web-service-output-graph-preference" about="#web-service-output-graph-preference" rel="bibo:affirmedBy" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-07-01#resolution_1">
|
|
If the graph preference is not specified, the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a>
|
|
<em class="rfc2119" title="must">must</em> be returned. </span> </p>
|
|
</div>
|
|
<div id="processor-graph-terms" typeof="bibo:Chapter" about="#processor-graph-terms" class="section">
|
|
<h4><span class="secno">7.6.2 </span>Processor Graph Terms</h4>
|
|
<p> To ensure interoperability, a core hierarchy of classes is defined
|
|
for the content of the processor graph. Separate errors or warnings
|
|
are resources (typically blank nodes) of a specific type, with
|
|
additional properties giving more details on the error condition or
|
|
the warning. This specification defines only the top level classes
|
|
and the ones referring to the error and warning conditions defined <a href="#processor-status">explicitly</a>
|
|
by this document. Other, implementation-specific subclasses may be
|
|
defined by the RDFa Processor.</p>
|
|
<p>The top level classes are <code>rdfa:Error</code>, <code>rdfa:Warning</code>,
|
|
and <code>rdfa:Info</code>, defined as part of the <a href="#processor-graph-reporting">RDFa
|
|
|
|
Vocabulary</a>. Furthermore, a single property is defined on those
|
|
classes, namely <code>rdfa:context</code>, that provides an extra
|
|
context for the error, e.g., http response, an XPath information, or
|
|
simply the IRI to the RDFa resource. Usage of this property is
|
|
optional, and more than one triple can be used with this predicate
|
|
on the same subject. Finally, error and warning instances <em class="rfc2119" title="should">should</em> use
|
|
the <code>dc:description</code> and <code>dc:date</code>
|
|
properties. <code>dc:description</code> should provide a short,
|
|
human readable but implementation dependent description of the
|
|
error. <code>dc:date</code> should give the time when the error was
|
|
found and it is advised to be as precise as possible to allow the
|
|
detection of, for example, possible network errors. </p>
|
|
<p>The example below shows the triples that should be minimally
|
|
present in the processor graph as a result of an error (the content
|
|
of the literal for the <code>dc:description</code> predicate is
|
|
implementation dependent): </p>
|
|
<pre class="example">@prefix rdfa: <http://www.w3.org/ns/rdfa#> .
|
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
@prefix dc: <http://purl.org/dc/terms/> .
|
|
[] a rdfa:DocumentError ;
|
|
dc:description "The document could not be parsed due to parsing errors" ;
|
|
dc:date "2010-06-30T13:40:23"^^xsd:dateTime .</pre>
|
|
<p>A slightly more elaborate example makes use of the <code>rdfa:context</code>
|
|
property to provide further information, using external vocabularies
|
|
to represent HTTP headers or XPointer information (note that a
|
|
processor may not have these information in all cases, i.e., these <code>rdfa:context</code>
|
|
information are not required):</p>
|
|
<pre class="example">@prefix rdfa: <http://www.w3.org/ns/rdfa#> .
|
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
@prefix dc: <http://purl.org/dc/terms/> .
|
|
@prefix ptr: <http://www.w3.org/2009/pointers#> .
|
|
@prefix http: <http://www.w3.org/2006/http#> .
|
|
|
|
[] a rdfa:DocumentError ;
|
|
dc:description "The document could not be parsed due to parsing errors" ;
|
|
dc:date "2010-06-30T13:40:23"^^xsd:dateTime ;
|
|
rdfa:context <http://www.example.org/doc> ;
|
|
rdfa:context [
|
|
a ptr:Pointer ;
|
|
# detailed xpointer/xpath information provided here to locate the
|
|
# error
|
|
] ;
|
|
rdfa:context [
|
|
a http:Response ;
|
|
http:responseCode <http://www.w3.org/2006/http#404>
|
|
# Get the HTTP response headers on the request for the source file.
|
|
].</pre> </div>
|
|
</div>
|
|
<div id="vocabulary-expansion" typeof="bibo:Chapter" about="#vocabulary-expansion" class="section">
|
|
<h3><span class="secno">7.7 </span>Vocabulary Expansion</h3>
|
|
<p> Processors <em class="rfc2119" title="may">may</em> perform limited RDFS entailment rules to perform
|
|
vocabulary expansion, as described in <a href="#s_vocab_expansion">RDFa
|
|
|
|
Vocabulary Expansion</a>. </p>
|
|
</div>
|
|
</div>
|
|
<div class="informative section" id="s_rdfaindetail" typeof="bibo:Chapter" about="#s_rdfaindetail">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">8. </span>RDFa Processing in detail</h2><p><em>This section is non-normative.</em></p>
|
|
<p> This section provides an in-depth examination of the processing steps
|
|
described in the previous section. It also includes examples which may
|
|
help clarify some of the steps involved. </p>
|
|
<p> The key to processing is that a triple is generated whenever a
|
|
predicate/object combination is detected. The actual triple generated
|
|
will include a subject that may have been set previously, so this is
|
|
tracked in the current <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation context</a> and is called
|
|
the <a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a>. Since the subject will default to the
|
|
current document if it hasn't been set explicitly, then a
|
|
predicate/object combination is always enough to generate one or more
|
|
triples. </p>
|
|
<p> The attributes for setting a predicate are <a class="aref" href="#A-rel" title="rel">@rel</a>, <a class="aref" href="#A-rev" title="rev">@rev</a>
|
|
and <a class="aref" href="#A-property" title="property">@property</a>, whilst the attributes for setting an object
|
|
are <a class="aref" href="#A-resource" title="resource">@resource</a>, <a class="aref" href="#A-href" title="href">@href</a>, <a class="aref" href="#A-content" title="content">@content</a>,
|
|
and <a class="aref" href="#A-src" title="src">@src</a>. <a class="aref" href="#A-typeof" title="typeof">@typeof</a> is unique in that it sets <em>both</em>
|
|
a predicate and an object at the same time (and also a subject when it
|
|
appears in the absence of other attributes that would set a subject).
|
|
Inline content might also set an object, if <a class="aref" href="#A-content" title="content">@content</a> is not
|
|
present, but <a class="aref" href="#A-property" title="property">@property</a> is present. </p>
|
|
<p class="note"> There are many examples in this section. The examples are
|
|
all written using XHTML+RDFa. However, the explanations are relevant
|
|
regardless of the Host Language.</p>
|
|
<div id="changing-the-evaluation-context" typeof="bibo:Chapter" about="#changing-the-evaluation-context" class="section">
|
|
<h3><span class="secno">8.1 </span>Changing the evaluation context</h3>
|
|
<div id="setting-the-current-subject" typeof="bibo:Chapter" about="#setting-the-current-subject" class="section">
|
|
<h4><span class="secno">8.1.1 </span>Setting the current subject</h4>
|
|
<p>When triples are created they will always be in relation to a
|
|
subject resource which is provided either by <a class="tref" title="new-subject" href="#T-new-subject">new subject</a>
|
|
(if there are rules on the current element that have set a subject)
|
|
or <a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a>, as passed in via the <a class="tref" title="evaluation-context" href="#T-evaluation-context">evaluation
|
|
|
|
context</a>. This section looks at the specific ways in which
|
|
these values are set. Note that it doesn't matter how the subject is
|
|
set, so in this section we use the idea of the <dfn title="current-subject" id="T-current-subject">current
|
|
subject</dfn> which may be <em>either</em> <a class="tref" title="new-subject" href="#T-new-subject">new subject</a>
|
|
or <a class="tref" title="parent-subject" href="#T-parent-subject">parent subject</a>.</p>
|
|
<div id="the-current-document" typeof="bibo:Chapter" about="#the-current-document" class="section">
|
|
<h5><span class="secno">8.1.1.1 </span>The current document</h5>
|
|
<p>When parsing begins, the <a class="tref" title="current-subject" href="#T-current-subject">current subject</a> will be
|
|
the IRI of the document being parsed, or a value as set by a Host
|
|
Language-provided mechanism (e.g., the <code>base</code> element
|
|
in (X)HTML). This means that by default any metadata found in the
|
|
document will concern the document itself:</p>
|
|
<pre class="example"><html>
|
|
<head>
|
|
<title>Jo's Friends and Family Blog</title>
|
|
<span class="hilite"><link rel="foaf:primaryTopic" href="#bbq" /></span>
|
|
<span class="hilite"><meta property="dc:creator" content="Jo" /></span>
|
|
</head>
|
|
<body>
|
|
...
|
|
</body>
|
|
</html></pre>
|
|
<p>This would generate the following triples:</p>
|
|
<pre class="example"><> foaf:primaryTopic <#bbq> .
|
|
<> dc:creator "Jo" .</pre>
|
|
<p>It is possible for the data to appear elsewhere in the document:</p>
|
|
<pre class="example"><html>
|
|
<head>
|
|
<title>Jo's Blog</title>
|
|
</head>
|
|
<body>
|
|
<h1><span class="hilite"><span property="dc:creator">Jo</span></span>'s blog</h1>
|
|
<p>
|
|
Welcome to my blog.
|
|
</p>
|
|
</body>
|
|
</html></pre>
|
|
<p>which would still generate the triple:</p>
|
|
<pre class="example"><> dc:creator "Jo" .</pre>
|
|
<p>In (X)HTML the value of <code>base</code> may change the initial
|
|
value of <a class="tref" title="current-subject" href="#T-current-subject">current subject</a>:</p>
|
|
<pre class="example"><html>
|
|
<head>
|
|
<span class="hilite"><base href="http://www.example.org/jo/blog" /></span>
|
|
<title>Jo's Friends and Family Blog</title>
|
|
<link rel="foaf:primaryTopic" href="#bbq" />
|
|
<meta property="dc:creator" content="Jo" />
|
|
</head>
|
|
<body>
|
|
...
|
|
</body>
|
|
</html></pre>
|
|
<p>An RDFa Processor should now generate the following triples,
|
|
regardless of the IRI from which the document is served:</p>
|
|
<pre class="example"><http://www.example.org/jo/blog> foaf:primaryTopic <#bbq> .
|
|
<http://www.example.org/jo/blog> dc:creator "Jo" .</pre> </div>
|
|
<div id="using--about" typeof="bibo:Chapter" about="#using--about" class="section">
|
|
<h5><span class="secno">8.1.1.2 </span>Using <a class="aref" href="#A-about" title="about">@about</a></h5>
|
|
<p>As processing progresses, any <a class="aref" href="#A-about" title="about">@about</a> attributes will
|
|
change the <a class="tref" title="current-subject" href="#T-current-subject">current subject</a>. The value of <a class="aref" href="#A-about" title="about">@about</a>
|
|
is an IRI or a CURIE. If it is a relative IRI then it needs to be
|
|
resolved against the current <a class="tref" title="base" href="#T-base">base</a> value. To
|
|
illustrate how this affects the statements, note in this markup
|
|
how the properties inside the (X)HTML <code>body</code> element
|
|
become part of a new calendar event object, rather than referring
|
|
to the document as they do in the head of the document: </p>
|
|
<pre class="example"><html prefix="cal: http://www.w3.org/2002/12/cal/ical#">
|
|
<head>
|
|
<title>Jo's Friends and Family Blog</title>
|
|
<link rel="foaf:primaryTopic" href="#bbq" />
|
|
<meta property="dc:creator" content="Jo" />
|
|
</head>
|
|
<body>
|
|
<p <span class="hilite">about="#bbq"</span> <span class="hilite">typeof="cal:Vevent"</span>>
|
|
I'm holding
|
|
<span <span class="hilite">property="cal:summary"</span>>
|
|
one last summer barbecue
|
|
</span>,
|
|
on
|
|
<span <span class="hilite">property="cal:dtstart"</span> content="2015-09-16T16:00:00-05:00"
|
|
datatype="xsd:dateTime">
|
|
September 16th at 4pm
|
|
</span>.
|
|
</p>
|
|
</body>
|
|
</html></pre>
|
|
<p>With this markup an RDFa Processor will generate the following
|
|
triples:</p>
|
|
<pre class="example"><> foaf:primaryTopic <#bbq> .
|
|
<> dc:creator "Jo" .
|
|
<span class="hilite"><#bbq> rdf:type cal:Vevent .</span>
|
|
<span class="hilite"><#bbq> cal:summary "one last summer barbecue" .</span>
|
|
<span class="hilite"><#bbq> cal:dtstart "2015-09-16T16:00:00-05:00"^^xsd:dateTime .</span></pre>
|
|
<p>Other kinds of resources can be used to set the <a class="tref" title="current-subject" href="#T-current-subject">current
|
|
subject</a>, not just references to web-pages. Although not
|
|
advised, email addresses might be used to represent a person:</p>
|
|
<pre class="example">John knows
|
|
<a <span class="hilite">about="mailto:john@example.org"</span>
|
|
rel="foaf:knows" href="mailto:sue@example.org">Sue</a>.
|
|
|
|
Sue knows
|
|
<a <span class="hilite">about="mailto:sue@example.org"</span>
|
|
rel="foaf:knows" href="mailto:jim@example.org">Jim</a>.</pre>
|
|
<p>This should generate the following triples:</p>
|
|
<pre class="example"><mailto:john@example.org> foaf:knows <mailto:sue@example.org> .
|
|
<mailto:sue@example.org> foaf:knows <mailto:jim@example.org> .</pre>
|
|
<p>Similarly, authors may make statements about images:</p>
|
|
<pre class="example"><div <span class="hilite">about="photo1.jpg"</span>>
|
|
this photo was taken by
|
|
<span property="dc:creator">Mark Birbeck</span>
|
|
</div></pre>
|
|
<p>which should generate the following triples:</p>
|
|
<pre class="example"><photo1.jpg> dc:creator "Mark Birbeck" .</pre> </div>
|
|
<div id="typing-resources-with--typeof" typeof="bibo:Chapter" about="#typing-resources-with--typeof" class="section">
|
|
<h5><span class="secno">8.1.1.3 </span>Typing resources with <a class="aref" href="#A-typeof" title="typeof">@typeof</a></h5>
|
|
<p><a class="aref" href="#A-typeof" title="typeof">@typeof</a> defines typing triples. <a class="aref" href="#A-typeof" title="typeof">@typeof</a>
|
|
works differently to other ways of setting a predicate since the
|
|
predicate is always <code>rdf:type</code>, which means that the
|
|
processor only requires one attribute, the value of the type. The
|
|
question is: which resource gets these typing information?</p>
|
|
<p>If the element has an <a class="aref" href="#A-about" title="about">@about</a>, which creates a new
|
|
context for statements, the typing relationships are defined on
|
|
that resource. For example, the following:</p>
|
|
<pre class="example"><div <span class="hilite"> about="http://dbpedia.org/resource/Albert_Einstein" typeof="foaf:Person"</span>>
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="foaf:givenName">Albert</span>
|
|
</div></pre>
|
|
<p>also creates the triple:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein> rdf:type foaf:Person .</pre>
|
|
<p>The <a class="aref" href="#A-about" title="about">@about</a> attribute is the main source for typing;
|
|
if it is present on an element, it determines the effect of <a class="aref" href="#A-typeof" title="typeof">@typeof</a>
|
|
with the highest priority. If <a class="aref" href="#A-about" title="about">@about</a> is <em>not</em>
|
|
present, but the element is used only to define possible subject
|
|
resources via, e.g., <a class="aref" href="#A-resource" title="resource">@resource</a> (i.e., there is <em>no</em>
|
|
<a class="aref" href="#A-rel" title="rel">@rel</a>, <a class="aref" href="#A-rev" title="rev">@rev</a>, or <a class="aref" href="#A-property" title="property">@property</a>
|
|
present), then that resource is used for the typed resource, just
|
|
like <a class="aref" href="#A-about" title="about">@about</a>.</p>
|
|
<p>If an <a class="aref" href="#A-rel" title="rel">@rel</a> is present (and still no <a class="aref" href="#A-about" title="about">@about</a>)
|
|
then the explicit object of the triples defined by <a class="aref" href="#A-rel" title="rel">@rel</a>
|
|
is typed. For example, in the case of:</p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<div rel="dbp:birthPlace"
|
|
<span class="hilite">resource="http://dbpedia.org/resource/German_Empire"</span>
|
|
<span class="hilite">typeof="http://schema.org/Country"</span>>
|
|
</div>
|
|
</div></pre>
|
|
<p>the generated triples also include:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/German_Empire> rdf:type <http://schema.org/Country> .</pre>
|
|
<p>Finally, <a class="aref" href="#A-typeof" title="typeof">@typeof</a> also has the additional feature of
|
|
creating a new context for statements, <em>in case no other
|
|
attributes define any</em>. This involves generating a new <a class="tref" title="bnode" href="#T-bnode">bnode</a>
|
|
(see below for more about bnodes). For example, an author may wish
|
|
to create markup for a person using the FOAF vocabulary, but
|
|
without having a clear identifier for the item: </p>
|
|
<pre class="example"><div <span class="hilite">typeof="foaf:Person"</span>>
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="foaf:givenName">Albert</span>
|
|
</div></pre>
|
|
<p> This markup would cause a <a class="tref" title="bnode" href="#T-bnode">bnode</a> to be created
|
|
which has a 'type' of <code>foaf:Person</code>, as well as name
|
|
and given name properties: </p>
|
|
<pre class="example">_:a rdf:type foaf:Person .
|
|
_:a foaf:name "Albert Einstein" .
|
|
_:a foaf:givenName "Albert" .</pre>
|
|
<p>This usage of <a class="aref" href="#A-typeof" title="typeof">@typeof</a> is a shorthand for: </p>
|
|
<pre class="example"><div <span class="hilite">about="_:a" typeof="foaf:Person"</span>>
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="foaf:givenName">Albert</span>
|
|
</div></pre>
|
|
<p>Similarly, </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<div rel="dbp:birthPlace" <span class="hilite">typeof="http://schema.org/Country"</span>>
|
|
<span property="dbp:conventionalLongName">the German Empire</span>
|
|
</div>
|
|
</div></pre>
|
|
<p>generates:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein"> dbp:birthPlace _:b .
|
|
_:b dbp:conventionalLongName "the German Empire" .</pre>
|
|
<div class="explanation"> A <a class="tref" title="bnode" href="#T-bnode">bnode</a> is simply a unique
|
|
identifier that is only available to the processor, not to any
|
|
external software. By generating values internally, the processor
|
|
is able to keep track of properties for <code>_:a</code> as being
|
|
distinct from <code>_:b</code>. But by not exposing these values
|
|
to any external software, it is possible to have complete control
|
|
over the identifier, as well as preventing further statements
|
|
being made about the item. </div>
|
|
<div id="chaining-with--property-and--typeof" typeof="bibo:Chapter" about="#chaining-with--property-and--typeof" class="section">
|
|
<h6><span class="secno">8.1.1.3.1 </span>Chaining with <a class="aref" href="#A-property" title="property">@property</a> and <a class="aref" href="#A-typeof" title="typeof">@typeof</a></h6>
|
|
<p>As emphasized in the <a href="#s_chaining">section on chaining</a>,
|
|
one of the main differences between <a class="aref" href="#A-property" title="property">@property</a> and <a class="aref" href="#A-rel" title="rel">@rel</a>
|
|
(or <a class="aref" href="#A-rev" title="rev">@rev</a>) is that the former does not induce
|
|
chaining. The <em>only</em> exception to this rule is when <a class="aref" href="#A-typeof" title="typeof">@typeof</a>
|
|
is also present on the element. In that case the effect of <a class="aref" href="#A-property" title="property">@property</a>
|
|
is identical to <a class="aref" href="#A-rel" title="rel">@rel</a>. For example, the previous
|
|
example could have been written as: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<div property="dbp:birthPlace" <span class="hilite">typeof="http://schema.org/Country"</span>>
|
|
<span property="dbp:conventionalLongName">the German Empire</span>
|
|
</div>
|
|
</div></pre>
|
|
<p>generating the same triples as before.</p>
|
|
</div>
|
|
</div>
|
|
<div id="determining-the-subject-with-neither--about-nor--typeof" typeof="bibo:Chapter" about="#determining-the-subject-with-neither--about-nor--typeof" class="section">
|
|
<h5><span class="secno">8.1.1.4 </span>Determining the subject with neither <a class="aref" href="#A-about" title="about">@about</a> nor <a class="aref" href="#A-typeof" title="typeof">@typeof</a></h5>
|
|
<p> As described in the previous two sections, <a class="aref" href="#A-about" title="about">@about</a>
|
|
will always take precedence and mark a new subject, but if no <a class="aref" href="#A-about" title="about">@about</a>
|
|
value is available then <a class="aref" href="#A-typeof" title="typeof">@typeof</a> will do the same job,
|
|
although using an implied identifier, i.e., a <a class="tref" title="bnode" href="#T-bnode">bnode</a>.</p>
|
|
<p> But if neither <a class="aref" href="#A-about" title="about">@about</a> or <a class="aref" href="#A-typeof" title="typeof">@typeof</a> are
|
|
present, there are a number of ways that the subject could be
|
|
arrived at. One of these is to 'inherit' the subject from the
|
|
containing statement, with the value to be inherited set either
|
|
explicitly, or implicitly. </p>
|
|
<div id="inheriting-subject-from--resource" typeof="bibo:Chapter" about="#inheriting-subject-from--resource" class="section">
|
|
<h6><span class="secno">8.1.1.4.1 </span>Inheriting subject from <a class="aref" href="#A-resource" title="resource">@resource</a></h6>
|
|
<p> The most usual way that an inherited subject might get set
|
|
would be when the parent statement has an object that is a
|
|
resource. Returning to the earlier example, in which the long
|
|
name for the German_Empire was added, the following markup was
|
|
used: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire" />
|
|
<span class="hilite"><span about="http://dbpedia.org/resource/German_Empire"
|
|
property="dbp:conventionalLongName">the German Empire</span></span>
|
|
</div></pre>
|
|
<p> In an earlier illustration the subject and object for the
|
|
German Empire were connected by removing the <a class="aref" href="#A-resource" title="resource">@resource</a>,
|
|
relying on the <a class="aref" href="#A-about" title="about">@about</a> to set the object: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<span class="hilite"><div rel="dbp:birthPlace"></span>
|
|
<span about="http://dbpedia.org/resource/German_Empire"
|
|
property="dbp:conventionalLongName">the German Empire</span>
|
|
</div>
|
|
</div></pre>
|
|
<p> but it is also possible for authors to achieve the same effect
|
|
by removing the <a class="aref" href="#A-about" title="about">@about</a> and leaving the <a class="aref" href="#A-resource" title="resource">@resource</a>:
|
|
</p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<div rel="dbp:birthPlace" <span class="hilite">resource="http://dbpedia.org/resource/German_Empire"</span>>
|
|
<span property="dbp:conventionalLongName">the German Empire</span>
|
|
</div>
|
|
</div></pre>
|
|
<p> In this situation, all statements that are 'contained' by the
|
|
object resource representing the German Empire (the value in <a class="aref" href="#A-resource" title="resource">@resource</a>)
|
|
will have the same subject, making it easy for authors to add
|
|
additional statements: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire">
|
|
<span property="dbp:conventionalLongName">the German Empire</span>
|
|
<span class="hilite"><span rel="dbp-owl:capital" resource="http://dbpedia.org/resource/Berlin" /></span>
|
|
</div>
|
|
</div></pre>
|
|
<p>Looking at the triples that an RDFa Processor would generate,
|
|
we can see that we actually have two groups of statements; the
|
|
first group are set to refer to the <a class="aref" href="#A-about" title="about">@about</a> that
|
|
contains them:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein> foaf:name "Albert Einstein" .
|
|
<http://dbpedia.org/resource/Albert_Einstein> dbp:dateOfBirth "1879-03-14"^^xsd:date .
|
|
<http://dbpedia.org/resource/Albert_Einstein> dbp:birthPlace <http://dbpedia.org/resource/German_Empire> .</pre>
|
|
<p>whilst the second group refer to the <a class="aref" href="#A-resource" title="resource">@resource</a>
|
|
that contains them:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/German_Empire>
|
|
dbp:conventionalLongName "the German Empire" .
|
|
<http://dbpedia.org/resource/German_Empire>
|
|
dbp-owl:capital <http://dbpedia.org/resource/Berlin> .</pre>
|
|
<p> Note also that the same principle described here applies to <a class="aref" href="#A-src" title="src">@src</a>
|
|
and <a class="aref" href="#A-href" title="href">@href</a>. </p>
|
|
</div>
|
|
<div id="inheriting-an-anonymous-subject" typeof="bibo:Chapter" about="#inheriting-an-anonymous-subject" class="section">
|
|
<h6><span class="secno">8.1.1.4.2 </span>Inheriting an anonymous subject</h6>
|
|
<p> There will be occasions when the author wants to connect the
|
|
subject and object as shown above, but is not concerned to name
|
|
the resource that is common to the two statements (i.e., the
|
|
object of the first statement, which is the subject of the
|
|
second). For example, to indicate that Einstein was influenced
|
|
by Spinoza the following markup could well be used: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp-owl:influenced">
|
|
<div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
</div>
|
|
</div></pre>
|
|
<p> An RDFa Processor will generate the following triples: </p>
|
|
<pre class="example"><http://dbpedia.org/resource/Baruch_Spinoza>
|
|
dbp-owl:influenced <http://dbpedia.org/resource/Albert_Einstein> .
|
|
<http://dbpedia.org/resource/Albert_Einstein> foaf:name "Albert Einstein" .
|
|
<http://dbpedia.org/resource/Albert_Einstein> dbp:dateOfBirth "1879-03-14"^^xsd:date .</pre>
|
|
<p> However, an author could just as easily say that Spinoza
|
|
influenced <em>something by the name of Albert Einstein, that
|
|
was born on March 14th, 1879</em>: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp-owl:influenced">
|
|
<span class="hilite"><div></span>
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<span class="hilite"></div></span>
|
|
</div></pre>
|
|
<p> In RDF terms, the item that 'represents' Einstein is <em>anonymous</em>,
|
|
since it has no IRI to identify it. However, the item is given
|
|
an automatically generated <a class="tref" title="bnode" href="#T-bnode">bnode</a>, and it is onto
|
|
this identifier that all child statements are attached: </p>
|
|
<p> An RDFa Processor will generate the following triples: </p>
|
|
<pre class="example"><http://dbpedia.org/resource/Baruch_Spinoza> dbp-owl:influenced _:a .
|
|
_:a foaf:name "Albert Einstein" .
|
|
_:a dbp:dateOfBirth "1879-03-14"^^xsd:date .</pre>
|
|
<p> Note that the <code>div</code> is superfluous, and an RDFa
|
|
Processor will create the intermediate object even if the
|
|
element is removed: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp-owl:influenced">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
</div></pre>
|
|
<p> An alternative pattern is to <em>keep</em> the <code>div</code>
|
|
and move the <a class="aref" href="#A-rel" title="rel">@rel</a> onto it: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Baruch_Spinoza">
|
|
<div <span class="hilite">rel="dbp-owl:influenced"</span>>
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
</div>
|
|
</div></pre>
|
|
<p> From the point of view of the markup, this latter layout is to
|
|
be preferred, since it draws attention to the 'hanging rel'. But
|
|
from the point of view of an RDFa Processor, all of these
|
|
permutations need to be supported. </p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="s_Completing_Incomplete_Triples" typeof="bibo:Chapter" about="#s_Completing_Incomplete_Triples" class="section">
|
|
<h3><span class="secno">8.2 </span>Completing incomplete triples'</h3>
|
|
<p> When a new subject is calculated, it is also used to complete any
|
|
incomplete triples that are pending. This situation arises when the
|
|
author wants to 'chain' a number of statements together. For example,
|
|
an author could have a statement that Albert Einstein was born in the
|
|
German Empire: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<span class="hilite"><div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire" /></span>
|
|
</div></pre>
|
|
<p> and then a further statement that the 'long name' for this country
|
|
is <em>the German Empire</em>: </p>
|
|
<pre class="example"><span about="http://dbpedia.org/resource/German_Empire"
|
|
property="dbp:conventionalLongName">the German Empire</span></pre>
|
|
<p> RDFa allows authors to insert this statement as a self-contained
|
|
unit into other contexts: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire" />
|
|
<span class="hilite"><span about="http://dbpedia.org/resource/German_Empire"
|
|
property="dbp:conventionalLongName">the German Empire</span></span>
|
|
</div></pre>
|
|
<p> But it also allows authors to avoid unnecessary repetition and to
|
|
'normalize' out duplicate identifiers, in this case the one for the
|
|
German Empire: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<span class="hilite"><div rel="dbp:birthPlace"></span>
|
|
<span about="http://dbpedia.org/resource/German_Empire"
|
|
property="dbp:conventionalLongName">the German Empire</span>
|
|
</div>
|
|
</div></pre>
|
|
<p> When this happens the <a class="aref" href="#A-rel" title="rel">@rel</a> for 'birth place' is
|
|
regarded as a 'hanging rel' because it has not yet generated any
|
|
triples, but these 'incomplete triples' are completed by the <a class="aref" href="#A-about" title="about">@about</a>
|
|
that appears on the next line. The first step is therefore to store
|
|
the two parts of the triple that the RDFa Processor <em>does</em>
|
|
have, but without an object: </p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein> dbp:birthPlace <span class="hilite">?</span> .</pre>
|
|
<p> Then as processing continues, the RDFa Processor encounters the
|
|
subject of the statement about the long name for the German Empire,
|
|
and this is used in two ways. First it is used to complete the
|
|
'incomplete triple': </p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein>
|
|
dbp:birthPlace <span class="hilite"><http://dbpedia.org/resource/German_Empire></span> .</pre>
|
|
<p>and second it is used to generate its own triple:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/German_Empire>
|
|
dbp:conventionalLongName "the German Empire" .</pre>
|
|
<p> Note that each occurrence of <a class="aref" href="#A-about" title="about">@about</a> will complete any
|
|
incomplete triples. For example, to mark up the fact that Albert
|
|
Einstein had a residence both in the German Empire and Switzerland, an
|
|
author need only specify one <a class="aref" href="#A-rel" title="rel">@rel</a> value that is then used
|
|
with multiple <a class="aref" href="#A-about" title="about">@about</a> values: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Albert_Einstein" rel="dbp-owl:residence">
|
|
<span class="hilite"><span about="http://dbpedia.org/resource/German_Empire" /></span>
|
|
<span class="hilite"><span about="http://dbpedia.org/resource/Switzerland" /></span>
|
|
</div></pre>
|
|
<p> In this example there is one incomplete triple: </p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein> dbp-owl:residence <span class="hilite">?</span> .</pre>
|
|
<p> When the processor meets each of the <a class="aref" href="#A-about" title="about">@about</a> values,
|
|
this triple is completed, giving: </p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein>
|
|
dbp-owl:residence <span class="hilite"><http://dbpedia.org/resource/German_Empire></span> .
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
dbp-owl:residence <span class="hilite"><http://dbpedia.org/resource/Switzerland></span> .</pre>
|
|
<p> These examples show how <a class="aref" href="#A-about" title="about">@about</a> completes triples, but
|
|
there are other situations that can have the same effect. For example,
|
|
when <a class="aref" href="#A-typeof" title="typeof">@typeof</a> creates a new <a class="tref" title="bnode" href="#T-bnode">bnode</a> (as
|
|
described above), that will be used to complete any 'incomplete
|
|
triples'. To illustrate, to indicate that Spinoza influenced both
|
|
Einstein and Schopenhauer, the following markup could be used: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Baruch_Spinoza">
|
|
<div rel="dbp-owl:influenced">
|
|
<div <span class="hilite">typeof="foaf:Person"</span>>
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
</div>
|
|
<div <span class="hilite">typeof="foaf:Person"</span>>
|
|
<span property="foaf:name">Arthur Schopenhauer</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1788-02-22</span>
|
|
</div>
|
|
</div>
|
|
</div></pre>
|
|
<p>First the following incomplete triple is stored:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/Baruch_Spinoza> dbp-owl:influenced <span class="hilite">?</span> .</pre>
|
|
<p> Then when the RDFa Processor processes the two occurrences of <a class="aref" href="#A-typeof" title="typeof">@typeof</a>,
|
|
each generates a <a class="tref" title="bnode" href="#T-bnode">bnode</a>, which is used to both complete
|
|
the 'incomplete triple', and to set the subject for further
|
|
statements: </p>
|
|
<pre class="example"><http://dbpedia.org/resource/Baruch_Spinoza"> dbp-owl:influenced <span class="hilite">_:a</span> .
|
|
<span class="hilite">_:a</span> rdf:type foaf:Person .
|
|
<span class="hilite">_:a</span> foaf:name "Albert Einstein" .
|
|
<span class="hilite">_:a</span> dbp:dateOfBirth "1879-03-14"^^xsd:date .
|
|
<http://dbpedia.org/resource/Baruch_Spinoza"> dbp-owl:influenced <span class="hilite">_:b</span> .
|
|
<span class="hilite">_:b</span> rdf:type foaf:Person .
|
|
<span class="hilite">_:b</span> foaf:name "Arthur Schopenhauer" .
|
|
<span class="hilite">_:b</span> dbp:dateOfBirth "1788-02-22"^^xsd:date .</pre>
|
|
<p> Triples are also 'completed' if any one of <a class="aref" href="#A-property" title="property">@property</a>, <a class="aref" href="#A-rel" title="rel">@rel</a>
|
|
or <a class="aref" href="#A-rev" title="rev">@rev</a> are present. However, unlike the situation when <a class="aref" href="#A-about" title="about">@about</a>
|
|
or <a class="aref" href="#A-typeof" title="typeof">@typeof</a> are present, all predicates are attached to
|
|
one <a class="tref" title="bnode" href="#T-bnode">bnode</a>: </p>
|
|
<pre class="example"><div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp-owl:influenced">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<div rel="dbp-owl:residence">
|
|
<span about="http://dbpedia.org/resource/German_Empire" />
|
|
<span about="http://dbpedia.org/resource/Switzerland" />
|
|
</div>
|
|
</div></pre>
|
|
<p> This example has two 'hanging rels', and so two situations when
|
|
'incomplete triples' will be created. Processing would proceed as
|
|
follows; first an incomplete triple is stored: </p>
|
|
<pre class="example"><http://dbpedia.org/resource/Baruch_Spinoza> dbp-owl:influenced <span class="hilite">?</span> .</pre>
|
|
<p> Next, the RDFa Processor processes the predicate values for <code>foaf:name</code>,
|
|
<code>dbp:dateOfBirth</code> and <code>dbp-owl:residence</code>, but
|
|
note that only the first needs to 'complete' the 'hanging rel'. So
|
|
processing <code>foaf:name</code> generates two triples: </p>
|
|
<pre class="example"><http://dbpedia.org/resource/Baruch_Spinoza> dbp-owl:influenced <span class="hilite">_:a</span> .
|
|
<span class="hilite">_:a</span> foaf:name "Albert Einstein" .</pre>
|
|
<p> but processing <code>dbp:dateOfBirth</code> generates only one: </p>
|
|
<pre class="example"><span class="hilite">_:a</span> dbp:dateOfBirth "1879-03-14"^^xsd:date .</pre>
|
|
<p>Processing <code>dbp-owl:residence</code> also uses the same <a class="tref" title="bnode" href="#T-bnode">bnode</a>,
|
|
but note that it also generates its own 'incomplete triple':</p>
|
|
<pre class="example">_:a dbp-owl:residence <span class="hilite">?</span> .</pre>
|
|
<p>As before, the two occurrences of <a class="aref" href="#A-about" title="about">@about</a> complete the
|
|
'incomplete triple', once each:</p>
|
|
<pre class="example">_:a dbp-owl:residence <span class="hilite"><http://dbpedia.org/resource/German_Empire></span> .
|
|
_:a dbp-owl:residence <span class="hilite"><http://dbpedia.org/resource/Switzerland></span> .</pre>
|
|
<p> The entire set of triples that an RDFa Processor should generate are
|
|
as follows: </p>
|
|
<pre class="example"><http://dbpedia.org/resource/Baruch_Spinoza> dbp-owl:influenced <span class="hilite">_:a</span> .
|
|
<span class="hilite">_:a</span> foaf:name "Albert Einstein" .
|
|
<span class="hilite">_:a</span> dbp:dateOfBirth "1879-03-14"^^xsd:date .
|
|
<span class="hilite">_:a</span> dbp-owl:residence <http://dbpedia.org/resource/German_Empire> .
|
|
<span class="hilite">_:a</span> dbp-owl:residence <http://dbpedia.org/resource/Switzerland> .</pre> </div>
|
|
<div id="object-resolution" typeof="bibo:Chapter" about="#object-resolution" class="section">
|
|
<h3><span class="secno">8.3 </span>Object resolution</h3>
|
|
<p> Although objects have been discussed in the previous sections, as
|
|
part of the explanation of subject resolution, chaining, evaluation
|
|
contexts, and so on, this section will look at objects in more detail.
|
|
</p>
|
|
<p>There are two types of object, <a class="tref" title="iri-resource" href="#T-iri-resource">IRI resource</a>s and <a class="tref" title="literal" href="#T-literal">literal</a>s.</p>
|
|
<p> A <a class="tref" title="literal" href="#T-literal">literal</a> object can be set by using <a class="aref" href="#A-property" title="property">@property</a>
|
|
to express a <a class="tref" title="predicate" href="#T-predicate">predicate</a>, and then using either <a class="aref" href="#A-content" title="content">@content</a>,
|
|
or the inline text of the element that <a class="aref" href="#A-property" title="property">@property</a> is on. <em>Note
|
|
|
|
that the use of <a class="aref" href="#A-content" title="content">@content</a> prohibits the inclusion of
|
|
rich markup in your literal. If the inline content of an element
|
|
accurately represents the object, then documents should rely upon
|
|
that rather than duplicating that data using the <a class="aref" href="#A-content" title="content">@content</a>.</em></p>
|
|
<p>A <dfn title="iri-resource" id="T-iri-resource">IRI resource</dfn> object can be set using one of <a class="aref" href="#A-rel" title="rel">@rel</a>
|
|
or <a class="aref" href="#A-rev" title="rev">@rev</a> to express a <a class="tref" title="predicate" href="#T-predicate">predicate</a>, and then <em>either</em>
|
|
using one of <a class="aref" href="#A-href" title="href">@href</a>, <a class="aref" href="#A-resource" title="resource">@resource</a> or <a class="aref" href="#A-src" title="src">@src</a>
|
|
to provide an object resource explicitly, <em>or</em> using the
|
|
chaining techniques described above to obtain an object from a nested
|
|
subject, or from a <a class="tref" title="bnode" href="#T-bnode">bnode</a>. <em>Alternatively</em>, the <a class="aref" href="#A-property" title="property">@property</a>
|
|
can also be used to define an IRI resource, in the presence of an <a class="aref" href="#A-href" title="href">@href</a>,
|
|
<a class="aref" href="#A-resource" title="resource">@resource</a>, or <a class="aref" href="#A-src" title="src">@src</a> <em>and</em> in the
|
|
absence of <a class="aref" href="#A-rel" title="rel">@rel</a>, <a class="aref" href="#A-rev" title="rev">@rev</a>, <a class="aref" href="#A-datatype" title="datatype">@datatype</a>,
|
|
or <a class="aref" href="#A-content" title="content">@content</a>.</p>
|
|
<div id="object-resolution-for-the--property-attribute" typeof="bibo:Chapter" about="#object-resolution-for-the--property-attribute" class="section">
|
|
<h4><span class="secno">8.3.1 </span>Object resolution for the <a class="aref" href="#A-property" title="property">@property</a> attribute</h4>
|
|
<p> An <dfn title="object-literal" id="T-object-literal">object literal</dfn> will be generated when <a class="aref" href="#A-property" title="property">@property</a>
|
|
is present. <a class="aref" href="#A-property" title="property">@property</a> provides the predicate, and the
|
|
following sections describe how the actual literal to be generated
|
|
is determined. </p>
|
|
<div style="margin: 0pt auto; text-align: center;"> <object data="Literal_Resolution.svg" type="image/svg+xml" height="75%" width="75%">
|
|
<img src="Literal_Resolution.png" alt="Literal object resolution" />
|
|
</object>
|
|
<p><strong>Literal object resolution</strong></p>
|
|
</div>
|
|
<div id="plain-literals-1" typeof="bibo:Chapter" about="#plain-literals-1" class="section">
|
|
<h5><span class="secno">8.3.1.1 </span>Plain Literals</h5>
|
|
<p><a class="aref" href="#A-content" title="content">@content</a> can be used to indicate a <a class="tref" title="plain-literal" href="#T-plain-literal">plain
|
|
literal</a>, as follows:</p>
|
|
<pre class="example"><meta about="http://internet-apps.blogspot.com/"
|
|
property="dc:creator" <span class="hilite">content="Mark Birbeck"</span> /></pre>
|
|
<p>The <a class="tref" title="plain-literal" href="#T-plain-literal">plain literal</a> can also be specified by using
|
|
the content of the element:</p>
|
|
<pre class="example"><span about="http://internet-apps.blogspot.com/"
|
|
property="dc:creator"><span class="hilite">Mark Birbeck</span></span></pre>
|
|
<p> Both of these examples give the following triple: </p>
|
|
<pre class="example"><http://internet-apps.blogspot.com/> dc:creator "Mark Birbeck" .</pre>
|
|
<p>The value of <a class="aref" href="#A-content" title="content">@content</a> is given precedence over any
|
|
element content, so the following would give exactly the same
|
|
triple as shown above:</p>
|
|
<pre class="example"><span about="http://internet-apps.blogspot.com/"
|
|
property="dc:creator" <span class="hilite">content="Mark Birbeck"</span>>John Doe</span></pre>
|
|
<div id="language-tags" typeof="bibo:Chapter" about="#language-tags" class="section">
|
|
<h6><span class="secno">8.3.1.1.1 </span>Language Tags</h6>
|
|
<p>RDF allows <a class="tref" title="plain-literal" href="#T-plain-literal">plain literal</a>s to have a language tag,
|
|
as illustrated by the following example from [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-TESTCASES">RDF-TESTCASES</a></cite>]:</p>
|
|
<pre class="example"><http://example.org/node>
|
|
<http://example.org/property> "chat"<span class="hilite">@fr</span> .</pre>
|
|
<p>In RDFa the Host Language may provide a mechanism for setting
|
|
the language tag. In XHTML+RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-XHTML-RDFA">XHTML-RDFA</a></cite>], for example,
|
|
the XML language attribute <span class="aref">@xml:lang</span>
|
|
or the attribute <span class="aref">@lang</span> is used to add
|
|
this information, whether the plain literal is designated by <a class="aref" href="#A-content" title="content">@content</a>,
|
|
or by the inline text of the element:</p>
|
|
<pre class="example"><meta about="http://example.org/node"
|
|
property="ex:property" <span class="hilite">xml:lang="fr"</span> content="chat" /></pre>
|
|
<p>Note that the language value can be inherited as defined in
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-XML10-4e">XML10-4e</a></cite>], so the following syntax will give the same triple
|
|
as above:</p>
|
|
<pre class="example"><html xmlns="http://www.w3.org/1999/xhtml"
|
|
prefix="ex: http://www.example.com/ns/" <span class="hilite">xml:lang="fr"</span>>
|
|
<head>
|
|
<title xml:lang="en">Example</title>
|
|
<meta about="http://example.org/node"
|
|
property="ex:property" content="chat" />
|
|
</head>
|
|
...
|
|
</html></pre> </div>
|
|
</div>
|
|
<div id="typed-literals-1" typeof="bibo:Chapter" about="#typed-literals-1" class="section">
|
|
<h5><span class="secno">8.3.1.2 </span>Typed literals</h5>
|
|
<p>Literals can be given a data type using <a class="aref" href="#A-datatype" title="datatype">@datatype</a>.</p>
|
|
<p>This can be represented in RDFa as follows:</p>
|
|
<pre class="example"><span property="cal:dtstart" content="2015-09-16T16:00:00-05:00"
|
|
<span class="hilite">datatype="xsd:dateTime"</span>>
|
|
September 16th at 4pm
|
|
</span>.</pre>
|
|
<p>The triples that this markup generates include the datatype after
|
|
the literal:</p>
|
|
<pre class="example"><> cal:dtstart "2015-09-16T16:00:00-05:00"^^<span class="hilite">xsd:dateTime</span> .</pre> </div>
|
|
<div id="s-xml-literals" typeof="bibo:Chapter" about="#s-xml-literals" class="section">
|
|
<h5><span class="secno">8.3.1.3 </span><dfn title="xml-literals" id="T-xml-literals">XML Literals</dfn></h5>
|
|
<p>XML documents cannot contain XML markup in their attributes,
|
|
which means it is not possible to represent XML within <a class="aref" href="#A-content" title="content">@content</a>
|
|
(the following would cause an XML parser to generate an error):</p>
|
|
<pre class="example"><head>
|
|
<meta property="dc:title"
|
|
<span class="hilite">content="E = mc<sup>2</sup>: The Most Urgent Problem of Our Time"</span> />
|
|
</head></pre>
|
|
<p>RDFa therefore supports the use of normal markup to express XML
|
|
literals, by using <a class="aref" href="#A-datatype" title="datatype">@datatype</a>:</p>
|
|
<pre class="example"><h2 property="dc:title" datatype="rdf:XMLLiteral">
|
|
<span class="hilite">E = mc<sup>2</sup>: The Most Urgent Problem of Our Time</span>
|
|
</h2></pre>
|
|
<p>This would generate the following triple, with the XML preserved
|
|
in the literal:</p>
|
|
<pre class="example"><> dc:title "E = mc<sup>2</sup>: The Most Urgent Problem of Our Time"^^rdf:XMLLiteral .</pre>
|
|
<p class="note"> This requires that an IRI mapping for the prefix <code>rdf</code>
|
|
has been defined. </p>
|
|
<p> In the examples given here the <code>sup</code> element is
|
|
actually part of the meaning of the literal, but there will be
|
|
situations where the extra markup means nothing, and can therefore
|
|
be ignored. In this situation omitting the <a class="aref" href="#A-datatype" title="datatype">@datatype</a>
|
|
attribute or specifying an empty <a class="aref" href="#A-datatype" title="datatype">@datatype</a> value can
|
|
be used create a plain literal: </p>
|
|
<pre class="example"><p>You searched for <strong>Einstein</strong>:</p>
|
|
<p about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span property="foaf:name" <span class="hilite">datatype=""</span>>Albert <strong>Einstein</strong></span>
|
|
(b. March 14, 1879, d. April 18, 1955) was a German-born theoretical physicist.
|
|
</p></pre>
|
|
<p>Although the rendering of this page has highlighted the term the
|
|
user searched for, setting <a class="aref" href="#A-datatype" title="datatype">@datatype</a> to nothing
|
|
ensures that the data is interpreted as a plain literal, giving
|
|
the following triples:</p>
|
|
<pre class="example"><http://dbpedia.org/resource/Albert_Einstein> foaf:name <span class="hilite">"Albert Einstein"</span> .</pre>
|
|
<p class="note">The value of this <a class="tref" title="xml-literals" href="#T-xml-literals">XML
|
|
Literal</a> is the exclusive canonicalization
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-XML-EXC-C14N">XML-EXC-C14N</a></cite>] of the RDFa element's value.</p>
|
|
</div>
|
|
</div>
|
|
<div id="iri-object-resolution" typeof="bibo:Chapter" about="#iri-object-resolution" class="section">
|
|
<h4><span class="secno">8.3.2 </span>IRI object resolution</h4>
|
|
<p> Most of the rules governing the processing of objects that are
|
|
resources are to be found in the processing descriptions given
|
|
above, since they are important for establishing the subject. This
|
|
section aims to highlight general concepts, and anything that might
|
|
have been missed. </p>
|
|
<p> One or more <dfn title="iri-object" id="T-iri-object">IRI object</dfn>s are needed when <a class="aref" href="#A-rel" title="rel">@rel</a>,
|
|
<a class="aref" href="#A-rev" title="rev">@rev</a>, or <a class="aref" href="#A-property" title="property">@property</a> is present. Each
|
|
attribute will cause triples to be generated when used with <a class="aref" href="#A-href" title="href">@href</a>,
|
|
<a class="aref" href="#A-resource" title="resource">@resource</a> or <a class="aref" href="#A-src" title="src">@src</a>, or with the subject
|
|
value of any nested statement if none of these attributes are
|
|
present. </p>
|
|
<p> <a class="aref" href="#A-rel" title="rel">@rel</a> and <a class="aref" href="#A-rev" title="rev">@rev</a> are essentially the
|
|
inverse of each other; whilst <a class="aref" href="#A-rel" title="rel">@rel</a> establishes a
|
|
relationship between the <a class="tref" title="current-subject" href="#T-current-subject">current subject</a> as subject,
|
|
and the <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object resource</a> as the object, <a class="aref" href="#A-rev" title="rev">@rev</a>
|
|
does the exact opposite, and uses the <a class="tref" title="current-object-resource" href="#T-current-object-resource">current object resource</a>
|
|
as the subject, and the <a class="tref" title="current-subject" href="#T-current-subject">current subject</a> as the object.
|
|
</p>
|
|
<div id="using--resource-to-set-the-object" typeof="bibo:Chapter" about="#using--resource-to-set-the-object" class="section">
|
|
<h5><span class="secno">8.3.2.1 </span>Using <a class="aref" href="#A-resource" title="resource">@resource</a> to set the object</h5>
|
|
<p>RDFa provides the <a class="aref" href="#A-resource" title="resource">@resource</a> attribute as a way to
|
|
set the object of statements. This is particularly useful when
|
|
referring to resources that are not themselves navigable links:</p>
|
|
<pre class="example"><html>
|
|
<head>
|
|
<title>On Crime and Punishment</title>
|
|
<base href="http://www.example.com/candp.xhtml" />
|
|
</head>
|
|
<body>
|
|
<blockquote about="#q1" rel="dc:source" <span class="hilite">resource="urn:ISBN:0140449132"</span> >
|
|
<p id="q1">
|
|
Rodion Romanovitch! My dear friend! If you go on in this way
|
|
you will go mad, I am positive! Drink, pray, if only a few drops!
|
|
</p>
|
|
</blockquote>
|
|
</body>
|
|
</html></pre>
|
|
<p>The <code>blockquote</code> element generates the following
|
|
triple:</p>
|
|
<pre class="example"><http://www.example.com/candp.xhtml#q1>
|
|
<http://purl.org/dc/terms/source> <urn:ISBN:0140449132> .</pre>
|
|
<p>Note that, in the example above, <a class="aref" href="#A-property" title="property">@property</a> could
|
|
have been used instead of <a class="aref" href="#A-rel" title="rel">@rel</a>, yielding the same
|
|
triple.</p>
|
|
</div>
|
|
<div id="using--href-or--src" typeof="bibo:Chapter" about="#using--href-or--src" class="section">
|
|
<h5><span class="secno">8.3.2.2 </span>Using <a class="aref" href="#A-href" title="href">@href</a> or <a class="aref" href="#A-src" title="src">@src</a></h5>
|
|
<p> If no <a class="aref" href="#A-resource" title="resource">@resource</a> is present, then <a class="aref" href="#A-href" title="href">@href</a>
|
|
or <a class="aref" href="#A-src" title="src">@src</a> are next in priority order for setting the
|
|
object. </p>
|
|
<p>When a predicate has been expressed using <a class="aref" href="#A-rel" title="rel">@rel</a>, the
|
|
<a class="aref" href="#A-href" title="href">@href</a> or <a class="aref" href="#A-src" title="src">@src</a> on the RDFa statement's
|
|
element is used to identify the object with a <a class="tref" title="iri-reference" href="#T-iri-reference">IRI reference</a>.
|
|
Their types are an IRI:</p>
|
|
<pre class="example"><link about="mailto:john@example.org"
|
|
<span class="hilite">rel="foaf:knows" href="mailto:sue@example.org"</span> /></pre>
|
|
<p>It's also possible to use both <a class="aref" href="#A-rel" title="rel">@rel</a> and <a class="aref" href="#A-rev" title="rev">@rev</a>
|
|
at the same time on an element. This is particularly useful when
|
|
two things stand in two different relationships with each other,
|
|
for example when a picture is taken <em>by</em> Mark, but that
|
|
picture also <em>depicts</em> him:</p>
|
|
<pre class="example"><img about="http://www.blogger.com/profile/1109404"
|
|
src="photo1.jpg" <span class="hilite">rev="dc:creator" rel="foaf:img"</span>/></pre>
|
|
<p>which then yields two triples:</p>
|
|
<pre class="example"><photo1.jpg>
|
|
dc:creator <http://www.blogger.com/profile/1109404> .
|
|
<http://www.blogger.com/profile/1109404>
|
|
foaf:img <photo1.jpg> .</pre> </div>
|
|
<div id="incomplete-triples" typeof="bibo:Chapter" about="#incomplete-triples" class="section">
|
|
<h5 id="s_Incomplete_Triples"><span class="secno">8.3.2.3 </span>Incomplete triples</h5>
|
|
<p>When a triple predicate has been expressed using <a class="aref" href="#A-rel" title="rel">@rel</a>
|
|
or <a class="aref" href="#A-rev" title="rev">@rev</a>, but no <a class="aref" href="#A-href" title="href">@href</a>, <a class="aref" href="#A-src" title="src">@src</a>,
|
|
or <a class="aref" href="#A-resource" title="resource">@resource</a> exists on the same element, there is a
|
|
'hanging rel'. This causes the current subject and all possible
|
|
predicates (with an indicator of whether they are 'forwards, i.e.,
|
|
<a class="aref" href="#A-rel" title="rel">@rel</a> values, or not, i.e., <a class="aref" href="#A-rev" title="rev">@rev</a> values),
|
|
to be stored as 'incomplete triples' pending discovery of a
|
|
subject that could be used to 'complete' those triples.</p>
|
|
<p>This process is described in more detail in <a href="#s_Completing_Incomplete_Triples">Completing
|
|
|
|
'Incomplete Triples'</a>.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="list-generation" typeof="bibo:Chapter" about="#list-generation" class="section">
|
|
<h3><span class="secno">8.4 </span>List generation</h3>
|
|
<p>An RDF graph is a collection of triples. This also means that if the
|
|
graph contains two triples sharing the same subject and predicate:</p>
|
|
<pre class="example"><http://www.example.com> <http://www.example.com/predicate> "first object", "second object" ;</pre>
|
|
<p>There is no way for an application to rely on the relative order of
|
|
the two triples when, for example, querying a database containing
|
|
these triples. For most of the applications and data sets this is not
|
|
a problem, but, in some cases, the order is important. A typical case
|
|
is publications: when a book or an article has several co-authors, the
|
|
order of the authors may be important. </p>
|
|
<p>RDF has a set of predefined predicates that have an agreed-upon
|
|
semantics of order. For example, the publication: “Semantic Annotation
|
|
and Retrieval, by Ben Adida, Mark Birbeck, and Ivan Herman” could be
|
|
described in RDF triples using these terms as follows:</p>
|
|
<pre class="example">@prefix bibo: <http://purl.org/ontology/bibo/> .
|
|
@prefix dc: <http://purl.org/dc/terms/> .
|
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
[ a bibo:Chapter ;
|
|
dc:title "Semantic Annotation and Retrieval" ;
|
|
dc:creator [
|
|
rdf:first "Ben Adida" ;
|
|
rdf:rest [
|
|
rdf:first "Mark Birbeck" ;
|
|
rdf:rest [
|
|
rdf:first "Ivan Herman" ;
|
|
rdf:rest rdf:nil .
|
|
] .
|
|
] .
|
|
] .
|
|
...
|
|
]</pre>
|
|
<p>which conveys the notion of “order” for the three authors.
|
|
Admittingly, this is not very readable. However, Turtle has a
|
|
syntactic shorthand for these structures:</p>
|
|
<pre class="example">@prefix bibo: <http://purl.org/ontology/bibo/> .
|
|
@prefix dc: <http://purl.org/dc/terms/> .
|
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
[ a bibo:Chapter ;
|
|
dc:title "Semantic Annotation and Retrieval" ;
|
|
dc:creator ( "Ben Adida" "Mark Birbeck" "Ivan Herman" ) .
|
|
...
|
|
]</pre>
|
|
<p>It would of course be possible to reproduce the same structure in
|
|
RDFa, using the RDF predicates <code>rdf:first</code>, <code>rdf:rest</code>,
|
|
as well as the special resource <code>rdf:nil</code>. However, to
|
|
make this easier, RDFa provides the <a class="aref" href="#A-inlist" title="inlist">@inlist</a>. What this
|
|
attributes signals is that the object generated on that element should
|
|
be put on a list; the list is used with the common predicate with the
|
|
common subject. Here is how the previous structure could look like in
|
|
RDFa:</p>
|
|
<pre class="example"><p prefix="bibo: http://purl.org/ontology/bibo/ dc: http://purl.org/dc/terms/ typeof="bibo:Chapter">
|
|
“<span property="dc:title">Semantic Annotation and Retrieval</span>”, by
|
|
<span <span class="hilite">inlist=""</span> <span class="hilite">property="dc:creator"</span>>Ben Adida</span>,
|
|
<span <span class="hilite">inlist=""</span> <span class="hilite">property="dc:creator"</span>>Mark Birbeck</span>, and
|
|
<span <span class="hilite">inlist=""</span> <span class="hilite">property="dc:creator"</span>>Ivan Herman</span>.
|
|
</p></pre>
|
|
<p>Note that the order in the list is determined by the document order.
|
|
(The value of the <a class="aref" href="#A-inlist" title="inlist">@inlist</a> is not relevant, only its
|
|
presence is.)</p>
|
|
<p>Lists may also include URIs and not only literals. For example, two
|
|
of the three co-authors could decide to publicise their FOAF address
|
|
in the authors’ list:</p>
|
|
<pre class="example"><p prefix="bibo: http://purl.org/ontology/bibo/ dc: http://purl.org/dc/terms/ typeof="bibo:Chapter">
|
|
“<span property="dc:title">Semantic Annotation and Retrieval</span>”, by
|
|
<span <span class="hilite">inlist=""</span> <span class="hilite">property="dc:creator"</span> <span class="hilite">resource="http://ben.adida.net/#me"</span>>Ben Adida</span>,
|
|
<span <span class="hilite">inlist=""</span> <span class="hilite">property="dc:creator"</span>>Mark Birbeck</span>, and
|
|
<span <span class="hilite">inlist=""</span> <span class="hilite">property="dc:creator"</span> <span class="hilite">resource="http://www.ivan-herman.net/foaf#me"</span>>Ivan Herman</span>.
|
|
</p></pre>
|
|
<p>yielding:</p>
|
|
<pre class="example">@prefix bibo: <http://purl.org/ontology/bibo/> .
|
|
@prefix dc: <http://purl.org/dc/terms/> .
|
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
[ a bibo:Chapter ;
|
|
dc:title "Semantic Annotation and Retrieval" ;
|
|
dc:creator ( <http://ben.adida.net/#me> "Mark Birbeck" <http://www.ivan-herman.net/foaf#me> ) .
|
|
...
|
|
]</pre>
|
|
<p>In the example above, <a class="aref" href="#A-rel" title="rel">@rel</a> could have been used leading
|
|
exactly to the same triples:</p>
|
|
<pre class="example"><p prefix="bibo: http://purl.org/ontology/bibo/ dc: http://purl.org/dc/terms/ typeof="bibo:Chapter">
|
|
“<span property="dc:title">Semantic Annotation and Retrieval</span>”, by
|
|
<span <span class="hilite">inlist=""</span> <span class="hilite">rel="dc:creator"</span> <span class="hilite">resource="http://ben.adida.net/#me"</span>>Ben Adida</span>,
|
|
<span <span class="hilite">inlist=""</span> <span class="hilite">property="dc:creator"</span>>Mark Birbeck</span>, and
|
|
<span <span class="hilite">inlist=""</span> <span class="hilite">rel="dc:creator"</span> <span class="hilite">resource="http://www.ivan-herman.net/foaf#me"</span>>Ivan Herman</span>.
|
|
</p></pre>
|
|
<p><a href="#s_Incomplete_Triples">Incomplete Triples</a> can also be
|
|
used in conjunction with lists when all list elements are resources
|
|
and not literal. For example, the previous example, this time with all
|
|
three authors referring to their FOAF profile, could have been written
|
|
as:</p>
|
|
<pre class="example"><p prefix="bibo: http://purl.org/ontology/bibo/ dc: http://purl.org/dc/terms/ typeof="bibo:Chapter">
|
|
“<span property="dc:title">Semantic Annotation and Retrieval</span>”, by
|
|
<span <span class="hilite">rel="dc:creator"</span> <span class="hilite">inlist=""</span>>
|
|
<a <span class="hilite">href="http://ben.adida.net/#me"</span>>Ben Adida</a>,
|
|
<a <span class="hilite">href="http://internet-apps.blogspot.com/2008/03/my-profile.html#me"</span>>Mark Birbeck</a>, and
|
|
<a <span class="hilite">href="http://www.ivan-herman.net/foaf#me"</span>>Ivan Herman</a>.
|
|
</span>
|
|
</p></pre>
|
|
<p>Resulting in:</p>
|
|
<pre class="example">@prefix bibo: <http://purl.org/ontology/bibo/> .
|
|
@prefix dc: <http://purl.org/dc/terms/> .
|
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
[ a bibo:Chapter ;
|
|
dc:title "Semantic Annotation and Retrieval" ;
|
|
dc:creator ( <http://ben.adida.net/#me>
|
|
<http://internet-apps.blogspot.com/2008/03/my-profile.html#me>
|
|
<http://www.ivan-herman.net/foaf#me> ) .
|
|
...
|
|
]</pre>
|
|
<p>Note that it is also possible to generate an empty list easily,
|
|
without <a class="aref" href="#A-inlist" title="inlist">@inlist</a>, using:</p>
|
|
<pre class="example"><span rel="prop" resource="rdf:nil"/></pre>
|
|
</div>
|
|
</div>
|
|
<div id="s_initialcontexts" typeof="bibo:Chapter" about="#s_initialcontexts" class="section">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">9. </span>RDFa Initial Contexts</h2>
|
|
<p>RDFa permits Host Languages to define an <a class="tref" title="initial-context" href="#T-initial-context">initial context</a>.
|
|
Such a context is a collection of terms, prefix mappings, and/or default
|
|
vocabulary declarations. An initial context is either intrinsically
|
|
known to the parser, or it is loaded as external documents and
|
|
processed. These documents <em class="rfc2119" title="must">must</em> be defined in an approved RDFa Host
|
|
Language (currently XML+RDFa and XHTML+RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-XHTML-RDFA">XHTML-RDFA</a></cite>]). <span id="C16" about="#C16" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-10-21#resolution_2" rel="bibo:affirmedBy">
|
|
They <em class="rfc2119" title="may">may</em> also be defined in other formats (e.g., RDF/XML
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SYNTAX-GRAMMAR">RDF-SYNTAX-GRAMMAR</a></cite>], or Turtle [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>]).</span> When an initial
|
|
context document is processed, it is evaluated as follows:</p>
|
|
<ol>
|
|
<li>Parse the content (according to the processing rules for that
|
|
document type) and extract the triples into a collection associated
|
|
with that IRI. Note: These triples <em class="rfc2119" title="must not">must not</em> be co-mingled with the
|
|
triples being extracted from any other IRI. </li>
|
|
<li>For every subject with a pair of predicates that have the values <code>rdfa:prefix</code>
|
|
and <code>rdfa:uri</code>, create a key-value mapping from the <code>rdfa:prefix</code>
|
|
object literal (the key) to the <code>rdfa:uri</code> object literal
|
|
(the value). Add this mapping to the <a class="tref" title="list-of-iri-mappings" href="#T-list-of-iri-mappings">list of IRI mappings</a>
|
|
of the <a href="#s_sequence">initial evaluation context</a>, after
|
|
transforming the 'prefix' component to lower-case.</li>
|
|
<li>For every subject with a pair of predicates that have the values <code>rdfa:term</code>
|
|
and <code>rdfa:uri</code>, create a key-value mapping from the <code>rdfa:term</code>
|
|
object literal (the key) to the <code>rdfa:uri</code> object literal
|
|
(the value). Add this mapping to the <a class="tref" title="term-mappings" href="#T-term-mappings">term mappings</a> of
|
|
the <a href="#s_sequence">initial evaluation context</a>.</li>
|
|
<li>For an extracted triple that has a predicate of <code>rdfa:vocabulary</code>,
|
|
define the <a class="tref" title="default-vocabulary" href="#T-default-vocabulary">default vocabulary</a> of the <a href="#s_sequence">initial
|
|
|
|
evaluation context</a> to be the object literal of the <code>rdfa:vocabulary</code>
|
|
predicate.</li>
|
|
</ol>
|
|
<p id="C17" about="#C17" resource="http://www.w3.org/2010/02/rdfa/meetings/2010-10-21#resolution_2" rel="bibo:affirmedBy">
|
|
When an RDFa Initial Context is defined using an RDF serialization, it
|
|
<em class="rfc2119" title="must">must</em> use the vocabulary terms above to declare the components of the
|
|
context.</p>
|
|
<p class="note">Caching of the relevant triples retrieved via this
|
|
mechanism is <em class="rfc2119" title="recommended">recommended</em>. Embedding definitions for well known, stable
|
|
RDFa Initial Contexts in the implementation is <em class="rfc2119" title="recommended">recommended</em>.</p>
|
|
<p class="note">The object literal for the <code>rdfa:uri</code>
|
|
predicate <em class="rfc2119" title="must">must</em> be an absolute IRI. The object literal for the <code>rdfa:term</code>
|
|
predicate <em class="rfc2119" title="must">must</em> match the production for <a href="#P_term">term</a>. The
|
|
object literal for the <code>rdfa:prefix</code> predicate must match
|
|
the production for <a href="#P_prefix">prefix</a>. The object literal
|
|
for the <code>rdfa:vocabulary</code> predicate <em class="rfc2119" title="must">must</em> be an absolute IRI.
|
|
If one of the objects is not a Literal, does not match its associated
|
|
production, if there is more than one <code>rdfa:vocabulary</code>
|
|
predicate, or if there are additional <code>rdfa:uri</code> or <code>rdfa:term</code>
|
|
predicates sharing the same subject, an RDFa Processor <em class="rfc2119" title="must not">must not</em> create
|
|
the associated mapping.</p>
|
|
</div>
|
|
<div id="s_vocab_expansion" typeof="bibo:Chapter" about="#s_vocab_expansion" class="section">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">10. </span><dfn id="T-vocab-expansion">RDFa Vocabulary Expansion</dfn></h2>
|
|
<p> Since RDFa is based on RDF, the semantics of RDF vocabularies can be
|
|
used to gain more knowledge about data. Vocabularies, properties and
|
|
classes are identified by IRIs, which enables them to be discoverable.
|
|
RDF data published at the location of these IRIs can be retrieved, and
|
|
descriptions of the properties and classes using specified semantics can
|
|
be applied. </p>
|
|
<p> RDFa Vocabulary Expansion is an optional processing step which may be
|
|
added once the normal processing steps described in <a href="#s_model">Processing
|
|
|
|
Model</a> are complete. Vocabulary expansion relies on a very small
|
|
sub-set of OWL entailment [<cite><a class="bibref" rel="biblioentry" href="#bib-OWL2-OVERVIEW">OWL2-OVERVIEW</a></cite>] to add triples to the <a class="tref" title="output-graph" href="#T-output-graph">output
|
|
|
|
graph</a> based on rules and property/class relationships described
|
|
in referenced vocabularies. Vocabulary expansion <em class="rfc2119" title="may">may</em> be performed as
|
|
part of a larger RDF toolset including, for example, an OWL 2 RL
|
|
reasoner. Alternatively, using vocabulary data added to the <a class="tref" title="output-graph" href="#T-output-graph">output
|
|
graph</a> in processing step 2 of <a href="#s_sequence">Sequence</a>,
|
|
expansion <em class="rfc2119" title="may">may</em> also be done using a separate and dedicated (e.g., rule
|
|
based) reasoner after the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a> has been generated,
|
|
or as the last processing step by an RDFa processor. </p>
|
|
<p> It can be very useful to make generalized data available for
|
|
subsequent usage of RDFa-embedded data by expanding inferred statements
|
|
entailed by these semantics. This provides for existing vocabularies
|
|
that extend well-known vocabularies to have those properties added to
|
|
the output graph automatically. For example, the namespace document of
|
|
the Creative Commons vocabulary, i.e., <code>http://creativecommons.org/ns</code>,
|
|
defines <code>cc:license</code> to be a sub-property of <code>dc:license</code>.
|
|
By using the <a class="aref" href="#A-vocab" title="vocab">@vocab</a> attribute, one can describe a licensing
|
|
information as follows:</p>
|
|
<pre class="example">This document is licensed under the
|
|
<a vocab="http://creativecommons.org/ns#"
|
|
rel="license"
|
|
href="http://creativecommons.org/licenses/by-nc-nd/3.0/">
|
|
Creative Commons By-NC-ND License
|
|
</a>.</pre>
|
|
<p>which results in the following <a class="tref" title="output-graph" href="#T-output-graph">output graph</a>:</p>
|
|
<pre class="example">@prefix cc: <http://creativecommons.org/ns#> .
|
|
@prefix rdfa: <http://www.w3.org/ns/rdfa#> .
|
|
<> cc:license <http://creativecommons.org/licenses/by-nc-nd/3.0/> ;
|
|
rdfa:usesVocabulary <http://creativecommons.org/ns#> .</pre>
|
|
<p>After vocabulary expansion, the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a> contains:</p>
|
|
<pre class="example">@prefix cc: <http://creativecommons.org/ns#> .
|
|
@prefix rdfa: <http://www.w3.org/ns/rdfa#> .
|
|
<span class="hilite">@prefix dc: <http://purl.org/dc/terms/> .</span>
|
|
<> cc:license <http://creativecommons.org/licenses/by-nc-nd/3.0/>;
|
|
<span class="hilite">dc:license <http://creativecommons.org/licenses/by-nc-nd/3.0/></span> ;
|
|
rdfa:usesVocabulary <http://creativecommons.org/ns#> .</pre>
|
|
<p> Other vocabularies, specifically intended to provide relations to
|
|
multiple vocabularies, could also be defined by publishers, allowing use
|
|
of terms in a single namespace which result in properties and/or classes
|
|
from other primary vocabularies being imported. This benefits publishers
|
|
as data is now more widely searchable and encourages the practice of
|
|
referencing well-known vocabularies. </p>
|
|
<div class="informative section" id="s_vocab_expansion_details" typeof="bibo:Chapter" about="#s_vocab_expansion_details">
|
|
<h3><span class="secno">10.1 </span><dfn id="T-vocab_expansion_details">Details of the RDFa Vocabulary
|
|
Expansion</dfn></h3><p><em>This section is non-normative.</em></p>
|
|
<p> Once the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a> is generated following the
|
|
processing steps defined in <a href="#s_sequence">Sequence</a>,
|
|
processors <em class="rfc2119" title="may">may</em> perform the following processing steps on the output
|
|
graph. It must do so only if the user of the processor explicitly asks
|
|
for it, as prescribed in <a href="#s_expansion_control">Vocabulary
|
|
Expansion Control of RDFa Processors</a>. </p>
|
|
<p> A <dfn title="vocabulary-graph" id="T-vocabulary-graph">vocabulary graph</dfn> is created as follows: For each IRI
|
|
being the object of a triple in the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a> with
|
|
the subject being the current document (<a class="tref" title="base" href="#T-base">base</a>) IRI and the
|
|
property being <code>rdfa:usesVocabulary</code>, that IRI is
|
|
dereferenced. If the dereferencing yields the serialization of an RDF
|
|
graph, that serialization is parsed and the resulting graph is merged
|
|
with the vocabulary graph. (An RDFa processor capable of vocabulary
|
|
expansion <em class="rfc2119" title="must">must</em> accept an RDF graph serialized in RDFa, and <em class="rfc2119" title="should">should</em>
|
|
accept other standard serialization formats of RDF such as RDF/XML
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SYNTAX-GRAMMAR">RDF-SYNTAX-GRAMMAR</a></cite>] and Turtle [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>].) </p>
|
|
<p class="note"> Note that if, in the second step, a particular
|
|
vocabulary is serialized in RDFa, that particular graph is not
|
|
expected to undergo any vocabulary expansion on its own. </p>
|
|
<p>Vocabulary expansion is then performed as follows:</p>
|
|
<ol>
|
|
<li>The processor operates on the merge of the default and vocabulary
|
|
graphs using <a href="#s_vocab_entailment">RDFa Vocabulary
|
|
Entailment</a>.</li>
|
|
<li>Add the new triples inferred from the <a class="tref" title="output-graph" href="#T-output-graph">output graph</a>
|
|
using this entailment to the (expanded) <a class="tref" title="output-graph" href="#T-output-graph">output graph</a>.
|
|
The processor <em class="rfc2119" title="should not">should not</em> add the triples appearing in the <a class="tref" title="vocabulary-graph" href="#T-vocabulary-graph">vocabulary
|
|
graph</a> only.</li>
|
|
</ol>
|
|
<div class="explanation"> The goal of the second step is to avoid adding
|
|
the “axioms”, e.g., the sub-property definitions to the output graph.
|
|
Applications usually do not require those additional information. </div>
|
|
<div id="s_vocab_entailment" typeof="bibo:Chapter" about="#s_vocab_entailment" class="section">
|
|
<h4><span class="secno">10.1.1 </span><dfn id="T-vocab-entailment">RDFa Vocabulary Entailment</dfn></h4>
|
|
<p> For the purpose of vocabulary processing, RDFa used a very
|
|
restricted subset of the OWL vocabulary and is based on the RDF-Based
|
|
Semantics of OWL[<cite><a class="bibref" rel="biblioentry" href="#bib-OWL2-RDF-BASED-SEMANTICS">OWL2-RDF-BASED-SEMANTICS</a></cite>]. The RDFa
|
|
Vocabulary Entailment uses the following terms: </p>
|
|
<ul>
|
|
<li><code>rdf:type</code></li>
|
|
<li><code>rdfs:subClassOf</code></li>
|
|
<li><code>rdfs:subPropertyOf</code></li>
|
|
<li><code>owl:equivalentClass</code></li>
|
|
<li><code>owl:equivalentProperty</code><br />
|
|
</li>
|
|
</ul>
|
|
<p class="note">and it considers only the entailment on individuals
|
|
(i.e., not on the relationships that can be deduced on the
|
|
properties or the classes themselves.)<br />
|
|
</p>
|
|
<p class="note">While the formal definition of the RDFa Entailment
|
|
refers to the general OWL 2 Semantics, practical implementations may
|
|
rely on a subset of the OWL 2 RL Profile’s entailment expressed in
|
|
rules (<cite><a href="http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/#Reasoning_in_OWL_2_RL_and_RDF_Graphs_using_Rules">section
|
|
|
|
4.3</a></cite> of [<cite><a class="bibref" rel="biblioentry" href="#bib-OWL2-PROFILES">OWL2-PROFILES</a></cite>]). In particular, the
|
|
relevant rules are (using the rule identifications in <cite><a href="http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/#Reasoning_in_OWL_2_RL_and_RDF_Graphs_using_Rules">section
|
|
|
|
4.3</a></cite> of [<cite><a class="bibref" rel="biblioentry" href="#bib-OWL2-PROFILES">OWL2-PROFILES</a></cite>]): <code>prp-spo1</code>, <code>prp-eqp1</code>,
|
|
<code>prp-eqp2</code>, <code>cax-sco</code>, <code>cax-eqc1</code>,
|
|
and <code>cax-eqc2</code>. </p>
|
|
The entailment described in this section is the <em>minimum</em>
|
|
useful level for RDFa. Processors may, of course, choose to follow
|
|
more powerful entailment regimes, e.g., include full RDFS [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-MT">RDF-MT</a></cite>]
|
|
or OWL [<cite><a class="bibref" rel="biblioentry" href="#bib-OWL2-OVERVIEW">OWL2-OVERVIEW</a></cite>] entailments. Using those entailments
|
|
applications may perform datatype validation by checking <code>rdfs:range</code>
|
|
of a property, or use the advanced facilities offered by, e.g., OWL’s
|
|
property chains to interlink vocabularies further. </div>
|
|
</div>
|
|
<div class="normative section" id="s_expansion_control" typeof="bibo:Chapter" about="#s_expansion_control">
|
|
<h3><span class="secno">10.2 </span>Vocabulary Expansion Control of RDFa Processors</h3>
|
|
<p> Conforming RDFa processors are NOT required to provide vocabulary
|
|
expansion. </p>
|
|
<p> If an RDFa processor provides vocabulary expansion, it <em class="rfc2119" title="must not">must not</em> be
|
|
performed by default. Instead, the processor <em class="rfc2119" title="must">must</em> provide an option, <code>vocab_expansion</code>,
|
|
which, when used, instructs the RDFa processor to perform a vocabulary
|
|
expansion before returning the output graph. </p>
|
|
<p class="note"> Although vocabulary expansion is described in terms of
|
|
a <a class="tref" title="vocabulary-graph" href="#T-vocabulary-graph">vocabulary graph</a> and RDFS entailment rules, processors
|
|
are free to use any process which obtains equivalent results. </p>
|
|
<div class="informative section" id="s_vocab_guidelines" typeof="bibo:Chapter" about="#s_vocab_guidelines">
|
|
<h4><span class="secno">10.2.1 </span>Notes to RDFa Vocabulary Implementations and Publishing</h4><p><em>This section is non-normative.</em></p>
|
|
<p>For RDFa Processors caching the relevant graphs retrieved via this
|
|
mechanism is <em class="rfc2119" title="recommended">recommended</em>. Caching is usually based on HTTP response
|
|
headers like expiration time, cache control, etc.</p>
|
|
<p>For publishers of vocabularies, the URI for the vocabularies <em class="rfc2119" title="should">should</em>
|
|
be dereferencable, and should return an RDF graph with the
|
|
vocabulary description. This vocabulary description <em class="rfc2119" title="should">should</em> be
|
|
available encoded in RDFa, and <em class="rfc2119" title="may">may</em> also be available in other RDF
|
|
serialization syntaxes (using content negotiation to choose among
|
|
the different formats). If possible, vocabulary descriptions <em class="rfc2119" title="should">should</em>
|
|
include subproperty and subclass statements linking the vocabulary
|
|
terms to other, well-known vocabularies. Finally, HTTP responses
|
|
<em class="rfc2119" title="should">should</em> include fields usable for cache control, e.g., expiration
|
|
date.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="appendix section" id="s_datatypes" typeof="bibo:Chapter" about="#s_datatypes">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">A. </span>CURIE Datatypes</h2>
|
|
<p>In order to facilitate the use of CURIEs in markup languages, this
|
|
specification defines some additional datatypes in the XHTML datatype
|
|
space (<code>http://www.w3.org/1999/xhtml/datatypes/</code>). Markup
|
|
languages that want to import these definitions can find them in the
|
|
"datatypes" file for their schema grammar:</p>
|
|
<ul>
|
|
<li><a href="http://www.w3.org/MarkUp/DTD/xhtml-datatypes-1.mod">DTD
|
|
xhtml-datatypes.mod</a></li>
|
|
<li><a href="http://www.w3.org/MarkUp/SCHEMA/xhtml-datatypes-1.xsd">XML
|
|
Schema xhtml-datatypes.xsd</a></li>
|
|
</ul>
|
|
<p>Specifically, the following datatypes are defined:</p>
|
|
<dl>
|
|
<dt><dfn id="dfn-curie">CURIE</dfn></dt>
|
|
<dd>A single <a href="#P_curie">curie</a></dd>
|
|
<dt><dfn id="dfn-curies">CURIEs</dfn></dt>
|
|
<dd>A white space separated list of CURIEs</dd>
|
|
<dt><dfn id="dfn-curieoriri">CURIEorIRI</dfn></dt>
|
|
<dd>A <a class="datatype internalDFN" title="CURIE" href="#dfn-curie">CURIE</a> or a <a class="externalDFN" title="IRI">IRI</a></dd>
|
|
<dt><dfn id="dfn-curieoriris">CURIEorIRIs</dfn></dt>
|
|
<dd>A white space separated list of <a class="datatype internalDFN" title="CURIEorIRI" href="#dfn-curieoriri">CURIEorIRI</a>s</dd>
|
|
<dt><dfn id="dfn-safecurie">SafeCURIE</dfn></dt>
|
|
<dd>A single <a href="#P_safe_curie">safe_curie</a></dd>
|
|
<dt><dfn id="dfn-safecurieorcurieoriri">SafeCURIEorCURIEorIRI</dfn></dt>
|
|
<dd>A single <a class="datatype internalDFN" title="SafeCURIE" href="#dfn-safecurie">SafeCURIE</a> or <a class="datatype internalDFN" title="CURIEorIRI" href="#dfn-curieoriri">CURIEorIRI</a></dd>
|
|
<dt><dfn id="dfn-safecurieorcurieoriris">SafeCURIEorCURIEorIRIs</dfn></dt>
|
|
<dd>A white space separated list of <a class="datatype internalDFN" title="SafeCURIEorCURIEorIRI" href="#dfn-safecurieorcurieoriri">SafeCURIEorCURIEorIRI</a>s.</dd>
|
|
<dt><dfn id="dfn-term">TERM</dfn></dt>
|
|
<dd>A single <a href="#P_term">term</a></dd>
|
|
<dt><dfn id="dfn-termorcurieorabsiri">TERMorCURIEorAbsIRI</dfn></dt>
|
|
<dd>A <a class="datatype internalDFN" title="TERM" href="#dfn-term">TERM</a> or a <a class="datatype internalDFN" title="CURIEorIRI" href="#dfn-curieoriri">CURIEorIRI</a></dd>
|
|
<dt><dfn id="dfn-termorcurieorabsiris">TERMorCURIEorAbsIRIs</dfn></dt>
|
|
<dd>A white space separated list of <a class="datatype internalDFN" title="TERMorCURIEorAbsIRI" href="#dfn-termorcurieorabsiri">TERMorCURIEorAbsIRI</a>s</dd>
|
|
</dl>
|
|
<div class="informative section" id="xml-schema-definition" typeof="bibo:Chapter" about="#xml-schema-definition">
|
|
<h3><span class="secno">A.1 </span>XML Schema Definition</h3><p><em>This section is non-normative.</em></p>
|
|
<p>The following <i>informative</i> XML Schema definition for these
|
|
datatypes is included as an example:</p>
|
|
<pre class="example"><?xml version="1.0" encoding="UTF-8"?>
|
|
<xs:schema
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
xmlns="http://www.w3.org/1999/xhtml/datatypes/"
|
|
xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
|
|
targetNamespace="http://www.w3.org/1999/xhtml/datatypes/"
|
|
elementFormDefault="qualified"
|
|
>
|
|
<xs:simpleType name="CURIE">
|
|
<xs:restriction base="xs:string">
|
|
<xs:pattern value="(([\i-[:]][\c-[:]]*)?:)?.+" />
|
|
<xs:minLength value="1"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="CURIEs">
|
|
<xs:list itemType="xh11d:CURIE"/>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="SafeCURIE">
|
|
<xs:restriction base="xs:string">
|
|
<xs:pattern value="\[(([\i-[:]][\c-[:]]*)?:)?.+\]" />
|
|
<xs:minLength value="3"/>
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="SafeCURIEs">
|
|
<xs:list itemType="xh11d:SafeCURIE"/>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="TERM">
|
|
<xs:restriction base="xs:Name">
|
|
<xs:pattern value="[\i-[:]][/\c-[:]]*" />
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
|
|
<xs:simpleType name="CURIEorIRI">
|
|
<xs:union memberTypes="xh11d:CURIE xs:anyURI" />
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="CURIEorIRIs">
|
|
<xs:list itemType="xh11d:CURIEorIRI"/>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="SafeCURIEorCURIEorIRI">
|
|
<xs:union memberTypes="xh11d:SafeCURIE xh11d:CURIE xs:anyURI" />
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="SafeCURIEorCURIEorIRIs">
|
|
<xs:list itemType="xh11d:SafeCURIEorCURIEorIRI"/>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name='AbsIRI'>
|
|
<xs:restriction base='xs:string'>
|
|
<xs:pattern value="[\i-[:]][\c-[:]]+:.+" />
|
|
</xs:restriction>
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="TERMorCURIEorAbsIRI">
|
|
<xs:union memberTypes="xh11d:TERM xh11d:CURIE xh11d:AbsIRI" />
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="TERMorCURIEorAbsIRIs">
|
|
<xs:list itemType="xh11d:SafeCURIEorCURIEorAbsIRI"/>
|
|
</xs:simpleType>
|
|
</xs:schema></pre> </div>
|
|
<div class="informative section" id="xml-dtd-definition" typeof="bibo:Chapter" about="#xml-dtd-definition">
|
|
<h3><span class="secno">A.2 </span>XML DTD Definition</h3><p><em>This section is non-normative.</em></p>
|
|
<p>The following <i>informative</i> XML DTD definition for these
|
|
datatypes is included as an example:</p>
|
|
<pre class="example"><!ENTITY % CURIE.datatype "CDATA" >
|
|
<!ENTITY % CURIEs.datatype "CDATA" >
|
|
<!ENTITY % CURIEorIRI.datatype "CDATA" >
|
|
<!ENTITY % CURIEorIRIs.datatype "CDATA" >
|
|
<!ENTITY % SafeCURIEorCURIEorIRI.datatype "CDATA" >
|
|
<!ENTITY % SafeCURIEorCURIEorIRIs.datatype "CDATA" >
|
|
<!ENTITY % TERMorCURIEorAbsIRI.datatype "CDATA" >
|
|
<!ENTITY % TERMorCURIEorAbsIRIs.datatype "CDATA" ></pre> </div>
|
|
</div>
|
|
<div class="normative section" id="vocabulary" typeof="bibo:Chapter" about="#vocabulary">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">B. </span>The RDFa Vocabulary</h2>
|
|
<p>The RDFa Vocabulary has three roles: it contains the predicates to
|
|
define the terms and prefixes in <a class="tref" title="initial-context" href="#T-initial-context">initial context</a>
|
|
documents, it contains the classes and predicates for the messages that
|
|
a <a class="tref" title="processor-graph" href="#T-processor-graph">processor graph</a> may contain and, finally, it contains
|
|
the predicate necessary for vocabulary processing. The IRI of the
|
|
vocabulary is <code>http://www.w3.org/ns/rdfa#</code>; the usual prefix
|
|
used in this document is <code>rdfa</code>.</p>
|
|
<p>This vocabulary specification is available in <a href="http://www.w3.org/ns/rdfa.html">XHTML+RDFa
|
|
|
|
1.1</a>, <a href="http://www.w3.org/ns/rdfa.ttl">Turtle</a>, and in <a href="http://www.w3.org/ns/rdfa.rdf">RDF/XML</a>
|
|
formats.</p>
|
|
<div class="normative section" id="term-prefix-definitions-vocabulary" typeof="bibo:Chapter" about="#term-prefix-definitions-vocabulary">
|
|
<h3><span class="secno">B.1 </span>Term and Prefix Assignments</h3>
|
|
<p>The RDFa Vocabulary includes the following triples (shown here in
|
|
Turtle [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>] format): </p>
|
|
<pre class="example">@prefix dc: <http://purl.org/dc/terms/> .
|
|
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
@prefix rdfa: <http://www.w3.org/ns/rdfa#> .
|
|
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
|
|
<http://www.w3.org/ns/rdfa#> a owl:Ontology .
|
|
|
|
rdfa:PrefixOrTermMapping a rdfs:Class, owl:Class ;
|
|
dc:description "is the top level class for prefix or term mappings" .
|
|
|
|
rdfa:PrefixMapping dc:description "is the class for prefix mappings" .
|
|
rdfs:subClassOf rdfa:PrefixOrTermMapping .
|
|
|
|
rdfa:TermMapping dc:description "is the class for term mappings" .
|
|
rdfs:subClassOf rdfa:PrefixOrTermMapping .
|
|
|
|
rdfa:prefix a rdf:Property, owl:DatatypeProperty ;
|
|
rdfs:domain rdfa:PrefixMapping ;
|
|
dc:description "defines a prefix mapping for an IRI; the value is supposed to be a NMTOKEN" .
|
|
|
|
rdfa:term a rdf:Property, owl:DatatypeProperty ;
|
|
rdfs:domain rdfa:TermMapping ;
|
|
dc:description "defines a term mapping for an IRI; the value is supposed to be a NMTOKEN" .
|
|
|
|
rdfa:uri a rdf:Property, owl:DatatypeProperty ;
|
|
rdfs:domain rdfa:PrefixOrTermMapping ;
|
|
dc:description """defines the IRI for either a prefix or a term mapping;
|
|
the value is supposed to be an absolute IRI""" .
|
|
|
|
rdfa:vocabulary a rdf:Property, owl:DatatypeProperty ;
|
|
dc:description """defines an IRI to be used as a default vocabulary;
|
|
the value is can be any string; for documentation purposes it is advised to use
|
|
the string ‘true’ or ‘True’.""" . </pre>
|
|
<p>These predicates can be used to define the <a class="tref" title="initial-context" href="#T-initial-context">initial context</a>
|
|
for a given Host Language.</p>
|
|
<p>These predicates are used to 'pair' IRI strings and their usage in
|
|
the form of a prefix and/or a term as part of, for example, a blank
|
|
node. An example can be as follows:</p>
|
|
<pre class="example">[] rdfa:uri "http://xmlns.com/foaf/0.1/name" ;
|
|
rdfa:prefix "foaf" . </pre>
|
|
<p>which defines a prefix for the foaf IRI.</p>
|
|
</div>
|
|
<div class="normative section" id="processor-graph-reporting" typeof="bibo:Chapter" about="#processor-graph-reporting">
|
|
<h3><span class="secno">B.2 </span>Processor Graph Reporting</h3>
|
|
<p>The Vocabulary includes the following term definitions (shown here in
|
|
Turtle [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>] format): </p>
|
|
<pre class="example">@prefix dc: <http://purl.org/dc/terms/> .
|
|
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
@prefix rdfa: <http://www.w3.org/ns/rdfa#> .
|
|
|
|
rdfa:PGClass a rdfs:Class, owl:Class;
|
|
dc:description "is the top level class of the hierarchy" .
|
|
|
|
rdfa:Error dcterms:description "is the class for all error conditions";
|
|
rdfs:subClassOf rdfa:PGClass .
|
|
|
|
rdfa:Warning dcterms:description "is the class for all warnings";
|
|
rdfs:subClassOf rdfa:PGClass .
|
|
|
|
rdfa:Info dcterms:description "is the class for all informations";
|
|
rdfs:subClassOf rdfa:PGClass .
|
|
|
|
rdfa:DocumentError dc:description "error condition; to be used when the document
|
|
fails to be fully processed as a result of non-conformant host language markup";
|
|
rdfs:subClassOf rdfa:Error .
|
|
|
|
rdfa:VocabReferenceError dc:description "warning; to be used
|
|
when the value of a @vocab attribute cannot be dereferenced, hence the vocabulary expansion
|
|
cannot be completed.";
|
|
rdfs:subClassOf rdfa:Warning .
|
|
|
|
rdfa:UnresolvedTerm dc:description "warning; to be used when a Term fails to be resolved";
|
|
rdfs:subClassOf rdfa:Warning .
|
|
|
|
rdfa:UnresolvedCURIE dc:description "warning; to be used when a CURIE prefix
|
|
fails to be resolved";
|
|
rdfs:subClassOf rdfa:Warning .
|
|
|
|
rdfa:context a owl:ObjectProperty, rdf:Property;
|
|
dc:description "provides extra context for the error, e.g., http response,
|
|
an XPointer/XPath information, or simply the IRI that created the error";
|
|
rdfs:domain rdfa:PGClass .</pre> </div>
|
|
<div class="normative section" id="vocabulary-relationship" typeof="bibo:Chapter" about="#vocabulary-relationship">
|
|
<h3><span class="secno">B.3 </span>Term for vocabulary expansion</h3>
|
|
<p>The Vocabulary includes the following term definitions (shown here in
|
|
Turtle [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>] format): </p>
|
|
<pre class="example">@prefix dc: <http://purl.org/dc/terms/> .
|
|
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
@prefix rdfa: <http://www.w3.org/ns/rdfa#> .
|
|
|
|
rdfa:usesVocabulary a owl:ObjectProperty, rdf:Property;
|
|
dc:description "provides a relationship between the host document and a vocabulary
|
|
defined using the @vocab facility of RDFa1.1" .</pre> </div>
|
|
<div class="informative section" id="a_history" typeof="bibo:Chapter" about="#a_history">
|
|
<h3><span class="secno">B.4 </span>Changes</h3><p><em>This section is non-normative.</em></p>
|
|
<div id="major-differences-with-rdfa-syntax-1.0" typeof="bibo:Chapter" about="#major-differences-with-rdfa-syntax-1.0" class="section">
|
|
<h4><span class="secno">B.4.1 </span>Major differences with RDFa Syntax 1.0</h4>
|
|
<p>This specification introduces a number of new features, and extends
|
|
the behavior of some features from the previous version. The
|
|
following summary may be helpful to RDFa Processor developers, but
|
|
is <em>not</em> meant to be comprehensive.</p>
|
|
<ul>
|
|
<li>Specific rules about XHTML have been moved into a companion
|
|
specification: [<cite><a class="bibref" rel="biblioentry" href="#bib-XHTML-RDFA">XHTML-RDFA</a></cite>].</li>
|
|
<li>Prefix mappings can now be declared using <a class="aref" href="#A-prefix" title="prefix">@prefix</a>
|
|
in addition to <span class="aref">@xmlns</span>. The usage of <span class="aref">@xmlns</span>
|
|
has been deprecated.</li>
|
|
<li>Prefix names are now required be be converted to lower-case when
|
|
the mapping is defined. Prefixes are checked in a case-insensitive
|
|
manner during CURIE expansion.</li>
|
|
<li>You can now use an Absolute IRI everywhere you could previously
|
|
only use a CURIE (e.g., in the value of <a class="aref" href="#A-datatype" title="datatype">@datatype</a>).</li>
|
|
<li>There is now a concept of a <a class="tref" title="term" href="#T-term">term</a>. This concept has
|
|
replaced the concept of a 'reserved word'. It is possible now to
|
|
use a 'term' in most places where you could previously only use a
|
|
CURIE.</li>
|
|
<li>You can define a default prefix mapping (via <a class="aref" href="#A-vocab" title="vocab">@vocab</a>)
|
|
that will be used on undefined terms.</li>
|
|
<li>When a triple would include an object literal, and there is no
|
|
explicit datatype attribute, the object literal will now be a
|
|
'plain literal'. In version 1.0 it would have been an
|
|
'XMLLiteral'.</li>
|
|
<li>The <a class="aref" href="#A-inlist" title="inlist">@inlist</a> attribute can be used to instruct the
|
|
processor to generate RDF lists with the resources rather than
|
|
simple triples.</li>
|
|
<li>The effect of <a class="aref" href="#A-src" title="src">@src</a> is now identical to <a class="aref" href="#A-href" title="href">@href</a>
|
|
rather than <a class="aref" href="#A-about" title="about">@about</a> like in version 1.0. </li>
|
|
</ul>
|
|
<p>While this specification strives to be as backward compatible as
|
|
possible with [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-SYNTAX">RDFA-SYNTAX</a></cite>], the changes above mean that there are
|
|
some circumstances where it is possible for different RDF triples to
|
|
be output for the same document when processed by an RDFa 1.0
|
|
processor vs. an RDFa 1.1 processor. In order to minimize these
|
|
differences, a document author can do the following:</p>
|
|
<ul>
|
|
<li>Use the XHTML+RDFa 1.0 document type as defined in
|
|
[<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-SYNTAX">RDFA-SYNTAX</a></cite>].</li>
|
|
<li>Place a <span class="aref">@version</span> attribute with the
|
|
value <code>XHTML+RDFa 1.0</code> on the <code>html</code>
|
|
element.</li>
|
|
<li>If there are places in the document where an object literal <em class="rfc2119" title="must">must</em>
|
|
be an XMLLiteral, use <code>datatype='rdf:XMLLiteral'</code>.</li>
|
|
<li>If there are places in the document where an object literal <em class="rfc2119" title="must">must</em>
|
|
be a plain literal, use <code>datatype=''</code>.</li>
|
|
<li>If there are places in the document where <a class="aref" href="#A-src" title="src">@src</a> is
|
|
used, add an <a class="aref" href="#A-about" title="about">@about</a> (unless already present) with the
|
|
same URI.</li>
|
|
</ul>
|
|
<p>When producing XHTML+RDFa 1.1 documents, it is possible to reduce
|
|
the incompatibilities with RDFa 1.0 conforming processors by doing
|
|
the following:</p>
|
|
<ul>
|
|
<li>DO NOT use the <a class="aref" href="#A-vocab" title="vocab">@vocab</a> feature.</li>
|
|
<li>DO NOT rely upon host language defaults for IRI mappings.</li>
|
|
<li>DO NOT use absolute IRIs in place of CURIEs.</li>
|
|
<li>Use <span class="aref">@xmlns</span> AND <a class="aref" href="#A-prefix" title="prefix">@prefix</a>
|
|
when declaring prefix mappings.</li>
|
|
<li>DO NOT use TERMs on <a class="aref" href="#A-datatype" title="datatype">@datatype</a>, <a class="aref" href="#A-property" title="property">@property</a>,
|
|
or <a class="aref" href="#A-typeof" title="typeof">@typeof</a>.</li>
|
|
<li>When using TERMs in <a class="aref" href="#A-rel" title="rel">@rel</a> and <a class="aref" href="#A-rev" title="rev">@rev</a>,
|
|
only use ones defined in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-SYNTAX">RDFA-SYNTAX</a></cite>].</li>
|
|
<li>Place a <span class="aref">version</span> attribute with the
|
|
value <code>XHTML+RDFa 1.0</code> on the <code>html</code>
|
|
element.</li>
|
|
<li>If there are places in the document where an object literal <em class="rfc2119" title="must">must</em>
|
|
be an XMLLiteral, use <code>datatype='rdf:XMLLiteral'</code>.</li>
|
|
<li>If there are places in the document where an object literal <em class="rfc2119" title="must">must</em>
|
|
be a plain literal, use <code>datatype=''</code>.</li>
|
|
<li>If there are places in the document where <a class="aref" href="#A-src" title="src">@src</a> is
|
|
used, add an <a class="aref" href="#A-about" title="about">@about</a> (unless already present) with the
|
|
same URI.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="informative section" id="a_acks" typeof="bibo:Chapter" about="#a_acks">
|
|
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">C. </span>Acknowledgments</h2><p><em>This section is non-normative.</em></p>
|
|
<p>At the time of publication, the active members of the RDFa Working
|
|
Group were:</p>
|
|
<ul>
|
|
<li>Ben Adida, Creative Commons (Chair)</li>
|
|
<li>Benjamin Adrian, German Research Center for Artificial Intelligence
|
|
(DFKI) Gmbh</li>
|
|
<li>Mark Birbeck, webBackplane.com (Invited Expert)</li>
|
|
<li>Stéphane Corlosquet, Massachusetts General Hospital</li>
|
|
<li>Markus Gylling, DAISY Consortium</li>
|
|
<li>Ivan Herman, <acronym title="World Wide Web Consortium">W3C</acronym></li>
|
|
<li>Toby Inkster (Invited Expert)</li>
|
|
<li>Gregg Kellogg (Invited Expert)</li>
|
|
<li>Niklas Lindström (Invited Expert)</li>
|
|
<li>Shane McCarron, Applied Testing and Technology, Inc. (Invited
|
|
Expert)</li>
|
|
<li>Knud Möller, DERI Galway at the National University of Ireland</li>
|
|
<li>John O'Donovan, British Broadcasting Corporation</li>
|
|
<li>Steven Pemberton, Centre for Mathematics and Computer Science (CWI)</li>
|
|
<li>Nathan Rixham (Invited Expert)</li>
|
|
<li>Manu Sporny, Digital Bazaar (Chair, Invited Expert)</li>
|
|
<li>Robert Weir, IBM Corporation</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div id="references" class="appendix section" typeof="bibo:Chapter" about="#references">
|
|
<!-- OddPage -->
|
|
<h2><span class="secno">D. </span>References</h2><div id="normative-references" typeof="bibo:Chapter" about="#normative-references" class="section"><h3><span class="secno">D.1 </span>Normative references</h3><dl class="bibliography" about=""><dt id="bib-OWL2-OVERVIEW">[OWL2-OVERVIEW]</dt><dd rel="dcterms:requires">W3C OWL Working Group. <a href="http://www.w3.org/TR/2009/REC-owl2-overview-20091027/"><cite>OWL 2 Web Ontology Language: Overview.</cite></a> 27 October 2009. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2009/REC-owl2-overview-20091027/">http://www.w3.org/TR/2009/REC-owl2-overview-20091027/</a>
|
|
</dd><dt id="bib-OWL2-PROFILES">[OWL2-PROFILES]</dt><dd rel="dcterms:requires">Boris Motik; Bernardo Cuenca Grau; Ian Horrocks; Zhe Wu; Achille Fokoue; Carsten Lutz. <a href="http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/"><cite>OWL 2 Web Ontology Language:Profiles.</cite></a> 27 October 2009. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/">http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/</a>
|
|
</dd><dt id="bib-OWL2-RDF-BASED-SEMANTICS">[OWL2-RDF-BASED-SEMANTICS]</dt><dd rel="dcterms:requires">Michael Schneider. <a href="http://www.w3.org/TR/2009/REC-owl2-rdf-based-semantics-20091027/"><cite>OWL 2 Web Ontology Language:RDF-Based Semantics.</cite></a> 27 October 2009. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2009/REC-owl2-rdf-based-semantics-20091027/">http://www.w3.org/TR/2009/REC-owl2-rdf-based-semantics-20091027/</a>
|
|
</dd><dt id="bib-RDF-MT">[RDF-MT]</dt><dd rel="dcterms:requires">Patrick Hayes. <a href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210"><cite>RDF Semantics.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210">http://www.w3.org/TR/2004/REC-rdf-mt-20040210</a>
|
|
</dd><dt id="bib-RDF-SYNTAX-GRAMMAR">[RDF-SYNTAX-GRAMMAR]</dt><dd rel="dcterms:requires">Dave Beckett. <a href="http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210"><cite>RDF/XML Syntax Specification (Revised).</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210">http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210</a>
|
|
</dd><dt id="bib-RFC2119">[RFC2119]</dt><dd rel="dcterms:requires">S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119. URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
|
|
</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd rel="dcterms:requires">M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a>
|
|
</dd><dt id="bib-TURTLE">[TURTLE]</dt><dd rel="dcterms:requires">David Beckett, Tim Berners-Lee. <a href="http://www.w3.org/TeamSubmission/turtle/"><cite>Turtle: Terse RDF Triple Language.</cite></a> January 2008. W3C Team Submission. URL: <a href="http://www.w3.org/TeamSubmission/turtle/">http://www.w3.org/TeamSubmission/turtle/</a>
|
|
</dd><dt id="bib-XHTML-RDFA">[XHTML-RDFA]</dt><dd rel="dcterms:requires">Shane McCarron; et. al. <a href="http://www.w3.org/TR/2011/WD-xhtml-rdfa-20111215"><cite>XHTML+RDFa 1.1.</cite></a> 15 December 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-xhtml-rdfa-20111215">http://www.w3.org/TR/2011/WD-xhtml-rdfa-20111215</a>
|
|
</dd><dt id="bib-XML-NAMES">[XML-NAMES]</dt><dd rel="dcterms:requires">Richard Tobin; et al. <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/"><cite>Namespaces in XML 1.0 (Third Edition).</cite></a> 8 December 2009. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/">http://www.w3.org/TR/2009/REC-xml-names-20091208/</a>
|
|
</dd><dt id="bib-XML10-4e">[XML10-4e]</dt><dd rel="dcterms:requires">C. M. Sperberg-McQueen; et al. <a href="http://www.w3.org/TR/2006/REC-xml-20060816/"><cite>Extensible Markup Language (XML) 1.0 (Fourth Edition).</cite></a> 16 August 2006. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2006/REC-xml-20060816/">http://www.w3.org/TR/2006/REC-xml-20060816/</a>
|
|
</dd><dt id="bib-XMLSCHEMA-2">[XMLSCHEMA-2]</dt><dd rel="dcterms:requires">Paul V. Biron; Ashok Malhotra. <a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/"><cite>XML Schema Part 2: Datatypes Second Edition.</cite></a> 28 October 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/">http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/</a>
|
|
</dd></dl></div><div id="informative-references" typeof="bibo:Chapter" about="#informative-references" class="section"><h3><span class="secno">D.2 </span>Informative references</h3><dl class="bibliography" about=""><dt id="bib-HTML401">[HTML401]</dt><dd rel="dcterms:references">David Raggett; Ian Jacobs; Arnaud Le Hors. <a href="http://www.w3.org/TR/1999/REC-html401-19991224"><cite>HTML 4.01 Specification.</cite></a> 24 December 1999. W3C Recommendation. URL: <a href="http://www.w3.org/TR/1999/REC-html401-19991224">http://www.w3.org/TR/1999/REC-html401-19991224</a>
|
|
</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd rel="dcterms:references"><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a>
|
|
</dd><dt id="bib-QNAMES">[QNAMES]</dt><dd rel="dcterms:references">N. Walsh. <a href="http://www.w3.org/2001/tag/doc/qnameids-2004-03-17"><cite>Using Qualified Names (QNames) as Identifiers in XML Content</cite></a> 17 March, 2004. TAG Finding. URL: <a href="http://www.w3.org/2001/tag/doc/qnameids-2004-03-17">http://www.w3.org/2001/tag/doc/qnameids-2004-03-17</a>
|
|
</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd rel="dcterms:references">Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a>
|
|
</dd><dt id="bib-RDF-PRIMER">[RDF-PRIMER]</dt><dd rel="dcterms:references">Frank Manola; Eric Miller. <a href="http://www.w3.org/TR/2004/REC-rdf-primer-20040210/"><cite>RDF Primer.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-primer-20040210/">http://www.w3.org/TR/2004/REC-rdf-primer-20040210/</a>
|
|
</dd><dt id="bib-RDF-SYNTAX">[RDF-SYNTAX]</dt><dd rel="dcterms:references">Ora Lassila; Ralph R. Swick. <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222"><cite>Resource Description Framework (RDF) Model and Syntax Specification.</cite></a> 22 February 1999. W3C Recommendation. URL: <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222">http://www.w3.org/TR/1999/REC-rdf-syntax-19990222</a>
|
|
</dd><dt id="bib-RDF-TESTCASES">[RDF-TESTCASES]</dt><dd rel="dcterms:references">Jan Grant; Dave Beckett. <a href="http://www.w3.org/TR/2004/REC-rdf-testcases-20040210"><cite>RDF Test Cases.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-testcases-20040210">http://www.w3.org/TR/2004/REC-rdf-testcases-20040210</a>
|
|
</dd><dt id="bib-RDFA-PRIMER">[RDFA-PRIMER]</dt><dd rel="dcterms:references">Mark Birbeck; Ben Adida. <a href="http://www.w3.org/TR/2008/NOTE-xhtml-rdfa-primer-20081014"><cite>RDFa Primer.</cite></a> 14 October 2008. W3C Note. URL: <a href="http://www.w3.org/TR/2008/NOTE-xhtml-rdfa-primer-20081014">http://www.w3.org/TR/2008/NOTE-xhtml-rdfa-primer-20081014</a>
|
|
</dd><dt id="bib-RDFA-SYNTAX">[RDFA-SYNTAX]</dt><dd rel="dcterms:references">Ben Adida, et al. <a href="http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014"><cite>RDFa in XHTML: Syntax and Processing.</cite></a> 14 October 2008. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014">http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014</a>
|
|
</dd><dt id="bib-RELAXNG-SCHEMA">[RELAXNG-SCHEMA]</dt><dd rel="dcterms:references"><a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052348_ISO_IEC_19757-2_2008(E).zip"><cite>Information technology -- Document Schema Definition Language (DSDL) -- Part 2: Regular-grammar-based validation -- RELAX NG</cite></a>. ISO/IEC 19757-2:2008. URL: <a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052348_ISO_IEC_19757-2_2008(E).zip">http://standards.iso.org/ittf/PubliclyAvailableStandards/c052348_ISO_IEC_19757-2_2008(E).zip</a>
|
|
</dd><dt id="bib-RFC2854">[RFC2854]</dt><dd rel="dcterms:references">D. Connolly; L. Masinter. <a href="http://www.rfc-editor.org/rfc/rfc2854.txt"><cite>The 'text/html' Media Type.</cite></a> June 2000. Internet RFC 2854. URL: <a href="http://www.rfc-editor.org/rfc/rfc2854.txt">http://www.rfc-editor.org/rfc/rfc2854.txt</a>
|
|
</dd><dt id="bib-RFC3023">[RFC3023]</dt><dd rel="dcterms:references">M. Murata; S. St.Laurent; D. Kohn. <a href="http://www.ietf.org/rfc/rfc3023.txt"><cite>XML Media Types</cite></a> January 2001. Internet RFC 3023. URL: <a href="http://www.ietf.org/rfc/rfc3023.txt">http://www.ietf.org/rfc/rfc3023.txt</a>
|
|
</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd rel="dcterms:references">T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax.</cite></a> January 2005. Internet RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a>
|
|
</dd><dt id="bib-SAX">[SAX]</dt><dd rel="dcterms:references">D. Megginson, et al. <a href="http://www.megginson.com/downloads/SAX/"><cite>SAX: The Simple API for XML</cite></a>. May 1998. URL: <a href="http://www.megginson.com/downloads/SAX/"> http://www.megginson.com/downloads/SAX/</a>
|
|
</dd><dt id="bib-WEBARCH">[WEBARCH]</dt><dd rel="dcterms:references">Norman Walsh; Ian Jacobs. <a href="http://www.w3.org/TR/2004/REC-webarch-20041215/"><cite>Architecture of the World Wide Web, Volume One.</cite></a> 15 December 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-webarch-20041215/">http://www.w3.org/TR/2004/REC-webarch-20041215/</a>
|
|
</dd><dt id="bib-XHTML11">[XHTML11]</dt><dd rel="dcterms:references">Murray Altheim; Shane McCarron. <a href="http://www.w3.org/TR/2001/REC-xhtml11-20010531"><cite>XHTML™ 1.1 - Module-based XHTML.</cite></a> 31 May 2001. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2001/REC-xhtml11-20010531">http://www.w3.org/TR/2001/REC-xhtml11-20010531</a>
|
|
</dd><dt id="bib-XML-EXC-C14N">[XML-EXC-C14N]</dt><dd rel="dcterms:references">Donald E. Eastlake 3rd; Joseph Reagle; John Boyer. <a href="http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/"><cite>Exclusive XML Canonicalization Version 1.0.</cite></a> 18 July 2002. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/">http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/</a>
|
|
</dd><dt id="bib-XML10">[XML10]</dt><dd rel="dcterms:references">C. M. Sperberg-McQueen; et al. <a href="http://www.w3.org/TR/2008/REC-xml-20081126/"><cite>Extensible Markup Language (XML) 1.0 (Fifth Edition).</cite></a> 26 November 2008. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2008/REC-xml-20081126/">http://www.w3.org/TR/2008/REC-xml-20081126/</a>
|
|
</dd><dt id="bib-XMLSCHEMA-1">[XMLSCHEMA-1]</dt><dd rel="dcterms:references">Henry S. Thompson; et al. <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/"><cite>XML Schema Part 1: Structures Second Edition.</cite></a> 28 October 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/">http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/</a>
|
|
</dd></dl></div></div></body></html>
|
|
|