×
Namespaces

Variants
Actions

XHTML MP

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: firt (13 Apr 2007)
Last edited: hamishwillee (01 Aug 2012)

XHTML - eXtensible HyperText Markup Language - Mobile Profile (MP) is a subset of XHTML 1.1 for design mobile websites for WAP 2.0 browsers. Last mobile browsers supports CSS, ECMAScript and AJAX applications.


XHTML MP is derived from XHTML Basic 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 a XHTML-MP browser may not be fully conforming on all modules.

It is the evolution of WML documents. With XHTML you can organize the document and present the information. Using CSS you can layout elements and define style information (color, sizes, etc.)

Contents

Versions

1.0: First Version 1.1: Add support of ECMAScript Mobile Profile 1.2: Add support of form and object

WML Features lost in XHTML MP

  • XHTML MP does not support decks and cards, you have one only page to show per XTHML document
  • XHTML MP does not support timers. ECMAScript MP can handle this.
  • XHTML MP does not support events. ECMAScript MP can handle this.
  • XHTML MP does not support variables. ECMAScript MP can handle this.
  • XHTML MP does not support client-side scripting until ECMAScript MP MP appears
  • XHTML MP does not support programmable softkeys. ECMAScript MP can handle this.
  • XHTML MP does not support the u tag (for underline)
  • XHTML MP does not support the format attribute for input fields, although XHTML MP 1.2 provides the inputmode attribute to the same effect
  • XHTML MP does not support posting of data with anchor links

Syntax

An XHTML MP file has a .xhtml, .htm or .html extension and must be provided with one of this MIME types:

  • application/vnd.wap.xhtml+xml
  • application/xhtml+xml
  • text/html

Inside the XML document, the rules are

  • Tags must be closed properly
  • Tags and attributes must be in lowercase
  • Value of attributes must be enclosed within quotation marks
  • No attribute minimization is allowed
  • Tags must be nested properly

Hello World XHTML MP

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XHTML MP Hello World</title>
</head>
 
<body>
<p>Hello world. Welcome to Nokia Developer Wiki.</p>
</body>
</html>

Links

This page was last modified on 1 August 2012, at 06:58.
142 page views in the last 30 days.