Mobile Channels recognizes several attributes and attribute values that may appear in standard CDF tags. These tags are described in the following table.
Attribute | Description |
---|---|
ID | A short string identifier for the CHANNEL, ITEM, and LOGO elements. |
DEFAULTPREF | A Boolean operator indicating the suggested preference setting for a CHANNEL element. It can be On or Off. |
USAGE | New usage values for Mobile Channels are MobileChannel and MobileDesktopComponent. |
CHANNEL | CHANNEL element may take a USAGE tag specifying either of the two new USAGE values defined previously. It is required for the top-level CHANNEL element of a Mobile Desktop Component. |
Each tag or attribute is discussed in detail in the following list:
An ID tag is a text string used as an attribute to identify the specified element. An ID tag must be provided for all CHANNEL, ITEM, and LOGO elements in a mobile channel.
ID = "ChanId"
ID = "ItemId"
ID = "LogoId"
An ID tag is used for short and quick 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.
Keep the string length of an ID tag to the minimum necessary to uniquely define it within the CDF over time. Keeping the ID string length to the minimum is important to conserve network bandwidth and storage space.
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, but a handle of between 6 and 10 characters is recommended for the top-level ID to be unique. The following are three CDF examples that define IDs.
<CHANNEL ID = "Sports" >
<ITEM HREF = "www.microsoft.com/test/sports/article001.mcd"
ID = "Art1" >
<LOGO HREF = "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 the USAGE tag, Mobile Channels defines the following two new values:
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 will be seen on Channel Explorer on the device but not on the channel bar on IE4. This feature makes it possible to properly display the items as the special Mobile Channels Data (MCD) files on the device and to ignore them in IE4. 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 will be seen in the Channel Explorer feature on the device, but not by IE4 on the desktop computer. Item T2 is a Mobile Channels script and will not be seen by either IE4 or the Channel Explorer on the device. The USAGE tag has no applicable child element.
Note that the statement
<USAGE VALUE=""/>
is equivalent to
<USAGE VALUE="None"/>
The former is recommended because it helps to save storage space on the device.
The statement
<USAGE VALUE = "MobileDesktopComponent"/>
specifies the channel as a Mobile Channels desktop component. This is used strictly on a Windows CE-based device to make the channel available as a component for the Windows CE Active Desktop. For 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 Windows CE Active Desktop.
There can be only one occurrence of this usage value in a given desktop component CDF file. And there are no applicable child elements.
The DEFAULTPREF tag can be 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 what subchannels a user receives content for by default. By default, when a new channel is synchronized to a Windows CE-based device, items within subchannels marked with the attribute DEFAULTPREF = "OFF" are not transferred.
This mechanism allows 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 no, by default, 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, the user can change his or her 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 = "ON."
For example:
<CHANNEL ID="SubChan1">
<DEFAULTPREF VALUE="OFF"/>
...
</CHANNEL>
The DefaultPref tag can appear only once in a CHANNEL element.