Johnny's Software Saloon

Weblog where I discuss things that really interest me. Things like Java software development, Ruby, Ruby on Rails, Macintosh software, Cocoa, Eclipse IDE, OOP, content management, XML technologies, CSS and XSLT document styling, artificial intelligence, standard document formats, and cool non-computing technologies.

My Photo
Name:
Location: Germantown, Maryland, United States

I like writing software, listening to music (mostly country and rock but a little of everything), walking around outside, reading (when I have the time), relaxing in front of my TV watching my TiVo, playing with my cat, and riding around in my hybrid gas/electric car.

Monday, March 13, 2006

In pursuit of debugging faulty posts to weblog

Sometimes debugging blog postings can be a nightmare.

This blog of mine her on blogspot.com seems to reject postings when the XML content is not well-formed.

Fair enough.

But would it be possible to get a little explanation of what/where the faults are in the document.

If I could spot the mistake at a glance, I probably would not have made it in the first place.

After getting bit by this problem several times in the past month, I came up with a little procedure that makes it trivial to fix the problem.


  1. I copy the text of my posting to a plain text editor.

  2. I prepend an HTML and a BODY start tag at the beginning, using lowercase, of course.

  3. I append a BODY and HTML end tag at the ending, using lowercase here as well, of course.

  4. I save the document to someplace on my hard drive with a .html extenion.

  5. I open the document the Firefox web browser, which can be used to read files off the local hard disk - they don't have to be on the Web.



I use the free HTML Validator extension for Firefox to point out the errors for me. It tells me what they are, and when I point to one, it highlights that element in the document.

The validator, which has HTML Tidy open source software built into it, makes it very clear what the mistakes are.

I fix them in the text editor, save, and reload the page in the browser. Then I fix any problems that are still left.

Once the errors are gone, I resubmit the post to the browser. Of course, I have to omit the HEAD section and the HTML begin and end tags that I added to make the page palatable to the HTML validator. No sense taunting the beast with extra hardships.

In some ways, I feel like a lot of the so-called web technology is in its infancy.

However, other parts are quite mature and capable. So when hit with a road block like this, sometimes it is better to back up and try to use a different tool. Even if the tool is not specifically designed for solving your particular program, you might be able to coax it into helping you.

That works pretty well in this case.


Technorati Tags Start

Technorati Tags:


Technorati Tags End

0 Comments:

Post a Comment

<< Home

Related pages & news