Re: auto-numbering in CSS (was: content property)

David Perrell wrote:
> I think you're missing my point. Consider a 10-chapter document with
> each chapter a separate file. H1 is used for chapter titles, so there
> is only one instance of H1 per document. In an _external_ stylesheet
> used for all chapters (using yet another speculative simplified syntax
> for accessing element properties)...

Well, in the examples I showed, there was no state kept and no
declarations whatsoever. DSSSL allows you to define your own
characteristics, though, so if you want to make a characteristic:
"counter-start-value" that's no problem. In CSS it could be implicitly
added to an element's child-number and in DSSSL it would be explicitly
added. Because these declarations would be tied to an element's
structure, they would not have the problems of global variables. 

> Looks pretty confusing to me. Why not declare the number type
> associated with the element as part of the element declaration?
> 
>   H2     { number-type: lower-alpha }
> 
> This makes for a much simpler numbering declaration, as noted in
> previous examples.

You can do that too. The DSSSL way is more flexible because a particular
element is not tied to a particular numbering style. For instance even
though I title a Part "Part IV", I might want to number sections within
it as "4.2". But CSS isn't supposed to be as flexible as DSSSL so this
may be a reasonable limitation. Or the declared number-type could be a
default that could be overriden using the "function syntax" (or
whatever) when the counter is actually used. Again this would be
translated into DSSSL as a user-defined characteristic.

 Paul Prescod

Received on Thursday, 8 May 1997 22:00:42 UTC