xsl-list
[Top] [All Lists]

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

2012-02-07 13:17:32
I do have that at the top of my stylesheet, but when I tried
<xsl:include>, it complained. It looks like I was using the include
element incorrectly, however. I'd just assumed when it didn't
recognize the include that it just wasn't XSLT.

Thanks. The knowledge that I CAN use it should hopefully be enough to
get me to use it correctly, this time.

On Tue, Feb 7, 2012 at 1:06 PM, Wendell Piez 
<wapiez(_at_)mulberrytech(_dot_)com> wrote:
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(_at_)mulberrytech(_dot_)com
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
======================================================================

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


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