Mobile Channels recognizes several tags and attributes that may appear in standard CDF files. These Mobile Channels extensions are described in the following table.
Tag/Attribute | Description |
CHANNEL | Defines a channel or subchannel. For Mobile Channels, the CHANNEL tag requires the SELF attribute be filled. Also, the CHANNEL element may take a USAGE tag specifying either of the two new USAGE values. |
ID | A short string identifier for the CHANNEL, ITEM, and LOGO elements. |
USAGE | Indicates how an ITEM element should be used. The USAGE tag is required for the top-level CHANNEL element of a Mobile Desktop Component. USAGE has two new values for Mobile Channels. |
DEFAULTPREF | A Boolean operator indicating the suggested preference setting for a CHANNEL element. It can be “On” or “Off.” The default, if not specified, is “On.” |
Each tag or attribute is discussed in detail in the following list:
For Mobile Channels, the top-level CHANNEL element uses the path to the CDF in the HREF and SELF attributes. The HREF attribute references the CDF path using MCTP. The SELF attribute references the CDF path using the standard HTTP prefix. Unlike the Internet Explorer 4.0 implementation, the SELF attribute is required in the top-level CHANNEL element.
The HREF attribute uses the MCTP prefix to identify the CDF file as a mobile channel. This results in special processing when referenced using Internet Explorer 4.0, where the mobile channel is registered for synchronization to the Windows CE-based device. Unlike the HREF attribute under Internet Explorer 4.0, in a mobile channel, the URL does not directly indicate the page to render. Rather, it references the top-level channel as specified by the CDF file. The appropriate CHANSCRIPT tag determines which HTML page is displayed first, or which script is used to render the top-level page of the channel.
The implementation of the BASE attribute is the same in Mobile Channels and Active Channels in Internet Explorer 4.0. The following code example shows that the attribute’s URL is an HTTP URL.
<CHANNEL HREF="mctp://www.microsoft.com/test.cdf" ID="test"
BASE = "http://www.microsoft.com/test/"
SELF = "http://www.microsoft.com/test.cdf" />
<ITEM HREF="START.MCS" ID="Start"/>
<CHANSCRIPT VALUE="Start"/>
...
</CHANNEL>
In this code example, the CHANSCRIPT tag specifies the starting page or script by referencing the ID tag of the script that is defined in the ITEM tag. The Start.mcs file is a Mobile Channels script that defines how to display the topmost page of the channel.
In the mobile channel CDF file, the HREF for the CHANNEL tag is the only one that has an MCTP-style URL. All other HREF values begin with HTTP.
For Mobile Channels, an ID tag is a text string that identifies a specified element. An ID tag must be provided for all CHANNEL, and ITEM elements, and optionally for LOGO elements, in a mobile channel.
ID="ChanId"
ID="ItemId"
ID="LogoId"
An ID tag is used for short references of a mobile channel element both within a CDF and within scripts. Within the CDF, the ID tag is used as a value for both CHANSCRIPT and ITEMSCRIPT tags to refer to the associated ITEM tag that represents the script file.
Within a script, the ID tag is used, along with the MCTP syntax, to form unique URLs in the Mobile Channels namespace. The ID tag is used in the MCTP transport to uniquely reference a channel or item. MCTP references are of the form “mctp://CDFid/ChanID” for a channel or “mctp://CDFid/ItemID” for an item.
In a CDF file, the ID tag of the top-level channel is used as a handle to the channel. The maximum length of the ID string is 64 characters. To conserve network bandwidth and storage space, use a unique handle between 6 and 10 characters long for the top-level ID. The following code examples show how to define ID strings.
<CHANNEL ID="Sports" >
<ITEM HREF="http://www.microsoft.com/test/sports/article001.mcd"
ID="Art1" >
<LOGO HREF="http://www.microsoft.com/test/sports/sportslogo.gif"
STYLE="IMAGE"
ID="L_Sports" >
The ID tag is required for each parent element and can be of a single occurrence. There are no applicable child elements for this tag.
For Mobile Channels, the following two new USAGE values are described:
The statement
<USAGE VALUE="MobileChannel"/>
specifies the channel as a mobile channel, or an item as a special Mobile Channels data item. The top-level channel should be given a USAGE value of “MobileChannel.” When the USAGE value is set to “MobileChannel,” Mobile Channels items are seen on Channel Explorer on the device, but not on the Channel Bar of Internet Explorer 4.0. This feature makes it possible to properly display the items as the special MCD files on the device and to ignore them in Internet Explorer 4.0. For example,
<ITEM HREF="http://www.microsoft.com/test1.mcd" ID="T1">
<USAGE VALUE="MobileChannel"/>
</ITEM>
<ITEM HREF="http://www.microsoft.com/test2.mcs" ID="T2">
<USAGE VALUE="None"/>
</ITEM>
Item T1 is a Mobile Channels data item and is seen in the Channel Explorer feature on the device, but not by Internet Explorer 4.0 on the desktop computer. Item T2 is a Mobile Channels script and is not recognized by either Internet Explorer 4.0 or the Channel Explorer on the device. The USAGE tag has no applicable child element.
To save storage space, use the statement
<USAGE VALUE=""/>
instead of its equivalent,
<USAGE VALUE="None"/>
The statement
<USAGE VALUE="MobileDesktopComponent"/>
specifies the channel as a Mobile Channels Desktop Component. On a Windows CE-based device, only use this valve when making the channel available as a component for the device’s Active Desktop, as in the following code example.
<CHANNEL HREF="http://www.mydomain.com/myChannel.cdf">
<USAGE VALUE="MobileDesktopComponent"/>
</CHANNEL>
The channel, as specified by “myChannel.cdf,” can be registered as a component for the device’s Active Desktop.
There can be only one occurrence of this value in a specified desktop component CDF file. There are no applicable child elements.
The DEFAULTPREF tag is used as follows:
<CHANNEL ID="ChanId">
<DEFAULTPREF VALUE="ON"|"OFF"/>
</CHANNEL>
The tag marks a subchannel with specific default preferences. You can use this attribute to control which subchannels a user receives content for by default. For example, when a new channel is synchronized to a Windows CE-based device, items within subchannels marked with the attribute DEFAULTPREF VALUE=“OFF” are not transferred.
This process enables you to create a channel that offers more content than can reasonably be accommodated by the limited storage resources available on a Windows CE-based device, and yet does not overwhelm the device with all of this content. The DEFAULTPREF setting is applied only when the channel is first synchronized to the device. After this, users can change their preferences to include more or less content than the DEFAULTPREF settings allow.
The DEFAULTPREF tag can have values of either “ON” or “OFF.” If DEFAULTPREF attribute is not specified, the Windows CE-based device treats the subchannel as if it were marked with DEFAULTPREF VALUE=“ON.”
For example:
<CHANNEL ID="SubChan1">
<DEFAULTPREF VALUE="OFF"/>
…
</CHANNEL>
The DefaultPref tag should appear only once in a CHANNEL element.
Note Not all the standard Internet Explorer 4.0 tags, such as the Software Update Channel tags, are supported in Mobile Channels. In addition, the Mobile Channels parser ignores the LOGIN tag. Also, while the EARLIESTTIME, INTERVALTIME, and LASTTIME tags are ignored on the device, they are supported on the desktop computer and used by Internet Explorer 4.0 to download updates for the channel from the Web.