MCS supports the use of document links that describe relationships between documents. The links are specified by the link element. Each link type defines a relationship between the current document, i.e. the one containing the link element, and another document or resource, e.g. a theme policy.
MCS supports the use of document links that describe relationships between documents. The links are specified by the link element. Each link type defines a relationship between the current document, i.e. the one containing the link element, and another document or resource, e.g. a theme policy.
Document links are defined by the link element. A single link element can specify multiple relationships. However, not all relationships can be combined together into a single link and therefore each group of related types indicates whether it can be combined with any others. A link element can be specified either as a child of the head element or as a descendant of the body element. The allowable positions depend on the link relationship type and each type, or group of related types, explicitly defines where they can be used and to what they apply.
Each link consists of the following elements:
The relationship specified by the rel attribute. The attribute accepts a space separated list of link types.
The location of the document or external resource specified by the href attribute. This can be a relative URI, in which case it is resolved relative to the current base URI.
An optional human readable description of the relationship specified by the title attribute.
It is a fatal error to attempt to use any relationship not explicitly defined in this article.
The qualified-name values 'mcs:layout' and 'mcs:theme' can be used in the rel attribute to bind layout and theme policies to an XDIME 2 page. They belong to the http://www.volantis.com/xmlns/2006/01/xdime/mcs namespace, which must be declared. These types of links apply to the document and must always be specified as children of the head element. The description provided in the title attribute is ignored. These link types cannot be combined with each other or any other link types.
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
xmlns:mcs="http://www.volantis.com/xmlns/2006/01/xdime/mcs">
<head>
<title>link</title>
<link rel="mcs:layout" href="/welcome.mlyt"/>
<link rel="mcs:theme" href="/xdime-2/welcome.mthm"/>
</head>
<body>
<div class="logo">
<span>Antenna Software, Inc.</span>
</div>
</body>
</html>
Navigation links define navigational relationships between documents in a way that has meaning for page authors and users. Navigation links define links to other documents and allow browsers to provide standard mechanisms (i.e. tool bars, menus, etc.) for navigating around a wide range of sites. These link types apply to the document but can be specified either as children of the head element or descendants of the body element. These types of links can be combined together with each other but not with any others.
The title attribute is required for navigation links.
The browser processes the information provided by navigation links. On WML devices, navigation links are rendered into the template element and apply across all cards in the WML deck. Links will be presented as buttons on the screen or menu items, automatically, in WML. The exact presentation is irrelevant as WML does not allow control over that. On X/HTML devices navigation links are rendered into the head element as link elements, even if they are descendants of the body element in the input XDIME document. When the navigation links are inside a frame page then they are collected together and become a part of the meta information associated with the frame page.
The following table lists the supported link types.
Relationship | Description |
---|---|
top | A reference to the document that is the top (or root) document in a hierarchically structured set of documents. |
up | A reference to the document that is nominally before the current document in a hierarchically structured set of documents. |
next | A reference to the next document in a linear sequence of documents. |
prev | A reference to the previous document in a linear sequence of documents. |
first | A reference to the first document in a linear sequence of documents. |
last | A reference to the last document in a linear sequence of documents. |
index | A reference to the index for a collection of documents including the current document. In this sense index is, as seen in books, an alphabetized list of terms; it does not refer to a web server directory index file, e.g. index.xdime. That would typically be referenced by either a 'contents' link. |
contents | A reference to the table of contents for a collection of documents including the current document. |
chapter | A reference to a document that represents a chapter in a collection of documents. |
section | A reference to a document that represents a section in a collection of documents. |
subsection | A reference to a document that represents a subsection in a collection of documents. |
search | A reference to a resource that can be used to search through the current document and its related pages. |
Please note that if two or more identical links are present in the input XDIME document, then only the first is kept, the others are discarded. Two links are identical if they have the same values for the rel, href and title attributes.
It is a fatal error if multiple non-identical links of the type 'top', 'up', 'next', 'prev', 'first', 'last', 'index', 'contents' or 'search' are provided in a single XDIME document.
There are three levels of support of navigation links:
Not supported at all, i.e. using them causes pages to break, the device to report errors, or the device simply makes no use of them.
Supported, but not necessarily presented to the user. For example, Firefox does support navigation links but the user needs to install a plugin and configure a toolbar in order to use the links.
This level of support is represented by a feature of the form: mcs:link.<link-type>, where <link-type> is one of the following: top, up, next, prev, first, last, index, contents, chapter, section, subsection. For example: mcs:link.next.
Supported and guaranteed to be presented to and usable by the user.
This level of support is represented by a feature of the form: mcs:link.<link-type>#Usable. Again, <link-type> must be one of the following: top, up, next, prev, first, last, index, contents, chapter, section, subsection. For example: mcs:link.next#Usable.
Navigation links can be provided to supplement the links that are already specified within the body of the document. In such a case, it does not matter whether the device presents them since the user has the option of using the links specified within the body of the document. The page author can check support for features in the form mcs:link.<link-type>, although it is not mandatory. If navigation links are the only mechanism to navigate to the specified locations, making it vital for the device to render them, the page author should verify support for features in the form mcs:link.<link-type>#Usable. If a device does not support it, the author must provide their own fallback behavior by adding equivalent links into the body of the page.
In addition to the standard links, page authors can add custom links relationships into a frame page (but not into the outermost page fragment). The relationships must be qualified with a prefix which maps to a namespace. The namespace must not be one of the built-in namespaces and must not to clash with any future namespaces that will be added and which will follow the same patterns of those earlier ones. Custom link types use the syntax {namespace-uri}:local-name for the name of the key. For example:
<html>
...
<html ..... xmlns:my="http://my.app/xmlns/mine"...>
<head>
...
<meta property="mcs:frame-page"/>
<link rel="my:edit" href="#contacts-edit"/>
...
</head>
...
</html>
...
<html id="#contacts-edit">
<head>
...
<meta property="mcs:frame-page"/>
...
</head>
...
</html>
...
</html>
On those devices that do not support the specific link type nothing is output. On those devices that do support it but do not present it (the user would be required to install a special plugin on the browser in order to use it) the link is simply output to the device. In other words, MCS does not add any additional content to the body of the page to present the link to the user.
Let's assume the documents have the following purposes:
A.xdime - the table of contents for the site.
B.xdime, C.xdime, D.xdime - chapters that contain sections.
E.xdime, F.xdime, G.xdime - sections of chapter C.
I.xdime - index for the site.
The following links can be defined in A.xdime:
<link rel="index" href="I.xdime" title="Index"/>
<link rel="chapter" href="B.xdime" title="Chapter 1"/>
<link rel="chapter" href="C.xdime" title="Chapter 2"/>
<link rel="chapter" href="D.xdime" title="Chapter 3"/>
The following links can be defined in B.xdime:
<link rel="index" href="I.xdime" title="Index"/>
<link rel="top" href="A.xdime" title="ToC"/>
<link rel="up" href="A.xdime" title="ToC"/>
<link rel="contents" href="A.xdime" title="ToC"/>
<link rel="next" href="C.xdime" title="Chapter 2"/>
<link rel="last" href="D.xdime" title="Chapter 3"/>
The following links can be defined in C.xdime:
<link rel="index" href="I.xdime" title="Index"/>
<link rel="top up contents" href="A.xdime" title="ToC"/>
<link rel="first" href="B.xdime" title="Chapter 1"/>
<link rel="prev" href="B.xdime" title="Chapter 1"/>
<link rel="next" href="D.xdime" title="Chapter 3"/>
<link rel="last" href="D.xdime" title="Chapter 3"/>
<link rel="section" href="E.xdime" title="Section 3.1"/>
<link rel="section" href="F.xdime" title="Section 3.2"/>
<link rel="section" href="G.xdime" title="Section 3.3"/>
The following links can be defined in D.xdime:
<link rel="index" href="I.xdime" title="Index"/>
<link rel="top" href="A.xdime" title="Home Page"/>
<link rel="up" href="A.xdime" title="Home Page"/>
<link rel="contents" href="A.xdime" title="Table of Contents"/>
<link rel="first" href="B.xdime" title="Chapter 1"/>
<link rel="prev" href="C.xdime" title="Chapter 2"/>