120 likes | 300 Views
WML Doc Model – contd.. Rendering vs. display Depends on the browser Develop general-purpose WML mark up WML browsing is not Web browsing Mobile users need targeted info and not surfing So interaction between the user the device has to be concise and to the point
E N D
WML Doc Model – contd.. • Rendering vs. display • Depends on the browser • Develop general-purpose WML mark up • WML browsing is not Web browsing • Mobile users need targeted info and not surfing • So interaction between the user the device has to be concise and to the point • WML provides tools to write hotspots, i/p fields, selection list, etc and gives minimal document publishing features
WML Basics • What happens when the deck is rendered by the browser? • Eg. 4 different browser, display the same content in different ways
The Content is in the Cards • The <card> element – basic element of user interaction, smallest addressable WML unit • Depending on browser, card displayed as a single or series of pages – but the order of elements within the card should be unaltered
The title attribute • For title bar text or as a default bookmark name for the card • Depends on browser • The ordered attribute • Boolean • Intended organization of the cards fields • True • Card to be a linear sequence of fields • Suited for short forms with no fields optional • False • Card doesn’t have a linear sequence or some elements are optional • Appropriate when the fields are being edited, ‘coz individual fields can be edited in any order • Only a hint to the browser – browser may or may not oblige – if true, then sequence of screens, else a tree • Do not put too many elements in a single card • Browser – to regard a field element and a text preceding as a logical entity and display them together Enter Name: • Generic or tailor content for specific browser
The onenterforward, onenterbackward and ontimer attributes • Shorthand forms for an <onevent> element of same type that specifies a <go> task • The newcontext attribute • Allows to establish a new browser context when a card loads • Context : a record of the browser’s current state including all defined variables and navigation history stack • If true, • Browser creates a context with a known, well-defined state • All WML variables become undefined, history stack cleared except the one for the current card • Some browsers may also clear the browser’s cache • Security – if sensitive info in the WML variables
The id attribute • Gives a name to the card • Must be unique within a deck • Used also within a deck as a fragment anchor • Identifying decks and cards • In WML, fragment anchors refer to cards only (#c1) • If the URL doesn’t specify a card name, then by default the first card of the deck will be displayed • Also if the URL references a nonexistent card, then also the first card is displayed
Comments • <! - - A comment - - > • Body of the comment • Can’t have a double hyphen • Can’t come between an element start or end tag • Multiple lines – yes, nesting – no • Content Generation • Static • Created using WML authoring tool or converted from other data format to WML • Eg. A company’s annual report, company stock’s daily closing price (automated program updates each day) • Dynamic • Generated in response to a particular request • Also Generated from templates, where basic deck resides in the file system, and has areas to be filled in response to a particular request • Eg. Student mark display, a page showing the company’s stock price • Factor that makes WML content generation differs from HTML • To recognize and account for differences among the various devices, browsers and networks that receive WML cotent
A WML language is generally insufficient for producing a complete wireless application • A complete WML application encompasses: • WML decks generated statically or dynamically • Server-side processes such as servlets or CGI programs • WMLScript and image content • Application data residing at the server or downloaded to the client as WBXML
Binary WML • WML specification includes a WBXML encoding for WML docs • Set of element tags and attributes are small – so no need for multiple code pages • Eg. <a> tag has the token value 0x1C • Lack of token doesn’t prevent encoding of WML1.2 docs . Eg. Xml:space attribute was introduced in WML1.2 – was not assigned a WBXML token value