This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: importing/including a stylesheet with a dynamic name (can't)


> It seems that there is no way to dynamically import or include another
> stylesheet, unless one writes the calling stylesheet at runtime.

Correct, xsl:include and xsl:import are compile-time facilities.

> More concretely, I am trying to create a sheet that uses a default
> stylesheet for a portion of an HTML document, but I want that
> portion to be able to be replaced by a user simply specifying
> an alternate stylesheet source in the source XML of the translation.

The desire for run-time xsl:import is voiced quite often, and for once it's
nice to hear exactly why you want it, so that I can tell you why you don't!

Instead of A conditionally importing stylesheet B1, B2, or B3 each of which
replaces part of A, the user should select stylesheet B1, B2, or B3, each of
which imports the fixed stylesheet A and replaces or overrides parts of it.
The special-case stylesheet should import the general-case stylesheet, not
the other way around.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]