XHTML-MP
Introduction:-
Challenges
of Mobile Development :-
Mobile devices have several limitations
These limitations have serious implications on the way one should
design his/her mobile site.
XHTML
MP (eXtensible HyperText Markup Language Mobile Profile) is the
markup language defined in WAP 2.0 .The goal of XHTML Mobile Profile
is to bring together the technologies for mobile Internet browsing
and that for the World Wide Web
Main:-
Before
Starting XHTML-MP we need to understand what is WAP
Short
for the Wireless Application Protocol, a secure specification
that allows users to access information instantly via handheld
wireless devices such as mobile phones, pagers, two-way radios,
smartphones and communicators.
WAP
supports most wireless networks. These include CDPD, CDMA, GSM, PDC,
PHS, TDMA, FLEX, ReFLEX, iDEN, TETRA, DECT, DataTAC, and Mobitex.
WAP
is the standard created by the WAP Forum (now the Open
Mobile Alliance [OMA]) that brings the World Wide Web to wireless
devices. It specifies the protocol stack and application environment
of mobile Internet browsing applications
The
most up-to-date version of the WAP 1.x specification is WAP 1.2.1,
which defines WML 1.3
WML
files have the extension ".wml". The MIME type of WML is
"text/vnd.wap.wml".
WML
(Wireless Markup Language) is
the first markup language standard for wireless devices. It is
supported by all the major mobile phone manufacturers
WML
1.x is very similar to HTML. Both of them use tags and are written in
plain text format. Some tags in WML 1.x are directly borrowed from
HTML. If you have experience in using the HTML markup language, you
should be able to learn WML 1.x quickly.
WAP
1.x is an earlier version of the WAP standard. The most current
version is WAP 2.0. The markup language defined in WAP 2.0 is XHTML
MP (XHTML Mobile Profile)
Some
major WML features lost in XHTML MP:
1.
XHTML MP does not support decks and cards
2.
XHTML MP does not support timers
3.
XHTML MP does not support events
4.
XHTML MP does not support variables
5.
XHTML MP does not support client-side scripting
6.
XHTML MP does not support programmable softkeys
7.
XHTML MP does not support the tag
8.
XHTML MP does not support the format attribute for input fields
9.
XHTML MP does not support posting of data with anchor links
XHTML
MP is a subset of XHTML. The syntax rules of XHTML MP follow that of
XHTML.
As
mentioned before in this XHTML MP tutorial, XHTML is just a stricter
and cleaner form of HTML. If you have already learned HTML, you can
immediately start writing XHTML MP markup code by following the XHTML
MP syntax rules below.
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
MIME
types
The
following three MIME types can be used for XHTML MP documents:
application/vnd.wap.xhtml+xml
application/xhtml+xml
text/html
The
MIME type specified by the Open
Mobile Alliance [OMA] for XHTML MP documents is
"application/vnd.wap.xhtml+xml". This MIME type is required
for some WAP browsers (for example, some Nokia Series 60 browsers) to
display XHTML MP documents correctly.
Another
choice is the "application/xhtml+xml" MIME type. It is the
MIME type for XHTML Family document types.
The
"text/html" MIME type is also a possible choice
File
Extensions
The
file extensions
of
static XHTML MP documents are ".xhtml", ".html"
and ".htm" typically. You can use other file extensions you
like, If you are
going to use a server-side technology such as ASP, JSP, Perl, PHP or
SSI (Server Side Includes) to add content to XHTML MP documents
dynamically, you may need to change the file extension of your XHTML
MP documents to that used by the server-side technology. For example,
the typical file extension used by PHP is ".php", while
that used by SSI is ".shtml".
DOCTYPE
Below
is the DOCTYPE
declaration for XHTML MP.
You can simply copy and paste it into your XHTML MP files.
<!DOCTYPE
html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
The
DOCTYPE declaration specifies the name of the DTD (Document Type
Definition) and the URL to the DTD. The DTD contains information
about the syntax of the markup language. It defines what elements and
attributes can be used in the markup and the rules that they should
be used.
Supported
Modules
Modules
included in XHTML-MP 1.2 are:
Structure
Texts
Hypertext
List
Forms
Basic
Tables
Image
Object
Metainformation
Scripting
Style
Sheet
Style
Attribute
Link
Base
XHTML-MP
1.2 also includes partial support for:
Presentation
Intrinsic
Events
Legacy
Reference's:-
www.openmobilealliance.org
http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/
http://www.passani.it/gap/