David Gerdt wrote:
The problem is in your XSL, so we'll need to see at least the relevant portions. You can also get help with XSL at http://www.mulberrytech.com/xsl/xsl-list/

 >>> Sheldon Glickler <[EMAIL PROTECTED]> 11/11/2008 4:33 PM >>>
I cannot seem to figure out why the <bus_summary> line is not appearing
in the pdf.

In the xsl, there is:

<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>

and there is also a bus_summary template.

The xml has a <bus_summary> section, also under the same <bu> in which
the <bus_data> and <bus_header> are located, and both of those appear in
the pdf while the <bus_summary> does not.

Oops.  I thought I attached the cc.xsl.  I've attached it now.
<?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="{margin_top}"
         margin-bottom="{margin_bottom}"
         margin-left="{margin_left}"
         margin-right="{margin_right}"
         page-height="{page_height}"   
         page-width="{page_width}">
      <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="page_1" />
      	<xsl:apply-templates select="page_2" />
      	<xsl:apply-templates select="page_3" />
      	<xsl:apply-templates select="page_4" />
      	<xsl:apply-templates select="page_5" />
      	<xsl:apply-templates select="page_6" />
      	<xsl:apply-templates select="page_7" />
      	<xsl:apply-templates select="page_8" />
      	<xsl:apply-templates select="page_9" />
      	<xsl:apply-templates select="page_10" />
      	<xsl:apply-templates select="page_11" />
      	<xsl:apply-templates select="page_12" />
      	<xsl:apply-templates select="page_13" />
      	<xsl:apply-templates select="page_14" />
      	<xsl:apply-templates select="page_15" />
      	<xsl:apply-templates select="page_16" />
      	<xsl:apply-templates select="page_17" />
      	<xsl:apply-templates select="page_18" />
      	<xsl:apply-templates select="page_19" />
      	<xsl:apply-templates select="page_20" />
      </fo:flow>
    </fo:page-sequence>
  </fo:root>
</xsl:template>

<xsl:template match="page_1">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_2">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_3">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_4">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_5">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_6">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_7">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_8">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_9">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_10">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_11">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_12">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_13">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_14">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_15">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_16">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_17">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_18">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_19">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</xsl:template>
<xsl:template match="page_20">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="business_units" />
</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="{col_width}"/>
    <fo:table-body >
      <fo:table-row line-height="{linespace}" >
        <fo:table-cell background-color="{title_bg_color}" >
          <fo:block text-align="center" wrap-option="no-wrap" font-size="{fontsize}" 
          			font-weight="{fontweight}" 
                color="{color}" border-left="{border-left}"  border-right="{border-right}" 
                border-top="{border-top}" border-bottom="{border-bottom}">
            <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" space-before="0pt">
    <xsl:for-each select="colsize">
      <fo:table-column column-width="{col_width}"/>
    </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 background-color='{bg_color}'  border-left="{border-left}"  
  			border-right="{border-right}" border-top="{border-top}" border-bottom="{border-bottom}">
    <fo:block text-align="{align}" font-size="{fontsize}" wrap-option="{../wrap}" 
    					font-weight="{../fontweight}" color="{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" space-before="0pt" space-after="0pt">
    <fo:table-column column-width='{col_width}'/>
    <fo:table-body >
      <fo:table-row line-height="{linespace}">
        <fo:table-cell background-color='{bg_color}' border-left="{border-left}"  
        			border-right="{border-right}" border-top="{border-top}" border-bottom="{border-bottom}">
          <fo:block text-align="start" wrap-option="{wrap}" font-size="{fontsize}" 
          							 font-weight="bold" color='{color}'>
            <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" space-before="0pt" space-after="0pt">
    <xsl:for-each select="bu_col_width">
      <fo:table-column column-width="{col_width}"/>
    </xsl:for-each>
    <fo:table-body>
      <xsl:for-each select="bu_line">
        <fo:table-row  line-height="{../linespace}" >
          <xsl:for-each select="bu_item">
            <fo:table-cell background-color="{bg_color}" number-columns-spanned="{merge}"  
            			border-left="{border-left}"  border-right="{border-right}" 
                  border-top="{border-top}" border-bottom="{border-bottom}">
              <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>
      </xsl:for-each>
    </fo:table-body>
  </fo:table>
</xsl:template>

<xsl:template match="bus_summary">
  <fo:table table-layout="fixed" space-before="0pt" space-after="0pt" >
    <xsl:for-each select="sum_col_width">
      <fo:table-column column-width="{col_width}"/>
    </xsl:for-each>
    <fo:table-body >
      <fo:table-row  line-height="{linespace}">
        <xsl:for-each select="summary_item">
          <fo:table-cell background-color='{../bg_color}' border-left="{border-left}"  
          						border-right="{border-right}" border-top="{border-top}" 
                      border-bottom="{border-bottom}">
            <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>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to