VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/docsrc/dev_ref/plugin-dependencies.dita@ 99040

最後變更 在這個檔案從99040是 98584,由 vboxsync 提交於 2 年 前

Docs: bugref:10302. Setting svn properties of DITA-OT library.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.4 KB
 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--Arbortext, Inc., 1988-2011, v.4002-->
3<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
4 "reference.dtd">
5<?Pub Inc?>
6<reference id="plugin-dependencies" xml:lang="en-us">
7<title>Managing plug-in dependencies</title>
8<shortdesc>The <codeph>&lt;require></codeph> element in a <filepath>plugin.xml</filepath> file
9is used to create a dependency on another plug-in. The <codeph>&lt;require></codeph> element
10requires the <codeph>plugin</codeph> attribute in order to reference
11the dependency.</shortdesc>
12<refbody>
13<section> <p>If the current plug-in requires a plug-in with <codeph>id="plugin-id"</codeph> before
14it can be installed, it would include the following: </p>
15 <codeblock>&lt;require plugin="<i>plugin-id</i>"></codeblock>
16 <p>Prerequisite plug-ins are integrated before the current plug-in
17is integrated. This does the right thing with respect to XSLT
18overrides. If your plug-in is a specialization of a specialization,
19it should <codeph>&lt;require></codeph> its base plug-ins, in order
20from general to specific. </p> <p>If a prerequisite
21plug-in is missing, a warning will be printed during integration.
22To suppress this, but keep the integration order if both plug-ins
23are present, add <codeph>importance="optional"</codeph> to
24the <codeph>&lt;require></codeph> element. </p> <p>If your plug-in
25can depend on any one of several optional plug-ins, separate the plug-in
26ids with a vertical bar. This is most useful when combined
27with importance="optional": </p> </section>
28<example><title>Example</title><p>The following plug-in will only
29be installed if the plug-in with id="com.example.primary" is available.
30If that one is not available, a warning will be generated during the
31integration process.</p><codeblock>&lt;plugin id="com.example.builds-on-primary">
32 &lt;!-- ...extensions here -->
33 &lt;require plugin="com.example.primary"/>
34&lt;/plugin></codeblock><p>The following plug-in will only be installed
35if either the plug-in with id="pluginA" or the plug-in with id="pluginB"
36are available. If neither of those are installed, the current plug-in
37will be ignored.</p><codeblock>&lt;plugin id="pluginC">
38 &lt;!-- ...extensions here -->
39 &lt;require plugin="pluginA|pluginB" importance="optional"/>
40&lt;/plugin></codeblock> </example>
41</refbody>
42</reference><?Pub Caret -3?>
43<?Pub *0000002467?>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette