linux-pam/doc/custom-html.xsl.in
Stefan Schubert 3790bd4aa3 doc: make stylesheets configurable
Before this change, all stylesheets were hardcoded.
With this change, stylesheets can be defined at configure stage.

* configure.ac: Add new options to configure stylesheets:
--enable-html-stylesheet=FILE
--enable-txt-stylesheet=FILE
--enable-pdf-stylesheet=FILE
--enable-man-stylesheet=FILE
* doc/custom-html.xsl: Rename to doc/custom-html.xsl.in, parametrize html
stylesheet.
* doc/custom-man.xsl: Rename to doc/custom-man.xsl.in, parametrize man
stylesheet.
* doc/.gitignore: Add custom-man.xsl and custom-html.xsl.
* doc/adg/Makefile.am: Use stylesheet variables.
* doc/mwg/Makefile.am: Likewise.
* doc/sag/Makefile.am: Likewise.

Resolves: https://github.com/linux-pam/linux-pam/pull/499
2022-10-27 12:12:17 +00:00

19 lines
706 B
XML

<?xml version='1.0'?> <!--*-nxml-*-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ss="http://docbook.sf.net/xmlns/string.subst/1.0"
xmlns:exsl="http://exslt.org/common" version="1.0">
<xsl:import href="HTML_STYLESHEET"/>
<xsl:param name="vendordir"/>
<xsl:template match="filename">
<xsl:variable name="replacements">
<ss:substitution oldstring="%vendordir%" newstring="{$vendordir}" />
</xsl:variable>
<xsl:call-template name="apply-string-subst-map">
<xsl:with-param name="content" select="."/>
<xsl:with-param name="map.contents" select="exsl:node-set($replacements)/*" />
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>