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

xsl:import or xsl:include or another alternative?

Subject: xsl:import or xsl:include or another alternative?
From: "jim" <xsl@xxxxxxxxxxxxxxxxx>
Date: Tue, 1 Jul 2003 06:22:04 -0700
javascript import
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.

Thank you kindly and Happy Canada Day!

Jim


<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

  <xsl:output method="html"/>
  <xsl:param name="category_id" select="'1.01'" />

  <xsl:template match="/">
    <!-- Set Formatting Characteristics -->
    <xsl:apply-templates
select="catalogue/product[category_id=$category_id]" />
  </xsl:template>

  <xsl:template match="product">
    <p class="heading"><xsl:value-of select="item_name"/> [<xsl:value-of
select="category_id"/>]</p>
    <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:template>

</xsl:stylesheet>



 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.