I'm going to ingore your comment about a large project and I'll focus on the example project you shared.
The example project doesn't work because the map id's have not been linked to topics:
To get the example project working, I simply did the following:
1. Open the map file. (Project Set-up > Context Sensitive Help > xxx.h)
2. Select the Map ID on the left side.
3. Select the corresponding topic on the right side.
4. Click assign.
5. Click Close.
6. Save project and generate.
When I did this for both the master project and the child project, calling the CHM using the numeric id worked.
But note: You have used the same numeric id in both the master and the child project. You want to avoid this situation. Use unique id's for all projects that you want to merge.
Now what about your large project? Do you have the same issue as the example projects or do you have another issue?
thanks having a look at my problem. I read in another thread today a description which comes close to the problem I'm facing.
Maybe I formed the mini sample not exactly as our problem is situated. (thus the doubled map ids you were claiming).
I will try to explain again: we have a couple of CHMs in separate single help projects. These go into their own TOCs, Index Glossar etc. like in sub1->Einzel. For the merged project we produce a chm that goes into the directory of the master (main) project, like in sub1->Primäres Layout.
Each Topic in the sub project (e.g. sub1->Erstes Thema) has a symbolic link address (e.g. "Linkadresse=det_org_angaben), which is mapped to the MAP ID via the .h file.
This all used to work that way in RH5.
Now it seems that this information between the map ID and the symbolic Linkaddress gets lost with the merge process.
I am not using the same ID (57) twice in my example. The MAP ID in the main project comes from the sub1 project (see the yellow locked MAP ID).
The simplest test is using the CSH-Test in the Toolbox giving the main.chm as the Helpfile to test and enter the 57 as a MAP ID.
The idea behind is to use one CHM later to have to open in the application. The other CHMs of the subprojects only need to be present in the application directory. Then you invoke HtmlHelp(with the MAPID),like I posted in this thread.
The method you are suggesting in mapping the ID to the topic in the main project will not work since the topic is in the CHM of the sub project.
I modified the sample project once again (somehow the baggage files were not showing) to come closer to the constellation we are using in the large project, though I'm getting the "HH_HELP_CONTEXT called without a [MAP] section" error (which does not occur in our large project).
For the joy of it I prepared a VM with Windows XP, RH5 Office, tested our last working big RH5 project under it, especially did the CSH Test from the Toolbox. It worked fine.
Then I copied over the whole project tree in the same place on the Windows 7/RH9 machine.
I started the .XPJ file (double click) and RH9 fired up, said it's an old project and it had to convert it.
OK, I let it convert and then I did the first CSH-Test on the old (not yet built with RH9) merged CHM file.
The test ran fine, the context help window popped up when I had entered a certain numeric MAP ID.
Then I compiled the project first time with RH9 and after that the resulting CHM file was 20K less in size
(52K rather than 71K formerly).
Something must be really broken with RH9, that it cannot build the suitable structures from an existing merged RH5 project with MAP Id and content topics.
corrected Typos and extended last sentence.
I've got a bit further: I solved the problem with the "HH_HELP_CONTEXT called without a [MAP] section".
Reason for this was that the merged CHM didn't contain an #IVB section (use HTML Help Studio from the ToolBox for example). This happens when an ALIAS section is missing in the HHP file I've read here or when the .ali file is empty as it was the case with me. I put something senseful in there (see my newly compiled RH5 example). This example works in RH5 without having to assign a topic explicitly in the context ID dialog. It solely works by the relations given in the .ALI files.
Now could someone please tell me how this example can be converted to RH9 (working with the alias mechanism)? I think I could make it working if I knew how the .ALI file would have to look in RH9 (maybe)
In my merged RH5 project the .ali file of the sub project contained:
And the main (merge) projects' .ALI file has a pointer to the ali-filename of the sub-project:
If the .ali is empty, that means that your topics are not linked to the context id's, as was also the problem in your example project. As far as I know you will have to link every context to a topic. I'm not familiar with RH5 but when a topic is not linked to a map id, how is the program to know which topic is linked to which id?
You can link the topics by manually editing the .ali file. But only do so if you know what you're doing and if you have a backup!
FYI, the structure of the .ali file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<alias name="MAP ID" link="relative link to topic">
thanks for caring about my problem.
The idea of merging projects is, that you do not need to do everything again in the merged project what you have done once in the single project. And when you look at a single RH9 project with MAP Ids it works without having to assign the topics manually to the MAP IDs. The information is in the .ALI file (as you pointed out) but the problem is, how to get this information over into the main (merged project). Would it in the end mean to give the main project an .ALI file that contains all subprojects' ALI files merged together? I could give that a try, but I would expect that RH9 has a mechanism to do that for me.
I think I have misunderstood your problem before. I've been assuming that you needed to map the files for every project, but you want to be able to call everything from the master CHM. Sorry about the confusion.
Our solution to this (RH7-0) was:
- Map number lower than 20000, call CHM1
- Map number between 20000 and 29999, call CHM2
- Map number higher than 30000, call CHM3.
It is very well possible that RoboHelp changed since X5. The only resources I could find where:
I'll play around with it so see whether I can get it working.