Table of Contents

Previous

Next


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.

To disable external CSS files

  1. In Windows Explorer, open your project folder. For more information about override files and locations, see “Understanding Stationery, Projects, and Overrides” on page 327.

  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 Pro\Formats\formattype\Transforms

  1. Open the pages.fti file you copied to your project override folder in a text editor.

  2. Under the <Groups> tag, add the following code:

<Group name="css" />

  1. Under the <Settings> tag, add the following code:

:<!-- Emit -->
<!-- -->
<Setting name="emit-external-css" group="css" default="true">
<SettingClass name="boolean" />
</Setting>

  1. Save and close the pages.fti file.

  2. Open the styles.xsl file you copied to your project override folder in a text editor.

  3. Under the <wwfiles:Files version="1.0"> tag, add the following code:

:<xsl:if test="wwprojext:GetFormatSetting('emit-external- css', 'false') = 'true'">

  1. Under the <!-- Call template --> tag, replace the following line:

<xsl:variable name="VarResult">

with the following line:

<xsl:variable name="VarResultAsXML">

  1. 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)" />

  1. Under the <xsl:variable name="VarProgressProjectGroupsEnd" select="wwprogress:End()" /> tag, add the following code:

</xsl:if>

  1. Save and close the styles.xsl file.

  2. On the Project menu, select the Active Target you want to specify settings for.

  3. On the Target menu, click Target Settings.

  4. Set emit-external-css to Disabled.

ePublisher/2008.4/Help/02.Designing_Templates_and_Stationery/03.118.Designing_Stationery (last edited 2009-04-28 22:34:16 by TonyMcDow)