Content import for HTML content to create a .ditamap creates a .dita file instead | Community
Skip to main content
Level 2
July 27, 2021

Content import for HTML content to create a .ditamap creates a .dita file instead

  • July 27, 2021
  • 1 reply
  • 3401 views

Issue:
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 Instance:
AEM 6.5 + SP7 + SP8 + XML Add On v3.8

Issue Description:
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-Adobe-Experience-Manager_Installation-Configuration-Guide_EN.pdf. 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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

DivrajSingh
Adobe Employee
Adobe Employee
July 29, 2021

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.

DivrajSingh
Adobe Employee
Adobe Employee
July 29, 2021

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"?>

<html xmlns=http://www.w3.org/1999/xhtml>

 

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>
Level 2
August 5, 2021

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>