HomeSite Help

Tougher validation


We're moving!

This whole site is being moved to a shiny new server - as are all my sites, in fact. Apologies for the bumpy road ahead, but at the end of that road things will become fast and smooth.

Once the site at the new server is ready, this message will automatically disappear!

Meanwhile, you can see how the move is progressing at the status page.

   Home | HTML section | VTML section
On this page:
What happened?
No download
How it works
Here's how
Mailing lists

What happened?

Suppose you write a set of pages with HomeSite 3.0. You've started to use some of the features of HTML 4.0 so you regularly check your code with CSE HTML validator which has support for HTML 4.0 built in. When you're satisfied with your results, and everything checks out, you upload your pages, and run them through an on-line validation service like the W3C HTML Validation Service. To your horror, it reports numerous errors.

What happened? CSE checks against HTML 4.0 doesn't it? Well, no, not exactly. There are two possible reasons why a page that checks out perfectly with the CSE HTML Validator is not really correct HTML 4.0 (or HTML 3.2, if that's what you were trying to use).

The first reason is that CSE does not really parse your page based on a specific DTD like the on-line validation services do. It works instead with a configuration file that defines the rules it checks against. Because of the way this works, it means there are certain types of HTML errors that CSE simply cannot see. I'll write a page explaining this later. But there's nothing you can do to change this.

The second reason is that as it comes out of the electronic box, CSE allows (and checks) all HTML constructs it knows about. That includes various extensions dreamed up by Netscape and Microsoft that are not part of any standard. This page will teach you how to set up CSE so that it will conform much better to a standard and not allow any browser-specific extensions. That will give you a much better chance that your pages can be viewed by your audience as intended.  to menu


No download

So why don't I simply create a tougher configuration file and allow you to download it?

Well, there's a real disadvantage to getting stuck on some else's configuration file. The version of CSE HTML Validator that currently is distributed with HomeSite 3.0 is version 2.50. The maintenance release of HomeSite that's due sometime this month (more likely the end of the month than the originally planned middle of the month) will at least have version 2.51 with it but more likely version 2.52 (already out) or 2.53 (very nearly ready). When I went to the CSE site outside link I noticed there is already a new configuration file available that corresponds with version 2.52. If you start relying on a "tough" configuration file that someone else prepared, based on version whatever, you won't be able to take advantage of any new things (or corrections!) in newer configuration files.

So... I'll outline some basic steps you can take with any version of the configuration file to make it tougher. Don't worry, it's really simple to do. to menu


How it works

First the basic idea: CSE works with categories. As it comes out of the electronic box, all categories are enabled, allowing you to check the syntax of such horrible extensions as Microsoft's MARQUEE tag and Netscape's LAYERs. If you want those (no problem if you're working for a controlled intranet situation) that's fine. If you want to be tough, you don't want to allow such extensions at all.

What you need to do is simply disable all categories that correspond to such extensions. It's really easy, it's easy to reverse if you work on a different site where you suddenly need such things, and easy to do again when you get a new version of the program or of the configuration file (you can normally download the latest from the website, by the way).  to menu


Here's how

Here's how to do it:

  1. Go to the Validator's program directory and save a copy of the file htmlval25.cfg: that's the configuration file. (If you use the version that came bundled with HomeSite it's in the Validator folder under HomeSite's program folder.) This is not really necessary since you won't be deleting or adding anything now, but it's always better to be safe than sorry.
  2. Open the validator program. (Tip: add a shortcut to HomeSite's program group so it's easily accessible.)
  3. Press F5 or choose Settings -> HTML Configuration Editor from the menu.
  4. Now first go to the Notes tab, and read what's there: it gives you basic information about how the categories work, no need for me to repeat it here.
  5. Then go to the Categories tab. You'll see two list boxes, in the left one all available categories, in the right one all active categories. As installed, all categories are active. (You'll see two more on the left: those are the built-in things and they are always active. Anything built-in is enclosed in brackets.)
  6. What you want to do, is make all those categories inactive that allow things you don't want anyway. The categories are named descriptively, so it's pretty easy to recognize what you don't want. What you do want to keep is certainly HTML 2.0 and HTML 3.2 since they're cumulative, and likely HTML 4.0 as well.
    To make CSE "tough" I suggest you deactivate at least the following:
    • LAYER tag
    • Microsoft IE 4.0 Extensions
    • Microsoft IE Extensions
    • Netscape 4.0 Extensions
    • Netscape Extensions
    • Obsolete
    Pretty obvious list isn't it? To make a category inactive you simply press the " <- " button between the two list boxes. This only removes it from the active list but doesn't delete anything, and can easily be undone later.
  7. If you don't use Cold Fusion you can also deactivate the Cold Fusion categories but they won't normally get in the way (unless you make a very unlikely typo).
  8. If you don't want HTML 4.0, deactivate that, too, as well as Element Identifiers, and StyleSheets.
  9. You may want to get rid of Client Side Image Maps and Embedded Objects as well (only if you don't use them, of course!).
  10. Now press Save Config, confirm, and you're set.
  11. Close the program if you want to use it from within HomeSite.  to menu


A few notes:

As stated before, CSE does not validate against a DTD. It checks the syntax of all the tags and allowed attributes and their values for those categories that are active. You will still have to use your common sense interpreting its reports. And if you really want to be sure, even when your page checks out fine with this tougher validation, use one of the on-line validation services outlined on the Validation & Validation page.

Final note: some of you may worry about those tags that were at one time Microsoft or Netscape extensions but are now part of HTML 4.0. You won't be disallowing those by removing the extensions categories: those things are simply defined twice, once as extension, and once as HTML 4.0.  to menu


Mailing lists

This page is based on one of my posts to the new HWG Techniques mailing list. The HTML Writers Guild has a number of interesting mailing lists as well as nice collection of resources on-line. All mailing lists are archived and searchable as well. Basic membership of the HWG is free. More information about the HWG and the mailing lists can be found on the HWG web site outside link .

I'm a member of
HWG Writers Guild outside link

 to menu