I followed Jay Bryant's advice and structured my xsl file according to
his example. I got it to work well, but in saving things I overwrote
what I had done. I recreated it -- almost. I now have a few questions;
1 - In the attached files, why are no business units showing up? I have
looked and looked but can't figure out why they don't.
2 - How do I get the background color to fill the entire cell and not
just the text background. (When I had the business units data showing
up, the header cell backgrounds filled the entire space).
3 - When the business data did appear earlier, and I viewed at 100%, the
borders did not run into each other and left a small space between them.
How do I force the borders to join?
Thanks for any help.
<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="print-compliance">
<xsl:processing-instruction name="cocoon-format">type="text/xslfo"
</xsl:processing-instruction>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="compliance-form"
margin-top="50pt"
margin-bottom="50pt"
margin-left="15pt"
margin-right="20pt"
page-height="8.5in"
page-width="11in">
<fo:region-body margin-bottom="1pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="compliance-form">
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="header" />
<xsl:apply-templates select="business_units" />
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:table table-layout="fixed" border-collapse="collapse" space-before="0pt"
border-style="none">
<xsl:variable name="product_list" select="product_list" />
<fo:table-column column-width="{fullwidth}"/>
<fo:table-body >
<fo:table-row>
<fo:table-cell background-color="{title_bg_color}" >
<fo:block text-align="center" wrap-option="no-wrap" font-size="{fontsize}"
line-height="{linespace}" font-weight="{fontweight}"
color="{color}" border="{border}">
<xsl:value-of select="report_name"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<xsl:apply-templates select="headerline"/>
</xsl:template>
<xsl:template match="headerline">
<fo:table table-layout="fixed" border-collapse="collapse" space-before="0pt">
<xsl:for-each select="colsize">
<fo:table-column column-width="{value}"/>
</xsl:for-each>
<fo:table-body>
<fo:table-row line-height="{linespace}" display-align="{vertical}">
<xsl:apply-templates select="hdr_itm"/>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="hdr_itm">
<fo:table-cell wrap-option="{../wrap}">
<fo:block text-align="{align}" font-size="{fontsize}" border="{border}"
font-weight="{../fontweight}" color="{color}" background-color='{bg_color}'>
<xsl:value-of select="value"/>
</fo:block>
</fo:table-cell>
</xsl:template>
<xsl:template match="business_units">
<xsl:for-each select="bu">
<xsl:apply-templates select="bus_header"/>
<xsl:apply-templates select="bus_data"/>
<xsl:apply-templates select="bus_summary"/>
</xsl:for-each>
</xsl:template>
<xsl:template match="bus_header">
<fo:table table-layout="fixed" border-collapse="collapse" space-before="0pt"
space-after="0pt" border="{border}">
<fo:table-column column-width='{fullwidth}'/>
<fo:table-body >
<fo:table-row>
<xsl:variable name="bu_bg_color" select="bu_bg_color" />
<xsl:variable name="bu_color" select="bu_color" />
<fo:table-cell background-color='{bu_bg_color}'>
<fo:block text-align="start" wrap-option="{wrap}" font-size="{fontsize}"
line-height="{linespace}" font-weight="bold" color='{bu_color}'
border="{border}">
<xsl:value-of select="bu_title"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="bus_data">
<fo:table table-layout="fixed" border-collapse="collapse" space-before="0pt"
space-after="0pt" background-color="{data_bg_color}"
line-height="{data_linespace}" >
<xsl:for-each select="bu_col_width">
<fo:table-column column-width="{value}"/>
</xsl:for-each>
<fo:table-body>
<xsl:for-each select="bu_line">
<fo:table-row>
<xsl:for-each select="bu_item">
<fo:table-cell>
<fo:block text-align="{align}" wrap-option="no-wrap" font-size="{fontsize}"
font-weight="{fontweight}" color="{color}" border="{borderline}">
<xsl:value-of select="value"/>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="bus_summary">
<fo:table table-layout="fixed" border-collapse="collapse" space-before="0pt"
space-after="0pt" line-height="{../linespace}">
<xsl:for-each select="sum_col_width">
<fo:table-column column-width="{value}"/>
</xsl:for-each>
<fo:table-body >
<fo:table-row>
<xsl:for-each select="summary_item">
<fo:table-cell background-color='{../bu_bg_color}' border="solid {borderline}">
<fo:block text-align="{align}" wrap-option="no-wrap" font-size="{fontsize}"
font-weight="{fontweight}" color="{color}">
<xsl:value-of select="value"/>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="utf-8"?>
<print-compliance>
<header>
<bg_color>rgb(255,190,160)</bg_color>
<title_bg_color>darkgray</title_bg_color>
<fontweight>bold</fontweight>
<color>maroon</color>
<report_name>U.S. - NOVEMBER 2007 CONTRACT NON - COMPLIANCE REPORT</report_name>
<fullwidth>700pt</fullwidth>
<fontsize>10pt</fontsize>
<linespace>15pt</linespace>
<border>none</border>
<headerline>
<linespace>10pt</linespace>
<fontweight>bold</fontweight>
<wrap>wrap</wrap>
<vertical>center</vertical>
<colsize><value>300pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<hdr_itm>
<value>COMMODITY </value>
<bg_color>darkgray</bg_color>
<color>black</color>
<fontsize>8pt</fontsize>
<border>solid 1pt</border>
<align>end</align>
</hdr_itm>
<hdr_itm>
<value>Reprographics</value>
<bg_color>rgb(255,190,160)</bg_color>
<color>black</color>
<fontsize>6pt</fontsize>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>Cylinder Gas</value>
<bg_color>darkgray</bg_color>
<color>black</color>
<fontsize>6pt</fontsize>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>LTL Freight</value>
<bg_color>rgb(255,190,160)</bg_color>
<color>black</color>
<fontsize>6pt</fontsize>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>Office Supplies</value>
<bg_color>darkgray</bg_color>
<color>black</color>
<fontsize>6pt</fontsize>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>Direct Material</value>
<bg_color>rgb(255,190,160)</bg_color>
<color>black</color>
<fontsize>6pt</fontsize>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>Direct Material</value>
<bg_color>darkgray</bg_color>
<color>black</color>
<fontsize>6pt</fontsize>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>Direct Material</value>
<bg_color>rgb(255,190,160)</bg_color>
<color>black</color>
<fontsize>6pt</fontsize>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>Direct Material</value>
<bg_color>darkgray</bg_color>
<color>black</color>
<fontsize>6pt</fontsize>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
</headerline>
<headerline>
<linespace>8pt</linespace>
<fontweight>bold</fontweight>
<wrap>wrap</wrap>
<vertical>after</vertical>
<colsize><value>120pt</value></colsize>
<colsize><value>60pt</value></colsize>
<colsize><value>60pt</value></colsize>
<colsize><value>30pt</value></colsize>
<colsize><value>30pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<colsize><value>50pt</value></colsize>
<hdr_itm>
<value>LOCATION</value>
<align>start</align>
<fontsize>8pt</fontsize>
<color>black</color>
<bg_color>rgb(255,190,160)</bg_color>
<border>solid .5pt</border>
</hdr_itm>
<hdr_itm>
<value>RESPONSIBILITY</value>
<fontsize>8pt</fontsize>
<align>start</align>
<color>black</color>
<bg_color>rgb(255,190,160)</bg_color>
<border>solid .5pt</border>
</hdr_itm>
<hdr_itm>
<value>VICE PRESIDENT</value>
<fontsize>8pt</fontsize>
<align>start</align>
<color>black</color>
<bg_color>rgb(255,190,160)</bg_color>
<border>solid .5pt</border>
</hdr_itm>
<hdr_itm>
<value>LOG / FIN CO.</value>
<fontsize>8pt</fontsize>
<color>black</color>
<align>center</align>
<bg_color>rgb(255,190,160)</bg_color>
<border>solid .5pt</border>
</hdr_itm>
<hdr_itm>
<value>DIM.</value>
<fontsize>8pt</fontsize>
<color>black</color>
<bg_color>rgb(255,190,160)</bg_color>
<border>solid .5pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>IKON PERCENT OF COMPLIANCE</value>
<color>black</color>
<bg_color>rgb(255,190,160)</bg_color>
<fontsize>8pt</fontsize>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>AIRGAS PERCENT OF COMPLIANCE</value>
<fontsize>8pt</fontsize>
<bg_color>darkgray</bg_color>
<color>black</color>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>COMBINED LTL FREIGHT PERCENT OF COMPLIANCE</value>
<fontsize>8pt</fontsize>
<bg_color>rgb(255,190,160)</bg_color>
<color>black</color>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>STAPLES PERCENT OF COMPLIANCE</value>
<fontsize>8pt</fontsize>
<color>black</color>
<bg_color>darkgray</bg_color>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>STANDARD CAR TRUCK PERCENT OF COMPLIANCE</value>
<fontsize>8pt</fontsize>
<color>black</color>
<bg_color>rgb(255,190,160)</bg_color>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>NEW YORK AIR BRAKE PERCENT OF COMPLIANCE</value>
<color>black</color>
<fontsize>8pt</fontsize>`
<bg_color>darkgray</bg_color>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>PITTSBURGH PINS PERCENT OF COMPLIANCE</value>
<color>black</color>
<fontsize>8pt</fontsize>
<bg_color>rgb(255,190,160)</bg_color>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
<hdr_itm>
<value>RAILROAD FRICTION PRODUCTS PERCENT OF COMPLIANCE</value>
<fontsize>8pt</fontsize>
<color>black</color>
<bg_color>darkgray</bg_color>
<border>solid 1pt</border>
<align>center</align>
</hdr_itm>
</headerline>
</header>
<business_units>
<bu>
<bu_bg_color>rgb(255,190,160)</bu_bg_color>
<data_bg_color>white</data_bg_color>
<data_linespace>8pt</data_linespace>
<bu_color>maroon</bu_color>
<bu_title>CORPORATE</bu_title>
<fullwidth>700pt</fullwidth>
<border>solid 1pt</border>
<fontsize>8pt</fontsize>
<linespace>10pt</linespace>
<wrap>no-wrap</wrap>
<bu_col_width><value>120pt</value></bu_col_width>
<bu_col_width><value>60pt</value></bu_col_width>
<bu_col_width><value>60pt</value></bu_col_width>
<bu_col_width><value>30pt</value></bu_col_width>
<bu_col_width><value>30pt</value></bu_col_width>
<bu_col_width><value>50pt</value></bu_col_width>
<bu_col_width><value>50pt</value></bu_col_width>
<bu_col_width><value>50pt</value></bu_col_width>
<bu_col_width><value>50pt</value></bu_col_width>
<bu_col_width><value>50pt</value></bu_col_width>
<bu_col_width><value>50pt</value></bu_col_width>
<bu_col_width><value>50pt</value></bu_col_width>
<bu_col_width><value>50pt</value></bu_col_width>
<bu_line>
<bu_item>
<value> Admin - Corporate</value>
<align>start</align>
<borderline>solid .5pt</borderline>
<fontweight>normal</fontweight>
<fontsize>6pt</fontsize>
<borderline>.5pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value>George Smith</value>
<align>start</align>
<fontweight>normal</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid .5pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>start</align>
<fontweight>normal</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid .5pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value>100</value>
<align>center</align>
<fontweight>normal</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid .5pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value>19815</value>
<align>center</align>
<fontweight>normal</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid .5pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value>0.00%</value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value>0.00%</value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
</bu_line>
<bu_line>
<bu_item>
<value> Safety - Corporate</value>
<align>start</align>
<borderline>solid .5pt</borderline>
<fontweight>normal</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid .5pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value>Frank Corley</value>
<align>start</align>
<fontweight>normal</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid .5pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value>Ed Oneal</value>
<align>start</align>
<fontweight>normal</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid .5pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value>100</value>
<align>center</align>
<fontweight>normal</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid .5pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value>19830</value>
<align>center</align>
<fontweight>normal</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid .5pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value></value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value>0.00%</value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
<bu_item>
<value> </value>
<align>center</align>
<fontweight>bold</fontweight>
<fontsize>6pt</fontsize>
<borderline>solid 1pt</borderline>
<color>black</color>
</bu_item>
</bu_line>
<sum_col_width><value>300pt</value></sum_col_width>
<sum_col_width><value>50pt</value></sum_col_width>
<sum_col_width><value>50pt</value></sum_col_width>
<sum_col_width><value>50pt</value></sum_col_width>
<sum_col_width><value>50pt</value></sum_col_width>
<sum_col_width><value>50pt</value></sum_col_width>
<sum_col_width><value>50pt</value></sum_col_width>
<sum_col_width><value>50pt</value></sum_col_width>
<sum_col_width><value>50pt</value></sum_col_width>
<summary_item>
<value>TOTAL COMPLIANCE FOR CORPORATE</value>
<align>start</align>
<fontweight>bold</fontweight>
<color>maroon</color>
<fontsize>8pt</fontsize>
<borderline>solid 1pt</borderline>
</summary_item>
<summary_item>
<value>76.24%</value>
<align>center</align>
<fontweight>bold</fontweight>
<color>black</color>
<fontsize>8pt</fontsize>
<borderline>solid 1pt</borderline>
</summary_item>
<summary_item>
<value></value>
<align>center</align>
<fontweight>bold</fontweight>
<color>black</color>
<fontsize>8pt</fontsize>
<borderline>solid 1pt</borderline>
</summary_item>
<summary_item>
<value></value>
<align>center</align>
<fontweight>bold</fontweight>
<color>black</color>
<fontsize>8pt</fontsize>
<borderline>solid 1pt</borderline>
</summary_item>
<summary_item>
<value>0.00%</value>
<align>center</align>
<fontweight>bold</fontweight>
<color>black</color>
<fontsize>8pt</fontsize>
<borderline>solid 1pt</borderline>
</summary_item>
<summary_item>
<value>100.00%</value>
<align>center</align>
<fontweight>bold</fontweight>
<color>black</color>
<fontsize>8pt</fontsize>
<borderline>solid 1pt</borderline>
</summary_item>
<summary_item>
<value>100.00%</value>
<align>center</align>
<fontweight>bold</fontweight>
<color>black</color>
<fontsize>8pt</fontsize>
<borderline>solid 1pt</borderline>
</summary_item>
<summary_item>
<value></value>
<align>center</align>
<fontweight>bold</fontweight>
<color>black</color>
<fontsize>8pt</fontsize>
<borderline>solid 1pt</borderline>
</summary_item>
<summary_item>
<value></value>
<align>center</align>
<fontweight>bold</fontweight>
<color>black</color>
<fontsize>8pt</fontsize>
<borderline>solid 1pt</borderline>
</summary_item>
</bu>
</business_units>
</print-compliance>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]