This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

what is the difference between XSL:import and XSL:include


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]