platform-help-home/migrating.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (view) (download) (as text)

1 : kkolosow 1.7 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 :     <html>
3 :     <head>
4 :     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5 :     <meta name="Description" content="Describes differences between 1.0 and 2.0 navigation and steps to convert 1.0 navigation to 2.0 syntax">
6 :     <meta name="GENERATOR" content="Mozilla/4.79 [en] (Windows NT 5.0; U) [Netscape]">
7 :     <title>Migrating Help Contributions</title>
8 :     <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css" type="text/css">
9 :     <style type="text/css">
10 :     <!--
11 :     .oldcode { font-family: monospace; background-color: #FFDDDD; font-size: small;}
12 :     .newcode { font-family: monospace; background-color: #DDDDFF; font-size: small;}
13 :     .oldsyntax { background-color: #FFDDDD; font-size: small;}
14 :     .newsyntax { background-color: #DDDDFF; font-size: small;}
15 :     -->
16 :     </style>
17 :     </head>
18 :     <body>
19 :    
20 :     <h2>
21 :     Migrating Online Help Contributions from version 1.0 to version 2.0</h2>
22 :     <a NAME="TOP"></a><a href="#INTRODUCTION">INTRODUCTION</a>
23 :     <br><a href="#DIFFERENCES">MAPPING BETWEEN 1.0 and 2.0 CONTRIBUTION MECHANISMS</a>
24 :     <br><a href="#STEPS">EXAMPLE</a>
25 :     <br><a href="#ADVANCED">ADVANCED CASES</a>
26 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; <a href="#CHILDREN">Handling topic having
27 :     different children in each of information views</a>
28 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; <a href="#STANDALONE">Handling standalone
29 :     information sets</a>
30 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; <a href="#MIDDLE">Handling single topic inserted
31 :     from the middle of a topic file</a>
32 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; <a href="#INTERNATIONALIZATION">Internationalization</a>
33 :     <h3>
34 :     <a NAME="INTRODUCTION"></a>INTRODUCTION</h3>
35 :     The 2.0 help system concepts are described in&nbsp; <a href="online_help2.0.html">Online
36 :     Help Changes</a> document.&nbsp; This document is designated to help converting
37 :     existing help contributions created for version 1.0 of help system to form
38 :     appropriate for use with the new help system.&nbsp; It contains comparison
39 :     of contributions in the old and new help system with suggested conversion
40 :     methods.&nbsp; Included is simple example of converting documentation specified
41 :     in 1.0 syntax to the 2.0 syntax.
42 :     <p><a href="#TOP">back to top</a>
43 :     <h3>
44 :     <a NAME="DIFFERENCES"></a>MAPPING BETWEEN 1.0 and 2.0 CONTRIBUTION MECHANISM</h3>
45 :     First, it is worth mentioning that that documentation content - the HTML
46 :     files do not change between the help system versions 1.0 and 2.0.&nbsp;
47 :     All documentation written and placed in a zip file does not have to be
48 :     edited.&nbsp; The changes affect files describing documentation structure:
49 :     information sets, views, topics, insert actions, and their file's descriptor
50 :     in plugin.xml.
51 :     <p>The largest part of the 1.0 help structure - the topics files, with
52 :     tree of "topic" elements, has not changed significantly.&nbsp; They can
53 :     be reused in 2.0 syntax with minimal changes.&nbsp; Both information set
54 :     files and action files have been eliminated.&nbsp; The information contained
55 :     in these files - how to integrate topics has its place inside the TOC files.
56 :     <p>The mechanism used for specifying integration of topics existing in
57 :     separate TOC available to help system is called linking.&nbsp; Linking
58 :     allows for associating a root of one tree with an arbitrary point in another
59 :     tree, to create bigger tree.&nbsp; This linking can be specified arbitrarily
60 :     in any of the two TOCs involved in the operation.&nbsp; This freedom allows
61 :     for any of the two approaches for creating table of contents for a product.&nbsp;
62 :     In top-down approach a TOC links the root of another TOC, in bottom-up
63 :     a TOC root links to an anchor point defined in another TOC.
64 :     <p>The following table identifies significant 1.0 help system artifacts
65 :     and their translation to 2.0 help system concepts.
66 :     <table BORDER COLS=2 WIDTH="100%" >
67 :     <caption>&nbsp;</caption>
68 :    
69 :     <tr>
70 :     <td VALIGN=TOP class="oldsyntax">
71 :     <center><b><font size=+2>1.0</font></b></center>
72 :     </td>
73 :    
74 :     <td VALIGN=TOP class="newsyntax">
75 :     <center><b><font size=+2>2.0</font></b></center>
76 :     </td>
77 :     </tr>
78 :    
79 :     <tr>
80 :     <td VALIGN=TOP class="oldsyntax"><b>extension point "org.eclipse.help.contributions"</b></td>
81 :    
82 :     <td VALIGN=TOP class="newsyntax"><b>extension point "org.eclipse.help.toc"</b></td>
83 :     </tr>
84 :    
85 :     <tr>
86 :     <td VALIGN=TOP class="oldsyntax"><b>three kinds of XML files describing
87 :     information sets and views, topics, and actions</b></td>
88 :    
89 :     <td VALIGN=TOP class="newsyntax"><b>one type of XML files describing tables
90 :     of contents</b></td>
91 :     </tr>
92 :    
93 :     <tr>
94 :     <td VALIGN=TOP class="oldsyntax"><b>topic XML file</b></td>
95 :    
96 :     <td VALIGN=TOP class="newsyntax"><b>TOC XML file</b></td>
97 :     </tr>
98 :    
99 :     <tr>
100 :     <td VALIGN=TOP class="oldsyntax"><b>topic file description in plugin.xml</b>
101 :     <br>&lt;extension point="org.eclipse.help.contributions">&nbsp;
102 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;topics name="topics.xml" />&nbsp;
103 :     <br>&lt;/extension></td>
104 :    
105 :     <td VALIGN=TOP class="newsyntax"><b>TOC file description in plugin.xml</b>
106 :     <br>&lt;extension point="org.eclipse.help.toc">&nbsp;
107 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;toc file="topics.xml" />&nbsp;
108 :     <br>&lt;/extension></td>
109 :     </tr>
110 :    
111 :     <tr>
112 :     <td VALIGN=TOP class="oldsyntax"><b>&lt;topic> element in topics file</b>
113 :     <br>&lt;topic id="topic1ID" label="Topic1" href="topic1.html" /></td>
114 :    
115 :     <td VALIGN=TOP class="newsyntax"><b>&lt;topic> element in TOC file</b>
116 :     <br>&lt;topic label="Topic1" href="topic1.html" />
117 :     <br>The "id" attribute is no longer used.&nbsp; A topic does not need to
118 :     be referred to from anywhere else.&nbsp; If topic files are converted to
119 :     TOC files and "id" attributes are left, help system will ignore them and
120 :     not generate errors.</td>
121 :     </tr>
122 :    
123 :     <tr>
124 :     <td VALIGN=TOP class="oldsyntax"><b>&lt;topics> element in topics file</b>
125 :     <br>&lt;topics id="topics3ID"></td>
126 :    
127 :     <td VALIGN=TOP class="newsyntax"><b>&lt;toc> element in TOC file</b>
128 :     <br>&lt;toc label="Topics3X">
129 :     <br>The "id" attribute is no longer required.&nbsp; The TOC is identified
130 :     by the URL of the file that defines it.
131 :     <br>e.g.&nbsp; "topics.xml" or "../myPluginID/topics.xml" if referred from
132 :     another plugin.
133 :     <br>Each TOC needs a label that describes content of the TOC, and may be
134 :     visible to the end user if the TOC is included in the documentation library
135 :     as top level TOC.</td>
136 :     </tr>
137 :    
138 :     <tr>
139 :     <td VALIGN=TOP class="oldsyntax"><b>information set XML file</b></td>
140 :    
141 :     <td VALIGN=TOP class="newsyntax"><b>TOC XML file designated as primary</b>
142 :     <br>Any TOC can play a role of the "old" information set by being designated
143 :     as primary.&nbsp; The primary TOCs can be displayed as top level TOC to
144 :     the user.</td>
145 :     </tr>
146 :    
147 :     <tr>
148 :     <td VALIGN=TOP class="oldsyntax"><b>information set file description in
149 :     plugin.xml</b>
150 :     <br>&lt;extension point="org.eclipse.help.contributions">&nbsp;
151 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;infoset name="infoset.xml" />
152 :     <br>&lt;/extension></td>
153 :    
154 :     <td VALIGN=TOP class="newsyntax"><b>primary TOC file description in plugin.xml</b>
155 :     <br>&lt;extension point="org.eclipse.help.toc">&nbsp;
156 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;toc file="topics.xml" primary="true" />&nbsp;
157 :     <br>&lt;/extension></td>
158 :     </tr>
159 :    
160 :     <tr>
161 :     <td VALIGN=TOP class="oldsyntax"><b>information set</b>
162 :     <br>&lt;infoset id="myInfoSetID"&nbsp; label="MyInfoSetLabel" >&nbsp;
163 :     <p>&nbsp;</td>
164 :    
165 :     <td VALIGN=TOP class="newsyntax"><b>primary TOC</b>
166 :     <br>&lt;toc label="MyInfoSetLabel">&nbsp;
167 :     <br>The "id" attribute is no longer required.&nbsp; The TOC is identified
168 :     by the URL of the file that defines it.
169 :     <br>When TOC is displayed to the user its label plays the same role as&nbsp;
170 :     the information set label in version 1.0.</td>
171 :     </tr>
172 :    
173 :     <tr>
174 :     <td VALIGN=TOP class="oldsyntax"><b>standalone information set</b></td>
175 :    
176 :     <td VALIGN=TOP class="newsyntax"><b>primary TOC</b></td>
177 :     </tr>
178 :    
179 :     <tr>
180 :     <td VALIGN=TOP class="oldsyntax"><b>information view</b>
181 :     <br>&lt;infoview id="myInfoViewID" label="MyInfoViewLabel" /></td>
182 :    
183 :     <td VALIGN=TOP class="newsyntax"><b>primary TOC</b>
184 :     <br>&lt;toc label="MyInfoViewLabel">
185 :     <br>All primary TOCs appear in the documentation library.&nbsp; They can
186 :     be linked to other TOCs, and then do not show as top level TOC, but are
187 :     available as part of another TOC.
188 :     <br>The "id" attribute is no longer required.&nbsp; The TOC is identified
189 :     by the URL of the file it is defined in.
190 :     <br>When TOC is displayed to the user its label plays the same role as&nbsp;
191 :     the information set label in version 1.0.</td>
192 :     </tr>
193 :    
194 :     <tr>
195 :     <td VALIGN=TOP class="oldsyntax"><b>actions XML file</b></td>
196 :    
197 :     <td VALIGN=TOP class="newsyntax"><b>-</b>
198 :     <br>Linking is specified directly in the involved TOC files.</td>
199 :     </tr>
200 :    
201 :     <tr>
202 :     <td VALIGN=TOP class="oldsyntax"><b>&lt;insert> element in actions file</b>
203 :     <br>&lt;insert from="topicsID" to="topicID" /></td>
204 :    
205 :     <td VALIGN=TOP class="newsyntax"><b>&lt;link> element in one of the linked
206 :     TOC files</b>
207 :     <br>&lt;link toc="topics.xml" />
208 :     <br><b>OR</b>
209 :     <br><b>&lt;anchor> element in one TOC files and "link_to" attribute in&lt;toc>
210 :     element in the second TOC file</b>
211 :     <br>&lt;anchor id="topicsID"/>
212 :     <br>&lt;toc label="Topics Label" link_to="topics.xml#topicsID" />
213 :     <br>"as" attribute is not needed, as location of &lt;link> or &lt;anchor>
214 :     element uniquely define point of integration.&nbsp; Multiple &lt;anchor>
215 :     elements can be used to achieve desired order of TOCs linked such they
216 :     become children of the same topic.</td>
217 :     </tr>
218 :    
219 :     <tr>
220 :     <td VALIGN=TOP class="oldsyntax"><b>&lt;insert from="anotherPluginID.topicsID"
221 :     to="topicID" /></b>
222 :     <br>inserting topics from another plugin to topic in this plugin</td>
223 :    
224 :     <td VALIGN=TOP class="newsyntax"><b>&lt;link toc="../anotherPluginID/topics.xml
225 :     /></b>
226 :     <br>"link" is placed in TOC file as a child of the topic previously identified
227 :     by the "to" attribute.</td>
228 :     </tr>
229 :    
230 :     <tr>
231 :     <td VALIGN=TOP class="oldsyntax"><b>&lt;insert from="topicsID" to="anotherPluginID.topicID"
232 :     /></b>
233 :     <br>inserting topics from this plugin to topic in another plugin</td>
234 :    
235 :     <td VALIGN=TOP class="newsyntax"><b>&lt;anchor id="topicsID"/></b>
236 :     <br><b>&lt;toc link_to="../anotherPluginID/topics.xml#topicsID"...&nbsp;</b>
237 :     <br>&lt;anchor> element is placed in the other plugin's toc file as child
238 :     of a topic previously identified by "to" attribute.
239 :     <br>"link_to" attribute isadded to &lt;toc> element previously identified
240 :     by a "from" attribute.</td>
241 :     </tr>
242 :    
243 :     <tr>
244 :     <td VALIGN=TOP class="oldsyntax"><b>&lt;insert from="anotherPluginID/topicsID"
245 :     to="differentPluginID.topicID" /></b>
246 :     <br>inserting topics where both "from" and "to" attributes refer to other
247 :     plugins</td>
248 :    
249 :     <td VALIGN=TOP class="newsyntax"><b>-</b>
250 :     <br>It is not possible to specify linking of a third plugins without involving
251 :     own TOC</td>
252 :     </tr>
253 :    
254 :     <tr>
255 :     <td VALIGN=TOP class="oldsyntax"><b>multiple doc.properties file</b></td>
256 :    
257 :     <td VALIGN=TOP class="newsyntax"><b>multiple TOC files</b></td>
258 :     </tr>
259 :     </table>
260 :    
261 :     <p>The above table shows that both the information set and information
262 :     view map to the primary TOC.&nbsp; The process for creating is:
263 :     <p>A primary TOC should be created for each view.&nbsp; It should be labeled
264 :     after the view name, and have topics that were inserted immediately under
265 :     the view as its content.&nbsp;&nbsp; TOCs will be shown to the user as
266 :     the top level TOC in the documentation library.
267 :     <p>Another primary TOC can be created for an information set and named
268 :     the same as the information set.&nbsp; It should contain newly created
269 :     topics corresponding to the information views, and links to integrate the
270 :     TOCs corresponding to the views:
271 :     <br>&nbsp;
272 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
273 :     <tr>
274 :     <td class="newcode">&lt;toc label="MyInfoSetLabel" >
275 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic label="MyInfoView1Label">
276 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;link
277 :     toc="view1.xml" />
278 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/topic>
279 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic label="MyInfoView2Label">
280 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;link
281 :     toc="view2.xml" />
282 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/topic>
283 :     <br>&lt;/toc></td>
284 :     </tr>
285 :     </table>
286 :    
287 :     <p>The end effect will be that this TOC will appear as the top level TOC
288 :     in the documentation library, and will contain views and their topics in
289 :     its structure.
290 :     <p>Using the TOC corresponding to the information set is optional.&nbsp;
291 :     If corresponding infoset.xml file is not created (or not used), the documentation
292 :     library will contains TOCs for the views as the top level TOCs.
293 :     <p><a href="#TOP">back to top</a>
294 :     <h3>
295 :     <a NAME="STEPS"></a>EXAMPLE - A plugin defining an information set, information
296 :     view, and a single topic file, with second plugin contributing more topic
297 :     files.</h3>
298 :     The documentation consisted of topics contributed by two plugins.&nbsp;
299 :     The first plugin also defined an information set, an information view and
300 :     actions to wire topics into the view.&nbsp; The documentation&nbsp; could
301 :     have been described in 1.0 syntax as follows:
302 :     <p>In plugin 1
303 :     <br>topics.xml:
304 :     <br>&nbsp;
305 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
306 :     <tr>
307 :     <td class="oldcode">&lt;topics id="allTopicsID">
308 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic id="topic1ID" label="Topic1"
309 :     href="topic1.html" />
310 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic id="topic2ID" label="Topic2"
311 :     />
312 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic id="topic3ID" label="Topic3"
313 :     href="topic3.html" />
314 :     <br>&lt;/topics></td>
315 :     </tr>
316 :     </table>
317 :    
318 :     <p>infoset.xml:
319 :     <br>&nbsp;
320 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
321 :     <tr>
322 :     <td class="oldcode">&lt;infoset id="myInfoSetID"&nbsp; label="MyInfoSetLabel"
323 :     >
324 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;infoview id="myInfoViewID" label="MyInfoViewLabel"
325 :     />
326 :     <br>&lt;/infoset></td>
327 :     </tr>
328 :     </table>
329 :    
330 :     <p>and actions.xml:
331 :     <br>&nbsp;
332 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
333 :     <tr>
334 :     <td class="oldcode">&lt;actions infoview="myInfoViewID">
335 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;insert from="plugin1.allTopicsID"
336 :     to="plugin1.myInfoViewID" />
337 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;insert from="plugin2.topics3ID"
338 :     to="plugin1.topic2ID" />
339 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;insert from="plugin2.topics3ID"
340 :     to="plugin1topic3ID" />
341 :     <br>&lt;/actions>&nbsp;</td>
342 :     </tr>
343 :     </table>
344 :    
345 :     <p>In plugin 2
346 :     <br>topics2.xml:
347 :     <br>&nbsp;
348 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
349 :     <tr>
350 :     <td class="oldcode">&lt;topics id="topics2ID">
351 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic id="topic21ID" label="Topic21"
352 :     href="topic21.html" />
353 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic id="topic22ID" label="Topic22"
354 :     href="topic22.html" />
355 :     <br>&lt;/topics></td>
356 :     </tr>
357 :     </table>
358 :    
359 :     <p>topics3.xml:
360 :     <br>&nbsp;
361 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
362 :     <tr>
363 :     <td class="oldcode">&lt;topics id="topics3ID">
364 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic id="topic31ID" label="Topic31"
365 :     href="topic31.html" />
366 :     <br>&lt;/topics></td>
367 :     </tr>
368 :     </table>
369 :    
370 :     <p>The procedure to convert this contribution to 2.0 syntax is as follows:
371 :     <p>1.&nbsp; Rename topics.xml to view.xml, as topics.xml defined topic
372 :     that were inserted directly into the view.
373 :     <br>2.&nbsp; Rename the "topics" element to "toc".
374 :     <br>3.&nbsp; Add the "label" attribute to the "toc" element in the view.xml.&nbsp;
375 :     Its value is a label of your old information view.
376 :     <br>4.&nbsp; Add "label" attribute to the "toc" element in the topics2.xml
377 :     and topics3.xml.&nbsp; Use a description of the topics in those files as
378 :     the attribute value.&nbsp; It will not be visible to the end user.
379 :     <br>5.&nbsp; Link topics files together by adding "link" element as a child
380 :     of Topic2 with attribute "toc" set to relative URL of topics2.xml, and
381 :     adding "link" element as a child of Topic3 with attribute "toc" set to
382 :     URL of topics3.xml.
383 :     <br>6.&nbsp; Remove your infoset.xml and actions.xml files.
384 :     <br>7.&nbsp; You may remove "id" attributes from within your topic.xml
385 :     file.
386 :     <p>Since information set contained only one view, it makes sense not to
387 :     use the TOC corresponding to the information set.&nbsp; Such TOC would
388 :     contain only one topic (for the view) and its children.
389 :     <p>After conversion you will end up with files:
390 :     <p>In plugin 1
391 :     <br>view.xml:
392 :     <br>&nbsp;
393 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
394 :     <tr>
395 :     <td class="newcode">&lt;toc label="MyInfoViewLabel">
396 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic label="Topic1" href="topic1.html"
397 :     />
398 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic label="Topic2" >
399 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;link
400 :     toc="../plugin2/topics2.xml" />
401 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/topic>
402 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic label="Topic3" href="topic3.html">
403 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;link
404 :     toc="../plugin2/topics3.xml" />
405 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/topic>
406 :     <br>&lt;/toc></td>
407 :     </tr>
408 :     </table>
409 :    
410 :     <p>In plugin2
411 :     <br>topics2.xml:
412 :     <br>&nbsp;
413 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
414 :     <tr>
415 :     <td class="newcode">&lt;toc label="Topics2X">
416 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic label="Topic21" href="topic21.html"
417 :     />
418 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic label="Topic22" href="topic22.html"
419 :     />
420 :     <br>&lt;/toc></td>
421 :     </tr>
422 :     </table>
423 :    
424 :     <p>topics3.xml:
425 :     <br>&nbsp;
426 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
427 :     <tr>
428 :     <td class="newcode">&lt;toc label="Topics3X">
429 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic label="Topic31" href="topic31.html"
430 :     />
431 :     <br>&lt;/toc></td>
432 :     </tr>
433 :     </table>
434 :    
435 :     <p>The extensions for "org.eclipse.help.contributions" point in plugin.xml
436 :     that looked like:
437 :     <br>&nbsp;
438 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
439 :     <tr>
440 :     <td class="oldcode">&lt;extension point="org.eclipse.help.contributions">
441 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;infoset name="infoset.xml" />
442 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topics name="topics.xml" />
443 :     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;actions name="actions.xml" />
444 :     <br>&lt;/extension></td>
445 :     </tr>
446 :     </table>
447 :    
448 :     <p>in plugin1, and in plugin2:
449 :     <br>&nbsp;
450 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
451 :     <tr>
452 :     <td class="oldcode">&lt;extension point="org.eclipse.help.contributions">
453 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;topics name="topics2.xml" />&nbsp;
454 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;topics name="topic3.xml" />&nbsp;
455 :     <br>&lt;/extension></td>
456 :     </tr>
457 :     </table>
458 :    
459 :     <p>They need to be replaced with descriptions for new extension for "org.eclipse.help.toc"
460 :     point, that might be done step by step:
461 :     <p>1.&nbsp; Change value of the "point" to org.eclipse.help.toc.
462 :     <br>2.&nbsp; Delete information set and action elements
463 :     <br>3.&nbsp; Rename "topics" elements to "toc" element and "name" attributes
464 :     to "file".
465 :     <br>4.&nbsp; Change "topics.xml" file attribute value to "view.xml".
466 :     <br>5.&nbsp; Add attribute "primary" with value "true" to the toc element
467 :     pointing to topics.xml.
468 :     <p>At the end the extension for the contributions will have a form:
469 :     <br>&nbsp;
470 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
471 :     <tr>
472 :     <td class="newcode">&lt;extension point="org.eclipse.help.toc">
473 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;toc file="view.xml" primary="true" />
474 :     <br>&lt;/extension></td>
475 :     </tr>
476 :     </table>
477 :    
478 :     <p>in plugin.xml of plugin1, and for plugin2 will look:
479 :     <br>&nbsp;
480 :     <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
481 :     <tr>
482 :     <td class="newcode">&lt;extension point="org.eclipse.help.toc">
483 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;toc file="topics2.xml" />
484 :     <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;toc file="topics3.xml" />
485 :     <br>&lt;/extension></td>
486 :     </tr>
487 :     </table>
488 :    
489 :     <p><a href="#TOP">back to top</a>
490 :     <h3>
491 :     <a NAME="ADVANCED"></a>Advanced Scenarios</h3>
492 :    
493 :     <h4>
494 :     <a NAME="CHILDREN"></a>Handling topic having different children in each
495 :     of information views</h4>
496 :     In 1.0 navigation each view was completely independent from other views,
497 :     and acted like a name space.&nbsp; Each topic could exist only once in
498 :     a view, but could be inserted into multiple views.&nbsp; In 2.0 help system,
499 :     there is no views.&nbsp; In the new help system, a TOC can be linked multiple
500 :     times by one or many other TOCs.&nbsp; The links are valid across all documentation
501 :     library.
502 :     <p>If in 1.0 navigation, a topic ("topic" element in a topics file, not
503 :     the html document) existed in multiple views, and there were actions defined,
504 :     that inserted more topics as descendants of that topic, these actions could
505 :     have created topic sub-trees that were different between the views.&nbsp;
506 :     If those actions were converted to links in 2.0 TOC file, the involved
507 :     topic's sub-tree would be a sum of topics that existed in all of the information
508 :     views.&nbsp; To avoid this effect,&nbsp; a different topic must be used
509 :     in all instances where topic's children differed.&nbsp; This can be accomplished
510 :     by creating a copy of the TOC file containing the given topic.&nbsp; The
511 :     copies of TOC can still contain a topic pointing to the same HTML document,
512 :     but the TOCs do not need to be the same.&nbsp; One should link children
513 :     that were present in one view, and the other copy should link children
514 :     present in a different view.
515 :     <h4>
516 :     <a NAME="STANDALONE"></a>Handling standalone information sets</h4>
517 :     Since it was impossible to link information sets together in 1.0 help system,
518 :     a component anticipating possibility of having its documentation integrated
519 :     by another information set would mark its information set as standalone.&nbsp;
520 :     This version of help system does not require any special action on this
521 :     component side to cover this scenario.&nbsp; If no other component link
522 :     to this component TOC, the TOC will be visible as the top level TOCs.&nbsp;
523 :     If it is linked by another TOC, it will be present inside that TOC structure
524 :     only.
525 :     <p>A component that used topic or topics from another component that defined
526 :     a standalone Information Set, should avoid this in version 2.0 of help.&nbsp;
527 :     To include another component's documentation under its own, the component
528 :     should link a primary TOC of the other component.
529 :     <h4>
530 :     <a NAME="MIDDLE"></a>Handling single topic inserted from the middle of
531 :     a topic file</h4>
532 :     If insert action existed in 1.0 contribution that was inserting a topic
533 :     from the middle of a topic file, as opposed to inserting all topics of
534 :     that file by specifying topics id, such insert action cannot be directly
535 :     translated into a single link in 2.0 navigation.&nbsp; The problem needs
536 :     to be solved by different way of grouping topics in topic or TOC files.&nbsp;
537 :     The granularity ot TOC files can be reduces or copies of TOC can be created.&nbsp;
538 :     The approach taken will depend on a specific circumstances.
539 :     <h4>
540 :     <a NAME="INTERNATIONALIZATION"></a>Internationalization</h4>
541 :     The 2.0 help system expects the TOC XML files to be translated, and will
542 :     look for the TOC under &lt;plugin install dir>/nl/&lt;language>/&lt;country>
543 :     and &lt;plugin install dir>/nl/&lt;language>/ directories.&nbsp; If strings
544 :     from 1.0 help contributions were externalized to property files, they need
545 :     to be put back into the topics files (now TOC).&nbsp; If translated properties
546 :     are already available, multiple copies of the TOCs can be created and placed
547 :     under appropriate locale directories.&nbsp; Each of the TOCs should be
548 :     filled with string from the corresponding property file.&nbsp; Since format
549 :     of property files and XML differ, attention must be paid to encoding of
550 :     characters.&nbsp; Characters that are not part of ISO 8859-1 encoding and
551 :     were encoded using \uXXXX format in property files, no longer need to be
552 :     encoded.&nbsp; Special characters can be encoded using in XML using &amp;#xXX;
553 :     format.
554 :     <p>
555 :     When escaping special characters such as '\n', rules for XML PCDATA sections apply now, instead of rules for Java
556 :     properties.
557 :     You can use &amp;#x0A; or just have multiple lines in the <description> element.
558 :     </p>
559 :    
560 :    
561 :     <p><a href="#TOP">back to top</a>
562 :     </body>
563 :     </html>