Subject:apostrophe in text nodes Author:(Deleted User) Date:17 Jan 2000 03:26 PM
I am using xsl to transform XML in SQL I have a problem when the text node has an apostrophe in the middle. I need to transform this to at least three '. I have tried xpath translate, but no matter what combination of quot and apos I use I cannot get the xsl processor to accept.
Subject:apostrophe in text nodes Author:Omri Traub Date:17 Jan 2000 03:32 PM
xsl is not great at doing string manipulation. If I understand you situation, you want to translate from a string that contains single quotes to a string that replaces those single quotes by entity references. I think you can accomplish this by using the xpath contains(), substring-before(), substring-after(), and concat() functions. You can write a named template that recursively process the string until it contains no more single quotes and uses the above functions to re-assemble the string with the entity refs.