From 246a8e020d97cfc3b4409996f99450fa95b730b1 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Sat, 17 May 2014 13:59:33 +0200 Subject: Improved FunctionTransform test case transformations * added basic "transformer" wrapper template to call "InputXSLT:transform" ** this removes the need to specifiy arguments in a separate xslt variable --- test/transform/reference.xml | 40 +-------------------------------------- test/transform/test.xsl | 11 ++++------- test/transform/transformation.xsl | 26 ++++++++++++++++--------- 3 files changed, 22 insertions(+), 55 deletions(-) (limited to 'test') diff --git a/test/transform/reference.xml b/test/transform/reference.xml index d3675bc..b98f978 100644 --- a/test/transform/reference.xml +++ b/test/transform/reference.xml @@ -2,45 +2,7 @@ -42 -<?xml version="1.0" encoding="UTF-8"?> -<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 xalan" -> - -<xsl:output - method="xml" - omit-xml-declaration="no" - encoding="UTF-8" - indent="yes" -/> - -<xsl:template match="/"> -<test_case> - <transform> - <xsl:variable name="argument"> - <key>test</key> - <value>42</value> - </xsl:variable> - - <xsl:variable - name = "result" - select = "InputXSLT:transform('test.xsl', 'test_actual.xml', $argument)" - /> - - <xsl:copy-of select=" - InputXSLT:read-xml-file('test_actual.xml')/test_case/transform_test - "/> - </transform> -</test_case> -</xsl:template> - -</xsl:stylesheet> - +42 diff --git a/test/transform/test.xsl b/test/transform/test.xsl index 677e80d..9a1ea7a 100644 --- a/test/transform/test.xsl +++ b/test/transform/test.xsl @@ -14,17 +14,14 @@ indent="yes" /> - + - - - - - - + + + diff --git a/test/transform/transformation.xsl b/test/transform/transformation.xsl index 7348fef..24f4df7 100644 --- a/test/transform/transformation.xsl +++ b/test/transform/transformation.xsl @@ -14,18 +14,26 @@ indent="yes" /> + + + + + + + + - - test - 42 - - - + + test.xsl + test_actual.xml + + 21 + +