The CDF file is the heart of a channel. It allows you to control many aspects of the channel’s content and behavior. Right now, you create a CDF file manually, but tools from Microsoft (the next versions of both FrontPage™ and Visual InterDev™ will support CDF) and third parties already allow you to integrate the CDF file into your channel automatically.

CDF File Structure
CDF File Tags Explained
Screen Savers and Active Desktop Components
Pre-caching

© 1997 Microsoft Corporation. All rights reserved. Terms of use.


The CDF file uses tags that are similar to HTML, as you can see in the sample source code for a CDF file. However, the tags are specific to CDF, which has been proposed to the W3C. CDF is based on XML (Extensible Markup Language), a language defined by the W3C XML specification. You'll find the latest specification for CDF on Microsoft's Web site at http://www.microsoft.com/standards/cdf.htm.

The Channel Definition Format provides detailed control over your channel. The full specification is available online at http://www.microsoft.com/standards/cdf.htm. The CDF allows you to specify many characteristics for channels, sub-channels, and items (shows, programs, articles, pages, videos, etc.). The high-level elements are shown below; click on each one to see what it is used for in the CDF file.

Descriptions: <CHANNEL> <ITEM> <TITLE> <ABSTRACT> <USAGE> <LOGO> <HTTP-EQUIV> <LOGIN> <LOG> <LOGTARGET> <PURGETIME> <SCHEDULE> <EARLIESTTIME> <INTERVALTIME> <LATESTTIME>

You can specify URLs for screen savers and Active Desktop components in the CDF file. They will be invoked or installed by the Active Desktop automatically. Here is how you would specify a screen saver in a CDF file:

<Item HREF="http://myhost.com/scrnsvr.html">
  <TITLE>Neutrino Detection Simplified</TITLE>
  <ABSTRACT>View the complete plans for a backyard neutrino detector that costs 
    less than a round trip to Mars.</ABSTRACT>
  <USAGE VALUE="ScreenSaver" />
</Item>

Here is how you would specify a desktop component in a CDF file:

<Item HREF="http://myhost.com/mycompnt.htm">
  <TITLE>Random Particle Reflections</TITLE>
  <ABSTRACT>Get up-to-the-minute data on particle scattering at the 
    Denver Neutrino Detector</ABSTRACT>
  <USAGE VALUE="DesktopComponent" />
</Item>

One of the most important features of the CDF file is the ability to specify pre-caching of content. By setting PRECACHE to YES, an item will be loaded to the cache while a visitor views your other content. When the pre-cached item is requested, it displays immediately from the cache.

<Item HREF="http://myhost.com/bigshow.html" Precache="YES">
  <TITLE>Baryons and the Fate of Nations</TITLE>
  <ABSTRACT>Learn how proton decay affects the long-term stability of government.</ABSTRACT>
</Item>
<?XML version="1.0"?>
<Channel HREF="http://www.foosports.com/foosports.htm" >
    <SELF="http://www.foosports.com/channels/ch1.cdf">
    <Title>FooSports</Title>
    <Abstract>The latest in sports and atheletics from FooSports</Abstract>
    <Schedule EndDate="1994.11.05">
    <IntervalTime DAY="1" />
    <EarliestTime HOUR="12" />
      <LatestTime HOUR="18" />
    </Schedule>
    <Item HREF="http://www.foosports.com/animations/scrnsvr.html">
       <Usage VALUE="ScreenSaver"></Usage>
    </Item>
    <Item HREF="http://www.foosports.com/ticker.html" LastMod="1994.11.05T08:15-0500">
       <Title>FooSports News Ticker</Title>
       <Abstract>The latest sports headlines from FooSports</Abstract>
       <Usage VALUE="DesktopComponent">
         <Width VALUE="400" />
         <Height VALUE="80" />
       </Usage>
    </Item>
    <LogTarget HREF="http://www.foosports.com/tracking" Method="POST" SCOPE="OFFLINE" >
       <PurgeTime HOUR="12"  />
       <HTTP-EQUIV NAME="encoding-type" VALUE="gzip" />
    </LogTarget>
</Channel>
<CHANNEL> Defines a channel. Contains <ITEM> and other tags that determine channel content, behavior, update schedule, etc.
  Sample source code (portions omitted to show overall structure):
<CHANNEL BASE=”http://www.microsoft.com” 
    HREF=”http://www.microsoft.com/default.htm” 
    SELF=” http://www.microsoft.com/main.cdf”>
  <TITLE>The Proton Channel</TITLE>
  <ABSTRACT>Learn more than you ever wanted to know about nucleonics and 
    proton physics.</ABSTRACT>
  <ITEM HREF=”baryons/default.htm” LASTMOD=”1997.05.23” PRECACHE="YES">
  ...
  </ITEM>
  <ITEM HREF=”leptons/default.htm” LASTMOD=”1997.05.23” PRECACHE="YES">
  ...
  </ITEM>
</CHANNEL>
<ITEM> A program or Web page that is part of a channel. Can contain <TITLE>, <ABSTRACT>, and other tags.
  Sample source code:
<ITEM HREF=”baryons/proton.htm” LASTMOD=”1997.04.14” PRECACHE="YES" >
  <TITLE>Locating the Proton Stochastically.</TITLE>
  <ABSTRACT>Find out how to build your own backyard 2.3Gev syncrotron.</ABSTRACT>
  <LOGO HREF=”images/proton.ico” STYLE="ICON" />
  <USAGE VALUE=”Channel” />
</ITEM>

<TITLE>The title of a channel or item.
  Sample source code:
<TITLE>The text of your title goes here.</TITLE>
<ABSTRACT> An extended description of a channel or item.
  Sample source code:
<ABSTRACT>The abstract provides a more detailed description of 
your content than a title does.</ABSTRACT>
<USAGE> Defines how an ITEM is used: Desktop component, channel, screen saver, etc.
  Sample source code (two common types shown here):
<USAGE VALUE=”DesktopComponent” />
<USAGE VALUE=”ScreenSaver” />
<LOGO> An icon or image associated with a channel or item.
  Sample source code:
<LOGO HREF=”images/quark.gif” STYLE=”IMAGE” />
<HTTP-EQUIV> Used when sending/receiving HTTP headers.
  Sample source code:
<HTTP-EQIV NAME=”HeaderParam” VALUE=”ParamTextValue” />
<LOGIN> Used for authenticating users when retrieving channel content from a specified domain.
  Sample source code:
<LOGIN METHOD=”BASIC” PASS=”threeq” USER=”bohr” />
<LOG> Specifies that the channel or item is to be recorded in the client log. The only type of entry currently supported is document.view
  Sample source code:
<LOG VALUE=”document:view” />
<LOGTARGET> Defines client log characteristics and where the client log is sent. You can include all user activity in the log, or just offline or online activity.
  Sample source code:
<LOGTARGET HREF=”http:/www.microsoft.com/logs” METHOD=”POST” SCOPE=”OFFLINE”>
  <HTTP-EQIV NAME=”encoding-type” VALUE=”zip” />
  <PURGETIME DAY=”2” HOUR=”12” />
</LOGTARGET>

<PURGETIME> Defines how often the client log is sent to the log target.
  Sample source code:
<PURGETIME DAY=”2” HOUR=”” />
<SCHEDULE> Defines a schedule for updating channel or item content. Specifies a start date and end date for the schedule, and contains the <INTERVALTIME>, <EARLIESTTIME>, and <LATESTTIME> tags.
  Sample source code:
<SCHEDULE STARTDATE=”1997.07.01” ENDDATE=”1997.07.31”>
  <INTERVALTIME DAY=”1” />
  <EARLIESTTIME HOUR=”12” />
  <LATESTTIME HOUR=”18” />
</SCHEDULE>

<EARLIESTTIME> The earliest time during the interval time when an update to the channel can occur. Uses <DAY>, <HOUR>, and <MIN> parameters which are totaled to derive the interval time.
  Sample source code:
<EARLIESTTIME HOUR=”12” />
<INTERVALTIME> The update frequency. Uses <DAY>, <HOUR>, and <MIN> parameters which are totaled to derive the interval time.
  Sample source code:
<INTERVALTIME DAY=”1” />
<LATESTTIME> The latest time during the interval time when an update to the channel can occur. Uses <DAY>, <HOUR>, and <MIN> parameters which are totaled to derive the interval time.
  Sample source code:
<LATESTTIME HOUR=”18” />