diff options
Diffstat (limited to 'test/external_text_formatter/transformation.xsl')
-rw-r--r-- | test/external_text_formatter/transformation.xsl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/external_text_formatter/transformation.xsl b/test/external_text_formatter/transformation.xsl new file mode 100644 index 0000000..00fe3b3 --- /dev/null +++ b/test/external_text_formatter/transformation.xsl @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet + version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:dyn="http://exslt.org/dynamic" + xmlns:xalan="http://xml.apache.org/xalan" + xmlns:InputXSLT="function.inputxslt.application" + exclude-result-prefixes="dyn xalan InputXSLT" +> + +<xsl:include href="[testcase.xsl]"/> + +<xsl:template name="formatter"> + <xsl:param name="source"/> + + <xsl:variable name="command"> + InputXSLT:external-text-formatter( + '/usr/bin/markdown', + $source + ) + </xsl:variable> + + <xsl:copy-of select="dyn:evaluate($command)/output/*"/> +</xsl:template> + +<xsl:template name="implementation"> + <xsl:call-template name="formatter"> + <xsl:with-param name="source" select="InputXSLT:read-file('test.md')"/> + </xsl:call-template> +</xsl:template> + +</xsl:stylesheet> |