aboutsummaryrefslogtreecommitdiff
path: root/test/external_text_formatter
diff options
context:
space:
mode:
Diffstat (limited to 'test/external_text_formatter')
-rw-r--r--test/external_text_formatter/transformation.xsl19
1 files changed, 15 insertions, 4 deletions
diff --git a/test/external_text_formatter/transformation.xsl b/test/external_text_formatter/transformation.xsl
index 00fe3b3..a94f211 100644
--- a/test/external_text_formatter/transformation.xsl
+++ b/test/external_text_formatter/transformation.xsl
@@ -20,13 +20,24 @@
)
</xsl:variable>
- <xsl:copy-of select="dyn:evaluate($command)/output/*"/>
+ <xsl:copy-of select="dyn:evaluate($command)"/>
</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:variable name="result">
+ <xsl:call-template name="formatter">
+ <xsl:with-param name="source" select="InputXSLT:read-file('test.md')"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="xalan:nodeset($result)/output/@result = 'success'">
+ <xsl:copy-of select="xalan:nodeset($result)/output/*"/>
+ </xsl:when>
+ <xsl:otherwise>
+ Failure during external text formatting
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
</xsl:stylesheet>