Re: XML declatarion

Marczewski Rafal" <rafal.marczewski@fastmedia.it> writes:

> I try to compose a minimal XHTML doc. I have read this in the
> Recommendation (REC-xhtml1-20000126)
> 
> 	<?xml version="1.0" encoding="UTF-8"?>
> 	<!DOCTYPE html 
> 	     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ...so go on
. . .
> 	1) It is working corectly without the XML declaration
> 	2) why of his error (if its?)

I cannot make specific comment on the cited user agents.

Hypothetically, the described behavior probably also depends on the
content type associated with your document.

A user agent might in error -- at variance with the specification --
view a document having an xml declaration or having an association
with the content type "text/xml" as a document that is not HTML by
ignoring the document type declaration and/or the xmlns value on the
document's root tag.

A consequence might then be that the document is outside the territory
where the user agent makes use of implied knowledge of markup
vocabulary.  It may in that circumstance be adequate -- for HTML and,
perhaps, in part for other document types under XML -- to supply a
robust CSS style sheet.

Consider testing your document with W3C's Amaya.

                                    -- Bill

Received on Saturday, 7 July 2001 11:02:39 UTC