Andreas L Delmelle wrote:
On Jul 19, 2006, at 17:16, Andreas L Delmelle wrote:
<snip />
To illustrate what I mean (untested, but seems OK, for positive numbers
at least... gotta leave some to you ;)):
<xsl:template match="someNum">
<xsl:variable name="vSum" select="sum(preceding::someNum)" />
<xsl:variable name="vInt" select="floor($vSum)" />
<xsl:variable name="vFrac" select="$vSum - $vInt" />
<fo:block>
<fo:marker marker-class-name="intMarker">
<xsl:value-of select="$vInt" />
</fo:marker>
<fo:marker marker-class-name="fracMarker">
<xsl:value-of select="substring(string($vFrac),3))" />
</fo:marker>
</fo:block>
</xsl:template>
and then
<xsl:template match="...">
<fo:static-content>
...
<xsl:text>integer part is </xsl:text>
<fo:retrieve-marker retrieve-class-name="intMarker" .../>
<xsl:text>fractional part is 0.</xsl:text>
<fo:retrieve-marker retrieve-class-name="fracMarker" .../>
...
</xsl:template>
No?
IOW: don't focus *too* much on retrieve-marker alone, perform both sum
and separation *before* creating the markers.
Plus the usual completions, of course, like 'take care of floor(); for
negative numbers use ceiling() to obtain the integer part' and 'take
the absolute value of the fractional part'...
Except on the money market, money amounts are integers; integral numbers
of cents or equivalent. Work with the basics units and format for output.
Peter
--
Peter B. West <http://cv.pbw.id.au/>
Folio <http://defoe.sourceforge.net/folio/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]