From b73592bce8beff19b140ae9013b8a5682b20c848 Mon Sep 17 00:00:00 2001 From: Jan Materne Date: Sat, 6 Sep 2003 08:50:20 +0000 Subject: [PATCH] spell check git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275191 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/api/index.html | 35 ++++++++---- docs/manual/api/packages.html | 49 ++++++++++------ docs/resources.html | 2 +- .../tools/ant/taskdefs/XSLTProcess.java | 13 ++++- .../apache/tools/ant/taskdefs/StyleTest.java | 57 ++++++++++++++++++- xdocs/resources.xml | 4 +- 6 files changed, 127 insertions(+), 33 deletions(-) diff --git a/docs/manual/api/index.html b/docs/manual/api/index.html index 7eab05e23..5aa1f8b2c 100644 --- a/docs/manual/api/index.html +++ b/docs/manual/api/index.html @@ -1,11 +1,26 @@ - - - -Apache Ant API - - -Redirecting to Apache Ant API ... - - - + + + + + + +Apache Ant API + + + + + + + + + +<H2> +Frame Alert</H2> +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="overview-summary.html">Non-frame version.</A> + + + diff --git a/docs/manual/api/packages.html b/docs/manual/api/packages.html index c57230db7..539a5ec3f 100644 --- a/docs/manual/api/packages.html +++ b/docs/manual/api/packages.html @@ -1,22 +1,37 @@ - - -Apache Ant API - - -Apache Ant API has not been generated + + + + + + + (Apache Ant API) + -

If you see this page online at ant.apache.org, it is not a bug, but -on purpose. We do not provide an online version of the API docs, they -are included with all our distributions, including the nightly -builds.

-

If you want to see the API docs for the latest code, they are -generated by Apache Gump -and linked from http://nagoya.apache.org/gump/javadoc/ant/build/javadocs/index.html.

+ - - + + + + +
+ +
+ +
+
+The front page has been relocated.Please see: +
+          Frame version +
+          Non-frame version.
+ + + diff --git a/docs/resources.html b/docs/resources.html index 20dfc481d..5ab53638d 100644 --- a/docs/resources.html +++ b/docs/resources.html @@ -220,7 +220,7 @@ FAQ about Borland Application Server tasks -

Benoit Moussaud, the original author if the Borland +

Benoit Moussaud, the original author of the Borland Application Server specific EJB tasks has put together a FAQ for this specific subtask.

diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java index b06dfd20c..7491603e4 100644 --- a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java +++ b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java @@ -226,6 +226,9 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { ((XSLTLoggerAware) liaison).setLogger(this); } + Class cl = liaison.getClass(); + String s = cl.toString(); + log("Using " + liaison.getClass().toString(), Project.MSG_VERBOSE); File stylesheet = getProject().resolveFile(xslFile); @@ -566,22 +569,27 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { protected XSLTLiaison getLiaison() { // if processor wasn't specified, see if TraX is available. If not, // default it to xslp or xalan, depending on which is in the classpath + Class cl = null; if (liaison == null) { if (processor != null) { try { resolveProcessor(processor); + cl = liaison.getClass(); } catch (Exception e) { throw new BuildException(e); } } else { try { resolveProcessor("trax"); + cl = liaison.getClass(); } catch (Throwable e1) { try { resolveProcessor("xalan"); + cl = liaison.getClass(); } catch (Throwable e2) { try { resolveProcessor("xslp"); + cl = liaison.getClass(); } catch (Throwable e3) { e3.printStackTrace(); e2.printStackTrace(); @@ -591,6 +599,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { } } } + cl = liaison.getClass(); return liaison; } @@ -701,7 +710,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { && project.getProperty(unlessProperty) != null) { return false; } - + return true; } } // Param @@ -953,4 +962,4 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { } // -- class Factory -} //-- XSLTProcess +} //-- XSLTProcess \ No newline at end of file diff --git a/src/testcases/org/apache/tools/ant/taskdefs/StyleTest.java b/src/testcases/org/apache/tools/ant/taskdefs/StyleTest.java index c90d2c24a..ac850d4bc 100644 --- a/src/testcases/org/apache/tools/ant/taskdefs/StyleTest.java +++ b/src/testcases/org/apache/tools/ant/taskdefs/StyleTest.java @@ -61,6 +61,7 @@ import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.Reader; +import java.io.FileWriter; /** @@ -112,6 +113,60 @@ public class StyleTest extends BuildFileTest { "undefined='undefined default value'"); } + public void testNewerStylesheet() throws Exception { + File xmlFile = new File("testNewerStylesheet.xml"); + File xslFile = new File("testNewerStylesheet.xsl"); + File outFile = new File("testNewerStylesheet.out"); + + // create the first version of xml and xsl + String xml = ""; + StringBuffer xslHeader = new StringBuffer(); + StringBuffer xslFooter = new StringBuffer(); + xslHeader.append(""); + xslHeader.append(""); + xslHeader.append(""); + xslFooter.append(""); + xslFooter.append(""); + + FileWriter xmlWriter = new FileWriter(xmlFile); + xmlWriter.write(xml); + xmlWriter.close(); + + FileWriter xslWriter = new FileWriter(xslFile); + xslWriter.write(xslHeader.toString()); + xslWriter.write("old-string"); + xslWriter.write(xslFooter.toString()); + xslWriter.close(); + + // make the first transformation + XSLTProcess xslt = new XSLTProcess(); + xslt.setProject(getProject()); + System.out.println("Project : " + getProject()); + xslt.setBasedir(getProject().getBaseDir()); + xslt.setStyle(xslFile.toString()); + xslt.setOut(outFile); + xslt.setIn(xmlFile); + xslt.execute(); + + // modify the xsl + xslWriter = new FileWriter(xslFile); + xslWriter.write(xslHeader.toString()); + xslWriter.write("new-string"); + xslWriter.write(xslFooter.toString()); + xslWriter.close(); + xslt.perform(); + + // make the second transformation + + + // test for 2nd transformation + xmlFile.delete(); + xslFile.delete(); + outFile.delete(); + } + // ************* copied from ConcatTest ************* @@ -151,4 +206,4 @@ public class StyleTest extends BuildFileTest { " but got " + content, content.indexOf(contains) > -1); } -} +} \ No newline at end of file diff --git a/xdocs/resources.xml b/xdocs/resources.xml index 109d30eee..c9200643c 100644 --- a/xdocs/resources.xml +++ b/xdocs/resources.xml @@ -1,4 +1,4 @@ - + @@ -38,7 +38,7 @@ -

Benoit Moussaud, the original author if the Borland +

Benoit Moussaud, the original author of the Borland Application Server specific EJB tasks has put together a FAQ for this specific subtask.