Neatware Header
Home   Products   Forums   Partners   Buy   Company   Contact   Blog   

Deck an Card

Snaml for Tcl/ WML is organized as a set of cards. A card is a unit for user interaction. For mobile phone, a screen shows a card's content and its available selections. A deck is the set of cards. It's a unit for communication between a server and an agent. To navigate decks and cards, you can specify their URL. A card's URL is represented as deck_URL#card_ID. When you navigate a deck you enters to the first card. It is possible to send a CGI argument URL?foo=bar to a deck where ? indicates current deck. foo=bar is a CGI string. The ampersand (&) character of a CGI string must be represented as &.

  1. History stack

    History stack remembers the URLs of navigational path.

  2. ID and Class

    All Snaml for Tcl/ WML commands may have id and class attributes. The id attribute makes a command own unique name within a deck. The classattribute groups commands with one or more classes. The name of class is case sensitive. A command can be a part of multiple classes.

  3. Card

    A _card command may contain text and input requests to present content on wireless devices. Usually it is a page of a mobile phone screen. The order of commands in a card is significant. The order is _onevent, _timer, _do, or _p in a card if the commands are included.

    _card "id='name' class='name' title='label' 
           newcontext='boolean' ordered='boolean' 
           onenterforward='href' onenterbackward='href'
           ontimer='href' xml:lang='lang'"
    	onevent *	timer ?
    	do *
    	p *
    card_

    The title='label' attribute specifies the title of a card. If the newcontext='true', when a card is visited, its context will be reset. It will clear history state and resume the default state. Its default value is false. The ordered='boolean' attribute represents the organization of a card. If its value is true, the _field commands in a card are organized as a linear sequence, otherwise, they have no order. The 'onenterforward' and 'onenterbackward' events occur when a card using 'go' and 'prev' task respectively. After a timer expired, the 'ontimer' occured and the card switched to a new href.

  4. Template

    _template command specifies the event bindings that will apply to all cards in a deck. A _card command may override the declaration of the _template command. The 'onenterforward' and 'onenterbackward' events occur when a card using 'go' and 'prev' task respectively. After a timer expired, the 'ontimer' occured and the card switched to a new href.

    _template "id='name' class='name'
               onenterforward='href' 
               onenterbackward='href' 
               ontimer='href'"
    	do *
    	onevent *
    template_
    
  5. Header

    _head command contains at least one of the __access and __meta commands which specifies the deck information availabel for visiting and search engine.

    _head
    	(access|meta) +
    head_
    
  6. Access

    __access command specifies the access control of a deck. If there is no __access command in the _head, any deck can visit this deck.

    __access "domain='domain' path='path'"

    The 'domain' and 'path' attributes require the URL of decks who are visiting this deck match the values of two attributes. The 'domain' is suffix matching and the 'path' is prefix matching. The default 'domain' value is current deck domain and the default 'path' value is the '/'.

    ATTR	NAME		MATCH		NOTMATCH
    Domain	www.snaml.com 	snaml.com	mycom.com
    Path	/a/b		/a		/ab	
  7. Meta

    __meta command specifies generic meta information of a deck.

    __meta "content='value' name='name' scheme='format' 
      http-equiv='cdata' forua='boolean'"

    The 'content' attribute specifies the property value. It must be declared in a __meta command. 'name' attribute specifies the property name. 'scheme' attribute specifies a form that will interpret the property value. 'http-equiv' attribute declares that that the property should be interpreted as an HTTP header. If the value of 'forua' attriute is true, the meta data will be sent to user agent. Otherwise it will not be delivered.