Forum Moderators: open

Message Too Old, No Replies

Validating a dynamically generated site

Is there anything to help me?

         

grahamstewart

4:43 am on May 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm always keen to validate the html [validator.w3.org] on the sites I create. I find that valid code leads to far less cross-browser problems and odd CSS behaviours.

My problem is how do I validate sites that are dynamically generated?

Currently I just browse through the various pages and on each page I 'View Source' and then save it somewhere so I can validate it.

However this gets very boring very quickly.

Is there anything out there that will allow me to browse through the pages and validate them as I go? Perhaps validating in one frame and displaying the site in the other?

I can't be alone on this one - how does everyone else cope with this?

BlobFisk

10:20 am on May 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What I do is validate the template used to generate the pages dynamically - of course, this all depends on how your pages are being created.

If it's just text and images being dynamically created, I make sure that the template handles the alt and title tags and then validate a couple of pages after they are generated. If your template is good and the sample pages validate, then it is reasonable to assume that your other pages are also compliant.

mattur

10:33 am on May 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use CSE HTML Validator Pro. The Pro version has a batch wizard that will spider a dynamic site, assuming the dynamically pages are linked.

If you want to validate a search results page returned from a form then you could just provide an additional search url eg mysearch?search=widget

grahamstewart

11:13 am on May 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



BlobFisk: unfortunately my site is a bit more complex than that. Its not just a simple template - large parts of content are generated from php and various sections may or may not be there depending on which fields are null in the database.

mattur: yeah there are various forms and sessions to worry about. Both of which affect content. I can't just add query strings to the url though because the forms use the post method and the sessions use session cookies.

What I think I need is a framed validator which validates each page as I visit it and displays the results in a frame. If I can't find one then I might have to write it myself - can't be that hard :)

RonPK

11:20 am on May 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Opera has a built-in keyboard shortcut that sends the page you're viewing to the W3 validator. Ctrl-Alt-v

For Mozilla there is a very handy plugin, called Checky ([checky.mozdev.org ]). It adds lots of validation options to the context menu: just right click on your page and pick your choice. Not only HTML validation at W3.org, but also at the WDG. Includes options for validating CSS (at W3 and WDG), and testing your site for accessibility. Very nice!

grahamstewart

1:42 pm on May 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Cool thats a bit more like it!

I notice that Tantek has a validator favelet [favelets.com] that works on IE too.

Would still be better is it all worked in a frame - maybe I'll write something in the future - but this is cool for now.

mattur

1:45 pm on May 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



gs - the opera shortcut appears to upload the current page source to the validator. Can you confirm this is the case? (ie its not just passing the url?)

RonPK

3:59 pm on May 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mattur - if I may - yes, the Opera shortcut uploads the page from your disks cache.

graham - those favelets look very promising!

g1smd

12:46 am on May 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I added these to the Personal Toolbar Folder in Mozilla:

Validate HTML: javascript:void(window.open('http://validator.w3.org/check?uri='+window.location+'&doctype=HTML+4.01+Transitional&ss='))

Validate CSS: javascript:void(window.open('http://jigsaw.w3.org/css-validator/validator?uri='+window.location+'&warning=1&profile=css2'))

Open the page you want to check then click the link. A new window opens with the validation results.

Above links are preset to HTML 4.01 Transitional; but are easily edited to XHTML or to Detect Automatically.

grahamstewart

12:55 am on May 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



g1smd: yup - thats basically what the favelets do.