1<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 2 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" 3 version="1.0" 4 exclude-result-prefixes="doc"> 5 6<!-- ******************************************************************** 7 $Id: manifest.xsl,v 1.7 2005/05/26 07:27:34 bobstayton Exp $ 8 ******************************************************************** 9 10 This file is part of the XSL DocBook Stylesheet distribution. 11 See ../README or http://nwalsh.com/docbook/xsl/ for copyright 12 and other information. 13 14 ******************************************************************** --> 15 16<!-- ==================================================================== --> 17 18<xsl:variable name="manifest.base.dir"> 19</xsl:variable> 20 21<xsl:template name="generate.manifest"> 22 <xsl:param name="node" select="/"/> 23 <xsl:call-template name="write.text.chunk"> 24 <xsl:with-param name="filename"> 25 <xsl:if test="$manifest.in.base.dir != 0"> 26 <xsl:value-of select="$base.dir"/> 27 </xsl:if> 28 <xsl:value-of select="$manifest"/> 29 </xsl:with-param> 30 <xsl:with-param name="method" select="'text'"/> 31 <xsl:with-param name="content"> 32 <xsl:apply-templates select="$node" mode="enumerate-files"/> 33 </xsl:with-param> 34 <xsl:with-param name="encoding" select="$chunker.output.encoding"/> 35 </xsl:call-template> 36</xsl:template> 37 38<xsl:template match="set|book|part|preface|chapter|appendix 39 |article 40 |reference|refentry 41 |sect1|sect2|sect3|sect4|sect5 42 |section 43 |book/glossary|article/glossary|part/glossary 44 |book/bibliography|article/bibliography|part/bibliography 45 |colophon" 46 mode="enumerate-files"> 47 <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable> 48 <xsl:if test="$ischunk='1'"> 49 <xsl:call-template name="make-relative-filename"> 50 <xsl:with-param name="base.dir"> 51 <xsl:if test="$manifest.in.base.dir = 0"> 52 <xsl:value-of select="$base.dir"/> 53 </xsl:if> 54 </xsl:with-param> 55 <xsl:with-param name="base.name"> 56 <xsl:apply-templates mode="chunk-filename" select="."/> 57 </xsl:with-param> 58 </xsl:call-template> 59 <xsl:text> </xsl:text> 60 </xsl:if> 61 <xsl:apply-templates select="*" mode="enumerate-files"/> 62</xsl:template> 63 64<xsl:template match="book/index|article/index|part/index" 65 mode="enumerate-files"> 66 <xsl:if test="$htmlhelp.output != 1"> 67 <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable> 68 <xsl:if test="$ischunk='1'"> 69 <xsl:call-template name="make-relative-filename"> 70 <xsl:with-param name="base.dir"> 71 <xsl:if test="$manifest.in.base.dir = 0"> 72 <xsl:value-of select="$base.dir"/> 73 </xsl:if> 74 </xsl:with-param> 75 <xsl:with-param name="base.name"> 76 <xsl:apply-templates mode="chunk-filename" select="."/> 77 </xsl:with-param> 78 </xsl:call-template> 79 <xsl:text> </xsl:text> 80 </xsl:if> 81 <xsl:apply-templates select="*" mode="enumerate-files"/> 82 </xsl:if> 83</xsl:template> 84 85<xsl:template match="legalnotice" mode="enumerate-files"> 86 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> 87 <xsl:if test="$generate.legalnotice.link != 0"> 88 <xsl:call-template name="make-relative-filename"> 89 <xsl:with-param name="base.dir"> 90 <xsl:if test="$manifest.in.base.dir = 0"> 91 <xsl:value-of select="$base.dir"/> 92 </xsl:if> 93 </xsl:with-param> 94 <xsl:with-param name="base.name"> 95 <xsl:apply-templates mode="chunk-filename" select="."/> 96 </xsl:with-param> 97 </xsl:call-template> 98 <xsl:text> </xsl:text> 99 </xsl:if> 100</xsl:template> 101 102<xsl:template match="mediaobject[imageobject] | inlinemediaobject[imageobject]" mode="enumerate-files"> 103 <xsl:variable name="longdesc.uri"> 104 <xsl:call-template name="longdesc.uri"> 105 <xsl:with-param name="mediaobject" 106 select="."/> 107 </xsl:call-template> 108 </xsl:variable> 109 <xsl:variable name="mediaobject" select="."/> 110 111 <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]"> 112 <xsl:call-template name="longdesc.uri"> 113 <xsl:with-param name="mediaobject" select="$mediaobject"/> 114 </xsl:call-template> 115 <xsl:text> </xsl:text> 116 </xsl:if> 117</xsl:template> 118 119<xsl:template match="text()" mode="enumerate-files"> 120</xsl:template> 121 122</xsl:stylesheet> 123