Hi,
So once again I am testing moving from modular CHM (around 30 per language) to a single eWriter file for each language.
The CHM contain a titlepage which displays an image via a variable <CHM_Prefix>image_name.png which links to the <CHM_Prefix>introduction topic in each CHM.
When I now try to publish all into on eWriter file, the <CHM_Prefix> *seems* to be set to the first one HnM meets on publishing.
How can I force it to use the project-specific variables?
Version 8.4.2 Build 5920
From modular CHM to eWriter
Moderators: Alexander Halser, Tim Green
- Tim Green
- Site Admin
- Posts: 7818
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: From modular CHM to eWriter
Hi John,
Help+Manual projects are XML and when you combine sub-projects they become part of the single XML tree before publishing. This means that the overload rules for XML apply, so that any variables get resolved on a first-come/first-served basis. And since the tree is processed from top to bottom, any variables defined in a parent project get set there, and the same variable defined lower down will be ignored.
So variables in child projects must be unique in those projects. If you have multiple child projects and the same variable is defined in multiple projects, the definition of the first project in the TOC tree will be used. Similarly, if a variable is not defined in the parent/master project but is defined in one of the child projects, and you use the variable in the parent/master, then the value from the first child in which it is defined will be used. This is because on publishing, you really only have one project. All the children's XML is merged into the master tree. There are no "sub-projects" in the publishing tree. It's all one project, and so the first definition of any variable is what gets used.
Help+Manual projects are XML and when you combine sub-projects they become part of the single XML tree before publishing. This means that the overload rules for XML apply, so that any variables get resolved on a first-come/first-served basis. And since the tree is processed from top to bottom, any variables defined in a parent project get set there, and the same variable defined lower down will be ignored.
So variables in child projects must be unique in those projects. If you have multiple child projects and the same variable is defined in multiple projects, the definition of the first project in the TOC tree will be used. Similarly, if a variable is not defined in the parent/master project but is defined in one of the child projects, and you use the variable in the parent/master, then the value from the first child in which it is defined will be used. This is because on publishing, you really only have one project. All the children's XML is merged into the master tree. There are no "sub-projects" in the publishing tree. It's all one project, and so the first definition of any variable is what gets used.
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.