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

anyone have experience using FOP and nesting tables

Subject: anyone have experience using FOP and nesting tables
From: "Schwarz, Kevin" <KSchwarz@xxxxxxxxxxx>
Date: Tue, 22 Jan 2002 13:02:48 -0500
kevin schwarz
My nested tables seem to collapse, only displaying a line for the border but
none of the contents:



<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format">

   <xsl:template match="week">
      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
         <!-- defines page layout -->
         <fo:layout-master-set>
            <fo:simple-page-master master-name="simple-meals"
page-height="11in" page-width="8.5in" margin-top=".625in"
margin-bottom=".625in" margin-left=".625in" margin-right=".625in">
               <fo:region-body margin-top="0cm" margin-bottom="0cm"/>
            </fo:simple-page-master>
         </fo:layout-master-set>

         <fo:page-sequence master-reference="simple-meals">

            <fo:flow flow-name="xsl-region-body">
               <fo:block border="1px solid black" padding=".06in">
                  <fo:block>
                     <fo:external-graphic src="file:images/aHeader.gif"
width="auto" height="auto"/>
                  </fo:block>
                  <fo:table>
                     <fo:table-column column-width="1.3in"/>
                     <fo:table-column column-width="3.95in"/>
                     <fo:table-column column-width="1.44in"/>
                     <fo:table-header>
                        <fo:table-row>
                           <fo:table-cell>spacer</fo:table-cell>
                           <fo:table-cell number-columns-spanned="2">
                              <fo:block font-size="14pt"
font-family="sans-serif" line-height="16pt" space-after.optimum="15pt"
background-color="white" color="#ff6600" font-weight="bold"
text-align="left">
                                Kevin Schwarz: 7-Day Meal Plan
                              </fo:block>
                           </fo:table-cell>
                        </fo:table-row>
                     </fo:table-header>
                     <fo:table-body>
                        <xsl:apply-templates/>
                     </fo:table-body>
                  </fo:table>
               </fo:block>
            </fo:flow>
         </fo:page-sequence>
      </fo:root>
   </xsl:template>


   <xsl:template match="day/meal">
      <fo:table-row>
         <fo:table-cell>
            <fo:block color="white">this is spacing</fo:block>
         </fo:table-cell>
         <fo:table-cell>
            <fo:block font-size="10pt" font-family="sans-serif"
line-height="0pt" space-after.optimum="15pt" color="gray" font-weight="bold"
text-align="left">
               <xsl:value-of select="@type"/>
            </fo:block>
            <fo:block font-size="8pt" font-family="sans-serif"
line-height="0pt" space-after.optimum="15pt" color="black"
font-weight="bold" text-align="left">
               <xsl:value-of select="title"/>
            </fo:block>
            <fo:block font-size="8pt" font-family="sans-serif"
line-height="8pt" space-after.optimum="15pt" color="black"
text-align="left">
               <xsl:value-of select="recipe"/>
            </fo:block>
         </fo:table-cell>
         <fo:table-cell>

<!-begin nested table -->
            <fo:table border="1px solid black">
               <fo:table-column column-width=".4in"/>
               <fo:table-column column-width="1in"/>
               <fo:table-header>
                  <fo:table-row>
                     <fo:table-cell number-columns-spanned="2">
                        <fo:block padding="1cm" font-family="sans-serif"
line-height="0pt" color="white" background-color="#c696c6" text-align="left"
font-weight="bold">Nutritional Info</fo:block>
                     </fo:table-cell>
                  </fo:table-row>
               </fo:table-header>

               <fo:table-row>
                  <fo:table-cell>
                     <fo:block
background-color="#efdfff">nutrion<xsl:value-of select="parent::nutrition"/>
                           </fo:block>
                  </fo:table-cell>
                  <fo:table-cell>
                     <fo:block
background-color="#f7f3ff">amount<xsl:value-of select="@name"/>            
                           </fo:block>
                  </fo:table-cell>
               </fo:table-row>
            </fo:table>

<!-end nested table -->
         </fo:table-cell>
      </fo:table-row>
   </xsl:template>
</xsl:stylesheet>


Thanks,
Kevin

kevin schwarz
kschwarz@xxxxxxxxxxx
212.251.6338

miavita, inc
2 park ave
11th floor
ny, ny 10016


 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.