anchor
元素來明確指定這些提供點,以「宣告」它可以接受提供的內容。
之後,便可以在執行時期,將 XHTML 片段動態插入這些文件中。
<!ELEMENT extension (contentExtension+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT contentExtension EMPTY>
<!ATTLIST contentExtension
file CDATA #REQUIRED>
定義一或多個「說明系統」頁面的內容延伸。
內容延伸規格檔的位置由 file
屬性指定。
<contentExtension>
<topicExtension content=
"plugin/relative/path/topicExtensionFile.xhml"
path=
"plugin_id/path_to_xhtml_file/anchor_id"
/>
<topicReplace content=
"topicReplaceFile.xhml"
path=
"plugin_id/path_to_xhtml_file/element_id"
/>
</contentExtension>
topicExtension
是用來在目標錨點位置插入內容的標記。
topicReplace
是用來將目標元素內容取代為指定內容的標記。
換句話說,內容可以提供成加到目標位置或取代目標位置的內容。(在 plugin.xml 檔中)
<extension point=
"org.eclipse.help.contentExtension"
>
<contentExtension file=
"contentExtensionFile.xml"
/>
</extension>
(在 contentExtensionFile.xml 檔中)
<contentExtension>
<topicExtension content=
"xhtml/topicA.xhtml"
path=
"org.xxx.yyy.somePluginId/xhtml/someHelpPage.xhtml/topicAnchor"
/>
</contentExtension>
上述構成要素將 XHTML 檔 topicA.xhtml 的內容插入 path 屬性所指定的目標「說明」系統頁面中。 在這個情況下,內容延伸規格會插入 org.xxx.yyy.somePluginId 外掛程式 someHelpPage.xhtml 頁面內,稱為 topicAnchor 之錨點的位置中。
上述構成要素將 XHTML 檔 topicA.xhtml 的內容插入 path 屬性所指定的目標「說明」系統頁面中。 在這個情況下,內容延伸規格會插入 org.xxx.yyy.somePluginId 外掛程式 someHelpPage.xhtml 頁面內,稱為 topicAnchor 之錨點的位置中。
Copyright (c) 2000, 2006 IBM Corporation and others.
All
rights reserved.本程式與隨附的資料依照 Elipse Public License 1.0 版此次發行所隨附的條款而提供,
可以在以下網址取得:http://www.eclipse.org/legal/epl-v10.html