You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Nick Van den Bleeken (JIRA)" <xa...@xml.apache.org> on 2005/05/20 10:52:51 UTC

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

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


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

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2127?page=comments#action_12442917 ] 
            
Brian Minchau commented on XALANJ-2127:
---------------------------------------

At the JIRA meeting on Oct 16, 2005 Santiago P-G commented that XSLTC does not have the type information to resolve some of these calls, so the appropriate byte code cannot necessarily be created in all cases.

Santiago thinks a library class is needed to do everything at runtime, and thinks that this may have existed at runtime but seems to have been removed at some point.

Henry Z. commented that there may have been a security issue with the way the code used to be, and that the interpretive processor is more flexible.

Per the JIRA meeting on Oct 16, 2005, Santiago P-G agreed to have a look at this one.

> Add support to dynamicly invoke methods if required.
> ----------------------------------------------------
>
>                 Key: XALANJ-2127
>                 URL: http://issues.apache.org/jira/browse/XALANJ-2127
>             Project: XalanJ2
>          Issue Type: Improvement
>          Components: XSLTC
>    Affects Versions: 2.6
>            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


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

Posted by "Nick Van den Bleeken (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2127?page=all ]

Nick Van den Bleeken updated XALANJ-2127:
-----------------------------------------

    Attachment: foo.xml

Sample XML file needed by the style sheet

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


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

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
    [ 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


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

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2127?page=all ]

Henry Zongaro updated XALANJ-2127:
----------------------------------

    reviewer: zongaro@ca.ibm.com

> 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


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

Posted by "Nick Van den Bleeken (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2127?page=all ]

Nick Van den Bleeken updated XALANJ-2127:
-----------------------------------------

    Attachment: CallFunction.patch

If you look to Callfunction.java, which is used when resolving functions dynamicly you can see that className, methodName, nArgs and clazz are static fields. This is a problem if you use xsltc in a multithreaded environment. If two different transformers call a function that needs to be resolved dynamicly the following can happen : 
  1) The first transformer sets the static fields
  2) The second transformer sets the static fields (same fields)
  3) The first stylesheet continues and calls the function of the second transformer
It also can result in many other errors if the threads switch faster exceptions like 'Function No tFound' and mismatching of the number of parameters, as a result of a thread switch before all fields were updated.
This patch just removes the static fields and passes them as parameters.

> 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


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

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
    [ 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


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

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2127?page=comments#action_12373125 ] 

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

Comments from JIRA bug Triage on Febrary 7, 2006: 

> In Santiaogo P-G's hands already
> The patch to XSLTC was based on
  2.6 code, and CallFunction class was
  deleted recently   by Christine Li
  as part of a security fix at the
  end of 2005.
> This works for interpretive in 2.7
  but fails for XSLTC.
> The patch is no longer appropriate
  but the functionality is still
  missing.

> 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: 2.6
>     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


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

Posted by "Nick Van den Bleeken (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2127?page=all ]

Nick Van den Bleeken updated XALANJ-2127:
-----------------------------------------

    Attachment: testcase.xsl

Sample style sheet to trigger the problem

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


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

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2127?page=all ]

Brian Minchau updated XALANJ-2127:
----------------------------------

     Environment: 
     Description: 
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.

  was:
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.

    fix-priority: fp3

I checked, xsl:variable or xsl:param made no difference. Setting to fp3, per the JIRA meeting on June 7, 2005.

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