SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Evangelist jkh1978's Avatar
    Join Date
    May 2001
    Location
    Northern Virginia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php pages and xhtml testing

    I want to run my site through a testing procedure to make sure I follow XHTML standards. My pages though are not static, they are php. I could run the output of the php through a tester, but that doesnt test all the possible ways the php script may be viewed. Any suggestions on what tools I should use (free is better).

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jkh1978
    I want to run my site through a testing procedure to make sure I follow XHTML standards. My pages though are not static, they are php. I could run the output of the php through a tester, but that doesnt test all the possible ways the php script may be viewed. Any suggestions on what tools I should use (free is better).
    Why dont you just parse your site with phps xml parsing functions? Whilst capturing the output with ob_start() . Just remember to include the entity   as this is not a recognised entity in xml.

    If the parser fails, just capture it and forward you an email:P of the details.

  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    If your pages are live on the internet, then send the validator to your URL rather than uploading a file. If not, then copy the generated source (view your page and click "View -> Source" in your browser's menu) into a blank file, save it with a .html extension, and upload that .html file to the validator.

    Hope this helps!

  4. #4
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think what he means is, because his pages are dynamic, there might be a million combinations (depending on user choices etc) of how his pages could be viewed (but he doesn't have said million .html pages nor would he want to create said million pages manually and use the W3). I guess he's looking for some kind of robot/spider validating machine....
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  5. #5
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by weirdbeardmt
    I think what he means is, because his pages are dynamic, there might be a million combinations (depending on user choices etc) of how his pages could be viewed (but he doesn't have said million .html pages nor would he want to create said million pages manually and use the W3). I guess he's looking for some kind of robot/spider validating machine....
    I built a spider in dot net the other day, perhaps you want to alter it so it does do all your validation?

    Ie, it fetchs the w3.orgs validator with your url and the spider searchs for the response "valid", if it returns an error of some form from w3.org it, logs("for you to check") it and moves onto the next one.

    Just a warning, this spider may crash your computer "It uses threading as soon as it hits a url it downloads an image, and it tends to overload my pc when it reachs about 100,000k"

  6. #6
    SitePoint Evangelist jkh1978's Avatar
    Join Date
    May 2001
    Location
    Northern Virginia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by weirdbeardmt
    I think what he means is, because his pages are dynamic, there might be a million combinations (depending on user choices etc) of how his pages could be viewed (but he doesn't have said million .html pages nor would he want to create said million pages manually and use the W3). I guess he's looking for some kind of robot/spider validating machine....
    Thats what I want, and thats the problem I need to solve.

  7. #7
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you made your forms (i'm assuming you're talking about your personal homepage from your profile) use GET rather than POST, you'll be able to validate those urls. as it stands, by using POST, you always end up at, say, /gallery/
    does that make sense ?

    (p.s. engagement pic 23.jpg scares me... j/k)
    redux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  8. #8
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by redux
    if you made your forms (i'm assuming you're talking about your personal homepage from your profile) use GET rather than POST, you'll be able to validate those urls. as it stands, by using POST, you always end up at, say, /gallery/
    does that make sense ?

    (p.s. engagement pic 23.jpg scares me... [img]images/smilies/wink.gif[/img] j/k)
    But you still actually have to go through each and every possibility of the URL... which'd be a nightmare if you have lots of possibilities...
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  9. #9
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, if you're reasonably confident of your coding, you probably don't need to test each and every possibility for validity. In fact, if everyone started testing every page they made or scripts created, I'd guess that'd bring down the valuator pretty quickly.

    I guess you'd be pretty safe to test the template (& assuming that most of the dynamics are swapping out text rather than completely reformatting the page--if it is completely reformatting the page, there may be a better way to code the backend?) you should be fine for the most part. It's not like you need a badge on every page (most don't even know what it means or care), or that God will strike you down if one of your pages fails to validate* 'cause of some unforeseen circumstance. :-)

    ~~Ian

    * Don't tell people I said that. ;-)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •