OS/2 eZine - http://www.os2ezine.com
Spacer
December 16, 2004
 
AL du Pisani is a South African, working at a large financial institution, where he looks after their Lotus Notes environment. He has been using computers off and an for the past twenty years. His first exposure to OS/2 was with 2.11. It is still the preferred environment, and is what he runs at home. He is also a fan of Science Fiction.
If you have a comment about the content of this article, please feel free to vent in the OS/2 e-Zine discussion forums.

There is also a Printer Friendly version of this page.



Spacer
Previous Article
Home
Next Article


WarpFX


Case Study: Redeveloping a web site with PPWizard (Part 6): Validation

In the previous part of this case study, I dealt with the CSS2 style sheet, seperating the display of information from the underlying data.

In this article I will look at validating your HTML pages and style sheet. I will also comment on problems I experienced in implementing the new site.


The HTML Validator

Of the services supplied by the World Wide Web Consortium at their web site, are an HTML validator and a CSS2 validator.

Unfortunately, these validators are not supplied as stand alone programs you can download, and you have to be connected to the Internet to use them. (It is possible to get these validators in source code form, but I do not have Perl installed for the HTML validator, and I have not been able to get the JAVA source code from their CVS site for the CSS2 validator.)

An alternative is to download HTML Tidy from Hobbes, and validate your HTML code that way. In my case, although it was helpful in finding typos and some style errors, it did not really work for me. The cleaning up and pretty printing of the HTML pages which is HTML Tidy's main function also did not work for me.

The W3C's validator allows you to upload your development HTML pages one at a time, and it will check them for you. If your page pass the validation, it will supply you with an image and some code to load on your pages, stating that your page is standards compliant. This standard can be HTML 4.01 or XHTML. (And probably XML, too.)

It is a very good idea to validate your page. As I mentioned, it caught typos and spelling mistakes. It caught incorrectly formatted HTML tags. And it caught extra and orphan elements.

Some of these elements were not showing up as incorrect, where I was testing them locally. I do not believe I would have caught them on my own. In fact, in a couple of places I had to go on an extended hunt to find out where the problem was. This is especially true of spelling mistakes, because you keep on reading what you intended to write, and not what you have written.

The CSS2 Validator

As with the HTML validator, so with the CSS2 validator. I picked up spelling mistakes and malformed definitions.

But, and here is the limitation of both of the validators, all that a validator can catch is that you have valid code. Making sure that you have correct code is left as an excecise for the programmer.

Even so I would recommend that you validate your pages before going live with your newly redeveloped website.

Implementing the Web site

Once I have tested and validated the site, I replaced the previous version with the new web site.

There were one or two other small changes I made at the same time, resulting in some downtime lasting a couple of days.

At this time I finally tried to read the site with Microsoft's Internet Explorer 6 browser. I was shocked to find that I could not read the site at all with the Microsoft browser.

I then went on an extended search to try and find out what I did wrong. After looking in a bunch of wrong places, I finally found the problem:

Originally, when reading the HTML 4.01 standard, I misread the chapter on the IMG tag, reading that it is deprecated in favour of the OBJECT tag. So all my development used an implementation of the OBJECT tag to display all images. At a later stage, rereading the chapter, I found out my mistake, but since it was working fine for me, I did not change anything.

Using the OBJECT tag to display images worked fine in Mozilla, and according to a club member, in Konqueror. Under Internet Explorer, it did not work at all in tables with CSS2 attributes, and badly in tables without CSS2 attributes.

Once I changed all OBJECT tags to IMG tags, it worked perfectly.

The moral of the story? Test with more than one browser. Things that work fine on one will not work at all on the next.

Other problems encountered

If you use the #import directive to read data into a table, and in the data you are busy importing there are some PPWizard definitions, PPWizard will not automatically replace the definitions with the wanted values. You need to make use of the #autotag PPWizard directive to do these changes. Since this occurred on a page still in flux, where I might still change the way I am doing things, I have not gone into more effort in figuring out why it is not working the way I want it to.

In conclusion

In this series of 6 articles I looked at some of my experiences in redeveloping a web site with PPWizard.

I think that what I have been doing is workwhile, and is much happier with the process to generate the web site.

I have not gone into detail on all of my pages, since the samples I have provided are good examples of the type of coding I had to do. I have concentrated on the problems I ran into, and the solutions, where I have found it.

My biggest problems have been with documentation: Where I have not been able to figure out how to do, what I wanted to do. To a greater or lesser extent, this have been true of the HTML 4.01 standard, the CSS2 standard, and the PPWizard documentation.

Previous Article
Home
Next Article

Copyright (C) 2004. All Rights Reserved.