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
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>
22 <xsl:call-template name=
"generate-images">
23 <xsl:with-param name=
"role"/>
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>
34 <xsl:text> </xsl:text>