Hi Zak,

This may not be the answer you're looking for, but if you have to transform XML and you want to use Java, I think you'll be much happier using JPlates (http://www.jplates.com) than Xalan. I think XSLT is fine until your XML actually *means* something that you can't express in an XSD, and then you need something that gives you a real object-oriented template programming model, and immediate access to all of Java.

All the best,
-- Dan Jacobs

[EMAIL PROTECTED] wrote:

Another question about XSLTC java extension functions:

I'd like to use an java ext function with a Boolean parameter, like public static Boolean testBoolean(Boolean bool);

I tried to call this function using
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
   xmlns:TestClass="xalan://TestClass">
   ...
  <xsl:when test="TestClass:testBoolean(true)"/>

But I got the following error message while trying to compile the stylesheet to translets:
Compiler error(s):
Cannot convert argument/return type in call to method 'TestClass.testBoolean(node-set)'
Error checking type of the expression 'cast(funcall(xalan://TestClass:testBoolean, [step("child", 8)]), boolean)'.


I tried boolean and Boolean in all possible combinations, but no luck. Using a NodeList parameter in Java helps, but I only get an empty NodeList in the java function.
This xsl/class combo works fine with regular Xalan. Is boolean supported in XSLTC? Are there workarounds?


Thanks for any help,
zak :-)

__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp


Get your own FREE, personal Netscape Mail account today at 
http://webmail.netscape.com/






Reply via email to