RE: [ ? ] Is it possible to generate the URI...

Subject: RE: [ ? ] Is it possible to generate the URI...
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Sat, 23 Sep 2000 12:58:49 +0100
Well, I'm not going to design a solution to your problem, I'm just saying
that xsl:include isn't designed to meet your requirement, and it would be a
completely different animal if it were: xsl:include is a static construct
like #include in C that is there solely to enable you to assemble a
stylesheet statically from reusable components. If you want constructs that
make decisions at run-time, look at modes.

What you might be able to do is to assemble the stylesheet conditionally
just before execution, eitehr by modifying the href attributes in the parsed
stylesheet tree, or by some kind of dynamic URI resolution (e.g.. the
URIResolver in Saxon). What you can't do is make it depend on anything in
the source document.

Mike Kay

> On Fri, Sep 22, 2000 at 09:19:19 +0100, Kay Michael wrote:
> > > Subject: [ ? ] Is it possible to generate the URI...
> > > ...for an xsl:include href dynamically?
> > 
> > No. In earlier discussion on this list we came to the 
> conclusion that people
> > who ask for this have generally adopted the wrong design 
> approach. You are
> > probably writing a general-purpose stylesheet which tries 
> to include the
> > stylesheet that handles a particular special case, and 
> therefoer needs to
> > include different sub-stylesheets depending on the 
> situation. Instead you
> > should include (or import) the general-purpose stylesheet into the
> > special-purpose one, and the requirement will disappear.
> 
>  I don't ever agree with your point.
>  I have an example that I can't manage as you suggest. I have 
> a stylesheet
>  of default rules and a bunch of completely orthogonal stylesheets.
>  Due to orthogonality, every user can freely add a new stylesheet.
>  When I apply the stylesheets, I want to choose "on the fly" the right
>  combination of stylesheets to use. I don't know in advance 
> what combination
>  I want and so your suggestion does not work.
> 
>  Or am I missing something?
> 
>  						Regards,
> 						 C.S.C.
> 
> P.S: Just to understand the situation, the source files are formalized
>  mathematical theorems and the stylesheets are mathematical notations.
>  Every stylesheet is about a set of related mathematical definitions.
>  Every definition usually have more than a notation ==> usually have
>  more than a stylesheet. The user can choose freely the notation just
>  before looking at the theorem. Two stylesheets are orthogonal when
>  they refer to disjoint sets of definition.
> 
> -- 
> ----------------------------------------------------------------
> Real name: Claudio Sacerdoti Coen
> Undergraduate Computer Science Student at University of Bologna
> E-mail: sacerdot@xxxxxxxxxxx
> http://caristudenti.cs.unibo.it/~sacerdot
> ----------------------------------------------------------------
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


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


Current Thread