[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: passing a regex matched substring to the result-d
Manuel Souto Pico wrote:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> I think you want <xsl:variable name="common"> <xsl:analyze-string select="$srcfilename" regex=".+/([^/]+)\.(XLF|xlf)"> <xsl:matching-substring> <xsl:value-of select="regex-group(1)"/> </xsl:matching-substring> </xsl:analyze-string> </xsl:variable> to store the matched group in the variable named common. Then you can use that variable in e.g. <xsl:variable name="newfilename" select="concat('output1/', $common, @target_language, '.xlf')"/> -- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|
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
|