[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
22.4.5 HTML Cross-reference Mismatch
As mentioned earlier (see section HTML Cross-reference Link Basics), the generating software has to guess whether a given manual being cross-referenced is available in split or monolithic form—and, inevitably, it might guess wrong. However, it is possible when the referent manual itself is generated, it is possible to handle at least some mismatches.
In the case where we assume the referent is split, but it is actually available in mono, the only recourse would be to generate a ‘manual/’ subdirectory full of HTML files which redirect back to the monolithic ‘manual.html’. Since this is essentially the same as a split manual in the first place, it's not very appealing.
On the other hand, in the case where we assume the referent is mono, but it is actually available in split, it is possible to use JavaScript to redirect from the putatively monolithic ‘manual.html’ to the different ‘manual/node.html’ files. Here's an example:
function redirect() { switch (location.hash) { case "#Node1": location.replace("manual/Node1.php#Node1"); break; case "#Node2" : location.replace("manual/Node2.php#Node2"); break; … default:; } } |
Then, in the <body>
tag of ‘manual.html’:
<body onLoad="redirect();"> |
Once again, this is something the software which generated the referent manual has to do in advance, it's not something the software generating the actual cross-reference in the present manual can control.
Ultimately, we hope to allow for an external configuration file to control which manuals are available from where, and how.