|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Apply-templates (filtering with an 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,'-','') <= 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








