Remove text chunks support. Was never built by any of the main targets,
[jra/samba/.git] / docs-xml / xslt / generate-dependencies.xsl
1 <?xml version='1.0'?>
2 <!--
3         Find the image dependencies of a certain XML file
4         Generates (part of) a Makefile
5
6         - $(FNAME)-images-latex-{png,eps,pdf} for role=latex
7         - $(FNAME)-images-role for all other roles
8
9         (C) Jelmer Vernooij     2004-2005
10
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"/>
15
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>
26
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>