diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-07-16 14:26:50 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-07-16 16:18:46 +0200 |
commit | a7d5d08191550de3205699834164ec1f7ef8aa15 (patch) | |
tree | cc6879963acc363297b0f4d1d1920ad6dd4616d1 /docs-xml/xslt | |
parent | c92a5670e3d60decbc13bd8680de37184bc12815 (diff) | |
download | samba-a7d5d08191550de3205699834164ec1f7ef8aa15.tar.gz samba-a7d5d08191550de3205699834164ec1f7ef8aa15.tar.bz2 samba-a7d5d08191550de3205699834164ec1f7ef8aa15.zip |
Revert "Remove XSLT script to generate image dependencies, instead rely on make"
This reverts commit c4493c22f129b2c94f361e6f8657adc7cd2dc1c6.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=7562
Conflicts:
docs-xml/Makefile
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Mon Jul 16 16:18:46 CEST 2012 on sn-devel-104
Diffstat (limited to 'docs-xml/xslt')
-rw-r--r-- | docs-xml/xslt/generate-dependencies.xsl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/docs-xml/xslt/generate-dependencies.xsl b/docs-xml/xslt/generate-dependencies.xsl new file mode 100644 index 0000000000..2fe3dd0dc9 --- /dev/null +++ b/docs-xml/xslt/generate-dependencies.xsl @@ -0,0 +1,36 @@ +<?xml version='1.0'?> +<!-- + Find the image dependencies of a certain XML file + Generates (part of) a Makefile + + - $(FNAME)-images-latex-{png,eps,pdf} for role=latex + - $(FNAME)-images-role for all other roles + + (C) Jelmer Vernooij 2004-2005 + + Published under the GNU GPLv3 or later +--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"> + <xsl:output method="text"/> + + <xsl:template match="/"> + <xsl:for-each select="//mediaobject/imageobject[@role and not(@role=following::imageobject/@role)]"> + <xsl:call-template name="generate-images"> + <xsl:with-param name="role"><xsl:value-of select="@role"/></xsl:with-param> + </xsl:call-template> + </xsl:for-each> + <xsl:call-template name="generate-images"> + <xsl:with-param name="role"/> + </xsl:call-template> + </xsl:template> + + <xsl:template name="generate-images"> + <xsl:param name="role"/> + <xsl:value-of select="$target"/><xsl:text>-images-</xsl:text><xsl:value-of select="$role"/><xsl:text> = </xsl:text> + <xsl:for-each select="//mediaobject/imageobject[@role=$role]"> + <xsl:value-of select="imagedata/@fileref"/> + <xsl:text> </xsl:text> + </xsl:for-each> + <xsl:text> </xsl:text> + </xsl:template> +</xsl:stylesheet> |