Re: [xsl] Matching two consecutive hyphens

Subject: Re: [xsl] Matching two consecutive hyphens
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 9 Aug 2016 16:44:54 -0000
On 09.08.2016 18:32, Michele R Combs mrrothen@xxxxxxx wrote:
Actually, now that I look at it, the contains test appears to be working correctly.
The error is showing up in the next line, where I'm trying to get rid of those 2 dashes:

<xsl:value-of select="replace(.,'--',' ')"/>

The style sheet validates in Oxygen, and using Oxygen I can run the transform with no problem. However, when I try to do it in the browser (Firefox or IE) I get this:

Error during XSLT transformation: An unknown XPath extension function was called.

So maybe the problem isn't the double dashes but something else?

"replace" is a function introduced in XSLT/XPath 2.0 and as such not supported by the XSLT 1.0 processors the known browsers provide directly. If you want to use XSLT 2.0 client-side then you need to look into Saxon-CE or the recently released Saxon-JS (which is only in beta and I think not yet supported in IE).


Current Thread