StyleSheets.xml
This paragraph explains what content transformation is, when it can be used and how it must be configured.
What is content transformation?
When working with content in the client tools - e.g. Publication Manager - content is transferred from and to the repository, edited in (external) editors, etc. Content is transferred and stored in the form of xml documents and validated against DTDs. Sometimes it is desirable to alter the xml content, e.g. for showing a preview in Publication Manager. The stored xml content may contain information not useful or perhaps not even suitable for rendering in the preview. To make it suitable the xml content could be transformed first. This functionality was initially developed having the transform of the OASIS DITA 1.1 navtitle attribute to the OASIS DITA1.2 navtitle element.
When can it be used?
- Preview - The preview action occurs when xml content is prepared for showing in one of the preview panels in Publication Manager.
- Download - Thedownload action occurs when xml content is downloaded from the repository to the client machine. This can be on disk in memory. A download typically occurs when content is opened or checked out in Pulbication Manager.
- Upload - The upload action occurs when xml content is uploaded from the client machine to the repository (stored). This can be for example the result of a save or a check-in action.
How to configure?
Which transformation occurs on which action can be configured through the clientconfig.xml and the stylesheets.xml files. The location of these files is in a default installation in the \InfoShare\Web\Author\ASP\ClientConfig folder.
stylesheets element by which the stylesheets.xml, or a different one, can be included through the location attribute:
<stylesheets location="styleSheets.xml" />
The stylesheets.xml file holds the link between the actions and the content transformations that will be performed. For each action one or more transformations (stylesheets) can be configured to transform the content. If more stylesheets are configured on one action, they are executed on the content one after each other in the order specified. It is possible to perform a set of transformations only on content that conforms to a certain schema, the so called DTD or Document Type Defintion. This DTD is normally specified in the xml content. To enable this transformation restriction, the DTD name has to be specified inside a solution element together with one or more transformations (stylesheets) it should execute against. Multiple solution elements can be configured per action.
map and bookmap the stylesheet Dita11ToDita12.xsl is used for transformation.
<preview>
<stylesheet location="../Preview/html/infoshare.dita2htm.shell.xsl" />
</preview>
<upload>
<solution>
<dtd publicid="-//OASIS//DTD DITA Map//EN" systemid="map.dtd" />
<dtd publicid="-//OASIS//DTD DITA BookMap//EN" systemid="bookmap.dtd" />
<stylesheet location="Filters/Dita11ToDita12.xsl"/>
</solution>
</upload>
<download>
<solution>
<dtd publicid="-//OASIS//DTD DITA Map//EN" systemid="map.dtd" />
<dtd publicid="-//OASIS//DTD DITA BookMap//EN" systemid="bookmap.dtd" />
<stylesheet location="Filters/Dita11ToDita12.xsl"/>
</solution>
</download>
Default configuration
- Upon preview content is prepared to make it suitable for displaying.
- Upon download navtitle attributes - if present - are transformed to navtitle elements.
- Upon upload navtitle attributes - if present - are transformed to navtitle elements.