xsl-list
[Top] [All Lists]

[xsl] Xslt string Operation

2016-08-24 11:16:41
Dear all,
I have the following two params
<xsl:param name = “fileHref” select = “ ‘P:/developers/perf/bigPayload.xml’
”/>
<xsl:param name="outDir" select="'outDir'"/>

  I want OutFileName to be :
‘P:/developers/perf/outDir/bigPayload-Formatted.xml’

Is there a better way to do this than what I did?
<xsl:variable name="OutFileName" select=" substring-before($fileHref,
tokenize($fileHref,'/')[last() -1 ] ) || $outDir || '/' ||
substring-before( tokenize($fileHref,'/')[last()] ,'.xml') ||
'-Formatted.xml'"/>

thanks.
Dt
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>