#!/bin/sh

# Run 'xsltproc' for every .xsl file
# It extracts the <xsl:text kmess:translate="true">..</xsl:text> nodes
# and generates output compatible for xgettext.
# The white space is simplified to avoid easily broken translations.

find . -mindepth 2 -name '*.xsl' \
 | sort \
 | while read xslFile
   do
     xsltproc --stringparam "filename" "$xslFile" \
              --nonet \
              --nomkdir \
              "$0.xsl" "$xslFile"
   done

