Subject: Re: [xsl] And I'd like that in triplicate... From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 19 Mar 2008 15:10:55 -0400 |
<xsl:template match="/"> <fo:root> <xsl:call-template name="page-architecture"/> <xsl:apply-templates> <xsl:with-param name="copy" select="'merchant'"/> </xsl:apply-templates> <xsl:apply-templates> <xsl:with-param name="copy" select="'customer'"/> </xsl:apply-templates> <xsl:apply-templates> <xsl:with-param name="copy" select="'file'"/> </xsl:apply-templates> </fo:root> </xsl:template>
Cheers, Wendell
At 2008-03-19 12:50 -0500, Ferry, Jeremy wrote:I've got a xsl-fo stylesheet that I've created to output an xml document as a PDF but I'm having trouble figuring out how I would produce multiple copies, each one having only minor differences in some static content. Think of it like a credit card receipt - one copy for the merchant and one for the customer - the only difference being the text that says "Merchant Copy" or "Customer Copy".
There is nothing in XSL-FO that automatically replicates content for a specific number of iterations ... if you want three copies, then you have to generate all three copies during your transformation stage, and then format the collection of three copies found in your generated XSL-FO.
As to the minor variances, if you meant "static content" generically, then you would do this during your transformation creating the three copies with a slight difference through typical XSLT logic.
If you meant "Static Content" as in header and footer content of an XSL-FO instance, then you have the option of using the identical XSLT logic three times, where in the header you retrieve a marker of a given name each time. Then in your XSLT you just define the marker content before creating each of the copies of the receipt content.
I hope this helps.
. . . . . . . . . . . Ken
-- Upcoming: UBL Apr.22,24; genericode code lists Apr.23; Rome,Italy 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 Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] And I'd like that in trip, G. Ken Holman | Thread | RE: [xsl] And I'd like that in trip, Ferry, Jeremy |
Re: [xsl] And I'd like that in trip, G. Ken Holman | Date | [xsl] Problem running a 2.0 transfo, Mukul Gandhi |
Month |