SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A valid page turns in valid thanks to string within and outbound link

    Hi everyone
    I have an odd problem.
    I build my pages and try and make sure they are valid, and always check at w3c.
    What I have noticed is that a few of my pages have links within the content to other documents and the link string inside the <a href.. tag has characters or words that make the page not validate any more.
    example:
    my declaration at the top of the page:

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    and within the page I have a link to an external source, but the string is long and when I try to validate the page (with the link included) the page turns invalid with errors in the string of characters in the link.

    Example link:
    http://portal.hud.gov/portal/page?_p..._schema=PORTAL
    (this is inside a regular <a href.. tag)

    if I comment out the link , so that the words within my content are no longer linked but regular text instead the page is valid.
    if they are an active link pointing to that address the page doesnt validate anymore.

    samples of the same page where everything is the same except the link active/ inacvtive as I described.
    The page that validates is here
    its valid and link is removed

    The linked words (summary of the negatives) are under the paragraph starting with: The Negatives of the H4H

    Does anyone know what I could here to keep the link but also have the page validate?

    thanks in advance

    Sami
    Last edited by sambkk; Nov 7, 2008 at 07:09. Reason: removed link

  2. #2
    SitePoint Evangelist
    Join Date
    Aug 2007
    Posts
    566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Write the link correctly then.
    What the validator tells you is that in the sequence
    Code:
    http://portal.hud.gov/portal/page?_pageid=73,7601299&_dad=portal&_schema=PORTAL
    the entyties &_dad and &_schema are not recognized, which is normal.
    If you want a litteral ampersand in your final page, you must use the &amp; entity
    Code:
    http://portal.hud.gov/portal/page?_pageid=73,7601299&amp;_dad=portal&amp;_schema=PORTAL

  3. #3
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks tripy
    sometimes the solution is the most obvious
    I'll definately give it a go

    sami

  4. #4
    SitePoint Evangelist
    Join Date
    Aug 2007
    Posts
    566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problems.
    It is often unknown by many webdevs, although it's obvious, if you give it a thought

  5. #5
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    btw anyone reading this thread, since i fixed the problem, thanks to the help I got,
    I removed the non valid file and so the link doesnt work anymore


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
  •