I saw prince has a content function called target-content(url)
maybe change this to target-string(url,pseudo), to also be able to get target generated content (http://www.w3.org/TR/css3-gcpm/#cross-references)
Furthermore, generated lists would be great, however, I see some limitations in the current working draft, since the generated element (where the make-element property refers to) can only be a single element. I would like to be able to repeat an element (and child elements) and specify an optional target element inside, to give an example:
(I extended w3c's example on http://www.w3.org/TR/css3-gcpm/#toc)
Here, I extended the prototype-insert-position property with an optional target-id. This should point to the id (inside the element) where the actual content is generated. If omitted, it will be the element itself. Another option would be:
ie to specify the property on the target element
In this light, also atomatic linking would be great, ie linking to the source id. That source id might not be set yet, so we might need a property to set this first:
which sets the id attribute of the h1 element to a generated (uid) one, maybe we need an extra flag whether or not to overwrite existing id's (default: not). This could be a comma seperated list of multiple attributes to be set I guess. The generate() funtion might be replaced with <content> (see w3c: http://www.w3.org/TR/css3-gcpm/#string-set)
Next, this attribute should be set to the href attribute of the TOC entry:
where I introduced the source-attribute() function (similar to source-counter)
I would like to discuss this here a bit, because Prince is an application in which it actually might be used.
After some discussion, I plan to post it on the www-style mailing list
maybe change this to target-string(url,pseudo), to also be able to get target generated content (http://www.w3.org/TR/css3-gcpm/#cross-references)
Furthermore, generated lists would be great, however, I see some limitations in the current working draft, since the generated element (where the make-element property refers to) can only be a single element. I would like to be able to repeat an element (and child elements) and specify an optional target element inside, to give an example:
(I extended w3c's example on http://www.w3.org/TR/css3-gcpm/#toc)
...
<style>
#toc { prototype: container }
#toc-entry {
prototype-insert-position: current toc-par;
font-size: 14pt }
#toc-entry::after { content: leader('. ') source-counter(page) }
h1.chapter { make-element: toc-entry content }
</style>
...
<div>
<h1>Table of contents</h1>
<div><p></p></div>
</div>
...
<h1>Introduction</h1>
...
Here, I extended the prototype-insert-position property with an optional target-id. This should point to the id (inside the element) where the actual content is generated. If omitted, it will be the element itself. Another option would be:
<style>
#toc { prototype: container }
#toc-entry {
font-size: 14pt }
#toc-entry::after { content: leader('. ') source-counter(page) }
#toc-entry #toc-par {
prototype-insert-position: current;
}
h1.chapter { make-element: toc-entry content }
</style>
ie to specify the property on the target element
In this light, also atomatic linking would be great, ie linking to the source id. That source id might not be set yet, so we might need a property to set this first:
h1 {
make-attribute: id generate();
}
which sets the id attribute of the h1 element to a generated (uid) one, maybe we need an extra flag whether or not to overwrite existing id's (default: not). This could be a comma seperated list of multiple attributes to be set I guess. The generate() funtion might be replaced with <content> (see w3c: http://www.w3.org/TR/css3-gcpm/#string-set)
Next, this attribute should be set to the href attribute of the TOC entry:
#toc-entry #toc-par {
prototype-insert-position: current;
make-attribute: href "#" source-attribute(href);
}
where I introduced the source-attribute() function (similar to source-counter)
I would like to discuss this here a bit, because Prince is an application in which it actually might be used.
After some discussion, I plan to post it on the www-style mailing list