On Tue, 18 Jul 2006 09:06:00 -0400, Glen Mazza wrote
> pat wrote:
> 
> >Hi all,
> >
> >I have a problem and I'm not able to solve it :-( I'm using marker to 
> >generate
> >subtotat (it works) and for retrievng the subtotal I'm using retrieve-marker
> >(that works too), but I need to split subtotal to part before decimal point
> >and after decimal point ant this is the problem. How to store the value from
> >retrieve-marker to variable or use it directly ???
> >
> >I'm looking for something like this:
> ><xsl:variable name="qqq">
> >  <fo:retrieve-marker .../>
> ></xsl:variable>
> >
> >Is there a way how to do that ???
> >
> >  
> >
> I don't think so.  By the time FOP is processing your input XML, it 
> is fully in the FO namespace.  (It initially uses Xalan--or Saxon--
> to do the XSLT transformations, replacing your xsl: elements with 
> the result tree of your XSLT transformation.)  The xsl: elements are 
> all gone by the time FOP is processing fo:retrieve-marker.
> 
> It may be helpful for others to be able to answer your question if 
> you let us know what type of data you are handling and why you need 
> this functionality.  There may be another way to accomplish what you 
> need here.
> 
> Glen

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).

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 expect the problem is, that I'm not able to read the $tmp by <xsl:value-of
...>. Finally I need to do something like:
<xsl:value-of select="substring-after($tmp, '.')"/> to get fraction etc.

Can someone help me on that ???

Thanks a lot.

     Pat

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

Reply via email to