CDF Tags for Mobile Channels

Additional tags recognized by Mobile Channels are described in the following table.

Tag Description
CHANSCRIPT Identifies the ID of the script file to render the channel and subchannels.
ITEMSCRIPT Identifies the ID of the script file to render the item data file.
ITEMFORMAT Defines the file structure for data files.

The following list describes each tag in detail:

Type Description
HTML HTML text including markup.
TEXT Same as HTML.
IMG ID of image item in CDF files.
HREF URL to a page, for example, data file and channel script.

A data block is merely a group of values. There is one value per line. Any meaningful data file should have at least one data block. For example, three data blocks might be used to show a portfolio of three stocks. In the following example, the Market mobile channel displays stock values listed in the Stocks.mcd file. The header gives the title and displays the date of the shown stocks. The data to be listed includes the name, the low price, high price, and closing prices of each stock.

<ITEM HREF="http://www.market.com/Stocks.mcs" ID="Stock_S">
   <USAGE VALUE="None">
</ITEM>
. . . 
<CHANNEL ID= "Stock_C">
   <TITLE>Market</TITLE>
   <ITEM HREF="http://www.market.com/Stocks.mcd" ID="Stock_D">
       <USAGE VALUE="MobileChannel"/>
       <ITEMSCRIPT VALUE="Stock_S"/>
       <ITEMFORMAT VALUE ="Title,Date,Picture=IMG;
                          Name,Low,High,Close"/>
   </ITEM>
</CHANNEL>

Here the header block has three values, Title, Date, and Picture, and the data block has four: Name, Low, High, and Close.

IMG indicates the field that represents an image, such as a JPEG or GIF file. The field value is the identifier of the item defining the URL of the image. The built-in item script creates an IMG value to display this item.

The data block may be repeated to build a table of stock prices. If the Stocks.mcd file contains a single data block, the script displays a single stock per page. If it has multiple data blocks, the script could display a table of stocks.

The repeat block can be omitted, as shown in the following example, which is represents a news article with a title, an image, and the body of text:

<ITEMFORMAT VALUE="TITLE, PICTURE=IMG, BODY"/>

The header block can also be omitted, as shown in the following example that represents a page with stock listings. The semi-colon (;) is used to indicate the value list. It is the repeat block and not a header block.

<ITEMFORMAT VALUE ="; Name, Low, High, Close"/>