Of course, you are right. We are developing an XSLT parser/processor, and we are dealing with the same sort of problems. Actually, gecko must solve more levels of such problems, as it faces 'real world' in all its complexity. My question was aimed to this direction.

I definitely do agree, that the content type should rule where possible. In addition this is not a case, when some compromises need to be done, as not-named wide spread browser don't even recognize application/xhtml+xml type :)

Thanks

Pavel

Michael Lefevre wrote:
In article <[EMAIL PROTECTED]>, Pavel Hlavnicka wrote:

The best posts in news are always the self-replied ones :)


certainly :)


Sorry I bothered you. One more question (and I do not expect you to tell: "wow, what a nice idea, let's change it!" :) Why mime type wins over the DTD declaration (and even over the <?xml?> pragma)? Isn't the <?xml?> prolog enough to tell, ok, this is a xml file?


I believe that is specified by the standards - if there is a MIME type
specified for the document, then the browser must use it, no matter what
is inside the file.  Unfortunately, not all browsers follow this standard.

It also, I guess, makes it easier for the browser to deal with - it knows
whether it is dealing with XML or HTML from the beginning, rather than
having to check a couple of tags first.  That kind of thing is an issue
with character sets - if they are specified in the header, Mozilla can do
the right thing from the start.  If they are in a document tag, then it
starts with a default character set until it finds the tag with a
character set, and then has to start again using the specified character
set.


-- Pavel Hlavnicka Ginger Alliance www.gingerall.com




Reply via email to