How to use multiple xsl:import
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/>
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format