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/04 19:40:47 UTC

DO NOT REPLY [Bug 22115] New: - Cascade variables admit only 2 levels in 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=22115>.
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=22115

Cascade variables admit only 2 levels in xsltc

           Summary: Cascade variables admit only 2 levels in xsltc
           Product: XalanJ2
           Version: 2.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Xalan-Xsltc
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: treepom@xnet.ro


I have the stylesheet described bellow:

<xsl:stylesheet version="1.0"
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:wil="http://www.into.ro/wil/Transform"
                xmlns:xalan="http://xml.apache.org/xalan"
		xmlns:Project="xalan://ro.into.wil.utils.Project"
                xmlns:Connection="xalan://java.sql.Connection"
                xmlns:PreparedStatement="xalan://java.sql.PreparedStatement"
        >

    <xsl:output
	     method="xhtml"
	     indent="yes"
	     encoding="iso-8859-1"
         />

     <xsl:variable name="proj" select="Project:Instance()" />
     <xsl:variable name="conn" select="Project:getConnection( 
$proj, 'intoerpdb' )" />
    <xsl:variable name="stmt" select="Connection:prepareStatement( 
$conn, 'select * from usr_users' )" />

</xsl:stylesheet>

Project is a java class (singleton) used by me to work with application level 
objects. In this case, using getConnection I'm obtaining a connection from an 
internal connection pool. You can use any other class to do the same thing 
(create a new variable using a previously created variable).

I also mention that xalan (2.5.1) is running with Tomcat 4.1.18 and ibm java 
jdk 1.3.

If I'm processing the stylesheet using interpretive processor then everything 
is working fine. If the stylesheet is used with xsltc then I receive the 
following error:

java.lang.IncompatibleClassChangeError: java/sql/Connection
	at procesor.topLevel()
	at procesor.transform()

The problem is generic and can be reproduced using any succession of 3 
variables created one from another. 

Please have a look.