You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by James Steven <JS...@redlinesoftware.co.uk> on 2004/10/08 10:35:12 UTC

Include background colour in overflow row

 
Hello 
 
I have created a table using Fop-0.20.5rc3a.  The table includes a column
which has an overflow in it that continues to the row below.  As the row
continues so does the background colour which is set for that column.  The
same background colour is set for the other columns in that row but they do
not continue to the next row when this overflow occurs.  How can I get the
background colour for the other columns to fill the next row when there is
an overflow?
 
eg. In the table below the description 'This is the Primary Key for
Accommodation Types' overflows to the next row and fills that column's part
of the row with its background colour.  Can I fill the row below in the
columns for 'Accommodation Type' and 'Description'?
 
Accommodation_Types
Column               Properties
Accommodation Type   Description  This is the Primary Key forAccommodation
                                  Types
                     
Thanks for any help.
James

XML:
<Dictionary>
  <Table Name="Accommodation_Types">
    <Column Name="AccommodationType">
      <Description>This is the Primary Key for Accommodtion Types
      </Description>
    </Column>
  </Table>
</Dictionary>

XSL snip:
 <xsl:attribute-set name="orderlist.table.detail.textcolumns">
        <xsl:attribute name="border-top-style">none</xsl:attribute>
        <xsl:attribute name="border-bottom-style">none</xsl:attribute>
        <xsl:attribute name="border-width"></xsl:attribute>
        <xsl:attribute name="display-align">before</xsl:attribute>
        <xsl:attribute name="text-align">start</xsl:attribute>
        <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
        <xsl:attribute name="padding-left">.5mm</xsl:attribute>
        <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
        <xsl:attribute name="padding-top">.5mm</xsl:attribute>
    </xsl:attribute-set>

   <xsl:attribute-set name="orderlist.table.detail.textcolumns3">
       <xsl:attribute name="border-top-style">none</xsl:attribute>
       <xsl:attribute name="border-bottom-style">none</xsl:attribute>
       <xsl:attribute name="border-width"> </xsl:attribute>
       <xsl:attribute name="display-align">before</xsl:attribute>
       <xsl:attribute name="text-align">start</xsl:attribute>
       <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
       <xsl:attribute name="padding-left">.5mm</xsl:attribute>
       <xsl:attribute name="padding-top">.5mm</xsl:attribute>
    </xsl:attribute-set>

    <xsl:attribute-set name="orderlist.table.detail.blocks">
        <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
        <xsl:attribute name="padding-left">.5mm</xsl:attribute>
        <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
        <xsl:attribute name="padding-top">.5mm</xsl:attribute>
        <xsl:attribute name="font-size">10pt</xsl:attribute>
        <xsl:attribute name="font-family">sans-serif</xsl:attribute>
    </xsl:attribute-set>

   <xsl:for-each select="Table">
   <fo:table table-layout="fixed">
    <fo:table-column column-width="180mm"/>
    <fo:table-body>
     <fo:table-row>
     <fo:table-cell>
      <fo:block space-before.optimum="5mm">
      </fo:block>
	 </fo:table-cell>
	 </fo:table-row>
    <fo:table-row>
     <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
      <fo:block xsl:use-attribute-sets="orderlist.table.detail.blocks">
	 <xsl:attribute name="background-color">#ffffff</xsl:attribute>
	 <xsl:attribute name="font-weight">bold</xsl:attribute>
	 <xsl:value-of select="@Name" />
      </fo:block>
      </fo:table-cell>
	 </fo:table-row>
	  </fo:table-body>
	 </fo:table>
  <fo:table table-layout="fixed">
   <fo:table-column column-width="67mm" />
   <fo:table-column column-width="1mm" />
   <fo:table-column column-width="112mm" />
    <fo:table-body>
     <fo:table-row>
      <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
       <fo:block font-weight="bold" background-color="#cccccc" 
         text-align="start" font-size="10pt" fontfamily="sans-serif">
        <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
        <xsl:attribute name="padding-left">.5mm</xsl:attribute>
        <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
        <xsl:attribute name="padding-top">.5mm</xsl:attribute>
        Column</fo:block>
         </fo:table-cell>
         <fo:table-cell>
         </fo:table-cell>
         <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
           <fo:block font-weight="bold" background-color="#cccccc"
text-align
            ="start" font-size="10pt" font-family="sans-serif">
             <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
             <xsl:attribute name="padding-left">.5mm</xsl:attribute>
             <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
             <xsl:attribute name="padding-top">.5mm</xsl:attribute>
             Properties</fo:block>
         </fo:table-cell>
       </fo:table-row>
      </fo:table-body>
    </fo:table>
    <fo:table table-layout="fixed">
      <fo:table-column column-width="67mm"/>
	<fo:table-column column-width="1mm" />
	<fo:table-column column-width="34mm"/>
      <fo:table-column column-width="1mm"/>
      <fo:table-column column-width="77mm" />
     <fo:table-body>
      <xsl:for-each select="Column">
        <fo:table-row>
         <xsl:if test="position() mod 2 = 1">
          <fo:table-cell xsl:use-attribute-sets
               ="orderlist.table.detail.textcolumns3">
            <fo:block xsl:use-attribute-sets
                ="orderlist.table.detail.blocks">
              <xsl:attribute name="background-color">#eeeeee</xsl:attribute>
              <xsl:value-of select="@Name" />
             </fo:block>
            </fo:table-cell>
         </xsl:if>
         <xsl:if test="position() mod 2 = 0">
           <fo:table-cell xsl:use-attribute-sets
               ="orderlist.table.detail.textcolumns3">
            <fo:block xsl:use-attribute-sets
                  ="orderlist.table.detail.blocks">
             <xsl:attribute name="background-color">#ffffff</xsl:attribute>
              <xsl:value-of select="@Name" />
             </fo:block>
            </fo:table-cell>
         </xsl:if>
          <fo:table-cell>
          </fo:table-cell>
         <xsl:if test='./Description'>
         <xsl:if test="position() mod 2 = 1">
          <fo:table-cell xsl:use-attribute-sets
              ="orderlist.table.detail.textcolumns">
	  <fo:block font-weight="bold" background-color="#eeeeee" text-align
            ="start" font-size="10pt" font-family="sans-serif">
	       <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
		 <xsl:attribute name="padding-left">.5mm</xsl:attribute>
		 <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
		 <xsl:attribute name="padding-top">.5mm</xsl:attribute>
		 Description</fo:block>
           </fo:table-cell>
          </xsl:if>
          <xsl:if test="position() mod 2 = 0">
           <fo:table-cell xsl:use-attribute-sets
                ="orderlist.table.detail.textcolumns">
	  <fo:block font-weight="bold" background-color="#ffffff" text-align
             ="start" font-size="10pt" font-family="sans-serif">
	       <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
		 <xsl:attribute name="padding-left">.5mm</xsl:attribute>
		 <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
		 <xsl:attribute name="padding-top">.5mm</xsl:attribute>
		 Description</fo:block>
           </fo:table-cell>
           </xsl:if>
            <fo:table-cell>
            </fo:table-cell>
           <xsl:if test="position() mod 2 = 1">
            <fo:table-cell xsl:use-attribute-sets
                  ="orderlist.table.detail.textcolumns">
              <fo:block xsl:use-attribute-sets
                   ="orderlist.table.detail.blocks">
                <xsl:attribute name
                   ="background-color">#eeeeee</xsl:attribute>
                  <xsl:value-of select="./Description" />
               </fo:block>
             </fo:table-cell>
            </xsl:if>
            <xsl:if test="position()mod 2 = 0">
             <fo:table-cell xsl:use-attribute-sets
                 ="orderlist.table.detail.textcolumns">
               <fo:block xsl:use-attribute-sets
                       ="orderlist.table.detail.blocks">
                 <xsl:attribute name
                       ="background-color">#ffffff</xsl:attribute>
                 <xsl:value-of select="./Description" />
               </fo:block>
               </fo:table-cell>
              </xsl:if>
              </xsl:if>
              </fo:table-row>
            </xsl:for-each>
         </fo:table-body>
      </fo:table>
   </xsl:for-each>

This message has been scanned for unacceptable content by 'VITANIUM'
the industry leading email virus and content management service from
Vitanium Systems. Contact details are available at www.vitanium.com.





--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <ma...@lists.mulberrytech.com>
--+--



This message has been scanned for unacceptable content by 'VITANIUM'
the industry leading email virus and content management service from
Vitanium Systems. Contact details are available at www.vitanium.com.





---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


svg text and spacing

Posted by Jake Briggs <ja...@coretech.co.nz>.
Hi All
I have a little problem. I need to draw a barchart in svg, imbedded in 
fo which is produced in xsl. The problem is, how do i know where to draw 
the y axis?
What i mean is, If i want numbers on the left side of the axis thus :
     |
15 |
10 |
  5 |
  0 |_______________
     |

How do i know at what x position to draw the y axis? The scale could be 
0 -5, 0 -100 etc... Is there a way to find out how wide/long a 
particular bit of text will be?

Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org