W3C

On Linking Alternative Representations To Enable Discovery And Publishing

DRAFT TAG Finding 15 09 2006

This version:
http://www.w3.org/2001/tag/doc/alternatives-discovery-20060915.html
Latest version:
Latest Version
Previous version:
June 20, 2006
Editor:
T. V. Raman <raman@google.com>

Abstract

Content creators wishing to publish multiple versions of a given resource on the Web face a number of questions with respect to how such URIs are created, published and discovered. Questions include:

This document explores the issues that arise in this context, and attempts to define best practices that help:

Status of this Document

Editors DRAFT

This document has been developed for discussion by the W3C Technical Architecture Group. This finding addresses the TAG issue Generic-resources-53.

The content of this document is intended for discussion and does NOT necessarily represent a consensus position of the TAG.

Publication of this finding 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.

Additional TAG findings, both approved and in draft state, may also be available.

Please send comments on this finding to the publicly archived TAG mailing list www-tag@w3.org (archive).

Table of Contents

1 Introduction
2 Use Case Scenarios
    2.1 Publishing Desktop And Mobile Versions
        2.1.1 Suggested Solution
    2.2 Publishing In Multiple Languages
        2.2.1 Suggested Solution
    2.3 Publishing Continuously Updating Content
        2.3.1 Suggested Solution
3 Recommended Best Practices
4 Conclusions
5 Figures
6 References


1 Introduction

There has always been a need to serve user-agent specific content for a given URI — thus highlighting the distinction between Resource and Representation on the Web. The increasing importance of the mobile, multilingual Web makes this requirement even stronger. At the same time, published content (and its various representations) needs to be discoverable on the Web; as an example, crawlers and web-bots need to be able to discover the availability of alternative representations of a given resource. Documents published on the Web become discoverable via the hyperlinked structure of the Web; to enable discovery of alternative representations, the relation between the multiple representations needs to be captured by the hyperlink structure of the Web. This finding enumerates some of the issues faced by content creators on the Web today and proposes a sequence of best practices to foster the following long-term goals:

  1. Preserve a Single Web i.e., a Web where content is universally accessible from a variety of end-user devices.

  2. Ensure that the One Web enables the easy exchange of resources (and pointers to resources) across its different facets, i.e., mobile and desktop users should be able to share references to Web Resources (URIs) with the accessing user being able to retrieve an appropriate representation.

  3. Ensure that contents published to a given facet of the Web are linkable, discoverable, crawlable, searchable and browsable from any of its other facets.

2 Use Case Scenarios

This section enumerates the candidate use case scenarios along with accompanying issues and suggested solutions. See the next section for recommended best practices that are a generalization of these solutions.

The owners of http://example.com/ubiquity would like to publish their content to a wide variety of end-user devices ranging from desktop Web browsers to mobile devices such as cell-phones and PDAs. They also serve multiple geographies using different languages. They know about the different markup language variants that are currently in vogue on these devices, and are capable of generating the representation that is most appropriate for the accessing user-agent. In publishing their content and associated URIs, they face the following issues:

2.1 Publishing Desktop And Mobile Versions

Given resource http://example.com/ubiquity/resource with corresponding representations for a desktop browser, a PDA and a cell-phone, should these different representations:

  • Have distinct URIs?

  • Have a single URI that delivers the appropriate representation?

  • If publishing distinct URIs for the resource and its various representations, how should the relationship between these URIs be expressed in a discoverable, machine-readable form? How should this relationship be reflected in the hyperlink structure of the Web?

2.1.1 Suggested Solution

We suggest the following approach for this situation:

  1. Create representation-specific URIs for each available representation (representation_i), e.g., http://example.com/ubiquity/resource/representation_i.

  2. If no content negotiation is in place, serve a canonical representation of the content at http://example.com/ubiquity/resource

  3. With that same URI, use HTTP content-negotiation, along with the correct HTTP VARY headers to serve up the appropriate representation at access time. Ensure that the VARY headers capture the right parameters that were used to choose the representation that is being served — this is important for correct behavior when using cacheing proxies.

  4. As an alternative to the previous step, arrange for the server to generate an HTTP 302 (moved temporarily) redirect to automatically serve up http://example.com/ubiquity/representation_i when http://example.com/ubiquity is accessed by user-agent_i. This is a temporary redirect; the accessing user-agent should continue to use the canonical URI when creating bookmarks, or emailing URI. This will ensure that later uses of the URI results in expected end-user results; e.g., In the following scenario:

    Cell-phone user emails link
    Recipiant opens message on a desktop
    Clicks on the link

    The user following the link from inside the email message on a desktop browser should receive the desktop version, and not the mobile version. Notice that passing around the canonical URI is critical in achieving this behavior.

    Additionally, contrast this solution with using HTTP content-negotiation with VARY headers; using a redirect to the URI of a specific representation has the advantage of freezing all parameters that were used to choose that representation into the URI.

  5. Use linking mechanisms provided by the representation being served to create links to the other available representations. As an example, when using HTML, one might use a and link elements to advertize the availability of alternate representations. In this context, note that there are two distinct types of such links:

    Links for human consumption that are to be presented to the user
    And links for machine consumption, that are used by the user agent to provide additional functionality.

    As an example, links to available alternatives meant for human consumption might use the HTML a element since these are rendered by user-agents. In contrast, links meant for use by bots might use the HTML link element — as an example, this reflects present practice when publishing pointers to Atom/RSS feeds.

    In either case, notice that following these steps creates a mini-graph comprising of the canonical URI and URIs for its various representations.

2.2 Publishing In Multiple Languages

The owners of http://example.com/global publish their content in a multiplicity of languages. They wish to publish any given announcement at a canonical URI, while retaining the ability to serve up a version in a language that is most appropriate for the user. Further, they wish to create URIs for each available language to facilitate hyperlinking and discovery. At the same time, they do not wish to hard-wire the language in which a given announcement is accessed when such URIs are passed around by end-users.

2.2.1 Suggested Solution

For a design pattern that has worked well over the years, see the W3C practice of publishing press releases in multiple languages. Here are its salient characteristics:

  1. Press releases announced with a canonical URI.

  2. Accessing this canonical URI with the appropriate Language header results in an automatic redirect that delivers the document in the desired language.

  3. Each language version contains links to URI's that in turn serve a representation in one of the other available languages.

  4. Since these translations are typically for human consumption, these links are encoded as HTML a elements so that they get displayed in browsers.

2.3 Publishing Continuously Updating Content

The owners of http://example.com/blogosphere/current publish up-to-date content. Once published, they would like users to be able to reliably bookmark the published content. At the same time, they would like end-users to be able to always access a canonical URL when looking for the most recently published content.

2.3.1 Suggested Solution

The issue identified here has been faced by and solved successfully during the last few years by the blogging community.

  1. Accessing a blog's canonical URI retrieves recent posts.

  2. Posted items have a bookmark or permalink pointer that can be used to reliably access postings from the past.

  3. Pointers to alternative content are encoded as link elements. This enables agents such as blog-readers, content-aggregators and Web crawlers to discover the availability of alternative versions. Note that this design pattern is widely deployed on the Web in the context of RSS/ATOM feeds to advertize permalinks and other pointers to make them discoverable. In the case of RSS/Atom feeds, this has enabled Web sites to embed such links within the head element of HTML pages, and have them revealed to the user by Web browsers that are capable of consuming such feeds.

3 Recommended Best Practices

As can be seen from the use-cases and suggested solutions enumerated in the previous section, pointers to Web Resources (URIs) can either:

Our primary take-aways from the these observations are:

4 Conclusions

Principal conclusions:

5 Figures

Illustrates multiple representations forming a connected graph with the generic resource at the center.

This figure shows a Generic Resource along with its multiple representations. In addition to its generic representation, the resource is available in print and mobile versions in both English and Japanese. URIs are assigned to each of these possible representations, and the illustration shows that these individual representations have links to/from the Generic Resource. Additional dotted arcs indicate that the content provider may create additional links that connect specific representations.

6 References

mwi
Jo Rabin, Charles McCathieNevile Mobile Web Best Practices 1.0W3C. 27 June, 2006. (See http://www.w3.org/tr/2006/CR-mobile-bp-20060627/.)
dics
Rhys Lewis, Roland Merrick Content Selection For Device Independence May 2, 2005 (See http://www.w3.org/TR/cselection/.)
metadata31
Noah Mendelson, Stewart Williams The Use Of MetaData In URLs W3C, September 16, 2006 (See http://www.w3.org/2001/tag/doc/metaDataInURI-31.)