WML Doc Model – contd.. Rendering vs. display Depends on the browser

12
• 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

description

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 - PowerPoint PPT Presentation

Transcript of WML Doc Model – contd.. Rendering vs. display Depends on the browser

Page 1: WML Doc Model – contd.. Rendering vs. display Depends on the browser

• 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

Page 2: WML Doc Model – contd.. Rendering vs. display Depends on the browser

WML Basics

• What happens when the deck is rendered by the browser?

• Eg. 4 different browser, display the same content in different ways

Page 3: WML Doc Model – contd.. Rendering vs. display Depends on the browser

• A WML Skeleton

Page 4: WML Doc Model – contd.. Rendering vs. display Depends on the browser

• 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<card>

Purpose Contains contents and user interface elements

Attributes Title Titletext

Newcontext “false” | “true” (novar)

Ordered “false” | “true” (novar)

Onenterforward URL

Onenterbackward URL

Ontimer URL

Id Cardname (novar)

Class (novar)

Xml:lang (novar)

Can contain <onevent>, <timer>, <do>, <p>, <pre>, etc

Valid in <wml>

Page 5: WML Doc Model – contd.. Rendering vs. display Depends on the browser

• 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

Page 6: WML Doc Model – contd.. Rendering vs. display Depends on the 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

Page 7: WML Doc Model – contd.. Rendering vs. display Depends on the browser

• 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

<!- - This is nav1.wml --><wml> <card> <do type=“prev”><prev/></do> <p> This is deck 1, card 1 <br/> <a href=“nav2.wml#card2”> Jump to deck 2, card 2. </a> </p> </card></wml>

<!- - This is nav2.wml --><wml> <card> <do type=“prev”><prev/></do> <p> This is deck 2, card 1 </p> </card> <card id=“card2”> <do type=“prev”><prev/></do> <p> This is deck 2, card 2 <br/> <a href=“nav2.wml”> Jump to deck 2, card 1. </a> </p> </card></wml>

Page 8: WML Doc Model – contd.. Rendering vs. display Depends on the browser

• 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

Page 9: WML Doc Model – contd.. Rendering vs. display Depends on the browser

• 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

Page 10: WML Doc Model – contd.. Rendering vs. display Depends on the browser

• 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

Page 11: WML Doc Model – contd.. Rendering vs. display Depends on the browser
Page 12: WML Doc Model – contd.. Rendering vs. display Depends on the browser