For reflection, the varargs type method is used
public static String getValue(String key, String... args)
- a method with two parameters, the first is String , and the second is String[] . When you call the varargs method from Java code, the compiler generates bytecode to bind the args variables to the array, but when you call reflection, as with this, you must build the array yourself.
So the question is, does your XSLT processor allow you to somehow pass parameters like String[] from XSLT to Java? In the case of Xalan (the default implementation is javax.xml.transform , unless you have another in your classpath), I think the answer is no, except in a special situation where String[] was returned by another extension function.
source share