Re: [gutvol-d] More than you ever wanted to know about XHTML and CSS (gutvol-d Digest, Vol 9, Issue 23)

Marcello Perathoner wrote: [restatement snipped]
It is not! (People should really read the specs!) If it were #PCDATA (*Parsed* Character DATA) the validator would find the error because it would parse it. Its because its CDATA that the validator doesn't parse it and in consequence cannot find the "error". In CDATA < has no special meaning at all.
True. In my original analysis I was looking at the DTD declaration for file number 15701 which is XHTML Strict as opposed to file number 15698 which is indeed HTML 4.01 Transitional. But in this case the distinction between #PCDATA and CDATA is inconsequential, because for this bug to manifest itself we are dealing with a User Agent which either does not support the <style> element, or has implemented that support incorrectly (as in the case of Opera 7.11). Thus, my analysis, and your restatement, are still correct. Hopefully, this little quibble will not distract people from the larger issue, which is that the file at PG is flawed, and needs to be corrected. David A. Desrosiers wrote:
The balance has to be consired: Is it worth it to incur another socket connection and round trip from the client (more server hits to retrieve resources) or is it better to have a larger byte-per-hit (but less socket connections) per-client?
This objection, and Marcello's response, are both based on a faulty assumption: that the primary use of HTML files will be online, served up by some sort of HTTP server. I would bet that the vast majority of all HTML files offered by Project Gutenberg are downloaded to a local computer, and then read while offline. I know that _I_ have never read a PG e-text directly from the web server. Fetching multiple files from the local file system is simply a non-issue. And if I want to substitute my own styles for those of the original poster, downloading to a local file system is required. If you're going to insist that user selection of styles is not possible, the question of whether they are internal styles or external styles is irrelevant, but if you're going to permit user flexibility in selecting styles, the issue of multiple GETs is irrelvant. This is one of the reasons that it is important that all HTML files be offered in ZIP format: because it is likely that a user will be reading offline, s/he should be able to fetch all the files associated with a work (styles and images) in a single download.

Lee Passey wrote:
Thus, my analysis, and your restatement, are still correct.
First you cited the wrong spec and then you got the semantics of PCDATA and CDATA the wrong way. In the end you came out right, but that doesn't make it a correct analysis.
This objection, and Marcello's response, are both based on a faulty assumption: that the primary use of HTML files will be online, served up by some sort of HTTP server. I would bet that the vast majority of all HTML files offered by Project Gutenberg are downloaded to a local computer, and then read while offline.
But how does the file get to the local harddrive in the first place? Maybe you don't realize that the PG website is serving an average of 300.000 file requests for a total of 130 GB a day. That is 12 Mbit/s, or 8 T1 lines under full steam all day long. In our case it is very important not to constipate the pipes with all those packets needed to open and close a connection which carry no useful data.
And if I want to substitute my own styles for those of the original poster, downloading to a local file system is required.
Not at all. Your better browser (Mozilla) will let you define you own user stylesheets and even switch between multiple author stylesheets. (Thats what the C in CSS stands for.)
If you're going to insist that user selection of styles is not possible, the question of whether they are internal styles or external styles is irrelevant, but if you're going to permit user flexibility in selecting styles, the issue of multiple GETs is irrelvant.
Go, read the specs: you can have multiple stylesheets inside one document. Open this file in your better browser (Firefox). Then select: View | Page Style <HEAD> <STYLE type="text/css" title="red"> P { color: red } </STYLE> <STYLE type="text/css" title="blue"> P { color: blue } </STYLE> <STYLE type="text/css" title="green"> P { color: green } </STYLE> </HEAD> <BODY> <P>Don't show this to any DP Project Manager. </BODY> -- Marcello Perathoner webmaster@gutenberg.org

Marcello wrote:
Lee Passey wrote:
This objection, and Marcello's response, are both based on a faulty assumption: that the primary use of HTML files will be online, served up by some sort of HTTP server. I would bet that the vast majority of all HTML files offered by Project Gutenberg are downloaded to a local computer, and then read while offline.
But how does the file get to the local harddrive in the first place? Maybe you don't realize that the PG website is serving an average of 300.000 file requests for a total of 130 GB a day. That is 12 Mbit/s, or 8 T1 lines under full steam all day long.
In our case it is very important not to constipate the pipes with all those packets needed to open and close a connection which carry no useful data.
Lee did mention that the HTML version of a PG book be put into a downloadable zip file. This should lead to some reduction in "pipe flow". Otherwise, whenever someone accesses the online version, they may do so multiple times. Also, zip may help some with improved compression, and of course encapsulate multiple files into one. At least that's how I see it. How much savings this gives, if any, I can't estimate. On another matter, how Firefox handles multiple <style>'s is way cool. Is there some mechanism using Firefox to also select one among several supplied *external* stylesheets? Jon

Jon Noring wrote:
Lee did mention that the HTML version of a PG book be put into a downloadable zip file.
I see. He invented warm water. We were doing that since day 1.
On another matter, how Firefox handles multiple <style>'s is way cool. Is there some mechanism using Firefox to also select one among several supplied *external* stylesheets?
Just the same. Use multiple <link>s and give them different titles. -- Marcello Perathoner webmaster@gutenberg.org

On 4/28/05, Lee Passey <lee@novomail.net> wrote:
This objection, and Marcello's response, are both based on a faulty assumption: that the primary use of HTML files will be online, served up by some sort of HTTP server. I would bet that the vast majority of all HTML files offered by Project Gutenberg are downloaded to a local computer, and then read while offline. I know that _I_ have never read a PG e-text directly from the web server.
But you don't know--you can't know--that it's a faulty assumption. You know how you do it. No one reading it via a library terminal downloads it, though. I usually read books online.
participants (4)
-
David Starner
-
Jon Noring
-
Lee Passey
-
Marcello Perathoner