Built-In Replace Function

Topics: General
May 31, 2011 at 8:02 AM

Hi,

Is there a C1 "built-in" replace function, that I can use in XSLT functions, to modify the values of an xsl:variable?

Example: to eliminate the "MediaArchive:" from "MediaArchive:3439fde8-9e4a-4aa5-a19b-52783fce032a"?

The XPath Translate function is not useful here!

Thanx, steschu

 

Coordinator
May 31, 2011 at 9:10 AM

In this particular situation you can probably use substring-after($yourVar,'MediaArchive:'). But when a string replace is really needed, consider creating the feature using C# in your XSLT. XSLT 1.0 don't have string replace build in - quite horrible.