aboutsummaryrefslogtreecommitdiff
path: root/test/read_xml_file
diff options
context:
space:
mode:
Diffstat (limited to 'test/read_xml_file')
-rw-r--r--test/read_xml_file/transformation.xsl20
1 files changed, 16 insertions, 4 deletions
diff --git a/test/read_xml_file/transformation.xsl b/test/read_xml_file/transformation.xsl
index 2a6c5e5..f23273e 100644
--- a/test/read_xml_file/transformation.xsl
+++ b/test/read_xml_file/transformation.xsl
@@ -2,16 +2,28 @@
<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:for-each select="InputXSLT:read-xml-file('test.txt')/tester/eintrag">
- <item><xsl:value-of select="."/></item>
- </xsl:for-each>
+ <xsl:variable name="result">
+ <xsl:copy-of select="InputXSLT:read-xml-file('test.txt')"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="xalan:nodeset($result)/file/@result = 'success'">
+ <xsl:for-each select="xalan:nodeset($result)/file/tester/eintrag">
+ <item><xsl:value-of select="."/></item>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ Error during file io
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
</xsl:stylesheet>