From e0b6e804f043be8a02b9934040cf63baf6b55d46 Mon Sep 17 00:00:00 2001
From: Antoine Levy-Lambert
Date: Sat, 26 Jul 2003 16:40:08 +0000
Subject: [PATCH] XSLT/param@expression used as string instead of as expression
as documented There were 2 options to fix the bugreport : - change the code -
change the documentation I hope that the option to change the documentation
is OK. Thanks for the bug report. PR: 21525
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274957 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/CoreTasks/style.html | 4 ++--
.../apache/tools/ant/taskdefs/XSLTProcess.java | 15 +++++++--------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/docs/manual/CoreTasks/style.html b/docs/manual/CoreTasks/style.html
index 37a67ee7d..de184d734 100644
--- a/docs/manual/CoreTasks/style.html
+++ b/docs/manual/CoreTasks/style.html
@@ -186,8 +186,8 @@ element is used to perform Entity and URI resolution.
expression |
- XSL expression to be placed into the param. To pass a text
- value into the style sheet it needs to be escaped using single quotes. |
+ Text value to be placed into the param.
+ Was originally intended to be an XSL expression.
| Yes |
diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
index 9cfbb75cc..afba587ba 100644
--- a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
+++ b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
@@ -609,7 +609,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
/** The parameter name */
private String name = null;
- /** The parameter's XSL expression */
+ /** The parameter's value */
private String expression = null;
/**
@@ -622,10 +622,9 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
}
/**
- * The XSL expression for the parameter value
- *
- * @param expression the XSL expression representing the
- * parameter's value.
+ * The parameter value
+ * NOTE : was intended to be an XSL expression.
+ * @param expression the parameter's value.
*/
public void setExpression(String expression) {
this.expression = expression;
@@ -645,10 +644,10 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
}
/**
- * Get the parameter expression
+ * Get the parameter's value
*
- * @return the parameter expression
- * @exception BuildException if the expression is not set.
+ * @return the parameter value
+ * @exception BuildException if the value is not set.
*/
public String getExpression() throws BuildException {
if (expression == null) {