|
|
|
|
|
|
|
|
|
|
Create your own Windows CE Mobile Channel (continued)
One final note before we look at the actual CDF structure: like with regular HTML, all channel tags start with "<" and end with ">".
The version line
All channels start off with:
This specifies that XML (eXtensible Markup Language) is the language of the channel.
The CHANNEL CDF tag
Next, you'll need to describe the channel itself. Following the paragraph is the channel tag code for my page. After you see it, I'll explain what it all means.
The line containing "HREF=" defines the location of my channel on the Internet with it's full path. If you look carefully, you'll see a strange URL descriptor (not the usual "http" we've all come to love). The "mctp:" URL descriptor is used to tell the browser it's using the mobile channel protocol. The "www.palmpc.org.uk" location is my Web site and the string "/channels/cpchannel.cdf" means my CPCHANNEL.CDF file is in a folder (or directory) called "/channels".
The BASE command is used to tell the Mobile Channel where all the files are located. Once a BASE command is written, rather than using a full path, all you'll need is to describe where a file is relative to the folder described in the BASE command. When I refer to a graphics file CPCHANHEAD.GIF a little bit further on in my channel definition file I don't have to enter its full path as it will look for the files in the BASE folder. This has the advantage of making the CDF file smaller and a bit easier to code.
Each channel needs to have its own unique ID. I called mine "cpchannel" for "Craig Peacock's Channel". The string "cpchannel" is the unique ID of my channel. It must be unique and everyone should ensure they name their channels something that is unique to them. It is not possible to have channels with the same ID on the same device.
It is very important that you give this a unique name. When creating your channel don't just give it the name "cpchannel.cdf". If you are going to offer several channels make sure the filenames below are different as well.
The SELF CDF tag
The SELF CDF tag gives the actual name of the actual CDF file. Because it's describing itself, it's called SELF:
TITLE and ABSTRACT CDF tags
The TITLE and ABSTRACT tags are used to describe the name of your page and what it's about. These are displayed on the handheld device. Don't use a long abstract description since it'll fill up the small screen on a Palm-sized PC. Take a look at Figure C to see what I mean.
FIGURE C
Here's an example of a bad use of channel names. Click picture for a larger image.
The TITLE and ABSTRACT tags are quite simple. Begin with <TITLE> and <ABSTRACT>, follow with your title and abstract, respectively, and then end with </TITLE> and </ABSTRACT>. Here's how mine looks:
<TITLE>www.palmpc.org.uk - Mobile Channel</TITLE>
<ABSTRACT>lots of information about Palm-sized PC's. </ABSTRACT>
|
[ Prev | Next ]
|
|
|
|
|
|
-- Advertisement --
BLOGGING AND PODCASTING WITH ONE EASY-TO-USE TOOL
Now you can publish your thoughts, opinions, and comments in your own blog or podcast.<p />
- Supports multiple authors and multiple blogs or podcasts.
- Generate and publish RSS feeds for iTunes and other directories.
- Post photos, images or animations.
- Get feedback and have conversations with visitors to your site. <p />
Personalize your blog or podcast with your own unique domain name — or integrate it with your existing site by setting it up as a subdomain.
Tap here and get blogging or podcasting within minutes. |
-- Advertisement --
Safeguard Send Add-In for Outlook
Avoid mistakes when sending emails - our Outlook add-in tool automatically checks to make sure that replies are going to the right people, confidential information is not being sent to the wrong people, and more.
See this and our complete list of 37 other powerful add-ins at our Web site. |
|
|
|
|
|
|
|
|