Richard R. McKinley wrote:

Santiago Pericas-Geertsen wrote:

I think your making your life more difficult :-). Just create the instance and call the methods without using an outer variable.


It is not that easy. Do you realize that in my example I will have to create the one desired variable and then 2 dummy variables to call the Java methods?

An alternative is for you to define a method in Java that does all the steps you need, and then create a single variable to hold the final result. Of course, you'd have to pass all the XSLT values you need to that method.


I then have to get the value of the 2 dummy variables before I can actually use the variable that I want. I have to apply <xsl:value-of> to the dummy variable because of lazy evaluation. If I don't do that, then the variable I want will not have the Java methods applied yet. Am I making this more difficult or should there actually be a way to run some conditions as I create my variable just like in normal XSLT? Why can I not return a <xsl:copy-of> to the variable assignment either?

I understand how lazy evaluation can get in the way. Joe K: Is there a way to turn that feature off in Xalan? Unfortunately, Java extensions are not part of the 1.0 spec (or the 2.0 spec for that matter). So in some sense they are an afterthought.


If there is no good answer I will take it to the developers list

You can. However most developers (including myself) are on this list too.

-- Santiago




Reply via email to