473,915 Members | 4,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DTD in browsers

VK

Randy Webb wrote:
VK said the following on 5/2/2006 9:48 AM:
If you mean "trying to render it" then FF behavior is the same as for
all other UA's willing to be in use (and not W3C demos). If document is
served as text/html, FF will render it somehow anyhow.
So you are saying it totally disregards the DTD and any hints from the
server how to handle the document?


Except server reported Content-Type (text/plain, text/html, text/xml,
application/xhtml+xml etc.)
DTD string itself is irrelevant (and this string by itself is not a
"hint from the server" but a "hint from the document").

Obviously it doesn't connect every time to w3.org to get a DTD, it uses
a build one.


So you are saying, again, that DTD's are irrelevant?

From the document parsing point of view: yes, absolutely irrelevant. They have some theoretical importance for documents' indexing and
searching. Most importantly DTD allows - so far - to switch IE into W3C
box model (unless short HTML Transitional). Without the latter their
usage would be limited by ciwas and ciwah exclusively.

That would be another aspect of your question: what DTD/
tag database is build in into FF? Only one so far: XHTML 1.0 The only
namespace for HTML Firefox knows about is
xmlns:html="htt p://www.w3.org/1999/xhtml"


If that is true, then Firefox is not even close to Standards Compliant.


It is true, but Firefox *is* Standards Compliant - as much as it's
humanly possible without rendering a UA useless and by keeping it
attractive for potential users.

But what decision will it make based on this table - it depends
completely on the Content-Type. Say absolutely the same content with
Content-Type text/html will go through or get adjusted, but with
application/xhtml+xml will lead to a parsing error.


Odd behavior if you tell it text/html with a 4.01 DTD


WWW doesn't go by extensions or formal document signs, never did and
never will. The only important part is Content-Type. It defines
everything.
And if anyone curious: the build in DTD of IE6 is
<http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd> This is the
only one it's aware of and the only one it uses. Respectively the only
type of documents existing in IE is <!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN">


Now that I don't believe.


As you wish. But you believe or disbelieve doesn't change anything in
this matter. The only "major" change expecting in IE7 will be <abbr>
element added as separate entity (now it goes as synonim or <acronym>).
Of course IE knows a bounch of other proprietary tags. It has tables
for behaviors (<public>, <component>, <attach> etc.), tables for VML
(<v:group>, <v:line>, <v:oval> etc.) and so on. But talking about
*those* DTD - from W3C - the above mentioned DTD is the only one.

By providing other DTD's one can switch IE in "CSS1Compat " mode, but
it's just a formal reaction on "Unknown DTD" programmed into the
browser, DTD itself never changes.


Can you prove that?


Oh com'on! Again: "prove me that the sky is blue" ? :-)

<!DOCTYPE FOOBAR "Micro$oft must die!">
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body onload="alert(d ocument.compatM ode)">
</body>
</html>

Say you can put IE into CSS1Compat mode by placing instead:
<!DOCTYPE FOOBAR "Micro$oft must die!">


Does the fun never end?


See above
document.doctyp e gives some neat info in Firefox though.


document.doctyp e is just a convenience access to the provided DTD
string wich is hardly accessible otherwise (because it's formally
located outside of any document blocks, even outside of
documentElement ). In IE document.doctyp e==null for all HTML documents -
to not make DTD users too much upset I guess.

May 3 '06 #1
77 4570
"VK" <sc**********@y ahoo.com> writes:
Randy Webb wrote:
So you are saying, again, that DTD's are irrelevant?


From the document parsing point of view: yes, absolutely irrelevant.


The document type declaration subset ist absolutely relevant if the
document instance is not fully- or amply-tagged and absolutely
irrelevant for rendering.

For HTML as of UAs in the wild it's the other way around of course; but
as usual, it's not really clear what you actually mean, which seems to
be your general discussion strategy.
They have some theoretical importance for documents' indexing and
searching.
¿Que?
Most importantly DTD allows - so far - to switch IE into W3C
box model (unless short HTML Transitional). Without the latter their
usage would be limited by ciwas and ciwah exclusively.
Try to get a clue; the target audience scope of 'DTD users' is not a
particular news group but simply those people who care to employ
software that can process the declaration subset in the *authoring*
process, where it belongs.
And if anyone curious: the build in DTD of IE6 is
<http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd>


1) Clarify what you mean by that, if anything
2) Please finish step 1 1st
3) Provide evidence
<!DOCTYPE FOOBAR "Micro$oft must die!">
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body onload="alert(d ocument.compatM ode)">


The point being? And as the declaration above is invalid in any
scenario you could boil it down to the string which is relevant for M$IE
here, namely '<!DOCTYPE', e.g.

<!DOCTYPE<html> <body onload="alert(d ocument.compatM ode)">
--
||| hexadecimal EBB
o-o decimal 3771
--oOo--( )--oOo-- octal 7273
205 goodbye binary 111010111011
May 3 '06 #2
I wrote:
"VK" <sc**********@y ahoo.com> writes:
From the document parsing point of view: yes, absolutely irrelevant.


<ins/From the parsing point of view, /
The document type declaration subset ist absolutely relevant if the
document instance is not fully- or amply-tagged and absolutely
irrelevant for rendering.

For HTML as of UAs in the wild it's the other way around of course;


[... etc]
--
||| hexadecimal EBB
o-o decimal 3771
--oOo--( )--oOo-- octal 7273
205 goodbye binary 111010111011
May 3 '06 #3
VK
The thread is moved to ciwah as OT to clj.
One may look at
<http://groups.google.c om/group/comp.infosystem s.www.authoring .html/browse_frm/thread/4ac44109aac7fa5 3/9849c2f0f8ec9a2 8>

May 3 '06 #4
VK
> "VK" <sc**********@y ahoo.com> writes:
So you are saying, again, that DTD's are irrelevant? From the document parsing point of view: yes, absolutely irrelevant.
Eric B. Bednarz wrote: The document type declaration subset ist absolutely relevant if the
document instance is not fully- or amply-tagged and absolutely
irrelevant for rendering.

For HTML as of UAs in the wild it's the other way around of course; but
as usual, it's not really clear what you actually mean, which seems to
be your general discussion strategy.
? You just repeated my statement with one word changed ("rendering"
instead of "parsing") but you say that my statement is not clear. I
don't get it.

They have some theoretical importance for documents' indexing and
searching.


Que?


I don't know of any practical applications of that. But theoretically
it is possible to search for only HTML 4.1 documents or only HTML < 4.1
documents or only XHTML documents if one decide to build such search
engine.

Most importantly DTD allows - so far - to switch IE into W3C
box model (unless short HTML Transitional). Without the latter their
usage would be limited by ciwas and ciwah exclusively.


Try to get a clue; the target audience scope of 'DTD users' is not a
particular news group but simply those people who care to employ
software that can process the declaration subset in the *authoring*
process, where it belongs.


I don't really care what target audience may use DTD for: for
authoring, for future searching, for personal preferences or anything
else.
Neither I call to drop DTD declarations: as long as they don't do any
harm, please use them as suggested. And currently they are as harmless
as useless (for Content-Type text/html and except the IE's box model
switch trick).

The original discussion arised from a *practical* aspect. Anyone is
entitled to carefully choose and insert some DTD. But as a developer
she has to be aware that it doesn't change anything in the document
loaded into UA - as long as it's served with the same Content-Type.
Either it's "HTML Transitional", "HTML Strict", "XHTML Strict" or
"FOOBAR VK NIGHTLY" - served with text/html Content-Type it produces
the same document tree and the same graphics context.

And again I'm not calling to transform DTD stuff into joke and use said
<!DOCTYPE FOOBAR VK NIGHTLY> in your documents. Please use only DTD
relevant to the used markup. One just needs to know how and if the
chosen actions affect onto the real life behavior.
And if anyone curious: the build in DTD of IE6 is
<http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd>
1) Clarify what you mean by that, if anything


That IE has only one DTD build in it uses for all Content-Type:
text/html documents:
<http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd>
I don't know how more clear I can be than that.
2) Please finish step 1 1st
I guess I did
3) Provide evidence


As soon as you prove me (with your own samples) what the default IE box
model differs from W3C's one. If we are going into boring obviosity
provement process then the suffer has to be at least mutual ;-)
<!DOCTYPE FOOBAR "Micro$oft must die!">
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body onload="alert(d ocument.compatM ode)">


The point being?


Add a HTML content of any complexity in <body>. Open page in IE.
Change the bogus DTD on any "official" one (HTML or XHTML). Open in
IE.
Look for differences.
Save all open pages File > Save As > Complete page.
Look for DTD in saved pages.

May 3 '06 #5
In article <11************ *********@j73g2 000cwa.googlegr oups.com>,
"VK" <sc**********@y ahoo.com> wrote:
Randy Webb wrote:
So you are saying it totally disregards the DTD and any hints from the
server how to handle the document?


Except server reported Content-Type (text/plain, text/html, text/xml,
application/xhtml+xml etc.)
DTD string itself is irrelevant (and this string by itself is not a
"hint from the server" but a "hint from the document").


The DTD is irrelevant (it is not fetched). However, for text/html, the
doctype is relevant:
http://hsivonen.iki.fi/doctype/
They have some theoretical importance for documents' indexing and
searching.
No, they do not.
Most importantly DTD allows - so far - to switch IE into W3C
box model (unless short HTML Transitional).
And Firefox. And Opera. And Safari.
WWW doesn't go by extensions or formal document signs, never did and
never will. The only important part is Content-Type. It defines
everything.


Except, of course, when it doesn't.
And if anyone curious: the build in DTD of IE6 is
<http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd> This is the
only one it's aware of and the only one it uses.


IE does not have built-in DTDs at all. The parsing is not DTD-based.

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
May 3 '06 #6
VK

Henri Sivonen wrote:
The DTD is irrelevant (it is not fetched). However, for text/html, the
doctype is relevant:
http://hsivonen.iki.fi/doctype/


Not for IE6... "not exactly" for a better wording. This browser has
four options for two states (backCompat and CSS1Compat):

Option 1: No DTD at all
compatMode -> backCompat == IE box model

Option 2: Short Transitional (no URI)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
compatMode -> backCompat == IE box model

Option 3: Full Transitional (with URI)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html401/loose.dtd">
compatMode -> CSS1Compat == W3C box model

Option 4: Any text within <!.. > brackets as the first line in the
document except Option 2
compatMode -> CSS1Compat == W3C box model

In this aspect say both
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> and
<!DOCTYPE FOOBAR "Micro$oft must die!">

are going by the Option 4

On more than one <> pair before <html> tag IE treats everything as
trash and disregards until it hits a pair starting with <!DOCTYPE...
This way in XHTML agglomerate like
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
it sees only the last <> pair and goes by Option 4.
Actually the above agglomerate makes me wonder myself because it's a
wrong syntax for XML documents (if it pretends to be such).

They have some theoretical importance for documents' indexing and
searching.


No, they do not.


*theoretically* ;-)
Most importantly DTD allows - so far - to switch IE into W3C
box model (unless short HTML Transitional).


And Firefox. And Opera. And Safari.


No, because it's impossible. Firefox and others do not have IE box
model one could switch on or off. They have only one box model -
irrelevant of DTD.

WWW doesn't go by extensions or formal document signs, never did and
never will. The only important part is Content-Type. It defines
everything.


Except, of course, when it doesn't.


As if?

> And if anyone curious: the build in DTD of IE6 is
> <http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd> This is the
> only one it's aware of and the only one it uses.


IE does not have built-in DTDs at all. The parsing is not DTD-based.


Of course it does: otherwise how it would decide that tag to render and
how, what attributes to use for rendering and what to disregard? It
does have the above mentioned DTD - but of course not in the text
format as posted at the URL, it's binary coded in its parser.

May 3 '06 #7
VK
Damn, somebody messed up followups... must be me... sorry

May 3 '06 #8
VK wrote:
Randy Webb wrote:
VK said the following on 5/2/2006 9:48 AM: <snip>
And if anyone curious: the build in DTD of IE6 is
http://www.w3c.org/TR/1999/REC-html4...1224/loose.dtd
This is the only one it's aware of and the only one it uses.
Respectively the only type of documents existing in IE is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <snip> By providing other DTD's one can switch IE in "CSS1Compat " mode,
but it's just a formal reaction on "Unknown DTD" programmed into
the browser, DTD itself never changes.
Can you prove that?


Oh com'on! Again: "prove me that the sky is blue" ? :-)


Experience has told us that your perception of blue looks far too
magenta for anything you say to be beyond question. Indeed so magenta at
times that it makes more sense to assume that everything you say is
nonsense.

In this case you are asserting that:-

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

- is the only formulation of <!DOCTYPE ... > that IE is 'aware' of, and
that _all_ others are "Unknown DTD" and that the use of an "Unknown DTD"
will result in IE going into standards mode (as manifest in the JScript
expression - document.compat Mode - returning the string "CSS1Compat ").
<!DOCTYPE FOOBAR "Micro$oft must die!">
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body onload="alert(d ocument.compatM ode)">
</body>
</html>


So if I substitute:-

<!DOCTYPE FOOBAR "Micro$oft must die!" HTML 3>

In the above IE will consider this an "Unknown DTD" and the javascript
will alert "CSS1Compat "? But it doesn't, it alerts "BackCompat ",
indicating that it went into quirks mode. And it does the same with:-

<!DOCTYPE HTML 4.99>
<!DOCTYPE HTML 40>
<!DOCTYPE HTML 200000000 ANY OLD RUBBISH>
<!DOCTYPE html 3210987654>
- and:-
<!DOCTYPE ANY OLD RUBBISH HTML 200000000>

- along with literally millions of other permutations.

This, of course, demonstrates that what you have been whitening on about
is utter nonsense, again. You would benefit considerably by
understanding that making things up off the top of your head and then
asserting that they are as true as "the sky is blue" is not the rout to
understanding, and certainly will not convince anyone to take you
seriously.

Richard.
May 3 '06 #9
In article <11************ **********@g10g 2000cwb.googleg roups.com>,
"VK" <sc**********@y ahoo.com> wrote:
Henri Sivonen wrote:
The DTD is irrelevant (it is not fetched). However, for text/html, the
doctype is relevant:
http://hsivonen.iki.fi/doctype/
Not for IE6... "not exactly" for a better wording. This browser has
four options for two states (backCompat and CSS1Compat):


Let me guess. You did not read the document referenced above.
Option 4: Any text within <!.. > brackets as the first line in the
document except Option 2
compatMode -> CSS1Compat == W3C box model
Like <!DOCTYPE HTML PUBLIC "ISO/IEC 15445:1999//DTD HTML//EN"> perhaps?
;-)
This way in XHTML agglomerate like
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
it sees only the last <> pair and goes by Option 4.


Are you sure?
Most importantly DTD allows - so far - to switch IE into W3C
box model (unless short HTML Transitional).


And Firefox. And Opera. And Safari.


No, because it's impossible. Firefox and others do not have IE box
model one could switch on or off. They have only one box model -
irrelevant of DTD.


Actually, earlier versions of Opera did have the IE box model in the
quirks mode. My point was that even though they don't have the exact IE
box model quirks, they do doctype sniffing nonetheless.
WWW doesn't go by extensions or formal document signs, never did and
never will. The only important part is Content-Type. It defines
everything.


Except, of course, when it doesn't.


As if?


http://ln.hixie.ch/?start=1144794177&count=1
> > And if anyone curious: the build in DTD of IE6 is
> > <http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd> This is
> > the
> > only one it's aware of and the only one it uses.


IE does not have built-in DTDs at all. The parsing is not DTD-based.


Of course it does: otherwise how it would decide that tag to render and
how, what attributes to use for rendering and what to disregard?


From hand-crafted C++ code and from CSS.

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
May 3 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
2073
by: Terry A. Haimann | last post by:
I have been working on creating a dynamic web page and have made slow but steady progress. What I have now has an opening page with two drop down boxes. Based on a choice from the first box, the second box is populated from a mysql table. The values from two boxes are then sent via a query string to a new page. The 2nd page then uses these two values and runs a select against the mysql database and creates an html table. This all runs...
53
5781
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is difficult to know what is going on. One of these Order Forms you can see here... http://www.cardman.co.uk/orderform.php3
12
2608
by: confused | last post by:
After expressing my interest in expanding my new knowledge of HTML and CSS into the wild realm of JavaScript, I was advised that it is wiser to avoid it, since not all browsers are use it or are enabled to read it. After searching for other opinions on the web, I found that some estimate that the frequency of browsers that can read JS currently is better than 90% -- that is certainly workable for me! Do you good people have any thoughts...
12
1734
by: code_wrong | last post by:
Hi, as the subject says How many browsers must we support? How many are there exactly? When I run this JavaScript in Firefox and IE6: function init(){ if(document.getElementById) alert("W3C DOM Supported"); else if(document.all)
6
2005
by: Richie | last post by:
I went through the past six months or so of entries in c.l.javascript, and found a couple where people had expressed opinions about the value of supporting much older versions of Netscape and IE. The entries included incidental mention of server logs showing how many pages had been retrieved by such browsers. I'd like to get some sort of communal variety of opinions on how much effort it's worth to put in the support, or in some...
14
2503
by: Xah Lee | last post by:
is there somewhere i can find the default css for browsers? e.g. what's the usual rendering in terms of css for <p>, <ul> etc. in particular, right now i'm interested in creating a style similar to <ul> and <li>. Of course i can eyeball and come up with a css, but want to be sure. ----------
24
1829
by: abracad_1999 | last post by:
I'm told the standards way of referencing page content is document.getElementById() What is the lowest version of each browser type with which this will work? Thank you
4
1118
by: Bart Schelkens | last post by:
Hi, It might be a stupid question. I'm creating a webapplication using vb.net. I was wondering can this webapplication be viewed in other browsers besides Internet Explorer? Or are we limited to IE? Thx
133
7016
by: Alan Silver | last post by:
Hello, Just wondered what range of browsers, versions and OSs people are using to test pages. Also, since I don't have access to a Mac, will I have problems not being able to test on any Mac browsers, or is there some other way of checking? TIA --
0
10039
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11354
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7256
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4778
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3368
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.