Initialize the file descriptor in the files_struct before trying to close it. Otherwi...
[Samba/gebeck_regimport.git] / docs-xml / xslt / generate-dependencies.xsl
blob2fe3dd0dc942975302d1377d3178c308ff93291c
1 <?xml version='1.0'?>
2 <!--
3 Find the image dependencies of a certain XML file
4 Generates (part of) a Makefile
6 - $(FNAME)-images-latex-{png,eps,pdf} for role=latex
7 - $(FNAME)-images-role for all other roles
9 (C) Jelmer Vernooij 2004-2005
11 Published under the GNU GPLv3 or later
12 -->
13 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1">
14 <xsl:output method="text"/>
16 <xsl:template match="/">
17 <xsl:for-each select="//mediaobject/imageobject[@role and not(@role=following::imageobject/@role)]">
18 <xsl:call-template name="generate-images">
19 <xsl:with-param name="role"><xsl:value-of select="@role"/></xsl:with-param>
20 </xsl:call-template>
21 </xsl:for-each>
22 <xsl:call-template name="generate-images">
23 <xsl:with-param name="role"/>
24 </xsl:call-template>
25 </xsl:template>
27 <xsl:template name="generate-images">
28 <xsl:param name="role"/>
29 <xsl:value-of select="$target"/><xsl:text>-images-</xsl:text><xsl:value-of select="$role"/><xsl:text> = </xsl:text>
30 <xsl:for-each select="//mediaobject/imageobject[@role=$role]">
31 <xsl:value-of select="imagedata/@fileref"/>
32 <xsl:text> </xsl:text>
33 </xsl:for-each>
34 <xsl:text>&#10;</xsl:text>
35 </xsl:template>
36 </xsl:stylesheet>