XSLT, a W3C standard, is a language for transforming XML into other formats.
XSLT stylesheets are written in XML syntax.
In the final stage of processing, the DITA Open Toolkit runs XSLT stylesheet transforms (using either SAXON or Xalan) to produce output files. In certain cases, it is possible to override stylesheet processing to customize the output.
The following figure shows the XSLT stylesheet for the note element.
The following XSLT stylesheets in the ditaot/xsl directory perform output transformation for various types of output (specified by setting the transtype). For those stylesheets marked with an asterisk (*) in the following table, you can override the default stylesheet with one you create.
Transtype (*can be overridden) | XSLT stylesheet(s) |
---|---|
*docbook | map2docbook.xsl, dita2docbook.xsl |
eclipsecontent | map2eclipse.xsl, map2plugin-cp.xsl |
eclipsehelp | map2eclipse.xsl |
htmlhelp | map2hhc.xsl, map2hhp.xsl |
*javahelp | dita2html.xsl |
dita2fo-shell.xsl | |
troff | dita2troff-step1-shell.xsl, dita2troff-step2-shell |
*wordrtf | dita2rtf.xsl |
*xhtml | dita2xhtml.xsl |
Follow these steps to modify the processing for a PDF target to remove the author list from the title page of the .pdf file. (The default XSLT stylesheet for PDF will add one author line to the title page for every <author> element in the <prolog> section of each file in the source tree.)
<fo:block font-size="11pt" font-weight="bold" line-height="1.5"> <xsl:text>[vertical list of authors]</xsl:text> </fo:block> <xsl:for-each select="//author"> <fo:block font-size="11pt" font-weight="bold" line-height="1.5"> [<xsl:value-of select="."></xsl:value-of>] </fo:block> </xsl:for-each>
<property name="args.xsl" value="${basedir}/xsl/xdita2fo-shell.xsl"/>