[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Modularization of XSL stylesheets

Subject: Re: Modularization of XSL stylesheets
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 12 Jul 2005 13:19:45 -0400
Re:  Modularization of XSL stylesheets
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@xxxxxxxxxxxxxxxx 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 ======================================================================

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.