RE: [xsl] Selecting elements with param, but still included in xs l: number?

Subject: RE: [xsl] Selecting elements with param, but still included in xs l: number?
From: "Kathy Burke" <Kathy_Burke@xxxxxxxxx>
Date: Tue, 21 Oct 2003 18:04:51 -0400
Also, I couldn't find this in any of the xsl books I've purchased. During a
web search, I found the exact topic (Numbering Filtered and Sorted Items)
listed in the TOC of Jeni Tennison's Beginning XSLT book but I could only
find a used one (!) which I've ordered but will take two weeks to receive.

So, please take pity and tell me how to do this before then?

Thanks, Kat

-----Original Message-----
From: Kathy Burke [mailto:Kathy_Burke@xxxxxxxxx]
Sent: Tuesday, October 21, 2003 5:49 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE: [xsl] Selecting elements with param, but still included in
xs l: number?


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: [xsl] 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



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


Current Thread