|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
The <CHANNEL> ElementThe <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.
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 channels content is preloaded in the users cache, but keep in mind that this will add significantly to initial download time, and that may frustrate your users.
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.
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 channels 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 tosuch as giving the channel a title, an abstract, and a logo. The <TITLE> ElementThe 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, youll see how to give your channel an abstracta more detailed statement of whats available to users when they subscribe to your channel. The <ABSTRACT> ElementThe abstract of a paper gives a brief overview of the entire papers 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 channels 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/> ElementThe <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/> tags syntax is <LOGO HREF=url_of_image STYLE=ICON|IMAGE|IMAGE-WIDE/>
|
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. |