ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r720481 - /ant/core/trunk/src/tests/antunit/taskdefs/xslt-test.xml
Date Tue, 25 Nov 2008 12:36:00 GMT
Author: bodewig
Date: Tue Nov 25 04:36:00 2008
New Revision: 720481

URL: http://svn.apache.org/viewvc?rev=720481&view=rev
Log:
add a test for issue 32461

Modified:
    ant/core/trunk/src/tests/antunit/taskdefs/xslt-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/xslt-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/xslt-test.xml?rev=720481&r1=720480&r2=720481&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/xslt-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/xslt-test.xml Tue Nov 25 04:36:00 2008
@@ -35,4 +35,35 @@
        value="set='myvalue'"/>
   </target>
 
+  <target name="testInlineStyleSheet" depends="setUp">
+    <xslt in="${legacy.dir}/data.xml"
+          out="${output}/out.xml">
+      <param name="set" expression="somevalue"/>
+      <style>
+        <string><![CDATA[<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+<!-- get the xsl-parameter -->
+<xsl:param name="set">set default value</xsl:param>
+<xsl:param name="empty">empty default value</xsl:param>
+<xsl:param name="undefined">undefined default value</xsl:param>
+
+<!-- use the xsl-parameter -->
+<xsl:template match="/">
+set='<xsl:value-of select="$set"/>'
+empty='<xsl:value-of select="$empty"/>'
+undefined='<xsl:value-of select="$undefined"/>'
+</xsl:template>
+
+</xsl:stylesheet>
+]]></string>
+      </style>
+    </xslt>
+    <au:assertResourceContains
+       resource="${output}/out.xml"
+       value="set='somevalue'"/>
+  </target>
+
 </project>



Mime
View raw message