Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 30th, 2007, 06:06 AM
Authorized User
 
Join Date: Jan 2006
Location: tel aviv, israel, Israel.
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



Reply With Quote
  #2 (permalink)  
Old October 30th, 2007, 06:22 AM
mhkay's Avatar
Wrox Author
Points: 18,481, Level: 59
Points: 18,481, Level: 59 Points: 18,481, Level: 59 Points: 18,481, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,960
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
Reply With Quote
  #3 (permalink)  
Old October 30th, 2007, 06:46 AM
Authorized User
 
Join Date: Jan 2006
Location: tel aviv, israel, Israel.
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?

Reply With Quote
  #4 (permalink)  
Old October 30th, 2007, 07:36 AM
Authorized User
 
Join Date: Jan 2006
Location: tel aviv, israel, Israel.
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
  #5 (permalink)  
Old October 30th, 2007, 02:06 PM
mhkay's Avatar
Wrox Author
Points: 18,481, Level: 59
Points: 18,481, Level: 59 Points: 18,481, Level: 59 Points: 18,481, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,960
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.