### 44.8 Placing CSS or XSL files for assembly

For HTML output types, when you specify WrapAndShip=Yes and designate a WrapPath directory, DITA2Go automatically copies CSS or XSL files from the project directory to the directory designated by [CSS]CssPath. DITA2Go can also automatically copy CSS or XSL files from another directory you specify.

To have DITA2Go copy CSS or XSL files:

[Automation]
WrapAndShip=Yes
; CopyCssFrom = path to directory containing the .css files,
; relative OK
CopyCssFrom=..\css
; CssCopyFiles = list of files to copy from CopyCssFrom and output
; directories to the [CSS]CssPath (which defaults to the WrapPath)
CssCopyFiles=*.css *.xsl

CopyCssFrom and CssCopyFiles take effect when WrapAndShip=Yes, CompileHelp=Yes, or FTSCommand=path\to\indexer (see §44.10 Gathering and processing Help-system files).

Say where to get CSS files

When you specify a value for CopyCssFrom, *.css and *.xsl files are copied first from the project directory (unless it is the same as the destination directory), then from the directory designated by CopyCssFrom, to one of the following destinations:

- the directory designated by [CSS]CssPath, if any (see §31.4.2 Designating and locating a CSS file); otherwise,
- the directory designated by WrapPath (see §44.6 Assembling files for distribution) or, for JavaHelp and Oracle Help, the .\html subdirectory.

If you specify a relative path for CopyCssFrom, that path is relative to the project directory.

List CSS files to be copied

You can use CssCopyFiles to list CSS or XSL files to be copied; the default files are *.css and *.xsl. Files assigned to CssCopyFiles are always copied first from the project directory to the directory designated by [CSS]CssPath, then from the CopyCssFrom directory (if any). If CssCopyFiles is not present, or is set to nothing, all *.css and *.xsl files are copied from the project directory and then from the CopyCssFrom directory (if any).

The file specifications you assign to CssCopyFiles must be separated by spaces, and no spaces are allowed within a file specification. You can use wildcards in file specifications, and include absolute or relative paths to indicate where files should be copied from. If you do not specify a path, the default is first from the project directory, then from the CopyCssFrom directory. If you specify a relative path, the path is relative to the project directory.

For example, to have DITA2Go copy CSS files from directory MyCSS, parallel to the project directory, to directory Styles, a subdirectory of the WrapPath directory:

[Automation]
WrapAndShip=Yes
; WrapPath is relative to the project directory:
WrapPath=.\Final
; CopyCssFrom is relative to the project directory:
CopyCssFrom=..\MyCSS

[CSS]
; CssPath is relative to the WrapPath directory:
CssPath=.\Styles

Previous Topic: 44.7.5 Synchronizing graphics settings for RTF output

Next Topic: 44.9 Gathering files for an HTML project: an example

Parent Topic: 44. Producing deliverable results

Sibling Topics:

44.1 Understanding DITA2Go pre- and post-processing

44.2 Activating and logging production of deliverables

44.3 Understanding path values for deliverables

44.4 Clearing out old files before converting

44.5 Gathering additional files before converting

44.6 Assembling files for distribution

44.7 Placing graphics files for distribution

44.9 Gathering files for an HTML project: an example

44.10 Gathering and processing Help-system files

44.11 Archiving deliverables

44.12 Placing deliverables in a shipping directory

44.13 Postprocessing separately from converting

Table of Contents • Index