Counters and Cross References (Was: Errors in section 12 (generated content))

I said:
>> The comment above 12.5.1 illustrates a major drawback of the counter
>> scheme - what if you do not control all of the stylesheets? Is there a
way
>> around this? (I can't think of one offhand)
>>
>> The comment in question is:
>>> The 'counter-reset' property follows the cascading
>>> rules. Thus, due to cascading, the following stylesheet:
>>>
>>> H1 {counter-reset: section -1}
>>> H1 {counter-reset: imagenum 99}
>>>
>>> will only reset 'imagenum'. To reset both counters,
>>> they have to be specified together:
>>>
>>> H1 {counter-reset: section -1 imagenum 99}
Bert said:
>That's right, and I don't know a way around it either.

The problem is quite serious actually. If I have understood it, the
following rule:
* { counter-increment: elementcounter; }
can effectively never be used, if other elements use counters (which they
very likely will, take OL for example).

One possible 'solution', which unfortunately involves making an exception
(yes I hate them as much as the next guy), is to say that it is the *name*
of the counter which cascades, not the counter-* properties themselves. A
kludge, but does anyone have a better idea?


>> Will CSS3 offer a way of refering to another elements counter?
>I hope so. This is on my list under the general notion of
>cross-references. They may refer to counters, but also to page numbers
>("see equation 6 on page 23" or "see equation 6 on this page")

Cool. One thing to bear in mind when thinking of the implementation is that
backwards compatiblity is important - we don't want old (or simply non-css)
browsers displaying "see equation  on page " - and it should also be media
independant (no point mentioning pages when using a screen or speech
browser, and slides are irrelevant when talking of the printed page). Oh,
another idea - if using a speech based media, would it be relevant to cross
reference by time-offset? As in, "we will discuss this in the paragraph
which is in twenty seconds".

>Thanks,
A pleasure!

--
Ian Hickson
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12   Info: www.geekcode.com
GIT/M/S d->-- s+: a--->? C++(+++)>$ U>*++++ P L+>+++++ E(+)>+++ W+++ N(+) o?
K? w@ O- !M V- PS+ PE- Y+ PGP>+ t 5+++>++++ X- R+(+++) tv b++(+++) DI++
D++(---)>++++ G>+++ e(*)>+++++ h!()(--) !r y?
------END GEEK CODE BLOCK------

Received on Monday, 11 May 1998 14:51:46 UTC