[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Apply-templates (filtering with an if statement)

Subject: Apply-templates (filtering with an if statement)
From: "Tucker, George" <GTucker@xxxxxxxxxxxxx>
Date: Mon, 1 Dec 2003 11:53:25 -0500
xsl if statement
I want to grab a list of cutters from my xml document and filter it with an
if statement.  All this I want to do inside of a seperate template.

I am getting the information...a list of cutters, but they are not being
filter as the if statement indicates.  I simply get a list of all the
cutters in the xml document; the choose works...it applys the comma and
period as instructed.  But why is the filtering (if) not working.
Incidentally,  these type filters are working elsewhere in my xsl document,
just not within this template.

using msxml

<?xml version="1.0"?>

<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2002/XMLShcema"
xmlns="http://www.w3.org/TR/REC-html40">



maindocument

</xsl:template>

<xsl:template match="AVAILABILITY">


<xsl:apply-templates select="CUTTER"/>


<xsl:if test="translate(REV0DEL,'-','') &lt;= translate($TD1,'-','')">
</xsl:if>
<xsl:if test="translate(REV0DEL,'-','') &gt;= translate($TD1,'-','')-7 or
translate(REV0DEL,'-','') &gt;= translate($TD1,'-','')-77">
</xsl:if>



<xsl:choose>
<xsl:when test="CUTTER[@projkind='IND']">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="position()!=last()">
<xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>.</xsl:text>
</xsl:otherwise>
</xsl:choose>

</xsl:template>



</xsl:stylesheet>

George Tucker
USCG MLCA (vs)
Phone: 757-628-4570
Fax: 757-628-4585
eMail: gtucker@xxxxxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.