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: | 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 | * <echoproperties> now (alphanumerically) sorts the property list | ||||
before echoing. Bugzilla report 18976. | before echoing. Bugzilla report 18976. | ||||
@@ -3,12 +3,13 @@ | |||||
<head> | <head> | ||||
<meta http-equiv="Content-Language" content="en-us"> | <meta http-equiv="Content-Language" content="en-us"> | ||||
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css"/> | <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"/> | ||||
<title>Xslt/Style Task</title> | |||||
<title>XSLT Task</title> | |||||
</head> | </head> | ||||
<body> | <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> | <h3>Description</h3> | ||||
<p>Process a set of documents via XSLT.</p> | <p>Process a set of documents via XSLT.</p> | ||||
<p>This is useful for building views of XML based documentation, | <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> | <td><b>Description</b></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td><a href="csc.html">Csc</a></td> | |||||
<td><a href="csc.html">csc</a></td> | |||||
<td>Compiles C# code</td> | <td>Compiles C# code</td> | ||||
</tr> | </tr> | ||||
@@ -94,12 +94,12 @@ can, however, be done if absolutely necessary. | |||||
</tr> | </tr> | ||||
<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> | <td>Generates .NET code (C# or VB) from a WSDL file</td> | ||||
</tr> | </tr> | ||||
<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> | <td>Imports a COM type library into .NET</td> | ||||
</tr> | </tr> | ||||
@@ -84,7 +84,6 @@ | |||||
<a href="CoreTasks/signjar.html">SignJar</a><br> | <a href="CoreTasks/signjar.html">SignJar</a><br> | ||||
<a href="CoreTasks/sleep.html">Sleep</a><br> | <a href="CoreTasks/sleep.html">Sleep</a><br> | ||||
<a href="CoreTasks/sql.html">Sql</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/subant.html">Subant</a><br> | ||||
<a href="CoreTasks/sync.html">Sync</a><br> | <a href="CoreTasks/sync.html">Sync</a><br> | ||||
<a href="CoreTasks/tar.html">Tar</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/whichresource.html">WhichResource</a><br> | ||||
<a href="CoreTasks/war.html">War</a><br> | <a href="CoreTasks/war.html">War</a><br> | ||||
<a href="CoreTasks/xmlproperty.html">XmlProperty</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> | <a href="CoreTasks/zip.html">Zip</a><br> | ||||
</body> | </body> | ||||
</html> | </html> |
@@ -946,7 +946,7 @@ documentation.</p> | |||||
</tr> | </tr> | ||||
<tr valign="top"> | <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> | <td><p>Processes a set of documents via XSLT.</p></td> | ||||
</tr> | </tr> | ||||
@@ -10,11 +10,11 @@ | |||||
</target> | </target> | ||||
<target name="testCatchNoDtd" depends="init"> | <target name="testCatchNoDtd" depends="init"> | ||||
<style basedir="xml" destdir="xml/out" | |||||
<xslt basedir="xml" destdir="xml/out" | |||||
includes="about.xml" | includes="about.xml" | ||||
extension=".txt" | extension=".txt" | ||||
style="xml/doc.xsl"> | style="xml/doc.xsl"> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
<xmlcatalog id="xdocs.catalog"> | <xmlcatalog id="xdocs.catalog"> | ||||
@@ -23,42 +23,42 @@ | |||||
</xmlcatalog> | </xmlcatalog> | ||||
<target name="testCatalog" depends="init"> | <target name="testCatalog" depends="init"> | ||||
<style destdir="xml/out" | |||||
<xslt destdir="xml/out" | |||||
includes="about.xml" | includes="about.xml" | ||||
extension=".txt" | extension=".txt" | ||||
style="xml/doc.xsl"> | style="xml/doc.xsl"> | ||||
<xmlcatalog refid="xdocs.catalog"/> | <xmlcatalog refid="xdocs.catalog"/> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
<target name="testOutputProperty" depends="init"> | <target name="testOutputProperty" depends="init"> | ||||
<style in="xml/test.xml" | |||||
<xslt in="xml/test.xml" | |||||
out="xml/out/test-out.xml" | out="xml/out/test-out.xml" | ||||
style="xml/test.xsl"> | style="xml/test.xsl"> | ||||
<outputproperty name="method" value="xml"/> | <outputproperty name="method" value="xml"/> | ||||
<outputproperty name="standalone" value="yes"/> | <outputproperty name="standalone" value="yes"/> | ||||
<outputproperty name="encoding" value="iso8859_1"/> | <outputproperty name="encoding" value="iso8859_1"/> | ||||
<outputproperty name="indent" value="yes"/> | <outputproperty name="indent" value="yes"/> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
<target name="testFactory" depends="init"> | <target name="testFactory" depends="init"> | ||||
<style in="xml/test.xml" | |||||
<xslt in="xml/test.xml" | |||||
out="xml/out/test-out.xml" | out="xml/out/test-out.xml" | ||||
style="xml/test.xsl"> | style="xml/test.xsl"> | ||||
<factory name="org.apache.xalan.processor.TransformerFactoryImpl"/> | <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
<target name="testAttribute" depends="init"> | <target name="testAttribute" depends="init"> | ||||
<style in="xml/test.xml" | |||||
<xslt in="xml/test.xml" | |||||
out="xml/out/test-out.xml" | out="xml/out/test-out.xml" | ||||
style="xml/test.xsl"> | style="xml/test.xsl"> | ||||
<factory name="org.apache.xalan.processor.TransformerFactoryImpl"> | <factory name="org.apache.xalan.processor.TransformerFactoryImpl"> | ||||
<attribute name="http://xml.apache.org/xalan/features/optimize" value="true"/> | <attribute name="http://xml.apache.org/xalan/features/optimize" value="true"/> | ||||
</factory> | </factory> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
@@ -1,6 +1,6 @@ | |||||
<?xml version="1.0"?> | <?xml version="1.0"?> | ||||
<project name="style-test" basedir="." default="nothing"> | |||||
<project name="xslt-test" basedir="." default="nothing"> | |||||
<property name="out.dir" value="out"/> | <property name="out.dir" value="out"/> | ||||
@@ -13,74 +13,74 @@ | |||||
</target> | </target> | ||||
<target name="testStyleIsSet"> | <target name="testStyleIsSet"> | ||||
<style in="data.xml" out="${out.dir}/out.xml"/> | |||||
<xslt in="data.xml" out="${out.dir}/out.xml"/> | |||||
</target> | </target> | ||||
<target name="testTransferParameterSet"> | <target name="testTransferParameterSet"> | ||||
<property name="value" value="myvalue"/> | <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}"/> | <param name="set" expression="${value}"/> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
<target name="testTransferParameterEmpty"> | <target name="testTransferParameterEmpty"> | ||||
<property name="value" value=""/> | <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}"/> | <param name="empty" expression="${value}"/> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
<target name="testTransferParameterUnset"> | <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}"/> | <param name="undefined" expression="${value}"/> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
<target name="testTransferParameterUnsetWithIf"> | <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" /> | <param name="undefined" expression="${value}" if="value" /> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
<target name="testDefaultMapper"> | <target name="testDefaultMapper"> | ||||
<property name="value" value="myvalue"/> | <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}"/> | <param name="set" expression="${value}"/> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
<target name="testCustomMapper"> | <target name="testCustomMapper"> | ||||
<property name="value" value="myvalue"/> | <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}"/> | <param name="set" expression="${value}"/> | ||||
<mapper type="glob" from="data.*" to="out.*"/> | <mapper type="glob" from="data.*" to="out.*"/> | ||||
</style> | |||||
</xslt> | |||||
</target> | </target> | ||||
<target name="testNewerStylesheet"> | <target name="testNewerStylesheet"> | ||||
<antcall target="copyXsl"> | <antcall target="copyXsl"> | ||||
<param name="xsl.value" value="old-value"/> | <param name="xsl.value" value="old-value"/> | ||||
</antcall> | </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"> | <antcall target="copyXsl"> | ||||
<param name="xsl.value" value="new-value"/> | <param name="xsl.value" value="new-value"/> | ||||
</antcall> | </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"/> | <delete file="tmp.xsl"/> | ||||
</target> | </target> | ||||
<target name="testDirectoryHierarchyWithDirMatching"> | <target name="testDirectoryHierarchyWithDirMatching"> | ||||
<mkdir dir="${out.dir}/src/level1/"/> | <mkdir dir="${out.dir}/src/level1/"/> | ||||
<copy file="data.xml" todir="${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"/> | style="printParams.xsl"/> | ||||
</target> | </target> | ||||
<target name="testDirsWithSpaces"> | <target name="testDirsWithSpaces"> | ||||
<mkdir dir="${out.dir}/s rc/"/> | <mkdir dir="${out.dir}/s rc/"/> | ||||
<copy file="data.xml" todir="${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"/> | style="printParams.xsl"/> | ||||
</target> | </target> | ||||
@@ -35,7 +35,7 @@ import org.apache.tools.ant.util.FileUtils; | |||||
* computed (for example, dynamically interpreted parameters or files | * computed (for example, dynamically interpreted parameters or files | ||||
* that need to stay in synch but are not directly linked) or where | * 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 | * 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: | * nested arguments: | ||||
* <ul> | * <ul> | ||||
@@ -1639,7 +1639,7 @@ public class Javadoc extends Task { | |||||
*/ | */ | ||||
public void execute() throws BuildException { | public void execute() throws BuildException { | ||||
if ("javadoc2".equals(getTaskType())) { | 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(); | 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 | * @todo validate that if either in or our is defined, then both are | ||||
*/ | */ | ||||
public void execute() throws BuildException { | 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; | File savedBaseDir = baseDir; | ||||
DirectoryScanner scanner; | DirectoryScanner scanner; | ||||
@@ -31,7 +31,6 @@ available=org.apache.tools.ant.taskdefs.Available | |||||
filter=org.apache.tools.ant.taskdefs.Filter | filter=org.apache.tools.ant.taskdefs.Filter | ||||
fixcrlf=org.apache.tools.ant.taskdefs.FixCRLF | fixcrlf=org.apache.tools.ant.taskdefs.FixCRLF | ||||
patch=org.apache.tools.ant.taskdefs.Patch | patch=org.apache.tools.ant.taskdefs.Patch | ||||
style=org.apache.tools.ant.taskdefs.XSLTProcess | |||||
xslt=org.apache.tools.ant.taskdefs.XSLTProcess | xslt=org.apache.tools.ant.taskdefs.XSLTProcess | ||||
touch=org.apache.tools.ant.taskdefs.Touch | touch=org.apache.tools.ant.taskdefs.Touch | ||||
signjar=org.apache.tools.ant.taskdefs.SignJar | 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 | telnet=org.apache.tools.ant.taskdefs.optional.net.TelnetTask | ||||
csc=org.apache.tools.ant.taskdefs.optional.dotnet.CSharp | csc=org.apache.tools.ant.taskdefs.optional.dotnet.CSharp | ||||
ilasm=org.apache.tools.ant.taskdefs.optional.dotnet.Ilasm | 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 | wsdltodotnet=org.apache.tools.ant.taskdefs.optional.dotnet.WsdlToDotnet | ||||
importtypelib=org.apache.tools.ant.taskdefs.optional.dotnet.ImportTypelib | importtypelib=org.apache.tools.ant.taskdefs.optional.dotnet.ImportTypelib | ||||
stylebook=org.apache.tools.ant.taskdefs.optional.StyleBook | 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 | copyfile=org.apache.tools.ant.taskdefs.Copyfile | ||||
deltree=org.apache.tools.ant.taskdefs.Deltree | deltree=org.apache.tools.ant.taskdefs.Deltree | ||||
rename=org.apache.tools.ant.taskdefs.Rename | 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 java.net.MalformedURLException; | ||||
import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
import org.apache.tools.ant.Project; | |||||
import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
import org.apache.tools.ant.types.EnumeratedAttribute; | import org.apache.tools.ant.types.EnumeratedAttribute; | ||||
import org.apache.tools.ant.taskdefs.condition.Os; | import org.apache.tools.ant.taskdefs.condition.Os; | ||||
@@ -275,6 +276,10 @@ public class WsdlToDotnet extends Task { | |||||
*/ | */ | ||||
public void execute() | public void execute() | ||||
throws BuildException { | 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) { | if (compiler == null) { | ||||
compiler = Compiler.createDefaultCompiler(); | 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 | * @version 2003-08-05 | ||||
*/ | */ | ||||
public class StyleTest extends BuildFileTest { | public class StyleTest extends BuildFileTest { | ||||
@@ -19,8 +19,8 @@ package org.apache.tools.ant.taskdefs.optional; | |||||
import org.apache.tools.ant.BuildFileTest; | 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 | * @since Ant 1.5 | ||||
*/ | */ | ||||
public class XsltTest extends BuildFileTest { | public class XsltTest extends BuildFileTest { | ||||