[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:number problem

Subject: xsl:number problem
From: "Yan, Charlene" <Charlene.Yan@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Jun 2003 13:19:16 -0400
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.