xsl-list
[Top] [All Lists]

Re: Modularization of XSL stylesheets

2005-07-12 10:19:45
Hi Sylvain,

At 04:07 AM 7/12/2005, you wrote:
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 :/

No, it's clear enough ... it's hard to get your head around though because in effect what you're asking is that your stylesheets be compiled and run only conditionally. This is a tall order: "dynamic imports", which is a FAQ.

When it's absolutely necessary, this kind of thing can sometimes be achieved by having stylesheets write stylesheets, but it's often not as necessary as people think.

Generally the pros will tell you not to try to do this kind of thing unless you know you really need a feature like this -- it won't necessarily save you any time.

Cheers,
Wendell


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



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