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

Creating External Generic XSL functions file

Subject: Creating External Generic XSL functions file
From: Nick White <nick.white@xxxxxxxxxxx>
Date: Thu, 10 Jan 2002 11:02:57 +1100
xsl functions
Hi,
My problem is as such;
I have a few functions within my stylesheet(s) which are called within my
stylesheet(s).

Eg. Template Function.
<xsl:template name="br-replace">
   <xsl:param name="word"/>
<!-- </xsl:text> on next line on purpose to get newline -->
   <xsl:variable name="cr" select ="'&#xA;'"></xsl:variable>
   <xsl:choose>
   <xsl:when test="contains($word,$cr)">
       <xsl:value-of select="substring-before($word,$cr)"/>
       <br/>
       <xsl:call-template name="br-replace">
         <xsl:with-param name="word"
             select="substring-after($word,$cr)"/>
       </xsl:call-template>
   </xsl:when>
   <xsl:otherwise>
     <xsl:value-of select="$word"/>
   </xsl:otherwise>
  </xsl:choose>
</xsl:template> 

and is called within stylesheet(s) by:
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="root/parent/element"/>
</xsl:call-template>

What I want to do is to write a "Consolidated.xsl" XSL file containing all
my generic xsl functions that are used in more than one xsl file.
Basically I want to know what needs to be in the Consolidated.xsl (obviously
apart from the functions) and how you call/include the Consolidated.xsl
functions in the stylesheet(s)?

Thank-you.

Regards,
Nic White


 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.