RSuite™ CMS and the RSuite CMS logo is a trademarks of Orbis Technologies, Inc.
Copyright © 2016 Orbis Technologies, Inc. All rights reserved.
This is a confidential document only to be shared with current RSuite customers and others designated by Orbis Technologies.
For more information on RSuite or Orbis Technologies, visit:
The PDF version of this document is created with the RenderX XEP FO engine integrated with the DITA Open Toolkit. See www.renderx.com for product details.
Starting with RSuite CMS 4.1, RSuite includes a default DITA Open Toolkit (OT) for producing output from within RSuite. The default OT contains doctypes (DTD) and extensions you are most likely to use in RSuite:
DITA OT doctypes and extensions are delivered as RSuite plug-ins. When an RSuite plug-in containing a DITA configuration is deployed, RSuite puts the configuration in a new or existing OT folder and loads the DTDs into RSuite. The OT folders, including the default OT, are in the rsuite-root/integration/ folder.
This guide describes:
RSuite is delivered with a DITA Open Toolkit named "default" in rsuite-root/integration. RSuite plug-ins and custom code refer to OTs by name.
We recommend that your default version be the version that RSuite is using. This ensures that you are using an OT version that has been tested with other RSuite features.
RSuite CMS 4.1 and 5.0.3 were released with OT version 1.8.5.
Perform these steps to enable the default Open Toolkit:
toolkits=default default.path=C:/rsuite-root/integration/DITA-OTot_version default.version=ot_version
2016-07-21 14:42:59.493 rsuite-server INFO [localhost-startStop-1] <startup> com.reallysi.RSuiteStartup - getOpenToolkitConfigFile(): Using configuration file "c:\dev\rsuite\rsuite5\rsuite\conf\dita-open-toolkits.properties"... 2016-07-21 14:42:59.505 rsuite-server INFO [localhost-startStop-1] <startup> com.reallysi.rsuite.system.xml.DitaOpenToolkitManagerImpl - loadConfiguration(): Loading Open Toolkit named "default", version=1.8.5, path "C:/dev/rsuite/rsuite5/rsuite/integration/DITA-OT1.8.5" 2016-07-21 14:42:59.505 rsuite-server INFO [localhost-startStop-1] <startup> com.reallysi.rsuite.system.xml.DitaOpenToolkitManagerImpl - loadConfiguration(): Replacing default default Open Toolkit with loaded toolkit.
When you deploy or redeploy an RSuite plug-in, RSuite reads the plug-in and deploys its DITA configurations to the OTs, integrates them, and loads or reloads them. Restarting RSuite in effect redeploys the plug-ins, so RSuite reprocesses plug-ins' DITA configurations when it restarts.
Upgrading RSuite overwrites the integration folder; the old information is discarded. However, when an RSuite plug-in is removed, its DITA configuration is not removed from the OT folder or from RSuite until RSuite is restarted.
The previous chapter, Enable the default Open Toolkit, shows how to configure the DITA Open Toolkit properties file (rsuite-root/conf/dita-open-toolkits.properties) for the default OT:
toolkits=default default.path=C:/rsuite-root/integration/DITA-OT1.8.5 default.version=1.8.5
It can be convenient to have more than one DITA OT at a time, e.g.:
This example shows changes you would use to reconfigure the DITA open toolkit properties file when you:
toolkits=default,ot_test
toolkits=default,ot_test default.path=C:/rsuite-root/integration/DITA-OT1.8.5 default.version=1.8.5 ot_test.path=C:/rsuite-root/test_integration/DITA-OT2.0 ot_test.version=2.0
This chapter describes how to deploy DITA Open Toolkit (OT) doctypes and extensions that most RSuite installations use with DITA content, including:
There are other plug-ins that a DITA project can require:
<rsuite-plugin id="my-rsuite-plugin" dependsOn="rsuite-dita-ot-plugin"> … </rsuite-plugin>
As of 27 July 2016, the current versions of the RSuite DITA plug-ins are:
Plug-in | Versions for |
---|---|
rsuite-dita-support-actions-plugin-1.x.jar | 1.0-1.1 |
rsuite-dita-support-workflows-plugin-1.x.jar | 1.0-1.2 |
rsuite-dita-support-plugin-1.4.jar | 1.4 |
rsuite-dita-ot-plugin-1.4.jar | 1.4 |
Plug-in | Versions for |
---|---|
rsuite-dita-support-actions-plugin-2.0.jar | 2.0 |
rsuite-dita-support-workflows-plugin-2.0.jar | 2.0 |
rsuite-dita-support-plugin-2.0.jar | 2.0 |
rsuite-dita-ot-plugin-1.4.jar | 1.4 |
RSuite CMS 4.1 added two instances of support for DITA Open Toolkit (OT):
You can now configure custom DITA doctypes in the rsuite-plugin.xml file, as well as with groovy scripts as in earlier versions: You package your OT extension in the RSuite plug-in—organizing your extensions, project source code, and jar however you like—and use rsuite-plugin.xml to tell RSuite the paths to the files in the plug-in jar, as well as paths to files inside ZIP files in the plug-in jar.
Groovy scripting and rsuite-plugin.xml should not be used to configure schemata in the same OT.
The declaration of an Open Toolkit in rsuite-plugin.xml has this form:
<extensionProvider> <ditaOpenToolkit toolkitName="xxx"> <toolkitPlugin> <zipfile>xx.zip</zipfile> <doctype> <file>path/xx.dtd</file> <previewXsl>path/xx.xsl</previewXsl> <managedObjectDefinitions> <moDef/> <moDef/> </managedObjectDefinitions> </doctype> </toolkitPlugin> </ditaOpenToolkit> </extensionProvider>
Within an extensionProvider element, each OT is configured as <ditaOpenToolkit toolkitName="name">, where the value of the toolkitName attribute matches a toolkit specified in the dita-open-toolkits.properties file (rsuite-root/conf/dita-open-toolkits.properties).
Toolkit extensions are packaged in ZIP files that are called toolkit plug-ins and defined in toolkitPlugin elements, e.g., <toolkitPlugin toolkitPluginId="com.mycompany.book.doctypes">. The toolkitPluginId attribute can be any unique string, but by convention it is the path in the plug-in jar to the ZIP file. An OT can have more than one toolkit plug-in declared.
Besides zipfile elements, toolkitPlugin elements contains doctype elements if the extensions include doctypes.
There is a sample rsuite-plugin.xml, with explanatory comments, in Figure 3.
Perform these steps to add custom extensions to a DITA OT, such as default.
<toolkitPlugin toolkitPluginId="com.reallysi.rsuite.doctypes"> … </toolkitPlugin>
<toolkitPlugin toolkitPluginId="net.sourceforge.dita4publishers.doctypes"> … </toolkitPlugin>
Each toolkitPlugin element has a zipfile element. It must also have a doctype element for each DTD it contains.
<doctype type="DTD" publicId="com.mycompany.book:doctypes:dita:topic"> <file>path/xx.dtd</file> <previewXsl>path/xx.xsl</previewXsl> <managedObjectDefinitions> <moDef/> </managedObjectDefinitions> </doctype>
Doctype elements contain file, previewXsl, and managedObjectDefinitions elements.
The preview XSL is the script that RSuite uses to display HTML previews of XML files.
Managed object definitions determine how much detail RSuite displays about a document that uses a schema in the toolkit plug-in. Managed object definitions tell RSuite what sub-elements of a DTD to look for in a document and how to display them in a list, for instance, in the RSuite Content view, as shown in Figure 2. A document element that is not configured in a managed object definition is not displayed, but this does not affect how output is created.
<doctype type="DTD" publicId="com.mycompany.book:doctypes:dita:topic"> <file>doctypes/topic/dtd/topic.dtd</file> <managedObjectDefinitions> <moDef name="concept" displayNameXPath="title" /> <moDef name="table" displayNameXPath="if (*[contains(@class, ' topic/title ')]) then *[contains(@class, ' topic/title ')] else if (@title) then string(@title) else '{No title found}'" /> <moDef name="section" displayNameXPath="title" </managedObjectDefinitions>
<extensionProvider id="rsuite.ditaOpenToolkit"> <!-- A new extension type provider. --> <ditaOpenToolkit toolkitName="default"> <!-- Each OT you want to use is configured with its own ditaOpenToolkit, and its toolkitName attribute must match the toolkit name you use in the toolkit properties file. --> <toolkitPlugin toolkitPluginId="com.mycompany.book.doctypes"> <!-- Each OT may have one or more toolkitPlugin elements declared. The toolkitPlugin is a ZIP file of toolkit extensions. If you declare a ZIP this way, then RSuite will unpack the ZIP from the plug-in and will integrate the ZIP’s contents into the OT plugins.--> <zipfile>mycompany-book-toolkit-plugins.zip</zipfile> <doctype type="DTD" publicId="com.mycompany.book:doctypes:dita:map"> <!-- If the toolkit extensions include doctypes, then you must configure the managed objects for those doctypes using the doctype element. You also declare the preview script in doctype. The doctype/file is the path to the DTD file in the zip file. The doctype/previewXsl path is its location in the plug-in jar.--> <file>doctypes/map/dtd/map.dtd</file> <previewXsl>webcontent/xslt/preview/book-preview.xsl</previewXsl> <managedObjectDefinitions> <moDef name="map" displayNameXPath="title|pubtitle/mainpubtitle" /> </managedObjectDefinitions> </doctype> <doctype type="DTD" publicId="com.mycompany.book:doctypes:dita:topic"> <file>doctypes/topic/dtd/topic.dtd</file> <previewXsl>WebContent/xslt/preview/book-preview.xsl</previewXsl> <managedObjectDefinitions> <moDef name="map" displayNameXPath="title" /> <moDef name="section" displayNameXPath="title" /> <moDef name="table" displayNameXPath="title" /> </managedObjectDefinitions> </doctype> </toolkitPlugin> </ditaOpenToolkit> </extensionProvider>
Use this procedure to upgrade project source code from the 4.0-style to the 4.1-style DITA configuration. Afterwards, it is still possible to configure OTs in the 4.0-style, but the two methods should not be used on the same OT.
Perform one of the next two steps to adjust the DITA for Publishers (D4P) and RSuite doctypes configuration.
RSuite 5 uses a new workflow engine and updated workflows to produce DITA output. If you deploy the basic OT, the various workflows produce the basic outputs. However, if you have customized the RSuite 4.1 DITA installation, perform these steps to recreate the customizations.