[ 
http://issues.apache.org/jira/browse/XALANJ-2127?page=comments#action_12312979 
] 

Brian Minchau commented on XALANJ-2127:
---------------------------------------

It looks like:
<xsl:param name="param1" select="str:new()" /> 
  <xsl:value-of select="str:trim($param1)" /> 

is probably OK with str pointing to "java.lang.String" which is certainly a 
Java class available both at compile time, and runtime, however "param1" can be 
overridden and set at runtime, so its type can not be completely determined at 
compile time. If the xsl:param were xsl:variable, then things might be 
different, as it could not be overridden at runtime.


> Add support to dynamicly invoke methods if required.
> ----------------------------------------------------
>
>          Key: XALANJ-2127
>          URL: http://issues.apache.org/jira/browse/XALANJ-2127
>      Project: XalanJ2
>         Type: Improvement
>   Components: XSLTC
>     Versions: CurrentCVS
>     Reporter: Nick Van den Bleeken
>  Attachments: foo.xml, testcase.xsl
>
> In some cases functions needs to be reolved dynamicly. This functionality was 
> introduced on 2/23/2004 (on org.apache.xalan.xsltc.compiler.FunctionCall 
> revision 1.38) but removed after the release of 2.6. I know there was a 
> problem with it in certain cases, but if you changed the code in the patch in 
> typeCheckExternal(SymbolTable stable) to :
>  else if(firstArgType instanceof ReferenceType){
>    hasThisArgument = true;
>    _thisArgument = (Expression) _arguments.elementAt(0);
>    _arguments.remove(0); nArgs--;
>    resolveDynamic = true;
>    typeCheckArgs(stable);
>    return _type = Type.String
>  }
> The dynamic calling seems to work in 'more' cases ...
> The commit comments of the revert of this patch (revision 1.39) states 
> 'Reverting latest patch by Arun. There are some problems with the new code to 
> invoke functions dynamically (e.g. docbook reports a compile-time type check 
> error). The approach taken to determine when to invoke methods dynamically 
> needs to be revisted.'
> Can someone help me with what the exact problems are with 'The approach taken 
> to determine when to invoke methods dynamically needs to be revisted.'. 
> I'm willing to free some time to fix this problem, but I need some extra 
> information because I don't understand what is wrong the riginal check if 
> dynamic invoction of the method is required.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to