xsl-list
[Top] [All Lists]

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

2003-10-30 14:55:55
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



<Prev in Thread] Current Thread [Next in Thread>