WAP 2.0 Introduction and Usage specification

Source: Internet
Author: User
Tags unsupported
--xhtml MP and Wcss
First, the common sense of WAP (omitted)
Second, XHTML MP
(i) Introduction to the XHTML MP
XHTML MP (extensible Hypertext Markup Language Mobile profile)
WAP2.0
Compatible with WCSS (WAP css/wap cascading Style Sheet)
is a subset of XHTML
XHTML Basic (XHTML subset) + additional XHTML elements and attributes
Between WAP browser and internet
Previous WAP sites (WML and WMLScript)
More Show performance (presentation control)
(i) Introduction to the XHTML MP
Advantages: Developed sites can be used both on the web and wireless, or in any Web browser to access WAP2.0 applications
Backward compatibility: XHTML Mp/wcss and Wml/wmlscript
(ii) Development of wireless Markup language
Html:wap development of the first task-mobile phones, PDAs and other access to the Internet. WAP Standard (WML and XHTML Mobile profile) is similar to HTML
WML (Wireless Markup Language) 1.x:wap The markup language specified in the 1.x specification, the first markup language for the wireless device. Openwave, Nokia and Ericsson have their own markup languages very early on. The WML specification is created by the WAP Forum (97). Now, a lot of WAP sites are still using WML.
XHTML: Structure is more concise and rigorous than HTML. This is important for wireless devices (for example: mobile phones) for limited processing power.
XHTML Basic: is a simplified version of XHTML. To handle
Ability and performance of limited equipment design (mobile phone, PDA, pager, etc.)


(ii) Development of wireless Markup language
But does not contain XHTML attributes. such as css,frames and scripting. is defined by the consortium.
XHTML MP: The official markup language specified in the WAP2.0 description. WAP Forum is created based on XHTML Basic and adds elements and attributes from the full version of XHTML. such as <i>,<b>,<small>,<big> and A simplified version of the Wcss/wap Css:css2 adds WAP-specific extensions. It's easy to change the layout and style of the XHTML MP page.
Wml2.0:wap site developers do not need to worry about WML2.0. WML2.0 is backward compatible and is not available for WAP site developers.

(iii) Advantages of XHTML MP
Biggest advantage: Developers can use the same technology to develop web and WAP-enabled sites.
Get started with HTML, XHTML, and CSS basics.
The same development tools can be used to develop web and WAP sites.
The general web browser in the development process can browse your WAP site.
The html/xhtml page can be modified into an XHTML MP with minor modifications, even without modification (note: whether the layout fits into the small screen and whether the file size is the largest).
Support WCSS. Mobile devices have many different features, such as screen size, just write a structure, using a different wcss file.
More performance control.



(iv) Unsupported WML properties
The XHTML MP does not support <deck> and <card> labels.
In XML, a file can contain one or more card, all of which are combined into a deck and downloaded together in a wireless device. The Wap browser displays only one card at a time and can access other card through the anchor chain. This reduces the round-trip access to the server. It is meaningful to improve performance. To implement similar features in the XHTML MP, you can use multipart messages (multiple documents to one request) another way is to use a target anchor (a different location on a page).
XHTML MP does not support <timer> tags
<meta> element tells WAP browser URL after 10 seconds.
Note: The WML timer only enters the card, while the HTML refresh timer enters the XHTML MP page.
(iv) Unsupported WML properties
3. The XHTML MP does not support events.
WML supports four events (Ontimer,onenterbackward,onenterforward,onpick) and cannot be emulated except OnTimer other events. If you want to use, you need to use wml1.x.
4. The XHTML MP does not support variables.
In XML, you can declare variables, assign values, and have global scopes. Can be used in any deck and card. The Xhml MP is placed on server-side processing (must be sent and saved).
5. The XHTML MP does not support client script.
In XML, you can use client script (WMLScript). A simplified version of JavaScript that is commonly used to validate data. Put on the server for short processing. Future versions will support client-side scripting (ECMAScript MP) and support all WMLScript features.

(iv) Unsupported WML properties
6. The XHTML MP does not support programmable soft keys (programmable softkeys).
One of the largest characteristics of WML. Used by <do> tags. The accesskey attribute can be used in the Xhml MP. The Anchor connection and submit button support this property:
<a accesskey= "1" href= "part1.xhtml" >xhtml MP Tutorial part 1</a
The-wap-accesskey attribute in Wcss can also be used to define: a.wcss_class_1 {-wap-accesskey:1}
7. The XHTML MP does not support <u> tags.
The xml,<u> is used to underline some text. You can use the Text-decoration property in Wcss.
8. The XHTML MP does not support the Format property of the input box.
In XML, you can define type and word limits. You can use the-wap-input-format property in Wcss and the syntax is consistent. For example, limit 5 digit characters: input {-wap-input-format: "5N"}

(iv) Unsupported WML properties
9. The XHTML MP does not support cable connection transmission data.
<p> &nbsp;&nbsp; Name: &nbsp;&nbsp;<input name= "name"/><br/> &nbsp;<anchor > <go method= "Get" href= "yuanxin.php" ><postfield name= "name" value= "$ (name)"/></go> &nbsp; Submit &nbsp;&nbsp;</anchor> </p>
<form action= "yuanxin.php" method= "get" > &nbsp; <p> Name: &nbsp;&nbsp;&nbsp;&nbsp;<input name= "name"/><br/><input type= "Submit" Value= "Submit"/></p> </form>
(v) Grammatical rules
The label must be completely closed.
Labels and attributes must be lowercase.
Property values must be enclosed in quotation marks.
No attribute values are allowed to exist.
The label must be completely nested.
(vi) MIME type and file name extension
MIME type: Application/vnd.wap.xhtml+xml, Application/xhtml+xml, text/html.
Dynamically generate MIME types. Gets the Accept header information in the HTTP request.
File name extension:. xhtml,. html,. htm

(vii) Document structure
Must contain
<?xml version= "1.0"?>
<! DOCTYPE HTML PUBLIC "-//wapforum//dtd XHTML Mobile 1.0//en" "Http://www.wapforum.org/DTD/xhtml-mobile10.dtd" >
<title>hello world</title>
<body>
<p>hello World. Welcome to Taobao.com.</p>
</body>

(vii) Document structure
XML declaration and character encoding: <?xml version= "1.0" encoding= "UTF-8"?>
UTF-8/16 encoding can be omitted. XML declarations are also not mandatory, but errors are ignored in many WAP browsers.
There must be a DOCTYPE declaration. Between the XML declaration and the <p> element, the Align attribute has been removed and can be set by the Text-align property of the WAP CSS.
(eight) General meta data
Use <meta/> tags, included in WAP browsers are ignored if they are not understood.
For example, add Author: <meta name= "Author" content= "Yuanxin"/>
One application of the cache control:<meta/> tag is to control the lifecycle of XHTML MP files in cache:
<meta http-equiv= "Cache-control" content= "No-cache"/>
<meta http-equiv= "Cache-control" content= "max-age=0"/>
Note: device-related. Some use the method of not phase, some have no cache mechanism. There are some that do not support <meta/> but identify Cache-control:no-cache.
HTTP headers. can also be applied to a picture's cache.
(eight) General meta data
Periodic refresh. Must be used in conjunction. Not all browsers support it.
<meta http-equiv= "Cache-control" content= "No-cache"/>
<meta http-equiv= "Refresh" content= "15; Url=yuanxin.xhtml "/>
(ix) Introduction of common labels
Note:<!----, same as HTML and wml1.x.
NewLine:<br/>, same as HTML and wml1.x.
Horizontal line:Title:
(ix) Introduction of common labels
Font styles: XML can use tags to change font styles (<b>, <i>, <small>, <big>, and so on). But some browsers support only part of it, unsupported ignore, no error. Wcss controls font formatting.
With formatted text: In the XHTML MP, white space does not appear, in addition, 2 or more white space in the paragraph shows only one, and if you want to keep the text in the format, you can use <pre>.
List:<ul>, <ol>, <li>. For <ol> elements, you can specify the sequence in which the number begins with the property start. You can also use WCSS for more precise control.
Display Picture: label to display picture. The same as HTML. Displays the Alt attribute text if the file is not found or the picture format is not supported. Height and Width properties to specify the heights and widths of the picture display area

(ix) Introduction of common labels

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.