Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 30th, 2007, 06:06 AM
Authorized User
 
Join Date: Jan 2006
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT transformation using JDK 1.5.0

hello
I'm trying to run an XSLT transformation using JDK 1.5.0 and I get differnet messages that I didnt get with jdk1.4.0 (it is the same code.
if have 2 files
etd_defs.xsl - hold all the general variables and templates
etd_ddml.xsl - import etd_defs.xsl but he can not read the templates and the variables for some reason.

for example:
in etd_Defs.xsl

<xsl:template name="norm_table_name">

<xsl:param name="data_node" select="."/>
  <xsl:variable name="norm_infix">
   <xsl:call-template name="norm_infix">
        <xsl:with-param name="data_node" select="$data_node"/>
       </xsl:call-template>
  </xsl:variable>
  <xsl:variable name="col_name" select="$data_node/@dbcolumn"/>
    <xsl:value-of select="concat('PW_',$tech_id,$norm_infix,'_',$col _name,'_N')"/>
</xsl:template>


in etd_ddml.xsl I call this template
            <foreign-key-definition on-delete="CASCADE">
                <xsl:attribute name = "name">
                    <xsl:value-of select="concat('FK_',$grp_infix,'_',$tech_id,$norm _infix,'_ID')"/>
                </xsl:attribute>
                <xsl:attribute name = "ref-table">
                     <xsl:call-template name="norm_table_name"/>
                </xsl:attribute>
                <xsl:attribute name = "ref-columns">
                    <xsl:value-of select="concat($grp_infix,'_',$tech_id,$norm_infix ,'_ID',' ',$tech_id,$norm_infix,'_ID')"/>
                </xsl:attribute>
            </foreign-key-definition>

and I get this error
com.sun.org.apache.xalan.internal.xsltc.compiler.x sltc.Variable
        at
com.sun.org.apache.xalan.internal.xsltc.compiler.S ymbolTable.addParam(Unknown Source)
...

this is also happens with variables from different xsl files (even though I have import to the file).
I guess this is a global change.
is any one familiar with this issue?
is there a quick way to fix this?

Thanks



 
Old October 30th, 2007, 06:22 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

When you hit a bug in the version of Xalan that ships with the JDK, you'll often find that using the latest version of Apache Xalan fixes it. Alternatively, switch to Saxon, which also means you can take advantage of XSLT 2.0. Or if you're really keen, report the bug so they can improve the product.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old October 30th, 2007, 06:46 AM
Authorized User
 
Join Date: Jan 2006
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

since I dont see the latest for JDK 1.5.0 (suppose to be 2.9 and I see only 2.7) I will try to work with the saxon. is there special need to know of how to run it or something like that?

 
Old October 30th, 2007, 07:36 AM
Authorized User
 
Join Date: Jan 2006
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

who to report the bug to? do you know their site?

 
Old October 30th, 2007, 02:06 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Like any bit of software you have to learn a few magic incantations to run Saxon but if it's not your first Java app then you shouldn't have any trouble. The software can be downloaded from http://sf.net/saxon, and the documentation is all online at www.saxonica.com. Good luck!

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
help on xslt transformation li72 XSLT 2 March 4th, 2008 10:14 AM
Help on XSLT transformation li72 XSLT 2 February 22nd, 2008 12:33 PM
help with xslt transformation li72 XSLT 6 November 19th, 2007 01:51 PM
XSLT transformation yengzhai XSLT 1 April 21st, 2005 05:51 AM
XSLT transformation causes ^M reddygaru XSLT 2 December 16th, 2003 10:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.