You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/08/01 12:14:49 UTC

DO NOT REPLY [Bug 22043] New: - setParameter method of Transformer class doesn't work properly with XSLTC

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=22043>.
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=22043

setParameter method of Transformer class doesn't work properly with XSLTC

           Summary: setParameter method of Transformer class doesn't work
                    properly with XSLTC
           Product: XalanJ2
           Version: 2.0.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: treepom@xnet.ro


I have the next situation:

1. A servlet (jsp page) calling a transformation from an xsl file.
2. The stylesheet is using an global parameter ( <xsl:param name="request"/> ) 
which is passed at runtime from servlet using Transformer.setParameter method
3. The parameter passed is an org.w3c.dom .Element object.

If the code above is running with the interpretive processor then everything 
is working fine. 
If the code is running using compiled stylesheet then:
1. If I do <xsl:comment><xsl:copy-of select="$request" /></xsl:comment> I will 
receive a null parameter display.
2. If I'm accessing the Element structure
 <xsl:value-of select="$request/@envId"/>
then I receive the error:
java.lang.RuntimeException: Invalid conversion from 'reference' 
to 'org.apache.xerces.dom.ElementImpl'.