Re: [xsl] performing calculations with variables / params in FO using certain units (mm, px, etc)

Subject: Re: [xsl] performing calculations with variables / params in FO using certain units (mm, px, etc)
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Thu, 30 Oct 2003 22:55:55 +0100
SANWAL, ABHISHEK (HP-Houston) wrote:
Sample statement.
<fo:table-column column-width="{$SBWidth-$ImageWidthRender}"/>
...
Is there some way to specify a particular UNIT to be used all over so
that I can specify those values without the units appended (makes
subtraction easy)?

You don't need to worry, column-width="300mm-200mm" is a perfect legal property expression, although I'd add whitespace around the minus sign just in case.

Is there a way to have this subtraction performed with the units
present, without having to write intensive string parsing functions to
separate the values & units?

No. Measurements without units are interpreted as pixels, the treatment of which is more or less processor specific (may include bailing out, although the spec is somewhat unclear whether this is allowed).

J.Pietschmann


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



Current Thread