RE: [xsl] [XSL-FO] Way to include an outside stylesheet?

Subject: RE: [xsl] [XSL-FO] Way to include an outside stylesheet?
From: David Lee <dlee@xxxxxxxxxxx>
Date: Tue, 7 Feb 2012 19:30:12 +0000
As a contra-point, I exclusively use XQuery not XSLT to generate XSL-FO for
publication of PDF.
I am probably the 1 in a million who finds it vastly easier to comprehend then
XSLT ... but so be it :)

-----Original Message-----
From: Wendell Piez [mailto:wapiez@xxxxxxxxxxxxxxxx]
Sent: Tuesday, February 07, 2012 2:06 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] [XSL-FO] Way to include an outside stylesheet?

Colin,

If your stylesheet has something like this at the top:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; ...

then it is XSLT. (Yes, XSLT is used routinely to generate XSL-FO. "XSL",
in fact, properly means the combination of XSLT and XSL-FO, even if it's
also commonly used to mean XSLT without XSL-FO.)

So you have xsl:include, xsl:import, templates and the entire range of
XSLT functionalities available.

In fact, if you find you are writing lots of xsl:if or xsl:choose
instructions, chances are good that you could improve your XSLT quite a
bit. In XSLT, conditional processing is often done in other ways, and
usually more gracefully.

Most of what you learn when you use XSLT to generate other formats (such
as HTML) will also apply when using it to make XSL-FO.

So, absolutely, yes, go for it.

(If you aren't using XSLT, then can you explain how you are generating
your XSL-FO?)

Cheers,
Wendell

On 2/7/2012 12:02 PM, Colin DeClue wrote:
> Hey Guys,
>
> So, I'm using xsl-fo (with the Antenna House Formatter) to develop
> several reports. Many of them have share a large section of the body.
> I was building them up by having lots of if statements for the other
> parts of the reports, but that's getting cumbersome. I'd like to have
> the body portion in a separate style sheet, and keep the separate
> reports in separate style sheets that reference the body portion. I
> saw that xslt an<xsl:include>  element, but I couldn't find something
> for xsl-fo. Does anyone have any suggestions?
>
> Thanks,
> Colin DeClue


--
======================================================================
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