|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Creating External Generic XSL functions file
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 ="'
'"></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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








