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 April 16th, 2007, 05:45 AM
Registered User
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there, I'm still at the "monkey see, monkey do" stage with xsl.
Hence there isn't much understanding to the structure of xsl.

I'm trying to have the xsl to branch such as...

if (dataPresent) {
   display this
}
else {
   do that
}

this is what I have so far...

<xsl:template match="/">

    <xsl:variable name="num">
        <xsl:number value="0"/>
        <xsl:for-each select="semiFinalists/emailedFinalist">
            <xsl:if test="semiDateConfirmed != '0000-00-00 00:00:00'">
                <xsl:number value="position()"/>
            </xsl:if>
        </xsl:for-each>
    </xsl:variable>


    <xsl:choose>
        <xsl:when test="$num &gt; 0">
            <xsl:call-template name="emailListing"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:call-template name="noListing"/>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

I get stuck where I need to define a starting point (<xsl:number value="0"/>) to the increment, atleast that's what I assume... glad to have help on this.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto increment prad_a MySQL 3 April 7th, 2007 05:47 AM
HTML tag from C# or ASP.NET tag from javascript angshujit ASP.NET 2.0 Basics 3 February 16th, 2007 10:07 AM
HTML tag vs Body Tag CFGerry BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 October 7th, 2005 07:13 AM
Is it possible to increment in crystal cmdolcet Crystal Reports 2 August 14th, 2005 06:55 PM
auto increment? hosefo81 PHP Databases 1 February 2nd, 2004 03:56 PM





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