xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Madunic" <Mario_Madu...@newflyer.com>
Subject RE: FO file size
Date Tue, 09 Mar 2010 20:22:29 GMT
This should really be on the XSLT list but here goes.


I like to create an include.xsl that contains all my files broken down into named templates,
global variables, attribute sets, and so forth.

An include statement would look like the following:

<xsl:include href="calledTemplatesFO/ct_AddEmptyTableRows.xsl" />

So to call the above:
<xsl:call-template name="ct_AddEmptyTableRows" />

What is nice about a named template is that it is context aware. In other words I can write
XPaths in a named template, call it anywhere, and get a relevant result (if a result is to
be had). As in preceding::*[self::para][1]/@id and get the value id of the first para tag
it comes upon.

You should do little of this at first till you are quite comfortable creating and calling
them. The nice thing about what you want to do is that the templates are now reusable.

I'd pick up M. Kay's book XSLT 2.0 and XPath 2.0 4th edition. This one book will become your
all purpose book.

Good Luck.

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

From: Tim Hibbs [mailto:tvhibbs@fedex.com] 
Sent: Tuesday, March 09, 2010 11:25 AM
To: fop-users@xmlgraphics.apache.org
Subject: FO file size

New to both the list here and XSL-FO – nice to have this resource available.

I’ve been creating a file of XSL and FO statements that’s working, but it’s getting
rather large and unwieldy. I’d like to divide up the file into logical parts that can be
called in as needed. Is there a set of guidelines somewhere to show how this might be done?
My primary references here are the O-Reilly / Dave Pawson book XSL-FO and Ken Holman’s Definitive
XSLT and XPATH books – haven’t found directly relevant information in either (or maybe
I’ve found it but don’t recognize it as such).


Tim Hibbs
FedEx Services
350 Spectrum Loop
Colorado Springs, CO 80921

Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all information or material transmitted
with this communication) is confidential, may be privileged and is intended only for the use
of the intended recipient. If you are not the intended recipient, any review, retransmission,
circulation, distribution, reproduction, conversion to hard copy, copying or other use of
this communication, information or material is strictly prohibited and may be illegal. If
you received this communication in error or if it is forwarded to you without the express
authorization of New Flyer, please notify us immediately by telephone or by return email and
permanently delete the communication, information and material from any computer, disk drive,
diskette or other storage device or media. Thank you.

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message