[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: FO:Marker issues

Subject: Re: FO:Marker issues
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Oct 2007 19:13:49 -0400
Re:  FO:Marker issues
At 2007-10-19 15:16 -0400, Rush, Jeff wrote:
I am generating invoices and need the customer name to appear at the top of every page. My XML document contains multiple customers.

<fo:flow flow-name="body">
      <xsl:apply-templates select="Customer"/>
      <fo:block id="terminator"/>
</fo:flow>

I am defining my marker inside:

<xsl:template match="Customer">

            <fo:marker marker-class-name="CustomerName">
                  <fo:block font="11pt arial" start-indent="0.125in">
                        <xsl:value-of select="Name"/>
                  </fo:block>
            </fo:marker>
      </xsl:template>

Something is missing above is the surrounding block: a marker has to be the first child of the block that defines the qualifying areas for that marker. Ref: XSL-FO 1.1 Section 6.13.5 "The fo:marker has to be an initial child of its parent formatting object."


And I am calling it from within my region-before:

<fo:block-container position="absolute" width="2.0in" height="1.5in" left="0.0in" top="1.0in">
<fo:retrieve-marker retrieve-class-name="CustomerName" retrieve-position="first-including-carryover" retrieve-boundary="page"/> </fo:block-container>


I have tried changing my retrieve-boundary and my retrieve-postion but I haven't been able to get the correct result.

Sometimes it shows the first customer throughout the entire document, sometimes it changes occasionally and doesn't show up on some pages, sometimes it retrieves names out of order (although the rest of the information the body pulls comes in correct).

I'm not sure how to correlate your evidence with my observation of there being no qualifying areas defined for the marker.


Try wrapping the <fo:marker> with an <fo:block> and see if the problems go away.

I'm not sure why you are using markers and not just starting a new page sequence for every customer ... I'm assuming that while you have many customers in your XML, you only have one customer per report, and each report starts on a new page. Can you just use a new page sequence for each customer and place their name in the static content? That would probably be a lot easier.

I hope this helps.

. . . . . . . . . . . . . Ken

--
Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Jul'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.