aboutsummaryrefslogtreecommitdiff
path: root/test/read_file
diff options
context:
space:
mode:
Diffstat (limited to 'test/read_file')
-rw-r--r--test/read_file/transformation.xsl16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/read_file/transformation.xsl b/test/read_file/transformation.xsl
index f773e0e..9610046 100644
--- a/test/read_file/transformation.xsl
+++ b/test/read_file/transformation.xsl
@@ -2,14 +2,26 @@
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xalan="http://xml.apache.org/xalan"
xmlns:InputXSLT="function.inputxslt.application"
- exclude-result-prefixes="InputXSLT"
+ exclude-result-prefixes="InputXSLT xalan"
>
<xsl:include href="[testcase.xsl]"/>
<xsl:template name="implementation">
- <xsl:value-of select="InputXSLT:read-file('test.txt')"/>
+ <xsl:variable name="result">
+ <xsl:copy-of select="InputXSLT:read-file('test.txt')"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="xalan:nodeset($result)/file/@result = 'success'">
+ <xsl:value-of select="xalan:nodeset($result)/file"/>
+ </xsl:when>
+ <xsl:otherwise>
+ Error during file io
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
</xsl:stylesheet>