I've been following this thread with some interest. The suggestion to add @toc="no" to the topicrefs is only valid if you have the ability to control the maps or ask authors to do so; that is not always possible. Sometimes we have to process content from an OEM or partner as they give it to us; we can't ask them to change their files. Having a parameter to control the TOC depth with ditac would be useful here. Otherwise, the suggestion to post-process the XSL-FO seems most valid.
What options are available without changing the source content? On Wed, May 8, 2024 at 2:02 AM Hussein Shafie <[email protected]> wrote: > On 5/8/24 00:45, Mark Giffin wrote: > > I got an idea on how to automate this with XSLT. I will run ditac with > > the parameter to save the FO file. Then I will change the FO file using > > XSLT, then run the FO through my PDF processor (Antenna House). > > > > But is there another way to get rid of TOC levels? > > I would use the XSLT to pre-process the *input* DITA map/bookmap rather > than the *output* XSL-FO file. > > The idea to automatically add toc=no on the topicrefs you don't want to > appear in the TOC and then let ditac process normally the modified copy > of your DITA map/bookmap. > > Why that? simpler, cleaner, more reliable (no assumptions on the content > of the output XSL-FO file, which may change in future version of ditac). > > > > > > Thanks, > > Mark > > > > On 5/2/2024 9:24 AM, Mark Giffin wrote: > >> Yes I know about toc=no on topicrefs, but I wanted to automate it. > >> Could I do this with XSLT? > >> > >> On 5/2/2024 1:01 AM, Hussein Shafie wrote: > >>> On 5/2/24 07:15, Mark Giffin wrote: > >>>> Thanks Hussein. What I want to do is remove sub-levels from the > >>>> table of contents. So you're saying I could do this with the normal > >>>> XSLT method? This would be good. > >>> > >>> If you simply want to remove sub-levels from the table of > >>> contents then the simplest is to modify your map or bookmap and add > >>> attribute toc="no" to all topicrefs you don't want to appear in the > TOC. > >>> > >>> See > >>> > http://docs.oasis-open.org/dita/dita/v1.3/errata02/os/complete/part2-tech-content/langRef/attributes/commonMapAttributes.html#topicref-atts__toc > >>> > >>> You don't need to modify ditac in any way if you just use this > >>> standard DITA feature. > >>> > > > On 5/2/24 18:24, Mark Giffin wrote: > > Yes I know about toc=no on topicrefs, but I wanted to automate it. Could > I do this with XSLT? > > -- > Hussein SHAFIE, Product Manager, [email protected] > XMLmind Software, 35 rue Louis Leblanc, 78120 Rambouillet, France > Phone: +33 (0)9 52 80 80 37, Fax: +33 (0)9 57 80 80 37, www.xmlmind.com > > > -- > XMLmind DITA Converter Support List > [email protected] > http://www.xmlmind.com/mailman/listinfo/ditac-support >
-- XMLmind DITA Converter Support List [email protected] http://www.xmlmind.com/mailman/listinfo/ditac-support

