Re: Direct rendering with CSS

Peter Flynn <[email protected]> Mon, 24 Oct 2022 17:22:55 +0100
Newsgroups gmane.text.docbook.misc
Organization Silmaril Consultants
Message-ID <[email protected]>
On 24/10/2022 17:01, Norm Tovey-Walsh wrote:
>> I haven't been paying attention recently: is anyone working on
>> rendering the original DocBook XML with CSS in the browser, and thus
>> bypassing the conversion stage altogether?
> 
> Not that I’m aware of. For a lot of DocBook, it would be pretty easy.

Yes, the general run of text is not a  problem.

> You’d have to place elements (for example: title, subtitle, author,
> etc.) in the right order because CSS can’t reorder them. 

It can't place them earlier than seen, but it can do a surprising amount 
of twiddling in situ and post hoc: I did this in my recipes to convert 
ingredient data in attributes to human-readable text 
(https://balisage.net/Proceedings/vol26/html/Flynn01/BalisageVol26-Flynn01.html) 
and I was astonished that it actually works :-)

> Any rendering that required reordering (footnotes, epigraph
> attributions, some synopsis elements, some mediaobjects) wouldn’t
> work.
Footnotes, attributions, and some mediaobjects can be handled (eg as 
popups) because HTML doesn't need them re-placed. I don't use synopsis 
enough to see the requirements.

> I don’t think you could make a multi-page version because counters
> would reset on each document (so every chapter would be chapter “1”),
> though maybe you could fix that with some clever CSS.

Some trivial scripting could strip any container, cat the chapters, and 
enshroud in a new container, but I take the point.  I don't think Liam 
Quin is on this list, but I've seen what he can do with print-oriented 
CSS and it's very impressive.

Peter