git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275191 13f79535-47bb-0310-9956-ffa450edef68master
@@ -1,11 +1,26 @@ | |||||
<html> | |||||
<head> | |||||
<meta http-equiv="refresh" content="1; URL=packages.html"> | |||||
<title>Apache Ant API</title> | |||||
</head> | |||||
<body> | |||||
Redirecting to <a href="packages.html">Apache Ant API ...</a> | |||||
</body> | |||||
</html> | |||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> | |||||
<!--NewPage--> | |||||
<HTML> | |||||
<HEAD> | |||||
<!-- Generated by javadoc on Sat Sep 06 10:24:18 CEST 2003--> | |||||
<TITLE> | |||||
Apache Ant API | |||||
</TITLE> | |||||
</HEAD> | |||||
<FRAMESET cols="20%,80%"> | |||||
<FRAMESET rows="30%,70%"> | |||||
<FRAME src="overview-frame.html" name="packageListFrame" title="All Packages"> | |||||
<FRAME src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)"> | |||||
</FRAMESET> | |||||
<FRAME src="overview-summary.html" name="classFrame" title="Package, class and interface descriptions"> | |||||
<NOFRAMES> | |||||
<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> | |||||
</NOFRAMES> | |||||
</FRAMESET> | |||||
</HTML> |
@@ -1,22 +1,37 @@ | |||||
<html> | |||||
<head> | |||||
<title>Apache Ant API</title> | |||||
</head> | |||||
<body> | |||||
<b>Apache Ant API has not been generated</b> | |||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |||||
<!--NewPage--> | |||||
<HTML> | |||||
<HEAD> | |||||
<!-- Generated by javadoc (build 1.4.2) on Sat Sep 06 10:24:18 CEST 2003 --> | |||||
<TITLE> | |||||
(Apache Ant API) | |||||
</TITLE> | |||||
<p>If you see this page online at <a | |||||
href="http://ant.apache.org">ant.apache.org</a>, 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.</p> | |||||
<p>If you want to see the API docs for the latest code, they are | |||||
generated by <a href="http://jakarta.apache.org/gump/">Apache Gump</a> | |||||
and linked from <a | |||||
href="http://nagoya.apache.org/gump/javadoc/ant/build/javadocs/index.html">http://nagoya.apache.org/gump/javadoc/ant/build/javadocs/index.html</a>.</p> | |||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> | |||||
</body> | |||||
</html> | |||||
<SCRIPT type="text/javascript"> | |||||
function windowTitle() | |||||
{ | |||||
parent.document.title=" (Apache Ant API)"; | |||||
} | |||||
</SCRIPT> | |||||
</HEAD> | |||||
<BODY BGCOLOR="white" onload="windowTitle();"> | |||||
<BR> | |||||
<BR> | |||||
<BR> | |||||
<CENTER> | |||||
The front page has been relocated.Please see: | |||||
<BR> | |||||
<A HREF="index.html">Frame version</A> | |||||
<BR> | |||||
<A HREF="overview-summary.html">Non-frame version.</A></CENTER> | |||||
</BODY> | |||||
</HTML> |
@@ -220,7 +220,7 @@ | |||||
<a name="FAQ about Borland Application Server tasks"></a> | <a name="FAQ about Borland Application Server tasks"></a> | ||||
FAQ about Borland Application Server tasks | FAQ about Borland Application Server tasks | ||||
</h4> | </h4> | ||||
<p>Benoit Moussaud, the original author if the Borland | |||||
<p>Benoit Moussaud, the original author of the Borland | |||||
Application Server specific <a href="manual/OptionalTasks/ejb.html#ejbtasks">EJB tasks</a> has put | Application Server specific <a href="manual/OptionalTasks/ejb.html#ejbtasks">EJB tasks</a> has put | ||||
together a FAQ for this specific subtask.</p> | together a FAQ for this specific subtask.</p> | ||||
<table class="externals" cellspacing="1" cellpadding="4"> | <table class="externals" cellspacing="1" cellpadding="4"> | ||||
@@ -226,6 +226,9 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||||
((XSLTLoggerAware) liaison).setLogger(this); | ((XSLTLoggerAware) liaison).setLogger(this); | ||||
} | } | ||||
Class cl = liaison.getClass(); | |||||
String s = cl.toString(); | |||||
log("Using " + liaison.getClass().toString(), Project.MSG_VERBOSE); | log("Using " + liaison.getClass().toString(), Project.MSG_VERBOSE); | ||||
File stylesheet = getProject().resolveFile(xslFile); | File stylesheet = getProject().resolveFile(xslFile); | ||||
@@ -566,22 +569,27 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||||
protected XSLTLiaison getLiaison() { | protected XSLTLiaison getLiaison() { | ||||
// if processor wasn't specified, see if TraX is available. If not, | // 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 | // default it to xslp or xalan, depending on which is in the classpath | ||||
Class cl = null; | |||||
if (liaison == null) { | if (liaison == null) { | ||||
if (processor != null) { | if (processor != null) { | ||||
try { | try { | ||||
resolveProcessor(processor); | resolveProcessor(processor); | ||||
cl = liaison.getClass(); | |||||
} catch (Exception e) { | } catch (Exception e) { | ||||
throw new BuildException(e); | throw new BuildException(e); | ||||
} | } | ||||
} else { | } else { | ||||
try { | try { | ||||
resolveProcessor("trax"); | resolveProcessor("trax"); | ||||
cl = liaison.getClass(); | |||||
} catch (Throwable e1) { | } catch (Throwable e1) { | ||||
try { | try { | ||||
resolveProcessor("xalan"); | resolveProcessor("xalan"); | ||||
cl = liaison.getClass(); | |||||
} catch (Throwable e2) { | } catch (Throwable e2) { | ||||
try { | try { | ||||
resolveProcessor("xslp"); | resolveProcessor("xslp"); | ||||
cl = liaison.getClass(); | |||||
} catch (Throwable e3) { | } catch (Throwable e3) { | ||||
e3.printStackTrace(); | e3.printStackTrace(); | ||||
e2.printStackTrace(); | e2.printStackTrace(); | ||||
@@ -591,6 +599,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
cl = liaison.getClass(); | |||||
return liaison; | return liaison; | ||||
} | } | ||||
@@ -701,7 +710,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||||
&& project.getProperty(unlessProperty) != null) { | && project.getProperty(unlessProperty) != null) { | ||||
return false; | return false; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
} // Param | } // Param | ||||
@@ -953,4 +962,4 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||||
} // -- class Factory | } // -- class Factory | ||||
} //-- XSLTProcess | |||||
} //-- XSLTProcess |
@@ -61,6 +61,7 @@ import java.io.File; | |||||
import java.io.FileReader; | import java.io.FileReader; | ||||
import java.io.IOException; | import java.io.IOException; | ||||
import java.io.Reader; | import java.io.Reader; | ||||
import java.io.FileWriter; | |||||
/** | /** | ||||
@@ -112,6 +113,60 @@ public class StyleTest extends BuildFileTest { | |||||
"undefined='undefined default value'"); | "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 = "<data/>"; | |||||
StringBuffer xslHeader = new StringBuffer(); | |||||
StringBuffer xslFooter = new StringBuffer(); | |||||
xslHeader.append("<?xml version=\"1.0\"?>"); | |||||
xslHeader.append("<xsl:stylesheet"); | |||||
xslHeader.append(" version=\"1.0\""); | |||||
xslHeader.append(" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">"); | |||||
xslHeader.append("<xsl:template match=\"/\">"); | |||||
xslFooter.append("</xsl:template>"); | |||||
xslFooter.append("</xsl:stylesheet>"); | |||||
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 ************* | // ************* copied from ConcatTest ************* | ||||
@@ -151,4 +206,4 @@ public class StyleTest extends BuildFileTest { | |||||
" but got " + content, content.indexOf(contains) > -1); | " but got " + content, content.indexOf(contains) > -1); | ||||
} | } | ||||
} | |||||
} |
@@ -1,4 +1,4 @@ | |||||
<?xml version="1.0" encoding="ISO-8859-1" ?> | |||||
<?xml version="1.0" encoding="ISO-8859-1" ?> | |||||
<document> | <document> | ||||
<properties> | <properties> | ||||
@@ -38,7 +38,7 @@ | |||||
</subsection> | </subsection> | ||||
<subsection name="FAQ about Borland Application Server tasks"> | <subsection name="FAQ about Borland Application Server tasks"> | ||||
<p>Benoit Moussaud, the original author if the Borland | |||||
<p>Benoit Moussaud, the original author of the Borland | |||||
Application Server specific <a | Application Server specific <a | ||||
href="manual/OptionalTasks/ejb.html#ejbtasks">EJB tasks</a> has put | href="manual/OptionalTasks/ejb.html#ejbtasks">EJB tasks</a> has put | ||||
together a FAQ for this specific subtask.</p> | together a FAQ for this specific subtask.</p> | ||||