Subject: [xsl] Apply-templates (filtering with an if statement) From: "Tucker, George" <GTucker@xxxxxxxxxxxxx> Date: Mon, 1 Dec 2003 11:53:25 -0500 |
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,'-','') <= translate($TD1,'-','')"> </xsl:if> <xsl:if test="translate(REV0DEL,'-','') >= translate($TD1,'-','')-7 or translate(REV0DEL,'-','') >= 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Looking for a starting po, Dimitre Novatchev | Thread | Re: [xsl] Function's at XSLT, Wendell Piez |
RE: [xsl] Passing XML data to HTML , SHEIKH Sajjad | Date | RE: [xsl] Passing XML data to HTML , SHEIKH Sajjad |
Month |