XHTML Mobile Profile
Encyclopedia
XHTML Mobile Profile is a hypertext
Hypertext
Hypertext is text displayed on a computer or other electronic device with references to other text that the reader can immediately access, usually by a mouse click or keypress sequence. Apart from running text, hypertext may contain tables, images and other presentational devices. Hypertext is the...

ual computer language standard designed specifically for mobile phone
Mobile phone
A mobile phone is a device which can make and receive telephone calls over a radio link whilst moving around a wide geographic area. It does so by connecting to a cellular network provided by a mobile network operator...

s and other resource-constrained devices.

It is an XHTML
XHTML
XHTML is a family of XML markup languages that mirror or extend versions of the widely-used Hypertext Markup Language , the language in which web pages are written....

 document type defined by the Open Mobile Alliance
Open Mobile Alliance
The Open Mobile Alliance is a standards body which develops open standards for the mobile phone industry.- Principles :Mission: To provide interoperable service enablers working across countries, operators and mobile terminals....

. XHTML-MP is derived from XHTML Basic
XHTML Basic
XHTML Basic is an XML-based structured markup language primarily used for simple user agents, typically mobile devices.XHTML Basic is a subset of XHTML 1.1, defined using XHTML Modularization including a reduced set of modules for document structure, images, forms, basic tables, and object support...

 1.0 by adding XHTML Modules, with later versions of the standard adding more modules. However, for certain modules, XHTML-MP does not mandate a complete implementation so an XHTML-MP browser may not be fully conforming on all modules.

The XHTML MP 1.2 DTD is the current recommendation, finalized in March 2008.

XHTML Basic
XHTML Basic
XHTML Basic is an XML-based structured markup language primarily used for simple user agents, typically mobile devices.XHTML Basic is a subset of XHTML 1.1, defined using XHTML Modularization including a reduced set of modules for document structure, images, forms, basic tables, and object support...

 1.1
became a W3C Recommendation in July 2008, superseding XHTML-MP 1.2.

DOCTYPE

To validate as XHTML-MP, a document must contain a proper Document Type Declaration
Document Type Declaration
A Document Type Declaration, or DOCTYPE, is an instruction that associates a particular SGML or XML document with a Document Type Definition...

, or DOCTYPE, depending on the version of specification followed:


"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

"http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd">

"http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">


Note that a series of revisions have been issued to correct technical errors in the above DTDs, and the DTD format is more complex and less widely supported than that of standard HTML

MIME types

The MIME
MIME
Multipurpose Internet Mail Extensions is an Internet standard that extends the format of email to support:* Text in character sets other than ASCII* Non-text attachments* Message bodies with multiple parts...

 type for XHTML Mobile Profile is "application/vnd.wap.xhtml+xml". Conforming user agent
User agent
In computing, a user agent is a client application implementing a network protocol used in communications within a client–server distributed computing system...

s should also accept "application/xhtml+xml" and "text/html". Many desktop browsers will only validate XHTML-MP at display time, if an XML MIME type is specified.

Development pitfalls

Many problems arise when content written in XHTML is shown on different devices. For example, some devices will honor colors specified in CSS
CSS
-Computing:*Cascading Style Sheets, a language used to describe the style of document presentations in web development*Central Structure Store in the PHIGS 3D API*Closed source software, software that is not distributed with source code...

, while other devices will not. Building an adaptive application means delivering different content to different devices, according to their capabilities. This can bring huge complexity, given the number of different devices in the market with different hardware (screen-sizes, coloring capacity, buttons, memory and speed) and browsers
Web browser
A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...

. Software updates on mobile browsers are much more difficult than with desktop browsers, and as a result broken software tends to stay in use until the device is discarded.

Many software initiatives attempt to solve this problem. Most of these initiatives provide a proprietary language to write WAP content, which will render different content (XHTML-MP, WML
Wireless Markup Language
Wireless Markup Language , based on XML, is a markup language intended for devices that implement the Wireless Application Protocol specification, such as mobile phones. It provides navigational support, data input, hyperlinks, text and image presentation, and forms, much like HTML...

, CHTML, etc) according to the requesting device. One free initiative is WURFL
Wurfl
WURFL stands for Wireless Universal Resource FiLe. It is a community effort focused on mobile device detection: the problem of presenting content on the wide variety of wireless devices. WURFL is a set of proprietary API's and an XML configuration file which contains information about device...

, which uses a hierarchical XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 configuration file mapping hundreds of device capabilities. WURFL also offers a "Wireless Abstraction Layer", called WALL, which specifies special tags that are automatically converted into a markup language supported by the device. The W3C DDWG
W3C Device Description Working Group
The W3C Device Description Working Group , operating as part of the World Wide Web Consortium Mobile Web Initiative , was chartered to "foster the provision and access to device descriptions that can be used in support of Web-enabled applications that provide an appropriate user experience on...

 has created a specification to standardize access to repositories of device capability information, to be part of a common framework for content adaptation technologies.

Example

A complete valid
Valid XML document
A valid XML document is defined by the W3C as a well-formed XML document which also conforms to the rules of a Document Type Definition or an XML Schema , which W3C supports as an alternate to DTD....

 and well-formed example is:



"http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">


Hello world


Hello world.






When served with a MIME
MIME
Multipurpose Internet Mail Extensions is an Internet standard that extends the format of email to support:* Text in character sets other than ASCII* Non-text attachments* Message bodies with multiple parts...

type of "application/xhtml+xml" or "application/vnd.wap.xhtml+xml".

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK