xsl-list
[Top] [All Lists]

Re: [xsl] param vs context for passing arguments

2009-12-17 17:34:27
Date: Wed, 16 Dec 2009 22:59:48 GMT
From: David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>
Subject: Re: [xsl] param vs context for passing arguments
Message-Id: 
<200912162259(_dot_)nBGMxmgA023755(_at_)edinburgh(_dot_)nag(_dot_)co(_dot_)uk>

if I understand what you mean then change

<xsl:template name="ReplaceHyphenWithUnderscore">
   <xsl:analyze-string select="@name" regex="-">

to

<xsl:template match="@*" mode="ReplaceHyphenWithUnderscore">
   <xsl:analyze-string select="." regex="-">

then in whichever template where you want this do

<xsl:attribute name="something">
 <xsl:apply-templates select="@something" mode="ReplaceHyphenWithUnderscore"/>

Thanks David.


Regards
Piotr Dobrogost

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>