Disabling External CSS Files
By default, ePublisher creates an external CSS file for each source document in your project. Depending on how many source documents are in the project and the amount of style information in each document, these CSS files can become large and redundant. ePublisher allows you to use a custom CSS file to avoid this issue. ePublisher still creates these external CSS files, but you can simply delete the unused CSS files. However, if you are deploying your generated content directly to a Web server, you may not want the unused CSS files deployed with your content.
You can override the pages.fti and styles.xsl files and modify them to no longer create the external CSS files.
Note: If you override the pages.fti and styles.xsl files and modify them to no longer create the external CSS files, you will be responsible for maintaining your customizations to these files as needed each time you update your Stationery to work with a new version of ePublisher.
To disable external CSS files
1. In your Stationery design project, on the View menu, click Project Directory. For more information about override files and locations, see “Understanding Stationery, Projects, and Overrides”.
2. If you want to override the processing for an output format, create the Formats\formattype\Transforms folder in your project folder, where formattype is the name of the output format you want to override, such as Dynamic HTML.
3. If you want to override the processing for a target, create the Targets\targetname\Transforms folder in your project folder, where targetname is the name of the target you want to override.
4. Copy the pages.fti and the styles.xsl files from the following folder to the override folder you created within your project folder:
Program Files\WebWorks\ePublisher Designer\Formats\formattype\Transforms
5. Open the pages.fti file you copied to your project override folder in a text editor.
6. Under the <Groups> tag, add the following code:
<Group name="css" />
7. Under the <Settings> tag, add the following code:
:<!-- Emit -->
<!-- -->
<Setting name="emit-external-css" group="css" default="true">
<SettingClass name="boolean" />
</Setting>
8. Save and close the pages.fti file.
9. Open the styles.xsl file you copied to your project override folder in a text editor.
10. Under the <wwfiles:Files version="1.0"> tag, add the following code:
:<xsl:if test="wwprojext:GetFormatSetting('emit-external- css', 'false') = 'true'">
11. Under the <!-- Call template --> tag, replace the following line:
<xsl:variable name="VarResult">
with the following line:
<xsl:variable name="VarResultAsXML">
12. Under the <!-- Call template --> tag, and just before the <xsl:value-of select="wwexsldoc:Document($VarResult,$VarPath,'utf-8','text')" /> tag, add the following code:
<xsl:variable name="VarResult" select="msxsl:node- set($VarResultAsXML)" />
13. Under the <xsl:variable name="VarProgressProjectGroupsEnd" select="wwprogress:End()" /> tag, add the following code:
</xsl:if>
14. Save and close the styles.xsl file.
15. On the Project menu, select the Active Target you want to specify settings for.
16. On the Target menu, click Target Settings.
17. Set emit-external-css to Disabled.