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

Re: xsl:import vs xsl:include

Subject: Re: xsl:import vs xsl:include
From: Tony Graham <tgraham@xxxxxxxxxxxxxxxx>
Date: Wed, 25 Aug 1999 06:19:20 -0400 (EST)
xsl import vs include
At 25 Aug 1999 10:46 +0200, Sebastien Sahuc wrote:
 > As I'm trying to perform tests on several XSL processors, and I have
 > style sheets using xsl:import statement to import common named
 > template and variable decalration, I cannot use them with SAXON since
 > it does not implement it. 
 > 
 > So question : can I instead use iclude statement ? What the
 > differences as I don't sdee any from the WD of XSLT.

There are differences.  Stylesheets that you reference with xsl:import
have a lower "import precedence" than the importing stylesheet,
whereas stylesheets you reference with xsl:include are almost
completely treated as if you'd copied the referenced file and pasted
it into your stylesheet at that point.

For example, if you had template in both the main and the referenced
stylesheet with the same match pattern.  With xsl:import, you wouldn't
get a conflict because the main stylesheet has higher "import
precedence" (plus there's rules about import precedence of multiple
imported stylesheets).  With xsl:include, you would get an error
because the template in the referenced stylesheet is treated as if it
were in the main stylesheet, and two templates matching the same
pattern will cause an error.

Regards,


Tony Graham
======================================================================
Tony Graham                            mailto:tgraham@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9632
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 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.