Page 81 - DCAP512_WAP_AND_WML
P. 81

Unit 6: Card Navigation




          User Interface Variations                                                             Notes
          The function of our application should be mainly the same across various devices.

              The user interfaces can vary considerably from one device to another.
              The implementation and user interaction can fluctuate and we must plan for this


                 Example: A WML deck with two cards - one for user input and one for displaying the
          result - can be set up, as demonstrated in this example:
          <?xml version="1.0"?>
          <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
          "http://www.wapforum.org/DTD/wml_1.1.xml">

          <wml>
          <card id="card1" title="Tutorial">
          <do type="accept" label="Answer">
            <go href="#card2"/>
          </do>
          <p>
          <select name="name">

            <option value="HTML">HTML Tutorial</option>
            <option value="XML">XML Tutorial</option>
            <option value="WAP">WAP Tutorial</option>
          </select>
          </p>
          </card>
          <card id="card2" title="Answer">
          <p>
          You selected: $(name)

          </p>
          </card>
          </wml>
          Example Explained
          The Document Prolog and the First Tag
          <?xml version=”1.0"?>
          <!DOCTYPE wml PUBLIC “-//WAPFORUM//DTD WML 1.1//EN”
          “http://www.wapforum.org/DTD/wml_1.1.xml”>

          The first lines in the WML document are called the prolog. The prolog defines that this is an XML
          document, it then defines the XML version, and the DTD to be referenced.







                                           LOVELY PROFESSIONAL UNIVERSITY                                   75
   76   77   78   79   80   81   82   83   84   85   86