|
Subject: RE: [xsl] xsl:number problem From: "Yan, Charlene" <Charlene.Yan@xxxxxxxxxxxxxxxxxxx> Date: Tue, 17 Jun 2003 17:41:35 -0400 |
Maybe my question was not clear enough. I declared a variable that contains the number of productId in the node list. When I set the Row attribute equal to the number, cell and cells after it will do a loop of all the different productIds. This part is working perfectly. But I want to get the total number of productId to position my next cell's position. Somehow $rownumber is only 1 even though the cells loop several times. How can I do that? I hope I have made myself clearer this time. Thanks so much for any help! --Charlene
<xsl:variable name="rownumber"><xsl:number level="any" count="productId"/></xsl:variable>
Here is my xml:
<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>
-----Original Message-----
From: Yan, Charlene
Sent: Tuesday, June 17, 2003 4:14 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] xsl:number problem
All,
What I don't understand is that how the following can display my desired result using the following:
1
2
3
4
5
I really want to get control of the total number of productId in the xml. Put that number in a variable. Position my next cell using that variable. Please help me here. I'm stuck.
THANKS!!!
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>
-----Original Message-----
From: Yan, Charlene
Sent: Tuesday, June 17, 2003 1:19 PM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] xsl:number problem
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
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] xsl:number problem, Yan, Charlene | Thread | Re: [xsl] xsl:number problem, Mike Brown |
| RE: [xsl] coping with huge xml-saxo, Passin, Tom | Date | Re: [xsl] coping with huge xml-saxo, david_n_bertoni |
| Month |