W3C home > Mailing lists > Public > public-digipub@w3.org > August 2015

Re: Cross-References in GCPM (was: CSS Pages and Pagination)

From: Johannes Wilm <johanneswilm@vivliostyle.com>
Date: Mon, 10 Aug 2015 18:18:22 +0200
Message-ID: <CABkgm-TVkwSxpbkja1XOPC5ObmWEc7z9auyDs=ScYzLa87OEMw@mail.gmail.com>
To: Brady Duga <duga@google.com>
Cc: HÃ¥kon Wium Lie <howcome@opera.com>, Sanders Kleinfeld <sanders@oreilly.com>, Daniel Glazman <daniel.glazman@disruptive-innovations.com>, public-digipub <public-digipub@w3.org>
On Mon, Aug 10, 2015 at 4:57 PM, Brady Duga <duga@google.com> wrote:

> Looking at this specific use case, why is it better to do this at render
> time, instead of during content processing/creation? That is, it seems like
> you have an existing working solution, what problem are you trying to solve
> by moving this into CSS? I ask because this really seems to cross the
> styling/content barrier, moving what seems to be entirely content into
> stylesheets, and doesn't seem much like an edge case (I can't see a
> plausible argument for this being stylistic). Moving content into styles
> like this makes other automated processing of the content harder (or at
> least more expensive). For instance, a search for "figure 1.1" across all
> the books in my library will now require loading all chapters of all books
> into a UA, instead of just using an xml or html parser to find the text.
>


If the cross reference includes page numbers, one cannot really know what
these will be before having laid out the text. This can potentially also
mean that certain parts need to be rerendered several times. For example:

Say you want on page 90 of a book, with a lot of graphs and figures, you
want to refer to a graph that is on page 99. First the rendererer lays out
everything entirely without adding page numbers. It then determined the
page number of the graph, and adds this to page. The reference text could
for example be something like "figure 23: 'Linguistic dialects in
pre-Colombian Mesoamerica', p.99", but when that has been inserted, pages
90- have to be redrawn and it turns out that now the figure has been moved
on to page 100, so the original text is being updated to "figure 23:
'Linguistic dialects in pre-Colombian Mesoamerica', p.100", but
unfortunately that extra digit in the page number means that now it is
being pushed on to p. 101, etc. .

Eventually the page number will likely stabilize (with exception of certain
edge cases), but before that it may potentially involve quite a few redraws
of large parts of the content, and I wonder if the browser vendors would be
interested in putting this into their engines or whether they see it as a
pure book/scientific journal feature that they don't feel they need/want to
support.

It may still make sense to describe this in terms of CSS, but then have
JavaScript interpret that CSS to do the actual layouting of that part. I
say "may", because it may also be overstretching the purpose of CSS. For
citations on the web, for example, the main project I am aware is the CSL
(Citation Style Language)[1], which is based on rather than CSS. It would
probably make sense to have a field test trying the CSS-approach based on a
JavaScript polyfill before committing to any CSS or XML-based spec on this.

[1] http://citationstyles.org/
Received on Monday, 10 August 2015 16:18:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 10 August 2015 16:18:57 UTC