HighDots Forums  

Re: Tables - colspan

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: Tables - colspan in the Cascading Style Sheets forum.

Reply
 
Thread Tools Display Modes
  #1  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Tables - colspan - 06-07-2010 , 01:45 PM






GTalbot wrote:

Quote:
On 29 mai, 10:43, Osmo Saarikumpu <o... (AT) wippies (DOT) com> wrote:

Yep, at least my IE8 messes up in many ways in all modes. It even
applies td[colspan] to every td.

Actually, this is not a bug in IE8 since colspan attribute is
specified with a default value (of 1) in the DTD. If the user agent
reads the DTD, then it has to match td[colspan] to every td.

5.8.2 Default attribute values in DTDs
http://www.w3.org/TR/CSS21/selector.html#default-attrs
I have tried to read that passage, and its predecessors, in different ways,
and I still don't see what they are trying to say.

The question is simple: does a selector of the form x[y] match an <x>
element that lacks the y attribute but has a default value declared for that
attribute, in a DTD?

If the answer is "yes", then a selector like td[colspan] is equivalent to td
except for specificity, and hence rather useless.

A selector like input[type] would be equally useless, an unnecessary
complication, whereas, under this interpretation, input[type="text"] would
be useful as it would match exactly those input elements that represent
single-line text input fields.

Yet, the CSS 2.1 draft says that a browser is not required to read an
"external subset" of the DTD, which means for all practical purposes that it
need not know anything about any default values set in a DTD. Hence,
input[type="text"] would be worse than useless since it would not work on
present-day browsers (which don't do DTDs).

In fact, the example in this part of the CSS 2.1 draft suggests that all
this thing about default values set in DTDs was just idle talk. It says,
without any "if" or "may" here, that the selector EXAMPLE[notation=decimal]
"will not match elements whose 'notation' attribute is set by default, i.e.,
not set explicitly".

This is about CSS, not HTML, so I'm moving the discussion to
c.i.w.a.stylesheets.

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Reply With Quote
  #2  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Tables - colspan - 06-08-2010 , 05:12 AM






Jukka K. Korpela wrote:

Quote:
GTalbot wrote:
On 29 mai, 10:43, Osmo Saarikumpu <o... (AT) wippies (DOT) com> wrote:
Yep, at least my IE8 messes up in many ways in all modes. It even
applies td[colspan] to every td.

Actually, this is not a bug in IE8 since colspan attribute is
specified with a default value (of 1) in the DTD. If the user agent
reads the DTD, then it has to match td[colspan] to every td.

5.8.2 Default attribute values in DTDs
http://www.w3.org/TR/CSS21/selector.html#default-attrs

I have tried to read that passage, and its predecessors, in different
ways, and I still don't see what they are trying to say.
AIUI:

Quote:
The question is simple: does a selector of the form x[y] match an <x
element that lacks the y attribute but has a default value declared for
that attribute, in a DTD?
^^^^^^^^
Answer: It may, but don't count on that it does. A DTD is considered to
define the "external subset" and

Quote:
[...] a UA is not required to read an "external subset" of the DTD [...]

Note that, typically, implementations choose to ignore external subsets.

If the answer is "yes", then a selector like td[colspan] is equivalent to
td except for specificity, and hence rather useless.
That is logical. But since the answer is basically "No", `td[colspan]' is
not equivalent to `td':

td[colspan] {
...
}

would *not need to* select

<td>

except when you have also the following internal subset declared:

<!DOCTYPE ... [
<!ATTLIST td
colspan CDATA "foo"
Quote:
]

Quote:
[...] a UA [...] is required to look for default attribute values in the
document's "internal subset." (See [XML10] for definitions of these
subsets.)
So what we have here is IE 8 somehow considering the external subset. Since
a UA is not forbidden to do that, it is _not_ a bug in MSHTML 8. But the
used selector goes against the Recommendation, so it should not come as a
surprise that using it causes the not interoperable behavior described there
(i.e., "non-IE" may not consider the external subset and the selector would
not match).

Quote:
In fact, the example in this part of the CSS 2.1 draft suggests that all
this thing about default values set in DTDs was just idle talk.
It says, without any "if" or "may" here, that the selector
EXAMPLE[notation=decimal] "will not match elements whose 'notation'
attribute is set by default, i.e., not set explicitly".
I don't think so.


HTH

PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:160

Reply With Quote
  #3  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Tables - colspan - 06-08-2010 , 05:13 AM



Jukka K. Korpela wrote:

Quote:
GTalbot wrote:
On 29 mai, 10:43, Osmo Saarikumpu <o... (AT) wippies (DOT) com> wrote:
Yep, at least my IE8 messes up in many ways in all modes. It even
applies td[colspan] to every td.

Actually, this is not a bug in IE8 since colspan attribute is
specified with a default value (of 1) in the DTD. If the user agent
reads the DTD, then it has to match td[colspan] to every td.

5.8.2 Default attribute values in DTDs
http://www.w3.org/TR/CSS21/selector.html#default-attrs

I have tried to read that passage, and its predecessors, in different
ways, and I still don't see what they are trying to say.
AIUI:

Quote:
The question is simple: does a selector of the form x[y] match an <x
element that lacks the y attribute but has a default value declared for
that attribute, in a DTD?
^^^^^^^^
Answer: It may, but don't count on that it does. A DTD is considered to
define the "external subset" and

Quote:
[...] a UA is not required to read an "external subset" of the DTD [...]

Note that, typically, implementations choose to ignore external subsets.

If the answer is "yes", then a selector like td[colspan] is equivalent to
td except for specificity, and hence rather useless.
That is logical. But since the answer is basically "No", `td[colspan]' is
not equivalent to `td':

td[colspan] {
...
}

would *not need to* select

<td>...</td>

except when you have also the following internal subset declared:

<!DOCTYPE ... [
<!ATTLIST td
colspan CDATA "foo"
Quote:
]

Quote:
[...] a UA [...] is required to look for default attribute values in the
document's "internal subset." (See [XML10] for definitions of these
subsets.)
So what we have here is IE 8 somehow considering the external subset. Since
a UA is not forbidden to do that, it is _not_ a bug in MSHTML 8. But the
used selector goes against the Recommendation, so it should not come as a
surprise that using it causes the not interoperable behavior described there
(i.e., "non-IE" may not consider the external subset and the selector would
not match).

Quote:
In fact, the example in this part of the CSS 2.1 draft suggests that all
this thing about default values set in DTDs was just idle talk.
It says, without any "if" or "may" here, that the selector
EXAMPLE[notation=decimal] "will not match elements whose 'notation'
attribute is set by default, i.e., not set explicitly".
I don't think so.


HTH

PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:160

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.