SolutionsTools & SDKSupportForums Register



Quick Links
 
XHTML-MP Style Guide Appendix A
 
 
While XHTML MP enables the creation of visually appealing pages, developers with a background in WML or HDML will find that some of the features available in those mark-ups are no longer available. Because of this, migrating from WML/HDML to XHTML cannot be automated and a more reliable and functioning application will result from doing it manually with the help of the information presented here. This chapter gives an overview of the differences between WML/HDML and explains which alternative constructs can be used for features that are no longer supported.

Please note that, in case you absolutely need a WML feature, WAP 2.0 devices still support WML 1.X because of backward compatibility.

No Deck-Card Metaphor
WML allowed you to define several pages inside one document. The purpose of this was to avoid round-trips to the application server for pages that did not require further computation. XHTML MP does not allow this. Feel free to organize a round trip to the server for each page. You might, however, consider either using multi-part documents or possibly longer XHTML documents with anchors allowing the user to navigate through the page.

No Variables
No WML/HDML variables. The idea is that future versions of XHTML MP will support some flavor of ECMAScript. This will enable some of the features available for WML 1.X today.

Variables had multiple uses in WML/HDML. Let's look at each of them and see the alternative:
  • Store user data locally across the application.
    This was useful for minimizing the need for user to re-enter data that had been entered previously. XHTML MP has no direct way to do this, but you can rely on the application server to pre-fill forms with the data that users have already provided.
  • Timers.
    Timers do not exist anymore. You can simulate them to some extent by using META tags. You can use http-equiv="refresh" to instruct the browser to download a different document (or even to reload the same document) after a specified time to present a slide show or to redirect a user from a stale web page. For example:

    <meta http-equiv="refresh"
    content="15; url=(http://www.example.com/new.html" />

    Instructs the browser to open new.html after 15 seconds.
    Note: Take care not to create an endless loop, or you will likely displease subscribers who pay for data access by the minute or the packet. It is also worth noting that in the example above, the timer will be activated even if the user navigates to the page from a press on the "back" key on a device.
  • Post form data with a hyperlink, rather than a button.
    Consistently with XHTML-basic, you need to use a submit button (<input type="submit">) to post data. Of course, once you have the data, you can use the application server to build hyperlinks that encode the data in the query string part of the URL. This is equivalent to posting a form with the HTTP GET method. Remember that although the button type might be called "submit" the word "submit" isn't necessarily the most meaningful to users.
No Script
WMLScript is not available in XHTML MP. However, it may be available on some devices for backwards compatibly reasons. In reality, WMLScript was not widely embraced by programmers, but applications designed around it may need to be redesigned to manage without it.

No Softkeys
Softkeys are gone, and this is a shame, since they were a very important feature for usability. Sofkeys allowed users to trigger obvious operations with just one click. Openwave plans to support softkeys again for its browser using CSS syntax. Stay tuned.

The only thing that reminds of softkeys in XHTML is the accesskey attribute that lets you program a numeric keyboard shortcut to hyperlinks (typically menu items) and form elements.

No Events
Events were exclusive to WML/HDML. They are gone. If you depended on them, you will need to rethink the flow of your application (or stick to WML for some time).

The only event that can be simulated to some extent is the ontimer event thanks to the http-refresh attribute of the META tag (see section on variables above).

XHTML-MP Style Guide Chapters
 
XHTML-MP Style Guide Index
1. History of XHTML Mobile Profile
2. XHTML MP in practice
3. Menus in XHTML Mobile profile 1.0
4. Text-flow
5. Forms: Collecting User Data
6. Images and Objects
7. Testing Your Applications
Appendix A
Appendix B


 
 
Copyright © 2000-2008 Openwave Systems Inc.    About Us  |  Openwave  |  Terms & Conditions  |  Privacy Policy  |  Update Profile