[xsl] <xsl:include> confusion

Subject: [xsl] <xsl:include> confusion
From: Bruce Perryman <bperryman_us@xxxxxxxxx>
Date: Thu, 4 Dec 2003 07:40:58 -0800 (PST)
Hello,

Please excuse the newbie question.

I want to place common code for an html page rendered
by xsl into a single xsl file which will be included
by several other xsl files.

The common functionality is an html header at the top
of the page which will perform some minor
calculations.

A short example is as follows:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="/">
<html>
<body>
<xsl:include href="sheet2.xsl"/>

<h1>heading 2</h1>

</xsl:template>
</xsl:stylesheet>

*** sheet2.xsl ***

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<h1>heading 2</h1>

</xsl:template>
</xsl:stylesheet>

*******************

I've also tried it using
<xsl:apply-templates select="second"
mode="sheet2.xsl"/>

with an <xsl:template match="second"> in sheet2.xsl
but I haven't been able to figure it out.

Can you please help? Or is this just not the best
method to attempt this in the first place.

Thanks a lot.


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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


Current Thread