[ http://issues.apache.org/jira/browse/XALANJ-1893?page=all ]

Brian Minchau updated XALANJ-1893:
----------------------------------

    Fix Version: 2.7
                     (was: CurrentCVS)

> Cannot compile a stylesheet that passes a Java object as a parameter to a 
> template.
> -----------------------------------------------------------------------------------
>
>          Key: XALANJ-1893
>          URL: http://issues.apache.org/jira/browse/XALANJ-1893
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: 2.6
>  Environment: Operating System: Windows NT/2K
> Platform: PC
>     Reporter: rbrenner
>     Assignee: Yash Talwar
>      Fix For: 2.7

>
> I am unable to compile a stylesheet that passes a Java object as a parameter 
> to 
> a template.  For example, when trying to pass a Java String, I get the 
> following error:
>     Cannot convert data-type 'java.lang.String' to 'reference'.
> However, I am able to successfully process the template when I do not compile 
> it.
> e.g. this does not work:
>    java org.apache.xalan.xsltc.cmdline.Compile example.xsl
> But this works:
>    org.apache.xalan.xslt.Process -XSL example.xsl
> Here is an example XSL file which illustrates the problem:
> example.xsl:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>     xmlns:java="http://xml.apache.org/xalan/java";
>     version="1.0">
>     
>     <xsl:template match="/">
>         <xsl:variable
>             name="javaString"
>             select="java:java.lang.String.new('java variable test')"/>
>         <xsl:call-template name="aTemplate">
>             <xsl:with-param name="javaString" select="$javaString"/>
>         </xsl:call-template>
>     </xsl:template>
>     <xsl:template name="aTemplate">
>         <xsl:param name="javaString"/>
>         <xsl:value-of select="$javaString"/>
>     </xsl:template>
> </xsl:stylesheet>

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to