This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Recursio and filepathstripping...



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]