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.
4517 lines
211 KiB
4517 lines
211 KiB
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="http://www.w3.org/StyleSheets/TR/W3C-REC.css" type="text/css"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org" />
|
|
<title>RDFa in XHTML: Syntax and Processing</title>
|
|
<style type="text/css">
|
|
code { font-family: monospace; }
|
|
|
|
span.hilite { color: red; /* font-weight: bold */ }
|
|
|
|
div.constraint,
|
|
div.issue,
|
|
div.note,
|
|
div.notice { margin-left: 2em; }
|
|
|
|
dt.label { display: run-in; }
|
|
|
|
li p { margin-top: 0.3em;
|
|
margin-bottom: 0.3em; }
|
|
|
|
div.texample pre,
|
|
div.example pre { margin-left: 1em;
|
|
margin-top: 0em; margin-bottom: 0em}
|
|
div.texample,
|
|
div.example { background-color: #d5dee3;
|
|
border-top-width: 4px;
|
|
border-top-style: double;
|
|
border-top-color: #d3d3d3;
|
|
border-bottom-width: 4px;
|
|
border-bottom-style: double;
|
|
border-bottom-color: #d3d3d3;
|
|
padding: 4px; margin: 0em }
|
|
div.texample { background-color: #F0E68C; }
|
|
div.explanation { background-color: #ADD8E6;
|
|
width: 60%;
|
|
margin: 12px; padding: 8px; }
|
|
div.explanation li { margin-top: 8px; }
|
|
div.explanation dd { margin: 4px; }
|
|
|
|
|
|
.xmlverb-default { color: #333333; background-color: #ffffff; font-family: monospace }
|
|
.xmlverb-element-name { color: #990000 }
|
|
.xmlverb-element-nsprefix { color: #666600 }
|
|
.xmlverb-attr-name { color: #660000 }
|
|
.xmlverb-attr-content { color: #000099; font-weight: bold }
|
|
.xmlverb-ns-name { color: #666600 }
|
|
.xmlverb-ns-uri { color: #330099 }
|
|
.xmlverb-text { color: #000000; font-weight: bold }
|
|
.xmlverb-comment { color: #006600; font-style: italic }
|
|
.xmlverb-pi-name { color: #006600; font-style: italic }
|
|
.xmlverb-pi-content { color: #006666; font-style: italic }
|
|
p.issueTitle {
|
|
font-size: 150% ;
|
|
}
|
|
div.issue {
|
|
background-color: #cfc ;
|
|
border: none ;
|
|
margin-right: 5% ;
|
|
}
|
|
</style>
|
|
|
|
<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-REC.css" />
|
|
</head>
|
|
<body>
|
|
<div class="head"><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72" /></a>
|
|
|
|
<h1><a id="title" name="title"> RDFa in XHTML: Syntax and Processing</a></h1>
|
|
|
|
<h2><a id="subtitle" name="subtitle"> A collection of attributes and processing rules for extending XHTML to support RDF</a></h2>
|
|
|
|
<h2><a id="w3c-doctype" name="w3c-doctype"> W3C Recommendation 14 October 2008</a></h2>
|
|
|
|
<dl>
|
|
<dt>This version:</dt>
|
|
|
|
<dd><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>Latest version:</dt>
|
|
|
|
<dd><a href="http://www.w3.org/TR/rdfa-syntax">http://www.w3.org/TR/rdfa-syntax</a></dd>
|
|
|
|
<dt>Previous version:</dt>
|
|
|
|
<dd><a href='http://www.w3.org/TR/2008/PR-rdfa-syntax-20080904'>http://www.w3.org/TR/2008/PR-rdfa-syntax-20080904</a></dd>
|
|
|
|
<dt>Diff from previous version:</dt>
|
|
|
|
<dd><a href="rdfa-syntax-diff.html">rdfa-syntax-diff.html</a></dd>
|
|
|
|
<!-- <dt>Previous Editor's Draft:</dt>
|
|
<dd><a id='previousDraft' href='http://www.w3.org/MarkUp/2008/ED-rdfa-syntax-20080814'>http://www.w3.org/MarkUp/2008/ED-rdfa-syntax-20080814</a></dd>
|
|
|
|
<dt>Diff from previous Editor's Draft:</dt>
|
|
<dd><a href="rdfa-syntax-diff.html">rdfa-syntax-diff.html</a></dd>
|
|
-->
|
|
<dt>Editors:</dt>
|
|
|
|
<dd>Ben Adida, Creative Commons <a href="mailto:ben@adida.net"> ben@adida.net</a></dd>
|
|
|
|
<dd>Mark Birbeck, <a href="http://webBackplane.com/">webBackplane</a> <a href="mailto:mark.birbeck@webBackplane.com">mark.birbeck@webBackplane.com</a></dd>
|
|
|
|
<dd>Shane McCarron, <a href="http://www.aptest.com">Applied Testing and Technology, <abbr title="Incorporated">Inc.</abbr></a> <a href="mailto:shane@aptest.com">shane@aptest.com</a></dd>
|
|
|
|
<dd>Steven Pemberton, CWI</dd>
|
|
</dl>
|
|
|
|
<p>Please refer to the <a href="http://www.w3.org/MarkUp/2008/REC-rdfa-syntax-20081014-errata"><strong>errata</strong></a> for this document, which may include some normative corrections.</p>
|
|
|
|
<p>This document is also available in these non-normative formats: <a href="rdfa-syntax.ps">PostScript version</a>, <a href="rdfa-syntax.pdf">PDF version</a>, <a href="rdfa-syntax.zip">ZIP
|
|
archive</a>, and <a href="rdfa-syntax.tgz">Gzip'd TAR archive</a>.</p>
|
|
|
|
<p>The English version of this specification is the only normative version. Non-normative <a href="http://www.w3.org/Consortium/Translation/">translations</a> may also be available.</p>
|
|
|
|
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2007-2008 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">
|
|
W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title=
|
|
"European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <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>
|
|
</div>
|
|
|
|
<hr />
|
|
<h2><a id="abstract" name="abstract"> Abstract</a></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 is a specification for attributes to express structured data in any markup language. This document specifies how to use RDFa with XHTML. The rendered, hypertext data of XHTML is 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 [<a class="nref" href="#ref_RDF-PRIMER">RDF-PRIMER</a>],
|
|
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 use cases with microformats [<a class="nref" href="#ref_MICROFORMATS">MICROFORMATS</a>]. 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 term 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 parser, and who therefore need a detailed description of the parsing rules;</li>
|
|
|
|
<li>those looking to recommend the use of RDFa within their organisation, 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 parser 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>
|
|
|
|
<h3><a id="sec_" name="sec_"> How to Read this Document</a></h3>
|
|
|
|
<p>If you are already familiar with RDFa, and you want to examine the processing rules — perhaps to create a parser — 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 XHTML mark-up 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, so all we try to do in this document is provide enough background on RDF to make the goals of RDFa clearer.</p>
|
|
|
|
<p>And finally, 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 [<a class="nref" href=
|
|
"#ref_RDFaPRIMER">RDFaPRIMER</a>] to be a better introduction.</p>
|
|
|
|
<h2><a id="status" name="status"> Status of this Document</a></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 W3C publications and the latest revision of
|
|
this technical report can be found in the <a href="http://www.w3.org/TR/">W3C 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 is endorsed by the Director as a W3C Recommendation. It is a stable
|
|
document and may be used as reference material or cited from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread
|
|
deployment. This enhances the functionality and interoperability of the Web.</p>
|
|
|
|
<p>Members of the public are invited to send comments on this Recommendation to <a href="mailto:public-rdf-in-xhtml-tf@w3.org">public-rdf-in-xhtml-tf@w3.org</a> (with <a href=
|
|
"http://lists.w3.org/Archives/Public/public-rdf-in-xhtml-tf/">public archive</a>).</p>
|
|
|
|
<p>A <a href="http://rdfa.digitalbazaar.com/rdfa-test-harness/">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 implementations of this specification tested during the
|
|
Candidate Recommendation period. A community-maintained <a href="http://rdfa.info/rdfa-implementations/">Wiki page</a> includes subsequent updates.</p>
|
|
|
|
<p>This document has been produced jointly by the <a href="http://www.w3.org/2006/07/SWD/">Semantic Web Deployment Working Group</a> and the <a href="http://www.w3.org/MarkUp/">XHTML2 Working
|
|
Group</a> as part of the <a href="http://www.w3.org/2001/sw/">Semantic Web Activity</a> and the <a href="http://www.w3.org/MarkUp/Activity">HTML Activity</a>. It contains small editorial changes
|
|
arising from comments received during the Proposed Recommendation review; see the diff-marked version for details.</p>
|
|
|
|
<p>This document was produced by groups operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a rel="disclosure"
|
|
href="http://www.w3.org/2004/01/pp-impl/32107/status">public list of any patent disclosures</a> made in connection with the deliverables of the XHTML 2 Working Group; and also maintains a <a rel=
|
|
"disclosure" href="http://www.w3.org/2004/01/pp-impl/39408/status">public list of any patent disclosures</a> made in connection with the deliverables of the Semantic Web Deployment Working Group;
|
|
those pages also include 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 W3C Patent Policy</a>.</p>
|
|
|
|
<h1><a id="contents" name="contents"> Table of Contents</a></h1>
|
|
|
|
<div class="toc">
|
|
<ul class='toc'>
|
|
<li class='tocline'>1. <a href="#s_motivation" class="tocxref">Motivation</a></li>
|
|
|
|
<li class='tocline'>2. <a href="#s_Syntax_overview" class="tocxref">Syntax Overview</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>2.1. <a href="#rdfa-attributes" class="tocxref">The RDFa Attributes</a></li>
|
|
|
|
<li class='tocline'>2.2. <a href="#sec_2.2." class="tocxref">Examples</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>3. <a href="#s_rdfterminology" class="tocxref">RDF Terminology</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>3.1. <a href="#sec_3.1." class="tocxref">Statements</a></li>
|
|
|
|
<li class='tocline'>3.2. <a href="#sec_3.2." class="tocxref">Triples</a></li>
|
|
|
|
<li class='tocline'>3.3. <a href="#T_URI_reference" class="tocxref">URI references</a></li>
|
|
|
|
<li class='tocline'>3.4. <a href="#sec_3.4." class="tocxref">Plain literals</a></li>
|
|
|
|
<li class='tocline'>3.5. <a href="#sec_3.5." class="tocxref">Typed literals</a></li>
|
|
|
|
<li class='tocline'>3.6. <a href="#sec_3.6." class="tocxref">Turtle</a></li>
|
|
|
|
<li class='tocline'>3.7. <a href="#sec_3.7." class="tocxref">Graphs</a></li>
|
|
|
|
<li class='tocline'>3.8. <a href="#sec_3.8." class="tocxref">Compact URIs</a></li>
|
|
|
|
<li class='tocline'>3.9. <a href="#sec_3.9." class="tocxref">XHTML Fragments and RDFa</a></li>
|
|
|
|
<li class='tocline'>3.10. <a href="#sec_3.10." class="tocxref">A description of RDFa in RDF terms</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>4. <a href="#s_conformance" class="tocxref">Conformance Requirements</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>4.1. <a href="#docconf" class="tocxref">Document Conformance</a></li>
|
|
|
|
<li class='tocline'>4.2. <a href="#uaconf" class="tocxref">User Agent Conformance</a></li>
|
|
|
|
<li class='tocline'>4.3. <a href="#processorconf" class="tocxref">RDFa Processor Conformance</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>5. <a href="#s_model" class="tocxref">Processing Model</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>5.1. <a href="#sec_5.1." class="tocxref">Overview</a></li>
|
|
|
|
<li class='tocline'>5.2. <a href="#sec_5.2." class="tocxref">Evaluation Context</a></li>
|
|
|
|
<li class='tocline'>5.3. <a href="#sec_5.3." class="tocxref">Chaining</a></li>
|
|
|
|
<li class='tocline'>5.4. <a href="#s_curieprocessing" class="tocxref">CURIE and URI Processing</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>5.4.1. <a href="#sec_5.4.1." class="tocxref">Scoping of Prefix Mappings</a></li>
|
|
|
|
<li class='tocline'>5.4.2. <a href="#s_convertingcurietouri" class="tocxref">Converting a CURIE to a URI</a></li>
|
|
|
|
<li class='tocline'>5.4.3. <a href="#sec_5.4.3." class="tocxref">General Use of CURIEs in Attributes</a></li>
|
|
|
|
<li class='tocline'>5.4.4. <a href="#sec_5.4.4." class="tocxref">Use of CURIEs in Specific Attributes</a></li>
|
|
|
|
<li class='tocline'>5.4.5. <a href="#sec_5.4.5." class="tocxref">Referencing Blank Nodes</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>5.5. <a href="#sec_5.5." class="tocxref">Sequence</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>6. <a href="#s_rdfaindetail" class="tocxref">RDFa Processing in detail</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>6.1. <a href="#sec_6.1." class="tocxref">Changing the evaluation context</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>6.1.1. <a href="#sec_6.1.1." class="tocxref">Setting the current subject</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>6.2. <a href="#s_Completing_Incomplete_Triples" class="tocxref">Completing 'incomplete triples'</a></li>
|
|
|
|
<li class='tocline'>6.3. <a href="#sec_6.3." class="tocxref">Object resolution</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>6.3.1. <a href="#sec_6.3.1." class="tocxref">Literal object resolution</a></li>
|
|
|
|
<li class='tocline'>6.3.2. <a href="#sec_6.3.2." class="tocxref">URI object resolution</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>7. <a href="#s_curies" class="tocxref">CURIE Syntax Definition</a></li>
|
|
|
|
<li class='tocline'>8. <a href="#s_xhtmlrdfa" class="tocxref">XHTML+RDFa Definition</a></li>
|
|
|
|
<li class='tocline'>9. <a href="#s_metaAttributes" class="tocxref">Metainformation Attributes Module</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>9.1. <a href="#sec_9.1." class="tocxref">Datatypes</a></li>
|
|
|
|
<li class='tocline'>9.2. <a href="#col_Metainformation" class="tocxref">Metainformation Attributes Collection</a></li>
|
|
|
|
<li class='tocline'>9.3. <a href="#relValues" class="tocxref">@rel/@rev attribute values</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>A. <a href="#a_xhtmlrdfa_dtd" class="tocxref">XHTML+RDFa DTD</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>A.1. <a href="#a_DTD_xhtml_metaAttributes_module" class="tocxref">XHTML Metainformation Attributes Module</a></li>
|
|
|
|
<li class='tocline'>A.2. <a href="#a_DTD_content_model" class="tocxref">XHTML+RDFa Content Model Module</a></li>
|
|
|
|
<li class='tocline'>A.3. <a href="#a_DTD_driver" class="tocxref">XHTML+RDFa Driver Module</a></li>
|
|
|
|
<li class='tocline'>A.4. <a href="#a_xhtml11_catalog" class="tocxref">SGML Open Catalog Entry for XHTML+RDFa</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>B. <a href="#s_datatypes" class="tocxref">CURIE Datatypes</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>B.1. <a href="#sec_B.1." class="tocxref">XML Schema Definition</a></li>
|
|
|
|
<li class='tocline'>B.2. <a href="#sec_B.2." class="tocxref">XML DTD Definition</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>C. <a href="#a_deployment" class="tocxref">Deployment Advice</a></li>
|
|
|
|
<li class='tocline'>D. <a href="#a_references" class="tocxref">References</a>
|
|
|
|
<ul class="toc">
|
|
<li class='tocline'>D.1. <a href="#sec_D.1." class="tocxref">Related Specifications</a></li>
|
|
|
|
<li class='tocline'>D.2. <a href="#sec_D.2." class="tocxref">Other References</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class='tocline'>E. <a href="#a_history" class="tocxref">Change History</a></li>
|
|
|
|
<li class='tocline'>F. <a href="#a_acks" class="tocxref">Acknowledgments</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="s_motivation" name="s_motivation">1. Motivation</a></h1>
|
|
|
|
<p><em>This section is informative.</em></p>
|
|
|
|
<p>RDF/XML [<a class="nref" href="#ref_RDF-SYNTAX">RDF-SYNTAX</a>] provides sufficient flexibility to represent all of the abstract concepts in RDF [<a class="nref" href=
|
|
"#ref_RDF-CONCEPTS">RDF-CONCEPTS</a>]. 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 [<a class="nref" href="#ref_RELAXNG">RELAXNG</a>] 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 [<a class="nref" href="#ref_XHTML11">XHTML11</a>] and
|
|
HTML [<a class="nref" href="#ref_HTML4">HTML4</a>] 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 a parser 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. The <em>values</em> of those
|
|
properties are in most cases the information that is already in an author's XHTML document.</p>
|
|
|
|
<p>RDFa alleviates the pressure on XML format authors to anticipate all the structural requirements users of their format might have, by outlining a new syntax for RDF that relies only on XML
|
|
attributes. This specification deals specifically with the use of RDFa in XHTML, and defines an RDF mapping for a number of XHTML attributes, but RDFa can be easily imported into other XML-based
|
|
markup languages.</p>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="s_Syntax_overview" name="s_Syntax_overview">2. Syntax Overview</a></h1>
|
|
|
|
<p><em>This section is informative.</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 [<a class=
|
|
"nref" href="#ref_RDFaPRIMER">RDFaPRIMER</a>].</p>
|
|
|
|
<p>For brevity, in the following examples and throughout this document, assume that the following vocabulary prefixes have been defined:</p>
|
|
|
|
<table>
|
|
<tr>
|
|
<td rowspan="1" colspan="1">biblio:</td>
|
|
<td rowspan="1" colspan="1">http://example.org/biblio/0.1</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">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/elements/1.1/</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">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>
|
|
</table>
|
|
|
|
<h2><a id="rdfa-attributes" name="rdfa-attributes">2.1. The RDFa Attributes</a></h2>
|
|
|
|
<p>RDFa in XHTML makes use of a number of XHTML attributes, as well as providing a few new ones. Attributes that already exist in XHTML will have the same meaning as in XHTML, although their syntax
|
|
may be slightly modified. For example, in XHTML, <span class="aref">@rel</span> already defines the relationship between one document and another. However, in XHTML there is no clear way to add new
|
|
values; RDFa sets out to explicitly solve this problem, and does so by allowing URIs as values. It also introduces the idea of 'compact URIs'—referred to as CURIEs in this document—which
|
|
allow a full URI value to be expressed succinctly.</p>
|
|
|
|
<p>The XHTML attributes that are relevant are:</p>
|
|
|
|
<dl>
|
|
<dt><span class="aref">@rel</span></dt>
|
|
|
|
<dd>a whitespace separated list of <span class="datatype"><a href="#dt_curie">CURIE</a></span>s, used for expressing relationships between two resources ('predicates' in RDF terminology);</dd>
|
|
|
|
<dt><span class="aref">@rev</span></dt>
|
|
|
|
<dd>a whitespace separated list of <span class="datatype"><a href="#dt_curie">CURIE</a></span>s, used for expressing reverse relationships between two resources (also 'predicates');</dd>
|
|
|
|
<dt><span class="aref">@content</span></dt>
|
|
|
|
<dd>a string, for supplying machine-readable content for a literal (a 'plain literal object', in RDF terminology);</dd>
|
|
|
|
<dt><span class="aref">@href</span></dt>
|
|
|
|
<dd>a <span class="datatype"><a href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_URI">URI</a></span> for expressing the partner resource of a relationship (a 'resource object', in
|
|
RDF terminology);</dd>
|
|
|
|
<dt><span class="aref">@src</span></dt>
|
|
|
|
<dd>a <span class="datatype"><a href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_URI">URI</a></span> for expressing the partner resource of a relationship when the resource is
|
|
embedded (also a 'resource object').</dd>
|
|
</dl>
|
|
|
|
<p>The new—RDFa-specific—attributes are:</p>
|
|
|
|
<dl>
|
|
<dt><span class="aref">@about</span></dt>
|
|
|
|
<dd>a <span class="datatype"><a href="#dt_uriorsafecurie">URIorSafeCURIE</a></span>, used for stating what the data is about (a 'subject' in RDF terminology);</dd>
|
|
|
|
<dt><span class="aref">@property</span></dt>
|
|
|
|
<dd>a whitespace separated list of <span class="datatype"><a href="#dt_curie">CURIE</a></span>s, used for expressing relationships between a subject and some literal text (also a 'predicate');</dd>
|
|
|
|
<dt><span class="aref">@resource</span></dt>
|
|
|
|
<dd>a <span class="datatype"><a href="#dt_uriorsafecurie">URIorSafeCURIE</a></span> for expressing the partner resource of a relationship that is not intended to be 'clickable' (also an
|
|
'object');</dd>
|
|
|
|
<dt><span class="aref">@datatype</span></dt>
|
|
|
|
<dd>a <span class="datatype"><a href="#dt_curie">CURIE</a></span> representing a datatype, to express the datatype of a literal;</dd>
|
|
|
|
<dt><span class="aref">@typeof</span></dt>
|
|
|
|
<dd>a whitespace separated list of <span class="datatype"><a href="#dt_curie">CURIE</a></span>s that indicate the RDF type(s) to associate with a subject.</dd>
|
|
</dl>
|
|
|
|
<p><em>For a normative definition of these attributes see the <a href="#s_metaAttributes">XHTML Metainformation Attributes Module</a>.</em></p>
|
|
|
|
<h2><a id="sec_2.2." name="sec_2.2.">2.2. Examples</a></h2>
|
|
|
|
<p>As an XHTML author you will already be familiar with using <code>meta</code> and <code>link</code> to add additional information to your documents:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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>
|
|
</div>
|
|
|
|
<p>RDFa makes use of this concept, enhancing it with the ability to make use of other vocabularies by using compact URIs:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<html
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
<span class='hilite'>xmlns:foaf="http://xmlns.com/foaf/0.1/"</span>
|
|
<span class='hilite'>xmlns:dc="http://purl.org/dc/elements/1.1/"</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.formsPlayer.com/#us" />
|
|
</head>
|
|
<body>...</body>
|
|
</html>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Although not widely used, XHTML already supports the use of <span class="aref">@rel</span> and <span class="aref">@rev</span> on the <code>a</code> element. This becomes more useful in RDFa with
|
|
the addition of support for different vocabularies:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
This document is licensed under a
|
|
<a <span class='hilite'>xmlns: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 License
|
|
</a>.
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Not only can URLs in the document be re-used to provide metadata, but so can inline text:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<html
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
<span class='hilite'>xmlns: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>
|
|
</div>
|
|
|
|
<p>If some displayed text is different to the actual 'value' it represents, more precise values can be added, which can optionally include datatypes:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<html
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:cal="http://www.w3.org/2002/12/cal/ical#"
|
|
<span class='hilite'>xmlns: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="2007-09-16T16:00:00-05:00"</span>
|
|
<span class='hilite'>datatype="xsd:dateTime"</span>>
|
|
September 16th at 4pm
|
|
</span>.
|
|
</p>
|
|
</body>
|
|
</html>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>In many cases a block of mark-up will contain a number of properties that relate to the same item; it's possible with RDFa to indicate the type of that item:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<html
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:cal="http://www.w3.org/2002/12/cal/ical#"
|
|
xmlns: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="2007-09-16T16:00:00-05:00"
|
|
datatype="xsd:dateTime">
|
|
September 16th at 4pm
|
|
</span>.
|
|
</p>
|
|
</body>
|
|
</html>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>The metadata features available in XHTML only allow information to be expressed about the document itself. RDFa allows the document to contain metadata information about other documents and
|
|
resources:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<html
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:biblio="http://example.org/"
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
>
|
|
<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="biblio: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="biblio:book"</span>
|
|
<span class='hilite'>property="dc:description"</span>>
|
|
White's autobiography
|
|
</span>.
|
|
</body>
|
|
</html>
|
|
</pre>
|
|
</div>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="s_rdfterminology" name="s_rdfterminology">3. RDF Terminology</a></h1>
|
|
|
|
<p><em>This section is informative.</em></p>
|
|
|
|
<p> The previous section gave examples of typical mark-up in order to illustrate what RDFa in XHTML looks like. But what RDFa in XHTML <em>represents</em> is RDF. In order to author RDFa in XHTML 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 an RDFa in XHTML document you will almost certainly need to
|
|
understand RDF. In this section we introduce the basic concepts and terminology of RDF. For a more thorough explanation of RDF, please refer to the RDF Concepts document [<a class="nref" href=
|
|
"#ref_RDF-CONCEPTS">RDF-CONCEPTS</a>] and the RDF Sytax Document [<a class="nref" href="#ref_RDF-SYNTAX">RDF-SYNTAX</a>].</p>
|
|
|
|
<h2><a id="sec_3.1." name="sec_3.1.">3.1. Statements</a></h2>
|
|
|
|
<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>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
Albert was born on March 14, 1879, in Germany. There is a picture of him at
|
|
the web address, http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.
|
|
</pre>
|
|
</div>
|
|
|
|
<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>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
Albert was born on March 14, 1879.
|
|
Albert was born in Germany.
|
|
Albert has a picture at
|
|
http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.
|
|
</pre>
|
|
</div>
|
|
|
|
<h2><a id="sec_3.2." name="sec_3.2.">3.2. Triples</a></h2>
|
|
|
|
<p> To make this information machine-processable, RDF defines a structure for these statements. A statement is formally called a [<span class="tdef" id="T_triple"><em>triple</em></span>], 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', 'Germany', and
|
|
'http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg'.</p>
|
|
|
|
<h2><a id="T_URI_reference" name="T_URI_reference">3.3. URI references</a></h2>
|
|
|
|
<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 Germany, 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 <em>
|
|
URI references</em>.</p>
|
|
|
|
<p> URIs 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>] URI for Albert Einstein, instead of the ambiguous string 'Albert':</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<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
|
|
Germany.
|
|
<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>
|
|
</div>
|
|
|
|
<p> URI references are also used to uniquely identify the objects in metadata statements (the third part of each triple). The picture of Einstein is already a URI, but we could also use a URI to
|
|
uniquely identify the country Germany. At the same time we'll indicate that the name and date of birth really are literals (and not URIs), by putting quotes around them:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<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/Germany></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>
|
|
</div>
|
|
|
|
<p> URI 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>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<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/Germany>.
|
|
<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>
|
|
|
|
<h2><a id="sec_3.4." name="sec_3.4.">3.4. Plain literals</a></h2>
|
|
|
|
<p> Although URI resources are always used for subjects and predicates, the object part of a triple can be either a URI or a [<span class="tdef" id="T_literal"><em>literal</em></span>]. In the
|
|
example triples, Einstein's name is represented by a [<span class="tdef" id="T_plain_literal"><em>plain literal</em></span>], which means that it is a basic string with no type or language
|
|
information:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
<http://xmlns.com/foaf/0.1/name> <span class='hilite'>"Albert Einstein"</span>.
|
|
</pre>
|
|
</div>
|
|
|
|
<h2><a id="sec_3.5." name="sec_3.5.">3.5. Typed literals</a></h2>
|
|
|
|
<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 [<span class="tdef" id="T_typed_literal"><em>typed
|
|
literal</em></span>] is indicated by attaching a URI to the end of a [<a href="#T_plain_literal" class="tref">plain literal</a>], and this URI indicates the literal's datatype. This URI is usually
|
|
based on datatypes defined in the XML Schema Datatypes specification [<a class="nref" href="#ref_XMLSCHEMA">XMLSCHEMA</a>]. 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>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<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>
|
|
|
|
<h2><a id="sec_3.6." name="sec_3.6.">3.6. Turtle</a></h2>
|
|
|
|
<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 URIs, and <em>not</em> any particular syntax. However, there are a number of
|
|
mechanisms for expressing triples, such as RDF/XML, Turtle [<a class="nref" href="#ref_TURTLE">TURTLE</a>], 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 URIs to be abbreviated by using a URI mapping, which can be used to express a compact URI as follows:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
@prefix dbp: <http://dbpedia.org/property/> .
|
|
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
<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/Germany> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Here 'dbp:' has been mapped to the URI for DBPedia and 'foaf:' has been mapped to the URI for the 'Friend of a Friend' taxonomy.</p>
|
|
|
|
<p>Any URI 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>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
@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>
|
|
</div>
|
|
|
|
<p> When writing examples, you will often see the following URI in the Turtle representation:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> This indicates the 'current document', i.e., the document being processed. In reality there would always be a full URI 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 URIs.</p>
|
|
|
|
<h2><a id="sec_3.7." name="sec_3.7.">3.7. Graphs</a></h2>
|
|
|
|
<p> A collection of triples is called a <em>graph</em>.</p>
|
|
|
|
<p> For more information on the concepts described above, see [<a class="nref" href="#ref_RDF-CONCEPTS">RDF-CONCEPTS</a>]. RDFa additionally defines the following terms:</p>
|
|
|
|
<h2><a id="sec_3.8." name="sec_3.8.">3.8. Compact URIs</a></h2>
|
|
|
|
<p>In order to allow for the compact expression of RDF statements, RDFa allows the contraction of all [<a href="#T_URI_reference" class="tref">URI reference</a>]s into a form called a 'compact URI',
|
|
or <span class="datatype"><a href="#dt_curie">CURIE</a></span>. A detailed discussion of this mechanism is in section <a href="#s_curieprocessing">CURIE and URI Processing</a>.</p>
|
|
|
|
<p>Note that CURIEs are only used in the mark-up and Turtle examples, and will never appear in the generated [<a href="#T_triple" class="tref">triple</a>]s, which are defined in RDF to use [<a href=
|
|
"#T_URI_reference" class="tref">URI reference</a>]s.</p>
|
|
|
|
<p>Full details on how CURIEs are processed is in the section titled <a href="#s_curieprocessing">CURIE Processing</a>.</p>
|
|
|
|
<h2><a id="sec_3.9." name="sec_3.9.">3.9. XHTML Fragments and RDFa</a></h2>
|
|
|
|
<p>A growing use of embedded metadata is to take fragments of mark-up 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 licensing fragment provided by Creative Commons.)</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 of XHTML+RDFa should be
|
|
processed whilst they are 'outside' of a complete XHTML+RDFa document (although future versions of this or related specifications may do so).</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 an XHTML+RDFa document,
|
|
and are advised to carefully consider the amount of 'context' information that will be needed in order to ensure a correct interpretation of their fragment.</p>
|
|
|
|
<h2><a id="sec_3.10." name="sec_3.10.">3.10. A description of RDFa in RDF terms</a></h2>
|
|
|
|
<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 href="#T_RDF_graph" class="tref">RDF graph</a>] to be carried in various types of document mark-up. However, this specification deals only with RDFa in
|
|
XHTML. An [<span class="tdef" id="T_RDF_graph">RDF graph</span>] comprises [<span class="tdef" id="T_node">node</span>]s linked by relationships. The basic unit of an [<a href="#T_RDF_graph" class=
|
|
"tref">RDF graph</a>] is a [<a href="#T_triple" class="tref">triple</a>], in which a subject [<a href="#T_node" class="tref">node</a>] is linked to an object [<a href="#T_node" class="tref">node</a>]
|
|
via a [<a href="#T_predicate" class="tref">predicate</a>]. The [<span class="tdef" id="T_subject">subject</span>] [<a href="#T_node" class="tref">node</a>] is always either a [<a href=
|
|
"#T_URI_reference" class="tref">URI reference</a>] or a [<span class="tdef" id="T_bnode">blank node (or bnode)</span>], the [<span class="tdef" id="T_predicate">predicate</span>] is <em>always</em> a
|
|
[<a href="#T_URI_reference" class="tref">URI reference</a>], and the object of a statement can be a [<a href="#T_URI_reference" class="tref">URI reference</a>], a [<a href="#T_literal" class=
|
|
"tref">literal</a>], or a [<a href="#T_bnode" class="tref">bnode</a>].</p>
|
|
|
|
<p>In RDFa, a subject [<a href="#T_URI_reference" class="tref">URI reference</a>] is generally indicated using <span class="aref">@about</span>, and predicates are represented using one of <span
|
|
class="aref">@property</span>, <span class="aref">@rel</span>, or <span class="aref">@rev</span>. Objects which are [<a href="#T_URI_reference" class="tref">URI reference</a>]s are represented using
|
|
<span class="aref">@href</span>, <span class="aref">@resource</span> or <span class="aref">@src</span>, whilst objects that are [<a href="#T_literal" class="tref">literal</a>]s are represented either
|
|
with <span class="aref">@content</span> or the content of the element in question (with an optional datatype expressed using <span class="aref">@datatype</span>).</p>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="s_conformance" name="s_conformance">4. Conformance Requirements</a></h1>
|
|
|
|
<p><em>This section is normative.</em></p>
|
|
|
|
<p>The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [<a class="nref" href=
|
|
"#ref_RFC2119">RFC2119</a>].</p>
|
|
|
|
<p>Note that all examples in this document are informative, and are not meant to be interpreted as normative requirements.</p>
|
|
|
|
<h2><a id="docconf" name="docconf">4.1. Document Conformance</a></h2>
|
|
|
|
<p>A strictly conforming XHTML+RDFa document is a document that requires only the facilities described as mandatory in this specification. Such a document satisfies the following criteria:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p><span class="must">The document MUST conform to the constraints expressed in the schemas in <!--
|
|
<a href="xhtml11_schema.html#a_xhtml11_schema">Appendix D -
|
|
XHTML 1.1 Schema</a> and
|
|
--> <a href="#a_xhtmlrdfa_dtd">Appendix A - XHTML+RDFa Document Type Definition</a>.</span></p>
|
|
</li>
|
|
|
|
<li>
|
|
<p><span class="must">The local part of the root element of the document MUST be <code>html</code>.</span></p>
|
|
</li>
|
|
|
|
<li>
|
|
<p><span class="must">The start tag of the root element of the document MUST explicitly contain a default namespace declaration for the XHTML namespace [<a class="nref" href="#ref_XMLNS">XMLNS</a>].
|
|
The namespace URI for XHTML is defined to be <code>http://www.w3.org/1999/xhtml</code>.</span></p>
|
|
|
|
<div class="example">
|
|
<p>Sample root element</p>
|
|
|
|
<pre>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
|
</pre>
|
|
</div>
|
|
</li>
|
|
|
|
<li><span class="should">There SHOULD be a <span class="aref">@version</span> attribute on the <code>html</code> element with the value "<code>XHTML+RDFa 1.0</code>"</span></li>
|
|
</ol>
|
|
|
|
<div class="example">
|
|
<p>Example of an XHTML+RDFa 1.0 document</p>
|
|
|
|
<pre>
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<<span class='hilite'>html</span> <span class='hilite'>xmlns="http://www.w3.org/1999/xhtml"</span>
|
|
<span class='hilite'>version="XHTML+RDFa 1.0"</span>
|
|
xml:lang="en">
|
|
<head>
|
|
<title>Virtual Library</title>
|
|
</head>
|
|
<body>
|
|
<p>Moved to <a href="http://example.org/">example.org</a>.</p>
|
|
</body>
|
|
</html>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Note that in this example, the XML declaration is included. An XML declaration like the one above is not required in all XML documents. <span class="should">XHTML document authors SHOULD use XML
|
|
declarations in all their documents.</span> <span class="must">XHTML document authors MUST use an XML declaration when the character encoding of the document is other than the default UTF-8 or UTF-16
|
|
and no encoding is specified by a higher-level protocol.</span></p>
|
|
|
|
<p><span class="should">XHTML+RDFa documents SHOULD be labeled with the Internet Media Type "application/xhtml+xml" as defined in [<a class="nref" href="#ref_RFC3236">RFC3236</a>]</span>. For further
|
|
information on using media types with XHTML family markup languages, see the informative note [<a class="nref" href="#ref_XHTMLMIME">XHTMLMIME</a>].</p>
|
|
|
|
<h2><a id="uaconf" name="uaconf">4.2. User Agent Conformance</a></h2>
|
|
|
|
<p><span class="must">A conforming user agent MUST support all of the features required in this specification.</span> <span class="must">A conforming user agent must also support the User Agent
|
|
conformance requirements as defined in XHTML Modularization [<a class="nref" href="#ref_XHTMLMOD">XHTMLMOD</a>] section on "XHTML Family User Agent Conformance".</span></p>
|
|
|
|
<h2><a id="processorconf" name="processorconf">4.3. RDFa Processor Conformance</a></h2>
|
|
|
|
<p><span class="must">A conforming RDFa Processor MUST make available to a consuming application a single [<a href="#T_RDF_graph" class="tref">RDF graph</a>] containing all possible triples generated
|
|
by using the rules in the <a href="#s_model">Processing Model</a> section.</span> This specification uses the term [<span class="tdef" id="T_default_graph">default graph</span>] to mean all of the
|
|
triples asserted by a document according to the <a href="#s_model">Processing Model</a> section.</p>
|
|
|
|
<p><span class="must">A conforming RDFa Processor MAY make available additional triples that have been generated using rules not described here, but these triples MUST NOT be made available in the
|
|
[<a href="#T_default_graph" class="tref">default graph</a>].</span> (Whether these additional triples are made available in one or more additional [<a href="#T_RDF_graph" class="tref">RDF graph</a>]s
|
|
is implementation-specific, and therefore not defined here.)</p>
|
|
|
|
<p><span class="must">Since XHTML+RDFa is based upon XHTML Modularization [<a class="nref" href="#ref_XHTMLMOD">XHTMLMOD</a>], and since XHTML Modularization requires that whitespace is preserved,
|
|
conforming processors must preserve whitespace in both [<a href="#T_plain_literal" class="tref">plain literal</a>]s and [<a href="#s_xml_literals" class="tref">XML literals</a>].</span> However, it
|
|
may be the case that the architecture in which a processor operates does not make all whitespace available. It is therefore advisable for authors who would like to make their documents consumable
|
|
across different processors, to remove any unnecessary whitespace in their mark-up.</p>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="s_model" name="s_model">5. Processing Model</a></h1>
|
|
|
|
<p><em>This section is normative.</em></p>
|
|
|
|
<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 XHTML+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 href="#T_evaluation_context" class="tref">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>
|
|
|
|
<h2><a id="sec_5.1." name="sec_5.1.">5.1. Overview</a></h2>
|
|
|
|
<p> Parsing 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> (Note that in some environments there will be little difference between starting at the root element of the document, and starting at the document object itself. However, we define it this way
|
|
since 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 href="#T_evaluation_context" class="tref">evaluation context</a>] information that will then be
|
|
used when processing descendant elements.</p>
|
|
|
|
<p> Note that we don't 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 conformant,
|
|
an RDFa processor needs to act as if at a minimum the rules in this section are applied, and a single [RDF graph] produced. As described in the <a href="#processorconf">RDFa Processor Conformance</a>
|
|
section, any additional triples generated MUST NOT appear in the [<a href="#T_default_graph" class="tref">default graph</a>].</p>
|
|
|
|
<h2><a id="sec_5.2." name="sec_5.2.">5.2. Evaluation Context</a></h2>
|
|
|
|
<p> During processing, each rule is applied using information provided by an [<a href="#T_evaluation_context" class="tref">evaluation context</a>]. An initial context is created when processing
|
|
begins, with the following set of values:</p>
|
|
|
|
<ul>
|
|
<li>The [<span class="tdef" id="T_base">base</span>]. This will usually be the URL of the document being processed, but it could be some other URL, set by some other mechanism, such as the XHTML
|
|
<code>base</code> element. The important thing is that it establishes a URL against which relative paths can be resolved.</li>
|
|
|
|
<li>The [<span class="tdef" id="T_parent_subject">parent subject</span>]. The initial value will be the same as the initial value of [<a href="#T_base" class="tref">base</a>], but it will usually
|
|
change during the course of processing.</li>
|
|
|
|
<li>The [<span class="tdef" id="T_parent_object">parent object</span>]. 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 bnode, since in some situations a number of nested statements are grouped together on one bnode. This means that the bnode 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 [<a href="#T_list_of_URI_mappings" class="tref">URI mappings</a>].</li>
|
|
|
|
<li>A list of [<span class="tdef" id="T_incomplete_triple">incomplete triple</span>]s. A triple can be incomplete when no object resource is provided alongside a predicate that requires a resource
|
|
(i.e., <span class="aref">@rel</span> or <span class="aref">@rev</span>). 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 href="#T_chaining" class="tref">chaining</a>]).</li>
|
|
|
|
<li>The [<span class="tdef" id="T_language">language</span>]. Note that there is no default language.</li>
|
|
</ul>
|
|
|
|
<p>During the course of processing new [<a href="#T_evaluation_context" class="tref">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 href=
|
|
"#T_evaluation_context" class="tref">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 href="#T_URI_mapping" class="tref">URI mapping</a>]s, called the [<span class="tdef" id="T_local_list_of_URI_mappings">local list of URI mappings</span>].</li>
|
|
|
|
<li>An initially empty [<span class="tdef" id="T_list_of_incomplete_triples">list of incomplete triples</span>], called the [<span class="tdef" id="T_local_list_of_incomplete_triples">local list of
|
|
incomplete triples</span>].</li>
|
|
|
|
<li>An initially empty [<a href="#T_language" class="tref">language</a>] value.</li>
|
|
|
|
<li>A [<span class="tdef" id="T_recurse">recurse</span>] 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 [<span class="tdef" id="T_skip_element">skip element</span>] flag, which indicates whether the [<a href="#T_current_element" class="tref">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 [<span class="tdef" id="T_new_subject">new subject</span>] value, which once calculated will set the [<a href="#T_parent_subject" class="tref">parent subject</a>] property in an [<a href=
|
|
"#T_evaluation_context" class="tref">evaluation context</a>], as well as being used to complete any [<a href="#T_incomplete_triple" class="tref">incomplete triple</a>]s, as described in the next
|
|
section.</li>
|
|
|
|
<li>A value for the [<span class="tdef" id="T_current_object_literal">current object literal</span>], the literal to use when creating triples that have a literal object.</li>
|
|
|
|
<li>A value for the [<span class="tdef" id="T_current_object_resource">current object resource</span>], the resource to use when creating triples that have a resource object.</li>
|
|
</ul>
|
|
|
|
<h2><a id="sec_5.3." name="sec_5.3.">5.3. Chaining</a></h2>
|
|
|
|
<p>RDFa has the notion of [<span class="tdef" id="T_chaining">chaining</span>] which aims to combine statements together in as intuitive a way as possible, so as avoid unnecessary repetition of
|
|
mark-up. 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>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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/Germany"</span>>
|
|
<span class='hilite'><span property="dbp:conventionalLongName">Federal Republic of Germany</span></span>
|
|
</div>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> In this example we can see that an object resource ('Germany'), has become the subject for nested statements. This mark-up also illustrates the basic chaining pattern of 'A has a B has a C'
|
|
(i.e., Einstein has a birth place of Germany, which has a long name of "Federal Republic of Germany").</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 both German and American
|
|
citizenship:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<span class='hilite'><div rel="dbp:citizenship" resource="http://dbpedia.org/resource/Germany"></div></span>
|
|
<span class='hilite'><div rel="dbp:citizenship" resource="http://dbpedia.org/resource/United_States"></div></span>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Now, we show the same information, but this time we create an [<a href="#T_incomplete_triple" class="tref">incomplete triple</a>] from the citizenship part, and then use any number of further
|
|
subjects to 'complete' that triple, as follows:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Albert_Einstein" rel="dbp:citizenship">
|
|
<span class='hilite'><span about="http://dbpedia.org/resource/Germany"></span></span>
|
|
<span class='hilite'><span about="http://dbpedia.org/resource/United_States"></span></span>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> In this example, the [<a href="#T_incomplete_triple" class="tref">incomplete triple</a>] actually gets completed twice, once for Germany and once for the USA, giving exactly the same information
|
|
as we had in the earlier example:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
dbp:citizenship <http://dbpedia.org/resource/Germany> .
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
dbp:citizenship <http://dbpedia.org/resource/United_States> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Chaining can sometimes involve elements containing relatively minimal mark-up, 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>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<div rel="foaf:depiction">
|
|
<img src="http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg" />
|
|
</div>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> When such minimal mark-up is used, any of the resource-related attributes could act as a subject or an object in the chaining:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Albert_Einstein">
|
|
<div rel="dbp:citizenship">
|
|
<span about="http://dbpedia.org/resource/Germany"></span>
|
|
<span about="http://dbpedia.org/resource/United_States"></span>
|
|
</div>
|
|
</div>
|
|
|
|
</pre>
|
|
</div>
|
|
|
|
<h2><a id="s_curieprocessing" name="s_curieprocessing">5.4. CURIE and URI Processing</a></h2>
|
|
|
|
<p> Since RDFa is ultimately a means for transporting RDF, then a key concept is the <em>resource</em> and its manifestation as a URI. Since RDF deals with complete URIs (not relative paths), then
|
|
when converting RDFa to triples, any relative URIs will need to be resolved relative to the base URI, using the algorithm defined in section 5 of RFC 3986 [<a class="nref" href="#ref_URI">URI</a>],
|
|
<em>Reference Resolution</em>.</p>
|
|
|
|
<p> Many of the attributes that hold URIs are also able to carry 'compact URIs' or CURIEs. A CURIE is a convenient way to represent a long URI, by replacing a leading section of the URI with a
|
|
substitution token. It's possible for authors to define a number of substitution tokens as they see fit; the full URI is obtained by locating the mapping defined by a token from a list of in-scope
|
|
tokens, and then simply concatenating the second part of the CURIE onto the mapped value.</p>
|
|
|
|
<p>For example, the full URI for Albert Einstein on DPPedia is:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
http://dbpedia.org/resource/Albert_Einstein
|
|
</pre>
|
|
</div>
|
|
|
|
<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 URI. In RDFa these mappings are expressed using the XML namespace syntax:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div <span class='hilite'>xmlns:db="http://dbpedia.org/"</span>>
|
|
...
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Once the prefix has been established, an author can then use it to shorten a URI as follows:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div xmlns:db="http://dbpedia.org/">
|
|
<div about="<span class='hilite'>[db:resource/Albert_Einstein]</span>">
|
|
...
|
|
</div>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> The author is free to break the URI 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>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div <span class='hilite'>xmlns: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>
|
|
|
|
<h3><a id="sec_5.4.1." name="sec_5.4.1.">5.4.1. Scoping of Prefix Mappings</a></h3>
|
|
|
|
<p> Since CURIE mappings are created by authors via the XML namespace syntax [<a class="nref" href="#ref_XMLNS">XMLNS</a>] an RDFa processor MUST take into account the hierarchical nature of prefix
|
|
declarations. For example, the URIs expressed by the following two CURIEs are different, despite the common prefix, because the prefix mappings are locally scoped:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div <span class='hilite'>xmlns:dbr="http://dbpedia.org/resource/"</span>>
|
|
<div about="<span class='hilite'>[dbr:Albert_Einstein]</span>">
|
|
...
|
|
</div>
|
|
</div>
|
|
<div <span class='hilite'>xmlns:dbr="http://someotherdb.org/resource/"</span>>
|
|
<div about="<span class='hilite'>[dbr:Albert_Einstein]</span>">
|
|
...
|
|
</div>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<h3><a id="s_convertingcurietouri" name="s_convertingcurietouri">5.4.2. Converting a CURIE to a URI</a></h3>
|
|
|
|
<p> Since a CURIE is merely a means for abbreviating a URI, its <em>value</em> is a URI, rather than the abbreviated form. Obtaining a URI from a CURIE involves the following steps:</p>
|
|
|
|
<ol>
|
|
<li>Split the CURIE at the colon to obtain the prefix and the resource.</li>
|
|
|
|
<li>Using the prefix and the current in-scope mappings, obtain the URI that the prefix maps to.</li>
|
|
|
|
<li>Concatenate the mapped URI with the resource value, to obtain an absolute URI.</li>
|
|
</ol>
|
|
|
|
<div class="explanation">Note that it is generally considered a good idea not to use relative paths in namespace declarations, but since it is possible that an author may ignore this guidance, it is
|
|
further possible that the URI obtained from a CURIE is relative. However, since all URIs must be resolved relative to [<a href="#T_base" class="tref">base</a>] before being used to create triples,
|
|
the use of relative paths should not have any effect on processing.</div>
|
|
|
|
<h3><a id="sec_5.4.3." name="sec_5.4.3.">5.4.3. General Use of CURIEs in Attributes</a></h3>
|
|
|
|
<p> There are a number of ways that attributes will make use of CURIEs, and they need to be dealt with differently. These are:</p>
|
|
|
|
<ol>
|
|
<li>An attribute may allow one or more CURIE-only values, disallowing other types of value. In this case any value that is not a 'curie' according to the definition in the section <a href=
|
|
"#s_curies">CURIE Syntax Definition</a> MUST be ignored; this means that not only will there be no error reporting, but also the RDFa processor should act as if the value simply did not exist.</li>
|
|
|
|
<li>An attribute may allow one or more values that are a mixture of CURIEs and full URIs. In this case any value that is not surrounded by square brackets, as defined by 'safe_curie' in the section
|
|
<a href="#s_curies">CURIE Syntax Definition</a>, will be processed as if it was a URI. If the value <em>is</em> surrounded by square brackets, then the inner content must conform to the 'curie'
|
|
definiton, and as before, if it does not then the value MUST be ignored.</li>
|
|
</ol>
|
|
|
|
<p>An example of an attribute that can contain CURIE and non-CURIE values is <span class="aref">@about</span>. As described, any CURIEs expressed in the attribute must follow the format of a [<a
|
|
href="#T_safe_CURIE" class="tref">safe CURIE</a>]. So to express a URI directly, an author might do this:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div <span class='hilite'>about="http://dbpedia.org/resource/Albert_Einstein"</span>>
|
|
...
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>whilst to express a CURIE they would do this:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div <span class='hilite'>about="[dbr:Albert_Einstein]"</span>>
|
|
...
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Since non-CURIE values MUST be ignored, the following value in <span class="aref">@about</span> would <em>not</em> set a new subject, since the CURIE has no prefix separator.</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div <span class='hilite'>about="[Albert_Einstein]"</span>>
|
|
...
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>However, this mark-up <em>would</em> set a subject, since it is not a CURIE, but a valid relative URI:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div <span class='hilite'>about="Albert_Einstein"</span>>
|
|
...
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> There is one exception to this; <span class="aref">@rel</span> and <span class="aref">@rev</span> can also take any value from the list in the section on <a href="#A_rel">The rel attribute</a>,
|
|
and any matching value MUST be treated as if it was a full URI with the XHTML vocabulary as its prefix mapping. This is discussed further in the next section.</p>
|
|
|
|
<h3><a id="sec_5.4.4." name="sec_5.4.4.">5.4.4. Use of CURIEs in Specific Attributes</a></h3>
|
|
|
|
<p> The general rules discussed in the previous section apply to the RDFa attributes in the following ways:</p>
|
|
|
|
<ul>
|
|
<li><span class="aref">@about</span> and <span class="aref">@resource</span> support either a URI or a CURIE (expressed as a [<a href="#T_safe_CURIE" class="tref">safe CURIE</a>] ).</li>
|
|
|
|
<li><span class="aref">@href</span> and <span class="aref">@src</span> support only a URI.</li>
|
|
|
|
<li><span class="aref">@property</span>, <span class="aref">@datatype</span> and <span class="aref">@typeof</span> support only CURIE values.</li>
|
|
|
|
<li><span class="aref">@rel</span> and <span class="aref">@rev</span> support both XHTML link types and CURIEs.</li>
|
|
</ul>
|
|
|
|
<p> Note that unlike <span class="aref">@about</span> and <span class="aref">@resource</span>, <span class="aref">@rel</span> and <span class="aref">@rev</span> do not differentiate their two types
|
|
of data by using [<a href="#T_safe_CURIE" class="tref">safe CURIE</a>]s. Instead, any value that matches an entry in the list of link types in the section <a href="#A_rel">The rel attribute</a>, MUST
|
|
be treated as if it was a URI within the XHTML vocabulary, and all other values must be CURIEs. This means that either of the following examples:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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>
|
|
</div>
|
|
|
|
<p>would generate this triple:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<> <http://www.w3.org/1999/xhtml/vocab#next> <http://example.org/page2.html> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> <span class="mustnot">Note that only values in the link type list have this special behaviour, which means that any value that is not in the list <em>and</em> is not a valid CURIE MUST not
|
|
generate triples in the [<a href="#T_default_graph" class="tref">default graph</a>]</span> . For example, no triples would be generated in the [<a href="#T_default_graph" class="tref">default
|
|
graph</a>] by the following mark-up:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<link rel="<span class='hilite'>foobar</span>" href="http://example.org/page7.html" />
|
|
</pre>
|
|
</div>
|
|
|
|
<h3><a id="sec_5.4.5." name="sec_5.4.5.">5.4.5. Referencing Blank Nodes</a></h3>
|
|
|
|
<p>In RDFa, it is possible to establish relationships using various types of resource references, including [<a href="#T_bnode" class="tref">bnode</a>]s. If a subject or object is defined using a
|
|
CURIE, and that CURIE explicitly names a [<a href="#T_bnode" class="tref">bnode</a>], then a conforming parser <span class="must">MUST</span> create the bnode when it is encountered during parsing.
|
|
The parser <span class="must">MUST</span> also ensure that no bnodes created automatically (as a result of [<a href="#T_chaining" class="tref">chaining</a>]) have names that collide with bnodes that
|
|
are defined by explicit reference in a CURIE.</p>
|
|
|
|
<p>Consider the following example:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<link about="[_:john]" rel="foaf:mbox"
|
|
href="mailto:john@example.org" />
|
|
<link about="[_:sue]" rel="foaf:mbox"
|
|
href="mailto:sue@example.org" />
|
|
<link about="[_:john]" rel="foaf:knows"
|
|
resource="[_:sue]" />
|
|
</pre>
|
|
</div>
|
|
|
|
<p>In the above fragment, two bnodes are explicitly created as the subject of triples. Those bnodes are then referenced to demonstrate the relationship between the parties. After processing, the
|
|
following triples will be generated:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
_:john foaf:mbox <mailto:john@example.org> .
|
|
_:sue foaf:mbox <mailto:sue@example.org> .
|
|
_:john foaf:knows _:sue .
|
|
</pre>
|
|
</div>
|
|
|
|
<h2><a id="sec_5.5." name="sec_5.5.">5.5. Sequence</a></h2>
|
|
|
|
<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 [http://en.wikipedia.org/wiki/SAX] 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 any <code>meta</code> or <code>link</code> elements processed in the <code>head</code> of the document honor any occurrences of <code>base</code> which may appear <em>
|
|
after</em> those elements. (In other words, XHTML processing rules must still be applied, even if document processing takes place in a non-HTML environment such as a search indexer.)</p>
|
|
|
|
<p> At the beginning of processing, an initial [<span class="tdef" id="T_evaluation_context">evaluation context</span>] is created, as follows:</p>
|
|
|
|
<ul>
|
|
<li>the [<a href="#T_base" class="tref">base</a>] is set to either the URL of the document or the value specified in the <code>base</code> element, if present;
|
|
|
|
<div class="explanation">Note that XHTML 1.1, and therefore XHTML+RDFa, does NOT permit the use of <span class="aref">@xml:base</span>, so the only way to change the [<a href="#T_base" class=
|
|
"tref">base</a>] is via the <code>base</code> element. If some other XML dialect that supports <span class="aref">@xml:base</span> eventually implements RDFa, a conforming RDFa parser for that host
|
|
language will likely process <span class="aref">@xml:base</span> and use its value to set [<a href="#T_base" class="tref">base</a>].</div>
|
|
</li>
|
|
|
|
<li>the [<a href="#T_parent_subject" class="tref">parent subject</a>] is set to the [<a href="#T_base" class="tref">base</a>] value;</li>
|
|
|
|
<li>the [<a href="#T_parent_object" class="tref">parent object</a>] is set to null;</li>
|
|
|
|
<li>the [<span class="tdef" id="T_list_of_URI_mappings">list of URI mappings</span>] is empty;</li>
|
|
|
|
<li>the [<a href="#T_list_of_incomplete_triples" class="tref">list of incomplete triples</a>] is empty;</li>
|
|
|
|
<li>the [<a href="#T_language" class="tref">language</a>] is set to null.</li>
|
|
</ul>
|
|
|
|
<p> Processing begins by applying the processing rules below to the document object, in the context of this initial [<a href="#T_evaluation_context" class="tref">evaluation context</a>]. All elements
|
|
in the tree are also processed according to the rules described below, depth-first, although the [<a href="#T_evaluation_context" class="tref">evaluation context</a>] used for each set of rules will
|
|
be based on previous rules that may have been applied.</p>
|
|
|
|
<p> The processing rules are:</p>
|
|
|
|
<ol>
|
|
<li>First, the local values are initialized, as follows:
|
|
|
|
<ul>
|
|
<li>the [<a href="#T_recurse" class="tref">recurse</a>] flag is set to 'true';</li>
|
|
|
|
<li>the [<a href="#T_skip_element" class="tref">skip element</a>] flag is set to 'false';</li>
|
|
|
|
<li>[<a href="#T_new_subject" class="tref">new subject</a>] is set to null;</li>
|
|
|
|
<li>[<a href="#T_current_object_resource" class="tref">current object resource</a>] is set to null;</li>
|
|
|
|
<li>the [<a href="#T_local_list_of_URI_mappings" class="tref">local list of URI mappings</a>] is set to the list of URI mappings from the [<a href="#T_evaluation_context" class="tref">evaluation
|
|
context</a>];</li>
|
|
|
|
<li>the [<a href="#T_local_list_of_incomplete_triples" class="tref">local list of incomplete triples</a>] is set to null;</li>
|
|
|
|
<li>the [<a href="#T_current_language" class="tref">current language</a>] value is set to the [<a href="#T_language" class="tref">language</a>] value from the [<a href="#T_evaluation_context" class=
|
|
"tref">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 href="#T_evaluation_context" class=
|
|
"tref">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>Next the [<span class="tdef" id="T_current_element">current element</span>] is parsed for [<span class="tdef" id="T_URI_mapping">URI mapping</span>]s and these are added to the [<a href=
|
|
"#T_local_list_of_URI_mappings" class="tref">local list of URI mappings</a>]. Note that a [<a href="#T_URI_mapping" class="tref">URI mapping</a>] will simply overwrite any current mapping in the list
|
|
that has the same name;
|
|
|
|
<div class="explanation">Mappings are provided by <span class="aref">@xmlns</span>. The value to be mapped is set by the XML namespace prefix, and the value to map is the value of the
|
|
attribute—a URI. Note that the URI is not processed in any way; in particular if it is a relative path it is not resolved against the current [<a href="#T_base" class="tref">base</a>]. Authors
|
|
are advised to follow best practice for using namespaces, which includes not using relative paths.</div>
|
|
</li>
|
|
|
|
<li>The [<a href="#T_current_element" class="tref">current element</a>] is also parsed for any language information, and if present, [<a href="#T_current_language" class="tref">current language</a>]
|
|
is set accordingly;
|
|
|
|
<div class="explanation">Language information can be provided using the general-purpose XML attribute <span class="aref">@xml:lang</span>.</div>
|
|
</li>
|
|
|
|
<li>If the [<a href="#T_current_element" class="tref">current element</a>] contains no <span class="aref">@rel</span> or <span class="aref">@rev</span> attribute, then the next step is to establish a
|
|
value for [<a href="#T_new_subject" class="tref">new subject</a>]. Any of the attributes that can carry a resource can set [<a href="#T_new_subject" class="tref">new subject</a>];
|
|
|
|
<div class="explanation">[<a href="#T_new_subject" class="tref">new subject</a>] is set to the URI obtained from the first match from the following rules:
|
|
|
|
<ul>
|
|
<li>by using the URI from <span class="aref">@about</span>, 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 URI from <span class="aref">@src</span>, 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 URI from <span class="aref">@resource</span>, 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 URI from <span class="aref">@href</span>, if present, obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a>.</li>
|
|
</ul>
|
|
|
|
<p>If no URI is provided by a resource attribute, then the first match from the following rules will apply:</p>
|
|
|
|
<ul>
|
|
<li>if the element is the <code>head</code> or <code>body</code> element then act as if there is an empty <span class="aref">@about</span> present, and process it according to the rule for <span
|
|
class="aref">@about</span>, above;</li>
|
|
|
|
<li>if <span class="aref">@typeof</span> is present, obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a>, then [<a href="#T_new_subject" class="tref">new
|
|
subject</a>] is set to be a newly created [<a href="#T_bnode" class="tref">bnode</a>].</li>
|
|
|
|
<li><em>otherwise</em>, if [<a href="#T_parent_object" class="tref">parent object</a>] is present, [<a href="#T_new_subject" class="tref">new subject</a>] is set to the value of [<a href=
|
|
"#T_parent_object" class="tref">parent object</a>]. Additionally, if <span class="aref">@property</span> is <em>not</em> present then the [<a href="#T_skip_element" class="tref">skip element</a>]
|
|
flag is set to 'true';</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
|
|
<li>If the [<a href="#T_current_element" class="tref">current element</a>] <em>does</em> contain a <span class="aref">@rel</span> or <span class="aref">@rev</span> attribute, then the next step is to
|
|
establish <em>both</em> a value for [<a href="#T_new_subject" class="tref">new subject</a>] and a value for [<a href="#T_current_object_resource" class="tref">current object resource</a>]:
|
|
|
|
<div class="explanation">[<a href="#T_new_subject" class="tref">new subject</a>] is set to the URI obtained from the first match from the following rules:
|
|
|
|
<ul>
|
|
<li>by using the URI from <span class="aref">@about</span>, 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 URI from <span class="aref">@src</span>, if present, obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a>.</li>
|
|
</ul>
|
|
|
|
<p>If no URI is provided then the first match from the following rules will apply:</p>
|
|
|
|
<ul>
|
|
<li>if the element is the <code>head</code> or <code>body</code> element then act as if there is an empty <span class="aref">@about</span> present, and process it according to the rule for <span
|
|
class="aref">@about</span>, above;</li>
|
|
|
|
<li>if <span class="aref">@typeof</span> is present, obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a>, then [<a href="#T_new_subject" class="tref">new
|
|
subject</a>] is set to be a newly created [<a href="#T_bnode" class="tref">bnode</a>];</li>
|
|
|
|
<li><em>otherwise</em>, if [<a href="#T_parent_object" class="tref">parent object</a>] is present, [<a href="#T_new_subject" class="tref">new subject</a>] is set to that.</li>
|
|
</ul>
|
|
|
|
<p>Then the [<a href="#T_current_object_resource" class="tref">current object resource</a>] is set to the URI obtained from the first match from the following rules:</p>
|
|
|
|
<ul>
|
|
<li>by using the URI from <span class="aref">@resource</span>, 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 URI from <span class="aref">@href</span>, if present, obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a>.</li>
|
|
</ul>
|
|
|
|
<p>Note that final value of the [<a href="#T_current_object_resource" class="tref">current object resource</a>] will either be null (from initialization) or a full URI.</p>
|
|
</div>
|
|
</li>
|
|
|
|
<li>If in any of the previous steps a [<a href="#T_new_subject" class="tref">new subject</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 href="#T_new_subject" class="tref">new subject</a>] can be set by using <span class="aref">@typeof</span>. If present, the attribute must
|
|
contain one or more URIs, obtained according to the section on <a href="#s_curieprocessing">URI and CURIE Processing</a>, each of which is used to generate a triple as follows:
|
|
|
|
<dl>
|
|
<dt>subject</dt>
|
|
|
|
<dd>[<a href="#T_new_subject" class="tref">new subject</a>]</dd>
|
|
|
|
<dt>predicate</dt>
|
|
|
|
<dd>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</dd>
|
|
|
|
<dt>object</dt>
|
|
|
|
<dd>full URI of 'type'</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<div class="explanation">Note that none of this block is executed if there is no [<a href="#T_new_subject" class="tref">new subject</a>] value, i.e., [<a href="#T_new_subject" class="tref">new
|
|
subject</a>] remains null.</div>
|
|
</li>
|
|
|
|
<li>If in any of the previous steps a [<a href="#T_current_object_resource" class="tref">current object resource</a>] was set to a non-null value, it is now used to generate triples:
|
|
|
|
<div class="explanation">Predicates for the [<a href="#T_current_object_resource" class="tref">current object resource</a>] can be set by using one or both of the <span class="aref">@rel</span> and
|
|
<span class="aref">@rev</span> attributes:
|
|
|
|
<ul>
|
|
<li>If present, <span class="aref">@rel</span> may contain one or more URIs, obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a> each of which is used to
|
|
generate a triple as follows:
|
|
|
|
<dl>
|
|
<dt>subject</dt>
|
|
|
|
<dd>[<a href="#T_new_subject" class="tref">new subject</a>]</dd>
|
|
|
|
<dt>predicate</dt>
|
|
|
|
<dd>full URI</dd>
|
|
|
|
<dt>object</dt>
|
|
|
|
<dd>[<a href="#T_current_object_resource" class="tref">current object resource</a>]</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>If present, <span class="aref">@rev</span> may contain one or more URIs, obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a> each of which is used to
|
|
generate a triple as follows:
|
|
|
|
<dl>
|
|
<dt>subject</dt>
|
|
|
|
<dd>[<a href="#T_current_object_resource" class="tref">current object resource</a>]</dd>
|
|
|
|
<dt>predicate</dt>
|
|
|
|
<dd>full URI</dd>
|
|
|
|
<dt>object</dt>
|
|
|
|
<dd>[<a href="#T_new_subject" class="tref">new subject</a>]</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
|
|
<li>If however [<a href="#T_current_object_resource" class="tref">current object resource</a>] was set to null, but there are predicates present, then they must be stored as [<a href=
|
|
"#T_incomplete_triple" class="tref">incomplete triple</a>]s, pending the discovery of a subject that can be used as the object. Also, [<a href="#T_current_object_resource" class="tref">current object
|
|
resource</a>] should be set to a newly created [<a href="#T_bnode" class="tref">bnode</a>];
|
|
|
|
<div class="explanation">Predicates for [<a href="#T_incomplete_triple" class="tref">incomplete triple</a>]s can be set by using one or both of the <span class="aref">@rel</span> and <span class=
|
|
"aref">@rev</span> attributes:
|
|
|
|
<ul>
|
|
<li>If present, <span class="aref">@rel</span> must contain one or more URIs, obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a> each of which is added to
|
|
the [<a href="#T_local_list_of_incomplete_triples" class="tref">local list of incomplete triples</a>] as follows:
|
|
|
|
<dl>
|
|
<dt>predicate</dt>
|
|
|
|
<dd>full URI</dd>
|
|
|
|
<dt>direction</dt>
|
|
|
|
<dd>forward</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>If present, <span class="aref">@rev</span> must contain one or more URIs, obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a>, each of which is added to
|
|
the [<a href="#T_local_list_of_incomplete_triples" class="tref">local list of incomplete triples</a>] as follows:
|
|
|
|
<dl>
|
|
<dt>predicate</dt>
|
|
|
|
<dd>full URI</dd>
|
|
|
|
<dt>direction</dt>
|
|
|
|
<dd>reverse</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
|
|
<li>The next step of the iteration is to establish any [<a href="#T_current_object_literal" class="tref">current object literal</a>];
|
|
|
|
<div class="explanation">Predicates for the [<a href="#T_current_object_literal" class="tref">current object literal</a>] can be set by using <span class="aref">@property</span>. If present, one or
|
|
more URIs are obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a>, and then the actual literal value is obtained as follows:
|
|
|
|
<ul>
|
|
<li>as a [<a href="#T_typed_literal" class="tref">typed literal</a>] if:
|
|
|
|
<ul>
|
|
<li><span class="aref">@datatype</span> is present, and does not have an empty value, and is not set to <code>rdf:XMLLiteral</code>.</li>
|
|
</ul>
|
|
|
|
<p>The actual literal is either the value of <span class="aref">@content</span> (if present) <em>or</em> a string created by concatenating the value of all descendant text nodes, of the [<a href=
|
|
"#T_current_element" class="tref">current element</a>] in turn. The final string includes the datatype URI, as described in [<a class="nref" href="#ref_RDF-CONCEPTS">RDF-CONCEPTS</a>], which will
|
|
have been obtained according to the section on <a href="#s_curieprocessing">CURIE and URI Processing</a>.</p>
|
|
</li>
|
|
|
|
<li>as a [<a href="#T_plain_literal" class="tref">plain literal</a>] if:
|
|
|
|
<ul>
|
|
<li><span class="aref">@content</span> is present;</li>
|
|
|
|
<li><em>or</em> all children of the [<a href="#T_current_element" class="tref">current element</a>] are text nodes;</li>
|
|
|
|
<li><em>or</em> there are no child nodes (in which case the literal value is the empty string);</li>
|
|
|
|
<li><em>or</em> the body of the [<a href="#T_current_element" class="tref">current element</a>] <em>does</em> have non-text child nodes but <span class="aref">@datatype</span> is present, with an
|
|
empty value.</li>
|
|
</ul>
|
|
|
|
<p>Additionally, if there is a value for [<span class="tdef" id="T_current_language">current language</span>] then the value of the [<a href="#T_plain_literal" class="tref">plain literal</a>] should
|
|
include this language information, as described in [<a class="nref" href="#ref_RDF-CONCEPTS">RDF-CONCEPTS</a>]. The actual literal is either the value of <span class="aref">@content</span> (if
|
|
present) <em>or</em> a string created by concatenating the text content of each of the descendant elements of the [<a href="#T_current_element" class="tref">current element</a>] in document
|
|
order.</p>
|
|
</li>
|
|
|
|
<li>as an [<a href="#s_xml_literals" class="tref">XML literal</a>] if:
|
|
|
|
<ul>
|
|
<li>the [<a href="#T_current_element" class="tref">current element</a>] has any child nodes that are not simply text nodes, and <span class="aref">@datatype</span> is not present, or is present, but
|
|
is set to <code>rdf:XMLLiteral</code>.</li>
|
|
</ul>
|
|
|
|
<p>The value of the [<a href="#s_xml_literals" class="tref">XML literal</a>] is a string created by serializing to text, all nodes that are descendants of the [<a href="#T_current_element" class=
|
|
"tref">current element</a>], i.e., not including the element itself, and giving it a datatype of <code>rdf:XMLLiteral</code>.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>The [<a href="#T_current_object_literal" class="tref">current object literal</a>] is then used with each predicate to generate a triple as follows:</p>
|
|
|
|
<dl>
|
|
<dt>subject</dt>
|
|
|
|
<dd>[<a href="#T_new_subject" class="tref">new subject</a>]</dd>
|
|
|
|
<dt>predicate</dt>
|
|
|
|
<dd>full URI</dd>
|
|
|
|
<dt>object</dt>
|
|
|
|
<dd>[<a href="#T_current_object_literal" class="tref">current object literal</a>]</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<p>Once the triple has been created, if the [<span class="tdef" id="T_datatype">datatype</span>] of the [<a href="#T_current_object_literal" class="tref">current object literal</a>] is <code>
|
|
rdf:XMLLiteral</code>, then the [<a href="#T_recurse" class="tref">recurse</a>] flag is set to <code>false</code>.</p>
|
|
</li>
|
|
|
|
<li>If the [<a href="#T_skip_element" class="tref">skip element</a>] flag is 'false', <em>and</em> [<a href="#T_new_subject" class="tref">new subject</a>] was set to a non-null value, then any [<a
|
|
href="#T_incomplete_triple" class="tref">incomplete triple</a>]s <em>within the current context</em> should be completed:
|
|
|
|
<div class="explanation">The [<a href="#T_list_of_incomplete_triples" class="tref">list of incomplete triples</a>] from the current [<a href="#T_evaluation_context" class="tref">evaluation
|
|
context</a>] (<em>not</em> the [<a href="#T_local_list_of_incomplete_triples" class="tref">local list of incomplete triples</a>]) will contain zero or more predicate URIs. This list is iterated, and
|
|
each of the predicates is used with [<a href="#T_parent_subject" class="tref">parent subject</a>] and [<a href="#T_new_subject" class="tref">new subject</a>] to generate a triple. Note that at each
|
|
level there are <em>two</em>, lists of [<a href="#T_incomplete_triple" class="tref">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 href="#T_evaluation_context" class="tref">evaluation context</a>]. It is the latter that is used in processing during this step.</div>
|
|
|
|
<div class="explanation">Note that each [<a href="#T_incomplete_triple" class="tref">incomplete triple</a>] has a [<span class="tdef" id="T_direction">direction</span>] 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 href="#T_direction" class="tref">direction</a>] is 'forward' then the following triple is generated:
|
|
|
|
<dl>
|
|
<dt>subject</dt>
|
|
|
|
<dd>[<a href="#T_parent_subject" class="tref">parent subject</a>]</dd>
|
|
|
|
<dt>predicate</dt>
|
|
|
|
<dd>the predicate from the iterated [<a href="#T_incomplete_triple" class="tref">incomplete triple</a>]</dd>
|
|
|
|
<dt>object</dt>
|
|
|
|
<dd>[<a href="#T_new_subject" class="tref">new subject</a>]</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>If [<a href="#T_direction" class="tref">direction</a>] is not 'forward' then this is the triple generated:
|
|
|
|
<dl>
|
|
<dt>subject</dt>
|
|
|
|
<dd>[<a href="#T_new_subject" class="tref">new subject</a>]</dd>
|
|
|
|
<dt>predicate</dt>
|
|
|
|
<dd>the predicate from the iterated [<a href="#T_incomplete_triple" class="tref">incomplete triple</a>]</dd>
|
|
|
|
<dt>object</dt>
|
|
|
|
<dd>[<a href="#T_parent_subject" class="tref">parent subject</a>]</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
|
|
<li>If the [<a href="#T_recurse" class="tref">recurse</a>] flag is 'true', all elements that are children of the [<a href="#T_current_element" class="tref">current element</a>] are processed using
|
|
the rules described here, using a new [<a href="#T_evaluation_context" class="tref">evaluation context</a>], initialized as follows:
|
|
|
|
<ul>
|
|
<li>If the [<a href="#T_skip_element" class="tref">skip element</a>] flag is 'true' then the new [<a href="#T_evaluation_context" class="tref">evaluation context</a>] is a copy of the current context
|
|
that was passed in to this level of processing, with the [<a href="#T_language" class="tref">language</a>] and [<a href="#T_list_of_URI_mappings" class="tref">list of URI mappings</a>] values
|
|
replaced with the local values;</li>
|
|
|
|
<li>Otherwise, the values are:
|
|
|
|
<ul>
|
|
<li>the [<a href="#T_base" class="tref">base</a>] is set to the [<a href="#T_base" class="tref">base</a>] value of the current [<a href="#T_evaluation_context" class="tref">evaluation
|
|
context</a>];</li>
|
|
|
|
<li>the [<a href="#T_parent_subject" class="tref">parent subject</a>] is set to the value of [<a href="#T_new_subject" class="tref">new subject</a>], if non-null, <em>or</em> the value of the [<a
|
|
href="#T_parent_subject" class="tref">parent subject</a>] of the current [<a href="#T_evaluation_context" class="tref">evaluation context</a>];</li>
|
|
|
|
<li>the [<a href="#T_parent_object" class="tref">parent object</a>] is set to value of [<a href="#T_current_object_resource" class="tref">current object resource</a>], if non-null, <em>or</em> the
|
|
value of [<a href="#T_new_subject" class="tref">new subject</a>], if non-null, <em>or</em> the value of the [<a href="#T_parent_subject" class="tref">parent subject</a>] of the current [<a href=
|
|
"#T_evaluation_context" class="tref">evaluation context</a>];</li>
|
|
|
|
<li>the [<a href="#T_list_of_URI_mappings" class="tref">list of URI mappings</a>] is set to the [<a href="#T_local_list_of_URI_mappings" class="tref">local list of URI mappings</a>];</li>
|
|
|
|
<li>the [<a href="#T_list_of_incomplete_triples" class="tref">list of incomplete triples</a>] is set to the [<a href="#T_local_list_of_incomplete_triples" class="tref">local list of incomplete
|
|
triples</a>];</li>
|
|
|
|
<li>[<a href="#T_language" class="tref">language</a>] is set to the value of [<a href="#T_current_language" class="tref">current language</a>].</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ol>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="s_rdfaindetail" name="s_rdfaindetail">6. RDFa Processing in detail</a></h1>
|
|
|
|
<p><em>This section is 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 href="#T_evaluation_context" class="tref">evaluation context</a>] and is called the [<a href="#T_parent_subject" class="tref">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 <span class="aref">@rel</span>, <span class="aref">@rev</span> and <span class="aref">@property</span>, whilst the attributes for setting an object are
|
|
<span class="aref">@resource</span>, <span class="aref">@href</span>, <span class="aref">@content</span>, and <span class="aref">@src</span>. <span class="aref">@typeof</span> 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 <span class="aref">@content</span> is not present, but <span class="aref">@property</span> is.</p>
|
|
|
|
<h2><a id="sec_6.1." name="sec_6.1.">6.1. Changing the evaluation context</a></h2>
|
|
|
|
<h3><a id="sec_6.1.1." name="sec_6.1.1.">6.1.1. Setting the current subject</a></h3>
|
|
|
|
<p>When triples are created they will always be in relation to a subject resource which is provided either by [<a href="#T_new_subject" class="tref">new subject</a>] (if there are rules on the
|
|
current element that have set a subject) or [<a href="#T_parent_subject" class="tref">parent subject</a>], as passed in via the [<a href="#T_evaluation_context" class="tref">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 arrived at, so in this section we use the idea of the [<span class="tdef" id=
|
|
"T_current_subject">current subject</span>] which may be <em>either</em> [<a href="#T_new_subject" class="tref">new subject</a>] or [<a href="#T_parent_subject" class="tref">parent subject</a>].</p>
|
|
|
|
<h4><a id="sec_6.1.1.1." name="sec_6.1.1.1.">6.1.1.1. The current document</a></h4>
|
|
|
|
<p>When parsing begins, the [<a href="#T_current_subject" class="tref">current subject</a>] will be the URI of the document being parsed, or a value as set by <code>base</code> according to normal
|
|
XHTML processing rules. This means that any metadata found in the <code>head</code> of the document will concern the document itself:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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>
|
|
</div>
|
|
|
|
<p>This would generate the following triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<> foaf:primaryTopic <#bbq> .
|
|
<> dc:creator "Jo" .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>It is possible for the data to appear elsewhere in the document:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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>
|
|
</div>
|
|
|
|
<p>which would still generate the triple:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<> dc:creator "Jo" .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>The value of <code>base</code> may change the initial value of [<a href="#T_current_subject" class="tref">current subject</a>]:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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>
|
|
</div>
|
|
|
|
<p>A parser should now generate the following triples, regardless of the URL from which the XHTML document is served:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://www.example.org/jo/blog> foaf:primaryTopic <#bbq> .
|
|
<http://www.example.org/jo/blog> dc:creator "Jo" .
|
|
</pre>
|
|
</div>
|
|
|
|
<h4><a id="sec_6.1.1.2." name="sec_6.1.1.2.">6.1.1.2. Using <span class="aref">@about</span></a></h4>
|
|
|
|
<p>As processing progresses, any <span class="aref">@about</span> attributes will change the [<a href="#T_current_subject" class="tref">current subject</a>]. The value of <span class="aref">
|
|
@about</span> is a URI or a CURIE. If it is a relative URI then it needs to be resolved against the current [<a href="#T_base" class="tref">base</a>] value. To illustrate how this affects the
|
|
statements, note in this mark-up how the properties inside the <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>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<html>
|
|
<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="2007-09-16T16:00:00-05:00"
|
|
datatype="xsd:dateTime">
|
|
September 16th at 4pm
|
|
</span>.
|
|
</p>
|
|
</body>
|
|
</html>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>With this mark-up a parser should generate the following triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<> 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:dtastart "2007-09-16T16:00:00-05:00"^^xsd:dateTime .</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Other kinds of resources can be used to set the [<a href="#T_current_subject" class="tref">current subject</a>], not just references to web-pages. Although not advised, email addresses might be
|
|
used to represent a person:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
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>
|
|
</div>
|
|
|
|
<p>This should generate the following triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<mailto:john@example.org> foaf:knows <mailto:sue@example.org> .
|
|
<mailto:sue@example.org> foaf:knows <mailto:jim@example.org> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Similarly, authors may make statements about images:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div <span class='hilite'>about="photo1.jpg"</span>>
|
|
this photo was taken by
|
|
<span property="dc:creator">Mark Birbeck</span>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>which should generate the following triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<photo1.jpg> dc:creator "Mark Birbeck" .
|
|
</pre>
|
|
</div>
|
|
|
|
<h4><a id="sec_6.1.1.3." name="sec_6.1.1.3.">6.1.1.3. Using <span class="aref">@src</span></a></h4>
|
|
|
|
<p> If <span class="aref">@about</span> is not present, then <span class="aref">@src</span> is next in priority order, for setting the subject of a statement. A typical use would be to indicate the
|
|
licensing type of an image:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<img <span class='hilite'>src="photo1.jpg"</span> rel="license" resource="http://creativecommons.org/licenses/by/2.0/" />
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Since there is no difference between <span class="aref">@src</span> and <span class="aref">@about</span>, then the information expressed in the last example in the section on <span class="aref">
|
|
@about</span> (the <em>creator</em> of an image), could be expressed as follows:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<img src="photo1.jpg"
|
|
rel="license" resource="http://creativecommons.org/licenses/by/2.0/"
|
|
<span class='hilite'>property="dc:creator" content="Mark Birbeck"</span>
|
|
/>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Since normal chaining rules will apply, the image URL can also be used to complete hanging triples:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://www.blogger.com/profile/1109404" rel="foaf:img">
|
|
<img <span class='hilite'>src="photo1.jpg"</span>
|
|
rel="license" resource="http://creativecommons.org/licenses/by/2.0/"
|
|
property="dc:creator" content="Mark Birbeck"
|
|
/>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>The complete mark-up yields three triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://www.blogger.com/profile/1109404> foaf:img <photo1.jpg> .
|
|
<photo1.jpg> xhv:license <http://creativecommons.org/licenses/by/2.0/> .
|
|
<photo1.jpg> dc:creator "Mark Birbeck" .
|
|
</pre>
|
|
</div>
|
|
|
|
<h4><a id="sec_6.1.1.4." name="sec_6.1.1.4.">6.1.1.4. Creating a new item with <span class="aref">@typeof</span></a></h4>
|
|
|
|
<p> Whilst <span class="aref">@about</span> explicitly creates a new context for statements, <span class="aref">@typeof</span> does so implicitly. <span class="aref">@typeof</span> 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.</p>
|
|
|
|
<p>Since <span class="aref">@typeof</span> is setting the type of an item, this means that if no item exists one should automatically be created. This involves generating a new bnode, and is examined
|
|
in more detail below; it is mentioned here because the bnode used by the new item will become the subject for further statements.</p>
|
|
|
|
<p> For example, an author may wish to create mark-up for a person using the FOAF vocabulary, but without having a clear identifier for the item:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div <span class='hilite'>typeof="foaf:Person"</span>>
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="foaf:givenname">Albert</span>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> This mark-up would cause a bnode to be created which has a 'type' of <code>foaf:Person</code>, as well as name and given name properties:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
_:a rdf:type foaf:Person .
|
|
_:a foaf:name "Albert Einstein" .
|
|
_:a foaf:givenname "Albert" .
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="explanation">A bnode 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>
|
|
|
|
<h4><a id="sec_6.1.1.5." name="sec_6.1.1.5.">6.1.1.5. Determining the subject with neither <span class="aref">@about</span> nor <span class="aref">@typeof</span></a></h4>
|
|
|
|
<p> As described in the previous two sections, <span class="aref">@about</span> will always take precedence and mark a new subject, but if no <span class="aref">@about</span> value is available then
|
|
<span class="aref">@typeof</span> will do the same job, although using an implied identifier, i.e., a bnode.</p>
|
|
|
|
<p> But if neither <span class="aref">@about</span> or <span class="aref">@typeof</span> 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>
|
|
|
|
<h5><a id="sec_6.1.1.5.1." name="sec_6.1.1.5.1.">6.1.1.5.1. Inheriting subject from <span class="aref">@resource</span></a></h5>
|
|
|
|
<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
|
|
Germany was added, the following mark-up was used:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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/Germany" />
|
|
<span class='hilite'><span about="http://dbpedia.org/resource/Germany"
|
|
property="dbp:conventionalLongName">Federal Republic of Germany</span></span>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> In an earlier illustration the subject and object for Germany were elided by removing the <span class="aref">@resource</span>, relying on the <span class="aref">@about</span> to set the
|
|
object:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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/Germany"
|
|
property="dbp:conventionalLongName">Federal Republic of Germany</span>
|
|
</div>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> but it is also possible for authors to achieve the same effect by removing the <span class="aref">@about</span> and leaving the <span class="aref">@resource</span>:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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/Germany"</span>>
|
|
<span property="dbp:conventionalLongName">Federal Republic of Germany</span>
|
|
</div>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> In this situation, all statements that are 'contained' by the object resource representing Germany (the value in <span class="aref">@resource</span>) will have the same subject, making it easy
|
|
for authors to add additional statements:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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/Germany">
|
|
<span property="dbp:conventionalLongName">Federal Republic of Germany</span>
|
|
<span class='hilite'><span rel="dbp:capital" resource="http://dbpedia.org/resource/Berlin" /></span>
|
|
</div>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Looking at the triples that a parser would generate, we can see that we actually have two groups of statements; the first group are set to refer to the <span class="aref">@about</span> that
|
|
contains them:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<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/Germany> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>whilst the second group refer to the <span class="aref">@resource</span> that contains them:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Germany>
|
|
dbp:conventionalLongName "Federal Republic of Germany" .
|
|
<http://dbpedia.org/resource/Germany>
|
|
dbp:capital <http://dbpedia.org/resource/Berlin> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Note also that the same principle described here applies to <span class="aref">@src</span> and <span class="aref">@href</span>.</p>
|
|
|
|
<h5><a id="sec_6.1.1.5.2." name="sec_6.1.1.5.2.">6.1.1.5.2. Inheriting an anonymous subject</a></h5>
|
|
|
|
<p> There will be occasions when the the author wants to elide 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 mark-up could well be used:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp: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>
|
|
</div>
|
|
|
|
<p> A parser should generate the following triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Baruch_Spinoza>
|
|
dbp: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>
|
|
</div>
|
|
|
|
<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>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp: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>
|
|
</div>
|
|
|
|
<p> In RDF terms, the item that 'represents' Einstein is <em>anonymous</em>, since it has no URI to identify it. However, the item is given an automatically generated bnode, and it is onto this
|
|
idenfifier that all child statements are attached:</p>
|
|
|
|
<p> A parser should generate the following triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Baruch_Spinoza> dbp:influenced _:a .
|
|
_:a foaf:name "Albert Einstein" .
|
|
_:a dbp:dateOfBirth "1879-03-14"^^xsd:date .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Note that the <code>div</code> is superfluous, and a parser should create the intermediate object even if the element is removed:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp:influenced">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> An alternative pattern is to <em>keep</em> the <code>div</code> and move the <span class="aref">@rel</span> onto it:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Baruch_Spinoza">
|
|
<div <span class='hilite'>rel="dbp:influenced"</span>>
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
</div>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> From the point of view of the mark-up, this latter layout is to be preferred, since it draws attention to the 'hanging rel'. But from the point of view of a parser, all of these permutations need
|
|
to be supported.</p>
|
|
|
|
<h2><a id="s_Completing_Incomplete_Triples" name="s_Completing_Incomplete_Triples">6.2. Completing 'incomplete triples'</a></h2>
|
|
|
|
<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 Germany:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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/Germany" /></span>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> and then a further statement that the 'long name' for Germany is the <em>Federal Republic of Germany</em>:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<span about="http://dbpedia.org/resource/Germany"
|
|
property="dbp:conventionalLongName">Federal Republic of Germany</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> RDFa allows authors to insert this statement as a self-contained unit into other contexts:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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/Germany" />
|
|
<span class='hilite'><span about="http://dbpedia.org/resource/Germany"
|
|
property="dbp:conventionalLongName">Federal Republic of Germany</span></span>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> But it also allows authors to avoid unnecessary repetition and to 'normalize' out duplicate identifiers, in this case the one for Germany:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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/Germany"
|
|
property="dbp:conventionalLongName">Federal Republic of Germany</span>
|
|
</div>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> When this happens the <span class="aref">@rel</span> 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 <span class="aref">@about</span> that appears on the next line. The first step is therefore to store the two parts of the triple that the parser <em>does</em> have, but without an object:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Albert_Einstein> dbp:birthPlace <span class='hilite'>?</span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Then as processing continues, the parser encounters the subject of the statement about the long name for Germany, and this is used in two ways. First it is used to complete the 'incomplete
|
|
triple':</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Albert_Einstein> dbp:birthPlace <span class='hilite'><http://dbpedia.org/resource/Germany></span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>and second it is used to generate its own triple:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Germany> dbp:conventionalLongName "Federal Republic of Germany" .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Note that each occurrence of <span class="aref">@about</span> will complete any incomplete triples. For example, to mark up the fact that Albert Einstein had both German and American citizenship,
|
|
an author need only specify one <span class="aref">@rel</span> value that is then used with multiple <span class="aref">@about</span> values:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Albert_Einstein" rel="dbp:citizenship">
|
|
<span class='hilite'><span about="http://dbpedia.org/resource/Germany" /></span>
|
|
<span class='hilite'><span about="http://dbpedia.org/resource/United_States" /></span>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> In this example there is one incomplete triple:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Albert_Einstein> dbp:citizenship <span class='hilite'>?</span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> When the processor meets each of the <span class="aref">@about</span> values, this triple is completed, giving:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
dbp:citizenship <span class='hilite'><http://dbpedia.org/resource/Germany></span> .
|
|
<http://dbpedia.org/resource/Albert_Einstein>
|
|
dbp:citizenship <span class='hilite'><http://dbpedia.org/resource/United_States></span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> These examples show how <span class="aref">@about</span> completes triples, but there are other situations that can have the same effect. For example, when <span class="aref">@typeof</span>
|
|
creates a new bnode (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
|
|
mark-up could be used:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Baruch_Spinoza">
|
|
<div rel="dbp: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>
|
|
</div>
|
|
|
|
<p>First the following incomplete triple is stored:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Baruch_Spinoza> dbp:influenced <span class='hilite'>?</span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Then when the parser processes the two occurences of <span class="aref">@typeof</span>, each generates a bnode, which is used to both complete the 'incomplete triple', and to set the subject for
|
|
further statements:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Baruch_Spinoza"> dbp: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: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>
|
|
</div>
|
|
|
|
<p> Triples are also 'completed' if any one of <span class="aref">@property</span>, <span class="aref">@rel</span> or <span class="aref">@rev</span> are present. However, unlike the situation when
|
|
<span class="aref">@about</span> or <span class="aref">@typeof</span> are present, all predicates are attached to one bnode:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp:influenced">
|
|
<span property="foaf:name">Albert Einstein</span>
|
|
<span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
|
|
<div rel="dbp:citizenship">
|
|
<span about="http://dbpedia.org/resource/Germany" />
|
|
<span about="http://dbpedia.org/resource/United_States" />
|
|
</div>
|
|
</div>
|
|
</pre>
|
|
</div>
|
|
|
|
<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>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Baruch_Spinoza> dbp:influenced <span class='hilite'>?</span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Next, the parser processes the predicate values for <code>foaf:name</code>, <code>dbp:dateOfBirth</code> and <code>dbp:citizenship</code>, but note that only the first needs to 'complete' the
|
|
'hanging rel'. So processing <code>foaf:name</code> generates two triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Baruch_Spinoza> dbp:influenced <span class='hilite'>_:a</span> .
|
|
<span class='hilite'>_:a</span> foaf:name "Alber Einstein" .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> but processing <code>dbp:dateOfBirth</code> generates only one:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<span class='hilite'>_:a</span> dbp:dateOfBirth "1879-03-14"^^xsd:date .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Processing <code>dbp:citizenship</code> also uses the same bnode, but note that it also generates its own 'incomplete triple':</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
_:a dbp:citizenship <span class='hilite'>?</span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>As before, the two occurrences of <span class="aref">@about</span> complete the 'incomplete triple', once each:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
_:a dbp:citizenship <span class='hilite'><http://dbpedia.org/resource/Germany></span> .
|
|
_:a dbp:citizenship <span class='hilite'><http://dbpedia.org/resource/United_States></span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> The entire set of triples that a parser should generate are as follows:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Baruch_Spinoza> dbp:influenced <span class='hilite'>_:a</span> .
|
|
<span class='hilite'>_:a</span> foaf:name "Alber Einstein" .
|
|
<span class='hilite'>_:a</span> dbp:dateOfBirth "1879-03-14"^^xsd:date .
|
|
<span class='hilite'>_:a</span> dbp:citizenship <http://dbpedia.org/resource/Germany> .
|
|
<span class='hilite'>_:a</span> dbp:citizenship <http://dbpedia.org/resource/United_States> .
|
|
</pre>
|
|
</div>
|
|
|
|
<h2><a id="sec_6.3." name="sec_6.3.">6.3. Object resolution</a></h2>
|
|
|
|
<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 href="#T_URI_resource" class="tref">URI resource</a>]s and [<a href="#T_literal" class="tref">literal</a>]s.</p>
|
|
|
|
<p>A [<a href="#T_literal" class="tref">literal</a>] object can be set by using <span class="aref">@property</span> to express a [<a href="#T_predicate" class="tref">predicate</a>], and then using
|
|
either <span class="aref">@content</span>, or the inline text of the element that <span class="aref">@property</span> is on. <em>Note that the use of <span class="aref">@content</span> 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 <span
|
|
class="aref">@content</span>.</em></p>
|
|
|
|
<p>A [<span class="tdef" id="T_URI_resource">URI resource</span>] object can be set using one of <span class="aref">@rel</span> or <span class="aref">@rev</span> to express a [<a href="#T_predicate"
|
|
class="tref">predicate</a>], and then <em>either</em> using one of <span class="aref">@href</span>, <span class="aref">@resource</span> or <span class="aref">@src</span> 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 bnode.</p>
|
|
|
|
<h3><a id="sec_6.3.1." name="sec_6.3.1.">6.3.1. Literal object resolution</a></h3>
|
|
|
|
<p> An [<span class="tdef" id="T_object_literal">object literal</span>] will be generated when <span class="aref">@property</span> is present. <span class="aref">@property</span> provides the
|
|
predicate, and the following sections describe how the actual literal to be generated is determined.</p>
|
|
|
|
<h4><a id="sec_6.3.1.1." name="sec_6.3.1.1.">6.3.1.1. Plain Literals</a></h4>
|
|
|
|
<p><span class="aref">@content</span> can be used to indicate a [<a href="#T_plain_literal" class="tref">plain literal</a>], as follows:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<meta about="http://internet-apps.blogspot.com/"
|
|
property="dc:creator" <span class='hilite'>content="Mark Birbeck"</span> />
|
|
</pre>
|
|
</div>
|
|
|
|
<p>The [<a href="#T_plain_literal" class="tref">plain literal</a>] can also be specified by using the content of the element:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<span about="http://internet-apps.blogspot.com/"
|
|
property="dc:creator"><span class='hilite'>Mark Birbeck</span></span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Both of these examples give the following triple:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://internet-apps.blogspot.com/> dc:creator "Mark Birbeck" .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>The value of <span class="aref">@content</span> is given precedence over any element content, so the following would give exactly the same triple:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<span about="http://internet-apps.blogspot.com/"
|
|
property="dc:creator" <span class='hilite'>content="Mark Birbeck"</span>>John Doe</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<h5><a id="sec_6.3.1.1.1." name="sec_6.3.1.1.1.">6.3.1.1.1. Language Tags</a></h5>
|
|
|
|
<p>RDF allows [<a href="#T_plain_literal" class="tref">plain literal</a>]s to have a language tag, as illustrated by the following example from <a href="#RDFTESTS-RDFMS-XMLLANG-TEST006">
|
|
[RDFTESTS-RDFMS-XMLLANG-TEST006]</a>:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://example.org/node>
|
|
<http://example.org/property> "chat"<span class='hilite'>@fr</span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>In RDFa the XML language attribute <span class="aref">@xml:lang</span> is used to add this information, whether the plain literal is designated by <span class="aref">@content</span>, or by the
|
|
inline text of the element:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<meta about="http://example.org/node"
|
|
property="ex:property" <span class='hilite'>xml:lang="fr"</span> content="chat" />
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Note that the language value can be inherited as defined in [<a class="nref" href="#ref_XML-LANG">XML-LANG</a>], so the following syntax will give the same triple as above:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns: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>
|
|
|
|
<h4><a id="sec_6.3.1.2." name="sec_6.3.1.2.">6.3.1.2. Typed literals</a></h4>
|
|
|
|
<p>Literals can be given a data type using <span class="aref">@datatype</span>.</p>
|
|
|
|
<p>This can be represented in RDFa as follows:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<span property="cal:dtstart" content="2007-09-16T16:00:00-05:00"
|
|
<span class='hilite'>datatype="xsd:dateTime"</span>>
|
|
September 16th at 4pm
|
|
</span>.
|
|
</pre>
|
|
</div>
|
|
|
|
<p>The triples that this mark-up generates include the datatype after the literal:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<> cal:dtstart "2007-09-16T16:00:00-05:00"^^<span class='hilite'>xsd:dateTime</span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<h4><a id="s_xml_literals" name="s_xml_literals">6.3.1.3. XML Literals</a></h4>
|
|
|
|
<p>XML documents cannot contain XML mark-up in their attributes, which means it is not possible to represent XML within <span class="aref">@content</span> (the following would cause an XML parser to
|
|
generate an error):</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<head>
|
|
<meta property="dc:title"
|
|
<span class='hilite'>content="E = mc<sup>2</sup>: The Most Urgent Problem of Our Time"</span> />
|
|
</head>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>It does not help to escape the content, since the output would simply be a string of text containing numerous ampersands:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<> dc:title "E = mc<span class='hilite'>&lt;sup&gt;2&amp;lt;/sup&gt;</span>: The Most Urgent Problem of Our Time" .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>RDFa therefore supports the use of normal mark-up to express XML literals, by using <span class="aref">@datatype</span>:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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>
|
|
</div>
|
|
|
|
<p>This would generate the following triple, with the XML preserved in the literal:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<> dc:title "E = mc<sup>2</sup>: The Most Urgent Problem of Our Time"^^rdf:XMLLiteral .
|
|
</pre>
|
|
</div>
|
|
|
|
<p> Note that this requires that a URI mapping for the prefix <code>rdf</code> has been defined. To make authoring easier, if there are child elements and no <span class="aref">@datatype</span>
|
|
attribute, then the effect is the same as if <span class="aref">@datatype</span> have been explicitly set to <code>rdf:XMLLiteral</code>:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<h2 property="dc:title">
|
|
E = mc<sup>2</sup>: The Most Urgent Problem of Our Time
|
|
</h2>
|
|
</pre>
|
|
</div>
|
|
|
|
<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 mark-up means nothing, and can therefore be
|
|
ignored. In this situation an empty <span class="aref">@datatype</span> value can be used to override the XML literal behaviour:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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>
|
|
</div>
|
|
|
|
<p>Although the rendering of this page has highlighted the term the user searched for, setting <span class="aref">@datatype</span> to nothing ensures that the data is interpreted as a plain literal,
|
|
giving the following triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://dbpedia.org/resource/Albert_Einstein> foaf:name <span class='hilite'>"Albert Einstein"</span> .
|
|
</pre>
|
|
</div>
|
|
|
|
<p>Note that the value of this [<a href="#s_xml_literals" class="tref">XML Literal</a>] is the exclusive canonicalization of the RDFa element's value.</p>
|
|
|
|
<p> <span class="mustnot">Although the RDFa processing model requires visiting each element in the tree, if the processor meets an [<a href="#s_xml_literals" class="tref">XML literal</a>] then it
|
|
MUST NOT process any further down the tree.</span> This is to prevent triples being generated from mark-up that is not actually in the hierarchy. For example, we might want to set the title of
|
|
something to some XHTML that itself includes RDFa:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<h2 <span class='hilite'>property="dc:title"</span>>
|
|
Example 3: <span about="#bbq" typeof="cal:Vevent">...</span>
|
|
</h2>
|
|
</pre>
|
|
</div>
|
|
|
|
<p> In this example the nested RDFa should not be parsed. This effectively means that the presence of <span class="aref">@property</span> without <span class="aref">@content</span> will inhibit any
|
|
further processing, so authors should watch out for stray attributes, especially if they find that they are getting fewer triples than they had expected.</p>
|
|
|
|
<h3><a id="sec_6.3.2." name="sec_6.3.2.">6.3.2. URI object resolution</a></h3>
|
|
|
|
<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 [<span class="tdef" id="T_URI_object">URI object</span>]s are needed when <span class="aref">@rel</span> or <span class="aref">@rev</span> is present. Each attribute will cause
|
|
triples to be generated when used with <span class="aref">@href</span>, <span class="aref">@resource</span> or <span class="aref">@src</span>, or with the subject value of any nested statement if
|
|
none of these attributes are present.</p>
|
|
|
|
<p> <span class="aref">@rel</span> and <span class="aref">@rev</span> are essentially the inverse of each other; whilst <span class="aref">@rel</span> establishes a relationship between the [<a href=
|
|
"#T_current_subject" class="tref">current subject</a>] as subject, and the [<a href="#T_current_object_resource" class="tref">current object resource</a>] as the object, <span class="aref">
|
|
@rev</span> does the exact opposite, and uses the [<a href="#T_current_object_resource" class="tref">current object resource</a>] as the subject, and the [<a href="#T_current_subject" class=
|
|
"tref">current subject</a>] as the object.</p>
|
|
|
|
<h4><a id="sec_6.3.2.1." name="sec_6.3.2.1.">6.3.2.1. Using <span class="aref">@resource</span> to set the object</a></h4>
|
|
|
|
<p>RDFa provides the <span class="aref">@resource</span> 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>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<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>
|
|
</div>
|
|
|
|
<p>The <code>blockquote</code> element generates the following triple:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<http://www.example.com/candp.xhtml#q1>
|
|
<http://purl.org/dc/elements/1.1/source> <urn:ISBN:0140449132> .
|
|
</pre>
|
|
</div>
|
|
|
|
<h4><a id="sec_6.3.2.2." name="sec_6.3.2.2.">6.3.2.2. Using <span class="aref">@href</span></a></h4>
|
|
|
|
<p> If no <span class="aref">@resource</span> is present, then <span class="aref">@href</span> is next in priority order, for setting the object.</p>
|
|
|
|
<p>When a predicate has been expressed using <span class="aref">@rel</span>, the <span class="aref">@href</span> on the [RDFa statement]'s element is used to identify the object with a [URI
|
|
reference]. Its type is a URI:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<link about="mailto:john@example.org"
|
|
<span class='hilite'>rel="foaf:knows" href="mailto:sue@example.org"</span> />
|
|
</pre>
|
|
</div>
|
|
|
|
<p>It's also possible to use both <span class="aref">@rel</span> and <span class="aref">@rev</span> 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>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<img src="photo1.jpg" <span class='hilite'>rel="dc:creator" rev="foaf:img"</span>
|
|
href="http://www.blogger.com/profile/1109404" />
|
|
</pre>
|
|
</div>
|
|
|
|
<p>which then yields two triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<photo1.jpg>
|
|
dc:creator <http://www.blogger.com/profile/1109404> .
|
|
<http://www.blogger.com/profile/1109404>
|
|
foaf:img <photo1.jpg> .
|
|
</pre>
|
|
</div>
|
|
|
|
<h4><a id="sec_6.3.2.3." name="sec_6.3.2.3.">6.3.2.3. Incomplete triples</a></h4>
|
|
|
|
<p>When a triple predicate has been expressed using <span class="aref">@rel</span> or <span class="aref">@rev</span>, but no <span class="aref">@href</span>, <span class="aref">@src</span>, or <span
|
|
class="aref">@resource</span> 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.,
|
|
<span class="aref">@rel</span> values, or not, i.e., <span class="aref">@rev</span> 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>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="s_curies" name="s_curies">7. CURIE Syntax Definition</a></h1>
|
|
|
|
<p><i>This section is normative.</i></p>
|
|
|
|
<p>The key component of RDF is the URI, but these are usually long and unwieldy. RDFa therefore supports a mechanism by which URIs can be abbreviated, called 'compact URIs' or simply, CURIEs.</p>
|
|
|
|
<p>A CURIE is comprised of two components, a <em>prefix</em> and a <em>reference</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 usually 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. However, RDFa does not define a 'no prefix' mapping,
|
|
meaning that this form of CURIE is not supported.</p>
|
|
|
|
<p> The general syntax of a CURIE can be summarised as follows:</p>
|
|
|
|
<pre>
|
|
<span id="P_curie">curie := [ [ prefix ] ':' ] reference</span>
|
|
|
|
<span id="P_prefix">prefix</span> := <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">NCName</a>
|
|
|
|
<span id="P_reference">reference</span> := irelative-ref (as defined in [<a class="nref" href="#ref_IRI">IRI</a>])
|
|
</pre>
|
|
|
|
<p> In some situations an attribute will allow either a CURIE, or a normal URI. Since it is difficult to distinguish between CURIEs and URIs, the CURIE syntax adds the notion of a [<span class="tdef"
|
|
id="T_safe_CURIE">safe CURIE</span>]. The syntax is simply to surround the CURIE with square brackets:</p>
|
|
|
|
<pre>
|
|
<span id="P_safe_curie">safe_curie := '[' curie ']'</span>
|
|
</pre>
|
|
|
|
<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 URIs;</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 href="#T_current_element" class="tref">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, which effectively prohibits the use of CURIEs that do not contain a colon;</li>
|
|
|
|
<li>the <strong>mapping to use with the '_' prefix</strong>, is not explicitly stated, but since it is used to generate [<a href="#T_bnode" class="tref">bnode</a>]s, its implementation needs to be
|
|
compatible with the RDF definition.</li>
|
|
</ul>
|
|
|
|
<p><span class="must">A CURIE is a representation of a full URI. This URI is obtained by taking the currently in-scope mapping that is associated with <code>prefix</code>, and concatenating it with
|
|
the <code>reference</code>. The resulting URI MUST be a syntactically valid IRI [<a class="nref" href="#ref_IRI">IRI</a>]</span>. For a more detailed explanation see <a href="#s_curieprocessing">
|
|
CURIE and URI Processing</a>. Note that while the <em>lexical space</em> of a CURIE is as defined in <a href="#P_curie">curie</a> above, the <em>value space</em> is the set of IRIs.</p>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="s_xhtmlrdfa" name="s_xhtmlrdfa">8. XHTML+RDFa Definition</a></h1>
|
|
|
|
<p><em>This section is normative.</em></p>
|
|
|
|
<p>The XHTML+RDFa document type is a fully functional document type with rich semantics. It is a superset of [<a class="nref" href="#ref_XHTML11">XHTML11</a>].</p>
|
|
|
|
<p>The XHTML+RDFa 1.0 document type is made up of the following XHTML modules. The elements, attributes, and content models associated with these modules are defined in "XHTML Modularization" [<a
|
|
class="nref" href="#ref_XHTMLMOD">XHTMLMOD</a>]. The elements are listed here for information purposes, but the definitions in "XHTML Modularization" should be considered authoritative. In the
|
|
on-line version of this document, the module names in the list below link into the definitions of the modules within the current versions of "XHTML Modularization".</p>
|
|
|
|
<dl>
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_structuremodule">Structure Module</a></dt>
|
|
|
|
<dd><code>body, head, html, title</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_textmodule">Text Module</a></dt>
|
|
|
|
<dd><code>abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_hypertextmodule">Hypertext Module</a></dt>
|
|
|
|
<dd><code>a</code>, and <span class="aref">@href</span> is available on all elements.</dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_listmodule">List Module</a></dt>
|
|
|
|
<dd><code>dl, dt, dd, ol, ul, li</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_objectmodule">Object Module</a></dt>
|
|
|
|
<dd><code>object, param</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_presentationmodule">Presentation Module</a></dt>
|
|
|
|
<dd><code>b, big, hr, i, small, sub, sup, tt</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_editmodule">Edit Module</a></dt>
|
|
|
|
<dd><code>del, ins</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_bdomodule">Bidirectional Text Module</a></dt>
|
|
|
|
<dd><code>bdo</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_extformsmodule">Forms Module</a></dt>
|
|
|
|
<dd><code>button, fieldset, form, input, label, legend, select, optgroup, option, textarea</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_tablemodule">Table Module</a></dt>
|
|
|
|
<dd><code>caption, col, colgroup, table, tbody, td, tfoot, th, thead, tr</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_imagemodule">Image Module</a></dt>
|
|
|
|
<dd><code>img</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_imapmodule">Client-side Image Map Module</a></dt>
|
|
|
|
<dd><code>area, map</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_servermapmodule">Server-side Image Map Module</a></dt>
|
|
|
|
<dd>Attribute <code>ismap</code> on <code>img</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_intrinsiceventsmodule">Intrinsic Events Module</a></dt>
|
|
|
|
<dd>Events attributes</dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_metamodule">Metainformation Module</a></dt>
|
|
|
|
<dd><code>meta</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_scriptmodule">Scripting Module</a></dt>
|
|
|
|
<dd><code>noscript, script</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_stylemodule">Stylesheet Module</a></dt>
|
|
|
|
<dd><code>style</code> element</dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_styleattributemodule">Style Attribute Module</a> <em>Deprecated</em></dt>
|
|
|
|
<dd><span class="aref">@style</span></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_targetmodule">Target Module</a></dt>
|
|
|
|
<dd><span class="aref">@target</span></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_linkmodule">Link Module</a></dt>
|
|
|
|
<dd><code>link</code></dd>
|
|
|
|
<dt><a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_basemodule">Base Module</a></dt>
|
|
|
|
<dd><code>base</code></dd>
|
|
|
|
<dt><a href="#s_metaAttributes">Metainformation Attributes Module</a></dt>
|
|
|
|
<dd><span class="aref">@about</span>, <span class="aref">@content</span>, <span class="aref">@datatype</span>, <span class="aref">@typeof</span>, <span class="aref">@property</span>, <span class=
|
|
"aref">@rel</span>, <span class="aref">@resource</span>, <span class="aref">@rev</span></dd>
|
|
</dl>
|
|
|
|
<p>XHTML+RDFa also uses the Ruby Annotation module as defined in [<a class="nref" href="#ref_RUBY">RUBY</a>]:</p>
|
|
|
|
<dl>
|
|
<dt>Ruby Annotation Module</dt>
|
|
|
|
<dd><code>ruby, rbc, rtc, rb, rt, rp</code></dd>
|
|
</dl>
|
|
|
|
<p>There are no additional definitions required by this document type. An implementation of this document type as an <!--
|
|
XML Schema is defined in
|
|
<a href="xhtml11_schema.html#a_xhtml11_schema">Appendix D</a>, and as an
|
|
--> XML DTD is defined in <a href="#a_xhtmlrdfa_dtd">Appendix A</a>.</p>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="s_metaAttributes" name="s_metaAttributes">9. Metainformation Attributes Module</a></h1>
|
|
|
|
<p>This section is <em>normative</em>.</p>
|
|
|
|
<p>The Metainformation Attributes Module defines the <code>Metainformation</code> attribute collection. This collection allows elements to be annotated with metadata throughout an XHTML-family
|
|
document. When this module is included in a markup language, this collection is added to the <code>Common</code> attribute collection as defined in [<a class="nref" href=
|
|
"#ref_XHTMLMOD">XHTMLMOD</a>].</p>
|
|
|
|
<h2><a id="sec_9.1." name="sec_9.1.">9.1. Datatypes</a></h2>
|
|
|
|
<p>Some of the attributes in this section use the following datatypes:</p>
|
|
|
|
<table border='1' summary='Custom data types'>
|
|
<tr>
|
|
<th>Data type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td id="dt_curie">CURIE</td>
|
|
<td>A Compact URI or <a href="#P_curie">curie</a>.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td id="dt_curies">CURIEs</td>
|
|
<td>A whitespace separated list of <span class="datatype"><a href="#dt_curie">CURIE</a></span>s.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td id="dt_uriorsafecurie">URIorSafeCURIE</td>
|
|
<td>A <span class="datatype"><a href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_URI">URI</a></span> or <a href="#P_safe_curie">safe_curie</a>.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>Note that a specification of these data types in XML DTD and XML Schema is available in <a href="#s_datatypes">Appendix B</a>.</p>
|
|
|
|
<h2><a id="col_Metainformation" name="col_Metainformation">9.2. Metainformation Attributes Collection</a></h2>
|
|
|
|
<p>The following attributes are included in the attribute collection, and take values in the associated datatype:</p>
|
|
|
|
<table class="moduledef" border="1" summary="Metainformation Attribute Collection">
|
|
<thead>
|
|
<tr>
|
|
<th>Attributes</th>
|
|
<th>Notes</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<td><span id="A_about">about</span> (<span class="datatype"><a href="#dt_uriorsafecurie">URIorSafeCURIE</a></span>)</td>
|
|
<td> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><span id="A_content">content</span> (<span class="datatype"><a href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_CDATA">CDATA</a></span>)</td>
|
|
<td> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><span id="A_datatype">datatype</span> (<span class="datatype"><a href="#dt_curie">CURIE</a></span>)</td>
|
|
<td>If not specified, then the default value is <code>string</code> as defined in [<a class="nref" href="#ref_XMLSCHEMA">XMLSCHEMA</a>].</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><span id="A_typeof">typeof</span> (<span class="datatype"><a href="#dt_curies">CURIEs</a></span>)</td>
|
|
<td> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><span id="A_property">property</span> (<span class="datatype"><a href="#dt_curies">CURIEs</a></span>)</td>
|
|
<td> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><span id="A_rel">rel</span> (reserved word | <span class="datatype"><a href="#dt_curie">CURIE</a></span>)+</td>
|
|
<td>See the reserved values list in <a href="#relValues">@rel/@rev Attribute Values</a></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><span id="A_resource">resource</span> (<span class="datatype"><a href="#dt_uriorsafecurie">URIorSafeCURIE</a></span>)</td>
|
|
<td> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><span id="A_rev">rev</span> (reserved word | <span class="datatype"><a href="#dt_curie">CURIE</a></span>)+</td>
|
|
<td>See the reserved values list in <a href="#relValues">@rel/@rev attribute values</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>An implementation of this module can be found in <a href="#a_xhtmlrdfa_dtd">Appendix A</a>.</p>
|
|
|
|
<h2><a id="relValues" name="relValues">9.3. @rel/@rev attribute values</a></h2>
|
|
|
|
<p>The list of reserved values for <span class="aref">@rel</span> and <span class="aref">@rev</span> are:</p>
|
|
|
|
<dl>
|
|
<dt>alternate</dt>
|
|
|
|
<dd>Designates alternate versions for a resource.</dd>
|
|
|
|
<dt>appendix</dt>
|
|
|
|
<dd>Refers to a resource serving as an appendix in a collection.</dd>
|
|
|
|
<dt>bookmark</dt>
|
|
|
|
<dd>Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The <span class="aref">@title</span> attribute may be used, for example, to label the bookmark. Note
|
|
that several bookmarks may be defined for a document.</dd>
|
|
|
|
<dt>cite</dt>
|
|
|
|
<dd>
|
|
<p>Refers to a resource that defines a citation. In the following example, the <code>cite</code> is used to reference the book from which the quotation is taken:</p>
|
|
|
|
<div class="example">
|
|
<p>cite as book reference</p>
|
|
|
|
<pre>
|
|
As Gandalf the White said in
|
|
<span <span class='hilite'>rel="cite"</span> resource="http://www.example.com/books/the_two_towers">
|
|
The Two Towers
|
|
</span>,
|
|
<quote xml:lang="en">"The hospitality of
|
|
your hall is somewhat lessened of late, Theoden King."</quote>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>which would generate the following triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<> xhv:cite <http://www.example.com/books/the_two_towers> .
|
|
</pre>
|
|
</div>
|
|
|
|
<code>cite</code> is also useful for referencing specifications:
|
|
|
|
<div class="example">
|
|
<p>cite to reference another specification</p>
|
|
|
|
<pre>
|
|
More information can be found in
|
|
<span <span class='hilite'>rel="cite"</span> resource="http://www.w3.org/TR/REC-xml">[XML]</cite>.
|
|
</pre>
|
|
</div>
|
|
|
|
<p>which would generate the following triples:</p>
|
|
|
|
<div class="texample">
|
|
<pre>
|
|
<> xhv:cite <http://www.w3.org/TR/REC-xml> .
|
|
</pre>
|
|
</div>
|
|
</dd>
|
|
|
|
<dt>chapter</dt>
|
|
|
|
<dd>Refers to a resource serving as a chapter in a collection.</dd>
|
|
|
|
<dt>contents</dt>
|
|
|
|
<dd>Refers to a resource serving as a table of contents.</dd>
|
|
|
|
<dt>copyright</dt>
|
|
|
|
<dd>Refers to a copyright statement for the resource.</dd>
|
|
|
|
<dt>first</dt>
|
|
|
|
<dd>Refers to the first item in a collection (see also start and top).</dd>
|
|
|
|
<dt>glossary</dt>
|
|
|
|
<dd>Refers to a resource providing a glossary of terms.</dd>
|
|
|
|
<dt>help</dt>
|
|
|
|
<dd>Refers to a resource offering help (more information, links to other sources of information, etc.)</dd>
|
|
|
|
<dt>icon</dt>
|
|
|
|
<dd>Refers to a resource that represents an icon.</dd>
|
|
|
|
<dt>index</dt>
|
|
|
|
<dd>Refers to a resource providing an index.</dd>
|
|
|
|
<dt>last</dt>
|
|
|
|
<dd>Refers to the last resource in a collection of resources.</dd>
|
|
|
|
<dt>license</dt>
|
|
|
|
<dd>Refers to a resource that defines the license associated with a resource.</dd>
|
|
|
|
<dt>meta</dt>
|
|
|
|
<dd>Refers to a resource that provides metadata, for instance in RDF.</dd>
|
|
|
|
<dt>next</dt>
|
|
|
|
<dd>Refers to the next resource (after the current one) in an ordered collection.</dd>
|
|
|
|
<dt>p3pv1</dt>
|
|
|
|
<dd>Refers to a P3P Policy Reference File. See [<a class="nref" href="#ref_P3P">P3P</a>].</dd>
|
|
|
|
<dt>prev</dt>
|
|
|
|
<dd>Refers to the previous resource (before the current one) in an ordered collection.</dd>
|
|
|
|
<dt>role</dt>
|
|
|
|
<dd>Indicates the purpose of the resource. For some possible values, see [<a class="nref" href="#ref_XHTMLVOCAB">XHTMLVOCAB</a>].</dd>
|
|
|
|
<dt>section</dt>
|
|
|
|
<dd>Refers to a resource serving as a section in a collection.</dd>
|
|
|
|
<dt>stylesheet</dt>
|
|
|
|
<dd>Refers to a resource acting as a stylesheet for a resource.</dd>
|
|
|
|
<dt>subsection</dt>
|
|
|
|
<dd>Refers to a resource serving as a subsection in a collection.</dd>
|
|
|
|
<dt>start</dt>
|
|
|
|
<dd>Refers to the first resource in a collection of resources. A typical use case might be a collection of chapters in a book.</dd>
|
|
|
|
<dt>top</dt>
|
|
|
|
<dd>Synonym for start.</dd>
|
|
|
|
<dt>up</dt>
|
|
|
|
<dd>Refers to the resource "above" in a hierarchically structured set.</dd>
|
|
</dl>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="a_xhtmlrdfa_dtd" name="a_xhtmlrdfa_dtd">A. XHTML+RDFa DTD</a></h1>
|
|
|
|
<p>This appendix is <em>normative</em>.</p>
|
|
|
|
<p>This appendix includes an implementation of the XHTML+RDFa 1.0 language as an XML DTD. It is implemented by combining the XHTML 1.1 DTD with the XHTML Metainformation Attribute Module. This is
|
|
done by using a content model module, and then a driver module. There are direct links to the various files, and the files are also contained in the "Gzip'd TAR" and "Zip" archives linked to at the
|
|
top of this document. Please note that the files targeted by the "latest version" links may change slowly over time. See the <a href="http://www.w3.org/MarkUp/"><acronym title="World Wide Web
|
|
Consortium">W3C</acronym> <acronym title="HyperText Markup Language">XHTML2</acronym> Working Group</a> home page for more information.</p>
|
|
|
|
<h2><a id="a_DTD_xhtml_metaAttributes_module" name="a_DTD_xhtml_metaAttributes_module">A.1. XHTML Metainformation Attributes Module</a></h2>
|
|
|
|
<p>You can download this version of this file from <a href="DTD/xhtml-metaAttributes-1.mod">http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/DTD/xhtml-metaAttributes-1.mod</a>. The latest version
|
|
is available at <a href="http://www.w3.org/MarkUp/DTD/xhtml-metaAttributes-1.mod">http://www.w3.org/MarkUp/DTD/xhtml-metaAttributes-1.mod</a>.</p>
|
|
|
|
<pre class="dtd">
|
|
<!-- ...................................................................... -->
|
|
<!-- XHTML MetaAttributes Module ......................................... -->
|
|
<!-- file: xhtml-metaAttributes-1.mod
|
|
|
|
This is XHTML-RDFa, modules to annotate XHTML family documents.
|
|
Copyright 2007-2008 W3C (MIT, ERCIM, Keio), All Rights Reserved.
|
|
Revision: $Id: Overview.html,v 1.1 2008/10/13 15:17:31 swick Exp $
|
|
|
|
This DTD module is identified by the PUBLIC and SYSTEM identifiers:
|
|
|
|
PUBLIC "-//W3C//ENTITIES XHTML MetaAttributes 1.0//EN"
|
|
SYSTEM "http://www.w3.org/MarkUp/DTD/xhtml-metaAttributes-1.mod"
|
|
|
|
Revisions:
|
|
(none)
|
|
....................................................................... -->
|
|
|
|
<!ENTITY <span class="entity">% XHTML.global.attrs.prefixed</span> "IGNORE" >
|
|
|
|
<!-- Placeholder Compact URI-related types -->
|
|
<!ENTITY <span class="entity">% CURIE.datatype</span> "CDATA" >
|
|
<!ENTITY <span class="entity">% CURIEs.datatype</span> "CDATA" >
|
|
<!ENTITY <span class="entity">% SafeCURIE.datatype</span> "CDATA" >
|
|
<!ENTITY <span class="entity">% SafeCURIEs.datatype</span> "CDATA" >
|
|
<!ENTITY <span class="entity">% URIorSafeCURIE.datatype</span> "CDATA" >
|
|
<!ENTITY <span class="entity">% URIorSafeCURIEs.datatype</span> "CDATA" >
|
|
|
|
<!-- Common Attributes
|
|
|
|
This module declares a collection of meta-information related
|
|
attributes.
|
|
|
|
%NS.decl.attrib; is declared in the XHTML Qname module.
|
|
|
|
This file also includes declarations of "global" versions of the
|
|
attributes. The global versions of the attributes are for use on
|
|
elements in other namespaces.
|
|
-->
|
|
|
|
<!ENTITY <span class="entity">% about.attrib</span>
|
|
"about %URIorSafeCURIE.datatype; #IMPLIED"
|
|
>
|
|
|
|
<![%XHTML.global.attrs.prefixed;[
|
|
<!ENTITY <span class="entity">% XHTML.global.about.attrib</span>
|
|
"%XHTML.prefix;:about %URIorSafeCURIE.datatype; #IMPLIED"
|
|
>
|
|
]]>
|
|
|
|
<!ENTITY <span class="entity">% typeof.attrib</span>
|
|
"typeof %CURIEs.datatype; #IMPLIED"
|
|
>
|
|
|
|
<![%XHTML.global.attrs.prefixed;[
|
|
<!ENTITY <span class="entity">% XHTML.global.typeof.attrib</span>
|
|
"%XHTML.prefix;:typeof %CURIEs.datatype; #IMPLIED"
|
|
>
|
|
]]>
|
|
|
|
<!ENTITY <span class="entity">% property.attrib</span>
|
|
"property %CURIEs.datatype; #IMPLIED"
|
|
>
|
|
|
|
<![%XHTML.global.attrs.prefixed;[
|
|
<!ENTITY <span class="entity">% XHTML.global.property.attrib</span>
|
|
"%XHTML.prefix;:property %CURIEs.datatype; #IMPLIED"
|
|
>
|
|
]]>
|
|
|
|
<!ENTITY <span class="entity">% resource.attrib</span>
|
|
"resource %URIorSafeCURIE.datatype; #IMPLIED"
|
|
>
|
|
|
|
<![%XHTML.global.attrs.prefixed;[
|
|
<!ENTITY <span class="entity">% XHTML.global.resource.attrib</span>
|
|
"%XHTML.prefix;:resource %URIorSafeCURIE.datatype; #IMPLIED"
|
|
>
|
|
]]>
|
|
|
|
<!ENTITY <span class="entity">% content.attrib</span>
|
|
"content CDATA #IMPLIED"
|
|
>
|
|
|
|
<![%XHTML.global.attrs.prefixed;[
|
|
<!ENTITY <span class="entity">% XHTML.global.content.attrib</span>
|
|
"%XHTML.prefix;:content CDATA #IMPLIED"
|
|
>
|
|
]]>
|
|
|
|
<!ENTITY <span class="entity">% datatype.attrib</span>
|
|
"datatype %CURIE.datatype; #IMPLIED"
|
|
>
|
|
|
|
<![%XHTML.global.attrs.prefixed;[
|
|
<!ENTITY <span class="entity">% XHTML.global.datatype.attrib</span>
|
|
"%XHTML.prefix;:datatype %CURIE.datatype; #IMPLIED"
|
|
>
|
|
]]>
|
|
|
|
<!ENTITY <span class="entity">% rel.attrib</span>
|
|
"rel %CURIEs.datatype; #IMPLIED"
|
|
>
|
|
|
|
<![%XHTML.global.attrs.prefixed;[
|
|
<!ENTITY <span class="entity">% XHTML.global.rel.attrib</span>
|
|
"%XHTML.prefix;:rel %CURIEs.datatype; #IMPLIED"
|
|
>
|
|
]]>
|
|
|
|
<!ENTITY <span class="entity">% rev.attrib</span>
|
|
"rev %CURIEs.datatype; #IMPLIED"
|
|
>
|
|
|
|
<![%XHTML.global.attrs.prefixed;[
|
|
<!ENTITY <span class="entity">% XHTML.global.rev.attrib</span>
|
|
"%XHTML.prefix;:rev %CURIEs.datatype; #IMPLIED"
|
|
>
|
|
]]>
|
|
|
|
<!ENTITY <span class="entity">% Metainformation.extra.attrib</span> "" >
|
|
|
|
<!ENTITY <span class="entity">% Metainformation.attrib</span>
|
|
"%about.attrib;
|
|
%content.attrib;
|
|
%datatype.attrib;
|
|
%typeof.attrib;
|
|
%property.attrib;
|
|
%rel.attrib;
|
|
%resource.attrib;
|
|
%rev.attrib;
|
|
%Metainformation.extra.attrib;"
|
|
>
|
|
|
|
<!ENTITY <span class="entity">% XHTML.global.metainformation.extra.attrib</span> "" >
|
|
|
|
<![%XHTML.global.attrs.prefixed;[
|
|
|
|
<!ENTITY <span class="entity">% XHTML.global.metainformation.attrib</span>
|
|
"%XHTML.global.about.attrib;
|
|
%XHTML.global.content.attrib;
|
|
%XHTML.global.datatype.attrib;
|
|
%XHTML.global.typeof.attrib;
|
|
%XHTML.global.property.attrib;
|
|
%XHTML.global.rel.attrib;
|
|
%XHTML.global.resource.attrib;
|
|
%XHTML.global.rev.attrib;
|
|
%XHTML.global.metainformation.extra.attrib;"
|
|
>
|
|
]]>
|
|
|
|
<!ENTITY <span class="entity">% XHTML.global.metainformation.attrib</span> "" >
|
|
|
|
|
|
<!-- end of xhtml-metaAttributes-1.mod -->
|
|
|
|
</pre>
|
|
|
|
<h2><a id="a_DTD_content_model" name="a_DTD_content_model">A.2. XHTML+RDFa Content Model Module</a></h2>
|
|
|
|
<p>You can download this version of this file from <a href="DTD/xhtml-rdfa-model-1.mod">http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/DTD/xhtml-rdfa-model-1.mod</a>. The latest version is
|
|
available at <a href="http://www.w3.org/MarkUp/DTD/xhtml-rdfa-model-1.mod">http://www.w3.org/MarkUp/DTD/xhtml-rdfa-model-1.mod</a>.</p>
|
|
|
|
<pre class="dtd">
|
|
<!-- ....................................................................... -->
|
|
<!-- XHTML+RDFa Document Model Module ..................................... -->
|
|
<!-- file: xhtml-rdfa-model-1.mod
|
|
|
|
This is XHTML+RDFa.
|
|
Copyright 1998-2008 W3C (MIT, ERCIM, Keio), All Rights Reserved.
|
|
Revision: $Id: Overview.html,v 1.1 2008/10/13 15:17:31 swick Exp $ SMI
|
|
|
|
This DTD module is identified by the PUBLIC and SYSTEM identifiers:
|
|
|
|
PUBLIC "-//W3C//ENTITIES XHTML+RDFa Document Model 1.0//EN"
|
|
SYSTEM "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-model-1.mod"
|
|
|
|
Revisions:
|
|
(none)
|
|
....................................................................... -->
|
|
|
|
<!-- XHTML+RDFa Document Model
|
|
|
|
This module describes the groupings of elements that make up
|
|
common content models for XHTML elements.
|
|
|
|
XHTML has three basic content models:
|
|
|
|
%Inline.mix; character-level elements
|
|
%Block.mix; block-like elements, eg., paragraphs and lists
|
|
%Flow.mix; any block or inline elements
|
|
|
|
Any parameter entities declared in this module may be used
|
|
to create element content models, but the above three are
|
|
considered 'global' (insofar as that term applies here).
|
|
|
|
The reserved word '#PCDATA' (indicating a text string) is now
|
|
included explicitly with each element declaration that is
|
|
declared as mixed content, as XML requires that this token
|
|
occur first in a content model specification.
|
|
-->
|
|
<!-- Extending the Model
|
|
|
|
While in some cases this module may need to be rewritten to
|
|
accommodate changes to the document model, minor extensions
|
|
may be accomplished by redeclaring any of the three *.extra;
|
|
parameter entities to contain extension element types as follows:
|
|
|
|
%Misc.extra; whose parent may be any block or
|
|
inline element.
|
|
|
|
%Inline.extra; whose parent may be any inline element.
|
|
|
|
%Block.extra; whose parent may be any block element.
|
|
|
|
If used, these parameter entities must be an OR-separated
|
|
list beginning with an OR separator ("|"), eg., "| a | b | c"
|
|
|
|
All block and inline *.class parameter entities not part
|
|
of the *struct.class classes begin with "| " to allow for
|
|
exclusion from mixes.
|
|
-->
|
|
|
|
<!-- .............. Optional Elements in head .................. -->
|
|
|
|
<!ENTITY <span class="entity">% HeadOpts.mix</span>
|
|
"( %script.qname; | %style.qname; | %meta.qname;
|
|
| %link.qname; | %object.qname; )*"
|
|
>
|
|
|
|
<!-- ................. Miscellaneous Elements .................. -->
|
|
|
|
<!-- ins and del are used to denote editing changes
|
|
-->
|
|
<!ENTITY <span class="entity">% Edit.class</span> "| %ins.qname; | %del.qname;" >
|
|
|
|
<!-- script and noscript are used to contain scripts
|
|
and alternative content
|
|
-->
|
|
<!ENTITY <span class="entity">% Script.class</span> "| %script.qname; | %noscript.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% Misc.extra</span> "" >
|
|
|
|
<!-- These elements are neither block nor inline, and can
|
|
essentially be used anywhere in the document body.
|
|
-->
|
|
<!ENTITY <span class="entity">% Misc.class</span>
|
|
"%Edit.class;
|
|
%Script.class;
|
|
%Misc.extra;"
|
|
>
|
|
|
|
<!-- .................... Inline Elements ...................... -->
|
|
|
|
<!ENTITY <span class="entity">% InlStruct.class</span> "%br.qname; | %span.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% InlPhras.class</span>
|
|
"| %em.qname; | %strong.qname; | %dfn.qname; | %code.qname;
|
|
| %samp.qname; | %kbd.qname; | %var.qname; | %cite.qname;
|
|
| %abbr.qname; | %acronym.qname; | %q.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% InlPres.class</span>
|
|
"| %tt.qname; | %i.qname; | %b.qname; | %big.qname;
|
|
| %small.qname; | %sub.qname; | %sup.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% I18n.class</span> "| %bdo.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% Anchor.class</span> "| %a.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% InlSpecial.class</span>
|
|
"| %img.qname; | %map.qname;
|
|
| %object.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% InlForm.class</span>
|
|
"| %input.qname; | %select.qname; | %textarea.qname;
|
|
| %label.qname; | %button.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% Inline.extra</span> "" >
|
|
|
|
<!ENTITY <span class="entity">% Ruby.class</span> "| %ruby.qname;" >
|
|
|
|
<!-- %Inline.class; includes all inline elements,
|
|
used as a component in mixes
|
|
-->
|
|
<!ENTITY <span class="entity">% Inline.class</span>
|
|
"%InlStruct.class;
|
|
%InlPhras.class;
|
|
%InlPres.class;
|
|
%I18n.class;
|
|
%Anchor.class;
|
|
%InlSpecial.class;
|
|
%InlForm.class;
|
|
%Ruby.class;
|
|
%Inline.extra;"
|
|
>
|
|
|
|
<!-- %InlNoRuby.class; includes all inline elements
|
|
except ruby, used as a component in mixes
|
|
-->
|
|
<!ENTITY <span class="entity">% InlNoRuby.class</span>
|
|
"%InlStruct.class;
|
|
%InlPhras.class;
|
|
%InlPres.class;
|
|
%I18n.class;
|
|
%Anchor.class;
|
|
%InlSpecial.class;
|
|
%InlForm.class;
|
|
%Inline.extra;"
|
|
>
|
|
|
|
<!-- %NoRuby.content; includes all inlines except ruby
|
|
-->
|
|
<!ENTITY <span class="entity">% NoRuby.content</span>
|
|
"( #PCDATA
|
|
| %InlNoRuby.class;
|
|
%Misc.class; )*"
|
|
>
|
|
|
|
<!-- %InlNoAnchor.class; includes all non-anchor inlines,
|
|
used as a component in mixes
|
|
-->
|
|
<!ENTITY <span class="entity">% InlNoAnchor.class</span>
|
|
"%InlStruct.class;
|
|
%InlPhras.class;
|
|
%InlPres.class;
|
|
%I18n.class;
|
|
%InlSpecial.class;
|
|
%InlForm.class;
|
|
%Ruby.class;
|
|
%Inline.extra;"
|
|
>
|
|
|
|
<!-- %InlNoAnchor.mix; includes all non-anchor inlines
|
|
-->
|
|
<!ENTITY <span class="entity">% InlNoAnchor.mix</span>
|
|
"%InlNoAnchor.class;
|
|
%Misc.class;"
|
|
>
|
|
|
|
<!-- %Inline.mix; includes all inline elements, including %Misc.class;
|
|
-->
|
|
<!ENTITY <span class="entity">% Inline.mix</span>
|
|
"%Inline.class;
|
|
%Misc.class;"
|
|
>
|
|
|
|
<!-- ..................... Block Elements ...................... -->
|
|
|
|
<!-- In the HTML 4.0 DTD, heading and list elements were included
|
|
in the %block; parameter entity. The %Heading.class; and
|
|
%List.class; parameter entities must now be included explicitly
|
|
on element declarations where desired.
|
|
-->
|
|
|
|
<!ENTITY <span class="entity">% Heading.class</span>
|
|
"%h1.qname; | %h2.qname; | %h3.qname;
|
|
| %h4.qname; | %h5.qname; | %h6.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% List.class</span> "%ul.qname; | %ol.qname; | %dl.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% Table.class</span> "| %table.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% Form.class</span> "| %form.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% Fieldset.class</span> "| %fieldset.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% BlkStruct.class</span> "%p.qname; | %div.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% BlkPhras.class</span>
|
|
"| %pre.qname; | %blockquote.qname; | %address.qname;" >
|
|
|
|
<!ENTITY <span class="entity">% BlkPres.class</span> "| %hr.qname; " >
|
|
|
|
<!ENTITY <span class="entity">% BlkSpecial.class</span>
|
|
"%Table.class;
|
|
%Form.class;
|
|
%Fieldset.class;"
|
|
>
|
|
|
|
<!ENTITY <span class="entity">% Block.extra</span> "" >
|
|
|
|
<!-- %Block.class; includes all block elements,
|
|
used as an component in mixes
|
|
-->
|
|
<!ENTITY <span class="entity">% Block.class</span>
|
|
"%BlkStruct.class;
|
|
%BlkPhras.class;
|
|
%BlkPres.class;
|
|
%BlkSpecial.class;
|
|
%Block.extra;"
|
|
>
|
|
|
|
<!-- %Block.mix; includes all block elements plus %Misc.class;
|
|
-->
|
|
<!ENTITY <span class="entity">% Block.mix</span>
|
|
"%Heading.class;
|
|
| %List.class;
|
|
| %Block.class;
|
|
%Misc.class;"
|
|
>
|
|
|
|
<!-- ................ All Content Elements .................. -->
|
|
|
|
<!-- %Flow.mix; includes all text content, block and inline
|
|
-->
|
|
<!ENTITY <span class="entity">% Flow.mix</span>
|
|
"%Heading.class;
|
|
| %List.class;
|
|
| %Block.class;
|
|
| %Inline.class;
|
|
%Misc.class;"
|
|
>
|
|
|
|
<!-- end of xhtml-rdfa-model-1.mod -->
|
|
|
|
</pre>
|
|
|
|
<h2><a id="a_DTD_driver" name="a_DTD_driver">A.3. XHTML+RDFa Driver Module</a></h2>
|
|
|
|
<p>You can download this version of this file from <a href="DTD/xhtml-rdfa-1.dtd">http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/DTD/xhtml-rdfa-1.dtd</a>. The latest version is available at <a
|
|
href="http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd</a>.</p>
|
|
|
|
<pre class="dtd">
|
|
<!-- ....................................................................... -->
|
|
<!-- XHTML 1.1 + RDFa DTD ................................................. -->
|
|
<!-- file: xhtml-rdfa-1.dtd
|
|
-->
|
|
|
|
<!-- XHTML 1.1 + RDFa DTD
|
|
|
|
This is an example markup language combining XHTML 1.1 and the RDFa
|
|
modules.
|
|
|
|
XHTML+RDFa
|
|
Copyright 1998-2008 World Wide Web Consortium
|
|
(Massachusetts Institute of Technology, European Research Consortium
|
|
for Informatics and Mathematics, Keio University).
|
|
All Rights Reserved.
|
|
|
|
Permission to use, copy, modify and distribute the XHTML DTD and its
|
|
accompanying documentation for any purpose and without fee is hereby
|
|
granted in perpetuity, provided that the above copyright notice and
|
|
this paragraph appear in all copies. The copyright holders make no
|
|
representation about the suitability of the DTD for any purpose.
|
|
|
|
It is provided "as is" without expressed or implied warranty.
|
|
|
|
-->
|
|
<!-- This is the driver file for version 1 of the XHTML + RDFa DTD.
|
|
|
|
Please use this public identifier to identify it:
|
|
|
|
"-//W3C//DTD XHTML+RDFa 1.0//EN"
|
|
-->
|
|
<!ENTITY <span class="entity">% XHTML.version</span> "XHTML+RDFa 1.0" >
|
|
|
|
<!-- Use this URI to identify the default namespace:
|
|
|
|
"http://www.w3.org/1999/xhtml"
|
|
|
|
See the Qualified Names module for information
|
|
on the use of namespace prefixes in the DTD.
|
|
|
|
Note that XHTML namespace elements are not prefixed by default,
|
|
but the XHTML namespace prefix is defined as "xhtml" so that
|
|
other markup languages can extend this one and use the XHTML
|
|
prefixed global attributes if required.
|
|
|
|
-->
|
|
<!ENTITY <span class="entity">% NS.prefixed</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% XHTML.prefix</span> "xhtml" >
|
|
|
|
<!-- Be sure to include prefixed global attributes - we don't need
|
|
them, but languages that extend XHTML 1.1 might.
|
|
-->
|
|
<!ENTITY <span class="entity">% XHTML.global.attrs.prefixed</span> "INCLUDE" >
|
|
|
|
<!-- Reserved for use with the XLink namespace:
|
|
-->
|
|
<!ENTITY <span class="entity">% XLINK.xmlns</span> "" >
|
|
<!ENTITY <span class="entity">% XLINK.xmlns.attrib</span> "" >
|
|
|
|
<!-- For example, if you are using XHTML 1.1 directly, use the public
|
|
identifier in the DOCTYPE declaration, with the namespace declaration
|
|
on the document element to identify the default namespace:
|
|
|
|
<?xml version="1.0"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
xml:lang="en">
|
|
...
|
|
</html>
|
|
|
|
Revisions:
|
|
(none)
|
|
-->
|
|
|
|
<!-- reserved for future use with document profiles -->
|
|
<!ENTITY <span class="entity">% XHTML.profile</span> "" >
|
|
|
|
<!-- ensure XHTML Notations are disabled -->
|
|
<!ENTITY <span class="entity">% xhtml-notations.module</span> "IGNORE" >
|
|
|
|
<!-- Bidirectional Text features
|
|
This feature-test entity is used to declare elements
|
|
and attributes used for bidirectional text support.
|
|
-->
|
|
<!ENTITY <span class="entity">% XHTML.bidi</span> "INCLUDE" >
|
|
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
|
|
<!-- Pre-Framework Redeclaration placeholder .................... -->
|
|
<!-- this serves as a location to insert markup declarations
|
|
into the DTD prior to the framework declarations.
|
|
-->
|
|
<!ENTITY <span class="entity">% xhtml-prefw-redecl.module</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% xhtml-prefw-redecl.mod</span> "" >
|
|
<![%xhtml-prefw-redecl.module;[
|
|
%xhtml-prefw-redecl.mod;
|
|
<!-- end of xhtml-prefw-redecl.module -->]]>
|
|
|
|
<!-- we need the datatypes now -->
|
|
<!ENTITY <span class="entity">% xhtml-datatypes.module</span> "INCLUDE" >
|
|
<![%xhtml-datatypes.module;[
|
|
<!ENTITY <span class="entity">% xhtml-datatypes.mod</span>
|
|
PUBLIC "-//W3C//ENTITIES XHTML Datatypes 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-datatypes-1.mod" >
|
|
%xhtml-datatypes.mod;]]>
|
|
|
|
<!-- bring in the RDFa attributes cause we need them in Common -->
|
|
<!ENTITY <span class="entity">% xhtml-metaAttributes.module</span> "INCLUDE" >
|
|
<![%xhtml-metaAttributes.module;[
|
|
<!ENTITY <span class="entity">% xhtml-metaAttributes.mod</span>
|
|
PUBLIC "-//W3C//ENTITIES XHTML MetaAttributes 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-metaAttributes-1.mod" >
|
|
%xhtml-metaAttributes.mod;]]>
|
|
|
|
<!ENTITY <span class="entity">% xhtml-events.module</span> "INCLUDE" >
|
|
|
|
<!ENTITY <span class="entity">% Common.extra.attrib</span>
|
|
"href %URI.datatype; #IMPLIED
|
|
%Metainformation.attrib;"
|
|
>
|
|
|
|
<!-- Inline Style Module ........................................ -->
|
|
<!ENTITY <span class="entity">% xhtml-inlstyle.module</span> "INCLUDE" >
|
|
<![%xhtml-inlstyle.module;[
|
|
<!ENTITY <span class="entity">% xhtml-inlstyle.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Inline Style 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-inlstyle-1.mod" >
|
|
%xhtml-inlstyle.mod;]]>
|
|
|
|
<!-- declare Document Model module instantiated in framework
|
|
-->
|
|
<!ENTITY <span class="entity">% xhtml-model.mod</span>
|
|
PUBLIC "-//W3C//ENTITIES XHTML+RDFa Document Model 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-model-1.mod" >
|
|
|
|
<!-- Modular Framework Module (required) ......................... -->
|
|
<!ENTITY <span class="entity">% xhtml-framework.module</span> "INCLUDE" >
|
|
<![%xhtml-framework.module;[
|
|
<!ENTITY <span class="entity">% xhtml-framework.mod</span>
|
|
PUBLIC "-//W3C//ENTITIES XHTML Modular Framework 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-framework-1.mod" >
|
|
%xhtml-framework.mod;]]>
|
|
|
|
<!-- Post-Framework Redeclaration placeholder ................... -->
|
|
<!-- this serves as a location to insert markup declarations
|
|
into the DTD following the framework declarations.
|
|
-->
|
|
<!ENTITY <span class="entity">% xhtml-postfw-redecl.module</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% xhtml-postfw-redecl.mod</span> "">
|
|
<![%xhtml-postfw-redecl.module;[
|
|
%xhtml-postfw-redecl.mod;
|
|
<!-- end of xhtml-postfw-redecl.module -->]]>
|
|
|
|
|
|
|
|
<!-- Text Module (Required) ..................................... -->
|
|
<!ENTITY <span class="entity">% xhtml-text.module</span> "INCLUDE" >
|
|
<![%xhtml-text.module;[
|
|
<!ENTITY <span class="entity">% xhtml-text.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Text 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-text-1.mod" >
|
|
%xhtml-text.mod;]]>
|
|
|
|
<!-- Hypertext Module (required) ................................. -->
|
|
<!ENTITY <span class="entity">% a.attlist</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% xhtml-hypertext.module</span> "INCLUDE" >
|
|
<![%xhtml-hypertext.module;[
|
|
<!ENTITY <span class="entity">% xhtml-hypertext.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Hypertext 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-hypertext-1.mod" >
|
|
%xhtml-hypertext.mod;]]>
|
|
<!ATTLIST %a.qname;
|
|
%Common.attrib;
|
|
charset %Charset.datatype; #IMPLIED
|
|
type %ContentType.datatype; #IMPLIED
|
|
hreflang %LanguageCode.datatype; #IMPLIED
|
|
accesskey %Character.datatype; #IMPLIED
|
|
tabindex %Number.datatype; #IMPLIED
|
|
>
|
|
|
|
<!-- Lists Module (required) .................................... -->
|
|
<!ENTITY <span class="entity">% xhtml-list.module</span> "INCLUDE" >
|
|
<![%xhtml-list.module;[
|
|
<!ENTITY <span class="entity">% xhtml-list.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Lists 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-list-1.mod" >
|
|
%xhtml-list.mod;]]>
|
|
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
|
|
<!-- Edit Module ................................................ -->
|
|
<!ENTITY <span class="entity">% xhtml-edit.module</span> "INCLUDE" >
|
|
<![%xhtml-edit.module;[
|
|
<!ENTITY <span class="entity">% xhtml-edit.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Editing Elements 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-edit-1.mod" >
|
|
%xhtml-edit.mod;]]>
|
|
|
|
<!-- BIDI Override Module ....................................... -->
|
|
<!ENTITY <span class="entity">% xhtml-bdo.module</span> "%XHTML.bidi;" >
|
|
<![%xhtml-bdo.module;[
|
|
<!ENTITY <span class="entity">% xhtml-bdo.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML BIDI Override Element 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-bdo-1.mod" >
|
|
%xhtml-bdo.mod;]]>
|
|
|
|
<!-- Ruby Module ................................................ -->
|
|
<!ENTITY <span class="entity">% Ruby.common.attlists</span> "INCLUDE" >
|
|
<!ENTITY <span class="entity">% Ruby.common.attrib</span> "%Common.attrib;" >
|
|
<!ENTITY <span class="entity">% xhtml-ruby.module</span> "INCLUDE" >
|
|
<![%xhtml-ruby.module;[
|
|
<!ENTITY <span class="entity">% xhtml-ruby.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Ruby 1.0//EN"
|
|
"http://www.w3.org/TR/ruby/xhtml-ruby-1.mod" >
|
|
%xhtml-ruby.mod;]]>
|
|
|
|
<!-- Presentation Module ........................................ -->
|
|
<!ENTITY <span class="entity">% xhtml-pres.module</span> "INCLUDE" >
|
|
<![%xhtml-pres.module;[
|
|
<!ENTITY <span class="entity">% xhtml-pres.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Presentation 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-pres-1.mod" >
|
|
%xhtml-pres.mod;]]>
|
|
|
|
<!ENTITY <span class="entity">% link.attlist</span> "IGNORE" >
|
|
<!-- Link Element Module ........................................ -->
|
|
<!ENTITY <span class="entity">% xhtml-link.module</span> "INCLUDE" >
|
|
<![%xhtml-link.module;[
|
|
<!ENTITY <span class="entity">% xhtml-link.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Link Element 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-link-1.mod" >
|
|
%xhtml-link.mod;]]>
|
|
|
|
<!ATTLIST %link.qname;
|
|
%Common.attrib;
|
|
charset %Charset.datatype; #IMPLIED
|
|
hreflang %LanguageCode.datatype; #IMPLIED
|
|
type %ContentType.datatype; #IMPLIED
|
|
media %MediaDesc.datatype; #IMPLIED
|
|
>
|
|
|
|
<!-- Document Metainformation Module ............................ -->
|
|
<!ENTITY <span class="entity">% meta.attlist</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% xhtml-meta.module</span> "INCLUDE" >
|
|
<![%xhtml-meta.module;[
|
|
<!ENTITY <span class="entity">% xhtml-meta.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Metainformation 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-meta-1.mod" >
|
|
%xhtml-meta.mod;]]>
|
|
<!ATTLIST %meta.qname;
|
|
%Common.attrib;
|
|
http-equiv NMTOKEN #IMPLIED
|
|
name NMTOKEN #IMPLIED
|
|
scheme CDATA #IMPLIED
|
|
>
|
|
|
|
<!-- Base Element Module ........................................ -->
|
|
<!ENTITY <span class="entity">% xhtml-base.module</span> "INCLUDE" >
|
|
<![%xhtml-base.module;[
|
|
<!ENTITY <span class="entity">% xhtml-base.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Base Element 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-base-1.mod" >
|
|
%xhtml-base.mod;]]>
|
|
|
|
<!-- Scripting Module ........................................... -->
|
|
<!ENTITY <span class="entity">% script.attlist</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% xhtml-script.module</span> "INCLUDE" >
|
|
<![%xhtml-script.module;[
|
|
<!ENTITY <span class="entity">% xhtml-script.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Scripting 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-script-1.mod" >
|
|
%xhtml-script.mod;]]>
|
|
|
|
<!ATTLIST %script.qname;
|
|
%XHTML.xmlns.attrib;
|
|
%id.attrib;
|
|
%Metainformation.attrib;
|
|
href %URI.datatype; #IMPLIED
|
|
xml:space ( preserve ) #FIXED 'preserve'
|
|
charset %Charset.datatype; #IMPLIED
|
|
type %ContentType.datatype; #REQUIRED
|
|
src %URI.datatype; #IMPLIED
|
|
defer ( defer ) #IMPLIED
|
|
>
|
|
|
|
<!-- Style Sheets Module ......................................... -->
|
|
<!ENTITY <span class="entity">% style.attlist</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% xhtml-style.module</span> "INCLUDE" >
|
|
<![%xhtml-style.module;[
|
|
<!ENTITY <span class="entity">% xhtml-style.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Style Sheets 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-style-1.mod" >
|
|
%xhtml-style.mod;]]>
|
|
<!ATTLIST %style.qname;
|
|
%XHTML.xmlns.attrib;
|
|
%id.attrib;
|
|
%title.attrib;
|
|
%I18n.attrib;
|
|
%Metainformation.attrib;
|
|
href %URI.datatype; #IMPLIED
|
|
xml:space ( preserve ) #FIXED 'preserve'
|
|
type %ContentType.datatype; #REQUIRED
|
|
media %MediaDesc.datatype; #IMPLIED
|
|
>
|
|
|
|
<!-- Image Module ............................................... -->
|
|
<!ENTITY <span class="entity">% xhtml-image.module</span> "INCLUDE" >
|
|
<![%xhtml-image.module;[
|
|
<!ENTITY <span class="entity">% xhtml-image.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Images 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-image-1.mod" >
|
|
%xhtml-image.mod;]]>
|
|
|
|
<!-- Client-side Image Map Module ............................... -->
|
|
<!ENTITY <span class="entity">% area.attlist</span> "IGNORE" >
|
|
|
|
<!ENTITY <span class="entity">% xhtml-csismap.module</span> "INCLUDE" >
|
|
<![%xhtml-csismap.module;[
|
|
<!ENTITY <span class="entity">% xhtml-csismap.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Client-side Image Maps 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-csismap-1.mod" >
|
|
%xhtml-csismap.mod;]]>
|
|
|
|
<!ATTLIST %area.qname;
|
|
%Common.attrib;
|
|
shape %Shape.datatype; 'rect'
|
|
coords %Coords.datatype; #IMPLIED
|
|
nohref ( nohref ) #IMPLIED
|
|
alt %Text.datatype; #REQUIRED
|
|
tabindex %Number.datatype; #IMPLIED
|
|
accesskey %Character.datatype; #IMPLIED
|
|
>
|
|
|
|
<!-- Server-side Image Map Module ............................... -->
|
|
<!ENTITY <span class="entity">% xhtml-ssismap.module</span> "INCLUDE" >
|
|
<![%xhtml-ssismap.module;[
|
|
<!ENTITY <span class="entity">% xhtml-ssismap.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Server-side Image Maps 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-ssismap-1.mod" >
|
|
%xhtml-ssismap.mod;]]>
|
|
|
|
<!-- Param Element Module ....................................... -->
|
|
<!ENTITY <span class="entity">% param.attlist</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% xhtml-param.module</span> "INCLUDE" >
|
|
<![%xhtml-param.module;[
|
|
<!ENTITY <span class="entity">% xhtml-param.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Param Element 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-param-1.mod" >
|
|
%xhtml-param.mod;]]>
|
|
|
|
<!ATTLIST %param.qname;
|
|
%XHTML.xmlns.attrib;
|
|
%id.attrib;
|
|
%Metainformation.attrib;
|
|
href %URI.datatype; #IMPLIED
|
|
name CDATA #REQUIRED
|
|
value CDATA #IMPLIED
|
|
valuetype ( data | ref | object ) 'data'
|
|
type %ContentType.datatype; #IMPLIED
|
|
>
|
|
<!-- Embedded Object Module ..................................... -->
|
|
<!ENTITY <span class="entity">% xhtml-object.module</span> "INCLUDE" >
|
|
<![%xhtml-object.module;[
|
|
<!ENTITY <span class="entity">% xhtml-object.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Embedded Object 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-object-1.mod" >
|
|
%xhtml-object.mod;]]>
|
|
|
|
<!-- Tables Module ............................................... -->
|
|
<!ENTITY <span class="entity">% xhtml-table.module</span> "INCLUDE" >
|
|
<![%xhtml-table.module;[
|
|
<!ENTITY <span class="entity">% xhtml-table.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Tables 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-table-1.mod" >
|
|
%xhtml-table.mod;]]>
|
|
|
|
<!-- Forms Module ............................................... -->
|
|
<!ENTITY <span class="entity">% xhtml-form.module</span> "INCLUDE" >
|
|
<![%xhtml-form.module;[
|
|
<!ENTITY <span class="entity">% xhtml-form.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Forms 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-form-1.mod" >
|
|
%xhtml-form.mod;]]>
|
|
|
|
<!-- Target Attribute Module .................................... -->
|
|
<!ENTITY <span class="entity">% xhtml-target.module</span> "INCLUDE" >
|
|
<![%xhtml-target.module;[
|
|
<!ENTITY <span class="entity">% xhtml-target.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Target 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-target-1.mod" >
|
|
%xhtml-target.mod;]]>
|
|
|
|
<!-- Legacy Markup ............................................... -->
|
|
<!ENTITY <span class="entity">% xhtml-legacy.module</span> "IGNORE" >
|
|
<![%xhtml-legacy.module;[
|
|
<!ENTITY <span class="entity">% xhtml-legacy.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Legacy Markup 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-legacy-1.mod" >
|
|
%xhtml-legacy.mod;]]>
|
|
|
|
<!-- Document Structure Module (required) ....................... -->
|
|
<!ENTITY <span class="entity">% html.attlist</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% head.attlist</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% title.attlist</span> "IGNORE" >
|
|
<!ENTITY <span class="entity">% xhtml-struct.module</span> "INCLUDE" >
|
|
<![%xhtml-struct.module;[
|
|
<!ENTITY <span class="entity">% xhtml-struct.mod</span>
|
|
PUBLIC "-//W3C//ELEMENTS XHTML Document Structure 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-struct-1.mod" >
|
|
%xhtml-struct.mod;]]>
|
|
<!ENTITY <span class="entity">% profile.attrib</span>
|
|
"profile %URI.datatype; '%XHTML.profile;'"
|
|
>
|
|
<!ENTITY <span class="entity">% XHTML.version.attrib</span>
|
|
"version %FPI.datatype; #FIXED '%XHTML.version;'"
|
|
>
|
|
<!ATTLIST %html.qname;
|
|
%Common.attrib;
|
|
%XSI.schemaLocation.attrib;
|
|
%XHTML.version.attrib;
|
|
>
|
|
<!ATTLIST %head.qname;
|
|
%Common.attrib;
|
|
%profile.attrib;
|
|
>
|
|
<!ATTLIST %title.qname;
|
|
%Common.attrib;
|
|
>
|
|
|
|
<!-- end of XHTML-RDFa DTD ................................................ -->
|
|
<!-- ....................................................................... -->
|
|
|
|
</pre>
|
|
|
|
<h2><a id="a_xhtml11_catalog" name="a_xhtml11_catalog">A.4. SGML Open Catalog Entry for XHTML+RDFa</a></h2>
|
|
|
|
<p>This section contains the SGML Open Catalog-format definition [<a class="nref" href="#ref_CATALOG">CATALOG</a>] of the public identifiers for XHTML+RDFa 1.0.</p>
|
|
|
|
<p>You can download this version of this file from <a href="DTD/xhtml-rdfa.cat">http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/DTD/xhtml-rdfa.cat</a>. The latest version is available at <a href=
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa.cat">http://www.w3.org/MarkUp/DTD/xhtml-rdfa.cat</a>.</p>
|
|
|
|
<pre class="dtd">
|
|
-- .......................................................................... --
|
|
-- File catalog ............................................................ --
|
|
|
|
-- XHTML+RDFa Catalog Data File
|
|
|
|
Revision: $Revision: 1.1 $
|
|
|
|
See "Entity Management", SGML Open Technical Resolution 9401 for detailed
|
|
information on supplying and using catalog data. This document is available
|
|
from OASIS at URL:
|
|
|
|
<http://www.oasis-open.org/html/tr9401.html>
|
|
--
|
|
|
|
-- .......................................................................... --
|
|
-- SGML declaration associated with XHTML .................................. --
|
|
|
|
OVERRIDE YES
|
|
|
|
SGMLDECL "xml1.dcl"
|
|
|
|
-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --
|
|
|
|
-- XHTML+RDFa modules .............................................. --
|
|
|
|
|
|
PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "xhtml-rdfa-1.dtd"
|
|
|
|
|
|
PUBLIC "-//W3C//ENTITIES XHTML+RDFa Document Model 1.0//EN" "xhtml-rdfa-model-1.mod"
|
|
|
|
PUBLIC "-//W3C//ENTITIES XHTML MetaAttributes 1.0//EN" "xhtml-metaAttributes-1.mod"
|
|
|
|
-- End of catalog data ..................................................... --
|
|
-- .......................................................................... --
|
|
|
|
</pre>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="s_datatypes" name="s_datatypes">B. CURIE Datatypes</a></h1>
|
|
|
|
<p><em>This section is informative.</em></p>
|
|
|
|
<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 use XHTML Modularization can find these normative definitions in the Modularization support file "datatypes" 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 introduced:</p>
|
|
|
|
<dl>
|
|
<dt>CURIE</dt>
|
|
|
|
<dd>A single <a href="#P_curie">curie</a></dd>
|
|
|
|
<dt>CURIEs</dt>
|
|
|
|
<dd>A whitespace separated list of CURIEs</dd>
|
|
|
|
<dt>SafeCURIE</dt>
|
|
|
|
<dd>A single <a href="#P_safe_curie">safe_curie</a></dd>
|
|
|
|
<dt>SafeCURIEs</dt>
|
|
|
|
<dd>A whitespace separated list of SafeCURIEs</dd>
|
|
|
|
<dt>URIorSafeCURIE</dt>
|
|
|
|
<dd>A URI or a SafeCURIE (since you need a SafeCURIE to disambiguate between a common URI and a CURIE)</dd>
|
|
|
|
<dt>URIorSafeCURIEs</dt>
|
|
|
|
<dd>A whitespace separated list of URIorSafeCURIEs</dd>
|
|
</dl>
|
|
|
|
<h2><a id="sec_B.1." name="sec_B.1.">B.1. XML Schema Definition</a></h2>
|
|
|
|
<p>The following <i>informative</i> XML Schema definition for these datatypes is included as an example:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<?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="URIorSafeCURIE">
|
|
<xs:union memberTypes="xs:anyURI xh11d:SafeCURIE" />
|
|
</xs:simpleType>
|
|
|
|
<xs:simpleType name="URIorSafeCURIEs">
|
|
<xs:list itemType="xh11d:URIorSafeCURIE"/>
|
|
</xs:simpleType>
|
|
</xs:schema>
|
|
</pre>
|
|
</div>
|
|
|
|
<h2><a id="sec_B.2." name="sec_B.2.">B.2. XML DTD Definition</a></h2>
|
|
|
|
<p>The following <i>informative</i> XML DTD definition for these datatypes is included as an example:</p>
|
|
|
|
<div class="example">
|
|
<pre>
|
|
<!ENTITY % CURIE.datatype "CDATA" >
|
|
<!ENTITY % CURIEs.datatype "CDATA" >
|
|
<!ENTITY % SafeCURIE.datatype "CDATA" >
|
|
<!ENTITY % SafeCURIEs.datatype "CDATA" >
|
|
<!ENTITY % URIorSafeCURIE.datatype "CDATA" >
|
|
<!ENTITY % URIorSafeCURIEs.datatype "CDATA" >
|
|
</pre>
|
|
</div>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="a_deployment" name="a_deployment">C. Deployment Advice</a></h1>
|
|
|
|
<p><i>This section is informative.</i></p>
|
|
|
|
<p>Documents written using the markup language defined in this specification can be validated using the DTD defined in <a href="#a_xhtmlrdfa_dtd">Appendix A</a>. If a document author wants to
|
|
faciliate such validation, they may include the following declaration at the top of their document:</p>
|
|
|
|
<pre>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
|
|
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
|
|
</pre>
|
|
|
|
<p>The XML Namespace document associated with the XHTML Family of markup languages uses the mechanism for transforming XHTML+RDFa documents into RDF as defined by [<a class="nref" href=
|
|
"#ref_GRDDL">GRDDL</a>]. Authors who want to be certain their documents are transformable by all [<a class="nref" href="#ref_GRDDL">GRDDL</a>] processors may also include a <code>profile</code>
|
|
attribute on the <code>head</code> element that includes a reference to the XHTML vocabulary URI <code>http://www.w3.org/1999/xhtml/vocab</code>.</p>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="a_references" name="a_references">D. References</a></h1>
|
|
|
|
<h2><a id="sec_D.1." name="sec_D.1.">D.1. Related Specifications</a></h2>
|
|
|
|
<p><i>This section is normative.</i></p>
|
|
|
|
<dl>
|
|
<dt>[<a id="ref_IRI" class="normref">IRI</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource Identifiers (IRI)</a></cite>", RFC 3987, M.Duerst, M. Suignard January 2005.<br />
|
|
Available at: http://www.ietf.org/rfc/rfc3987.txt</dd>
|
|
|
|
<dt>[<a id="ref_P3P" class="normref">P3P</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.w3.org/TR/2002/REC-P3P-20020416/">The Platform for Privacy Preferences 1.0 (P3P1.0) Specification</a></cite>", W3C Recommendation, L. Cranor <i lang="la" xml:lang="la">
|
|
et al.</i>, 16 April 2002.<br />
|
|
Available at: http://www.w3.org/TR/2002/REC-P3P-20020416/</dd>
|
|
|
|
<dt>[<a id="ref_RFC2119" class="normref">RFC2119</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.rfc-editor.org/rfc/rfc2119.txt">Key words for use in RFCs to indicate requirement levels</a></cite>", RFC 2119, S. Bradner, March 1997.<br />
|
|
Available at: http://www.rfc-editor.org/rfc/rfc2119.txt</dd>
|
|
|
|
<dt>[<a id="ref_RFC3236">RFC3236</a>]</dt>
|
|
|
|
<dd>"<a href="http://www.ietf.org/rfc/rfc3236.txt">The 'application/xhtml+xml' Media Type</a>", M. Baker, P. Stark, January 2002.<br />
|
|
Available at: http://www.ietf.org/rfc/rfc3236.txt</dd>
|
|
|
|
<dt>[<a id="ref_RUBY" class="normref">RUBY</a>]</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/TR/2001/REC-ruby-20010531">Ruby Annotation</a></cite>, W3C Recommendation, Marcin Sawicki, et al., 31 May 2001.<br />
|
|
See: http://www.w3.org/TR/2001/REC-ruby-20010531</dd>
|
|
|
|
<dt>[<a id="ref_URI" class="normref">URI</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.ietf.org/rfc/rfc3986.txt">Uniform Resource Identifier (URI): Generic Syntax</a></cite>", RFC 3986, T. Berners-Lee, R. Fielding, L. Masinter, January 2005.<br />
|
|
Available at: http://www.ietf.org/rfc/rfc3986.txt</dd>
|
|
|
|
<dt>[<a id="ref_XMLBASE" class="normref">XMLBASE</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">XML Base</a></cite>", W3C Recommendation, J. Marsh, <i><abbr title="editor">ed.</abbr></i>, 27 June 2001.<br />
|
|
Available at: http://www.w3.org/TR/2001/REC-xmlbase-20010627/</dd>
|
|
|
|
<dt>[<a id="ref_XMLNS" class="normref">XMLNS</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.w3.org/TR/1999/REC-xml-names-19990114">Namespaces in XML</a></cite>", W3C Recommendation, T. Bray <i lang="la" xml:lang="la">et al.</i>, <i><abbr title="editors">
|
|
eds.</abbr></i>, 14 January 1999.<br />
|
|
Available at: http://www.w3.org/TR/1999/REC-xml-names-19990114</dd>
|
|
|
|
<dt class="label">[<a id="ref_XML-LANG">XML-LANG</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.w3.org/TR/2004/REC-xml-20040204">Extensible Markup Language (XML) 1.0 (Third Edition)</a></cite>", W3C Recommendation, T. Bray <i lang="la" xml:lang="la">et al.</i>,
|
|
<i><abbr title="editors">eds.</abbr></i>, 4 February 2004.<br />
|
|
Available at: http://www.w3.org/TR/2004/REC-xml-20040204</dd>
|
|
|
|
<dt>[<a id="ref_XHTMLMOD" class="normref">XHTMLMOD</a>]</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/TR/2008/REC-xhtml-modularization-20081008">XHTML Modularization 1.1</a></cite>, W3C Recommendation, Shane McCarron, et al., 8 October 2008<br />
|
|
See: http://www.w3.org/TR/2008/REC-xhtml-modularization-20081008</dd>
|
|
|
|
<dt>[<a id="ref_XMLSCHEMA" class="normref">XMLSCHEMA</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/">XML Schema Part 1: Structures Second Edition</a></cite>", W3C Recommendation, H. S. Thompson <i lang="la" xml:lang="la">et
|
|
al.</i>, <i><abbr title="editors">eds.</abbr></i>, 28 October 2004.<br />
|
|
Available at: http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/<br />
|
|
See also "<cite><a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/">XML Schema Part 2: Datatypes Second Edition</a></cite>", available at:
|
|
http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/</dd>
|
|
</dl>
|
|
|
|
<h2><a id="sec_D.2." name="sec_D.2.">D.2. Other References</a></h2>
|
|
|
|
<p><i>This section is informative.</i></p>
|
|
|
|
<dl>
|
|
<dt>[<a id="ref_CATALOG" class="ref">CATALOG</a>]</dt>
|
|
|
|
<dd><cite><a href="http://www.oasis-open.org/html/a401.htm">Entity Management: OASIS Technical Resolution 9401:1997 (Amendment 2 to TR 9401)</a></cite>, Paul Grosso, Chair, Entity Management
|
|
Subcommittee, SGML Open, 10 September 1997.<br />
|
|
See: http://www.oasis-open.org/html/a401.htm</dd>
|
|
|
|
<dt class="label">[<a id="DBPEDIA">DBPEDIA</a>]</dt>
|
|
|
|
<dd>DBPedia (See <a href="http://dbpedia.org/">http://dbpedia.org/</a>.)</dd>
|
|
|
|
<dt class="label">[<a id="DC">DC</a>]</dt>
|
|
|
|
<dd>Dublin Core Metadata Initiative (DCMI) (See <a href="http://dublincore.org/">http://dublincore.org/</a>.)</dd>
|
|
|
|
<dt class="label">[<a id="FOAF-PROJECT">FOAF-PROJECT</a>]</dt>
|
|
|
|
<dd>The FOAF Project (See <a href="http://www.foaf-project.org">http://www.foaf-project.org</a>.)</dd>
|
|
|
|
<dt>[<a id="ref_GRDDL" class="normref">GRDDL</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.w3.org/TR/2007/REC-grddl-20070911/">Gleaning Resource Descriptions from Dialects of Languages (GRDDL)</a></cite>, W3C Recommendation, D. Connolly, <i><abbr title=
|
|
"editors">ed.</abbr></i>, 11 September 2007.<br />
|
|
Available at: http://www.w3.org/TR/2007/REC-grddl-20070911</dd>
|
|
|
|
<dt>[<a id="ref_HTML4" class="normref">HTML4</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.w3.org/TR/1999/REC-html401-19991224">HTML 4.01 Specification</a></cite>", W3C Recommendation, D. Raggett <i lang="la" xml:lang="la">et al.</i>, <i><abbr title=
|
|
"editors">eds.</abbr></i>, 24 December 1999.<br />
|
|
Available at: http://www.w3.org/TR/1999/REC-html401-19991224</dd>
|
|
|
|
<dt class="label" id="ref_MICROFORMATS">[MICROFORMATS]</dt>
|
|
|
|
<dd>See <a href="http://microformats.org">microformats.org</a>.</dd>
|
|
|
|
<dt class="label">[<a id="RDFHTML">RDFHTML</a>]</dt>
|
|
|
|
<dd>RDF-in-HTML Task Force (See <a href="http://www.w3.org/2001/sw/BestPractices/HTML/">http://www.w3.org/2001/sw/BestPractices/HTML/</a>.)</dd>
|
|
|
|
<dt class="label">[<a id="ref_RDFaPRIMER">RDFa Primer</a>]</dt>
|
|
|
|
<dd>RDFa Primer 1.0 - Embedding Structured Data in Web Pages (see <a href="http://www.w3.org/TR/xhtml-rdfa-primer/">http://www.w3.org/TR/xhtml-rdfa-primer/</a>.)</dd>
|
|
|
|
<dt class="label">[<a id="ref_RDF-CONCEPTS">RDF-CONCEPTS</a>]</dt>
|
|
|
|
<dd>Resource Description Framework (RDF): Concepts and Abstract Syntax (See <a href="http://www.w3.org/TR/rdf-concepts/">http://www.w3.org/TR/rdf-concepts/</a>.)</dd>
|
|
|
|
<dt class="label">[<a id="ref_RDF-PRIMER">RDF-PRIMER</a>]</dt>
|
|
|
|
<dd>RDF Primer (See <a href="http://www.w3.org/TR/rdf-primer/">http://www.w3.org/TR/rdf-primer/</a>.)</dd>
|
|
|
|
<dt class="label">[<a id="ref_RDF-SYNTAX">RDF-SYNTAX</a>]</dt>
|
|
|
|
<dd>RDF/XML Syntax and Grammar (See <a href="http://www.w3.org/TR/rdf-syntax-grammar/">http://www.w3.org/TR/rdf-syntax-grammar/</a>.)</dd>
|
|
|
|
<dt class="label">[<a id="RDFTESTS-DATATYPES-TEST001">RDFTESTS-DATATYPES-TEST001</a>]</dt>
|
|
|
|
<dd>datatypes/test001.nt (See <a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/datatypes/test001.nt">http://www.w3.org/2000/10/rdf-tests/rdfcore/datatypes/test001.nt</a>.)</dd>
|
|
|
|
<dt class="label">[<a id="RDFTESTS-RDFMS-XMLLANG-TEST006">RDFTESTS-RDFMS-XMLLANG-TEST006</a>]</dt>
|
|
|
|
<dd>rdfms-xmllang/test006.nt (See <a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-xmllang/test006.nt">http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-xmllang/test006.nt</a>.)</dd>
|
|
|
|
<dt class="label">[<a id="ref_RELAXNG">RELAXNG</a>]</dt>
|
|
|
|
<dd>RELAX NG Home Page (See <a href="http://www.relaxng.org/">http://www.relaxng.org/</a>.)</dd>
|
|
|
|
<dt class="label">[<a id="SWD-WG">SWD-WG</a>]</dt>
|
|
|
|
<dd>Semantic Web Deployment Working Group (See <a href="http://www.w3.org/2006/07/SWD/">http://www.w3.org/2006/07/SWD/</a>.)</dd>
|
|
|
|
<dt>[<a id="ref_TURTLE" class="ref">TURTLE</a>]</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/TeamSubmission/turtle/">Turtle: Terse RDF Triple Language</a></cite>, David Beckett, Tim Berners-Lee, January 2008.<br />
|
|
See: http://www.w3.org/TeamSubmission/turtle/</dd>
|
|
|
|
<dt>[<a id="ref_XHTML11">XHTML 1.1</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.w3.org/TR/2001/REC-xhtml11-20010531/">XHTML 1.1 - Module-based XHTML</a></cite>", W3C Recommendation, M. Altheim, S. McCarron, 31 May 2001.<br />
|
|
Available at: <a href="http://www.w3.org/TR/2001/REC-xhtml11-20010531/">http://www.w3.org/TR/2001/REC-xhtml11-20010531/</a>.</dd>
|
|
|
|
<dt class="label">[<a id="XHTML2-WG">XHTML2-WG</a>]</dt>
|
|
|
|
<dd>XHTML 2 Working Group (See <a href="http://www.w3.org/MarkUp/">http://www.w3.org/MarkUp/</a>.)</dd>
|
|
|
|
<dt>[<a id="ref_XHTMLMIME">XHTMLMIME</a>]</dt>
|
|
|
|
<dd>"<cite><a href="http://www.w3.org/TR/2002/NOTE-xhtml-media-types-20020801">XHTML Media Types</a></cite>", Masayasu Ishikawa, 1 August 2002.<br />
|
|
<a href="http://www.w3.org/TR/xhtml-media-types">Latest version</a> available at: http://www.w3.org/TR/xhtml-media-types</dd>
|
|
|
|
<dt>[<a id="ref_XHTMLVOCAB">XHTMLVOCAB</a>]</dt>
|
|
|
|
<dd>"<a href="http://www.w3.org/1999/xhtml/vocab">XHTML Vocabulary</a>", XHTML 2 Working Group.<br />
|
|
Available at: http://www.w3.org/1999/xhtml/vocab</dd>
|
|
</dl>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="a_history" name="a_history">E. Change History</a></h1>
|
|
|
|
<p><em>This section is informative.</em></p>
|
|
|
|
<p>2008-06-03: Added informative section on XHTML Fragments. Also ensured that we say "namespace" when we mean XML Namespace, and "prefix" when we mean the front part of a CURIE. [ShaneMcCarron]</p>
|
|
|
|
<p>2008-05-15: Moved section on bnode references in CURIEs into Chapter 5 (which is normative). Also fixed some term definitions that referred to "document" to refer to "resource".
|
|
[ShaneMcCarron]</p>
|
|
|
|
<p>2008-05-12: Changed processing rules 4 and 5 to look for the presence of @rel and @rev, rather than whether they have valid values. That is checked later. [MarkBirbeck]</p>
|
|
|
|
<p>2008-05-09: Removed reference to "reserved values" in the context of <span class="aref">@about</span>: about does not take reserved values. [ShaneMcCarron]</p>
|
|
|
|
<p>2008-05-08: Added informative reference to the XHTML Vocabulary definition document. [ShaneMcCarron]</p>
|
|
|
|
<p>2008-05-01: Changed datatype name from URIorCURIE to URIorSafeCURIE. Added datatype implementation in Appendix B. Added text about preferring inline content to @content so you do not lose ability
|
|
to have rich markup. [ShaneMcCarron]</p>
|
|
|
|
<p>2008-04-29: Changed processing rules so as to allow the generation of triples that have objects which are bnodes, even if those bnodes never appear in a triple as a subject. [MarkBirbeck]</p>
|
|
|
|
<p>2008-04-28: The processing rules have been updated so that elements that do not contain any RDFa attributes have no effect. At one point this step omitted to check for <span class="aref">
|
|
@property</span>, meaning that elements that contained <em>only</em> <span class="aref">@property</span> were being ignored. [MarkBirbeck]</p>
|
|
|
|
<p>2008-04-03: Changed <code>instanceof</code> to <span class="aref">@typeof</span>. [ShaneMcCarron]</p>
|
|
|
|
<p>2008-01-23: Updated to reflect latest task-force thinking re- the processing of legacy values in <span class="aref">@rel</span> and <span class="aref">@rev</span>. As part of this work, made the
|
|
whole processing of CURIEs and URIs much clearer. [MarkBirbeck]</p>
|
|
|
|
<p>2008-01-03: Updated to reflect latest task-force thinking re- the processing model, in particular regarding 'chaining', and the behaviour of <code>instanceof</code>. [MarkBirbeck]</p>
|
|
|
|
<p>2007-10-19: Updated to reflect latest task-force thinking re: processing model. Integrated XHTML Module definition and hybrid markup language. Completed development as First Public Working Draft.
|
|
[ShaneMcCarron], [MarkBirbeck]</p>
|
|
|
|
<p>2007-09-04: Migrated to XHTML 2 Working Group Publication System. Converted to a format that is consistent with REC-Track documents. Updated to reflect current processing model. Added normative
|
|
definition of CURIEs. Started updating prose to be consistent with current task force agremeents. [ShaneMcCarron], [StevenPemberton], [MarkBirbeck]</p>
|
|
|
|
<p>2007-04-06: fixed some of the language to talk about "structure" rather than metadata. Added note regarding space-separated values in predicate-denoting attributes. [BenAdida]</p>
|
|
|
|
<p>2006-01-16: made the use of CURIE type for <span class="aref">@rel</span>, <span class="aref">@rev</span>, <span class="aref">@property</span> consistent across document (particularly section 2.4
|
|
was erroneous). [BenAdida]</p>
|
|
|
|
<!--OddPage-->
|
|
<h1><a id="a_acks" name="a_acks">F. Acknowledgments</a></h1>
|
|
|
|
<p><em>This section is informative.</em></p>
|
|
|
|
<p>At the time of publication, the members of the Semantic Web Deployment Working Group were:</p>
|
|
|
|
<ul>
|
|
<li>Ben Adida, Creative Commons (RDFa Task Force Convener)</li>
|
|
|
|
<li>Thomas Baker, Kompetenzzentrum Interoperable Metadaten (KIM) (Co-Chair)</li>
|
|
|
|
<li>Sean Bechhofer, University of Manchester</li>
|
|
|
|
<li>Diego Berrueta, Fundación CTIC</li>
|
|
|
|
<li>Jeremy Carroll, TopQuadrant</li>
|
|
|
|
<li>Michael Hausenblas, K-Space</li>
|
|
|
|
<li>Antoine Isaac, Vrije Universiteit</li>
|
|
|
|
<li>Elisa Kendall, Sandpiper Software, Inc.</li>
|
|
|
|
<li>Alistair Miles, Science & Technology Facilities Council</li>
|
|
|
|
<li>Vit Novacek, DERI Galway at the National University of Ireland</li>
|
|
|
|
<li>Simone Onofri, International Webmasters Association / HTML Writers Guild (IWA-HWG)</li>
|
|
|
|
<li>Jon Phipps, Invited Expert</li>
|
|
|
|
<li>Clay Redding, Library of Congress</li>
|
|
|
|
<li>Quentin Reul, University of Aberdeen</li>
|
|
|
|
<li>Daniel Rubin, Stanford University</li>
|
|
|
|
<li>Guus Schreiber, Vrije Universiteit (Co-Chair)</li>
|
|
|
|
<li>Margherita Sini, UN Food and Agriculture Organization (Invited Expert)</li>
|
|
|
|
<li>Manu Sporny, Digital Bazaar (Invited Expert)</li>
|
|
|
|
<li>Ed Summers, Library of Congress</li>
|
|
|
|
<li>Ralph Swick, W3C</li>
|
|
</ul>
|
|
|
|
<p>At the time of publication, the members in the XHTML 2 Working Group were:</p>
|
|
|
|
<ul>
|
|
<li>Roland Merrick, <acronym title="International Business Machines">IBM</acronym> (<acronym title="Extensible HyperText Markup Language">XHTML</acronym> 2 Working Group Co-Chair)</li>
|
|
|
|
<li>Steven Pemberton, <acronym title="Centrum voor Wiskunde en Informatica" xml:lang="nl">CWI</acronym> (<acronym title="Extensible HyperText Markup Language">XHTML</acronym> 2 Working Group
|
|
Co-Chair)</li>
|
|
|
|
<li>Mark Birbeck, webBackplane (Invited Expert)</li>
|
|
|
|
<li>Susan Borgrink, Progeny Systems</li>
|
|
|
|
<li>Christina Bottomley, Society for Technical Communication (STC)</li>
|
|
|
|
<li>Alessio Cartocci, International Webmasters Association / HTML Writers Guild (IWA-HWG)</li>
|
|
|
|
<li>Alexander Graf, University of Innsbruck</li>
|
|
|
|
<li>Tina Holmboe, Greytower Technologies (Invited Expert)</li>
|
|
|
|
<li>John Kugelman, Progeny Systems</li>
|
|
|
|
<li>Luca Mascaro, International Webmasters Association / HTML Writers Guild (IWA-HWG)</li>
|
|
|
|
<li>Shane McCarron, Applied Testing and Technology, Inc. (Invited Expert)</li>
|
|
|
|
<li>Michael Rawling, IVIS Group Limited</li>
|
|
|
|
<li>Gregory Rosmaita, Invited Expert</li>
|
|
|
|
<li>Sebastian Schnitzenbaumer, Dreamlab Technologies AG</li>
|
|
|
|
<li>Richard Schwerdtfeger, <acronym title="International Business Machines">IBM</acronym></li>
|
|
|
|
<li>Elias Torres, <acronym title="International Business Machines">IBM</acronym></li>
|
|
|
|
<li>Masataka Yakura, Mitsue-Links Co., Ltd.</li>
|
|
|
|
<li>Toshihiko Yamakami, ACCESS Co., Ltd.</li>
|
|
</ul>
|
|
</body>
|
|
</html>
|
|
|