p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   XSLT (http://p2p.wrox.com/forumdisplay.php?f=86)
-   -   replace string value (http://p2p.wrox.com/showthread.php?t=28407)

str33ts April 21st, 2005 11:20 AM

replace string value
 
i have a variable in XSLT called <link>
in this variable i have a url like this
<link> text.xml </link>
I want to change the file extention to .html
Note: this is generated dynamically.
how??

this is what i was thinking:
<xsl:choose>
<xsl:when test="contains($link, '.xml')">
now i have the value of link in test..
I want to put some condition here to replace .xml with .html

</xsl:when>
</xsl:choose>


thnxs



pgtips April 22nd, 2005 04:01 AM

you could use substring-before function to extract the file name, and then either the concat function or just writing out the extension


All times are GMT -4. The time now is 02:42 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.