You can change the look and feel of a topic viewed in the Preview view
using your own cascading style sheet (CSS).
In the IXIA CCMS Desktop, users can preview
the topic in the Preview view by
right-clicking the topic and clicking Show
Preview. If the default format used in Preview view does not meet your needs, you can customize it by
creating your own CSS file and declaring it in the preview.xsl file in the /system/xsl/html folder. You can also add parameters to the
preview.xsl file to overwrite the build
parameter defaults set in xsl/html/xslhtml/dita2htmlImpl.xsl to make other changes to the
Preview view. By adding your
customizations to the preview.xsl file, it will
allow you to preserve your changes through upgrades.
Important: Make configuration changes in a test
environment and confirm they work before copying them to a production
environment.
To customize the text formats in Preview view:
-
In the TEXTML Administration perspective, connect to your server.
-
Create your own cascading style sheet (.css file) or you can base yours on the
existing style sheets in the Repository. To create a new style sheet based on an
existing one:
-
Expand the Repository folder and find the
commonltr.css (for languages read left-to-right
) and commonrtl.css (for languages read
right-to-left) files in the /system/xsl/resource
folder.
-
Right-click the file that you want to use and click
Export. In the Destination
folder box, type a path to a folder on your local disk
or click Browse to choose a location. Under
Export options, click to select the
Content checkbox. Click
Ok.
-
Rename the exported style sheet so you do not overwrite the existing
one in the Repository.
-
Make the necessary changes to the file and then save it.
-
Insert your style sheet into the /system/xsl/resource
folder.
-
Right-click the resource folder and click
Insert Documents.
-
Click the Add file button and select your new
style sheet.
-
Click OK.
-
Declare your new style sheet in the preview.xsl
file.
-
Right-click the the preview.xsl file in the
/system/xsl/html folder and click
Check out.
-
Double-click the file to open it in the editor.
-
Find where the .css files are declared and replace the existing file name with the name of your new style sheet.
For example:
<xsl:param name="CSS"/>
<!-- IXIASOFT PATCH: Assumes the xsl is used for preview and that the html is saved in /preview/ -->
<xsl:param name="dita-css" select="'../system/xsl/resource/MyPreview_commonltr.css'"/>
<xsl:param name="bidi-dita-css" select="'../system/xsl/resource/MyPreview_commonrtl.css'"/>
<!-- END PATCH -->
-
Save, close, and check in the file.
-
Overwrite the build parameter defaults, if required.
-
Open the dita2htmlImpl.xsl file found in xsl/html/xslhtml/ and then copy the parameter that you want to overwrite.
-
Paste it in the preview.xsl file and change its values as required.
-
Save, close, and check in the file.
For example, if you wanted to show the
draft-comment
element in the
Preview view, you would paste and edit the parameter as
follows:
<!-- default "hide draft & cleanup content" processing parameter ('no' = hide them)-->
<xsl:param name="DRAFT" select="'yes'"/>
For
example, the preview.xsl file would
look like
this:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This file is part of the DITA Open Toolkit project hosted on
Sourceforge.net. See the accompanying license.txt file for applicable licenses.-->
<!-- (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved. -->
<!-- ereview.xsl | DITA topic to HTML for ereview & webreview -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://icl.com/saxon"
xmlns:xt="http://www.jclark.com/xt"
extension-element-prefixes="saxon xt">
<!-- stylesheet imports -->
<!-- the main dita to xhtml converter -->
<xsl:import href="dita2xhtml.xsl"/>
<xsl:output method="html"
encoding="UTF-8"
indent="no"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
/>
<xsl:param name="CSS"/>
<!-- IXIASOFT PATCH: Assumes the xsl is used for preview and that the html is saved in /preview/ -->
<xsl:param name="dita-css" select="'../system/xsl/resource/MyPreview_commonltr.css'"/> <!-- left to right languages -->
<xsl:param name="bidi-dita-css" select="'../system/xsl/resource/MyPreview_commonrtl.css'"/> <!-- bidirectional languages -->
<!-- END PATCH -->
<!-- default "hide draft & cleanup content" processing parameter ('no' = hide them)-->
<xsl:param name="DRAFT" select="'yes'"/><!-- "no" and "yes" are valid values; non-'yes' is ignored -->
</xsl:stylesheet>
-
Inform users of the changes and request that they close and
reopen their CCMS Desktop to apply the
changes.
The Preview view text formats are configured to match your custom CSS.