Organising your XSLT
Organising XSLT make it both simple, easy to maintain and shared can be difficult. It also depends largely on the output being generated and the requirements of your application.
Standard files layout
We recommend following the standard file layout to help organize your files by convention. When using the standard mapping, Berlioz will look for the principal XSLT module in /WEB-INF/xslt/[output]/[group].xsl
Here is the recommended organisation for XSLT modules.
Path | Description |
---|---|
/common/ | This folder should contain all the XSLT modules which are common to many XSLT modules including |
/lib/ | This folder should contain all the XSLT modules provided as external libraries (e.g. PSML to HTML) |
/[group]/ | Folder containing all the XSLT modules specific to a group of services |
/[group]/[service].xsl | XSLT module containing templates and functions for a single service |
[group].xsl | Principal XSLT module for a group of services |
Principal XSLT module
The principal XSLT module should be a simple as possible, it should generally consist of:
- The list of XSLT modules to import or include in the following order
- Library
- Common
- Service specific
- The template matching the root node:
<xsl:template match="/">
Created on , last edited on