RE: XML or SGML?

 
Thanks for the explanation.  

I'm running Windows XP and using the local file upload option.  Is there
advise somewhere as to how to configure the Content-type header in this
circumstance?

Best wishes,

Melinda

-----Original Message-----
From: David Dorward [mailto:david@dorward.me.uk] 
Sent: Tuesday, April 18, 2006 11:47 PM
To: Grant, Melinda
Cc: www-validator@w3.org
Subject: Re: XML or SGML?

On Tue, 2006-04-18 at 16:13 -0700, Grant, Melinda wrote:
> The file at http://www.savagecreek.net/CSS/002.htm fails validation 
> with 0 errors.
>  
> The following warning is provided:
>  The MIME Media Type (text/html) for this document is used to serve 
> both SGML and XML based documents, and it is not possible to 
> disambiguate it based on the DOCTYPE Declaration in your document.
> Parsing will continue in SGML mode.
> followed by:
>  Namespace "" found, but document type is not XML!

The validator is parsing the document as text/html and thus using SGML
rules. It will check for certain XHTML Doctypes and switch to XML mode
for those, but for the reasons I explain below, XHTML Print 1.0 isn't
among them. 
 
> However, the document preface includes:
> <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC 
> "-//W3C//DTD XHTML-Print 1.0//EN"
>       "http://www.w3.org/MarkUp/DTD/xhtml-print10.dtd">

The text/html content type (which your webserver sends, as part of the
HTTP headers, before sending the document) is for HTML documents. XHTML
1.0 documents that follow the guidelines set down in Appendix C of the
XHTML 1.0 specification are allowed to be served as text/html (although
its a silly idea).

XHTML Print 1.0 (based on XHTML Basic) is not XHTML 1.0. Appendix C does
not apply. XHTML Print 1.0 documents "SHOULD NOT" be served as
text/html. You should reconfigure your server to send a more appropriate
content-type (this might be just a matter of renaming the file).

http://www.w3.org/TR/xhtml-media-types/

(I read the mailing list. Please direct responses there and do not CC
me).

-- 
David Dorward                           <http://dorward.me.uk/>
"Anybody remotely interesting is mad, in some way or another."
                             -- The Greatest Show in the Galaxy

Received on Wednesday, 19 April 2006 17:43:48 UTC