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

accessing an attribute value in a for-each loop

Subject: accessing an attribute value in a for-each loop
From: Eric Smith <Eric.Smith@xxxxxxxxxxxx>
Date: Wed, 17 Oct 2001 23:48:07 +0200
xml accessing an attribute
Why can I not access the @span value in the XSL below, first the XML:

 <table>
  <row header="table">
   <cell>Fase</cell>
   <cell>Activiteit</cell>
   <cell>Taakomschrijving</cell>
   <cell>Resultaten</cell>
   <cell>Tijdsperiode</cell>
   <cell>Go/no-gopunten</cell>
   <cell>Uitvoerders</cell>
  </row>
  <row header="phase">
   <cell span="2">whatever<b>Individual Components </b></cell>
   <cell span="4">Proceed </cell>
   <cell>1,3,4</cell>
   .... 

... and the XSL fragment:

<xsl:template match="table">
 <fo:table break-before="page">
  <fo:table-column column-width="100pt"/>
  <fo:table-column column-width="100pt"/>
  <fo:table-column column-width="75pt"/>
  <fo:table-column column-width="100pt"/>
  <fo:table-column column-width="75pt"/>
  <fo:table-column column-width="100pt"/>
  <fo:table-column column-width="100pt"/>
  <fo:table-body font-size="6pt" font-family="sans-serif">
   <xsl:for-each select="row">
    <fo:table-row>
     <xsl:for-each select="cell">
        <!-- <xsl:attribute name="number-columns-spanned">5</xsl:attribute> nope :( -->
        <fo:table-cell number-columns-spanned="{@span}" >
                                              ^^^^^^^^^
       <fo:block>

-- 
Eric Smith - using xalan and fop

 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.