JavaHelp provides a mechanism for merging HelpSets. For example, when two indexes are merged, the second index is appended to the first index. Constituent HelpSets can be dynamically removed from the merged HelpSet, even while the merged HelpSet is displayed. When HelpSets are merged there is always a master HelpSet into which other HelpSets are marged.
In addition, a HelpSet file can use the
<subhelpset> tag to statically include
HelpSets, this behavior is identical to add
ing
the subhelpset to the enclosing HelpSet, except that if the
subhelpset file does not exist, it is ignored.
Here are some examples where merging might be appropriate:
When a HelpSet A is added to a HelpSet B, all the views in A are compared to the views in B; if a view in A has a name that is the same as another view in B, then it is considered for merging into B, otherwise it is not.
When considering merging a view Va into a Vb the following happens:
If later the HelpSet A is removed from HelpSet B:
TOCView
and JHelpTOCNavigator
implement a merging rule that allows any TOCView with the same
name to be merged.
The resulting presentation adds the new TOC data as the last
subtree of the top level of the original TOC.
A TOCView may have no <data> tag; such a view shows as an empty tree. This is useful for what is sometimes called "dataless" master views into which other views can merge.
IndexView
and JHelpIndexNavigator
implement a merging rule that allows any IndexView with the same
name to be merged.
The resulting presentation adds the new index data as the last
subtree of the top level of the original index.
No attempt to sort the data is provided in the standard types.
An IndexView may have no <data> tag; such a view shows as an empty tree.
SearchView
and JHelpSearchNavigator
implement a merging rule that allows any SearchView with the same
name to be merged.
The resulting presentation adds the SearchEngine
from the new view to the previous list--query results from all the SearchEngine
s are
collated and presented together.
A SearchView may have no <data> tag; such a view produces no matches against any queries.