|
Posted by Zhang Weiwu on January 23, 2007, 11:58 am
Please log in for more thread options
于 Tue, 23 Jan 2007 17:12:07 +0200,Jukka K. Korpela写到:
[snip]
>> That makes all user of my site rely on their connectivity to
>> w3.org to see MY website.
>
> Of course not. Browsers don't actually _use_ DOCTYPE declarations for
> anything else than making their guess on whether the author wants "standards
> mode" or "quirks mode".
Please just try it. You already knew the context, that I am trying to ship
xml document to IE and rely on it to treat it as purely xml, call up a XSL
translation and generate an HTML. You knew this context, so it's clear IE
will try to fetch the DTD file (and ent files refered from DTD file). I
have tried it and you can try it too.
I knew browser is expected to not to actually USE doctype declaration, but
does IE often do things you expected? I am surprised to find I must keep
the dtd files on my webserver, too. Acutally browsers should understand
application/xhtml+xml saving all the trouble here but that's IE I am
talking about. (I knew IE never said they support XHTML too.)
> Just try it. You can even put www.w3.invalid instead of www.w3.org and
> browsers won't still notice anything, beyond (perhaps) switching to "quirks
> mode" (since the DOCTYPE declaration as a _string_ isn't in their list of
> alternatives that trigger "standards" mode).
>
> Besides, even if browsers actually tried to fetch the DTD, they would be
> expected to use the first quoted string to find it in their catalog and only
> failing that should they use the second quoted string as a URL. Thus, in
> this hypothetical situation, the URL string could only help, not hurt.
I didn't image this problem, I met this problem. I cannot access my own
website myself in the same office if I keep the correct DOCTYPE
decoration, and I had to ask a friend in German to mail me the DTD fiile
and ent files referred from the DTD file. And since I have been doing web
development for some time, I am getting used to try not to do things the
'correct' way but just do whatever makes IE work.
|