Subject: AW: [xsl] xsl:number problem From: "Markus Abt" <abt@xxxxxxxx> Date: Fri, 20 Jun 2003 20:25:12 +0200 |
Hello Charlene, what you wan't is: <xsl:number level="any" count="productId[../publisher='Wave' or ../publisher='NETg']"/> or <xsl:number level="any" count="productId[following-sibling::publisher='Wave' or following-sibling::publisher='NETg']"/> That's because publisher is not a child element node of productId but it is a sibling. This should give you four cells in your worksheet, but... ... you will get 1, 3, 4, and 5. What you really wan't is (I'm guessing): 1, 2, 4, and 5. In this case you must prevent productId 3 from "overwriting" productId 2. (I do not know if it really overwrites, but you are generating two contents for one cell.) Try: <xsl:template match="productId"> <xsl:if test="../publisher='Wave' or ../publisher='NETg' "> <gmr:Cell Col="0" ValueType="60"> <xsl:variable name="rownumber"><xsl:number level="any" count="productId[../publisher='Wave' or ../publisher='NETg']"/></xsl:variable> <xsl:attribute name="Row"> <xsl:value-of select="$rownumber"/> </xsl:attribute> <gmr:Content> <xsl:apply-templates/> </gmr:Content> </gmr:Cell> </xsl:if> </xsl:template> I guess you showed us only part of your stylesheet. You will need a template for "publisher" to either generate that in a second column, or to suppress it. Hope this helps, Markus Abt __________________________ Comet Computer GmbH Rückertstraße 5 80336 München Tel 089 / 5445 6045 Fax 089 / 5445 6046 http://www.comet.de mailto:abt@xxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Load xml into combo box, Passin, Tom | Thread | [xsl] key/keyref bug in .Net fixed?, Bill Cohagan |
RE: [xsl] Optimizing Trax, Schwartz, Rechell R, | Date | RE: [xsl] xsl:number problem, Yan, Charlene |
Month |