1<?xml version='1.0'?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 3 4<!-- ************** HTML ************** --> 5<xsl:import href="http://www.boost.org/tools/boostbook/xsl/html.xsl"/> 6 7<!-- 8Make library documentation header using some elements from boostbook stylesheets. 9Override boost book implemenation of header.navigation with our own 10--> 11<xsl:template name = "header.navigation"> 12 <xsl:param name = "prev" select = "/foo"/> 13 <xsl:param name = "next" select = "/foo"/> 14 <xsl:param name = "nav.context"/> 15 <table cellpadding = "2" width = "100%"><tr> 16 <td valign = "top"> 17 <img href="index.html" height="164px" src="pre-boost.jpg" alt="Library Documentation Index" /> 18 </td> 19 <td><h2>Safe Numerics</h2></td> 20 </tr></table> 21 <xsl:call-template name = "navbar.spirit"> 22 <xsl:with-param name = "prev" select = "$prev"/> 23 <xsl:with-param name = "next" select = "$next"/> 24 <xsl:with-param name = "nav.context" select = "$nav.context"/> 25 </xsl:call-template> 26</xsl:template> 27 28<!-- remove "Chapter 1" from first page --> 29<xsl:param name="chapter.autolabel" select="0"/> 30<!-- leave the html files in the directory ../html --> 31<xsl:param name="base.dir" select="'../html/'"/> 32 33<!-- ******* Table of Contents ******** --> 34<!-- How far down sections get TOC's --> 35<xsl:param name = "toc.section.depth" select="2" /> 36 37<!-- Max depth in each TOC: --> 38<xsl:param name = "toc.max.depth" select="2" /> 39 40<!-- How far down we go with TOC's --> 41<xsl:param name="generate.section.toc.level" select="2" /> 42 43<!-- ************ Chunking ************ --> 44 45<!-- 46BoostBook takes a section node id like safe_numeric.safe_cast 47and renders it as safe_numeric/safe_cast. Presumably they do this 48so they can make a huge "book" with all the libraries in subdirectories. 49But we want something different. To my mind, this should have been 50done using the library "directory" attribute. But of course that 51doesn't matter now. We'll just re-hack the path to eliminate 52the "safe_numeric/" from the above example. 53--> 54 55<xsl:template match="*" mode="recursive-chunk-filename"> 56 <xsl:variable name="their"> 57 <xsl:apply-imports mode="recursive-chunk-filename" select="."/> 58 </xsl:variable> 59 <xsl:choose> 60 <xsl:when test="contains($their, '/')"> 61 <xsl:value-of select="substring-after($their, '/')" /> 62 </xsl:when> 63 <xsl:otherwise> 64 <xsl:value-of select="$their"/> 65 </xsl:otherwise> 66 </xsl:choose> 67</xsl:template> 68 69<!-- don't make first sections special - leave TOC in different file --> 70<xsl:param name="chunk.first.sections" select="3" /> 71 72<!-- How far down we chunk nested sections --> 73<!-- 74Note: each chunk have to start with a section with an id 75Otherwise the chunk (i.e. file) will be lost. There is no 76checking of this 77--> 78<xsl:param name="chunk.section.depth" select="3" /> 79 80</xsl:stylesheet> 81