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

RE: xsl:import or xsl:include or another alternative?

Subject: RE: xsl:import or xsl:include or another alternative?
From: "Martinez, Brian" <brian.martinez@xxxxxxxxxxx>
Date: Tue, 1 Jul 2003 08:21:31 -0600
xsl import include
> From: jim [mailto:xsl@xxxxxxxxxxxxxxxxx]
> Sent: Tuesday, July 01, 2003 7:22 AM
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  xsl:import or xsl:include or another alternative?
> 
> Hi again,
> 
> I'm using the "w3.org/1999/XSL/Transform" namespace now and 
> could use some
> help. The PRODUCT template below is used many times and i'd 
> appreciate some
> info on how to use xsl:import or xsl:include so that i can 
> change it once
> and have it update all my XSL files.

Put the template into a separate stylesheet (say, product.xslt), then use
xsl:import or xsl:include in your other stylesheets to make it available:

<xsl:import href="product.xslt"/> 
<!-- or whatever the proper path is; this can be relative to the importing
stylesheet -->

The primary difference between import/include is how the processor applies
the rules of precedence: xsl:include would be the same as if you had pasted
the included code directly into the stylesheet.  So if you imported *and*
included templates with the same rule, the included template would be
selected to process the matching context node.  Also note that xsl:import
must appear as a top-level element before any other child elements, while
xsl:include may appear as a top-level element in any position.

hth,
b.

| brian martinez                           brian.martinez@xxxxxxxxxxx |
| lead gui programmer                                    303.357.3548 |
| cheap tickets, part of trip network                fax 303.357.3380 |
| 6560 greenwood plaza blvd., suite 400           englewood, co 80111 |
| cendant travel distribution services   http://www.cheaptickets.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.