Transitional validation Problem

View: New views
8 Messages — Rating Filter:   Alert me  

Transitional validation Problem

by Hamish :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,
Newbie at validation,
I have been trying to work out what's wrong with the following Document type which is throwing errors on a number of pages.
Any ideas much appreciated
Hamish

"DOCTYPE" declaration not allowed in instance.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
and
document type does not allow element "html" here.
<html xmlns="http://www.w3.org/1999/xhtml">
 from the following 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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Up Date External Examiners</title>
<link href="Course_Buttons/UniStyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
<center><h1> </h1>
<h1>Up Date External Examiners </h1>
<?php
ob_start();
include ("opendbincludeA.php");
$result=mysql_query("SELECT * FROM E_Examiner ORDER BY  SName");

while ($rec = mysql_fetch_array($result))
        {
        echo("ID Number: " . $rec["ID_Number"] . "<br />");
        echo("Name: " . $rec["Title"]. " " . $rec ["FirstName"] . " " .$rec["SName"]. " " ."<br />");
        echo("email Address: " . $rec["emailAddress"] . "<br />");
        echo("Te No: " . $rec["TelNo"] . "<br />");
        echo("Company Name: " . $rec["CompanyName"] . "<br />");
        echo("Address1: " . $rec["CStreet"] . "<br />");
        echo("Address2: " . $rec["CArea"] . "<br />");
        echo("Town: " . $rec["CTown"] . "<br />");
        echo("County: " . $rec["CCounty"] . "<br />");
        echo("Post Code: " . $rec["CPostCode"] . "<br />");
        echo 'Update<hr />' ;
       
        }
ob_end_flush();
?>
</center>
</body>
</html>


Re: Transitional validation Problem

by Jukka K. Korpela :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Tue, 15 May 2007, Hamish wrote:

> I have been trying to work out what's wrong with the following Document type
> which is throwing errors on a number of pages.

Please post the URL of your document. Your description was obscure,
because it mixed a copy of your PHP file (which is _not_ what gets sent to
a browser or a validator, or at least shouldn't be) and the error message.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/



Parent Message unknown Re: Transitional validation Problem

by Andreas Prilop-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Tue, 15 May 2007, Hamish wrote:

> I have been trying to work out what's wrong with the following Document type
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

It is stupid!
If you want XHTML 1.0 (for new pages), then use XHTML 1.0 Strict.
If you need Transitional (for old pages), then stick with
HTML 4 Transitional.

XHTML 1.0 Transitional is a clueless-indicator.

The real difference is between "Strict" and "Transitional",
not between HTML 4 and XHTML 1.0. You should make an effort
to write "Strict" pages: HTML 4 Strict or XHTML 1.0 Strict.

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/search?q=author:Alan.J.Flavell


Re: Transitional validation Problem

by Robert T Wyatt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


<!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">

There's no reason why this should not work unless you have some sort
of zero-width characters hidden in the declaration.


Andreas Prilop wrote:

> On Tue, 15 May 2007, Hamish wrote:
>
>> I have been trying to work out what's wrong with the following Document type
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>
> It is stupid!
> If you want XHTML 1.0 (for new pages), then use XHTML 1.0 Strict.
> If you need Transitional (for old pages), then stick with
> HTML 4 Transitional.
>
> XHTML 1.0 Transitional is a clueless-indicator.
>
> The real difference is between "Strict" and "Transitional",
> not between HTML 4 and XHTML 1.0. You should make an effort
> to write "Strict" pages: HTML 4 Strict or XHTML 1.0 Strict.
>



Re: Transitional validation Problem

by Hamish :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

  The URL is http://osiris.sunderland.ac.uk/~ca8gol/updateExternal.php

I have several pages that have the same error message, all use php to return the results of a query  on  a MySQL db.
Jukka K. Korpela wrote:
On Tue, 15 May 2007, Hamish wrote:

> I have been trying to work out what's wrong with the following Document type
> which is throwing errors on a number of pages.

Please post the URL of your document. Your description was obscure,
because it mixed a copy of your PHP file (which is _not_ what gets sent to
a browser or a validator, or at least shouldn't be) and the error message.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/


Re: Transitional validation Problem

by Drake Wilson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

(Resending to list since I made a mistake on the first Cc; sorry for
resultant screwiness.)

Quoth Hamish <gno@...>, on 2007-05-15 10:53:01 -0700:
>   The URL is http://osiris.sunderland.ac.uk/~ca8gol/updateExternal.php
>
> I have several pages that have the same error message, all use php to return
> the results of a query  on  a MySQL db.

Did you actually look at the source of the output page?

"""
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Up Date External Examiners</title>
<link href="Course_Buttons/UniStyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
<center><h1> </h1>
<h1>Up Date External Examiners </h1>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Connection</title>

</head>

<body>
</body>
</html>
"""

Notice how you have another DOCTYPE declaration and entire <html />
inside the original <body /> tag.  Don't do that.

   ---> Drake Wilson


signature.asc (196 bytes) Download Attachment

Re: Transitional validation Problem

by Hamish :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for pointing me in the right direction.
You are quite right I hadn't thought of looking at the source output.
The reason that there is a second Doc declaration in the code comes from the php"include file" which I had not removed the Doc description from the top.

Thanks to all for the input.
Now sorted, will remember not to do that again.
Regards

Hamish


Drake Wilson-3 wrote:
(Resending to list since I made a mistake on the first Cc; sorry for
resultant screwiness.)

Quoth Hamish <gno@gavinoliver.co.uk>, on 2007-05-15 10:53:01 -0700:
>   The URL is http://osiris.sunderland.ac.uk/~ca8gol/updateExternal.php
>
> I have several pages that have the same error message, all use php to return
> the results of a query  on  a MySQL db.

Did you actually look at the source of the output page?

"""
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Up Date External Examiners</title>
<link href="Course_Buttons/UniStyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
<center><h1> </h1>
<h1>Up Date External Examiners </h1>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Connection</title>

</head>

<body>
</body>
</html>
"""

Notice how you have another DOCTYPE declaration and entire <html />
inside the original <body /> tag.  Don't do that.

   ---> Drake Wilson

 

Re: Transitional validation Problem

by olivier Thereaux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello Andreas, hi all.

On May 16, 2007, at 00:11 , Andreas Prilop wrote:

> On Tue, 15 May 2007, Hamish wrote:
>
>> I have been trying to work out what's wrong with the following  
>> Document type
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>
> It is stupid!
> If you want XHTML 1.0 (for new pages), then use XHTML 1.0 Strict.
> If you need Transitional (for old pages), then stick with
> HTML 4 Transitional.

Andreas, I recall asking you about this in the past... While you have  
the right to your opinions, and in this forum discussion and debate  
are OK, I really don't think your repeated usage of the word  
"stupid" (or "clueless") when someone uses a document type you don't  
like, or makes a mistake, is constructive.

Let us not forget that in the eyes of newbies, you are replying on  
the behalf of all the validator community at w3c. Calling them or  
their choices stupid is only going to alienate them, so please, don't.

I am copying the mailing-list to remind everyone: this is a public  
mailing-list, and usual politeness and etiquette apply. Let's all  
play nice.

Thank you.
--
olivier