[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

<xsl:include> confusion

Subject: <xsl:include> confusion
From: Bruce Perryman <bperryman_us@xxxxxxxxx>
Date: Thu, 4 Dec 2003 07:40:58 -0800 (PST)
bruce perryman
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.