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

Subject: RE: [xsl] xsl:import or xsl:include or another alternative?
From: "jim" <xsl@xxxxxxxxxxxxxxxxx>
Date: Tue, 1 Jul 2003 07:51:03 -0700
thanks brian,

> 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 -->

So is this a "clean" way of doing the above or is there a more convenient
logic to easily change the layout but also only show 1 product's details per

<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet xmlns:xsl="";
  <xsl:import href="product.xslt" />
  <xsl:output method="html" />
  <xsl:param name="category_id" select="'1.01'" />
  <xsl:template match="/">
select="catalogue/product[category_id=$category_id]" />

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
  <xsl:template match="product">
    <p class="heading"><xsl:value-of select="item_name"/> [<xsl:value-of
    <p class="description"><xsl:value-of select="description"/></p>
	<p class="details">Colours: <xsl:value-of select="colours"/><br />
    Fabric: <xsl:value-of select="fabric"/><br />
    Sizes: <xsl:value-of select="sizes"/><br />
    Retail Price: CDN <xsl:value-of select="price_cdn"/> | USD <xsl:value-of
select="price_usd"/><br />
    Shipping: <xsl:value-of select="shipping"/></p>
    <p class="verysmall">More Views: <a
href="javascript:swapProdImg(0);">front</a> | <a
href="javascript:swapProdImg(1);">side</a> | <a
href="javascript:swapProdImg(2);">back</a> | <a
href="javascript:swapProdImg(3);">detail</a><br />
    Matching Items: <a><xsl:attribute
name="href">/retail/group/<xsl:value-of select="group_number"
/>/index.html</xsl:attribute><xsl:value-of select="merch_group" /></a><br />
    Browse By Category: <a><xsl:attribute
name="href">/retail/category/<xsl:value-of select="category_number"
/>/index.html</xsl:attribute><xsl:value-of select="category" /></a></p>

 XSL-List info and archive:

Current Thread