SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: W3c validation

  1. #1
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    W3c validation

    Hi there:

    I have been using the W3C validator to validate my xhtml Version 1 Strict pages. They all validate now, except for this one file. The problem seems to be in the doctype declaration, but the markup is exactly the same as all the other validated files. Frustrating! Can anyone tell me what the problem is? I have uploaded the url: www.kaikourahigh.school.nz/general.html
    Jos M

  2. #2
    SitePoint Member
    Join Date
    Aug 2006
    Location
    France
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very strange...

    HTML Validator (Firefox extension) sees no error but the W3C stops on your doctype declaration as you quote it.
    It seems that you use some kind of compression on your source but preserved tabs, what happens if you replace that tab into the declaration with a single space ?
    I wouldn't be surprised it validates...

    Hth

  3. #3
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,840
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    Try checking the "Clean up Markup with HTML Tidy" checkbox then copy and paste the generated output.
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Patche on earning Member of the Month for July 2014

  4. #4
    SitePoint Member
    Join Date
    Apr 2010
    Location
    Charlotte, NC
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The Subject Info page is still using a transitional doctype. Sorry for the info about transitional below, shows me I should take extra reading time when I'm posting early in the A.M.

    Try removing the single space right at the end before the closing tag. It's the only difference I can find between that call and another valid page. The strange thing is the validation is pointing out the error in a weird spot.

    The "attributes construct error" is an XML error if I'm right.

    Actually, they aren't the same Doctype. If I look at the Subject Info page you are using an XHTML Transitional Doctype. However, on the page in question you have a Strict Doctype in there. The code on that page outputs a little weird as well.

    Replace the Doctype on that page with the below and you should be okay:


    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    LinkedIn : VernonK
    Web Development Resources : ChooseDaily.com

  5. #5
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    I'd agree with VernonK regarding the erroneous white-space throwing the validator off the rails it probably expects an exact match hence why it though the error started at 'x' where the differing recommendations are kept, etc.

  6. #6
    SitePoint Member
    Join Date
    Aug 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys. It was really peculiar. I tried your suggestions but they didn't work. However overnight I thought about it. I copied the existing mark-up into a new Notepad++ page and replaced the existing general.html. I uploaded the new general.html, and tried validation. It still picked up the same two errors but further down the page. At that point there was a space problem in the mark-up. I added the space, revalidated and yippee it validated!! This was my first forum thread so thank you - it made me feel less isolated. Jos


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
  •