[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL-FO beginner's question
At 2009-09-28 14:37 -0700, mark bordelon wrote:
Ladies and Gentlemen of the xsl-list, :{)} Seoncdly, thanks for heads of on your training session. My boss and I discussed this a week ago as something helpful for me. In the meantime, I will have to make due with my failing around.... Too bad you missed our June west-coast delivery in Santa Ana. I'm not sure when I'll get to the west coast again, but anyone on the list who thinks they can collect enough students for a class in their part of the world can contact us to consider running either a private or a public class. For example, those on the list in Europe can let me know on our interest page about which of our courses you would like us to deliver in conjunction with next March's XML Prague http://www.XMLPrague.cz conference: http://www.CraneSoftwrights.com/forms/interest.php Thirdly, some more details on my problem, since I am still not getting any results. Ah .... perhaps the confusion is on the XSLT side and not the XSL-FO side ... including a stylesheet is not the same as "calling" a stylesheet. In fact, two stylesheets that are both included compete with each other for the nodes that are being pushed at the stylesheet. <!-- flow for first page--> ... <fo:flow flow-name="xsl-region-body"> <fo:block font-size="8pt" text-align="center"> <xsl:apply-templates select="//UOIS" mode="cover"/> ... <fo:flow flow-name="xsl-region-body"> <xsl:apply-templates select="//UOIS" mode="captions"/> Fine so far ... using two modes for the same node. A) The correctly working pages 2 - ?? has this form: Not quite, because of the confusion regarding inclusion. But I can work with what you've done so far. From an XSLT perspective, your B.xsl is not properly formed. All included fragments are written as a complete stylesheet. But the changes you need are (I think) minimal to get going. So in B.xsl wrap your page sequence in a *named* template (and I'm not sure if you merely elided the <fo:flow> but you'll need that as well, even if it is simply <fo:block/>): <xsl:stylesheet ...> <xsl:template name="do-the-last-bit"> <fo:page-sequence master-reference="last" force-page-count="no-force"> <fo:static-content flow-name="xsl-region-start"> ... <fo:flow> ... </fo:page-sequence> </xsl:template> </xsl:stylesheet> Then, in your Driver stylesheet, after your second page sequence, add a call to the named template: ... <xsl:apply-templates select="//UOIS" mode="captions"/> <fo:block id="last-page"/> </fo:flow> </fo:page-sequence> <xsl:call-template name="do-the-last-bit"/> </fo:root> </xsl:template> Then you have modularized the last page of content into its own stylesheet, and you are engaging that stylesheet content by way of calling its named template. The way to know if you are going in the right direction is to inspect the generated XSL-FO after your transformation. You should see three sibling page-sequence elements. I hope this helps, Mark. . . . . . . . . . . . . . Ken -- Upcoming hands-on code list, UBL, XSLT, XQuery and XSL-FO classes. Interested in other classes? http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|