Browse Source

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
master
Antoine Levy-Lambert 22 years ago
parent
commit
e0b6e804f0
2 changed files with 9 additions and 10 deletions
  1. +2
    -2
      docs/manual/CoreTasks/style.html
  2. +7
    -8
      src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java

+ 2
- 2
docs/manual/CoreTasks/style.html View File

@@ -186,8 +186,8 @@ element is used to perform Entity and URI resolution.</p>
</tr>
<tr>
<td valign="top">expression</td>
<td valign="top">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.</td>
<td valign="top">Text value to be placed into the param.<br/>
Was originally intended to be an XSL expression.
<td align="center" valign="top">Yes</td>
</tr>
</table>


+ 7
- 8
src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -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) {


Loading…
Cancel
Save