This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: FO: question


So do you want the output to be FO or HTML?  It looks like you have a
merging of both.  You pretty much have to choose one output format per
stylesheet.

fo tables look like this:

      <fo:block>
        <fo:table font-size="12pt" space-after="3cm">

          <fo:table-column column-number="1" column-width="100pt"/>
          <fo:table-column column-number="2" column-width="350pt"/>

          <fo:table-body>
            <fo:table-row>

              <fo:table-cell padding-before="4pt" padding-after="4pt">
                <fo:block>Text</fo:block>
              </fo:table-cell>

              <fo:table-cell padding-left="4pt" padding-right="4pt">
                <fo:block>Text</fo:block>
              </fo:table-cell>

            </fo:table-row>

          </fo:table-body>
        </fo:table>
      </fo:block>




-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Hewko, Doug
Sent: Friday, September 07, 2001 2:04 PM
To: 'xsl-list@lists.mulberrytech.com'
Subject: [xsl] FO: question


I really do not understand Formatting object very well. I am creating a PDF
version of some output. The output works great as HTML, so I am just adding
the fo: objects to my XSLT. The problem I have is tables. No matter how hard
I tried, I can not get tables to appear. Can someone please provide some
guidance?

I am using Cocoon2 and Tomcat.

Here is the top of my stylesheet:
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:fo="http://www.w3.org/1999/XSL/Format";>

Here is my template which will sort the output. Even though I define the
table border as "1", it does not appear. Why?

<xsl:template match="glossary">
	<xsl:for-each select="glossaryitem[count(. | key('sort-by-category',
category)[1]) = 1]">
		<xsl:sort select="category" />
		<fo:block font-size="24pt" space-before.optimum="12pt"
text-align="left">
		<xsl:value-of select="category" />
		</fo:block>
		<table border="1" cellspacing="15">
		<xsl:for-each select="key('sort-by-category', category)">
		<xsl:sort select="english_title" />
		<tr><td nowrap="nowrap" valign="top">
		<fo:block font-size="12pt" space-before.optimum="5pt"
text-align="left" font-weight="bold" text-decoration="underline">
		<xsl:value-of select="english_title"/></fo:block>
		</td><td width="10"></td><td width="500">
		<fo:block font-size="10pt" space-before.optimum="5pt"
text-align="left"><xsl:value-of select="english_description"/></fo:block><br
/>
		<xsl:for-each select="uri">
		<fo:block font-size="12pt" space-before.optimum="5pt"
text-align="left">
		<xsl:value-of select="node()"/>
		<xsl:value-of select="node()"/>
		</fo:block><br />
		</xsl:for-each>
		</td></tr>
		</xsl:for-each>
		</table>
	</xsl:for-each>
</xsl:template>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]