[contents]

W3C

XHTML link types in RDF

W3C Editor's Working Draft 2 August 2005

This version:
http://www.w3.org/TR/2005/WD-html-linktypes-200508@@ $Id: Overview.html,v 1.53 2005/08/02 21:05:06 danbri Exp $
Latest version:
http://www.w3.org/TR/@@html-linktypes
Editor:
Dan Brickley, World Wide Web Consortium <danbri@w3.org>

Abstract

This document describes an RDF ([RDFConcepts]) representation of XHTML 2.0's built-in link types. It is based on the Metainformation Attributes Module of [XHTML2], and uses W3C's RDF Schema [RDFS] and Web Ontology [OWL Overview] languages to describe several kinds of relationship that can hold between information resources.

Status of this Document

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 W3C technical reports index at http://www.w3.org/TR/.

This document is for review by the Semantic Web Best Practices and Deployment Working Group and is subject to change without notice. This document has no formal standing within W3C. Please consult the group's home page and the W3C technical reports index for information about the latest publications by this group.

A number of Open Issues remain before this document will be a candidate for publication as a Technical Report.

The Semantic Web Best Practices and Deployment Working Group is part of the Semantic Web Activity. This document has been prepared as part of a joint taskforce on RDF-in-XHTML with the HTML Working Group.

Please send comments to the public-rdf-in-xhtml-tf@w3.org mailing list. The archives for this list are publicly available.

This document is expected to be published and maintained as a W3C Working Group Note after review and refinement. Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.


Table of Contents

  1. 1. Introduction
  2. 2. Scope
  3. 3. Examples
  4. 4. XHTML links as an RDF vocabulary
  5. 5. Namespace
  6. 6. Design Issues
  7. 7. References
  8. Appendix A: Vocabulary Description in RDF/XML

1. Introduction

This document describes an RDF ([RDFConcepts]) representation of XHTML 2.0's built-in link types. It is based on the Metainformation Attributes Module of [XHTML2], and uses W3C's RDF Schema [RDFS] and Web Ontology [OWL Overview] languages to describe several kinds of relationship that can hold between information resources.

The HTML community has for many years understood the importance of typed links (eg. Connolly 96]) for Web metadata. There have been a number of "built-in" sets of link types associated with HTML. The XHTML 2.0 ([XHTML2]) specification continues this tradition, defining a number of terms that name useful inter-document relationship types that can be used within HTML markup.

2. Scope

This RDF representation of the XHTML 2.0 link types was created to:

This document is an attempt to meet the following goals:

Simplicity.
RDF is defined in terms of typed relationships. HTML has for years defined a number of relationship types for use in hyperlinks. An RDF representation of HTML (specifically, XHTML 2.0) link types should capture this similarity.
Re-usability.
An RDF representation of HTML link types should allow for their re-use in non-HTML contexts, for example RSS 1.0 or Atom feeds, RDF sitemaps, or other environments that allow binary relationships to be identified by URI.
Minimal innovation.
This document aims to reflect as accurately as possible the meaning of the link types from XHTML 2.0. It does not aim to improve, adapt, or augment these, except where minor changes are needed to fit HTML's structures into RDF. The XHTML 2.0 specification provides the normative definition of XHTML 2.0 link typing. This document seeks to provide an RDF interpretation of the link types that is faithful to their meaning in that specification.

This document does not currently aim at a complete mapping; it may not be possible to represent everything from XHTML link typing in RDF using the representation presented here.

This document does not attempt to provide an RDF representation for link types defined in earlier versions of XHTML or HTML. It does not provide an account of link types defined using HTML profiles (eg. "microformats").

This document does not attempt to represent any of the syntactic aspects of RDF in XHTML 2.0, ie. the mapping from XML elements and attributes into RDF statements.

3. Examples

This brief example shows one potential contribution of this vocabulary to the Semantic Web: simple Web page metadata can be made more useful when linked together. We use the XHTML link types (marked up here using the lt: prefix) to describe information about glossary and copyright documents associated with W3C's homepage, alongside privacy, document profile and other metadata. We also describe a second page on the site, showing how applications can navigate the "up" relationships between pages to find metadata (eg. links to glossaries or copyright statements).

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:lt="http://www.w3.org/2002/06/xhtml2/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:base="http://www.w3.org/">
  <rdf:Description rdf:about="http://www.w3.org/">
    <dc:title>World Wide Web Consortium</dc:title> 
    <lt:glossary rdf:resource="2003/glossary/"/>
    <lt:copyright rdf:resource="Consortium/Legal/2002/copyright-documents-20021231"/>
    <lt:meta rdf:resource="Overview-about.rdf"/>
    <lt:p3pv1 rdf:resource="http://www.w3.org/2001/05/P3P/p3p.xml"/>
    <lt:profile rdf:resource="http://www.w3.org/2000/08/w3c-synd/#"/>
  </rdf:Description>
  <rdf:Description rdf:about="TR/">
    <dc:title>W3C Technical Reports and Publications</dc:title>
    <lt:up rdf:resource="http://www.w3.org/"/>
  </rdf:Description>
</rdf:RDF>

A diagrammatic representation of the corresponding RDF follows:

A 'node and arc' diagram, showing the 8 triples of the RDF graph.

4. XHTML links as an RDF vocabulary

This section provides a brief introduction to linktypes.rdf (the machine-readable vocabulary description).

XHTML 2.0 defines the following link types: alternate, start, next, prev, up, contents, index, glossary, copyright, chapter, section, subsection, appendix, help, bookmark, meta, icon, p3pv1, propfile. See the Metainformation Attributes Module of XHTML 2.0 [XHTML2] for the normative, textual definition of each of these link types.

The RDF representation of these link types uses the link name as a local name (and human-readable rdfs:label) for each RDF property. The rdfs:domain and rdfs:range of each property are considered to be the class InformationResource, a utility class representing information resources as defined by the Architecture of the World Wide Web, Volume One W3C Recommendation ([WebArch]). Note that this is an interpretation of the XHTML 2.0 design that has not been formally confirmed by the HTML Working Group. Note that non-HTML, non-XML documents can be inter-related using the link types described here (eg. Javascript, CSS).

The OWL language is used to note that next and prev are inverses of each other. We also use OWL to note that each property is a ObjectProperty, ie. a relationship between things that are not "literals". Note that this last point means that the properties cannot, in this form, be used as a relationship to a piece of inline text (unless represented as an RDF resource (eg. via a data: URI).

5. Namespace

For an RDF vocabulary such as this to be used in actual RDF data, the terms it defines need to be associated with URIs. This is typically accomplished by associating the vocabulary with a namespace URI. In this version of the document, the proposed URI is that of the XHTML2 namespace itself. This was chosen for reasons of compatibility with the RDF-based metadata syntax in XHTML2. Feedback is invited on this design choice, and on the question of how the RDFS/OWL vocabulary description might best be associated with the XHTML2 namespace URI.

Namespace URI:
http://www.w3.org/2002/06/xhtml2/

Note: see open issue discussion below for some possible issues here.

6. Design Issues

Various open design issues remain.

WG Issues to address before TR publication

Version Slip?
The RDF representation was drafted from a Feb 2005 WG-internal Draft (Member-only link). It should be checked for differences with the latest published Working Draft from the HTML Working Group.
XSLT generation
Could the core of the schema be generated by XSLT from the HTML specification. Probably; though note the need to omit certain HTML-centric text in the RDF version (see removed text below).
Add Examples
Add at least one example in RDF/XML syntax, ideally XHTML 2.0 syntax also, and a diagram.
Redraw diagram
The example diagram needs to be redrawn (suggestions for tools?); accessibility longdesc should be added.

Open Issues

The following issues concern the accuracy of this RDF vocabulary as a representation of the original XHTML 2.0 linking mechanisms, the semantics of particular link types, and the handling of certain aspects of their definition.

"Information Resources" and their subsections
Does the concept of 'Information Resource' defined here allow for document parts, subsections to be considered to be as instances? ie. can these relationships connect sub-documents? Are we being over-creative here? What does TAG say? Are we being too creative here, by introducing a new class? Note that the XHTML 2.0 spec sometimes uses "resource" in a different way to RDF. In RDF, everything is a resource.
No string values
The current design does not allow for the link types to relate things that are not "information resources" in the Web Architecture sense; this is expressed in RDF in a way that doesn't allow the use of textual strings as values for any of the link types. Are strings TAG Information Resources? (add a testcase appendix?)
hreflang
Removed this text from definition: "When used together with the hreflang attribute, it implies a translated version of the document." ...what does this mean in an RDF context?
hrefmedia
Removed this text from definition: "When used together with the hrefmedia attribute, it indicates a version intended for that type of device." ...what does this mean in an RDF context? (and what type of device? relation to DI/MWI work?)
Is "up" a functional property?
can a doc have two distinct things that are both 'up' from it? This document does not currently state that 'up' is a owl:FunctionalProperty.
What is an "index"?
The "index" property seems somewhat too vaguely defined. Is there more text from HTML spec, or understanding from deployed practice, that we can bring to bear here?
copyright property
Are there scope for sub-property mappings here? Does the HTML WG consider this a subPropertyOf Dublin Core Metadata Terms, eg. dc:rights? Should that be recorded here?
bookmark titles
"The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined for a document." ... what does this mean in an RDF context?

A few issues relate to publication pragmatics and technicalities.

Namespace URI
Using the XHTML2 namespace URI in RDF could require (because of the httpRange-14 issue) an HTTP redirection to be used at the namespace document. This would need to be agreed by the HTML WG and with the W3C webmaster.
Schema syntax and access
We would like an XHTML 2.0 RDF/A version of this schema, and to somehow make both vailable - directly or indirectly - via the namespace URI. This is related to the namespace uri choice, since facilities such as use of HTTP Content Negotiation would need to be agreed with HTML WG and W3C Webmaster.

7. References

[WebArch]
Architecture of the World Wide Web, Volume One , N. Walsh, I. Jacobs, Editors, W3C Recommendation, 15 December 2004, http://www.w3.org/TR/2004/REC-webarch-20041215/ . Latest version available at http://www.w3.org/TR/webarch/ .
[Describing and Linking]
Describing and Linking Web Resources, Dan Connolly (editor), work in progress (November 1996). Available at: http://www.w3.org/Architecture/NOTE-link.html
[RDFS]
RDF Vocabulary Description Language 1.0: RDF Schema , Dan Brickley and R.V. Guha, Editors. W3C Recommendation, 10 February 2004,
http://www.w3.org/TR/2004/REC-rdf-schema-20040210/
Latest version available at http://www.w3.org/TR/rdf-schema/ .
[SPARQL-QUERY]
SPARQL Query Language for RDF, E. Prud'hommeaux, A. Seaborne, Editors, W3C Working Draft (work in progress), 21 July 2005. This document is http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050721/ . The latest version is available at http://www.w3.org/TR/rdf-sparql-query/ .
[OWL Overview]
OWL Web Ontology Language Overview, Deborah L. McGuinness and Frank van Harmelen, Editors, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-owl-features-20040210/ . Latest version available at http://www.w3.org/TR/owl-features/ .
[RDFConcepts]
Resource Description Framework (RDF): Concepts and Abstract Syntax , G. Klyne, J. J. Carroll, Editors, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/ . Latest version available at http://www.w3.org/TR/rdf-concepts/ .
[XHTML2]
XHTML™ 2.0 , A. Navarro, J. Axelsson, M. Dubinko, M. Birbeck, M. Ishikawa, S. McCarron, B. Epperson, S. Pemberton, Editors, W3C Working Draft (work in progress), 27 May 2005, http://www.w3.org/TR/2005/WD-xhtml2-20050527 . Latest version available at http://www.w3.org/TR/xhtml2 .

Appendix A: Vocabulary Description in RDF/XML

<rdf:RDF xml:base"http://www.w3.org/2002/06/xhtml2/" xml:lang"en">
<-- 		a draft in progress by danbri@w3.org for SWBPD WG.
$Id: Overview.html,v 1.53 2005/08/02 21:05:06 danbri Exp $ -->

<rdfs:Class rdf:about"#InformationResource" rdf:type"http://www.w3.org/2002/07/owl#Class">
  <rdfs:label>Information Resource</rdfs:label>
  <rdfs:comment>The class of Information Resources as defined by the Web Architecture Recommendation, see http://www.w3.org/TR/2004/REC-webarch-20041215/#id-resources</rdfs:comment>
  <-- this is the most creative aspect of this vocab; all the other text is excerpted from the XHTML2 spec. -->
</rdfs:Class>

<rdf:Property rdf:about"#alternate" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>alternate</rdfs:label>
  <rdfs:comment>Designates substitute versions for the document.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#start" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>start</rdfs:label>
  <rdfs:comment>Refers to the first resource in a collection of resources. A typical use case might be a collection of chapters in a book.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#next" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
<owl:inverseOf rdf:resource"#prev"/><rdfs:label>next</rdfs:label>
  <rdfs:comment>Refers to the next document (after the current document) in an ordered collection of documents.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#prev" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <owl:inverseOf rdf:resource"#next"/>
  <rdfs:label>prev</rdfs:label>
  <rdfs:comment>Refers to the previous document (before the current document) in an ordered collection of documents.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#up" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty"> 
  <rdfs:label>up</rdfs:label>
  <rdfs:comment>Refers to the document "above" in a hierarchically structured set of documents.</rdfs:comment> 
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#contents" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>contents</rdfs:label>
  <rdfs:comment>Refers to a document serving as a table of contents.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#index" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>index</rdfs:label>
  <rdfs:comment>Refers to a document providing an index for the resource.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#glossary" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>glossary</rdfs:label>
  <rdfs:comment>Refers to a document providing a glossary of terms that pertain to the document.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#copyright" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>copyright</rdfs:label>
  <rdfs:comment>Refers to a copyright statement for the document.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#chapter" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>chapter</rdfs:label>
  <rdfs:comment>Refers to a document serving as a chapter in a collection of documents.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#section" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>section</rdfs:label>
  <rdfs:comment>Refers to a document serving as a section in a collection of documents.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#subsection" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>subsection</rdfs:label>
  <rdfs:comment>Refers to a document serving as a subsection in a collection of documents.</rdfs:comment> 
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#appendix" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>appendix</rdfs:label>
  <rdfs:comment>Refers to a document serving as an appendix in a collection of documents.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#help" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>help</rdfs:label>
  <rdfs:comment>Refers to a document offering help (more information, links to other sources of information, etc.)</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#bookmark" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>bookmark</rdfs:label>
  <rdfs:comment>Refers to a bookmark. A bookmark is a link to a key entry point within an extended document.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#meta" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>meta</rdfs:label>
  <rdfs:comment>Refers to a document that provides metadata, for instance in RDF, about the document.</rdfs:comment> 
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#icon" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>icon</rdfs:label>
  <rdfs:comment>Refers to a resource that represents an icon for the document.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#p3pv1" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>p3pv1</rdfs:label>
  <rdfs:comment>Refers to a P3P Policy Reference File.</rdfs:comment>
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

<rdf:Property rdf:about"#profile" rdf:type"http://www.w3.org/2002/07/owl#ObjectProperty">
  <rdfs:label>profile</rdfs:label>
  <rdfs:comment>Refers to a document that defines relationships or provides metadata, for instance in RDF, about the document.</rdfs:comment> 
  <rdfs:range rdf:resource"#InformationResource"/>
  <rdfs:domain rdf:resource"#InformationResource"/>
</rdf:Property>

</rdf:RDF>