VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/docsrc/dev_ref/createnewp.xml@ 99507

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

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

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.9 KB
 
1<?xml version="1.0" encoding="utf-8"?>
2<!-- This file is part of the DITA Open Toolkit project hosted on
3 Sourceforge.net. See the accompanying license.txt file for
4 applicable licenses.-->
5<!-- (C) Copyright IBM Corporation 2005, 2006. All Rights Reserved. -->
6<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
7 "..\..\..\dtd\task.dtd">
8<task id="createnewp" xml:lang="en-us">
9<title>Create new plug-in</title>
10<taskbody>
11<steps>
12<step><cmd>Create a new directory in <filepath>/plugins</filepath> directory, such as
13 <userinput>/plugin/pluginA</userinput>.</cmd>
14<info>Under the created directory, include the following
15 subdirectories:<lines>plugins/
16 pluginA/
17 dtd
18 schema
19 catalog
20 xsl
21 lib</lines><note>Not
22 all above subdirectories are required. However, it is strongly suggested to use the
23 structure and those subdirectories above to make all files systematically. You also can
24 create files under other directories, such as python/ or vb/.</note></info></step>
25<step><cmd>Specify the types of topic, such as task, reference or concept.</cmd>
26<substeps>
27<substep><cmd>Put the dtd files into dtd directory.</cmd></substep>
28<substep><cmd>Put schema files into schema directory.</cmd></substep>
29</substeps>
30</step>
31<step><cmd>Put the necessary catalog information about the plug-in from your
32own catalog file into catalog directory.</cmd></step>
33<step><cmd>Define the transformation for the new specialization and put it
34into xsl directory.</cmd></step>
35<step><cmd>Provide the Ant script to use the xsl file with preprocess with
36default ant script template, and put it into pluginA root directory.</cmd>
37</step>
38<step><cmd>Put the complied necessary JAR files into lib directory.</cmd>
39</step>
40<step><cmd>Provide a description file named puglin.xml in pluginA root directory.
41It informs the toolkit how to integrate the function of the new plug-in.</cmd>
42<info>This file is an xml file. It's not validated by either dtd file or schema
43file. Following specification shows you how to write the description file: </info>
44<substeps>
45<substep><cmd>An example of the plugin.xml is shown below:</cmd><stepxmp><lines>&lt;plugin id="org.dita.dost.pluginA">
46 &lt;require plugin="base_pluginA"/>
47 &lt;feature extension="dita.conductor.lib.import" value="pluginA.jar" type="file"/>
48 &lt;feature extension="dita.conductor.transtype.check" value="newoutput" type="txt"/>
49 &lt;feature extension="dita.conductor.target" value="pluginA_antscript.xml" type="file"/>
50 &lt;feature extension="dita.specialization.catalog" value="pluginA_catalog-dita.xml" type="file"/>
51 &lt;feature extension="dita.xsl.xhtml" value="xsl/pluginA2xhtml.xsl" type="file"/>
52&lt;/plugin>
53</lines></stepxmp></substep>
54<substep><cmd>Use &lt;plugin>&lt;/plugin> tagsto define the root element for
55plugin.xml. Set the id attribute, which is uniqute and necessary for each
56plug-in.</cmd></substep>
57<substep><cmd>Under &lt;plugin> element, use &lt;require> element to specify
58which plug-in is needed by pluginA. The plugin attribute is used to specify
59the ID of the plug-in which is needed by pluginA. </cmd><info>This element
60is not necessary if pluginA is loaded as an independent plug-in. However,
61pluginA might not function after being loaded if another plug-in is needed,
62which is not specified by a &lt;require> element. </info></substep>
63<substep><cmd>The &lt;feature> tag specifies the extension point that is extended
64and how it's extended in pluginA.</cmd><info> For example, <userinput>&lt;feature
65extension="dita.xsl.xhtml" value="xsl/pluginA2xhtml.xsl" type="file"/></userinput> means
66adding new specific logic transformed from DITA to xhtml into pluginA. The
67logic is written in file xsl/pluginA2xhtml.xsl in pluginA directory. <userinput>type="file"</userinput> means
68that the type of value is file name.</info><info>Another example, <userinput>&lt;feature
69extension="dita.conductor.transtype.check" value="newoutput" type="txt"/></userinput> means
70extending "dita.conductor.transtype.check" in pluginA. Another type of transformation
71output for DITA-OT and the check logic for parameter transtype in DITA-OT
72are to be added. The new transformation output is named <userinput>newoutput</userinput>. <userinput>type="txt"</userinput> means
73the value is text not a file name.</info><info>There are certain <userinput>extension
74point</userinput> which can be defined here. See <xref href="createplugin.xml#createplugin/extpoint"></xref> for
75more details.</info></substep>
76</substeps>
77</step>
78<step><cmd>Package all the subdirectories and files under pluginA to a zip
79binary file. Create a DITA Open Toolkit plug-in file for distribution.</cmd>
80</step>
81<step><cmd>Test the usability of plug-in files when integrating into DITA
82Opent Toolkit base.</cmd></step>
83<step><cmd>Put the zip binary file on a Web site, such as the DITA OT SourceForge
84Web site.</cmd></step>
85</steps>
86</taskbody>
87</task>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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