Hi, I posted this today on the xsl-list, but no takers so I thought I'd
try here. If nothing else, I would appreciate someone pointing me in the
right direction.
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 (using the xsl:if and 2 params I
declare earlier), 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"/unselected elements. How can I do this please? If not possible
this way, would I have to FIRST filter the xml source into another file,
and THEN apply this stylesheet? I've never done that and can't find too
much info/examples. Any help greatly appreciated.
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...
Thanks, Kat
Oleg Tkachenko - 22 Oct 2003 11:48 GMT
> With the following structure, the numbering includes the
> "unseen"/unselected elements. How can I do this please?
Set count attribute appropriatively to count only elements you need.
> <xsl:number level="multiple" count="step"
> format="1.1"/>
<xsl:number level="multiple"
count="step[(not(@customer) or (@customer=$customer)) and
(not(@assembly) or (@assembly=$assembly))]" format="1.1"/>

Signature
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel