[Home] [By Thread] [By Date] [Recent Entries]
On 22/03/2025 13:03, Roger L Costello costello@xxxxxxxxx wrote:
Suppose that you want to only replace the first match, i.e., we want "BELANCE." I do not think that there is any way to configure the XPath replace() function to "Replace only the first match." Please correct me if I am wrong about this.
<xsl:function name="functx:replace-first" as="xs:string" B B B B B B B B B B B B B xmlns:functx="http://www.functx.com"> B <xsl:param name="arg" as="xs:string?"/> B <xsl:param name="pattern" as="xs:string"/> B <xsl:param name="replacement" as="xs:string"/> B <xsl:sequence select="
B B replace($arg, concat('(^.*?)', $pattern),
B B B B B B B B B B B B concat('$1',$replacement))
B "/></xsl:function>
|

Cart



