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