| Subject: [xsl] RE: Recursio and filepathstripping... From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Mon, 19 Feb 2001 05:26:08 -0800 (PST) | 
Hi Jukka,
Remove the following:
>     <xsl:variable name="sourcevariable" select="substring-before($source,
>      '.')" /> <!-- file extension is cutted out -->
And with minor adjustments you'll get the intended results.
As it is now, you're trying to strip the text after the dot ***on every call*** to the template.
The second time (in case there's just one dot in the text) you do this $sourcevariable wil be set
to the empty string.
Hope this helped,
Cheers,
Dimitre Novatchev.
 
Jukka Lehtinen wrote:
I'm having filepath in one attribute (e.g.
source="result\test\tomorrow\now.txt" or source="test\file.gif") and I need
that "now" or "file" infrormation from that source attribute.
  <xsl:template name="identifierrip">
    <xsl:param name="source" />
    <xsl:variable name="sourcevariable" select="substring-before($source,
'.')" /> <!-- file extension is cutted out --> 
 
      <xsl:choose>
........................
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] Not So Newbie XPath Quest, Dimitre Novatchev | Thread | [xsl] OASIS XSLT/XPath Conformance , G. Ken Holman | 
| Re: [xsl] XSLT 1.1 comments, Kaganovich, Yevgeniy | Date | [xsl] OASIS XSLT/XPath Conformance , G. Ken Holman | 
| Month |