Each time I define a table of content in an index.html and try a HTML document migration it ends up creating a topic .dita instead of the expected .ditamap .
AEM 6.5 + SP7 + SP8 + XML Add On v3.8
Followed the steps from Migrate XHTML documents section of the document https://helpx.adobe.com/content/dam/help/en/xml-documentation-solution/3-8/XML-Documentation-for-Ado.... According to the docs here, to generate the ditamap you need to include the index.html inside a zip file, which includes links to the other files. Also, define the <ul> and <li> tags with attributes as per recommendation.
However, the dita file that finally gets created from the index.html is a DITA topic with an extension of .dita.
The steps you defined seems correct and we validated the functionality on XML Documentation v3.8 - and it works as expected.
Will it possible for you to share the sample content zip?
Or you can raise a support ticket with the sample package.
Also do make sure the HTML heading does not include any namespaces, a sample HTML header would be:
<?xml version="1.0" encoding="UTF-8"?>
With all the rules catered, the sample index.html will look like:
<?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Index File</title> </head> <body> <h1>Index File (this will be ditamap title)</h1> <div class="content"> <ul class="book"> <li class="topicref"><a href="link1_file_path.html">link1_file</a></li> <li class="topicref"><a href="link2_file_path.html">link2_file</a> <ul class="book"> <li class="topicref"> <a href="link3_file_path.html">link3_file</a> </li> <li class="topicref"> <a href="link4_file_path.html">link4_file</a> </li> </ul> </li> </ul> </div> </body> </html>
Thanks @DivrajSingh , that worked. I have a follow up question on associating attributes to topicref.
If my intended .ditamap is supposed to be like below, should I include chunk as another <li class="chunk"> ?
<topicref chunk="to-content" href="GUID-04f55bfc-d49a-42b9-8104-9b11e769bc7d.dita"><topicmeta/> <topicref href="GUID-c039a877-0e74-4057-910d-97ebfe083ce9.dita"/> <topicref href="GUID-840b26d4-0c77-4624-a90d-e9f82a7b6da5.dita"/> </topicref> <topicref chunk="to-content" href="GUID-0142a9f6-282b-4f44-9de6-0c1e1cba873b.dita"><topicmeta/> <topicref href="GUID-e5539249-a4c2-44a6-8542-b643f5e36f0a.dita"/> <topicref href="GUID-10c3053d-f4e1-441c-9e37-25593da33ce5.dita"/> </topicref>
Hi @DivrajSingh , @Kiran_Mohan
I was able to get the additional attributes (format, topic, chunk) added to the ditamap by making changes to /etc/fmdita/html2dita/toc2map.xsl.
What would be the right approach to override this file? I tried an override at /apps/fmdita/config/html2dita/toc2map_extended.xsl but that didn't quite work.