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]
Other format: [Raw text]

Re: Tabs


sascha wrote:
i have a problem transforming tabs into :fo, maybe i should better post this
into the xsl:fo list , but i  guess it is more a XSLT thing:
Here's my Input :
One of the problems is to put the parsed text correctly
into a XSLFO table. The general expectation is that if
you have tabs at 1cm and 2cm and as text
  some long text	more text
the text after the tab should be aligned to the tab at
2cm. So while it is easy to set up a table for a set of
given tabs, putting the right text into the right cells
is far from trivial. Basically you have to do some text
layout yourself in XSLT, including line breaking. You can
use string-length()*$average-character-width to estimate
the laid out text width but this can be spectacularly
fail for proportional fonts. Individual character widths
can be grabbed from various sources sso that a more correct
width can be calculated, but XSLT was not designed to do
this kind of jobs. FXML will make it easy to write but
performance can't be expected to be great, you might want
to use an embedded script language or an extension function.

Right aligned tabs provide another interesting challenge.

J.Pietschmann



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]