[xsl] Modularization of XSL stylesheets

Subject: [xsl] Modularization of XSL stylesheets
From: Sylvain Hellegouarch <sh@xxxxxxxxxx>
Date: Tue, 12 Jul 2005 10:07:23 +0200
Hi everyone,

I've been working on a simple web applictaion lately. I've build my application layout around blocks represented with xHTML DIVs. Now I don't know the layout when I start my application. Well I do know some basic stuff like the header and the footer but that's pretty much it. After that the layout is dynamically generated, ie, the overal blocks layout is set at runtime.

My app structure will look like this (more or less):

/
/modules
/modules/news
/modules/books

Each module has its own XSL stylesheet defining the block it represents, meaning the template starts with a <div> element.

At the root there is a stylesheet that defines the html elements : <html><head /><body /></html>

I'd like to be able to include my modules stylesheet within the <body> element at runtime.

One real simple way would be to import all my XSL stylesheets in my main stylesheet and simply do some apply-template I suppose, but I wondered If there would be a way to avoid having to import all my stylesheets and simply include the right blocks depending on what the user asked to view.

Hmm... now that I read my message back again, I think I misunderstand something here... and the fact I can't be really clear means I miss something :/

Bah... thanks for reading and if you can advise me it'll be nice.

Have a nice days.
- Sylvain

Current Thread