docbook / xslTNG

DocBook xslTNG Stylesheets
https://xsltng.docbook.org
MIT License
41 stars 20 forks source link

Add an option to create glosssary divisions automatically #460

Closed ndw closed 5 months ago

ndw commented 5 months ago

Given a sorted list of glossentry elements, it should be possible to add divisions. Ideally, ones that can be customized.

fsteimke commented 5 months ago

With functional programming we would pass a user defined function with signature

function (element(glossentry)*) as element()*

as an argument for a function or template which constructs the glossary content. The result type element()* would allow to leave the sequence of glossentry untouched, or to construct a sequence of glossdiv elements.

Since this is not possible with SAXON HE, we need a substitute. A template in the http://docbook.org/ns/docbook/templates namespace with the simple identity function as default implementation, so that users can customize it?

Greetings, Frank

ndw commented 5 months ago

I think this can be implemented in the code that processes the actual glossary, so it can just be a named template or option that uses for-each-group. It's a little bit like the way glossary sorting is handled. At least I think it is. I could be wrong :-)

ndw commented 5 months ago

Fixed by #462.