Indenting or aligning tables

Subject: Indenting or aligning tables
From: "Muhs, Michaela" <Michaela.Muhs@xxxxxxxx>
Date: Tue, 29 Feb 2000 10:13:08 +0100
Hi there,

I'm pretty new to XSL and I have a question about tables. I have defined the
following table in XML:


<TABLE>
  <TCAPTION>This is my table:</TCAPTION>
  <TBODY>
    <TR>
      <TD>Cell 1</TD>
      <TD>Cell 2</TD>
    </TR>
    <TR>
      <TD>Cell 3</TD>
      <TD>Cell 4</TD>
    </TR>
  </TBODY>
</TABLE>


I do not want the table to start on the left-hand side, but indented by
120pt. 

My style sheet looks like this right now:

<xsl:template match="TCAPTION">
  <fo:block font-family="Palatino" font-size="9pt" font-style="italic"
start-indent="120">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<!-- This indents the text of the table caption and it looks fine. But now
comes the actual table: -->

<xsl:template match="TBODY">
  <TABLE BORDER="1" start-indent=120">
    <xsl:apply-templates/>
  </TABLE>
</xsl:tamplate>

<xsl:template match="TR">
  <TR>
    <xsl:apply-templates/>
  </TR>
</xsl:template> 

<xsl:template match="TD">
  <TD font-family="Palatino" font-size="9pt">
      <xsl:apply-templates/>
  </TD>
</xsl:template>


The start-indent="120" indents the text of the TD elements by 120 but the
table borders still appear on the very left (and I do need the borders, I
cannot just say: TABLE BORDER="0") 

Is there a way to indent a table or maybe right-align it?

I have also thought about using margins in my page-layout. The left margin
then would be 120 in width. Is it possible to tell certain parts of text to
appear in the left and others to appear in the right margin or is the first
column automatically filled with text first (from top to bottom) and then
the second one (like the columns in a newspaper, for example)?



Thanks in advance.

Michaela


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


Current Thread