XHMTL TOCs: no structure

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

XHMTL TOCs: no structure

Post by chuck_agari »

(I'm posting this here because the forum index says "This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets. " for the subtitle, although I don't see how XHTML fits into "printed.")

Because the DITA output is broken, I'm experimenting with the "clean" XHTML output to see if it will work as source files to give to our partner. (Never mind that XHTML is deprecated and my initial looks at a few of the output files suggest the code is far from "clean.") The TOC has some of the oddest code I've every seen. The biggest problem is that the TOC structure is not maintained. I mean, there's no option in the target's settings like there is in some others to define how a TOC should look, but even without it, because you define a TOC to use, the default should be better than just a flat one-level list.

Oh, but ti gets better. The is a sample of the code for one element in that list:

Code: Select all

<table style="width: 100%;" cellspacing="0" cellpadding="0" class="GenTOCTable1">
                <col style="width: 0pt;" />
                <col />
                <col style="width: 10pt;" />
                <col style="width: 0.2in;" />
                <tr>
                    <td class="mcReset" />
                    <td class="GenTOCText1"><a class="GenTOCText1" href="introduction/introduction_to_dmarc.htm">Introduction</a>
                    </td>
                    <td class="GenTOCPageText1">
                        <MadCap:xref class="TOCPageNumber" xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd"> </MadCap:xref>
                    </td>
                    <td class="mcReset" />
                </tr>
            </table>
Yup. Each "list" item is its own table. For the life of me, I can't imagine ever recognizing that I want to present a bunch of content items as a list and thinking that the best way to do this would be a bunch of stacked tables.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: XHMTL TOCs: no structure

Post by NorthEast »

Clean XHTML targets don't include the TOC or any navigation control.

So I'm assuming you've inserted a TOC proxy in a topic, which is really intended for print outputs, rather than web/HTML outputs.
(I'd class Clean XHTML as a HTML output rather than printed.)

Not sure what the best solution is for getting an output TOC in XML format, as I've not experimented very much with targets outside HTML5. Doesn't DITA produce a ditamap in XML format?
jjw
Sr. Propeller Head
Posts: 133
Joined: Thu May 08, 2014 4:18 pm
Location: Melbourne

Re: XHMTL TOCs: no structure

Post by jjw »

Why not just use the original fltoc file - you might need to do some processing (to resolve conditions for example) but it has a fairly straightforward nested toc structure.
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: XHMTL TOCs: no structure

Post by chuck_agari »

Dave Lee wrote:Clean XHTML targets don't include the TOC or any navigation control.

So I'm assuming you've inserted a TOC proxy in a topic, which is really intended for print outputs, rather than web/HTML outputs.
(I'd class Clean XHTML as a HTML output rather than printed.)

Not sure what the best solution is for getting an output TOC in XML format, as I've not experimented very much with targets outside HTML5. Doesn't DITA produce a ditamap in XML format?
The DITA output produces a very nice and useful map file. The DITA output is also utterly useless.

That said, a dim light went on in my little brain. If our partner can use the XHTML output, I could generate the DITA output too and just include the map file in the source files I send them.

Also, web outputs have navigation. Typically, the navigation is based on an organization. Heck, the HTML5 output includes a TOC based on the target's TOC.
Post Reply