All,
My xml looks like this:
<solution>
<product>
<productID>1</productId>
</product>
<product>
<productID>2</productId>
</product>
<program>
<product>
<productID>3</productId>
</product>
<product>
<productID>4</productId>
</product>
</program>
<product>
<productID>5</productId>
</product>
</solution>
I need to put each productId in a column of a spreadsheet. I can do that using
the following:
<gmr:Cell Col="1" Row="27" ValueType="60">
<xsl:variable name="rownumber"><xsl:number level="any"
count="productId"/></xsl:variable>
<xsl:attribute name="Row">
<xsl:value-of select="position() + $rownumber + 2"/>
</xsl:attribute>
<gmr:Content>
<xsl:apply-templates/>
</gmr:Content>
</gmr:Cell>
I also need to format the cells they are in. I tried the following. But the
startRow and endRow are same. Only one cell is formatted -- the first one. My
question is how I can get the last number of the total number. Please help!!!
<xsl:variable name="totalnumber"><xsl:number level="any"
count="buProdId"/></xsl:variable>
<xsl:if test="$totalnumber!=''">
<gmr:StyleRegion startRow="26" endRow="26" startCol="0" endCol="0">
<xsl:attribute name="startRow">
<xsl:value-of select="27 + $totalnumber"/>
</xsl:attribute>
<xsl:attribute name="endRow">
<xsl:value-of select="27 + $totalnumber + $totalnumber"/>
</xsl:attribute>
<gmr:Style HAlign="8" VAlign="2" WrapText="0" Orient="1" Shade="1"
Indent="0" Locked="1"
Hidden="0" Fore="0:0:0" Back="FFFF:FFFF:FFFF"
PatternColor="FFFF:FFFF:FFFF" Format="General">
<gmr:Font Unit="10" Bold="0" Italic="0" Underline="0"
StrikeThrough="0">Times New Roman</gmr:Font>
<gmr:StyleBorder>
<gmr:Top Style="1"/>
<gmr:Bottom Style="1"/>
<gmr:Left Style="0"/>
<gmr:Right Style="5"/>
<gmr:Diagonal Style="0"/>
<gmr:Rev-Diagonal Style="0"/>
</gmr:StyleBorder>
</gmr:Style>
</gmr:StyleRegion>
</xsl:if>
Thanks in advance.
Charlene
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list