[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Indenting or aligning tables

Subject: Indenting or aligning tables
From: "Muhs, Michaela" <Michaela.Muhs@xxxxxxxx>
Date: Tue, 29 Feb 2000 10:13:08 +0100
aligning tables
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.