Debian Codegraph @

xsl/common/mkdoclist.xsl

raw
1 <?xml version='1.0'?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:xi="http://www.w3.org/2001/XInclude"
4 version='1.0'>
5
6 <xsl:output method="text" indent="yes"/>
7
8 <!-- Print out the filenames of the books to compile from a <set>. This
9 stylesheet cannot be used standalone, because the following parameters must
10 exist:
11
12 <xsl:param name="use.id.as.filename" select="0"/>
13 <xsl:param name="set.book.num" select="1"/>
14
15 The output method is text, in order to be compatible with the imported
16 dblatex XSL stylesheets output method.
17 -->
18
19 <xsl:template match="book" mode="give.basename">
20 <xsl:choose>
21 <xsl:when test="not(@id) or $use.id.as.filename = 0">
22 <xsl:value-of select="concat('book', position())"/>
23 </xsl:when>
24 <xsl:otherwise>
25 <xsl:value-of select="@id"/>
26 </xsl:otherwise>
27 </xsl:choose>
28 <xsl:text>&#10;</xsl:text>
29 </xsl:template>
30
31 <xsl:template match="/">
32 <xsl:if test="$set.book.num = 'all'">
33 <xsl:apply-templates select="//book[parent::set]" mode="give.basename"/>
34 </xsl:if>
35 </xsl:template>
36
37 </xsl:stylesheet>