re: New W3C Note: Potential Enhancements to CSS

Some thoughts on generated text and counters for CSS:

1. There needs to be a way to combine text + counters, e.g. to generate
"Section @1", or "Chapter @1".  The text should probably simply be HTML, with
the ability to then reference other elements in the style sheet by using <SPAN
class=foo> or other tags.

2. Nested counters are needed, e.g. to be able to do multi-level list
numbering, ie.
	1.	foo
		1.1	bar
		1.2	foobar
			1.2.1		foofoo


	One simple syntax for this is to use a comma-separated list to specify
the numbering at various levels and to use the shorthand "@<" to indicate
substituting the content for the numbering at the previous level, so the
example above would be:

	OL:marker { content: @1., @<@1, @<.@1 }

	The last content specifier is used recursively for deeper lists.

3. It should be possible to specify the automatic content for any tag.  It
should be possible to specify whether that content occurs before or after any
other content in the tag, e.g.

	H1 { content-before: "@1.  " }


renders as

	1.  Introduction


	H1 { content-before: "Chapter @1.<BR><BR>" }

renders as

	Chapter 1.


4.  There needs to be a way to restart or explicitly set the numbering for some
numbering sequence.  Perhaps some attribute like "content-count: 3" or
"content-count: restart", so

	<H1 style="content-count: 7">Next</H1>

renders as

	Chapter 7.


5.  Needs to be a way of referencing the current count for some other tag, for
example to do chapter-based section numbering.  This wants to reference the
count, not necessarily the generated content (so I get "Figure 3.4", not
"Figure Chapter 3.4").

6. Would be nice to get cross-references out of this - that is, be able to
label some numbered item and then reference that number elsewhere.  Want to
simply get the number, so with the above chapter content, could still
auto-generate a phrase like "in chapters 4-6".

FYI, I'm the development lead for the FrontPage editor and am responsible for
most of the CSS support in FrontPage98.  I also wrote a multimedia document
editor (BBN/Slate, aka Diamond) that implemented many of the mechanisms
described above.