Copyright © 2006 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This document specifies WICD Mobile 1.0, a Compound Document profile based on XHTML, CSS and SVG, which is targeted at mobile agents.
Compound Document is the W3C term for a document that combines multiple formats.
WICD stands for Web Integration Compound 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 the 22 November 2006 Last Call Working Draft of the WICD Mobile 1.0, incorporating comments on the 19 December 2005 Last Call Working Draft. The disposition of Last Call comments is available. Changes are summarized in Appendix J, and a diff-marked version is also available to review changes since the last Working Draft.
The purpose of this second Last Call is to allow reviewers to verify that their comments have been included into the specification as agreed by the Compound Document Formats Working Group . It is not intended as a new, general review period. Feedback on this specification should be sent to public-cdf@w3.org. This list is archived and acceptance of this archiving policy is requested automatically upon first post. To subscribe to this list send an email to public-cdf-request@w3.org with the word subscribe in the subject line. The deadline for Last Call comments is 19 December 2006.
This document has been produced by the Compound Document Formats Working Group as part of the Rich Web Clients Activity within the W3C Interaction Domain. 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 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.
1 Introduction
2 Compound Document by Reference
Framework Compliance
3 Profile Requirements
3.1 XHTML Basic
1.1
3.2 ECMAScript 3rd
Edition Compact Profile
3.3 CSS Mobile Profile
2.0
3.4 SVG Tiny
1.2
3.5 User Agent
Identification
3.6 Document Object Model
(DOM)
3.7 XMLHttpRequest
3.8 Focus
Navigation Model
3.9 Content
Packaging
A Definitions
B Conformance
C Document Object Model (DOM) Level
3 Core Subset Extensions
D Document Object Model (DOM) Level 3
Events Extensions
E Document Object Model (DOM) Level 2 HTML
Subset
F Focus Traversal
Support
G References
H Authoring Guidelines
(Non-Normative)
I Acknowledgements
(Non-Normative)
J Changes Log (Non-Normative)
(This section is informative)
The WICD Mobile profile is primarily designed to enable rich multimedia content on mobile handset devices. These are devices with:
WICD Mobile is a perfect subset of WICD Full. It is therefor possible, to create content for WICD Mobile agents and make use of this content in a WICD Full implementation, for instance in a desktop environment.
This specification contains information, which is specific to the WICD Mobile 1.0 profile. Any information that applies to all WICD profiles, is compiled into the WICD Core 1.0 specification. Any information that applies to Compound Documents in general, can be found in the Compound Document Framework (CDR/CDI) specifications.
Conformant WICD Mobile 1.0 user agents must implement the
including the extended DOM API's and additional Events.Conformant WICD Mobile 1.0 user agents must implement
The following image shows the relation between CDR and WICD specifications.
The following shows WICD Mobile 1.0 markup (two documents):
<?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Example WICD Mobile content</title> </head> <body> <h1>Example WICD Mobile content<h1> <object type="image/svg+xml" src="child.svg" width="50%" /> </body> </html>
And the referenced child.svg:
<?xml version="1.0"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" baseProfile="tiny" version="1.2"> <circle cx="30" cy="30" r="26" fill="#00F" fill-opacity="0.6" /> </svg>
The following shows Multipart/related encoded WICD Mobile 1.0 markup (one document):
--WiCDmUlTiPaRt Content-type: application/xhtml+xml <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Example WICD Mobile content</title> </head> <body> <h1>Example WICD Mobile content<h1> <object type="image/svg+xml" src="child.svg" width="50%" /> </body> </html> --WiCDmUlTiPaRt Content-type: image/svg+xml Content-ID: child.svg <?xml version="1.0"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" baseProfile="tiny" version="1.2"> <circle cx="30" cy="30" r="26" fill="#00F" fill-opacity="0.6" /> </svg> --WiCDmUlTiPaRt--
This content may be delivered using the following content type:
Content-type: multipart/related; boundary="WiCDmUlTiPaRt"
XHTMLBasic 1.1 W3C Working Draft 5 July 2006
Conformant WICD Mobile 1.0 user agents must support XHTML Basic 1.1 as the root document.
XHTML Basic 1.1 documents should be associated with the application/xhtml+xml mime type.
Conformant WICD Mobile 1.0 user agents must support ECMAScript 3rd Edition Compact Profile (ES-CP) as a scripting language.
ECMAScript documents should be associated with the "application/ecmascript" mime type.
Conformant WICD Mobile 1.0 user agents must support CSS Mobile Profile 2.0 [CSS Mobile Profile 2.0 Specification].
Conformant WICD Mobile 1.0 user agents must support Scalable Vector Graphics Tiny 1.2 [SVGT12] specification.
When declaring support for WICD Mobile 1.0, a conforming user agent should use an "Accept" header with the value:
application/xhtml+xml; profile="http://www.w3.org/2005/12/wicd-mobile"
Future versions of the WICD Mobile profile, which are compatible with WICD Mobile 1.0, must use the same profile string, using the same format, but with a later date. (Example: application/xhtml+xml; profile="http://www.w3.org/2007/06/wicd-mobile")
WICD Mobile 1.0 does not require the implementation of the full DOM Level 3 Core and Events. Instead, the following subsets must be implemented.
Conformant WICD Mobile 1.0 user agents must support the Document Object Model (DOM) Level 3 Core Specification Subset, defined in the SVG Tiny 1.2 specification for all namespaces.
Conformant WICD Mobile 1.0 user agents must support the additional features described in Appendix C Document Object Model (DOM) Level 3 Core Subset Extensions for all namespaces.
Conformant WICD Mobile 1.0 user agents must support the Document Object Model (DOM) Level 3 Events Specification Subset, defined in the SVG Tiny 1.2 specification for all namespaces.
Conformant WICD Mobile 1.0 user agents must support the additional features described in Appendix D Document Object Model (DOM) Level 3 Events Extensions for all namespaces.
Conformant WICD Mobile 1.0 user agents must support the HTML DOM features described in Appendix E Document Object Model (DOM) Level 2 HTML Subset for the nodes in the XHTML namespace.
Conformant WICD Mobile 1.0 user agents must support the Focus Traversal features described in Appendix F Focus Traversal Support for all namespaces.
Conformant WICD Mobile 1.0 user agents must support the SVG Micro DOM (uDOM) specification for nodes in the SVG namespace.
Conformant WICD Mobile 1.0 user agents must support the ElementTraversal interface on all DOM objects which implement the org.w3c.dom.Element interface.
Conformant WICD Mobile 1.0 user agents must support the DocumentView interface on all implementations of the org.w3c.dom.Document interface.
In conformant WICD Mobile 1.0 user agents, the org.w3c.dom.AbstractView associated with an org.w3c.dom.DocumentView must be an implementation of the Window interface as defined in the Window Object 1.0 specification.
XHTML event attributes (e.g., onclick and onload) map to equivalent DOM3 Events features. Each event attribute represents the creation and registration of an EventListener. The corresponding element represents the EventTarget. For these event listeners, useCapture is set to false. If the attribute representing the event listener is changed, this corresponds to the removal of the previously registered EventListener and the registration of a new one. The relative order of event listeners due to XHTML event attributes versus other event listeners is not defined.
The following defines the mapping from XHTML event attributes to the corresponding DOM3 events:
The onkeypress attribute is defined by HTML 4 to declare a handler, whose content is the value of the attribute, and which is triggered when a keydown event followed by a keyup event are dispatched, on the same key and on the same focused element.
See: SVG Tiny 1.2 specification for the event mapping.
Conformant WICD Mobile 1.0 user agents must support the XMLHttpRequest Object.
Conformant WICD Mobile 1.0 user agents, for devices that have a multi directional (2D) joystick input device, must implement a Two Dimensional Focus Navigation with Flattened Children. For guidance see Navigation Models in WICD Core 1.0.
In a static situation, focus should go back to where it came from, when a user navigates back.
Conformant WICD Mobile 1.0 user agents, should allow activation of hierarchical child elements, using the "Ok" key.
Conformant WICD Mobile 1.0 user agents, implemented on devices, that have at least two soft keys and no dedicated escape key, should allow deactivation of hierarchical child elements, using longpress Soft2.
Conformant WICD Mobile 1.0 user agents should support Multipart/related packaging. These agents will advertise "multipart/related" capability with their HTTP request accept headers.
MIME implementations must in general treat unrecognized subtypes of "multipart" as being equivalent to Multipart/mixed. Agents supporting a WICD Profile are therefore expected to support both, related and mixed.
Implementations preceding this specification may support only Multipart/mixed. These agents advertise "multipart/mixed" with their HTTP request accept headers.
The terms used in this document are specified in Compound Document by Reference Framework 1.0.
This specification defines conformance for several classes of products:
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "may", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 (see http://www.ietf.org/rfc/rfc2119.txt). However, for readability, these words do not appear in all uppercase letters in this specification.
At times, this specification recommends good practice for authors and user agents. These recommendations are not normative and conformance with this specification does not depend on their realization. These recommendations contain the expression "We recommend ...", "This specification recommends ...", or some similar wording.
WICD Mobile 1.0 User Agent Conformance:
Conformant WICD Mobile 1.0 user agents must implement the "Compound Document by Reference Framework 1.0 (CDR 1.0)" including the extended DOM API's and additional Events.
Conformant WICD Mobile 1.0 user agents must implement "WICD Core 1.0".
Conformant WICD Mobile 1.0 user agents must support XHTML Basic 1.1 as the root document.
Conformant WICD Mobile 1.0 user agents must support ECMAScript 3rd Edition Compact Profile (ES-CP) as a scripting language.
Conformant WICD Mobile 1.0 user agents must support the updated version of CSS Mobile Profile 2.0.
Conformant WICD Mobile 1.0 user agents must support Scalable Vector Graphics (SVG) Tiny 1.2 specification while referenced from XHTML.
When declaring support for WICD Mobile 1.0, a conforming user agent should use an "Accept" header with the value: application/xhtml+xml; profile="http://www.w3.org/2005/12/wicd-mobile".
Future versions of the WICD Mobile profile, which are compatible with WICD Mobile 1.0, must use the same profile string, using the same format, but with a later date.
Conformant WICD Mobile 1.0 user agents must support the Document Object Model (DOM) Level 3 Core Specification subset defined in the SVG Tiny 1.2 specification [http://www.w3.org/TR/SVGMobile12/svgudom.html#dom] for all namespaces.
Conformant WICD Mobile 1.0 user agents must support the features described in Appendix C Document Object Model (DOM) Level 3 Core Subset Extensions for all namespaces.
Conformant WICD Mobile 1.0 user agents must support the Document Object Model (DOM) Level 3 Events Specification Subset defined in the SVG Tiny 1.2 Specification [http://www.w3.org/TR/SVGMobile12/svgudom.html#events] for all namespaces.
Conformant WICD Mobile 1.0 user agents must support the features described in Appendix D Document Object Model (DOM) Level 3 Events Extensions for all namespaces.
Conformant WICD Mobile 1.0 user agents must support the Document Object Model (DOM) Level 2 HTML Specification subset defined in Appendix E Document Object Model (DOM) Level 2 HTML Subset for the nodes in the XHTML namespace.
In conformant WICD Mobile 1.0. user agents, the root org.w3c.dom.Document instance must implement the FocusNavigation interface defined in Appendix F Focus Traversal Support for all namespaces.
Conformant WICD Mobile 1.0 user agents must support the SVG Micro DOM (uDOM) specification for nodes in the SVG namespace.
Conformant WICD Mobile 1.0 user agents must support the ElementTraversal interface on all DOM objects which implement the org.w3c.dom.Element interface.
Conformant WICD Mobile 1.0 user agents must support the DocumentView interface on all implementations of the org.w3c.dom.Document interface.
In conformant WICD Mobile 1.0 user agents, the org.w3c.dom.AbstractView associated with an org.w3c.dom.DocumentView must be an implementation of the Window interface as defined in the Window Object 1.0 specification.
Conformant WICD Mobile 1.0 user agents must support the XMLHttpRequest Object.
Conformant WICD Mobile 1.0 user agents, for devices that have a multi directional (2D) joystick input device, must implement a Two Dimensional Focus Navigation with Flattened Children. For guidance see Navigation Models in WICD Core 1.0.
In a static situation, focus should go back to where it came from, when a user navigates back.
Conformant WICD Mobile 1.0 user agents, should allow activation of hierarchical child elements, using the "Ok" key.
Conformant WICD Mobile 1.0 user agents, implemented on devices, that have at least two soft keys and no dedicated escape key, should allow deactivation of hierarchical child elements, using longpress Soft2.
WICD Mobile 1.0 Document Conformance:
XHTML Basic 1.1 documents should be associated with the application/xhtml+xml mime type.
ECMAScript documents should be associated with the "application/ecmascript" mime type.
In conforming WICD 1.0 content, audio referenced from an XHTML object element must have a width and height of zero.
The org.w3c.dom.NodeList interface, defined in the DOM Core Level 3 Specification must be supported for the HTMLDocument.getElementsByTagName() method.
interface NodeList { Node item(in unsigned long index); readonly attribute unsigned long length; };
The SVG Working Group has resolved that the getAttribute and setAttribute methods were missing from the SVG Tiny 1.2 CR specification uDOM DOM Level 3 Core subset by error. Therefore, the next revision of the SVG Tiny 1.2 specification will include the getAttribute and setAttribute methods on the org.w3c.dom.Element interface.
http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-adoptNode
In addition to the Document interface attributes and methods defined in the SVG Tiny 1.2 uDOM specification, conformant WICD Mobile 1.0 user agents must support the adoptNode method on the Document interface, as defined in the DOM Core Level 3 specification.
The CustomEvent type allows applications to use application-domain events. The support for dispatchEvent on EventTarget (in addition to what is supported in the SVG Tiny 1.2 uDOM), provides a way to dispatch the event to the document tree. Finally, support for DocumentEvent provides a way to create CustomEvent instances which can then be dispatched.
http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-CustomEvent
// Introduced in DOM Level 3: interface CustomEvent : Event { readonly attribute DOMObject detail; void initCustomEventNS(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMObject detailArg); };
http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-EventTarget
// Introduced in DOM Level 2: interface EventTarget { void addEventListener(in DOMString type, in EventListener listener, in boolean useCapture); void removeEventListener(in DOMString type, in EventListener listener, in boolean useCapture); // Modified in DOM Level 3: boolean dispatchEvent(in Event evt) raises(EventException, DOMException); // Introduced in DOM Level 3: void addEventListenerNS(in DOMString namespaceURI, in DOMString type, in EventListener listener, in boolean useCapture, in DOMObject evtGroup); // Introduced in DOM Level 3: void removeEventListenerNS(in DOMString namespaceURI, in DOMString type, in EventListener listener, in boolean useCapture); };
http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-DocumentEvent
Conformant WICD Mobile Profile User Agent must support the following subset of the DocumentEvent interface. Note that in a conformant WICD Mobile Profile User Agent, "CustomEvent" is the only required event type.
// Introduced in DOM Level 2: interface DocumentEvent { Event createEvent(in DOMString eventType) raises(DOMException); };
The eventType parameter specifies the name of the DOM Events interface to be supported by the created event object, i.e. "CustomEvent". The CustomEvent init method must be called after creation in order to initialize the Event's values. A user wishing to synthesize some kind of CustomEvent would invoke DocumentEvent.createEvent("CustomEvent"). The CustomEvent.initCustomEventNS method could then be called on the newly created CustomEvent object to set the details of the event to be dispatched.
The newly created event object.
DOMException NOT_SUPPORTED_ERR: Raised if the implementation does not support the Event interface requested. In WICD Mobile 1.0, only the CustomEvent interface is required.
The normative definition of the Document Object Model (DOM) Level 2 HTML is defined here.
// File: html2.idl #ifndef _HTML2_IDL_ #define _HTML2_IDL_ #include "dom.idl" #pragma prefix "dom.w3c.org" module html2 { typedef dom::DOMString DOMString; typedef dom::Document Document; typedef dom::NodeList NodeList; typedef dom::Element Element; interface HTMLElement; interface HTMLFormElement; interface HTMLDocument : Document { NodeList getElementsByName(in DOMString elementName); }; interface HTMLElement : Element { attribute DOMString id; attribute DOMString className; }; interface HTMLFormElement : HTMLElement { void submit(); void reset(); }; interface HTMLInputElement : HTMLElement { attribute boolean checked; attribute DOMString value; void select(); }; interface HTMLTextAreaElement : HTMLElement { attribute DOMString value; void select(); }; interface HTMLObjectElement : HTMLElement { // Introduced in DOM Level 2: readonly attribute Document contentDocument; }; }; #endif // _HTML2_IDL_
#include "dom.idl" #include "events.idl" module wicd { typedef events::EventTarget EventTarget; interface FocusNavigation { void setFocus(in *EventTarget *object) raises(DOMException); *EventTarget *getFocus(); }; }
A request to put the focus on the given object.
If this method succeeds:
Whenever the method fails (i.e. a DOMException is raised), the focus must stay on the currently focused object and no DOMFocusOut or DOMFocusIn event is dispatched.
The User Agent must always have a currently focused object. When the document is loaded, the root document has the focus.
in EventTarget object. The object that should receive the focus. Note that this object may be in in the implementing document's tree or in one of the child documents.
DOMException NOT_SUPPORTED_ERROR: Raised if the requested element is not focusable (i.e. its focusable attribute does not evaluate to true for an SVG element. For XHTML elements, if the element's local name is not one of 'select', 'input', 'textarea', 'a', 'object', 'button' or 'area').
Returns the current EventTarget which has focus. Initially, the focus is set on the root WICD root Document object.
The WICD Mobile specification allows authors to use XHTML, CSS, and SVG together in a predictable way. WICD Core defines basic principles that all comformant content and user agents must apply. Exact language versions and capabilities are defined in the WICD profiles. Content authors are encouraged to see the profiles for guaranteeing use of right feature set.
In addition to this specification, the Mobile Web Best Practices 1.0 document provides useful guidelines for delivering content to Web-enabled mobile devices. WICD Mobile is a superset of the capabilities articulated in the default delivery context section of this document.
The editors would like to thank the contributors: