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 January 8th, 2004, 06:41 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You should be able to replace:
Code:
<xsl:if test="TAX">        


         <TR STYLE="background-color:Yellow">

            <TD COLSPAN="9">Taxes:

                <xsl:if test="TAX/GST"> GST=<xsl:value-of select="TAX/GST"/>  </xsl:if>
                <xsl:if test="TAX/PST"> PST=<xsl:value-of select="TAX/PST"/>  </xsl:if>
                <xsl:if test="TAX/HST"> HST=<xsl:value-of select="TAX/HST"/>  </xsl:if>
            </TD>
        </TR>

    </xsl:if>
with:
Code:
<xsl:if test="TAX">



         <TR STYLE="background-color:Yellow">

            <TD COLSPAN="9">Taxes:

                <xsl:for-each select="TAX/child::*">
      <xsl:value-of select="name()"/>=<xsl:value-of select="."/>
      <xsl:if test="position() != last()">;</xsl:if>
    </xsl:for-each> 
            </TD>
        </TR>

    </xsl:if>
YOU ARE NOT USING XSLT to do this, you are using Microsoft's older and now deprecated draft version as evinced by your use of xsl:eval element. As this is the case I can't guarantee that this will work. Suggest you change xsl namespace to latest version and update stylesheets if possible. See advice at msdn.com/xml or any of the main xml web sites.

Joe (MVP - xml)
 
Old January 8th, 2004, 08:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

That explains why my simple version didn't work. You have to put $or$ in WD-xsl
 
Old January 8th, 2004, 05:26 PM
Registered User
 
Join Date: Jan 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sabu21s
Default

Anyway.. thanks a lot of all your help. Will take Joes advice and recommend the same to the upper managment.

Thanks
Sabu21s






Similar Threads
Thread Thread Starter Forum Replies Last Post
char[...] or string.charAt(...) Ibn_Aziz Java Basics 1 June 14th, 2006 07:08 PM
getting the last CHAR of a string kondapally Crystal Reports 0 December 13th, 2004 03:39 PM
Char in VC and String in VB ??? tranhung Visual C++ 1 February 16th, 2004 03:19 PM





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