0

I am facing some challenges when trying to send Apostrophe in xml file

If there is an Apostrophe in the name field, put an escape sequence and send 2 apostrophes together

M'cDonald should be send as below

M''cDonald

Any idea how this can be achieved in XSL ?

Aju Raman
  • 1
  • 2
  • 1
    Which version of XSLT/XPath? – Martin Honnen Mar 22 '16 at 14:15
  • Its XSL version 1.0.2 – Aju Raman Mar 22 '16 at 14:30
  • If your create a xslt variable `M''cDonald` and than use it `` there should be no problem. But perhaps I did not got the question right. – hr_117 Mar 22 '16 at 14:33
  • Its not a constant , I mean names will be different for different persons. So just thinking if hardcording the name would help here? – Aju Raman Mar 22 '16 at 14:39
  • If there is a Apotrophe in the name field, XML file should have 2 apostrophes - if its A's then it should be A''s – Aju Raman Mar 22 '16 at 14:40
  • 1
    There is no such thing as XSLT 1.0.2. If you're using XSLT 1.0, then you need a recursive template as shown here: http://stackoverflow.com/questions/27631190/xsl-replace-single-and-double-quotes-with-apos-and-quot/27633138#27633138 – michael.hor257k Mar 22 '16 at 15:16

0 Answers0