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

xsl:fo and tables

Subject: xsl:fo and tables
From: Johannes.Becker@xxxxxx
Date: Fri, 15 Nov 2002 14:40:58 +0100
xsl fo table
Hi,

I want to create a page in pdf output with a table.

My Code so far:

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


<xsl:template match="/">
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
            <fo:layout-master-set>
                <fo:simple-page-master master-name="firstPage"
                    page-height="29.7cm"
                    ...
                      <fo:region-after extent="1.5cm"/>
                </fo:simple-page-master>

                 <fo:simple-page-master master-name="main"
                    page-height="29.7cm"
                    ...
                      <fo:region-after extent="1.5cm"/>
                </fo:simple-page-master>

                <fo:page-sequence-master master-name="all">
                 <fo:single-page-master-reference master-reference="
firstPage">
                 </fo:single-page-master-reference>
                    <fo:repeatable-page-master-reference master-reference="
main">
                    </fo:repeatable-page-master-reference>
                </fo:page-sequence-master>

            </fo:layout-master-set>

            <fo:page-sequence master-reference="all">
                <fo:flow flow-name="xsl-region-body">
                    <fo:block break-after="page"><xsl:apply-templates
select="RESULTSET"/></fo:block>
                    <fo:block><xsl:apply-templates select="RESULTSET/CDRS
"/></fo:block>
                </fo:flow>
            </fo:page-sequence>
        </fo:root>
    </xsl:template>

<xsl:template match="RESULTSET">
    <fo:block
      font-size="18pt"
      font-family="Arial"
      space-after.optimum="0pt"
      background-color="silver"
      color="white"
      text-align="left">
     <xsl:value-of select="DATE/@date"/>
    </fo:block>
 </xsl:template>

<xsl:template match="RESULTSET/CDRS">
  <fo:table width="300pt">
    <fo:table-body>
      <xsl:for-each select="NUMBER">
        <fo:table-row>
           <fo:table-cell width="140pt">
             <fo:block><xsl:value-of select="@MD_CALLED_NUMBER"/></fo:block
>
           </fo:table-cell>
           <fo:table-cell width="150pt">
             <fo:block><xsl:value-of select="@MD_CHARGEABLE_IMSI"/></
fo:block>
           </fo:table-cell>
        </fo:table-row>
      </xsl:for-each>
    </fo:table-body>
  </fo:table>
</xsl:template>

</xsl:stylesheet>

But the part in the <xsl:template match="RESULTSET/CDRS">   where my table
should be created, doesn't do anything (won't create a table like I would
want to).

What is wrong with my code?

Thanks
Jonny


 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.