diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-12-27 10:23:20 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-12-27 10:29:47 +0100 |
commit | 2d803d2df11433f8d1be8d0c808420f0670b5f56 (patch) | |
tree | 57b415148c0bf4f3176c743484d2b9c179194a5c | |
parent | 4e276dcf45ea0491fbf31284941f3b5c91eeae16 (diff) | |
download | mutti-web-2d803d2df11433f8d1be8d0c808420f0670b5f56.tar.gz mutti-web-2d803d2df11433f8d1be8d0c808420f0670b5f56.tar.bz2 mutti-web-2d803d2df11433f8d1be8d0c808420f0670b5f56.zip |
Parse filenames from main.xml in Makefile using xsl
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | xsl/main_filenames.xsl | 16 |
2 files changed, 18 insertions, 1 deletions
@@ -4,7 +4,8 @@ xsltproc=xsltproc --stringparam suffix $(suffix) svg2png=rsvg-convert -f png #pages=$(shell xmllint --xpath "//*/@filename" main.xml | sed 's/filename=//g'| xargs echo) -pages=$(shell sed -n 's/^.*filename="\([^"]*\)".*/\1/p' main.xml) +#pages=$(shell sed -n 's/^.*filename="\([^"]*\)".*/\1/p' main.xml) +pages=$(shell xsltproc xsl/main_filenames.xsl main.xml) pages_gen=$(pages:%.xml=%$(suffix)) diff --git a/xsl/main_filenames.xsl b/xsl/main_filenames.xsl new file mode 100644 index 0000000..3d80d81 --- /dev/null +++ b/xsl/main_filenames.xsl @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:s="https://beratung-franzke.de/web-tpl"> + + <xsl:output method="text" encoding="UTF-8" /> + <xsl:strip-space elements="*"/> + + <xsl:template match="s:page"> + <xsl:value-of select="@filename"/> + <xsl:text> </xsl:text> + </xsl:template> + + <xsl:template match="/"> + <xsl:apply-templates match="//s:page"/> + </xsl:template> +</xsl:stylesheet> |