The replace function for XPath is part of the XPath 2.0 Candidate Recommendation submited to the W3C on 03.11.2005. Most implimentations of this XPath version and the replace function in general are based on the W3C XPath 2.0 Draft Requirement from 22.08.2003.
Because of this, you will find very few “production” quality Xpath evaluation engines already implimenting the XPath 2.0. Xalan is currently the industry standard for this and their most recent release, Xalan 2.7, still bases its XPath functionality on XPath 1.0.
If this is a functionality you cannot do without, I suggest you use one of the XPath 2.0 reference libraries and build a custom component to perform the transformation indicated.
It’s very frustrating that Mediator hasn’t this funcionality. I hope that in future releases, Xpath 2.0 will be implemented. I’ll follow your suggestion: develop an external component.
The only problem I have with this solution is that when I open the sequence in graphical mode, Mediator removes the blankspace value " " and puts an empty string.
Is there any way for defining a blankspace value in a mediator property?
The only problem I have with this solution is that when I open the sequence in graphical mode, Mediator removes the blankspace value " " and puts an empty string.
Is there any way for defining a blankspace value in a mediator property?
If you are only doing single character replacements, you can use the XPath “translate” function. The arguments are much longer, but it is part of the XPath 1.0 specification.