DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8595>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8595 Extension Function cannot pass Java Object Summary: Extension Function cannot pass Java Object Product: XalanJ2 Version: 2.3Dx Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Xalan-Xsltc AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] We are using the XSLTC processor that comes with release J_2_3_1. I would like to be able to call an external function within my XSL to pass a value back to an existing object within the process space from which the Transformer was created. Originally I called setParameter on the Transformer and passed in an object. My idea was to create an extension element that used the XSLProcessorContext to call getParameter and retrieve the object and then make a call on it that would store a value. >From what I can tell it appears that extension elements are not yet supported. My 2nd attempt was to call an extension function (which is supported) and pass the function the value of the parameter. This works with the Xalan processor because it passes the parameter forward as an object and my function casts it and uses it. Please review the following: I am calling setParameter("test", MyObject) on the Transformer. The relevant portions of my XSL are as follows: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java/XSLTUtil" exclude-result-prefixes="java"> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> --> <!-- I am passing a Java object in as the parameter --> <xsl:param name="test"></xsl:param> <!-- I am trying to pass the Java object out to my extension function --> <xsl:value-of select="java:getPGUser($test)"/> With the XSLTC processor I receive the error: Unable to resolve call to function 'http://xml.apache.org/xslt/java/XSLTUtil:getPGUser' I have tried the same example above with a String and I found that the only way I could pass it to the extension function was to cast it as a string in the XSL. If anybody has any other way that they think I can accomplish the same thing I would greatly appreciate it. Thanks.
