XHMTL TOCs: no structure

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

XHMTL TOCs: no structure

Postby chuck_agari on Tue Apr 09, 2019 2:37 pm

(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.
chuck_agari
Sr. Propeller Head
 
Posts: 192
Joined: Wed May 30, 2018 2:40 pm

Re: XHMTL TOCs: no structure

Postby Dave Lee on Wed Apr 10, 2019 12:38 am

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?
Dave Lee
Master Propellus Maximus
 
Posts: 5654
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: XHMTL TOCs: no structure

Postby jjw on Wed Apr 10, 2019 3:40 am

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.
jjw
Sr. Propeller Head
 
Posts: 133
Joined: Thu May 08, 2014 4:18 pm
Location: Melbourne

Re: XHMTL TOCs: no structure

Postby chuck_agari on Wed Apr 10, 2019 9:28 am

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.
chuck_agari
Sr. Propeller Head
 
Posts: 192
Joined: Wed May 30, 2018 2:40 pm


Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 3 guests