This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
what is the difference between XSL:import and XSL:include
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] what is the difference between XSL:import and XSL:include
- From: "Hewko, Doug" <Doug dot Hewko at ccra-adrc dot gc dot ca>
- Date: Fri, 3 Aug 2001 15:01:05 -0400
- Reply-To: xsl-list at lists dot mulberrytech dot com
What is the difference between XSL:import and XSL:includ and how do they
work?
Let's say I have the following stylesheet (one.xsl):
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="anothersheet.xsl" />
<xsl:import href="yetanotherone.xsl" />
<xsl:template match="/">
<p align="left">
<xsl:apply-templates/>
</p>
</xsl:template>
</xsl:stylesheet>
Say "anothersheet.xsl" looks like this:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="title">
<h1>
<xsl:apply-templates/>
</h1>
</xsl:template>
</xsl:stylesheet>
And "yetanotherone.xsl" is thus:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="text">
<h1>
<xsl:apply-templates/>
</h1>
</xsl:template>
</xsl:stylesheet>
What would the resulting page look like to the XSL processor if you use
<include> vs <import>? For example, would the processor see one large page,
or just links to three?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list