<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT index EMPTY>
<!ATTLIST index
file CDATA #REQUIRED>
索引檔的配置標記:
<!ELEMENT index (entry)* >
<!ELEMENT entry (entry | topic)* >
<!ATTLIST entry keyword CDATA #REQUIRED >
<!ELEMENT topic EMPTY >
<!ATTLIST topic href CDATA #REQUIRED >
<!ATTLIST topic title CDATA #IMPLIED >
index 元素
index 元素代表索引的實例。 索引由項目組成,每個項目都對應於特定的關鍵字。 所有提供的索引都會合併到「說明系統」提供給使用者的主要索引。 當建置索引時,會按字母順序來附加項目。
entry 元素
entry 元素代表索引的關鍵字。 每個項目都含有若干鏈結通往關鍵字的相關說明主題。 另外,項目也可能是其他項目(子項目)的儲存檔案,以形成關鍵字的階層。 項目可以是子項目的儲存檔案,且可以同時有若干主題。
topic 元素
topic 元素提供關鍵字相關說明內容的參照。 href 屬性相對於 manifest 檔所屬的外掛程式。 如果您需要存取另一外掛程式中的檔案,您可以使用這個語法
<topic label="topic in another plug-in" href="../other.plugin.id/concepts/some_other_file.html" />
當單一關鍵字有多個相關聯的主題時,title 屬性用來命名說明內容的鏈結。 如果未指定這個屬性,標題會取自擁有鏈結的 TOC。 如果鏈結不屬於任何 TOC,便必須指定 title 屬性,否則,title 會成為未定義。
(在 plugin.xml 檔中)
<extension point=
"org.eclipse.help.index"
>
<index file=
"index.xml"
/>
</extension>
(在 index.xml 檔中)
<index>
<entry keyword="Vehicle">
<topic href="inventory_of_wheel.html"/>
<entry keyword="Car">
<topic href="car.html"/>
</entry>
<entry keyword="Ship">
<topic href="ship.html"/>
</entry>
<entry keyword="Airplane">
<topic href="airplane.html" title="History of aviation"/>
<topic href="jet.html" title="Jet engine"/>
</entry>
</entry>
<entry keyword="Engine">
<entry keyword="Horse">
<topic href="horse.html"/>
</entry>
<entry keyword="Steamer">
<topic href="steamer.html"/>
</entry>
<entry keyword="Wankel engine">
<topic href="wankel.html"/>
</entry>
<entry keyword="Jet engine">
<topic href="jet.html"/>
</entry>
</entry>
<entry keyword="Electricity">
<topic href="electricity.html"/>
</entry>
</index>
國際化索引 XML 檔可以翻譯,產生的副本(含已翻譯的關鍵字)應該放在 nl/<language>/<country> 或 nl/<language> 目錄中。 <language> 和 <country> 代表如語言環境碼所用,有兩個字母的語言碼和國碼。 例如,繁體中文轉換應該放在 nl/zh/TW 目錄中。 nl/<language>/<country> 目錄的優先順序比 nl/<language> 高。 只有在 nl/<language>/<country> 中找不到檔案時,才會使用常駐在 nl/<language> 中的檔案。 外掛程式的根目錄會在最後搜尋。
Copyright (c) 2006 Intel Corporation and others.
All
rights reserved.本程式與隨附的資料依照 Elipse Public License 1.0 版此次發行所隨附的條款而提供,
可以在以下網址取得:http://www.eclipse.org/legal/epl-v10.html