xsl-list
[Top] [All Lists]

How to use multiple xsl:import

2005-04-05 11:10:51
Hi all,

I've got a (collegue's) question on a concept that we're trying out in an
effort to generate a new internal CMS. Basically we're building a static web
page (on a stage server) using modular XSLT, that is, using xsl:import and
xsl:apply-imports.

The question is, in the partial stylesheet below (XSLT 1.0), how to get the
xsl:apply-imports to use 'top.xsl' and subsequently the next xsl:imports to
use 'nav_auto_roll.xsl'.
 
.
. 
<xsl:import href="../includes/top.xsl"/> 
<xsl:import href="../includes/nav_auto_roll.xsl"/>
.
.
.
<td width="760" colspan="2">
        <xsl:apply-imports/>
</td></tr>
<tr>
<td width="125" valign="top">
        <xsl:apply-imports/>
</td>
.
.

It seems that this is not the right approach, as we're dealing with import
precedence, i.e. the result will only show 2 times the last imported
stylesheet (see p.228 of MK's XSLT 2nd Edition) - but there may be some
smart workarounds for this problem? Anyone any ideas? We've tried to name
them but the href attribute is the only one on xsl:import. The processor
seems to forget about 'top.xsl' completely.

I've done a similar but alternative approach myself using ASP or ASP.NET
doing partial XSLT's and building the web page from there. We may be able to
change but want to know first if the above approach would work and what's
best to do.

Cheers and thanx,
<prs/>

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