|
Hi Revathi,
Strictly speaking, the replacement of "-" and
"." is needed only for variables (since variables are stored as either instance
variables or local variables in a class and a Java identifier cannot contain
those chars). However, since vars and params share a lot of code, it was easier
to do the same for params.
I think the problem is that
TransformerImpl.setParameter() is calling AbstractTranslet.addParameter(String,
Object, boolean) instead of AbstractTranslet.addParameter(String, Object).
Wouldn't your problem be fixed by simply changing the call to
addParameter(String, Object) in setParameter()?
-- Santiago
---- Original Message -----
Sent: Friday, January 24, 2003 8:46
AM
Subject: Patch for Issue 15636 [ XSLTC
translets ignore parameters with dots in their names when they are set with
Transformer.setParameter ]
Hi All, This is Revathi.K of SIP Technologies
& Exports Ltd, i have attempted to fix issue 15636 of project
xalan-java which is in open state. Please find attached the patch for the
issue.
Issueid
-
15636
IssueDescription - If a global parameter for a
translet is set with Transformer.setParameter and the parameter's name
contains dots (for example $prefs.lang), the translet doesn't get the value
which is set using Transformer.setParameter().
Fix
-
From AbstractTranslet.java, i have created a temporary
string which stores the parameter name which is set when the stylesheet is
compiled into a translet . I have replaced all $dot$ and $dash$ in the string
with "." or "-" and then the resulting string is compared with the parameter
name which is set using Transformer.setParameter . If the names match then the
new value will be set for the global parameter .
File : AbstractTranslet.java
package : org.apache.xalan.xsltc.runtime
I would be happy if you let me know the status of the patch after review.
thanks & regards, -Revathi K SIP Technologies & Exports
Ltd.
|