Re: [xsl] Multiple/conditional import problem

Subject: Re: [xsl] Multiple/conditional import problem
From: Martynas Jusevicius <martynas.jusevicius@xxxxxxxxx>
Date: Thu, 26 May 2011 16:31:46 +0200
Thanks again! It helps me to see the picture - it's not as trivial as
I expected...

Wouldn't <xsl:import> (with a subsiduary stylesheet) make more sense
than <xsl:include>? I could call them master.xsl and default.xsl for
example. Then I wouldn't need to care about template clashes, which is
totally possible if I don't control the imported stylesheets.

> the only problem is that then your default template for property/vale will
> always win as import precedence trumps priority.
> So use xsl:include rather than  xsl:import
>
> If you do want to use xsl:import keep your general framework in the top
> stylesheet but put your default templates such as
>> <xsl:template match="property/value">
>>    <xsl:value-of select="."/>
>> </xsltemplate>
>>
> into a subsidurary stylesheet that is imported last so has lower import
> precedence than your property-specific styles,

Current Thread