Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change Profile to Context

  • Loading branch information...
commit 4342393d2e70aea4a4dce9dc6b2631f52e6e3fd7 1 parent b69fd81
@gkellogg gkellogg authored
View
2  History.markdown
@@ -4,6 +4,8 @@
* [RDFa Lite 1.1](http://www.w3.org/TR/2012/CR-rdfa-lite-20120313/)
* [XHTML+RDFa 1.1](http://www.w3.org/TR/2012/CR-xhtml-rdfa-20120313/)
* [HTML+RDFa 1.1](http://dev.w3.org/html5/rdfa/)
+* change profile to context to conform with change in use in RDFa 1.1.
+
### 0.3.10
* Change `:expand\_reader` option to `:vocab\_expansion`, to conform with RDFa Core 1.1 definition.
* Changed `:processor\_graph` to `:processor\_callback` and added `:rdfagraph` option, taking either or both of `:output` and `:processor`.
View
10 README.markdown
@@ -195,7 +195,7 @@ Note that prefixes may be chained between Reader and Writer, so that the Writer
use the same prefix definitions found during parsing:
prefixes = {}
- graph = RDF::Graph.load("etc/foaf.html", :prefixes => prefixes)
+ graph = RDF::Graph.load("etc/doap.html", :prefixes => prefixes)
puts graph.dump(:rdfa, :prefixes => prefixes)
### Template-based Writer
@@ -397,10 +397,10 @@ see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
[YARD]: http://yardoc.org/
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
-[RDFa 1.1 Core]: http://www.w3.org/TR/2012/CR-rdfa-core-20120313/ "RDFa 1.1 Core"
-[RDFa Lite 1.1]: http://www.w3.org/TR/2012/CR-rdfa-lite-20120313// "RDFa Lite 1.1"
-[XHTML+RDFa 1.1]: http://www.w3.org/TR/2012/CR-xhtml-rdfa-20120313/ "XHTML+RDFa 1.1"
-[HTML+RDFa 1.1]: http://dev.w3.org/html5/rdfa/ "HTML+RDFa 1.1"
+[RDFa 1.1 Core]: http://www.w3.org/TR/2011/WD-rdfa-core-20110331/ "RDFa 1.1 Core"
+[RDFa Lite 1.1]: http://www.w3.org/2010/02/rdfa/drafts/2011/ED-rdfa-lite-20111030/ "RDFa Lite 1.1"
+[XHTML+RDFa 1.1]: http://www.w3.org/TR/2011/WD-xhtml-rdfa-20110331/ "XHTML+RDFa 1.1"
+[HTML+RDFa 1.1]: http://www.w3.org/TR/2011/WD-rdfa-in-html-20110525/ "HTML+RDFa 1.1"
[RDFa-test-suite]: http://rdfa.info/test-suite/ "RDFa test suite"
[RDFa doc]: http://rubydoc.info/github/gkellogg/rdf-rdfa/frames
[Haml]: http://haml-lang.com/
View
8 Rakefile
@@ -48,17 +48,17 @@ task :update_vocabularies do
end
end
-desc "Update RDFa Profiles"
-task :update_profiles do
+desc "Update RDFa Contexts"
+task :update_contexts do
{
:html => "http://www.w3.org/2011/rdfa-context/html-rdfa-1.1",
:xhtml => "http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1",
:xml => "http://www.w3.org/2011/rdfa-context/rdfa-1.1",
}.each do |v, uri|
puts "Build #{uri}"
- vocab = File.expand_path(File.join(File.dirname(__FILE__), "lib", "rdf", "rdfa", "profile", "#{v}.rb"))
+ vocab = File.expand_path(File.join(File.dirname(__FILE__), "lib", "rdf", "rdfa", "context", "#{v}.rb"))
FileUtils.rm_rf(vocab)
- `./script/intern_profile -o #{vocab} #{uri}`
+ `./script/intern_context -o #{vocab} #{uri}`
end
end
View
15 etc/basic.html
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa 1.0">
- <head>
- <title>W3C standard prefixes</title>
- </head>
- <body xmlns:rdfa="http://www.w3.org/ns/rdfa#">
- <p typeof="">The URI "<span property="rdfa:uri">http://purl.org/dc/terms/</span>" can be used with the "<span property="rdfa:prefix">dc</span>" prefix.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/</span>" can be used with the "<span property="rdfa:prefix">foaf</span>" prefix.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://www.w3.org/2001/vcard-rdf/3.0#</span>" can be used with the "<span property="rdfa:prefix">vcard</span>" prefix.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://rdf.data-vocabulary.org/#</span>" can be used with the "<span property="rdfa:prefix">g</span>" prefix.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://rdfs.org/sioc/ns#</span>" can be used with the "<span property="rdfa:prefix">sioc</span>" prefix.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://creativecommons.org/ns#</span>" can be used with the "<span property="rdfa:prefix">cc</span>" prefix.</p>
- </body>
-</html>
View
83 etc/foaf.html
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>FOAF prefixes</title>
- </head>
- <body xmlns:rdfa="http://www.w3.org/ns/rdfa#">
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/Document</span>" can be used with the "<span property="rdfa:term">Document</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/Image</span>" can be used with the "<span property="rdfa:term">Image</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/LabelProperty</span>" can be used with the "<span property="rdfa:term">LabelProperty</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/Agent</span>" can be used with the "<span property="rdfa:term">Agent</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/OnlineAccount</span>" can be used with the "<span property="rdfa:term">OnlineAccount</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/Project</span>" can be used with the "<span property="rdfa:term">Project</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/OnlineChatAccount</span>" can be used with the "<span property="rdfa:term">OnlineChatAccount</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/Organization</span>" can be used with the "<span property="rdfa:term">Organization</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/PersonalProfileDocument</span>" can be used with the "<span property="rdfa:term">PersonalProfileDocument</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/OnlineEcommerceAccount</span>" can be used with the "<span property="rdfa:term">OnlineEcommerceAccount</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/OnlineGamingAccount</span>" can be used with the "<span property="rdfa:term">OnlineGamingAccount</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/Group</span>" can be used with the "<span property="rdfa:term">Group</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/Person</span>" can be used with the "<span property="rdfa:term">Person</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/accountName</span>" can be used with the "<span property="rdfa:term">accountName</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/knows</span>" can be used with the "<span property="rdfa:term">knows</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/account</span>" can be used with the "<span property="rdfa:term">account</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/topic_interest</span>" can be used with the "<span property="rdfa:term">topic_interest</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/accountServiceHomepage</span>" can be used with the "<span property="rdfa:term">accountServiceHomepage</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/member</span>" can be used with the "<span property="rdfa:term">member</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/name</span>" can be used with the "<span property="rdfa:term">name</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/openid</span>" can be used with the "<span property="rdfa:term">openid</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/icqChatID</span>" can be used with the "<span property="rdfa:term">icqChatID</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/birthday</span>" can be used with the "<span property="rdfa:term">birthday</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/status</span>" can be used with the "<span property="rdfa:term">status</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/weblog</span>" can be used with the "<span property="rdfa:term">weblog</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/currentProject</span>" can be used with the "<span property="rdfa:term">currentProject</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/sha1</span>" can be used with the "<span property="rdfa:term">sha1</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/yahooChatID</span>" can be used with the "<span property="rdfa:term">yahooChatID</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/isPrimaryTopicOf</span>" can be used with the "<span property="rdfa:term">isPrimaryTopicOf</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/schoolHomepage</span>" can be used with the "<span property="rdfa:term">schoolHomepage</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/workInfoHomepage</span>" can be used with the "<span property="rdfa:term">workInfoHomepage</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/lastName</span>" can be used with the "<span property="rdfa:term">lastName</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/msnChatID</span>" can be used with the "<span property="rdfa:term">msnChatID</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/mbox</span>" can be used with the "<span property="rdfa:term">mbox</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/givenname</span>" can be used with the "<span property="rdfa:term">givenname</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/thumbnail</span>" can be used with the "<span property="rdfa:term">thumbnail</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/tipjar</span>" can be used with the "<span property="rdfa:term">tipjar</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/interest</span>" can be used with the "<span property="rdfa:term">interest</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/pastProject</span>" can be used with the "<span property="rdfa:term">pastProject</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/myersBriggs</span>" can be used with the "<span property="rdfa:term">myersBriggs</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/gender</span>" can be used with the "<span property="rdfa:term">gender</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/givenName</span>" can be used with the "<span property="rdfa:term">givenName</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/mbox_sha1sum</span>" can be used with the "<span property="rdfa:term">mbox_sha1sum</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/firstName</span>" can be used with the "<span property="rdfa:term">firstName</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/phone</span>" can be used with the "<span property="rdfa:term">phone</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/title</span>" can be used with the "<span property="rdfa:term">title</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/topic</span>" can be used with the "<span property="rdfa:term">topic</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/maker</span>" can be used with the "<span property="rdfa:term">maker</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/plan</span>" can be used with the "<span property="rdfa:term">plan</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/theme</span>" can be used with the "<span property="rdfa:term">theme</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/page</span>" can be used with the "<span property="rdfa:term">page</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/holdsAccount</span>" can be used with the "<span property="rdfa:term">holdsAccount</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/age</span>" can be used with the "<span property="rdfa:term">age</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/img</span>" can be used with the "<span property="rdfa:term">img</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/skypeID</span>" can be used with the "<span property="rdfa:term">skypeID</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/jabberID</span>" can be used with the "<span property="rdfa:term">jabberID</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/family_name</span>" can be used with the "<span property="rdfa:term">family_name</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/nick</span>" can be used with the "<span property="rdfa:term">nick</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/logo</span>" can be used with the "<span property="rdfa:term">logo</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/depicts</span>" can be used with the "<span property="rdfa:term">depicts</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/dnaChecksum</span>" can be used with the "<span property="rdfa:term">dnaChecksum</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/fundedBy</span>" can be used with the "<span property="rdfa:term">fundedBy</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/publications</span>" can be used with the "<span property="rdfa:term">publications</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/workplaceHomepage</span>" can be used with the "<span property="rdfa:term">workplaceHomepage</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/depiction</span>" can be used with the "<span property="rdfa:term">depiction</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/based_near</span>" can be used with the "<span property="rdfa:term">based_near</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/membershipClass</span>" can be used with the "<span property="rdfa:term">membershipClass</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/familyName</span>" can be used with the "<span property="rdfa:term">familyName</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/homepage</span>" can be used with the "<span property="rdfa:term">homepage</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/geekcode</span>" can be used with the "<span property="rdfa:term">geekcode</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/aimChatID</span>" can be used with the "<span property="rdfa:term">aimChatID</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/made</span>" can be used with the "<span property="rdfa:term">made</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/primaryTopic</span>" can be used with the "<span property="rdfa:term">primaryTopic</span>" term.</p>
- <p typeof="">The URI "<span property="rdfa:uri">http://xmlns.com/foaf/0.1/surname</span>" can be used with the "<span property="rdfa:term">surname</span>" term.</p>
- </body>
-</html>
View
40 etc/profile.html
@@ -1,40 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Web site profile: favicon, …</title>
-<meta name="author" content="Karl Dubost" />
-<link rel="stylesheet" href="/2005/10/w3cdoc.css" type="text/css" media="screen" title="W3C Documentation" charset="utf-8" />
-</head>
-<body>
-<h1>Web site meta data profile: <abbr title="Favorite Icon">favicon</abbr>, …</h1>
-<h2>Authors</h2>
-<ul id="authors">
-<li><a href="http://www.w3.org/People/Karl/">Karl Dubost</a></li>
-</ul>
-<p>As described in <a href="http://www.w3.org/TR/html401/struct/global.html#h-7.4.4.3">HTML4 Meta data profiles</a>.</p>
-<dl class="profile">
-<dt id="rel">rel</dt>
-<dd>
-<p><a rel="help" href="http://www.w3.org/TR/html401/struct/links.html#adef-rel">HTML4 definition of the 'rel' attribute.</a> Here is an additional value and its meaning.</p>
-<div>
-<h3>Web site</h3>
-<dl>
-<dt id="icon">icon</dt>
-<dd>A small icon giving a visual hint for a Web site or a set of Web pages as defined in <cite><a href="http://www.w3.org/2005/10/howto-favicon">How to Add a Favicon to your Site</a></cite>.</dd>
-<dt id="foaf">foaf</dt>
-<dd>@@foaf definition@@.</dd>
-<dt id="nofollow">nofollow</dt>
-<dd>@@nofollow definition@@.</dd>
-</dl>
-</div>
-</dd>
-</dl>
-
-<h2>Acknowledgments</h2>
-<p><a href="http://www.w3.org/People/Dom">Dominique Hazaël-Massieux</a></p>
-<h2>Copyright</h2>
-<p class="policyfooter"><a rel="Copyright" href="/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2007 <a href="/"><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="/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>, <a rel="Copyright" href="/Consortium/Legal/copyright-documents">document use</a> and <a rel="Copyright" href="/Consortium/Legal/copyright-software">software licensing</a> rules apply. Your interactions with this site are in accordance with our <a href="/Consortium/Legal/privacy-statement#Public">public</a> and <a href="/Consortium/Legal/privacy-statement#Members">Member</a> privacy statements.</p>
-</body>
-</html>
View
459 etc/xhv.html
@@ -1,459 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
- "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xml:lang="en-US">
-<head profile="http://www.w3.org/1999/xhtml/vocab">
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <title>XHTML Vocabulary</title>
- <base href="http://www.w3.org/1999/xhtml/vocab" />
- <link rel="stylesheet" type="text/css"
- href="http://www.w3.org/StyleSheets/TR/base.css" />
-</head>
-
-<body>
-
-<div class="head">
-<p><a href="http://www.w3.org/"><img class="head"
-src="http://www.w3.org/Icons/WWW/w3c_home" alt="W3C" /></a></p>
-</div>
-
-<h1><abbr title="Extensible HyperText Markup Language">XHTML</abbr>
-Vocabulary</h1>
-
-<p>This is a vocabulary collection utilized by <abbr>XHTML</abbr> Family
-modules and document types using <a
-href="http://www.w3.org/TR/xhtml-modularization"><abbr>XHTML</abbr>
-Modularization</a>, including <a
-href="http://www.w3.org/TR/xhtml-role"><abbr>XHTML</abbr> Role</a> and XHTML +
-RDFa as defined in <a
-href="http://www.w3.org/TR/rdfa-syntax">rdfa-syntax</a>.</p>
-
-<p>The <abbr>XHTML</abbr> specifications are developed by the <a
-href="http://www.w3.org/MarkUp/"><abbr
-title="World Wide Web Consortium">W3C</abbr> <abbr
-title="Extensible HyperText Markup Language">XHTML</abbr> 2 Working Group</a>
-as part of the <a href="http://www.w3.org/MarkUp/Activity"><abbr>W3C</abbr>
-<abbr>HTML</abbr> Activity</a>.</p>
-
-<p>For more information about <abbr>XML</abbr>, please refer to the <a
-href="http://www.w3.org/TR/REC-xml">Extensible Markup Language
-(<abbr>XML</abbr>) 1.0</a> specification.</p>
-
-<p>Version date: <!--$date=-->2010-01-27<!--$--></p>
-<hr />
-
-<h2>1. Introduction</h2>
-
-<p>XHTML Modularization [<a href="#ref_XHTMLMOD">XHTMLMOD</a>] permits the
-development of XHTML modules and XHTML family markup languages. These modules
-and markup languages may, in turn, define local vocabulary items for use as
-values of attributes. This document describes the items that are available in
-the default XHTML vocabulary space:
-<code>http://www.w3.org/1999/xhtml/vocab#</code>. </p>
-
-<h2 id="XHTMLMetaInformationModule">2. XHTML Metainformation Vocabulary</h2>
-
-<p>The XHTML Metainformation Module defined as part of XHTML+RDFa [<a
-href="#ref_XHTMLRDFa">XHTMLRDFa</a>] specifies the following vocabulary items
-for use in the <code>rel</code> and <code>rev</code> attributes.</p>
-
-<div id="relrev-properties" about="#relrev-properties" typeof="rdf:Bag">
-
-<div about="#relrev-properties" rev="rdfs:member">
-<dl>
- <dt id="alternate" about="#alternate" typeof="rdf:Property">alternate</dt>
- <dd about="#alternate" property="rdfs:comment"
- datatype="xsd:string"><span>alternate</span> designates alternate
- versions for a resource.</dd>
- <dt id="appendix" about="#appendix" typeof="rdf:Property">appendix</dt>
- <dd about="#appendix" property="rdfs:comment"
- datatype="xsd:string"><span>appendix</span> refers to a resource serving
- as an appendix in a collection. </dd>
- <dt id="bookmark" about="#bookmark" typeof="rdf:Property">bookmark</dt>
- <dd about="#bookmark" property="rdfs:comment"
- datatype="xsd:string"><span>bookmark</span> refers to a bookmark - a link
- to a key entry point within an extended document. </dd>
- <dt id="cite" about="#cite" typeof="rdf:Property">cite</dt>
- <dd about="#cite" property="rdfs:comment"
- datatype="xsd:string"><span>cite</span> refers to a resource that defines
- a citation. </dd>
- <dt id="chapter" about="#chapter" typeof="rdf:Property">chapter</dt>
- <dd about="#chapter" property="rdfs:comment"
- datatype="xsd:string"><span>chapter</span> refers to a resource serving
- as a chapter in a collection. </dd>
- <dt id="contents" about="#contents" typeof="rdf:Property">contents</dt>
- <dd about="#contents" property="rdfs:comment"
- datatype="xsd:string"><span>contents</span> refers to a resource serving
- as a table of contents. </dd>
- <dt id="copyright" about="#copyright" typeof="rdf:Property">copyright</dt>
- <dd about="#copyright" property="rdfs:comment"
- datatype="xsd:string"><span>copyright</span> refers to a copyright
- statement for the resource. </dd>
- <dt id="first" about="#first" typeof="rdf:Property">first</dt>
- <dd about="#first" property="rdfs:comment"
- datatype="xsd:string"><span>first</span> refers the first item in a
- collection (see also start and top).</dd>
- <dt id="glossary" about="#glossary" typeof="rdf:Property">glossary</dt>
- <dd about="#glossary" property="rdfs:comment"
- datatype="xsd:string"><span>glossary</span> refers to a resource
- providing a glossary of terms. </dd>
- <dt id="help" about="#help" typeof="rdf:Property">help</dt>
- <dd about="#help" property="rdfs:comment"
- datatype="xsd:string"><span>help</span> refers to a resource offering
- help. </dd>
- <dt id="icon" about="#icon" typeof="rdf:Property">icon</dt>
- <dd about="#icon" property="rdfs:comment"
- datatype="xsd:string"><span>icon</span> refers to a resource that
- represents an icon. </dd>
- <dt id="index" about="#index" typeof="rdf:Property">index</dt>
- <dd about="#index" property="rdfs:comment"
- datatype="xsd:string"><span>index</span> refers to a resource providing
- an index. </dd>
- <dt id="itsRules" about="#itsRules" typeof="rdf:Property">itsRules</dt>
- <dd about="#itsRules" property="rdfs:comment"
- datatype="xsd:string"><span>itsRules</span> indicates that the designated
- resource is an [<a href="#ref_ITS">ITS</a>] rule set.</dd>
- <dt id="last" about="#last" typeof="rdf:Property">last</dt>
- <dd about="#last" property="rdfs:comment"
- datatype="xsd:string"><span>last</span> refers to the last resource in a
- collection of resources. </dd>
- <dt id="license" about="#license" typeof="rdf:Property">license</dt>
- <dd about="#license" property="rdfs:comment"
- datatype="xsd:string"><span>license</span> refers to a resource that
- defines the associated license. </dd>
- <dt id="meta" about="#meta" typeof="rdf:Property">meta</dt>
- <dd about="#meta" property="rdfs:comment"
- datatype="xsd:string"><span>meta</span> refers to a resource that
- provides metadata. </dd>
- <dt id="next" about="#next" typeof="rdf:Property">next</dt>
- <dd about="#next" property="rdfs:comment"
- datatype="xsd:string"><span>next</span> refers to the next resource
- (after the current one) in an ordered collection of resources. </dd>
- <dt id="p3pv1" about="#p3pv1" typeof="rdf:Property">p3pv1</dt>
- <dd about="#p3pv1" property="rdfs:comment"
- datatype="xsd:string"><span>p3pv1</span> refers to a P3P Policy Reference
- File [<a href="#ref_P3P">P3P</a>]. </dd>
- <dt id="prev" about="#prev" typeof="rdf:Property">prev</dt>
- <dd about="#prev" property="rdfs:comment"
- datatype="xsd:string"><span>prev</span> refers to a previous resource
- (before the current one) in an ordered collection of resources. </dd>
- <dt id="role" about="#role" typeof="rdf:Bag rdf:Property">role</dt>
- <dd about="#role" property="rdfs:comment"
- datatype="xsd:string"><span>role</span> indicates the purpose of the
- resource. See <a href="#XHTMLRoleVocabulary">the XHTML Role
- Vocabulary</a> for roles in this vocabulary space, and <a
- href="#ref_XHTMLROLE">XHTMLROLE</a> for information on extending the
- collection of roles. </dd>
- <dt id="section" about="#section" typeof="rdf:Property">section</dt>
- <dd about="#section" property="rdfs:comment"
- datatype="xsd:string"><span>section</span> refers to a resource serving
- as a section in a collection. </dd>
- <dt id="stylesheet" about="#stylesheet" typeof="rdf:Property">stylesheet</dt>
- <dd about="#stylesheet" property="rdfs:comment"
- datatype="xsd:string"><span>stylesheet</span> refers to a resource
- serving as a stylesheet for a resource. </dd>
- <dt id="subsection" about="#subsection" typeof="rdf:Property">subsection</dt>
- <dd about="#subsection" property="rdfs:comment"
- datatype="xsd:string"><span>subsection</span> refers to a resource
- serving as a subsection in a collection. </dd>
- <dt id="start" about="#start" typeof="rdf:Property">start</dt>
- <dd about="#start" property="rdfs:comment"
- datatype="xsd:string"><span>start</span> refers to the first resource in
- a collection of resources. </dd>
- <dt id="top" about="#top" typeof="rdf:Property">top</dt>
- <dd about="#top" property="rdfs:comment"
- datatype="xsd:string"><span>top</span> is a synonym for start. </dd>
- <dt id="up" about="#up" typeof="rdf:Property">up</dt>
- <dd about="#up" property="rdfs:comment"
- datatype="xsd:string"><span>up</span> refers to a resource "above" in a
- hierarchically structured set. </dd>
-</dl>
-</div>
-</div>
-
-<h2 id="XHTMLRoleVocabulary">3. XHTML Role Vocabulary</h2>
-
-<h3 id="XHTMLRoleModule">3.1 Items from the XHTML Role Module</h3>
-
-<p id="role-properties" about="#role-properties" typeof="rdf:Bag">The values in
-this section are defined for use in the <code>role</code> attribute as
-specified in the <a href="#ref_XHTMLROLE">XHTML Role Attribute Module</a>. Note
-that the values in <a href="#XHTMLMetaInformationModule"
-resource="#relrev-properties" rev="rdfs:member">Section 2</a> and <a
-href="#WAIARIA">Section 3.2</a> are also available.</p>
-
-<div about="#role-properties" rev="rdfs:member">
-<dl>
- <dt id="banner" about="#banner" typeof="rdf:Property">banner</dt>
- <dd about="#banner" property="rdfs:comment" datatype="xsd:string">contains
- the prime heading or internal title of a page. </dd>
- <dt id="complementary" about="#complementary"
- typeof="rdf:Property">complementary</dt>
- <dd about="#complementary" property="rdfs:comment"
- datatype="xsd:string">indicates that the section supports but is
- separable from the main content of resource.</dd>
- <dt id="contentinfo" about="#contentinfo"
- typeof="rdf:Property">contentinfo</dt>
- <dd about="#contentinfo" property="rdfs:comment"
- datatype="xsd:string"><span></span>contains meta information about the
- content on the page or the page as a whole.</dd>
- <dt id="definition" about="#definition" typeof="rdf:Property">definition</dt>
- <dd about="#definition" property="rdfs:comment"
- datatype="xsd:string">indicates the definition of a term or concept.</dd>
- <dt id="main" about="#main" typeof="rdf:Property">main</dt>
- <dd about="#main" property="rdfs:comment" datatype="xsd:string">acts as the
- main content of the document. </dd>
- <dt id="navigation" about="#navigation" typeof="rdf:Property">navigation</dt>
- <dd about="#navigation" property="rdfs:comment"
- datatype="xsd:string">indicates a collection of items suitable for
- navigating the document or related documents.</dd>
- <dt id="note" about="#note" typeof="rdf:Property">note</dt>
- <dd about="#note" property="rdfs:comment" datatype="xsd:string">indicates
- the content is parenthetic or ancillary to the main content of the
- resource. </dd>
- <dt id="search" about="#search" typeof="rdf:Property">search</dt>
- <dd about="#search" property="rdfs:comment" datatype="xsd:string">indicates
- that the section provides a search facility. </dd>
-</dl>
-</div>
-
-<h3 id="WAIARIA">3.2 Items from the Accessible Rich Internet Applications
-Vocabulary</h3>
-
-<div about="#role-properties" typeof="rdfs:member">
-<dl>
- <dt id="alert" about="#alert" typeof="rdf:Property">alert</dt>
- <dd about="#alert" property="rdfs:comment" datatype="xsd:string">A message
- with important, and usually time-sensitive, information. Also see
- alertdialog and status.</dd>
- <dt id="alertdialog" about="#alertdialog"
- typeof="rdf:Property">alertdialog</dt>
- <dd about="#alertdialog" property="rdfs:comment" datatype="xsd:string">A
- type of dialog that contains an alert message, where initial focus goes
- to the dialog or an element within it. Also see alert and dialog.</dd>
- <dt id="application" about="#application"
- typeof="rdf:Property">application</dt>
- <dd about="#application" property="rdfs:comment" datatype="xsd:string">A
- region declared as a web application, as opposed to a web document.</dd>
- <dt id="article" about="#article" typeof="rdf:Property">article</dt>
- <dd about="#article" property="rdfs:comment" datatype="xsd:string">A
- section of a page consisting of an independent part of a document, page,
- or site.</dd>
- <dt id="button" about="#button" typeof="rdf:Property">button</dt>
- <dd about="#button" property="rdfs:comment" datatype="xsd:string">An input
- that allows for user-triggered actions when clicked or pressed.</dd>
- <dt id="checkbox" about="#checkbox" typeof="rdf:Property">checkbox</dt>
- <dd about="#checkbox" property="rdfs:comment" datatype="xsd:string">An
- checkable input that has three possible values: true, false, or
- mixed.</dd>
- <dt id="columnheader" about="#columnheader"
- typeof="rdf:Property">columnheader</dt>
- <dd about="#columnheader" property="rdfs:comment" datatype="xsd:string">A
- cell containing header information for a column.</dd>
- <dt id="combobox" about="#combobox" typeof="rdf:Property">combobox</dt>
- <dd about="#combobox" property="rdfs:comment" datatype="xsd:string">A
- presentation of a select; usually similar to a textbox where users can
- type ahead to select an option, or type to enter arbitrary text as a new
- item in the list.</dd>
- <dt id="dialog" about="#dialog" typeof="rdf:Property">dialog</dt>
- <dd about="#dialog" property="rdfs:comment" datatype="xsd:string">A dialog
- is an application window that is designed to interrupt the current
- processing of an application in order to prompt the user to enter
- information or require a response. Also see alertdialog.</dd>
- <dt id="directory" about="#directory" typeof="rdf:Property">directory</dt>
- <dd about="#directory" property="rdfs:comment" datatype="xsd:string">A list
- of references to members of a group, such as a static table of
- contents.</dd>
- <dt id="document" about="#document" typeof="rdf:Property">document</dt>
- <dd about="#document" property="rdfs:comment" datatype="xsd:string">A
- region containing related information that is declared as document
- content, as opposed to a web application.</dd>
- <dt id="grid" about="#grid" typeof="rdf:Property">grid</dt>
- <dd about="#grid" property="rdfs:comment" datatype="xsd:string">A grid
- contains cells of tabular data arranged in rows and columns, like a
- table.</dd>
- <dt id="gridcell" about="#gridcell" typeof="rdf:Property">gridcell</dt>
- <dd about="#gridcell" property="rdfs:comment" datatype="xsd:string">A cell
- in a grid or treegrid.</dd>
- <dt id="group" about="#group" typeof="rdf:Property">group</dt>
- <dd about="#group" property="rdfs:comment" datatype="xsd:string">A set of
- user interface objects which would not be included in a page summary or
- table of contents by an assistive technology.</dd>
- <dt id="heading" about="#heading" typeof="rdf:Property">heading</dt>
- <dd about="#heading" property="rdfs:comment" datatype="xsd:string">A
- heading for a section of the page.</dd>
- <dt id="img" about="#img" typeof="rdf:Property">img</dt>
- <dd about="#img" property="rdfs:comment" datatype="xsd:string">A container
- for a collection of elements that form an image.</dd>
- <dt id="link" about="#link" typeof="rdf:Property">link</dt>
- <dd about="#link" property="rdfs:comment" datatype="xsd:string">An
- interactive reference to an internal or external resource.</dd>
- <dt id="list" about="#list" typeof="rdf:Property">list</dt>
- <dd about="#list" property="rdfs:comment" datatype="xsd:string">A group of
- non-interactive list items.</dd>
- <dt id="listbox" about="#listbox" typeof="rdf:Property">listbox</dt>
- <dd about="#listbox" property="rdfs:comment" datatype="xsd:string">A widget
- that allows the user to select one or more items from a list of
- choices.</dd>
- <dt id="listitem" about="#listitem" typeof="rdf:Property">listitem</dt>
- <dd about="#listitem" property="rdfs:comment" datatype="xsd:string">A
- single item in a list, listbox, or directory.</dd>
- <dt id="log" about="#log" typeof="rdf:Property">log</dt>
- <dd about="#log" property="rdfs:comment" datatype="xsd:string">A type of
- live region where new information is added in meaningful order and old
- information may disappear. Also see marquee.</dd>
- <dt id="marquee" about="#marquee" typeof="rdf:Property">marquee</dt>
- <dd about="#marquee" property="rdfs:comment" datatype="xsd:string">A type
- of live region where non-essential information changes frequently. Also
- see log.</dd>
- <dt id="math" about="#math" typeof="rdf:Property">math</dt>
- <dd about="#math" property="rdfs:comment" datatype="xsd:string">An element
- that represents a mathematical expression.</dd>
- <dt id="menu" about="#menu" typeof="rdf:Property">menu</dt>
- <dd about="#menu" property="rdfs:comment" datatype="xsd:string">A type of
- widget that offers a list of choices to the user.</dd>
- <dt id="menubar" about="#menubar" typeof="rdf:Property">menubar</dt>
- <dd about="#menubar" property="rdfs:comment" datatype="xsd:string">A
- presentation of menu that usually remains visible and is usually
- presented horizontally.</dd>
- <dt id="menuitem" about="#menuitem" typeof="rdf:Property">menuitem</dt>
- <dd about="#menuitem" property="rdfs:comment" datatype="xsd:string">An
- option in a group of choices contained by a menu or menubar.</dd>
- <dt id="menuitemcheckbox" about="#menuitemcheckbox"
- typeof="rdf:Property">menuitemcheckbox</dt>
- <dd about="#menuitemcheckbox" property="rdfs:comment"
- datatype="xsd:string">A checkable menuitem that has three possible
- values: true, false, or mixed.</dd>
- <dt id="menuitemradio" about="#menuitemradio"
- typeof="rdf:Property">menuitemradio</dt>
- <dd about="#menuitemradio" property="rdfs:comment" datatype="xsd:string">A
- checkable menuitem in a group of menuitemradio roles, only one of which
- can be checked at a time.</dd>
- <dt id="option" about="#option" typeof="rdf:Property">option</dt>
- <dd about="#option" property="rdfs:comment" datatype="xsd:string">A
- selectable item in a select list.</dd>
- <dt id="presentation" about="#presentation"
- typeof="rdf:Property">presentation</dt>
- <dd about="#presentation" property="rdfs:comment" datatype="xsd:string">An
- element whose role is presentational and does not need to be mapped to
- the accessibility API.</dd>
- <dt id="progressbar" about="#progressbar"
- typeof="rdf:Property">progressbar</dt>
- <dd about="#progressbar" property="rdfs:comment" datatype="xsd:string">An
- element that displays the progress status for tasks that take a long
- time.</dd>
- <dt id="radio" about="#radio" typeof="rdf:Property">radio</dt>
- <dd about="#radio" property="rdfs:comment" datatype="xsd:string">A
- checkable input in a group of radio roles, only one of which can be
- checked at a time.</dd>
- <dt id="radiogroup" about="#radiogroup" typeof="rdf:Property">radiogroup</dt>
- <dd about="#radiogroup" property="rdfs:comment" datatype="xsd:string">A
- group of radio buttons.</dd>
- <dt id="region" about="#region" typeof="rdf:Property">region</dt>
- <dd about="#region" property="rdfs:comment" datatype="xsd:string">A large
- perceivable section of a web page or document, that the author feels
- should be included in a summary of page features.</dd>
- <dt id="row" about="#row" typeof="rdf:Property">row</dt>
- <dd about="#row" property="rdfs:comment" datatype="xsd:string">A row of
- cells in a grid.</dd>
- <dt id="rowheader" about="#rowheader" typeof="rdf:Property">rowheader</dt>
- <dd about="#rowheader" property="rdfs:comment" datatype="xsd:string">A cell
- containing header information for a row in a grid.</dd>
- <dt id="separator" about="#separator" typeof="rdf:Property">separator</dt>
- <dd about="#separator" property="rdfs:comment" datatype="xsd:string">A
- divider that separates and distinguishes sections of content or groups of
- menuitems.</dd>
- <dt id="slider" about="#slider" typeof="rdf:Property">slider</dt>
- <dd about="#slider" property="rdfs:comment" datatype="xsd:string">A user
- input where the user selects a value from within a given range.</dd>
- <dt id="spinbutton" about="#spinbutton" typeof="rdf:Property">spinbutton</dt>
- <dd about="#spinbutton" property="rdfs:comment" datatype="xsd:string">A
- form of range that expects a user to select from amongst discrete
- choices.</dd>
- <dt id="status" about="#status" typeof="rdf:Property">status</dt>
- <dd about="#status" property="rdfs:comment" datatype="xsd:string">A
- container whose content is advisory information for the user but is not
- important enough to justify an alert. Also see alert.</dd>
- <dt id="tab" about="#tab" typeof="rdf:Property">tab</dt>
- <dd about="#tab" property="rdfs:comment" datatype="xsd:string">A header for
- a tabpanel.</dd>
- <dt id="tablist" about="#tablist" typeof="rdf:Property">tablist</dt>
- <dd about="#tablist" property="rdfs:comment" datatype="xsd:string">A list
- of tab elements, which are references to tabpanel elements.</dd>
- <dt id="tabpanel" about="#tabpanel" typeof="rdf:Property">tabpanel</dt>
- <dd about="#tabpanel" property="rdfs:comment" datatype="xsd:string">A
- container for the resources associated with a tab.</dd>
- <dt id="textbox" about="#textbox" typeof="rdf:Property">textbox</dt>
- <dd about="#textbox" property="rdfs:comment" datatype="xsd:string">Input
- that allows free-form text as their value.</dd>
- <dt id="timer" about="#timer" typeof="rdf:Property">timer</dt>
- <dd about="#timer" property="rdfs:comment" datatype="xsd:string">A
- numerical counter which indicates an amount of elapsed time from a start
- point, or the time remaining until an end point.</dd>
- <dt id="toolbar" about="#toolbar" typeof="rdf:Property">toolbar</dt>
- <dd about="#toolbar" property="rdfs:comment" datatype="xsd:string">A
- collection of commonly used function buttons represented in compact
- visual form.</dd>
- <dt id="tooltip" about="#tooltip" typeof="rdf:Property">tooltip</dt>
- <dd about="#tooltip" property="rdfs:comment" datatype="xsd:string">A
- contextual popup that displays a description for an element in a mouse
- hover or keyboard focused state. Supplement to the normal tooltip
- processing of the user agent.</dd>
- <dt id="tree" about="#tree" typeof="rdf:Property">tree</dt>
- <dd about="#tree" property="rdfs:comment" datatype="xsd:string">A type of
- list that may contain sub-level nested groups that can be collapsed and
- expanded.</dd>
- <dt id="treegrid" about="#treegrid" typeof="rdf:Property">treegrid</dt>
- <dd about="#treegrid" property="rdfs:comment" datatype="xsd:string">A grid
- whose rows can be expanded and collapsed in the same manner as for a
- tree.</dd>
- <dt id="treeitem" about="#treeitem" typeof="rdf:Property">treeitem</dt>
- <dd about="#treeitem" property="rdfs:comment" datatype="xsd:string">An
- option item of a tree. This is an element within a tree that may be
- expanded or collapsed if it contains a sub-level group of treeitems.</dd>
-</dl>
-</div>
-
-<h2>Appendix A - References</h2>
-<dl>
- <dt><a id="ref_ITS" class="normref">[ITS]</a></dt>
- <dd>"<cite><a href="http://www.w3.org/TR/2007/REC-its-20070403/">The
- Internationalization Tag Set (ITS) Version 1.0</a></cite>", W3C
- Recommendation, C. Lieske, F. Sasaki, 3 April 2007.<br />
- Available at: http://www.w3.org/TR/2007/REC-its-20070403/</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 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_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, <em>et
- al.</em>, 8 October 2008<br />
- http://www.w3.org/TR/2008/REC-xhtml-modularization-20081008</dd>
- <dt class="label" id="ref_XHTMLRDFa">[XHTMLRDFa]</dt>
- <dd>"<cite><a
- href="http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014">RDFa in XHTML:
- Syntax and Processing</a></cite>", W3C Recommendation, B. Adida, <em>et
- al.</em>, 14 October 2008.<br />
- http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014.</dd>
- <dt class="label" id="ref_XHTMLROLE">[XHTMLROLE]</dt>
- <dd>"<cite><a href="http://www.w3.org/TR/2008/WD-xhtml-role-20080407">XHTML
- Role Attribute Module</a></cite>", W3C Working Draft, M. Birbeck, et. al.
- 7 April 2008. http://www.w3.org/TR/2008/WD-xhtml-role-20080407<br />
- </dd>
-</dl>
-<hr />
-<address>
- <a href="http://www.cwi.nl/~steven/">Steven Pemberton</a>, W3C HTML Activity
- Lead
-</address>
-<address>
- Last edited: <!--$date=-->2010-01-27</address>
-</body>
-</html>
View
4 lib/rdf/rdfa.rb
@@ -9,7 +9,7 @@ module RDF
# require 'rdf/rdfa'
#
# @example Parsing RDF statements from an XHTML+RDFa file
- # RDF::RDFa::Reader.open("etc/foaf.html") do |reader|
+ # RDF::RDFa::Reader.open("etc/doap.html") do |reader|
# reader.each_statement do |statement|
# puts statement.inspect
# end
@@ -27,7 +27,7 @@ module RDFa
require 'rdf/rdfa/vocab'
require 'rdf/rdfa/patches/string_hacks'
autoload :Expansion, 'rdf/rdfa/expansion'
- autoload :Profile, 'rdf/rdfa/profile'
+ autoload :Context, 'rdf/rdfa/context'
autoload :Reader, 'rdf/rdfa/reader'
autoload :Writer, 'rdf/rdfa/writer'
autoload :VERSION, 'rdf/rdfa/version'
View
84 lib/rdf/rdfa/profile.rb → lib/rdf/rdfa/context.rb
@@ -1,18 +1,18 @@
module RDF::RDFa
##
- # Profile representation existing of a hash of terms, prefixes, a default vocabulary and a URI.
+ # Context representation existing of a hash of terms, prefixes, a default vocabulary and a URI.
#
- # Profiles are used for storing RDFa profile representations. A representation is created
- # by serializing a profile graph (typically also in RDFa, but may be in other representations).
+ # Contexts are used for storing RDFa context representations. A representation is created
+ # by serializing a context graph (typically also in RDFa, but may be in other representations).
#
- # The class may be backed by an RDF::Repository, which will be used to retrieve a profile graph
+ # The class may be backed by an RDF::Repository, which will be used to retrieve a context graph
# or to load into, if no such graph exists
- class Profile
- # Prefix mappings defined in this profile
+ class Context
+ # Prefix mappings defined in this context
# @return [Hash{Symbol => RDF::URI}]
attr_reader :prefixes
- # Term mappings defined in this profile
+ # Term mappings defined in this context
# @return [Hash{Symbol => RDF::URI}]
attr_reader :terms
@@ -20,20 +20,20 @@ class Profile
# @return [RDF::URI]
attr_reader :vocabulary
- # URI defining this profile
+ # URI defining this context
# @return [RDF::URI]
attr_reader :uri
##
- # Initialize a new profile from the given URI.
+ # Initialize a new context from the given URI.
#
- # Parses the profile and places it in the repository and cache
+ # Parses the context and places it in the repository and cache
#
- # @param [RDF::URI, #to_s] uri URI of profile to be represented
- # @yield [profile]
- # @yieldparam [RDF::RDFa::Profile] profile
+ # @param [RDF::URI, #to_s] uri URI of context to be represented
+ # @yield [context]
+ # @yieldparam [RDF::RDFa::Context] context
# @yieldreturn [void] ignored
- # @return [RDF::RDFa::Profile]
+ # @return [RDF::RDFa::Context]
def initialize(uri, options = {}, &block)
@uri = RDF::URI.intern(uri)
@prefixes = options.fetch(:prefixes, {})
@@ -55,24 +55,24 @@ def self.cache
end
##
- # Repository used for saving profiles
+ # Repository used for saving contexts
# @return [RDF::Repository]
- # @raise [RDF::RDFa::ProfileError] if profile does not support contexts
+ # @raise [RDF::RDFa::ContextError] if context does not support contexts
def self.repository
- @repository ||= RDF::Repository.new(:title => "RDFa Profiles")
+ @repository ||= RDF::Repository.new(:title => "RDFa Contexts")
end
##
- # Set repository used for saving profiles
+ # Set repository used for saving contexts
# @param [RDF::Repository] repo
# @return [RDF::Repository]
def self.repository=(repo)
- raise ProfileError, "Profile Repository must support context" unless repo.supports?(:context)
+ raise ContextError, "Context Repository must support context" unless repo.supports?(:context)
@repository = repo
end
- # Return a profile faulting through the cache
- # @return [RDF::RDFa::Profile]
+ # Return a context faulting through the cache
+ # @return [RDF::RDFa::Context]
def self.find(uri)
uri = RDF::URI.intern(uri)
@@ -82,16 +82,16 @@ def self.find(uri)
# Return something to make the caller happy if we're re-entered
cache[uri] = Struct.new(:prefixes, :terms, :vocabulary).new({}, {}, nil)
# Now do the actual load
- cache[uri] = new(uri) do |profile|
- STDERR.puts("process_profile: retrieve profile <#{uri}>") if RDF::RDFa.debug?
- Profile.load(uri)
- profile.parse(repository.query(:context => uri))
+ cache[uri] = new(uri) do |context|
+ STDERR.puts("process_context: retrieve context <#{uri}>") if RDF::RDFa.debug?
+ Context.load(uri)
+ context.parse(repository.query(:context => uri))
end
rescue Exception => e
- raise ProfileError, "Profile #{uri}: #{e.message}"
+ raise ContextError, "Context #{uri}: #{e.message}"
end
- # Load profile into repository
+ # Load context into repository
def self.load(uri)
uri = RDF::URI.intern(uri)
repository.load(uri.to_s, :base_uri => uri, :context => uri) unless repository.has_context?(uri)
@@ -99,17 +99,17 @@ def self.load(uri)
# @return [RDF::Repository]
def repository
- Profile.repository
+ Context.repository
end
##
- # Defines the given named URI prefix for this profile.
+ # Defines the given named URI prefix for this context.
#
# @example Defining a URI prefix
- # profile.prefix :dc, RDF::URI('http://purl.org/dc/terms/')
+ # context.prefix :dc, RDF::URI('http://purl.org/dc/terms/')
#
# @example Returning a URI prefix
- # profile.prefix(:dc) #=> RDF::URI('http://purl.org/dc/terms/')
+ # context.prefix(:dc) #=> RDF::URI('http://purl.org/dc/terms/')
#
# @overload prefix(name, uri)
# @param [Symbol, #to_s] name
@@ -125,13 +125,13 @@ def prefix(name, uri = nil)
end
##
- # Defines the given named URI term for this profile.
+ # Defines the given named URI term for this context.
#
# @example Defining a URI term
- # profile.term :title, RDF::URI('http://purl.org/dc/terms/title')
+ # context.term :title, RDF::URI('http://purl.org/dc/terms/title')
#
- # @example Returning a URI profile
- # profile.term(:title) #=> RDF::URI('http://purl.org/dc/terms/TITLE')
+ # @example Returning a URI context
+ # context.term(:title) #=> RDF::URI('http://purl.org/dc/terms/TITLE')
#
# @overload term(name, uri)
# @param [Symbol, #to_s] name
@@ -152,12 +152,12 @@ def term(name, uri = nil)
# @param [RDF::Enumerable, Enumerator] queryable
# @return [void] ignored
def parse(enumerable)
- STDERR.puts("process_profile: parse profile <#{uri}>") if RDF::RDFa.debug?
+ STDERR.puts("process_context: parse context <#{uri}>") if RDF::RDFa.debug?
resource_info = {}
enumerable.each do |statement|
res = resource_info[statement.subject] ||= {}
next unless statement.object.is_a?(RDF::Literal)
- STDERR.puts("process_profile: statement=#{statement.inspect}") if RDF::RDFa.debug?
+ STDERR.puts("process_context: statement=#{statement.inspect}") if RDF::RDFa.debug?
%w(uri term prefix vocabulary).each do |term|
res[term] ||= statement.object.value if statement.predicate == RDF::RDFA[term]
end
@@ -170,7 +170,7 @@ def parse(enumerable)
term = res["term"]
prefix = res["prefix"]
vocab = res["vocabulary"]
- STDERR.puts("process_profile: uri=#{uri.inspect}, term=#{term.inspect}, prefix=#{prefix.inspect}, vocabulary=#{vocab.inspect}") if RDF::RDFa.debug?
+ STDERR.puts("process_context: uri=#{uri.inspect}, term=#{term.inspect}, prefix=#{prefix.inspect}, vocabulary=#{vocab.inspect}") if RDF::RDFa.debug?
@vocabulary = vocab if vocab
@@ -190,9 +190,9 @@ def parse(enumerable)
end
##
- # The base class for RDF profile errors.
- class ProfileError < IOError; end
+ # The base class for RDF context errors.
+ class ContextError < IOError; end
end
-# Load cooked profiles
-Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), 'profile', '*')).each {|f| load f}
+# Load cooked contexts
+Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), 'context', '*')).each {|f| load f}
View
10 lib/rdf/rdfa/profile/html.rb → lib/rdf/rdfa/context/html.rb
@@ -1,10 +1,10 @@
-# This file is automatically generated by ./script/intern_profile
-# RDFa profile for http://www.w3.org/2011/rdfa-context/html-rdfa-1.1
+# This file is automatically generated by ./script/intern_context
+# RDFa context for http://www.w3.org/2011/rdfa-context/html-rdfa-1.1
-class RDF::RDFa::Profile
+class RDF::RDFa::Context
def self.find_with_html_rdfa_1_1(uri)
if uri.to_s == "http://www.w3.org/2011/rdfa-context/html-rdfa-1.1"
- @_html_rdfa_1_1_prof ||= RDF::RDFa::Profile.new(RDF::URI("http://www.w3.org/2011/rdfa-context/html-rdfa-1.1"), {
+ @_html_rdfa_1_1_prof ||= RDF::RDFa::Context.new(RDF::URI("http://www.w3.org/2011/rdfa-context/html-rdfa-1.1"), {
})
else
find_without_html_rdfa_1_1(uri)
@@ -13,7 +13,7 @@ def self.find_with_html_rdfa_1_1(uri)
class << self
##
- # Override find to return this profile, if matched
+ # Override find to return this context, if matched
alias_method :find_without_html_rdfa_1_1, :find
alias_method :find, :find_with_html_rdfa_1_1
end
View
10 lib/rdf/rdfa/profile/xhtml.rb → lib/rdf/rdfa/context/xhtml.rb
@@ -1,10 +1,10 @@
-# This file is automatically generated by ./script/intern_profile
-# RDFa profile for http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1
+# This file is automatically generated by ./script/intern_context
+# RDFa context for http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1
-class RDF::RDFa::Profile
+class RDF::RDFa::Context
def self.find_with_xhtml_rdfa_1_1(uri)
if uri.to_s == "http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1"
- @_xhtml_rdfa_1_1_prof ||= RDF::RDFa::Profile.new(RDF::URI("http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1"), {
+ @_xhtml_rdfa_1_1_prof ||= RDF::RDFa::Context.new(RDF::URI("http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1"), {
:terms => {
:alternate => "http://www.w3.org/1999/xhtml/vocab#alternate",
:appendix => "http://www.w3.org/1999/xhtml/vocab#appendix",
@@ -40,7 +40,7 @@ def self.find_with_xhtml_rdfa_1_1(uri)
class << self
##
- # Override find to return this profile, if matched
+ # Override find to return this context, if matched
alias_method :find_without_xhtml_rdfa_1_1, :find
alias_method :find, :find_with_xhtml_rdfa_1_1
end
View
10 lib/rdf/rdfa/profile/xml.rb → lib/rdf/rdfa/context/xml.rb
@@ -1,10 +1,10 @@
-# This file is automatically generated by ./script/intern_profile
-# RDFa profile for http://www.w3.org/2011/rdfa-context/rdfa-1.1
+# This file is automatically generated by ./script/intern_context
+# RDFa context for http://www.w3.org/2011/rdfa-context/rdfa-1.1
-class RDF::RDFa::Profile
+class RDF::RDFa::Context
def self.find_with_rdfa_1_1(uri)
if uri.to_s == "http://www.w3.org/2011/rdfa-context/rdfa-1.1"
- @_rdfa_1_1_prof ||= RDF::RDFa::Profile.new(RDF::URI("http://www.w3.org/2011/rdfa-context/rdfa-1.1"), {
+ @_rdfa_1_1_prof ||= RDF::RDFa::Context.new(RDF::URI("http://www.w3.org/2011/rdfa-context/rdfa-1.1"), {
:prefixes => {
:cc => "http://creativecommons.org/ns#",
:ctag => "http://commontag.org/ns#",
@@ -48,7 +48,7 @@ def self.find_with_rdfa_1_1(uri)
class << self
##
- # Override find to return this profile, if matched
+ # Override find to return this context, if matched
alias_method :find_without_rdfa_1_1, :find
alias_method :find, :find_with_rdfa_1_1
end
View
2  lib/rdf/rdfa/expansion.rb
@@ -215,5 +215,5 @@ def owl_entailment(repo)
end
end
-# Load cooked profiles
+# Load cooked vocabularies
Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), 'expansion', '*')).each {|f| load f}
View
4 lib/rdf/rdfa/format.rb
@@ -4,8 +4,8 @@ module RDF::RDFa
#
# @example Obtaining an RDFa format class
# RDF::Format.for(:rdfa) #=> RDF::RDFa::Format
- # RDF::Format.for("etc/foaf.html")
- # RDF::Format.for(:file_name => "etc/foaf.html")
+ # RDF::Format.for("etc/doap.html")
+ # RDF::Format.for(:file_name => "etc/doap.html")
# RDF::Format.for(:file_extension => "html")
# RDF::Format.for(:content_type => "text/html")
# RDF::Format.for(:content_type => "application/xhtml+xml")
View
18 lib/rdf/rdfa/reader.rb
@@ -158,7 +158,7 @@ class EvaluationContext # :nodoc:
#
# This specification does not define an initial list.
# Host Languages may define an initial list.
- # If a Host Language provides an initial list, it should do so via an RDFa Profile document.
+ # If a Host Language provides an initial list, it should do so via an RDFa Context document.
#
# @attr [Hash{Symbol => RDF::URI}]
attr :term_mappings, true
@@ -450,7 +450,7 @@ def add_processor_message(node, message, process_class)
def add_triple(node, subject, predicate, object)
statement = RDF::Statement.new(subject, predicate, object)
add_info(node, "statement: #{RDF::NTriples.serialize(statement)}")
- @callback.call(statement) if @options[:rdfagraph].include?(:output)
+ @callback.call(statement) if @options[:rdfagraph].include?(:output) && statement.valid?
end
# Parsing an RDFa document (this is *not* the recursive method)
@@ -482,7 +482,7 @@ def parse_whole_document(doc, base)
add_debug("", "parse_whole_doc: traversal complete'")
end
- # Parse and process URI mappings, Term mappings and a default vocabulary from @profile
+ # Parse and process URI mappings, Term mappings and a default vocabulary from @context
#
# Yields each mapping
def load_initial_contexts(initial_contexts)
@@ -491,7 +491,7 @@ def load_initial_contexts(initial_contexts)
each do |uri|
# Don't try to open ourselves!
if base_uri == uri
- add_debug(root) {"load_initial_contexts: skip recursive profile <#{uri}>"}
+ add_debug(root) {"load_initial_contexts: skip recursive context <#{uri}>"}
next
end
@@ -499,7 +499,7 @@ def load_initial_contexts(initial_contexts)
begin
add_info(root, "load_initial_contexts: load <#{uri}>")
RDF::RDFa.debug = false
- profile = Profile.find(uri)
+ context = Context.find(uri)
rescue Exception => e
RDF::RDFa.debug = old_debug
add_error(root, e.message)
@@ -509,12 +509,12 @@ def load_initial_contexts(initial_contexts)
end
# Add URI Mappings to prefixes
- profile.prefixes.each_pair do |prefix, value|
+ context.prefixes.each_pair do |prefix, value|
prefix(prefix, value)
end
- yield :uri_mappings, profile.prefixes unless profile.prefixes.empty?
- yield :term_mappings, profile.terms unless profile.terms.empty?
- yield :default_vocabulary, profile.vocabulary if profile.vocabulary
+ yield :uri_mappings, context.prefixes unless context.prefixes.empty?
+ yield :term_mappings, context.terms unless context.terms.empty?
+ yield :default_vocabulary, context.vocabulary if context.vocabulary
end
end
View
10 lib/rdf/rdfa/writer.rb
@@ -440,18 +440,18 @@ def render_property(predicate, objects, options = {}, &block)
def preprocess
# Load initial contexts
# Add terms and prefixes to local store for converting URIs
- # Keep track of vocabulary from left-most profile
+ # Keep track of vocabulary from left-most context
[XML_RDFA_CONTEXT, HTML_RDFA_CONTEXT].each do |uri|
- prof = Profile.find(uri)
- prof.prefixes.each_pair do |k, v|
+ ctx = Context.find(uri)
+ ctx.prefixes.each_pair do |k, v|
@uri_to_prefix[v] = k
end
- prof.terms.each_pair do |k, v|
+ ctx.terms.each_pair do |k, v|
@uri_to_term_or_curie[v] = k
end
- @vocabulary = prof.vocabulary.to_s if prof.vocabulary
+ @vocabulary = ctx.vocabulary.to_s if ctx.vocabulary
end
# Load defined prefixes
View
30 script/intern_profile → script/intern_context
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
#
-# Generate a Ruby version of an RDFa vocabulary to be directly accessible from RDF::RDFa::Profile
+# Generate a Ruby version of an RDFa vocabulary to be directly accessible from RDF::RDFa::Context
require 'rubygems'
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", 'lib')))
require 'linkeddata'
@@ -42,31 +42,31 @@ help if ARGV.empty?
ARGV.each do |file|
uri = RDF::URI(file)
- if RDF::RDFa::Profile.cache[uri]
+ if RDF::RDFa::Context.cache[uri]
STDERR.puts "Remove cached entry for #{uri} before attempting to parse"
exit(1)
end
- profile = RDF::RDFa::Profile.find(uri)
+ context = RDF::RDFa::Context.find(uri)
if dump
- puts profile.inspect
+ puts context.inspect
else
- profile_short = uri.to_s.split("/").last.gsub(/[^\w]/, '_')
+ context_short = uri.to_s.split("/").last.gsub(/[^\w]/, '_')
preceeding = ' '
output.puts <<START
# This file is automatically generated by #{__FILE__}
-# RDFa profile for #{file}
+# RDFa context for #{file}
-class RDF::RDFa::Profile
- def self.find_with_#{profile_short}(uri)
+class RDF::RDFa::Context
+ def self.find_with_#{context_short}(uri)
if uri.to_s == "#{file}"
- @_#{profile_short}_prof ||= RDF::RDFa::Profile.new(RDF::URI("#{file}"), {
+ @_#{context_short}_prof ||= RDF::RDFa::Context.new(RDF::URI("#{file}"), {
START
- output.puts %{#{preceeding}:vocabulary => "#{profile.vocabulary},"} if profile.vocabulary
+ output.puts %{#{preceeding}:vocabulary => "#{context.vocabulary},"} if context.vocabulary
[:prefixes, :terms].each do |t|
- hash = profile.send(t)
+ hash = context.send(t)
key_width = hash.keys.inject(0) {|width, k| k.inspect.length > width ? k.inspect.length : width}
unless hash.empty?
output.puts %(#{preceeding}:#{t} => {)
@@ -81,15 +81,15 @@ START
output.puts <<END
})
else
- find_without_#{profile_short}(uri)
+ find_without_#{context_short}(uri)
end
end
class << self
##
- # Override find to return this profile, if matched
- alias_method :find_without_#{profile_short}, :find
- alias_method :find, :find_with_#{profile_short}
+ # Override find to return this context, if matched
+ alias_method :find_without_#{context_short}, :find
+ alias_method :find, :find_with_#{context_short}
end
end
END
View
3  script/intern_vocabulary
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
#
-# Generate a Ruby version of an RDFa vocabulary to be directly accessible from RDF::RDFa::Profile
+# Generate a Ruby version of an RDFa vocabulary to be directly accessible from RDF::RDFa::Vocabulary
require 'rubygems'
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", 'lib')))
require 'linkeddata'
@@ -87,7 +87,6 @@ ARGV.each do |file|
if dump
puts g.dump(:ttl)
else
- profile_short = uri.to_s.split("/").last.gsub(/[^\w]/, '_')
preceeding = ' '
output.puts <<START
# This file is automatically generated by #{__FILE__}
View
10 spec/profile_spec.rb → spec/context_spec.rb
@@ -1,10 +1,10 @@
$:.unshift "."
require 'spec_helper'
-describe RDF::RDFa::Profile do
+describe RDF::RDFa::Context do
describe ".new" do
describe "foaf" do
- subject { RDF::RDFa::Profile.new("http://example/") }
+ subject { RDF::RDFa::Context.new("http://example/") }
it "has a URI" do
subject.uri.should == RDF::URI("http://example/")
@@ -26,7 +26,7 @@
describe ".find" do
describe "rdfa-1.1" do
- subject { RDF::RDFa::Profile.find("http://www.w3.org/2011/rdfa-context/rdfa-1.1") }
+ subject { RDF::RDFa::Context.find("http://www.w3.org/2011/rdfa-context/rdfa-1.1") }
it "has 3 terms" do
subject.terms.keys.length.should == 3
@@ -46,7 +46,7 @@
end
describe "html+rdfa-1.1" do
- subject { RDF::RDFa::Profile.find("http://www.w3.org/2011/rdfa-context/html-rdfa-1.1") }
+ subject { RDF::RDFa::Context.find("http://www.w3.org/2011/rdfa-context/html-rdfa-1.1") }
it "has 0 terms" do
subject.terms.keys.length.should == 0
@@ -66,7 +66,7 @@
end
describe "xhtml+rdfa-1.1" do
- subject { RDF::RDFa::Profile.find("http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1") }
+ subject { RDF::RDFa::Context.find("http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1") }
it "has 25 terms" do
subject.terms.keys.length.should == 25
Please sign in to comment.
Something went wrong with that request. Please try again.