You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Henry Zongaro (JIRA)" <xa...@xml.apache.org> on 2005/07/22 22:59:58 UTC

[jira] Commented: (XALANJ-2127) Add support to dynamicly invoke methods if required.

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

Henry Zongaro commented on XALANJ-2127:
---------------------------------------

Hi, Nick.  I've reviewed your patch.[1]  It certainly seems to fix the basic problems with the org.apache.xalan.xsltc.runtime.CallFunction class, and coupled with Arun's old patch for org.apache.xalan.xsltc.compiler.FunctionCall[2] allows for some limited dynamic method resolution.

I'm concerned though that CallFunction.invokeMethod only permits the result to be of type String, and that it doesn't allow for dynamic resolution of static methods.  Those don't describe bugs in your patch, but rather deficiencies in how this dynamic method resolution was originally designed.

I'm inclined to hold off an applying this change, and hope that someone is able to produce a more comprehensive solution to the problem of dynamic method resolution.

Henry.

[1] http://issues.apache.org/jira/secure/attachment/12310606/CallFunction.patch
[2] http://cvs.apache.org/viewcvs.cgi/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/FunctionCall.java?r1=1.37&r2=1.38

> 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: CallFunction.patch, 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org