[jira] [Commented] (FOP-2851) Adding support for back-of-the-book index

2023-11-24 Thread Simon Steiner (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17789483#comment-17789483
 ] 

Simon Steiner commented on FOP-2851:


Jan has created: 
https://github.com/jan-tosovsky-cz/xmlgraphics-fop/commits/FOP-2851_index

> Adding support for back-of-the-book index
> -
>
> Key: FOP-2851
> URL: https://issues.apache.org/jira/browse/FOP-2851
> Project: FOP
>  Issue Type: Improvement
>Reporter: Jan Tošovský
>Priority: Major
>
> Building back-of-the-book index is one of last major features not supported 
> in FOP. 
> [https://www.w3.org/TR/xsl/#d0e13293] (formatting objects)
> [https://www.w3.org/TR/xsl/#d0e28521] (properties)
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


FW: Adding support for back-of-the-book index

2023-11-24 Thread Jan Tosovsky
On 17/03/2019 19:23, Jan Tosovsky wrote:
> I plan to dedicate part of my spare time to implementing the index
support.
> https://issues.apache.org/jira/browse/FOP-2851
> I suppose in later stages I'll appreciate some help.

Recently I've made some progress. I am able to collect page references,
deduplicate them and create ranges per rules defined in the XSL-FO spec.
https://www.w3.org/TR/xsl/#d0e13293

It is available in a dedicated branch in my fork here 
https://github.com/jan-tosovsky-cz/xmlgraphics-fop/tree/FOP-2851_index

However, I struggle with the LayoutManager part.

At the moment I convert the collected data into a simple string laid out
using the LeafNodeLayoutManager-based class:
https://github.com/jan-tosovsky-cz/xmlgraphics-fop/blob/FOP-2851_index/fop-c
ore/src/main/java/org/apache/fop/layoutmgr/inline/IndexPageCitationListLayou
tManager.java

I expect I should rather create some inline parent and put the child content
there. I wasn't able to find some example in the current code for this. 

By the child content I mean page references, which can have different
styles, optionally treated as internal links, decorated by the
prefix/suffix, separated by the specified page and range separators (joined
using proper keep-with values).

Thanks,
Jan