2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:html='http://www.w3.org/1999/xhtml'
4 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
5 exclude-result-prefixes="doc html"
8 <!-- ********************************************************************
9 $Id: website.xsl 6910 2007-06-28 23:23:30Z xmldoc $
10 ********************************************************************
12 This file is part of the WebSite distribution.
13 See ../README or http://nwalsh.com/website/ for copyright
14 copyright and other information.
16 ******************************************************************** -->
18 <!-- ==================================================================== -->
20 <xsl:include href="website-common.xsl"/>
21 <xsl:include href="toc.xsl"/>
23 <xsl:output method="html"
26 <xsl:param name="autolayout" select="document($autolayout-file,/*[1])"/>
28 <xsl:attribute-set name="body.attributes"/>
30 <xsl:template name="body.attributes">
31 <!-- Turn off the template from the stock DocBook XSL -->
34 <!-- ==================================================================== -->
36 <xsl:template match="webpage">
37 <xsl:variable name="id">
38 <xsl:call-template name="object.id"/>
41 <xsl:variable name="tocentry" select="$autolayout/autolayout//*[$id=@id]"/>
42 <xsl:variable name="toc" select="$tocentry/ancestor-or-self::toc"/>
45 <xsl:apply-templates select="head" mode="head.mode"/>
46 <xsl:apply-templates select="config" mode="head.mode"/>
47 <body class="website">
48 <xsl:call-template name="body.attributes"/>
50 <div class="{name(.)}">
53 <xsl:if test="$banner.before.navigation != 0">
54 <xsl:call-template name="allpages.banner"/>
59 <xsl:apply-templates select="$toc">
60 <xsl:with-param name="pageid" select="@id"/>
61 </xsl:apply-templates>
62 <xsl:if test="$header.hr != 0"><hr/></xsl:if>
66 <xsl:if test="$banner.before.navigation = 0">
67 <xsl:call-template name="allpages.banner"/>
70 <xsl:apply-templates select="./head/title" mode="title.mode"/>
72 <xsl:apply-templates select="child::node()[not(self::webpage)]"/>
74 <xsl:call-template name="process.footnotes"/>
76 <xsl:call-template name="webpage.footer"/>
82 <!-- ==================================================================== -->
84 <xsl:template match="webtoc">
85 <xsl:variable name="webpage" select="ancestor::webpage"/>
86 <xsl:variable name="relpath">
87 <xsl:call-template name="root-rel-path">
88 <xsl:with-param name="webpage" select="$webpage"/>
91 <xsl:variable name="pageid" select="$webpage/@id"/>
93 <xsl:variable name="pages"
94 select="$autolayout//*[$pageid=@id]/tocentry"/>
96 <xsl:if test="count($pages) > 0">
98 <xsl:for-each select="$pages">
101 <xsl:attribute name="href">
103 <xsl:when test="@href">
104 <xsl:value-of select="@href"/>
107 <xsl:value-of select="$relpath"/>
108 <xsl:value-of select="@dir"/>
109 <xsl:value-of select="$filename-prefix"/>
110 <xsl:value-of select="@filename"/>
114 <xsl:apply-templates select="title"/>
116 <xsl:if test="summary">
117 <xsl:text>--</xsl:text>
118 <xsl:apply-templates select="summary"/>
126 <xsl:template match="toc/summary|tocentry/summary|notoc/summary">
127 <xsl:apply-templates/>
130 <!-- ==================================================================== -->