Neatware  Header

    Deck an Card

    Snaml for Java 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 is a unit for communication between a server and an agent. You can specify URLs to navigate decks and cards. A card's URL is represented as DECK_URL#card_ID. When you navigate a deck you enter to the first card. It is possible to send an argument like URL?foo=bar to a deck where ? indicates current deck and foo=bar is a string. The ampersand (&) character of an input string must be represented as &.

  1. History stack

    History stack remembers the URLs of navigational path.

  2. ID and Class

    All Snaml for Java/WML methods may have id and class attributes. The id attribute makes a method owned a unique name within a deck. The class attribute groups methods with one or more classes. The name of class is case sensitive. A method can be a part of multiple classes.

  3. Card

    A _card method 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 methods in a card is significant. In a card they must be _onevent, _timer, _do, or _p.

    _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 methods 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 method specifies the event bindings that will apply to all cards in a deck. A _card method may override the declaration of the _template method. 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 method contains at least one of the __access and __meta methods which specifie the deck information availabel for visiting and search engine.

    _head();
      (access | meta) +
    head_();
    
  6. Access

    __access method specifies the access control of a deck. If there is no __access method 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 method 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 method. '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.