associate XML files to missing TOC/HTML files

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
jonesmark
Posts: 3
Joined: Fri Apr 15, 2022 3:44 pm
Contact:

associate XML files to missing TOC/HTML files

Unread post by jonesmark »

Two questions:

TOC files have been deleted but the topic XML files still exist.

1. Is there a way to generate the html files from the xml? I tried creating a page and then updating the ID but H&M returned the error that file ID already exists.

2. And I have a TOC entry, but when clicked, I get this message:

"This is a chapter entry without an associated topic."

However, the XML topic does exist. Can I/how do I associate them?

Thanks in advance.
Jones
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: associate XML files to missing TOC/HTML files

Unread post by Tim Green »

Hi Mark,

The TOC is really just a list of links to the topics, each of which is a separate XML file. This is why deleting the TOC file has no effect on the topic files.
1. Is there a way to generate the html files from the xml? I tried creating a page and then updating the ID but H&M returned the error that file ID already exists.
That happens automatically when you publish to an HTML-based format (WebHelp, eWriter, CHM, ePub, Kindle). With WebHelp you have the files directly, including the TOC in the hmcontent.html file and the individual HTML topic files. In the other formats you need to disable the Publish screen option for deleting the temporary files, then you will find the HTML source in a subfolder of the project folder with a name starting with a ~ character (~tmpexe for eWriter, ~tmpchm for CHM and so on).
2. And I have a TOC entry, but when clicked, I get this message:
"This is a chapter entry without an associated topic."
However, the XML topic does exist. Can I/how do I associate them?
This means that the href attribute of that TOC entry is missing or empty, which is the case with chapter entries that don't have a topic associated with them. A normal TOC entry in the XML TOC file looks like this:

Code: Select all

<topicref type="topic" id="449673791886557" build="ALL" modified="2023-02-10T12:44:43.302Z" icon="0" href="Welcome-topic">
In your case the href attribute is either completely missing, or just empty (i.e.: href=""). You could edit the XML TOC file in the Maps folder of your project manually, but the easiest way to fix this is to delete the TOC entry and create a new one in one of two ways:

Method1: Drag the topic file from the Topic Files section into the TOC and drop it there. That will automatically create a TOC entry.

Method 2: Use the Add Topic tool to create a new topic. Choose the TOC Link tab in the dialog displayed, then select the Link to topic in this project option and choose the ID of the topic. (The ID is the name of the XML topic file.)

Note that if the href attribute of the TOC entry is there but references a topic file that doesn't exist, you will get a dead link message instead, and then you can choose the topic you want to link it to from a list.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply