Re: [xsl] stylesheet organisation

Subject: Re: [xsl] stylesheet organisation
From: "Mark" <mark@xxxxxxxxxxxx>
Date: Fri, 2 Sep 2011 04:21:15 -0700
Hi Andrew,
My background is C++ and the Standard C++ Template Library, which likely prejudices my style. That said, I use
style (b) with 'includes' everywhere they are used for functions, complex variables, reusable templates, etc.
Mark


-----Original Message----- From: Andrew Welch
Sent: Friday, September 02, 2011 4:11 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] stylesheet organisation


Hi all,

Friday question... I'd like to see if concensus has emerged about
stylesheet organisation.  Do you:

a) stick to one large file (where possible)

b) break down the xslt into smaller stylesheets that are
included/imported into an entry point stylesheet

If you use b), how do you handle common imports (such as a
functions.xslt, variables.xslt, common.xslt etc) ?

Do you import them once (say in the entry point stylesheet) and rely
on tools to be aware of that, or do you import them everywhere they
are used and rely on import precendence to sort it out?

I've also seen it done where each stylesheet contains little more than
1 or 2 templates, and those stylesheets are imported by stylesheets
which contain nothing other than import statements, and those 'import'
stylesheets are in turn imported by other stylesheets... personally I
hated that, but I could understand its intentions.

Any other techniques? Is there a common style yet?



--
Andrew Welch
http://andrewjwelch.com

Current Thread