Re: [css3-gcpm] Comments on generated lists

1. it is not entirely clear how to put content in a child element of 
generated nodes, for example, suppose you have the following prototype 
construct:

...
<div>
  <h1>Table of contents</h1>
  <ul id="toc">
    <li id="toc-entry"><span id="toc_target"></span></li>
  </ul>
</div>
...
<h1 class="chapter">Introduction</h1>
...


and you want to put generated content in the span element. I suppose it 
would be something like this?

...
<style>
  #toc { prototype: container }
  #toc-target { 
    prototype-insert-position: current;
  }
  h1.chapter { make-element: toc-entry content }
</style>
...

I.E. specifying the element to be repeated in the make-element property 
and specifying the location of generated content by means of the 
prototype-insert-position on the particular child element.

2. with generating a TOC for example, I might want to add links from the 
entries in the toc to the specific (h1) tags. Note that paged media do 
not always exclude the possibility for navigable links, PDF for example 
is a paged medium that support links. That said, it might be useful to 
have a meganism to link these automatically. This might be slightly on 
the edge of what one actually want to be able to do with css though.

supposing, the (h1) tags don't have id's yet, a meganism to add these 
might be:

h1.chapter { make-attribute: id generate-uid }

where the first argument defines the id and the following is of type 
<content-list>. generate-uid is a new function that generated a unique 
string. More attributes might be added by means of a comma seperated 
list, so the syntax would be like {<attr> <content-list> [,<attr> 
<content-list>]*} In the generated list we want to refer to these, which 
might be done with something like:

  #toc-target { 
    prototype-insert-position: current;
    make-element: href "#" source-attr(id);
  }

which generated an href attribute with as value the concatenation of the 
string "#" and the result of the source-attr() function, which behaves 
similar to attr() and source-counter().

Regards,
Rikkert Koppes

Received on Friday, 15 December 2006 17:15:54 UTC