[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Selecting elements with param, but still included
I've been looking all day, and it looks as if I must have to first filter the xml source into a nodeset using the <xsl:if> and params. If this is true, could someone at least tell me why the <xsl:if> I use below does not result in a filtered nodeset...which I can then number? I'd like to think this is NOT a stupid question. Thanks, Kat -----Original Message----- From: Kathy Burke [mailto:Kathy_Burke@xxxxxxxxx] Sent: Tuesday, October 21, 2003 10:22 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Selecting elements with param, but still included in xsl: number? The following is just a portion of a longer template. I have varying levels of <step> elements with potential customer and assembly attributes. I select the <step>s I want, then need to create the variable "id" and number the steps in my table -- applying numbers ONLY to those <step>s selected with the IF test. With the following structure, the numbering includes the "unseen" but not selected elements. How can I do this please? Thanks, Kat <xsl:if test="(not(@customer) or (@customer=$customer)) and (not(@assembly) or (@assembly=$assembly))"> <xsl:variable name="id"> <xsl:number level="multiple" count="step" format="1.1"/> </xsl:variable> <table width="100%" border="0" cellpadding="0"> <tr> <td valign="top"> <xsl:number level="multiple" count="step" format="1.1"/> <xsl:if test="not(ancestor::step)"> <xsl:text>.</xsl:text> </xsl:if> </td> <td><xsl:apply-templates select="*[not(self::substeps)]"/> </td></tr> ETC... XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list 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
|