What implementation is right? (Titled stylesheets)

Hello!

I'm working a bit with alternate stylesheets and a selection mechanism, and 
found a peculiar difference between Mozilla (0.9.9) on one side, and Opera 
(6.01) and Internet Explorer (6.0 for Windows) on the other side. Now I'm 
wondering who handles this correctly, as I couldn't find much about it in 
the CSS, CSS2 or even HTML 4.01 specs.

Take the following sample HTML code:
<link type="text/css" href="0.css" rel="Stylesheet">
<link type="text/css" href="1.css" rel="Stylesheet" title="First">
<link type="text/css" href="2.css" rel="Alternate Stylesheet" title="Second">
<link type="text/css" href="3.css" rel="Stylesheet" title="Third">

Moz renders the untitled stylesheet and the one titled "First", while not 
rendering "Second" or "Third".
IE and Op render the untitled stylesheet, the one named "First" and 
"Third", while not "Second".


This proposes some problems as I see it:
- Stylesheets of more than one title value are rendered at the same time, 
confusing a style select mechanism, especially one that is supposed to 
discern the default ("preferred" in HTML spec) stylesheet.
- The correct behavior is not expressed in the specs, or at least not 
specified clear enough. (HTML spec mentions preferred stylesheets, but 
doesn't cover multiple preferred title values.)
- IE and Opera both seem to handle it correctly as I see it, but their way 
is the one that will be hardest to work with.

If there is no passage handling this case in the specs, I think there 
should be one added to the appropriate specs.

// Liorean

Received on Sunday, 31 March 2002 14:56:43 UTC