[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
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
|
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
|