Device Independent Authoring Language (DIAL)

W3C Working Draft 27 July 2007

This version:
Latest version:
Previous version:
Kevin Smith, Vodafone Group


The purpose of the Device Independent Authoring Language (DIAL) is to provide a markup language for the filtering and presentation of Web page content available across different delivery contexts. This will facilitate an optimal user experience following adaptation of the DIAL instance document.

Please refer to the DIAL Primer for an introduction to the profile and its purpose.

DIAL is a language profile based on existing W3C XML vocabularies and CSS modules. These provide standard mechanisms for representing Web page structure, presentation and form interaction. The DIAL also makes use of the DISelect metadata vocabulary [DISelect] for overcoming the authoring challenges [ACDI] inherent in authoring for multiple delivery contexts.

DIAL is part of the Authoring for Device Independence work category of the DIWG. This encompasses a number of work items associated with authoring Web sites and applications that support access from a wide range of devices with a variety of delivery contexts. These include work on Authoring Challenges [ACDI], Authoring Techniques [ATDI], and Scenarios and Extension Markup.

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 is a Working Draft of a possible future W3C Recommendation.

Comments on this document may be sent to the public public-uwa@w3.org mailing list (archived at http://lists.w3.org/Archives/Public/public-uwa/).

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.

This document is published as part of the W3C Ubiquitous Web Applications Activity by the Ubiquitous Web Applications Working Group. It is a deliverable as defined in the Charter of that group.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1 Introduction
    1.1 Reading the Specification
        1.1.1 Recommended reading
        1.1.2 Definition of terms used
        1.1.3 Conformance information for DIAL
   Normative and Informative Parts
   Normative Language for Conformance Requirements
   Document conformance
   Profile conformance
   DIAL processor conformance
   User-agent conformance
    1.2 How the Specification is Organized
    1.3 Documentation Conventions
        1.3.1 XML namespace bindings
2 DIAL Definition
    2.1 Document framework
    2.2 Document Metainformation
    2.3 Structure
    2.4 List
    2.5 Text
    2.6 Hypertext
    2.7 Object
    2.8 Tables
    2.9 Forms
    2.10 Content inclusion
    2.11 Content Selection
        2.11.1 Attribute Value Templates
    2.12 Semantic Enrichment
    2.13 Common attributes
    2.14 Unrecognized namespaces
3 Applying Styles
    3.1 Selection of CSS
    3.2 Applying Layout


A Schema for DIAL
B References
    B.1 Normative References
    B.2 Informative References
C Editor's Notes
    C.1 Changes in this Version
        C.1.1 Changes in the Version Dated 21 June 2007
    C.2 Open Issues
D Acknowledgements (Non-Normative)

1 Introduction

1.1 Reading the Specification

1.1.1 Recommended reading

This section is informative.

It is recommended to read at least the DIAL Primer [DIAL Primer], and ideally the Content Selection Primer [CS Primer] and Device Independence Principles [DI Principles] before this specification. These documents will assist the reader's understanding of the device independence ecosystem.

1.1.2 Definition of terms used

Terms used in this document, and others related to device independence, are collected in the Glossary of Terms for Device Independence [DI Glossary]. A link is provided to the Glossary definition when a term is first used in this document.

In addition the following definitions are taken from [DISelect]:

  • source infoset: the input XML infoset for the selection transformation

  • result infoset: the result of the selection transformation

In other words, the source infoset is the DIAL document being processed, and the result infoset is what remains after all selection expressions have been resolved.

1.1.3 Conformance information for DIAL Normative and Informative Parts

The normative and informative parts of this specification are identified by use of labels within various sections. Generally, everything in the specification is considered to be normative, apart from the examples. Normative Language for Conformance Requirements

The key words must, must not, required, shall, shall not, should, should not, recommended, may, and optional in this specification are to be interpreted as described in IETF RFC 2119 [RFC2119]. Document conformance
  1. A DIAL document must be well-formed XML [XML].

  2. The XHTML 2.0 namespace is the default namespace for DIAL documents. All elements or attributes which are not part of XHTML 2.0 namespace must bind to the relevant URI (via prefix or use of xmlns, as per the Namespaces in XML specification [XML Names]). Profile conformance
  1. The DIAL profile is a proper superset of [XHTML2]. The DIAL schema will support extensibility to other namespaces not mentioned in this document.

  2. DIAL profile incorporates DISelect Full.

  3. A DIAL document must conform to the rules of the DIAL specification. As such the source infoset must be valid according to the DIAL schema. DIAL processor conformance

A DIAL conformant processor:

  1. must include a DISelect processor.

  2. must allow access to the host document via a sel: namespace expr attributes. As per the DISelect specification ([DISelect]), the DISelect processor within a DIAL processor " must treat path expressions as applying to the source infoset by default."

Editorial note: Kevin Smith 24 April 06
(1) Need agreement on MIME type for DIAL, using the same approach as taken for WICD (2) should the MIME type be placed under document conformance, server conformance, or elsewhere? User-agent conformance

A DIAL conformant user-agent:

  1. A DIAL conformant adaptation engine must include a DISelect processor, and must resolve any remaining DISelect statements prior to rendering.

1.2 How the Specification is Organized

The specification defines the XML element and attribute information items [XML Infoset] of a Web page which enable it to be presented in a way which provides a functional user experience. These are grouped according to usage, and each is mapped to a suitable XML element or attribute as defined by an existing W3C vocabulary specification.

1.3 Documentation Conventions

1.3.1 XML namespace bindings

The following namespace prefixes and corresponding namespace identifiers are used in this document:

Prefix Namespace URI Usage
None http://www.w3.org/2002/06/xhtml2/ Elements without any prefix are bound to the default namespace. This namespace is used for the elements that originate in XHTML Version 2 [XHTML2].
xf: http://www.w3.org/2002/xforms Refers to items from the XForms vocabulary [XForms].
sel: http://www.w3.org/2004/06/diselect Refers to items from the DISelect vocabulary [DISelect]

2 DIAL Definition

The markup which together forms a Web page intended for consumption across multiple delivery contexts may be grouped thusly:


Defines the major structural elements for for the Web page.


Defines elements that allow the definition of relationships.


Defines all of the basic text container elements, attributes, and their content models that are structural in nature.


Defines all of the basic text container elements, attributes, and their content models that are "inline level".


Provides list-oriented elements.


Used to define hypertext links to other resources.


Provides elements for general-purpose object inclusion; this includes images and other media, as well as executable content.


Provides elements for marking up tabular information in a document.


Provides a rich collection of forms features.

Content selection metadata

Instructions which will be executed during an adaptation process.

Content semantics

Instructions which may inform the adaptation process and provide information to other processes (such as search or syndication).

The following sections list the relevant Web page markup in each group, and map each to a suitable XML element or attribute from a relevant W3C vocabulary specification.

Note that in most cases the full content model for the elements has not been shown. The full content model is retrievable from the 'Definition' link in each case.

2.1 Document framework

Elements from the [XHTML2] Document module
All elements from this module are available and mandatory in DIAL
Markup Purpose Definition
<html> The root element for a DIAL document html
<head> Contains information about the current document that is not considered document content. head
<title> Used to provide a short description of the page contents title
<body> Contains the document's content. body

2.2 Document Metainformation

Elements from the [XHTML2] Metainformation module
All elements from this module are available and optional in DIAL
Markup Purpose Definition
<meta> The meta element can be used to identify properties of a document (e.g., author, expiration date, a list of key words, etc.) and assign values to those properties. This specification defines a small normative set of properties, but users may extend this set as described for the XHTML 2 property attribute. meta
Conveys relationship information that may be rendered by user agents in a variety of ways (e.g., a tool-bar with a drop-down menu of links). link

2.3 Structure

Elements from the [XHTML2] Structural module
All elements from this module are available and optional in DIAL
Markup Purpose Definition
<address> The address element may be used by authors to supply contact information for a document or a major part of a document such as a form. address
<blockcode> This element indicates that its contents are a block of "code" (see the code element). This element is similar to the pre element, in that whitespace in the enclosed text has semantic relevance. blockcode
<blockquote> This element designates a block of quoted text. blockquote
<div> The div element, in conjunction with the id, class and role attributes, offers a generic mechanism for adding extra structure to documents. This element defines no presentational idioms on the content. Thus, authors may use this element in conjunction with style sheets, the xml:lang attribute, etc., to tailor XHTML to their own needs and tastes div
<section> The section element, in conjunction with the h element, offers a mechanism for structuring documents into sections. This element defines content to be block-level but imposes no other presentational idioms on the content, which may otherwise be controlled from a style sheet. section
<h> A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically. Structured headings use the single h element, in combination with the section element to indicate the structure of the document, and the nesting of the sections indicates the importance of the heading. The heading for the section is the one that is a child of the section element. heading elements
<h1> - <h6> There are six levels of numbered headings in XHTML with h1 as the most important and h6 as the least. heading elements
<p> The p element represents a paragraph. In comparison with earlier versions of HTML, where a paragraph could only contain inline text, XHTML 2's paragraphs represent the conceptual idea of a paragraph, and so may contain lists, blockquotes, pre's and tables as well as inline text. Note however that they may not contain directly nested p elements. p
<pre> The pre element indicates that whitespace in the enclosed text has semantic relevance. As such, the default value of the layout attribute is relevant. pre
<separator> The separator element separates parts of the document from each other. separator

2.4 List

Elements from the [XHTML2] List module
All elements from this module are available and optional in DIAL
Markup Purpose Definition
<li> The li element defines a list item within an ordered, unordered, or navigation list.. li
<ol>, <ul> At least one is mandatory within a list (<li>), they are mutually exclusive within the same list. <ol> represents an item in an ordered list, <ul> represents an item in an unordered list, li
<dl> , <di> , <dt> , and <dd> Definition lists. These vary only slightly from other types of lists in that list items consist of two parts: a term and a description. The term is given by the dt element. The description is given with a dd element. The term and its definition can be grouped within a di element to help clarify the relationship between a term and its definition(s). Definition lists
<nl> Navigation lists are intended to be used to define collections of selectable items for presentation in a "navigation" menu. Note that a navigation list always starts with a label element that defines the label for the list. nl

2.5 Text

Elements from the [XHTML2] Text module
All elements from this module are available and optional in DIAL
Markup Purpose Definition
<abbr> The abbr element indicates that a text fragment is an abbreviation (e.g., W3C, XML, Inc., Ltd., Mass., etc.); this includes acronyms. abbr
<cite> The cite element contains a citation or a reference to other sources cite
<code> The code element contains a fragment of computer code.. code
<dfn> The dfn element contains the defining instance of the enclosed term. dfn
<em> The em element indicates emphasis for its contents. em
<kbd> The kbd element indicates input to be entered by the user. em
<l> The l element represents a semantic line of text (e.g., a line of verse or a line of computer code). l
<quote> This element designates an inline text fragment of quoted text. quote
<samp> The samp element designates sample output from programs, scripts, etc. samp
<span> The span element, in conjunction with the id, class and role attributes, offers a generic mechanism for adding structure to documents. This element imposes no presentational idioms on the content. Thus, authors may use this element in conjunction with style sheets, the xml:lang attribute, the dir attribute etc., to tailor XHTML to their own needs and tastes. span
<strong> The strong element indicates higher importance for its contents than that of the surrounding content. strong
<sub> The sub element indicates that its contents should regarded as a subscript. sup
<sup> The sup element indicates that its contents should be regarded as a super-script. sup
<var> The var element indicates an instance of a variable or program argument. var

2.6 Hypertext

Elements from the [XHTML2] Hypertext module
All elements from this module are available and optional in DIAL
Markup Purpose Definition
<a> An a element defines an anchor. Since hypertext attributes such as href may be applied to any element, this element is not strictly necessary, being equivalent to a span, but has been retained to allow the expression of explicit links a

2.7 Object

Elements from the [XHTML2] Object module
All elements from this module are available and optional in DIAL
Markup Purpose Definition
<object> object indicates a non-text item for inclusion in the document; this includes images and other media, as well as executable content which require plugins or external applications to process. Note this is the way images are referenced in DIAL, rather than through the legacy img/@src object
<param> param elements specify a set of values that may be required to process the object data by an object handler at run-time. param

2.8 Tables

Elements from the [XHTML2] Tables module
All elements from this module are available and optional in DIAL
Markup Purpose Definition
<table> The table element contains all other elements that specify the caption, column groups, columns, rows, and content for a table table
<caption> When present, the caption element's text should describe the nature of the table for the benefit of the reader. caption
<tr> At least one is mandatory within a table. The tr elements acts as a container for a row of table cells (either th or td, see below). tr
<td>, <th> At least one is mandatory within a table row (tr), they are mutually exclusive within the same row. <th> represents a column heading, <td> represents the value of that column data for a given row. td and th

2.9 Forms

Content sets from the XHTML 2.0 Forms module
All content sets and elements/attributes therein from this module are available in DIAL
Content set Purpose Definition
Core Mandatory for form usage, the XForms Core Module defines the major structural elements of XForms, intended for inclusion in a containing document. Core XForms
Actions XForms Actions are declarative XML event handlers that capture high-level semantics. Along with XML Events these handlers provide a flexible means for forms authors to specify event processing at appropriate points within the XForms user interface. XForms Action
Group Allows aggregation of form controls and provides semantics about the relationship between them. XForms Group
Switch This section defines a switch construct that allows the creation of user interfaces where the user interface can be varied based on user actions and events. This content may be complemented by DI Select, which can be used to determine which switch statements are rendered by the user agent. XForms Switch
Repeat This section allows the definition of repeating structures such as multiple items within a purchase order. XForms Repeat

2.10 Content inclusion

The DIAL process for including a fragment of XML sourced from a separate URI will follow that of XHTML 2.0

Editorial note: Kevin Smith 12 April 2006
The actual inclusion mechanism (via XInclude, XFragment etc.) used for XHTML 2.0 is still under discussion

2.11 Content Selection

Processing instructions for general purpose content selection or filtering. Content may be conditionally included or excluded based on the evaluation of the delivery context. This may include capabilities of the requesting device, the user's profile (e.g. age, preferences), the user's context (e.g. location) and any dynamic factors (e.g. battery life, the transport bandwidth).

A selection criterion is represented by the value of the sel:expr attribute.

Elements and attributes from the DISelect specification
All elements/attributes from DISelect are available in DIAL
Markup Purpose Definition
<sel:if> Defines a set of material that is to be included in the output infoset if the associated expression has the appropriate value. expr
<sel:select> This element encloses one or more sets of material that are subject to conditional selection. select
<sel:when> At least one mandatory within a select, defines a set of material that is to be included in the output infoset if the associated expression has the appropriate value. select
<sel:otherwise> This element defines a set of material that appears in the output infoset if none of the when elements evaluate to true. otherwise
sel:expr This attribute may be included in any element in a DIAL document, and must be bound to the DISelect namespace. Its value is a boolean XPATH expression. This expression may be evaluated by the server, client, or other adaptation layer: if it evaluates to 'true' then the element containing the expr attribute, and all its child and attribute nodes, are selected for inclusion in the output document. If the expression evaluates to false, then the element containing the expr attribute, and all its children, are omitted from the output document. expr
sel:selid Used to ensure that an element will be assigned an identifier (the XHTML 2.0 id attribute) in the resultset, without forcing selection choices to have the same id in the document prior to processing. selid
sel:selidname The selidname attribute defines the name of the host language identifier, in the event that the XHTML 2.0 id attribute is not suitable. selidname
<sel:value> The value element is used to include the value of an expression in the content. The DISelect processor evaluates the expression specified in the element. It places the value of that expression in the result infoset in place of the value element. value
<sel:variable> The variable element is used to declare a variable and to set its value variable
sel:functions This attribute defines the names of additional XPath functions that are required to enable processing of material that contains DISelect elements and attributes. It allows authors to verify that the materials they have provided can be processed by the DISelect processor. The names in the list reference functions that are required by the content in addition to the set provided by the DISelect processor itself. functions

2.11.1 Attribute Value Templates

DISelect extends the host language by allowing any attribute value to be specified as an Attribute Value Template (AVT). An AVT is an XPath expression which is evaluated to yield the value to be used for the attribute. To distinguish the use of an AVT as the value of an attribute, the expression is enclosed within curly braces {}.

An AVT used within the source infoset can contain any XPath expression supported by the DISelect processor. During processing, the expression is evaluated and the result is used as the value of the attribute.

Editorial note: Kevin Smith 21 June 2007
In the event that the XHTML 2.0 schema expects a non-string datatype for an attribute value, DIAL will need to redefine the schema definition in order to allow an AVT to be present also.

2.12 Semantic Enrichment

Content semantics (in the form of metadata) may be used to provide information in order to:

  • inform the content adaptation process, so that the decision about which content to show to the user is a combination of delivery context and content rules (for example, legal constraints)

    be used to provide semantics to the content, which assists search applications, and may enable the inference of affinity between documents

    reuse document data as document metadata to reduce duplication.

Any metadata must be bound to the appropriate namespace and must only be included where allowed in XHTML 2.0 and DISelect.

2.13 Common attributes

The following attributes are common to all elements in DIAL:

Common attributes
Markup Purpose Definition
xml:space See XML whitespace handling
xml:id See the xml:id Version 1.0 specification [XMLID].
xml:lang See XML language identification
xsi:type See the XML Schema xsi:type attribute [SCHEMA1].
All XHTML 2.0 attribute collections See XHTML 2.0 attribute collections module
sel:expr See sel:expr in section 2.11 Content Selection

2.14 Unrecognized namespaces

Elements or attributes outside of the DIAL specification will be ignored by DIAL conformant adaptation engines. They may however be examined by other adaptation processes.

3 Applying Styles

3.1 Selection of CSS

Elements and attributes of the DISelect selection module may declare in which circumstances a CSS style sheet [CSS2.1], or number of stylesheets, should be selected to style the document. This allows authors to declare:

  • The selection or omission of a single stylesheet

  • The selection of the first stylesheet meeting a selection criterion from a group of choices

  • The selection of any stylesheet which meet a selection criterion

This complements the XHTML 2.0 'Preferred and alternate stylesheets' declarations: the DISelect declarations allow authors to declare in which delivery contexts each CSS stylesheet should be included, the XHTML 2.0 declarations allow users to switch between stylesheets as they so choose.

The selection of CSS stylesheets in DIAL applies to all CSS-supported modalities . These include aural and gestural styles.

3.2 Applying Layout

Editorial note: Kevin Smith 24 April 06
This section will be developed as the work on layout representations proceeds

A Schema for DIAL

Editorial note: Kevin Smith 24 April 06
The link will be added once the schemas are completed.

B References

B.1 Normative References

RFC 2119: Key words for use in RFCs to Indicate Requirement Levels, Internet Engineering Task Force, 1997. (See http://www.ietf.org/rfc/rfc2119.txt.)
XHTML 2.0, W3C Working Draft, S. Pemberton et al., 27 May 2005. (See http://www.w3.org/TR/2005/WD-xhtml2-20050527/.)
Content Selection for Device Independence (DISelect), R. Lewis et al., W3C Working Draft, 2 May 2005. (See http://www.w3.org/TR/2005/WD-cselection-20050502/.)
XHTML Modularization
Modularization of XHTML, M. Altheim et al., W3C Recommendation, 13 February 2006. (See http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/.)
XML Names
Namespaces in XML, Tim Bray et al., W3C Recommendation, 14 January 1999. (See http://www.w3.org/TR/1999/REC-xml-names-19990114/.)
Extensible Markup Language (XML) 1.0 (Third Edition), Tim Bray et al., W3C Recommendation, 4 February 2004. (See http://www.w3.org/TR/2004/REC-xml-20040204/.)
xml:id Version 1.0, J. Marsh et al., W3C Recommendation, 9 September 2005. (See http://www.w3.org/TR/2005/REC-xml-id-20050909/.)
XML Schema Part 1: Structures Second Edition, H. Thompson et al., W3C Recommendation, 28 October 2004. (See http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/.)
XPath 1.0
XML Path Language (XPath) Version 1.0, J. Clark et al., W3C Recommendation, 16 November 1999. (See http://www.w3.org/TR/1999/REC-xpath-19991116.)
Media Queries
Media Queries, Håkon Wium Lie et al., W3C Candidate Recommendation, 8 July 2002. (See http://www.w3.org/TR/2002/CR-css3-mediaqueries-20020708/.)
XML Infoset
XML Information Set (Second Edition), J. Cowan et al., W3C Recommendation, 4 February 2004. (See http://www.w3.org/TR/2004/REC-xml-infoset-20040204/.)
DOM2 Events
Document Object Model (DOM) Level 2 Events Specification, Tom Pixley, W3C Recommendation, 13 November 2000. (See http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/.)
XML Events
XML Events, Shane McCarron et al., W3C Recommendation, 14 October 2003. (See http://www.w3.org/TR/2003/REC-xml-events-20031014/.)
XForms 1.0 (second edition), John M. Boyer et al., W3C Recommendation, 14 March 2006. (See http://www.w3.org/TR/2006/REC-xforms-20060314/.)
Cascading Style Sheets, level 2 revision 1, B. Bos et al., W3C Working Draft, 11 April 2006. (See http://www.w3.org/TR/2006/WD-CSS21-20060411/.)

B.2 Informative References

DIAL Primer
DIAL Part 0: Primer K.Smith, 2006. W3C Working Draft (See http://www.w3.org/TR/dial-primer/.)
CS Primer
Content Selection Primer 1.0 R.Lewis and R.Merrick, 2007. W3C Working Draft (See http://www.w3.org/TR/cselection-primer/.)
DI Glossary
Glossary of Terms for Device Independence, R. Lewis, 2005, W3C Working Draft. (See http://www.w3.org/TR/2005/WD-di-gloss-20050118/.)
Authoring Challenges for Device Independence, R. Lewis, W3C Note, 1 September 2003. (See http://www.w3.org/TR/2003/NOTE-acdi-20030901/.)
Authoring Techniques for Device Independence, R. Hanrahan, W3C Note, 18 February 2004. (See http://www.w3.org/TR/2004/NOTE-di-atdi-20040218/.)
DI Principles
Device Independence Principles, R. Gimson, 2003, W3C Note, 1 September 2003. (See http://www.w3.org/TR/2003/NOTE-di-princ-20030901/.)
RDF Primer
RDF Primer, F. Manola et al., W3C Recommendation, 10 February 2004. (See http://www.w3.org/TR/2004/REC-rdf-primer-20040210/.)
ECMAScript Language Specification, ECMA (European Computer Manufacturers Association). (See http://www.ecma-international.org/publications/standards/Ecma-262.htm.)
XSL Transformations (XSLT) Version 1.0, J. Clark, W3C Recommendation, 16 November 1999. (See http://www.w3.org/TR/1999/REC-xslt-19991116.)

C Editor's Notes

C.1 Changes in this Version

C.1.1 Changes in the Version Dated 21 June 2007

  • Changes as per UWA F2F:

  • Made use of source and result infoset terminology

  • Noted that the source infoset must be valid DIAL

  • Noted that the DIAL is a proper subset of XHTML 2 and will support extensibility

  • Amended ednote to clarify the work needed to support AVTs

  • Removed para 2 from section 2.10 to clarify position on inclusion mechanisms

  • Removed closed issues

  • Removed ednote regarding selidname and documented the usage

C.2 Open Issues

D Acknowledgements (Non-Normative)

This document was produced with the help of the Ubiquitous Web Application Group participants:

The editors would also like to recognize the contributions of the members of the former Device Independence Working Group: