Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » sample v3.0.0 XHTML markup errors
Re: sample v3.0.0 XHTML markup errors [message #3320 is a reply to message #3319] Sun, 13 January 2013 08:05 Go to previous messageGo to previous message
jjtoranzo2004 is currently offline  jjtoranzo2004
Messages: 261
Registered: September 2012
Senior Member
Tony,

I checked the calendar of the sample application
http://www.tonymarston.net/php-mysql/calendar.php
with the W3C Markup Validation Service (http://validator.w3.org/).


It found the following errors:

-------------------------------------------------------
Error found while checking this document as HTML 4.01 Transitional!
Result: 1 Error, 6 warning(s)

Notes and Potential Issues

The following notes and warnings highlight missing or conflicting information which caused the validator to perform some guesswork prior to validation, or other things affecting the output below. If the guess or fallback is incorrect, it could make validation results entirely incoherent. It is highly recommended to check these potential issues, and, if necessary, fix them and re-validate the document.

Warning No Character Encoding Found! Falling back to UTF-8.

None of the standards sources gave any information on the character encoding labeling for this document. Without encoding information it is impossible to reliably validate the document. As a fallback solution, the "UTF-8" encoding was used to read the content and attempt to perform the validation, but this is likely to fail for all non-trivial documents.

Read the FAQ entry on character encoding for more details and pointers on how to fix this problem with your document.

Warning Unable to Determine Parse Mode!

The validator can process documents either as XML (for document types such as XHTML, SVG, etc.) or SGML (for HTML 4.01 and prior versions). For this document, the information available was not sufficient to determine the parsing mode unambiguously, because:
the MIME Media Type (text/html) can be used for XML or SGML document types
No known Document Type could be detected
No XML declaration (e.g <?xml version="1.0"?>) could be found at the beginning of the document.
No XML namespace (e.g <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">) could be found at the root of the document.

As a default, the validator is falling back to SGML mode.

Warning No DOCTYPE found! Checking with default HTML 4.01 Transitional Document Type.

No DOCTYPE Declaration could be found or recognized in this document. This generally means that the document is not declaring its Document Type at the top. It can also mean that the DOCTYPE declaration contains a spelling error, or that it is not using the correct syntax.

The document was checked using a default "fallback" Document Type Definition that closely resembles "HTML 4.01 Transitional".

Learn how to add a doctype to your document from our FAQ.

Info No Character encoding declared at document level

No character encoding information was found within the document, either in an HTML meta element or an XML declaration. It is often recommended to declare the character encoding in the document itself, especially if there is a chance that the document will be read from or saved to disk, CD, etc.

See this tutorial on character encoding for techniques and explanations.


Validation Output: 1 Error

Error no document type declaration; implying X

The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with a fallback DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.


Line 1, column 1: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"

<html>

Warning NET-enabling start-tag requires SHORTTAG YES



For the current document, the validator interprets strings like <FOO /> according to legacy rules that break the expectations of most authors and thus cause confusing warnings and error messages from the validator. This interpretation is triggered by HTML 4 documents or other SGML-based HTML documents. To avoid the messages, simply remove the "/" character in such contexts. NB: If you expect <FOO /> to be interpreted as an XML-compatible "self-closing" tag, then you need to use XHTML or HTML5.

This warning and related errors may also be caused by an unquoted attribute value containing one or more "/". Example: <a href=http://w3c.org>W3C</a>. In such cases, the solution is to put quotation marks around the value.


Line 18, column 65: NET-enabling start-tag requires SHORTTAG YES

<p>Enter Year: <input type="text" name="year" size="4" value="" />


Line 19, column 33: NET-enabling start-tag requires SHORTTAG YES

<input type="submit" value="GO" /></p>


-------------------------------------------------------
Line 1, column 110: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml
...HTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html>
Line 14, column 12: there is no attribute "align"
<div align="center">
Line 17, column 51: value of attribute "method" cannot be "GET"; must be one of "get", "post"
<form action="/php-mysql/calendar.php" method="GET">


Errors found while checking this document as XHTML 1.0 Strict!
Result: 3 Errors, 3 warning(s)


Validation Output: 3 Errors

Error value of attribute Y cannot be X; must be one of %3


The value of the attribute is defined to be one of a list of possible values but in the document it contained something that is not allowed for that type of attribute. For instance, the "selected" attribute must be either minimized as "selected" or spelled out in full as "selected="selected""; a value like "selected="true"" is not allowed.


Line 17, column 51: value of attribute "method" cannot be "GET"; must be one of "get", "post"

<form action="/php-mysql/calendar.php" method="GET">

Error Missing xmlns attribute for element X. The value should be: Y


Many Document Types based on XML need a mandatory xmlns attribute on the root element. For example, the root element for XHTML might look like:
<html xmlns="http://www.w3.org/1999/xhtml">


Line 1, column 110: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml

...HTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html>

Error there is no attribute X



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. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.


Line 14, column 12: there is no attribute "align"

<div align="center">



-------------------------------------------------------
Error HTML5 Validator Error

Line 14, column 20: The align attribute on the div element is obsolete. Use CSS instead.

<div align="center">

-------------------------------------------------------
Perhaps you can convert the page to XHTML 1.0 Strict.


Thanks.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: error.inc produces invalid html
Next Topic: Documentation - markup error - ampersands in URLs
Goto Forum:
  


Current Time: Sat Nov 23 14:48:44 EST 2024

Total time taken to generate the page: 0.01243 seconds