Re: [gcpm] [index entry processing] coalescing sequences of numbers for cross-references, back-of-the-book index etc

On Fri, 2015-12-18 at 20:16 -0500, Liam R. E. Quin wrote:
> On Thu, 2015-12-17 at 14:32 -0800, Tab Atkins Jr. wrote:
> > On Wed, Dec 16, 2015 at 9:20 PM, Liam R. E. Quin <liam@w3.org>
> > wrote:
> > > 
> [...]
> > The big issue to me is still figuring out how to handle merged
> > elements.  As proposed, multiple DOM elements still get merged in
> > display, and it's unclear how it's supposed to determine which
> > element the text "ends up in".

I spent some time thinking about this and propose that, for an element
marked as containing a sequence of 0 or more index links,

Either it's left unchanged (e.g. it contains no links), or
(1) make a list of all "a" elements;
(2) rebuild the list, but retaining only the first and last "a" element
in any merged sequence;
(3) the new content of the links comes from normal CSS processing to
fetch and display the page numbers using the content property (e.g. on
:after)
(4) New punctuation is inserted using index-link-separator and index-
ange-separator (I think a dot at the end can come from outside the main
element in the input or can be added with CSS using existing
selectors).

That was class and extention attributes are preserved on the "a"
elements that actually get used.

Since this modifies the document to remove the old punctuation I'm
guessing it'd use the shadow dom mechanism.

Liam


-- 
Liam R. E. Quin <liam@w3.org>
The World Wide Web Consortium (W3C)

Received on Sunday, 7 February 2016 17:23:46 UTC