
September 8th, 2003, 12:00 PM
|
|
Contributing User
|
|
Join Date: Aug 2001
Posts: 261
Time spent in forums: 1 Day 6 h 18 m
Reputation Power: 7
|
|
|
xml ->xsl -> fop -> .pdf and i want a table with headings?
Hi there,
I got xml ->xsl -> fop -> .pdf and i want a table with headings?
I got it, but i think it isn't the way to go
PHP Code:
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4"
page-width="297mm" page-height="210mm"
margin-top="0.5cm" margin-bottom="0.5cm"
margin-left="0.5cm" margin-right="0.5cm">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
<fo:table>
<fo:table-column column-width="30mm"/>
<fo:table-column column-width="30mm"/>
<fo:table-column column-width="30mm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border-style="solid" border-width="0.1mm" background-color="#CCBB22">
<fo:block>This is 1</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>This is 2</fo:block>
</fo:table-cell>
</fo:table-row>
<xsl:apply-templates select="//ATOM">
<xsl:sort data-type="number"
select="ATOMIC_NUMBER"/>
</xsl:apply-templates>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="ATOM">
<fo:table-row>
<fo:table-cell>
<fo:block><xsl:value-of select="NAME"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block><xsl:value-of select="SYMBOL"/></fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
Furthermore i would like to represent data in a graphs any tips
|