pat wrote:

Hi,

Well, the template is for kind of "bill" for Czech postal service and they
require to split payment to integer part and the fraction (don't ask me why).


Yes, the Czech postal service is a constant source of problems on this ML. ;-)

So, the creation of two markers is not possible (addition of fraction can
produce integer part :-\). The way should be adding all prices on the page and
then split integer and fraction (split 10.50 as 10 and 50 in two separated
columns in table).

In the fo:flow is used:
<fo:marker marker-class-name="subtotal">
  <xsl:value-of select="price + sum(preceding::price)"/>
</fo:marker>

and in <fo:static-content flow-name="xsl-region-after"> thers's:
<fo:block text-align-last="end" font-size="12pt">
  <fo:retrieve-marker retrieve-class-name="subtotal" retrieve-boundary="page"
      retrieve-position="last-starting-within-page"/>
</fo:block>

I have played a bit with setting the marker value to variable and I've found 
this:
1) variable definition:
<xsl:variable name="tmp">
  <fo:retrieve-marker ... />
</xsl:variable>
2) reading $tmp by <xsl:copy-of select="$tmp"/> gave me a requested number
3) reading $tmp by <xsl:value-of select="$tmp"/> does nothing


I would stop thinking about using xsl: tags. Again, they all disappear before the fo: tags are activated. By the time fo:retrieve-marker has a value, the xsl:anything stuff is long gone from the stylesheet.

Instead, I wonder if you can use div and mod[1] to get the portions you need. I haven't done this before with XSL, however.

$55.28 * 100 = 5528 mod 100 = 28?
$55.28 * 100 = 5528 - ($55.28 * 100 mod 100) = 5000 div 100 = 50?

I don't know if <fo:retrieve-marker/> can be used in place of $55.28 above though.

Glen

[1] http://www.w3.org/TR/2001/REC-xsl-20011015/slice5.html#section-N6961-Expressions


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to