git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278068 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -79,6 +79,9 @@ Fixed bugs: | |||
| Other changes: | |||
| -------------- | |||
| * <WsdlToDotnet> and <style> are now deprecated in favor of <wsdltodotnet> and | |||
| <xslt>, respectively. Bugzilla report 25832. | |||
| * <echoproperties> now (alphanumerically) sorts the property list | |||
| before echoing. Bugzilla report 18976. | |||
| @@ -3,12 +3,13 @@ | |||
| <head> | |||
| <meta http-equiv="Content-Language" content="en-us"> | |||
| <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"/> | |||
| <title>Xslt/Style Task</title> | |||
| <title>XSLT Task</title> | |||
| </head> | |||
| <body> | |||
| <h2><a name="style">Xslt/Style</a></h2> | |||
| <h2><a name="style">XSLT</a></h2> | |||
| <p><em>The name <code>style</code> is a deprecated name for the same task.</em></p> | |||
| <h3>Description</h3> | |||
| <p>Process a set of documents via XSLT.</p> | |||
| <p>This is useful for building views of XML based documentation, | |||
| @@ -69,7 +69,7 @@ can, however, be done if absolutely necessary. | |||
| <td><b>Description</b></td> | |||
| </tr> | |||
| <tr> | |||
| <td><a href="csc.html">Csc</a></td> | |||
| <td><a href="csc.html">csc</a></td> | |||
| <td>Compiles C# code</td> | |||
| </tr> | |||
| @@ -94,12 +94,12 @@ can, however, be done if absolutely necessary. | |||
| </tr> | |||
| <tr> | |||
| <td><a href="wsdltodotnet.html">WsdlToDotnet</a></td> | |||
| <td><a href="wsdltodotnet.html">wsdltodotnet</a></td> | |||
| <td>Generates .NET code (C# or VB) from a WSDL file</td> | |||
| </tr> | |||
| <tr> | |||
| <td><a href="importtypelib.html">ImportTypelib</a></td> | |||
| <td><a href="importtypelib.html">importtypelib</a></td> | |||
| <td>Imports a COM type library into .NET</td> | |||
| </tr> | |||
| @@ -84,7 +84,6 @@ | |||
| <a href="CoreTasks/signjar.html">SignJar</a><br> | |||
| <a href="CoreTasks/sleep.html">Sleep</a><br> | |||
| <a href="CoreTasks/sql.html">Sql</a><br> | |||
| <a href="CoreTasks/style.html">Style</a><br> | |||
| <a href="CoreTasks/subant.html">Subant</a><br> | |||
| <a href="CoreTasks/sync.html">Sync</a><br> | |||
| <a href="CoreTasks/tar.html">Tar</a><br> | |||
| @@ -102,7 +101,7 @@ | |||
| <a href="CoreTasks/whichresource.html">WhichResource</a><br> | |||
| <a href="CoreTasks/war.html">War</a><br> | |||
| <a href="CoreTasks/xmlproperty.html">XmlProperty</a><br> | |||
| <a href="CoreTasks/style.html">Xslt</a><br> | |||
| <a href="CoreTasks/style.html">XSLT/<i>Style</i></a><br> | |||
| <a href="CoreTasks/zip.html">Zip</a><br> | |||
| </body> | |||
| </html> | |||
| @@ -946,7 +946,7 @@ documentation.</p> | |||
| </tr> | |||
| <tr valign="top"> | |||
| <td nowrap><a href="CoreTasks/style.html">Xslt/Style</a></td> | |||
| <td nowrap><a href="CoreTasks/style.html">XSLT</a></td> | |||
| <td><p>Processes a set of documents via XSLT.</p></td> | |||
| </tr> | |||
| @@ -10,11 +10,11 @@ | |||
| </target> | |||
| <target name="testCatchNoDtd" depends="init"> | |||
| <style basedir="xml" destdir="xml/out" | |||
| <xslt basedir="xml" destdir="xml/out" | |||
| includes="about.xml" | |||
| extension=".txt" | |||
| style="xml/doc.xsl"> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| <xmlcatalog id="xdocs.catalog"> | |||
| @@ -23,42 +23,42 @@ | |||
| </xmlcatalog> | |||
| <target name="testCatalog" depends="init"> | |||
| <style destdir="xml/out" | |||
| <xslt destdir="xml/out" | |||
| includes="about.xml" | |||
| extension=".txt" | |||
| style="xml/doc.xsl"> | |||
| <xmlcatalog refid="xdocs.catalog"/> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| <target name="testOutputProperty" depends="init"> | |||
| <style in="xml/test.xml" | |||
| <xslt in="xml/test.xml" | |||
| out="xml/out/test-out.xml" | |||
| style="xml/test.xsl"> | |||
| <outputproperty name="method" value="xml"/> | |||
| <outputproperty name="standalone" value="yes"/> | |||
| <outputproperty name="encoding" value="iso8859_1"/> | |||
| <outputproperty name="indent" value="yes"/> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| <target name="testFactory" depends="init"> | |||
| <style in="xml/test.xml" | |||
| <xslt in="xml/test.xml" | |||
| out="xml/out/test-out.xml" | |||
| style="xml/test.xsl"> | |||
| <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| <target name="testAttribute" depends="init"> | |||
| <style in="xml/test.xml" | |||
| <xslt in="xml/test.xml" | |||
| out="xml/out/test-out.xml" | |||
| style="xml/test.xsl"> | |||
| <factory name="org.apache.xalan.processor.TransformerFactoryImpl"> | |||
| <attribute name="http://xml.apache.org/xalan/features/optimize" value="true"/> | |||
| </factory> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| @@ -1,6 +1,6 @@ | |||
| <?xml version="1.0"?> | |||
| <project name="style-test" basedir="." default="nothing"> | |||
| <project name="xslt-test" basedir="." default="nothing"> | |||
| <property name="out.dir" value="out"/> | |||
| @@ -13,74 +13,74 @@ | |||
| </target> | |||
| <target name="testStyleIsSet"> | |||
| <style in="data.xml" out="${out.dir}/out.xml"/> | |||
| <xslt in="data.xml" out="${out.dir}/out.xml"/> | |||
| </target> | |||
| <target name="testTransferParameterSet"> | |||
| <property name="value" value="myvalue"/> | |||
| <style in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||
| <xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||
| <param name="set" expression="${value}"/> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| <target name="testTransferParameterEmpty"> | |||
| <property name="value" value=""/> | |||
| <style in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||
| <xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||
| <param name="empty" expression="${value}"/> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| <target name="testTransferParameterUnset"> | |||
| <style in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||
| <xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||
| <param name="undefined" expression="${value}"/> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| <target name="testTransferParameterUnsetWithIf"> | |||
| <style in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||
| <xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||
| <param name="undefined" expression="${value}" if="value" /> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| <target name="testDefaultMapper"> | |||
| <property name="value" value="myvalue"/> | |||
| <style style="printParams.xsl" destDir="${out.dir}" basedir="."> | |||
| <xslt style="printParams.xsl" destDir="${out.dir}" basedir="."> | |||
| <param name="set" expression="${value}"/> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| <target name="testCustomMapper"> | |||
| <property name="value" value="myvalue"/> | |||
| <style style="printParams.xsl" destDir="${out.dir}" basedir="."> | |||
| <xslt style="printParams.xsl" destDir="${out.dir}" basedir="."> | |||
| <param name="set" expression="${value}"/> | |||
| <mapper type="glob" from="data.*" to="out.*"/> | |||
| </style> | |||
| </xslt> | |||
| </target> | |||
| <target name="testNewerStylesheet"> | |||
| <antcall target="copyXsl"> | |||
| <param name="xsl.value" value="old-value"/> | |||
| </antcall> | |||
| <style in="data.xml" out="${out.dir}/out.xml" style="tmp.xsl"/> | |||
| <xslt in="data.xml" out="${out.dir}/out.xml" style="tmp.xsl"/> | |||
| <antcall target="copyXsl"> | |||
| <param name="xsl.value" value="new-value"/> | |||
| </antcall> | |||
| <style in="data.xml" out="${out.dir}/out.xml" style="tmp.xsl"/> | |||
| <xslt in="data.xml" out="${out.dir}/out.xml" style="tmp.xsl"/> | |||
| <delete file="tmp.xsl"/> | |||
| </target> | |||
| <target name="testDirectoryHierarchyWithDirMatching"> | |||
| <mkdir dir="${out.dir}/src/level1/"/> | |||
| <copy file="data.xml" todir="${out.dir}/src/level1/"/> | |||
| <style basedir="${out.dir}/src" destdir="${out.dir}/dest" | |||
| <xslt basedir="${out.dir}/src" destdir="${out.dir}/dest" | |||
| style="printParams.xsl"/> | |||
| </target> | |||
| <target name="testDirsWithSpaces"> | |||
| <mkdir dir="${out.dir}/s rc/"/> | |||
| <copy file="data.xml" todir="${out.dir}/s rc/"/> | |||
| <style basedir="${out.dir}/s rc" destdir="${out.dir}/d est" | |||
| <xslt basedir="${out.dir}/s rc" destdir="${out.dir}/d est" | |||
| style="printParams.xsl"/> | |||
| </target> | |||
| @@ -35,7 +35,7 @@ import org.apache.tools.ant.util.FileUtils; | |||
| * computed (for example, dynamically interpreted parameters or files | |||
| * that need to stay in synch but are not directly linked) or where | |||
| * the ant task in question could compute them but does not (for | |||
| * example, the linked DTD for an XML file using the style task). | |||
| * example, the linked DTD for an XML file using the XSLT task). | |||
| * | |||
| * nested arguments: | |||
| * <ul> | |||
| @@ -1639,7 +1639,7 @@ public class Javadoc extends Task { | |||
| */ | |||
| public void execute() throws BuildException { | |||
| if ("javadoc2".equals(getTaskType())) { | |||
| log("!! javadoc2 is deprecated. Use javadoc instead. !!"); | |||
| log("Warning: the task name <javadoc2> is deprecated. Use <javadoc> instead.", Project.MSG_WARN); | |||
| } | |||
| Vector packagesToDoc = new Vector(); | |||
| @@ -190,6 +190,10 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||
| * @todo validate that if either in or our is defined, then both are | |||
| */ | |||
| public void execute() throws BuildException { | |||
| if ("style".equals(getTaskType())) { | |||
| log("Warning: the task name <style> is deprecated. Use <xslt> instead.", Project.MSG_WARN); | |||
| } | |||
| File savedBaseDir = baseDir; | |||
| DirectoryScanner scanner; | |||
| @@ -31,7 +31,6 @@ available=org.apache.tools.ant.taskdefs.Available | |||
| filter=org.apache.tools.ant.taskdefs.Filter | |||
| fixcrlf=org.apache.tools.ant.taskdefs.FixCRLF | |||
| patch=org.apache.tools.ant.taskdefs.Patch | |||
| style=org.apache.tools.ant.taskdefs.XSLTProcess | |||
| xslt=org.apache.tools.ant.taskdefs.XSLTProcess | |||
| touch=org.apache.tools.ant.taskdefs.Touch | |||
| signjar=org.apache.tools.ant.taskdefs.SignJar | |||
| @@ -128,7 +127,6 @@ vajimport=org.apache.tools.ant.taskdefs.optional.ide.VAJImport | |||
| telnet=org.apache.tools.ant.taskdefs.optional.net.TelnetTask | |||
| csc=org.apache.tools.ant.taskdefs.optional.dotnet.CSharp | |||
| ilasm=org.apache.tools.ant.taskdefs.optional.dotnet.Ilasm | |||
| WsdlToDotnet=org.apache.tools.ant.taskdefs.optional.dotnet.WsdlToDotnet | |||
| wsdltodotnet=org.apache.tools.ant.taskdefs.optional.dotnet.WsdlToDotnet | |||
| importtypelib=org.apache.tools.ant.taskdefs.optional.dotnet.ImportTypelib | |||
| stylebook=org.apache.tools.ant.taskdefs.optional.StyleBook | |||
| @@ -216,3 +214,5 @@ copydir=org.apache.tools.ant.taskdefs.Copydir | |||
| copyfile=org.apache.tools.ant.taskdefs.Copyfile | |||
| deltree=org.apache.tools.ant.taskdefs.Deltree | |||
| rename=org.apache.tools.ant.taskdefs.Rename | |||
| WsdlToDotnet=org.apache.tools.ant.taskdefs.optional.dotnet.WsdlToDotnet | |||
| style=org.apache.tools.ant.taskdefs.XSLTProcess | |||
| @@ -22,6 +22,7 @@ import java.util.Iterator; | |||
| import java.net.MalformedURLException; | |||
| import org.apache.tools.ant.BuildException; | |||
| import org.apache.tools.ant.Project; | |||
| import org.apache.tools.ant.Task; | |||
| import org.apache.tools.ant.types.EnumeratedAttribute; | |||
| import org.apache.tools.ant.taskdefs.condition.Os; | |||
| @@ -275,6 +276,10 @@ public class WsdlToDotnet extends Task { | |||
| */ | |||
| public void execute() | |||
| throws BuildException { | |||
| if ("WsdlToDotnet".equals(getTaskType())) { | |||
| log("Warning: the task name <WsdlToDotnet> is deprecated. Use <wsdltodotnet> (all lowercase) instead.", Project.MSG_WARN); | |||
| } | |||
| if (compiler == null) { | |||
| compiler = Compiler.createDefaultCompiler(); | |||
| } | |||
| @@ -28,7 +28,8 @@ import java.io.FileWriter; | |||
| /** | |||
| * TestCases for <style> / <xslt> task. | |||
| * TestCases for {@link XSLTProcess} task. | |||
| * XXX merge with {@link XsltTest}? | |||
| * @version 2003-08-05 | |||
| */ | |||
| public class StyleTest extends BuildFileTest { | |||
| @@ -19,8 +19,8 @@ package org.apache.tools.ant.taskdefs.optional; | |||
| import org.apache.tools.ant.BuildFileTest; | |||
| /** | |||
| * Tests the style/xslt task. | |||
| * | |||
| * Tests the {@link XSLTProcess} task. | |||
| * XXX merge with {@link StyleTest}? | |||
| * @since Ant 1.5 | |||
| */ | |||
| public class XsltTest extends BuildFileTest { | |||