Resolving WC3 errors.

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
Guest

Resolving WC3 errors.

Post by Guest »

Script URL: http://clubsouthampton.port5.com
Version of script: latest
Version of PHP: 4
Hosting company: portland
Have you searched THIS FORUM for your problem:
(if not please do before posting)
If so, what terms did you try:

Write your message below:

Please can you tell me how l resolve these WC3 errors as l am trying to validate the pages:
=============================
Below are the results of attempting to parse this document with an SGML parser.

1.

Line 9, column 2: "DOCTYPE" declaration not allowed in instance

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml10/


2.

Line 10, column 15: there is no attribute "XML:LANG"

<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.


3.

Line 10, column 26: there is no attribute "XMLNS"

<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">


4.

Line 10, column 56: document type does not allow element "HTML" here

<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).


5.

Line 21, column 246: document type does not allow element "META" here

...ooking friendship uk,social clubs UK">


6.

Line 22, column 130: document type does not allow element "META" here

...widen there social life and have fun">


7.

Line 23, column 42: document type does not allow element "META" here

<meta name="robots" content="index,follow"/>


8.

Line 25, column 86: document type does not allow element "LINK" here

...//www.clubsouthampton.com/screen.css"/>


9.

Line 26, column 6: end tag for element "HEAD" which is not open

</head>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occured in a script section of your document, you should probably read this FAQ entry.


10.

Line 27, column 5: document type does not allow element "BODY" here

<body>


11.

Line 51, column 117: required attribute "ALT" not specified

...dth="139" height="93" align="middle" /></p>

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.


12.

Line 55, column 88: required attribute "ALT" not specified

...gbook1.jpg" width="109" height="164" /></p>


13.

Line 62, column 11: there is no attribute "ALGIN"

<div algin="center">


14.

Line 64, column 3: end tag for element "P" which is not open

</p>
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

This is a problem with your header.txt file - open it and delete all code from the beginning to including <body> (delete <body> too) from header.txt

I'm not sure if you will get any other errors then as your header is XHTML and code in GBook is HTML.

More on XHTML:
http://www.w3schools.com/xhtml/default.asp

Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Fruity

just

Post by Fruity »

just because a site doesn't comply with W3C stabdrads , doesn't mean it doesn't work, although being a perfectionist does and can help

sorry, a drunken dude
Guest

Post by Guest »

Klemen Stirn wrote:Hi,

This is a problem with your header.txt file - open it and delete all code from the beginning to including <body> (delete <body> too) from header.txt

I'm not sure if you will get any other errors then as your header is XHTML and code in GBook is HTML.

More on XHTML:
http://www.w3schools.com/xhtml/default.asp

Regards
Thanks for that. I will do that and see if it reduces the amount of errors l get.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Like Fruity said you shouldn't worry too much about these errors, your page will work fine anyway.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Guest

W3C errors

Post by Guest »

Klemen Stirn wrote:Like Fruity said you shouldn't worry too much about these errors, your page will work fine anyway.
In order for my site to be W3C compliant l need to resolve the following errors. I don't know how to resolve them. As l am entering my site in for an award l would appreciate it if you could tell me how l resolve these errors.. Could you possibly assist.
I don't have header and footy files.

===================
Below are the results of attempting to parse this document with an SGML parser.

1.

Line 12, column 11: there is no attribute "ALGIN"

<div algin="center">

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.


2.

Line 29, column 28: cannot generate system identifier for general entity "num"

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"

An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and &aelig; are different characters.

Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.


3.

Line 29, column 28: general entity "num" not defined and no default entity

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"

This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.


4.

Line 29, column 31: reference to entity "num" for which no system identifier could be generated

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"

This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.


5.

Line 29, column 27: entity was defined here

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"
6.

Line 45, column 31: reference to entity "num" for which no system identifier could be generated

<a href="gbook.php?a=delete&num=1"><img src="images/delete.gif" width="16"


7.

Line 29, column 27: entity was defined here

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"
8.

Line 61, column 31: reference to entity "num" for which no system identifier could be generated

<a href="gbook.php?a=delete&num=2"><img src="images/delete.gif" width="16"


9.

Line 29, column 27: entity was defined here

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"
10.

Line 77, column 31: reference to entity "num" for which no system identifier could be generated

<a href="gbook.php?a=delete&num=3"><img src="images/delete.gif" width="16"


11.

Line 29, column 27: entity was defined here

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"
12.

Line 93, column 31: reference to entity "num" for which no system identifier could be generated

<a href="gbook.php?a=delete&num=4"><img src="images/delete.gif" width="16"


13.

Line 29, column 27: entity was defined here

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"
14.

Line 109, column 31: reference to entity "num" for which no system identifier could be generated

<a href="gbook.php?a=delete&num=5"><img src="images/delete.gif" width="16"


15.

Line 29, column 27: entity was defined here

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"
16.

Line 125, column 31: reference to entity "num" for which no system identifier could be generated

<a href="gbook.php?a=delete&num=6"><img src="images/delete.gif" width="16"


17.

Line 29, column 27: entity was defined here

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"
18.

Line 141, column 31: reference to entity "num" for which no system identifier could be generated

<a href="gbook.php?a=delete&num=7"><img src="images/delete.gif" width="16"


19.

Line 29, column 27: entity was defined here

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"
20.

Line 157, column 31: reference to entity "num" for which no system identifier could be generated

<a href="gbook.php?a=delete&num=8"><img src="images/delete.gif" width="16"


21.

Line 29, column 27: entity was defined here

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"
22.

Line 173, column 31: reference to entity "num" for which no system identifier could be generated

<a href="gbook.php?a=delete&num=9"><img src="images/delete.gif" width="16"


23.

Line 29, column 27: entity was defined here

<a href="gbook.php?a=delete&num=0"><img src="images/delete.gif" width="16"
Guest

Post by Guest »

<div algin="center">
there's no such atribut as algin. You might mistyped align.

the rest of your error resulting from an & in anchor urls. Replace them into & would made a valid transitional HTML. Open your gbook.php in notepad, replace

<a href=\"gbook.php?a=delete&num=$num\">


with this code:

<a href=\"gbook.php?a=delete&num=$num\">


hope it helps
Post Reply