diff options
Diffstat (limited to 'xsl/img.xsl')
-rw-r--r-- | xsl/img.xsl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/xsl/img.xsl b/xsl/img.xsl new file mode 100644 index 0000000..e2a9824 --- /dev/null +++ b/xsl/img.xsl @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0" + exclude-result-prefixes="s" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:s="https://beratung-franzke.de/web-tpl" + xmlns:html="http://www.w3.org/1999/xhtml"> + + <xsl:template match="html:img" mode="html"> + <xsl:copy> + <!-- Copy all attributes and nested nodes --> + <xsl:copy-of select="@*"/> + <xsl:apply-templates mode="html"/> + + <!-- ..but modify the src attribute to have a ?git-hash suffix --> + <xsl:attribute name="src"> + <xsl:value-of select="@src"/> + <xsl:text>?</xsl:text> + <xsl:value-of select="$version"/> + </xsl:attribute> + </xsl:copy> + </xsl:template> +</xsl:stylesheet> |