XZIP files are inputs for XSLT-based workflow actions (such as the XSL, BITS, and JATS plug-ins). An XZIP file is a standard ZIP file that contains XSLT stylesheets and XML catalogs. Typefi uses the .xzip filename extension rather than the standard .zip filename extension so that Typefi Server knows not to decompress the file.
The primary purpose of XZIP files is to package XSLT libraries, XSLT customisations, and XML catalogs (with document type definitions [DTDs] if necessary) into one archive to maintain the integrity of the whole transform.
An XZIP file should only include a single XSLT entry point and XML catalog file. It is okay to have additional XSLT modules (referenced with
<xsl:import> instructions directly or in a chain) from the main XSLT entry point module. Usually, an XZIP file contains more than one XML catalog. Still, there should only be one main XML catalog file which might reference other XML catalogs in the same fashion with
When you are assembling your XZIP file, we recommend using this structure:
|Catalogs||Contains XML catalogs, as well as corresponding DTDs.|
|Library||Contains XSLT library code.|
|Transforms||Contains customer-specific XSLTs.|
The Catalogs, Library, and Transforms folders should be in the root of the archive.
To create an XZIP file, create a ZIP file first—for Windows, select the Catalogs, Library and Transforms folders, right-click, and select Send to → Compressed (zipped folder); for macOS, select the folders, control-click, and select Compress "folder"—and then change the filename extension to .xzip. CAUTION Make sure the filename extension is .xzip, and not .xzip.zip, or the job will fail.
TIP In the Apply XSL transform workflow action, you can use a single XSLT file directly—no need to put it into an XZIP file.
How does Typefi Server process XZIP files?
To find an XSLT entry point file within the XZIP file, Typefi Server will:
- Find all files with the .xsl filename extension up to, and including, the second level of nesting. For example, /Transforms/Monty-Python.xsl is accepted, but /ABC/Holy-Grail/Monty-Python.xsl is not.
- Exclude all files in the Library folder.
- Sort the stylesheets by the nesting level.
- Pick the first one.
If Typefi Server cannot find an XSLT entry point, then the job will fail with an error.
To find a catalog file within the XZIP file, Typefi Server will:
- Find all files with the .xml filename extension up to, and including, the second level of nesting.
- Sort the catalogs by the nesting level.
- Pick the first one.
If you have any questions, please get in touch. We're here to help.