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

Re: RE: Taking string out from the long string

Subject: Re: RE: Taking string out from the long string
From: "ashu t" <aashut@xxxxxxxxxxxxxx>
Date: 26 Jul 2002 12:47:17 -0000
concat like where
Thanks a lot . it is working.I have a question but before coming to that i must say that jarno was very right in pointing out that it was very dirty written message indeed.When i read that message later I realised that how dirty it was in just one sentence with all small letters.

And now come to the question:

i am using this style sheet :
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="alt" select="@alt"/> * this i have declared a global variable*


Then template match for img tag :

  <xsl:template match="img">
    <xsl:variable name="alt" select="@alt"/>
    <xsl:call-template name="filename1">
      <xsl:with-param name="currentstring1" select="@src"/>
   </xsl:call-template>
   </xsl:template>

<!-- Named recursive template -->

   <xsl:template name="filename1">
   <xsl:param name="currentstring1"/>
    <xsl:choose>
     <xsl:when test="contains($currentstring1,'/')">

<!-- There are more folders to be removed, so recurse -->

<xsl:call-template name="filename1">
<xsl:with-param name="currentstring1" select="substring-after($currentstring1,'/')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<img alt="{@alt}" src="{concat('./ImageStore/',{concat(substring-before($currentstring1,'.'),'.wbmp')})}"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>


My folder name is ImageStore where i have stored the converted(.wbmp) images so i want to give the path to my folder image in src.
the problem is that when i am using concat like {concat( then folder and other concat) to concat the './ImageStore/ with the image file name in{concat.....} it is giving error that
Sablotron error on line 355: token '{' not recognized in <b>/usr/local/apache/htdocs/ashu/transform2.php


So i have written src="{concat('./ImageStore/',(concat(substring-before($currentstring,'.'),'.wbmp')))}"
it is working.
What i want to know is that can we use more { and } in src or only one {and } is allowed in any string like src.If yes then what is the method ?
ashu


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • vars for attributes, (continued)
      • sascha - Thu, 25 Jul 2002 10:54:11 -0400 (EDT)
        • G. Ken Holman - Thu, 25 Jul 2002 11:11:50 -0400 (EDT)
        • sascha - Thu, 25 Jul 2002 11:24:40 -0400 (EDT)
        • bryan - Thu, 25 Jul 2002 11:43:19 -0400 (EDT)
    • ashu t - Fri, 26 Jul 2002 08:49:44 -0400 (EDT) <=

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.