home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


The <CHANNEL> Element

The <CHANNEL> element or tag is used to define a channel in a CDF file. <CHANNEL> is a container tag, meaning that it has a companion </CHANNEL>. All content between these two tags defines the properties of the channel. The <CHANNEL> tag can take several attributes, as shown in Table 17.1.

Table 17.1 Attributes of the <CHANNEL> Element

Attribute Purpose

BASE=”url” specifies the base URL of the channel (for use in resolving relative references later in the CDF file)
HREF=”url” denotes the channel’s cover page, a document that prompts the user to subscribe to the channel
LASTMOD=”date” date the channel was last modified
LEVEL=”n” specifies how many levels below the cover page the browser should look when seeking content
PRECACHE=”YES|NO” tells the browser whether to precache the channel content

Of the five attributes in Table 17.1, only HREF is really required. The LEVEL attribute, which controls how many levels deep the channel content goes, is useful for a couple of reasons. For the content provider, it is a means of controlling how much content goes into the channel. For end users, it helps to reduce the amount of time their browsers spend crawling a site looking for updated content. The default value of LEVEL is 0. You can set PRECACHE to YES so that your channel’s content is preloaded in the user’s cache, but keep in mind that this will add significantly to initial download time, and that may frustrate your users.


NOTE:  If you set PRECACHE to NO, Internet Explorer ignores the LEVEL attribute.


NOTE:  If you specify a time in your LASTMOD attribute, it should reflect Universal Coordinated Time (UCT) and not the local time. The offset between the two is handled by the TIMEZONE attribute of the <SCHEDULE> element discussed later in the chapter.

One important thing to note is that <CHANNEL> tags can be nested, which means you can have one <CHANNEL> ... </CHANNEL> pair inside of another. Nesting channels enables you to set up subchannels to your main channel and better organize your content.


CAUTION:  

A nested <CHANNEL> tag should not have an HREF attribute. If you specify a BASE attribute in a nested <CHANNEL> tag, it will override a BASE specified in the parent <CHANNEL> tag.


So far, then, if you are setting up a channel, your CDF file might look as follows:

<CHANNEL HREF=”http://www.server.com/channelz/subscribe.html” LEVEL=4>
...
</CHANNEL>

As you might guess, some work still needs to be done. Specifically, you need to specify the channel’s content and how frequently it gets updated. Before getting into the CDF elements that handle those duties, however, a few other channel housekeeping chores should be tended to—such as giving the channel a title, an abstract, and a logo.

The <TITLE> Element

The CDF <TITLE> tag is much like the corresponding tag in HTML. It is a container tag used to specify the title of the channel. The same as in HTML documents, the title should be sufficiently descriptive without exceeding 40 characters or so. Longer titles are cut off when displayed on the Internet Explorer title bar.

After you give your developing channel a title, the corresponding CDF code will look as follows:

<CHANNEL HREF=”http://www.server.com/channelz/subscribe.html” LEVEL=4>
  <TITLE>Channel Z</TITLE>
...
</CHANNEL>

<TITLE> takes the XML-SPACE attribute, which controls how whitespace is handled and can be set to “DEFAULT” or “PRESERVE.” The DEFAULT value tells the browser to ignore any extra white- space, and PRESERVE means that all whitespace characters should be retained.

Next, you’ll see how to give your channel an abstract—a more detailed statement of what’s available to users when they subscribe to your channel.

The <ABSTRACT> Element

The abstract of a paper gives a brief overview of the entire paper’s content, and a channel abstract does the same thing for a Webcasting channel. The <ABSTRACT> tag is a container tag that contains a statement describing the nature of your channel’s content. You can be a little more descriptive here than you were in the title, but you should still keep your abstract brief because this is the text that appears in the pop-up box when users hold their mouse pointers over the icon for your channel. These pop-up boxes can accommodate only around 100 characters before cutting off the message or becoming too cumbersome to read.

When updating your CDF code to include a title, you might have something like the following:

<CHANNEL HREF=”http://www.server.com/channelz/subscribe.html” LEVEL=4>
   <TITLE>Channel Z</TITLE>
   <ABSTRACT>Welcome to Channel Z, your Internet movie site.</ABSTRACT>
...
</CHANNEL>

<ABSTRACT> can also take the XML-SPACE attribute. The values and meanings of XML-SPACE are the same for the <ABSTRACT> element as they are for the <TITLE> element.

The last housekeeping item to deal with before giving the channel some content and an update schedule is to provide a logo that Internet Explorer can use when displaying the channel on the Channel Bar.

The <LOGO/> Element

The <LOGO/> tag is a standalone tag that tells Internet Explorer where it can find an image file containing the logo for your site. The <LOGO/> tag’s syntax is

<LOGO HREF=”url_of_image “ STYLE=”ICON|IMAGE|IMAGE-WIDE”/>


NOTE:  The additional slash (/) you see in the <LOGO/> tag above is not a typo. It is part of the XML syntax for empty elements.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.