W3C home > Mailing lists > Public > www-xsl-fo@w3.org > December 2001

Re: xsl:fo and tabstops

From: Mikko Peltonen <mpeltonen@myrealbox.com>
Date: Fri, 14 Dec 2001 08:19:23 +0200
Message-ID: <001901c18467$491511a0$0500000a@sofor.fi>
To: "Sebastian Rahtz" <sebastian.rahtz@computing-services.oxford.ac.uk>
Cc: <www-xsl-fo@w3.org>

Thanks. I kind of guessed that the answer would be to use tables. Below is a
more realistic example of xml that I would like to format. Breaking up the
lines by tab from this markup is a little bit more awkvard, because the
placement of a tab can be anywhere within <par> or <run> and these can be
nested (this sample xml is a result of exporting a Lotus Notes document with
Lotus XML Toolkit... and yes, the markup could be better...).

<pardef id='52' leftmargin='1.2500in' firstlineleftmargin='1in'
<par def='52'><run><font size='8pt' style='bold'/>Key1&#x9;</run><run><font
size='8pt'/>value1</run><run><font size='8pt'/> </run></par>
<par><run><font size='8pt' style='bold'/>Key2</run>&#x9;<run><font
size='8pt'/>value2</run><run><font size='8pt'/> </run></par>


----- Original Message -----
From: "Sebastian Rahtz" <sebastian.rahtz@computing-services.oxford.ac.uk>
To: "Mikko Peltonen" <mpeltonen@myrealbox.com>
Cc: <www-xsl-fo@w3.org>
Sent: Thursday, December 13, 2001 10:35 PM
Subject: Re: xsl:fo and tabstops

> On Wed, Dec 26, 2001 at 10:20:22PM +0200, Mikko Peltonen wrote:
> >
> > Could anyone help me with a problem of formatting tabstops with xsl:fo.
> > Consider for example the following XML:
> >
> > <paragraph tabstops="2in 4in">
> >     <line>key1&#x9;value1&#x9;value2</line>
> >     <line>longerkey2&#x9;value3&#x9;value4</line>
> > </paragraph>
> >
> > How to format this in xsl:fo so that values 1 and 3 and values 2 and 4
> > line up in same column as expected?
> use a table. forget tabstops - they were last a good idea in about 1948,
> and should be banished from the world.
> all you have to do is break up the contents of line by tab character,
> and put them in table cells. or is that what you are asking, how
> to do that?
> send the XML back whence it came with a request for better markup....
> --
> Sebastian Rahtz      OUCS Information Manager
> 13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
Received on Friday, 14 December 2001 01:20:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:08 GMT