xsl-list
[Top] [All Lists]

Re: [xsl] And I'd like that in triplicate...

2008-03-19 11:50:11
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(_at_)CraneSoftwrights(_dot_)com
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>