xsl-list
[Top] [All Lists]

RE: [xsl] stylesheet organisation

2011-09-02 08:28:09

We break the XSL into smaller stylesheets with entry point stylesheets 
referencing all the bits it needs. 
Functions variables and library stylesheets are all imported from the entry 
level stylesheets.
They are imported once in each entry level stylesheet, this ensures they will 
only ever be imported once, - not sure what you mean by 'rely on tools to be 
aware of that'? 


Date: Fri, 2 Sep 2011 12:11:32 +0100
From: andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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

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

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